File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ go get github.com/mikefarah/yaml
19
19
- Create a yaml file given a script file
20
20
- Convert from json to yaml
21
21
- Convert from yaml to json
22
+ - Pipe data in by using '-'
22
23
23
24
## Read examples
24
25
```
132
133
c : cat
133
134
` ` `
134
135
136
+ ### Update from STDIN
137
+ ` ` ` bash
138
+ cat sample.yaml | yaml w - b.c blah
139
+ ```
140
+
135
141
### Adding new fields
136
142
Any missing fields in the path will be created on the fly.
137
143
191
197
- name : Howdy Partner
192
198
` ` `
193
199
200
+ And, of course, you can pipe the instructions in using '-':
201
+ ` ` ` bash
202
+ cat update_instructions.yaml | yaml w -s - sample.yaml
203
+ ```
204
+
194
205
## New Examples
195
206
Yaml files can be created using the 'new' command. This works in the same way as the write command, but you don't pass in an existing Yaml file.
196
207
225
236
- name : Howdy Partner
226
237
` ` `
227
238
239
+ You can also pipe the instructions in:
240
+
241
+ ` ` ` bash
242
+ cat create_instructions.yaml | yaml n -s -
243
+ ```
244
+
228
245
## Converting to and from json
229
246
230
247
### Yaml2json
You can’t perform that action at this time.
0 commit comments