yq/pkg/yqlib/doc/Env Variable Operators.md

22 lines
293 B
Markdown
Raw Normal View History

2021-01-09 00:33:39 +00:00
## 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
```