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

Can assign-update tag

This commit is contained in:
Mike Farah
2021-01-06 20:44:28 +11:00
parent f95862fba3
commit 2743a7e058
3 changed files with 51 additions and 11 deletions

View File

@@ -22,7 +22,21 @@ will output
!!seq
```
## Convert numbers to strings
## Set custom tag
Given a sample.yml file of:
```yaml
a: str
```
then
```bash
yq eval '.a tag = "!!mikefarah"' sample.yml
```
will output
```yaml
a: !!mikefarah str
```
## Find numbers and convert them to strings
Given a sample.yml file of:
```yaml
a: cat