Pipe
Pipe the results of an expression into another. Like the bash operator.
Simple Pipe
Given a sample.yml file of:
a:
  b: catthen
yq '.a | .b' sample.ymlwill output
catMultiple updates
Given a sample.yml file of:
a: cow
b: sheep
c: samethen
yq '.a = "cat" | .b = "dog"' sample.ymlwill output
a: cat
b: dog
c: sameLast updated
Was this helpful?