Skip to content

I'd like to output a yaml structure to 1 single line #1862

Closed Answered by shakibamoshiri
maxrem asked this question in Q&A
Discussion options

You must be logged in to vote

Force the output to JSON then compact it

yq -oj -I 0 file.yaml

so -o is j = output format JSON

We cannot have compact output with YAML

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by maxrem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants