8000 Add command line option to ignore blank yaml values · Issue #15 · 0k/shyaml · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Add command line option to ignore blank yaml values #15
Open
@jsh2134

Description

@jsh2134

It would be great if there was an output flag to ignore blank yaml values. Currently it outputs null

My use case is that I'm using it along with envdir to output a docker-compose file to an envdir directory

the current command:
cat docker-compose.yml | shyaml get-value api.environment | grep -v null | awk -F': ' '{print $2 > ("envdir/" $1)}'

proposed fix would be something like
shyaml get-value api.environment --ignore-blank

via a StackOverflow comment http://stackoverflow.com/questions/5014632/how-can-i-parse-a-yaml-file-from-a-linux-shell-script/15113891?noredirect=1#comment48491233_15113891

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0