OS Manuals

/opt/iamguarded/common/bin/yq

Compatibility package for iamguarded variant of OpenSearch Dashboards

From opensearch-dashboards-2-fips-iamguarded-compat 2.19.7-r6 (enterprise-packages), captured 2026-11-09 by running yq --help (exit 0). permalink

yq is a portable command-line data file processor (https://github.com/mikefarah/yq/)
See https://mikefarah.gitbook.io/yq/ for detailed documentation and examples.

Usage:
  yq [flags]
  yq [command]

Examples:

# yq tries to auto-detect the file format based off the extension, and defaults to YAML if it's unknown (or piping through STDIN)
# Use the '-p/--input-format' flag to specify a format type.
cat file.xml | yq -p xml

# read the "stuff" node from "myfile.yml"
yq '.stuff' < myfile.yml

# update myfile.yml in place
yq -i '.stuff = "foo"' myfile.yml

# print contents of sample.json as idiomatic YAML
yq -P -oy sample.json


Available Commands:
  completion  Generate the autocompletion script for the specified shell
  eval        (default) Apply the expression to each document in each yaml file in sequence
  eval-all    Loads _all_ yaml documents of _all_ yaml files and runs expression once
  help        Help about any command

Flags:
  -C, --colors                                     force print with colors
      --csv-auto-parse                             parse CSV YAML/JSON values (default true)
      --csv-separator char                         CSV Separator character (default ,)
      --debug-node-info                            debug node info
  -e, --exit-status                                set exit status if there are no matches or null or false is returned
      --expression string                          forcibly set the expression argument. Useful when yq argument detection thinks your expression is a file.
      --from-file string                           Load expression from specified file.
  -f, --front-matter string                        (extract|process) first input as yaml front-matter. Extract will pull out the yaml content, process will run the expression against the yaml content, leaving the remaining data intact
      --header-preprocess                          Slurp any header comments and separators before processing expression. (default true)
  -h, --help                                       help for yq
  -I, --indent int                                 sets indent level for output (default 2)
      --ini-key-value-delimiters string            sequence of delimiters used to separate keys and values when parsing INI (default "=:")
      --ini-preserve-quotes                        preserve surrounding quotes on INI values during round-trip
  -i, --inplace                                    update the file in place of first file given.
  -p, --input-format string                        [auto|a|yaml|y|kyaml|ky|json|j|props|p|csv|c|tsv|t|xml|x|base64|base64url|uri|toml|hcl|h|lua|l|ini|i] parse format for input. (default "auto")
      --lua-globals                                output keys as top-level global variables
      --lua-prefix string                          prefix (default "return ")
      --lua-suffix string                          suffix (default ";\n")
      --lua-unquoted                               output unquoted string keys (e.g. {foo="bar"})
  -M, --no-colors                                  force print with no colors
  -N, --no-doc                                     Don't print document separators (---)
  -0, --nul-output                                 Use NUL char to separate values. If unwrap scalar is also set, fail if unwrapped scalar contains NUL char.
  -n, --null-input                                 Don't read input, simply evaluate the expression given. Useful for creating docs from scratch.
  -o, --output-format string                       [auto|a|yaml|y|kyaml|ky|json|j|props|p|csv|c|tsv|t|xml|x|base64|base64url|uri|toml|hcl|h|shell|s|lua|l|ini|i] output format type. (default "auto")
  -P, --prettyPrint                                pretty print, shorthand for '... style = ""'
      --properties-array-brackets                  use [x] in array paths (e.g. for SpringBoot)
      --properties-separator string                separator to use between keys and values (default " = ")
      --security-allow-write-any-path              Allow split-exp to write to paths outside the current directory.
      --security-disable-env-ops                   Disable env related operations.
      --security-disable-file-ops                  Disable file related operations (e.g. load)
      --security-enable-system-operator            Enable system operator to allow execution of external commands.
      --security-force-never-escape-shell-output   UNSAFE: with -o=shell -r, never quote or escape values (may allow command injection when eval'd)
      --shell-key-separator string                 separator for shell variable key paths (default "_")
  -s, --split-exp string                           print each result (or doc) into a file named (exp). [exp] argument must return a string. You can use $index in the expression as the result counter. The necessary directories will be created. Paths must stay within the current directory unless --security-allow-write-any-path is set.
      --split-exp-file string                      Use a file to specify the split-exp expression.
      --string-interpolation                       Toggles strings interpolation of \(exp) (default true)
      --tsv-auto-parse                             parse TSV YAML/JSON values (default true)
  -r, --unwrapScalar                               unwrap scalar, print the value with no quotes, colours or comments. Defaults to true for yaml (default true)
  -v, --verbose                                    verbose mode
  -V, --version                                    Print version information and quit
      --xml-attribute-prefix string                prefix for xml attributes (default "+@")
      --xml-content-name string                    name for xml content (if no attribute name is present). (default "+content")
      --xml-directive-name string                  name for xml directives (e.g. <!DOCTYPE thing cat>) (default "+directive")
      --xml-keep-namespace                         enables keeping namespace after parsing attributes (default true)
      --xml-proc-inst-prefix string                prefix for xml processing instructions (e.g. <?xml version="1"?>) (default "+p_")
      --xml-raw-token                              enables using RawToken method instead Token. Commonly disables namespace translations. See https://pkg.go.dev/encoding/xml#Decoder.RawToken for details. (default true)
      --xml-skip-directives                        skip over directives (e.g. <!DOCTYPE thing cat>)
      --xml-skip-proc-inst                         skip over process instructions (e.g. <?xml version="1"?>)
      --xml-strict-mode                            enables strict parsing of XML. See https://pkg.go.dev/encoding/xml for more details.
  -c, --yaml-compact-seq-indent                    Use compact sequence indentation where '- ' is considered part of the indentation.
      --yaml-fix-merge-anchor-to-spec              Fix merge anchor to match YAML spec. Will default to true in late 2025

Use "yq [command] --help" for more information about a command.
Options (51)
OptionDescriptionSource
-C, --colorsforce print with colorshelp
--csv-auto-parseparse CSV YAML/JSON values (default true)help
--csv-separator charCSV Separator character (default ,)help
--debug-node-infodebug node infohelp
-e, --exit-statusset exit status if there are no matches or null or false is returnedhelp
--expression stringforcibly set the expression argument.help
--from-file stringLoad expression from specified file.help
-f, --front-matter string(extract|process) first input as yaml front-matter.help
--header-preprocessSlurp any header comments and separators before processing expression.help
-h, --helphelp for yqhelp
-I, --indent intsets indent level for output (default 2)help
--ini-key-value-delimiters stringsequence of delimiters used to separate keys and values when parsing INI (default "=:")help
--ini-preserve-quotespreserve surrounding quotes on INI values during round-triphelp
-i, --inplaceupdate the file in place of first file given.help
-p, --input-format string[auto|a|yaml|y|kyaml|ky|json|j|props|p|csv|c|tsv|t|xml|x|base64|base64url|uri|toml|hcl|h|lua|l|ini|i] parse format for input.help
--lua-globalsoutput keys as top-level global variableshelp
--lua-prefix stringprefix (default "return ")help
--lua-suffix stringsuffix (default ";\n")help
--lua-unquotedoutput unquoted string keys (e.g. {foo="bar"})help
-M, --no-colorsforce print with no colorshelp
-N, --no-docDon't print document separators (---)help
-0, --nul-outputUse NUL char to separate values.help
-n, --null-inputDon't read input, simply evaluate the expression given.help
-o, --output-format string[auto|a|yaml|y|kyaml|ky|json|j|props|p|csv|c|tsv|t|xml|x|base64|base64url|uri|toml|hcl|h|shell|s|lua|l|ini|i] output format type.help
-P, --prettyPrintpretty print, shorthand for '...help
--properties-array-bracketsuse [x] in array paths (e.g. for SpringBoot)help
--properties-separator stringseparator to use between keys and values (default " = ")help
--security-allow-write-any-pathAllow split-exp to write to paths outside the current directory.help
--security-disable-env-opsDisable env related operations.help
--security-disable-file-opsDisable file related operations (e.g. load)help
--security-enable-system-operatorEnable system operator to allow execution of external commands.help
--security-force-never-escape-shell-outputUNSAFE: with -o=shell -r, never quote or escape values (may allow command injection when eval'd)help
--shell-key-separator stringseparator for shell variable key paths (default "_")help
-s, --split-exp stringprint each result (or doc) into a file named (exp).help
--split-exp-file stringUse a file to specify the split-exp expression.help
--string-interpolationToggles strings interpolation of \(exp) (default true)help
--tsv-auto-parseparse TSV YAML/JSON values (default true)help
-r, --unwrapScalarunwrap scalar, print the value with no quotes, colours or comments.help
-v, --verboseverbose modehelp
-V, --versionPrint version information and quithelp
--xml-attribute-prefix stringprefix for xml attributes (default "+@")help
--xml-content-name stringname for xml content (if no attribute name is present).help
--xml-directive-name stringname for xml directives (e.g. <!DOCTYPE thing cat>) (default "+directive")help
--xml-keep-namespaceenables keeping namespace after parsing attributes (default true)help
--xml-proc-inst-prefix stringprefix for xml processing instructions (e.g. <?xml version="1"?>) (default "+p_")help
--xml-raw-tokenenables using RawToken method instead Token.help
--xml-skip-directivesskip over directives (e.g. <!DOCTYPE thing cat>)help
--xml-skip-proc-instskip over process instructions (e.g. <?xml version="1"?>)help
--xml-strict-modeenables strict parsing of XML.help
-c, --yaml-compact-seq-indentUse compact sequence indentation where '- ' is considered part of the indentation.help
--yaml-fix-merge-anchor-to-specFix merge anchor to match YAML spec.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.