2020-06-08 03:29:51 +03:00
|
|
|
/a:
|
|
|
|
a
|
|
|
|
/b:
|
|
|
|
b
|
|
|
|
/c:
|
|
|
|
c
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d raw ._description /a /b /c
|
2020-06-08 03:29:51 +03:00
|
|
|
"/a"
|
|
|
|
"/b"
|
|
|
|
"/c"
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d raw (.,inputs)._description /a /b /c
|
2020-06-08 03:29:51 +03:00
|
|
|
"/a"
|
|
|
|
"/b"
|
|
|
|
"/c"
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d raw (.,input,input,input)._description /a /b /c
|
2020-06-08 03:29:51 +03:00
|
|
|
"/a"
|
|
|
|
"/b"
|
|
|
|
"/c"
|
|
|
|
exitcode: 5
|
|
|
|
stderr:
|
|
|
|
error: break
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d raw -n (.,inputs)._description /a /b /c
|
2020-06-08 03:29:51 +03:00
|
|
|
null
|
|
|
|
"/a"
|
|
|
|
"/b"
|
|
|
|
"/c"
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d raw -n inputs._description /a /b /c
|
2020-06-08 03:29:51 +03:00
|
|
|
"/a"
|
|
|
|
"/b"
|
|
|
|
"/c"
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d raw -n '[inputs._description]' /a /b /c
|
2020-06-08 03:29:51 +03:00
|
|
|
[
|
|
|
|
"/a",
|
|
|
|
"/b",
|
|
|
|
"/c"
|
|
|
|
]
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d raw -n (input,input,input,input)._description /a /b /c
|
2020-06-08 03:29:51 +03:00
|
|
|
"/a"
|
|
|
|
"/b"
|
|
|
|
"/c"
|
|
|
|
exitcode: 5
|
|
|
|
stderr:
|
|
|
|
error: break
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d raw input_filename /a /b /c
|
2020-06-08 03:29:51 +03:00
|
|
|
"/a"
|
|
|
|
"/b"
|
|
|
|
"/c"
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d raw input_filename /a /non-existing /c
|
2020-06-08 03:29:51 +03:00
|
|
|
"/a"
|
|
|
|
"/c"
|
|
|
|
exitcode: 2
|
|
|
|
stderr:
|
2021-10-06 19:31:45 +03:00
|
|
|
error: open testdata/non-existing: no such file or directory
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d raw '(' /a /b /c
|
2020-06-08 03:29:51 +03:00
|
|
|
exitcode: 3
|
|
|
|
stderr:
|
2021-08-18 19:47:13 +03:00
|
|
|
error: arg:1:2: unexpected token <EOF>
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d raw bla /a /b /c
|
2020-06-08 03:29:51 +03:00
|
|
|
exitcode: 3
|
|
|
|
stderr:
|
2021-08-18 19:47:13 +03:00
|
|
|
error: arg:1:0: function not defined: bla/0
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d raw '1+"a"' /a /b /c
|
2020-06-08 03:29:51 +03:00
|
|
|
exitcode: 5
|
|
|
|
stderr:
|
|
|
|
error: cannot add: number (1) and string ("a")
|
|
|
|
error: cannot add: number (1) and string ("a")
|
|
|
|
error: cannot add: number (1) and string ("a")
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -s -d raw [.[]._description] /a /b /c
|
2020-06-08 03:29:51 +03:00
|
|
|
[
|
|
|
|
"/a",
|
|
|
|
"/b",
|
|
|
|
"/c"
|
|
|
|
]
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -n -s -d raw . /a /b /c
|
2020-06-08 03:29:51 +03:00
|
|
|
null
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq . /a
|
2020-06-08 03:29:51 +03:00
|
|
|
exitcode: 4
|
|
|
|
stderr:
|
|
|
|
error: /a: failed to decode (probe), try -d FORMAT to force
|
2021-08-18 22:03:05 +03:00
|
|
|
$ fq -i -d raw . /a /b /c
|
2021-10-28 12:18:01 +03:00
|
|
|
raw, ...[3]> ._format
|
2021-08-18 22:03:05 +03:00
|
|
|
"raw"
|
|
|
|
"raw"
|
|
|
|
"raw"
|
2021-10-28 12:18:01 +03:00
|
|
|
raw, ...[3]> ^D
|
2021-08-18 22:03:05 +03:00
|
|
|
$ fq -i -s -d raw . /a /b /c
|
|
|
|
[raw, ...][3]> .[]._format
|
|
|
|
"raw"
|
|
|
|
"raw"
|
|
|
|
"raw"
|
|
|
|
[raw, ...][3]> ^D
|