v4.27.3 updates

This commit is contained in:
Mike Farah
2022-08-29 18:31:50 +10:00
parent 8c2488d25f
commit 05ee3403ca
3 changed files with 83 additions and 0 deletions
+20
View File
@@ -112,6 +112,26 @@ will output
cat; meow; 1; ; true
```
## Trim strings
Given a sample.yml file of:
```yaml
- ' cat'
- 'dog '
- ' cow cow '
- horse
```
then
```bash
yq '.[] | trim' sample.yml
```
will output
```yaml
cat
dog
cow cow
horse
```
## Match string
Given a sample.yml file of:
```yaml