Skip to content
xnslongPublic

About

bash tool for parsing YAML files (implemented with awk)

Resources

Stars

9 stars

Watchers

2 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

yaml

bash tool for parsing YAML files (implemented with awk)

usage

Suppose we have the following YAML file ("my-list.yaml").

fruit:
  apple:
    price: 5
    amount: 10
  orange:
    price: 4
    amount: 9
book:
  cooking-about: "not-ready-yet"

then we can get the values in it as following.

$ cat my-list.yaml | ./bin/get_yaml_value "/fruit/apple/amount" 
10
$ cat my-list.yaml | ./bin/get_yaml_value "/book/cooking-about"
not-ready-yet
$ cat my-list.yaml | ./bin/get_yaml_value "/book/story/harry-potter"
$ # we got nothing here

About

bash tool for parsing YAML files (implemented with awk)

Resources

Stars

9 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages