mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-13 22:38:04 +00:00
408 B
408 B
Pipe the results of an expression into another. Like the bash operator.
Simple Pipe
Given a sample.yml file of:
a:
b: cat
then
yq eval '.a | .b' sample.yml
will output
cat
Multiple updates
Given a sample.yml file of:
a: cow
b: sheep
c: same
then
yq eval '.a = "cat" | .b = "dog"' sample.yml
will output
a: cat
b: dog
c: same