diff --git a/cmd/evaluate_all_command.go b/cmd/evaluate_all_command.go index 44801f69..2470b4a4 100644 --- a/cmd/evaluate_all_command.go +++ b/cmd/evaluate_all_command.go @@ -17,6 +17,9 @@ func createEvaluateAllCommand() *cobra.Command { Example: ` # merges f2.yml into f1.yml (inplace) yq eval-all --inplace 'select(fileIndex == 0) * select(fileIndex == 1)' f1.yml f2.yml + +# use '-' as a filename to read from STDIN +cat file2.yml | yq ea '.a.b' file1.yml - file3.yml `, Long: "Evaluate All:\nUseful when you need to run an expression across several yaml documents or files. Consumes more memory than eval", RunE: evaluateAll, diff --git a/cmd/evalute_sequence_command.go b/cmd/evalute_sequence_command.go index 7f17df26..22aafe65 100644 --- a/cmd/evalute_sequence_command.go +++ b/cmd/evalute_sequence_command.go @@ -21,6 +21,9 @@ yq e '.a.b | length' f1.yml f2.yml # prints out the file yq e sample.yaml +# use '-' as a filename to read from STDIN +cat file2.yml | yq e '.a.b' file1.yml - file3.yml + # prints a new yaml document yq e -n '.a.b.c = "cat"'