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
1919- Create a yaml file given a script file
2020- Convert from json to yaml
2121- Convert from yaml to json
22+ - Pipe data in by using '-'
2223
2324## Read examples
2425```
132133 c : cat
133134` ` `
134135
136+ ### Update from STDIN
137+ ` ` ` bash
138+ cat sample.yaml | yaml w - b.c blah
139+ ```
140+
135141### Adding new fields
136142Any missing fields in the path will be created on the fly.
137143
191197 - name : Howdy Partner
192198` ` `
193199
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+
194205## New Examples
195206Yaml 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.
196207
225236 - name : Howdy Partner
226237` ` `
227238
239+ You can also pipe the instructions in:
240+
241+ ` ` ` bash
242+ cat create_instructions.yaml | yaml n -s -
243+ ```
244+
228245## Converting to and from json
229246
230247### Yaml2json
You can’t perform that action at this time.
0 commit comments