Run a Ruby snippet for each top-level YAML item.
gem install dorian-yaml-eachAlso included in the aggregate gem:
gem install dorianyaml-each [file ...] "ruby code"Run yaml-each -h for generated option details and yaml-each -v for the installed version.
- The parsed YAML value is converted to deep structs, then iterated.
printf -- '- 1\n- 2\n' | yaml-each "p it"