Simplified yq usage

This commit is contained in:
Mike Farah
2022-01-28 12:45:43 +11:00
parent e84a50db2e
commit 9896245f71
44 changed files with 515 additions and 316 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ Given a sample.yml file of:
```
then
```bash
yq eval '.[] as $item ireduce (0; . + $item)' sample.yml
yq '.[] as $item ireduce (0; . + $item)' sample.yml
```
will output
```yaml
@@ -67,7 +67,7 @@ Given a sample.yml file of:
```
then
```bash
yq eval '.[] as $item ireduce ({}; .[$item | .name] = ($item | .has) )' sample.yml
yq '.[] as $item ireduce ({}; .[$item | .name] = ($item | .has) )' sample.yml
```
will output
```yaml