1
0
mirror of https://github.com/taigrr/yq synced 2025-01-18 04:53:17 -08:00
yq/pkg/yqlib/doc/Pipe.md
Mike Farah f7f8bed955 wip
2020-12-27 09:55:21 +11:00

435 B

Pipe the results of an expression into another. Like the bash operator.

Simple Pipe

Given a sample.yml file of:

a: {b: cat}
'': null

then

yq eval '.a | .b' sample.yml

will output

cat

Multiple updates

Given a sample.yml file of:

a: cow
b: sheep
c: same
'': null

then

yq eval '.a = "cat" | .b = "dog"' sample.yml

will output

a: cat
b: dog
c: same
'': null