Evaluate
Evaluates the given expression against each yaml document in each file, in sequence
Usage:
yq eval [expression] [yaml_file1]... [flags]Examples:
# runs the expression against each file, in series
yq '.a.b | length' f1.yml f2.yml
# '-' will pipe from STDIN
cat file.yml | yq '.a.b' f1.yml - f2.yml
# prints out the file
yq sample.yaml
cat sample.yml | yq e
# prints a new yaml document
yq -n '.a.b.c = "cat"'
# updates file.yaml directly
yq '.a.b = "cool"' -i file.yaml Flags:
Last updated