Skip to content

Instantly share code, notes, and snippets.

@Ketouem
Created January 18, 2016 11:12
Show Gist options
  • Save Ketouem/19918b4fcc5e18a12711 to your computer and use it in GitHub Desktop.
Save Ketouem/19918b4fcc5e18a12711 to your computer and use it in GitHub Desktop.
Parse YAML from the CLI suing Ruby
function ryaml {
ruby -ryaml -e 'puts ARGV[1..-1].inject(YAML.load(File.read(ARGV[0]))) {|acc, key| acc[key] }' "$@"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment