File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -68,14 +68,23 @@ Changes
68
68
- Add ` --binary ` /` -b ` on Windows for binary output. To get ` \n ` instead of ` \r\n ` line endings. 0dab2b1 @nicowilliams
69
69
- Add ` --nul-output ` /` -0 ` for null (zero byte) separated output. #1990 @pabs3 , #2235 @asottile
70
70
``` sh
71
- # will output a zero byte between outputs
71
+ # will output a zero byte after each output
72
72
$ jq -n0 ' 1,2,3' | xxd
73
73
00000000: 3100 3200 3300 1.2.3.
74
- # can for example be used with xargs -0
75
- $ jq -n -0 1,2,3 | xargs -0 -n1
76
- 1
77
- 2
78
- 3
74
+ # can be used with xargs -0
75
+ $ jq -n -0 ' "a","b","c"' | xargs -0 -n1
76
+ a
77
+ b
78
+ c
79
+ $ jq -n -0 ' "a b c", "d\ne\nf"' | xargs -0 printf ' %q\n'
80
+ ' a b c'
81
+ ' d' $' \n ' ' e' $' \n ' ' f'
82
+ # can be used with read -d ''
83
+ $ while IFS= read -r -d ' ' json; do
84
+ > jq ' .name' <<< " $json"
85
+ > done < <( jq -n -0 ' {name:"a b c"},{name:"d\ne\nf"}' )
86
+ " a b c"
87
+ " d\ne\nf"
79
88
```
80
89
- Fix issue converting string to number after previous convert error. #2400 @thalman
81
90
You can’t perform that action at this time.
0 commit comments