2021-08-14 20:50:17 +03:00
|
|
|
$ fq -i
|
2021-09-23 15:39:03 +03:00
|
|
|
null>
|
|
|
|
null> .
|
|
|
|
null
|
2021-08-14 20:50:17 +03:00
|
|
|
null> 1+1
|
|
|
|
2
|
|
|
|
null> (
|
2021-08-18 19:47:13 +03:00
|
|
|
error: repl:1:2: unexpected token <EOF>
|
2021-08-14 20:50:17 +03:00
|
|
|
null> abc
|
2021-08-18 19:47:13 +03:00
|
|
|
error: repl:1:0: function not defined: abc/0
|
2021-08-14 20:50:17 +03:00
|
|
|
null> 1+"a"
|
|
|
|
error: cannot add: number (1) and string ("a")
|
|
|
|
null> 1 | repl
|
|
|
|
> number> .+1
|
|
|
|
2
|
|
|
|
> number> ^D
|
2021-08-19 19:11:37 +03:00
|
|
|
null> 1 | 2 | repl
|
|
|
|
> number> .+1
|
|
|
|
3
|
|
|
|
> number> ^D
|
|
|
|
null> 1,2,3 | repl
|
2021-09-02 20:42:23 +03:00
|
|
|
> number, [3]> .
|
2021-08-14 20:50:17 +03:00
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
2021-09-02 20:42:23 +03:00
|
|
|
> number, [3]> ^D
|
2021-09-04 01:54:51 +03:00
|
|
|
null> def f: 1; f,f | repl
|
|
|
|
> number, [2]> .
|
|
|
|
1
|
|
|
|
1
|
|
|
|
> number, [2]> ^D
|
2021-08-19 19:11:37 +03:00
|
|
|
null> [1,2,3] | repl
|
2021-09-02 20:42:23 +03:00
|
|
|
> [number, ...][3]> .
|
|
|
|
[
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
3
|
|
|
|
]
|
|
|
|
> [number, ...][3]> ^D
|
2021-08-19 19:11:37 +03:00
|
|
|
null> [1] | repl
|
2021-09-02 20:42:23 +03:00
|
|
|
> [number]> .
|
|
|
|
[
|
|
|
|
1
|
|
|
|
]
|
|
|
|
> [number]> ^D
|
2021-08-19 19:11:37 +03:00
|
|
|
null> [] | repl
|
|
|
|
> []> ^D
|
2021-08-14 20:50:17 +03:00
|
|
|
null> ^D
|
|
|
|
$ fq -i 'empty'
|
|
|
|
empty> 1
|
|
|
|
empty> ^D
|
2021-08-19 19:11:37 +03:00
|
|
|
$ fq -i 1,2,3
|
|
|
|
number, [3]> .*2
|
|
|
|
2
|
|
|
|
4
|
|
|
|
6
|
|
|
|
number, [3]> ^D
|
|
|
|
$ fq -i '[1,2,3]'
|
|
|
|
[number, ...][3]> repl({compact: true})
|
|
|
|
> [number, ...][3]> tovalue
|
|
|
|
[1,2,3]
|
|
|
|
> [number, ...][3]> ^D
|
|
|
|
[number, ...][3]> ^D
|
2021-09-07 19:02:14 +03:00
|
|
|
$ fq -n repl
|
|
|
|
exitcode: 5
|
|
|
|
stderr:
|
2021-09-18 11:47:43 +03:00
|
|
|
error: repl can only be used from interactive repl
|