mirror of
https://github.com/wader/fq.git
synced 2024-12-25 22:34:14 +03:00
a3cfcd0ad2
Also add tests for print* and stderr
44 lines
574 B
Plaintext
44 lines
574 B
Plaintext
$ fq -i
|
|
null> {a: 123, b: []} | debug
|
|
{
|
|
"a": 123,
|
|
"b": []
|
|
}
|
|
null> {a: 123, b: []} | debug({a})
|
|
{
|
|
"a": 123,
|
|
"b": []
|
|
}
|
|
null> ^D
|
|
stderr:
|
|
["DEBUG",{"a":123,"b":[]}]
|
|
["DEBUG",{"a":123}]
|
|
$ fq -n 'null, {a:1}, "abc" | ., "\n" | print'
|
|
null
|
|
{"a":1}
|
|
abc
|
|
$ fq -n 'null, {a:1}, "abc" | println'
|
|
null
|
|
{"a":1}
|
|
abc
|
|
$ fq -n 'null, {a:1}, "abc" | ., "\n" | printerr'
|
|
stderr:
|
|
null
|
|
{"a":1}
|
|
abc
|
|
$ fq -n 'null, {a:1}, "abc" | printerrln'
|
|
stderr:
|
|
null
|
|
{"a":1}
|
|
abc
|
|
$ fq -n 'null, {a:1}, "abc" | ., "\n" | stderr'
|
|
null
|
|
"\n"
|
|
{
|
|
"a": 1
|
|
}
|
|
"\n"
|
|
"abc"
|
|
"\n"
|
|
stderr:
|
|
null"\n"{"a":1}"\n""abc""\n" |