This commit is contained in:
Mike Farah 2024-03-24 11:27:08 +11:00
parent b9f4f3bf5b
commit 7200b5afa0

View File

@ -172,7 +172,7 @@ yq '.apple' <(curl -s https://somewhere/data1.yaml) <(cat file.yml)
The most important thing to remember to do is to have brackets around the LHS expression - otherwise what `yq` will do is first filter by the selection, and then, separately, update the filtered result and return that subset.
```
yq '(.foo.bar[] | select(name == "fred) | .apple) = "cool"'
yq '(.foo.bar[] | select(.name == "fred") | .apple) = "cool"'
```
## Combining multiple files into one