Read all documents of all given yaml files into memory, then run the given expression once against the lot.
Evaluate All is most useful when needing to run expressions that depend on multiple yaml documents or files. Merge is probably the most common reason why evaluate all would be used. Note that eval-all consumes more memory than evaluate.
Like evaluate you can use - to pipe from STDIN.
Usage
yqeval-all [expression] [yaml_file1]... [flags]
Aliases: eval-all, ea
Examples
# merges f2.yml into f1.yml (inplace)yqeval-all--inplace'select(fileIndex == 0) * select(fileIndex == 1)'f1.ymlf2.yml# you can merge into a file, piping from STDINcatsomefile.yml|yqeval-all--inplace'select(fileIndex == 0) * select(fileIndex == 1)'f1.yml-
Flags
-h,--helphelpforeval-all-C,--colorsforceprintwithcolors-e,--exit-statussetexitstatusiftherearenomatchesornullorfalseisreturned-I,--indentintsetsindentlevelforoutput (default 2)-i,--inplaceupdatetheyamlfileinplaceoffirstyamlfilegiven.-M,--no-colorsforceprintwithnocolors-N,--no-docDon't print document separators (---) -n, --null-input Don't read input, simply evaluate the expression given. Useful for creating yaml docs from scratch.
-j, --tojson output as json. Set indent to 0 to print json in one line. -v, --verbose verbose mode