mirror of
https://github.com/taigrr/yq
synced 2025-01-18 04:53:17 -08:00
strenv
This commit is contained in:
21
pkg/yqlib/doc/Env Variable Operators.md
Normal file
21
pkg/yqlib/doc/Env Variable Operators.md
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user