1
0
mirror of https://github.com/taigrr/yq synced 2025-01-18 04:53:17 -08:00
yq/pkg/yqlib/doc/Env Variable Operators.md
Mike Farah aabed1a237 strenv
2021-01-09 11:38:08 +11:00

22 lines
293 B
Markdown

## Read boolean environment variable as a string
Running
```bash
myenv="true" yq eval --null-input 'strenv(myenv)'
```
will output
```yaml
12
```
## Read numeric environment variable as a string
Running
```bash
myenv="12" yq eval --null-input 'strenv(myenv)'
```
will output
```yaml
12
```