yq: a lightweight and portable command-line YAML processor
https://github.com/mikefarah/yq| Installer Source| Releases (json) (tab)
yq: a lightweight and portable command-line YAML processor
https://github.com/mikefarah/yq| Installer Source| Releases (json) (tab)
To update or switch versions, run webi yq@stable or webi yq@beta, etc.
These are the files / directories that are created and/or modified with this install:
~/.config/envman/PATH.env
~/.local/bin/yq
~/.local/share/man/man1/yq.1
yqis likejq, meaning that it's likesedfor YAML data - you can use it to slice and filter and map and transform structured data with the same ease thatsed,awk,grepand friends let you play with text.
Usage: yq e '<selector>' <filepath>
Works with YAML:
echo 'name: John' | yq e '.name' -
Works with JSON:
echo '[ { "name": "John" }, { "name": "Jane" } ]' | yq e '.[].name' -
See https://mikefarah.gitbook.io/yq/ for the docs.