2021-09-07 01:26:24 +03:00
|
|
|
/a.json:
|
|
|
|
aaa
|
|
|
|
/b.json:
|
|
|
|
bbb
|
2022-07-04 13:24:03 +03:00
|
|
|
$ fq -i -n --raw-file filea a.json --raw-file fileb b.json --arg arga aa --arg argb bb --argjson argjsona 123 --argjson argjsonb '[true,123,{},"abc"]' --argdecode argdecodea test.mp3 --argdecode argdecodeb test.mp3
|
2021-09-07 01:26:24 +03:00
|
|
|
null> $filea
|
|
|
|
"aaa\n"
|
|
|
|
null> $fileb
|
|
|
|
"bbb\n"
|
|
|
|
null> $arga
|
|
|
|
"aa"
|
|
|
|
null> $argb
|
|
|
|
"bb"
|
|
|
|
null> $argjsona
|
|
|
|
123
|
|
|
|
null> $argjsonb
|
|
|
|
[
|
|
|
|
true,
|
|
|
|
123,
|
|
|
|
{},
|
|
|
|
"abc"
|
|
|
|
]
|
2022-07-04 13:24:03 +03:00
|
|
|
null> $argdecodea | format
|
2021-09-07 01:26:24 +03:00
|
|
|
"mp3"
|
2022-07-04 13:24:03 +03:00
|
|
|
null> $argdecodeb | format
|
2021-09-07 01:26:24 +03:00
|
|
|
"mp3"
|
|
|
|
null> ^D
|
2022-05-21 20:33:52 +03:00
|
|
|
$ fq -n --raw-file filea nonexisting
|
2021-09-07 01:26:24 +03:00
|
|
|
exitcode: 2
|
|
|
|
stderr:
|
2022-05-21 20:33:52 +03:00
|
|
|
error: nonexisting: no such file or directory
|
2022-07-04 13:24:03 +03:00
|
|
|
$ fq -n --argdecode filea nonexisting
|
2021-09-07 01:26:24 +03:00
|
|
|
exitcode: 2
|
|
|
|
stderr:
|
2022-07-04 13:24:03 +03:00
|
|
|
error: --argdecode filea: no such file or directory
|
|
|
|
$ fq -n -d mp4 --argdecode filea test.mp3 '$filea'
|
2022-05-21 20:33:52 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: test.mp3 (mp4)
|
2021-11-20 18:22:00 +03:00
|
|
|
| | | error: mp4: error at position 0x8: no styp, ftyp, free or moov box found
|
2021-11-05 17:04:26 +03:00
|
|
|
0x000|49 44 33 04 00 00 00 00 00 23 54 53 53 45 00 00|ID3......#TSSE..| unknown0: raw bits
|
2021-09-07 01:26:24 +03:00
|
|
|
* |until 0x283.7 (end) (644) | |
|
|
|
|
$ fq -n --argjson a '(' '$a'
|
2021-09-07 17:39:59 +03:00
|
|
|
exitcode: 2
|
2021-09-07 01:26:24 +03:00
|
|
|
stderr:
|
|
|
|
error: --argjson a: invalid character '(' looking for beginning of value
|
|
|
|
$ fq -n --argjson a
|
|
|
|
exitcode: 2
|
|
|
|
stderr:
|
|
|
|
error: --argjson: needs two argument
|