YAML

From neil.tappsville.com
Jump to navigationJump to search

YAML

Pretty print

yq e -P myyamlfile.yaml

Sort by keys

yq e 'sortKeys(.collectd*)' myyamlfile.yaml

return keys

yq e '."collectd::routers".*.types = "juniper" |  ."collectd::routers" | keys' monitor-prod.yaml