1
0
mirror of https://github.com/taigrr/yq synced 2025-01-18 04:53:17 -08:00

Minor fixes

This commit is contained in:
Mike Farah
2020-11-19 22:11:26 +11:00
parent 75044e480c
commit 9bd9468526
5 changed files with 50 additions and 9 deletions

View File

@@ -48,3 +48,19 @@ a: cat
b: dog
```
### Delete matching entries
Given a sample.yml file of:
```yaml
a: cat
b: dog
c: bat
```
then
```bash
yq eval 'del( .[] | select(. == "*at") )' sample.yml
```
will output
```yaml
b: dog
```