mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-06 10:04:43 +08:00
Update document generation script
This commit is contained in:
+1
-10
@@ -3,15 +3,11 @@
|
||||
This operator is used to combine different results together.
|
||||
|
||||
## Combine scalars
|
||||
|
||||
Running
|
||||
|
||||
```bash
|
||||
yq eval --null-input '1, true, "cat"'
|
||||
```
|
||||
|
||||
will output
|
||||
|
||||
```yaml
|
||||
1
|
||||
true
|
||||
@@ -19,24 +15,19 @@ cat
|
||||
```
|
||||
|
||||
## Combine selected paths
|
||||
|
||||
Given a sample.yml file of:
|
||||
|
||||
```yaml
|
||||
a: fieldA
|
||||
b: fieldB
|
||||
c: fieldC
|
||||
```
|
||||
|
||||
then
|
||||
|
||||
```bash
|
||||
yq eval '.a, .c' sample.yml
|
||||
```
|
||||
|
||||
will output
|
||||
|
||||
```yaml
|
||||
fieldA
|
||||
fieldC
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user