Like jq
, but for EDN (and a lot less
powerful).
$ eq [selector [<path>]]
If no path is given, eq
reads from stdin
. The default selector is .
(just
like jq
).
# pretty-print each line
cat *.edn | eq .
# pretty-print the :foo-bar value of each line
cat *.edn | eq .foo-bar
# read from a file
eq .name people.edn
.
: the object itself. This is identical to giving no selector at all.:foo
: Apply:foo
to the current object..foo
: Equivalent of:foo
but.foo.bar
is interpreted as:foo
then:bar
instead of the:foo.bar
keyword.
You need to have Node installed on your machine.
- Retrieve this project locally and run
./scripts/build-advanced
. You can also downloadeq.js
from the releases page chmod u+x target/eq.js
- Move
target/eq.js
somewhere in yourPATH
With Homebrew on macOS
brew install bfontaine/utils/eq
Copyright © 2016-2017 Oscaro