Skip to content

Commit b7a9869

Browse files
committed
Update CLI examples
1 parent ff09a55 commit b7a9869

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,19 @@ options:
7676
### Examples
7777

7878
```
79-
% echo '{"a":"hello", "b":" world"}' | python3 -m jsonata.cli '(a & b)'
79+
% echo '{"a":"hello", "b":" world"}' | jsonata '(a & b)'
8080
hello world
8181
82-
% echo '{"a":"hello", "b":" world"}' | python3 -m jsonata.cli -o helloworld.json $
82+
% echo '{"a":"hello", "b":" world"}' | jsonata -o helloworld.json $
8383
# helloworld.json written
8484
85-
% ls | python3 -m jsonata.cli $
85+
% ls | jsonata $
8686
helloworld.json
8787
88-
% ps -o pid="",%cpu="",%mem="" | python3 -m jsonata.cli '$.$split(/\n/).$trim().[ $split(/\s+/)[$length()>0].$number() ]' -c
88+
% ps -o pid="",%cpu="",%mem="" | jsonata '$.$split(/\n/).$trim().[ $split(/\s+/)[$length()>0].$number() ]' -c
8989
[[4105,0,0],[4646,0,0],[4666,0,0],[33696,0,0]...]
9090
91-
% curl -s https://raw.githubusercontent.com/jsonata-js/jsonata/master/test/test-suite/datasets/dataset1.json | python3 -m jsonata.cli '{"Name": FirstName & " " & Surname, "Cities": **.City, "Emails": Email[type="home"].address}'
91+
% curl -s https://raw.githubusercontent.com/jsonata-js/jsonata/master/test/test-suite/datasets/dataset1.json | jsonata '{"Name": FirstName & " " & Surname, "Cities": **.City, "Emails": Email[type="home"].address}'
9292
{
9393
"Name": "Fred Smith",
9494
"Cities": [
@@ -101,7 +101,7 @@ helloworld.json
101101
]
102102
}
103103
104-
% python3 -m jsonata.cli -i helloworld.json -it
104+
% jsonata -i helloworld.json -it
105105
Enter an expression to have it evaluated.
106106
JSONata> (a & b)
107107
hello world

0 commit comments

Comments
 (0)