grep for YAML

NOTE: V4 has vastly changed command line semantics.

cf

  • [[yaml]]
  • pxi
  • [jq] grep for JSON

Installation

brew install yq

TODO: I need to document this.

Looks like yq is the YAML jq equivalent.

brew install yq

Give sample.yaml

b:
  c: 2

then cat sample.yaml | yq read - b.c will output 2.