📖
yq
📖
yq
📖
yq
📖
yq
v4.x
yq
Upgrading from V3
Commands
Evaluate
Evaluate All
Shell Completion
Operators
Add
Alternative (Default value)
Anchor and Alias Operators
Assign
Boolean Operators
Collect into Array
Comment Operators
Create, Collect into Object
Delete
Document Index
Env Variable Operators
Equals
File Operators
Has
Keys
Length
Multiply
Path
Pipe
Recursive Descent (Glob)
Select
Sort Keys
Split into Documents
String Operators
Style
Tag
Traverse
Union
Usage
Output format
Working with JSON
Tips, Tricks, Troubleshooting
Github Page
Powered by GitBook

Pipe

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
Previous
Path
Next
Recursive Descent (Glob)
Last updated 6 days ago
Contents
Simple Pipe
Multiple updates