Blame gettext-runtime/doc/rt-envsubst.texi

Packit 5b56b6
@pindex envsubst
Packit 5b56b6
@cindex @code{envsubst} program, usage
Packit 5b56b6
@example
Packit 5b56b6
envsubst [@var{option}] [@var{shell-format}]
Packit 5b56b6
@end example
Packit 5b56b6
Packit 5b56b6
@cindex shell format string
Packit 5b56b6
@cindex dollar substitution
Packit 5b56b6
@cindex environment variables
Packit 5b56b6
The @code{envsubst} program substitutes the values of environment variables.
Packit 5b56b6
Packit 5b56b6
@noindent @strong{Operation mode}
Packit 5b56b6
Packit 5b56b6
@table @samp
Packit 5b56b6
@item -v
Packit 5b56b6
@itemx --variables
Packit 5b56b6
@opindex -v@r{, @code{envsubst} option}
Packit 5b56b6
@opindex --variables@r{, @code{envsubst} option}
Packit 5b56b6
Output the variables occurring in @var{shell-format}.
Packit 5b56b6
Packit 5b56b6
@end table
Packit 5b56b6
Packit 5b56b6
@noindent @strong{Informative output}
Packit 5b56b6
Packit 5b56b6
@table @samp
Packit 5b56b6
@item -h
Packit 5b56b6
@itemx --help
Packit 5b56b6
@opindex -h@r{, @code{envsubst} option}
Packit 5b56b6
@opindex --help@r{, @code{envsubst} option}
Packit 5b56b6
Display this help and exit.
Packit 5b56b6
Packit 5b56b6
@item -V
Packit 5b56b6
@itemx --version
Packit 5b56b6
@opindex -V@r{, @code{envsubst} option}
Packit 5b56b6
@opindex --version@r{, @code{envsubst} option}
Packit 5b56b6
Output version information and exit.
Packit 5b56b6
Packit 5b56b6
@end table
Packit 5b56b6
Packit 5b56b6
In normal operation mode, standard input is copied to standard output,
Packit 5b56b6
with references to environment variables of the form @code{$VARIABLE} or
Packit 5b56b6
@code{$@{VARIABLE@}} being replaced with the corresponding values.  If a
Packit 5b56b6
@var{shell-format} is given, only those environment variables that are
Packit 5b56b6
referenced in @var{shell-format} are substituted; otherwise all environment
Packit 5b56b6
variables references occurring in standard input are substituted.
Packit 5b56b6
Packit 5b56b6
These substitutions are a subset of the substitutions that a shell performs
Packit 5b56b6
on unquoted and double-quoted strings.  Other kinds of substitutions done
Packit 5b56b6
by a shell, such as @code{$@{@var{variable}-@var{default}@}} or
Packit 5b56b6
@code{$(@var{command-list})} or @code{`@var{command-list}`}, are not performed
Packit 5b56b6
by the @code{envsubst} program, due to security reasons.
Packit 5b56b6
Packit 5b56b6
When @code{--variables} is used, standard input is ignored, and the output
Packit 5b56b6
consists of the environment variables that are referenced in
Packit 5b56b6
@var{shell-format}, one per line.