1@c This file is part of the GNU gettext manual. 2@c Copyright (C) 1995-2019 Free Software Foundation, Inc. 3@c See the file gettext.texi for copying conditions. 4 5@pindex envsubst 6@cindex @code{envsubst} program, usage 7@example 8envsubst [@var{option}] [@var{shell-format}] 9@end example 10 11@cindex shell format string 12@cindex dollar substitution 13@cindex environment variables 14The @code{envsubst} program substitutes the values of environment variables. 15 16@noindent @strong{Operation mode} 17 18@table @samp 19@item -v 20@itemx --variables 21@opindex -v@r{, @code{envsubst} option} 22@opindex --variables@r{, @code{envsubst} option} 23Output the variables occurring in @var{shell-format}. 24 25@end table 26 27@noindent @strong{Informative output} 28 29@table @samp 30@item -h 31@itemx --help 32@opindex -h@r{, @code{envsubst} option} 33@opindex --help@r{, @code{envsubst} option} 34Display this help and exit. 35 36@item -V 37@itemx --version 38@opindex -V@r{, @code{envsubst} option} 39@opindex --version@r{, @code{envsubst} option} 40Output version information and exit. 41 42@end table 43 44In normal operation mode, standard input is copied to standard output, 45with references to environment variables of the form @code{$VARIABLE} or 46@code{$@{VARIABLE@}} being replaced with the corresponding values. If a 47@var{shell-format} is given, only those environment variables that are 48referenced in @var{shell-format} are substituted; otherwise all environment 49variables references occurring in standard input are substituted. 50 51These substitutions are a subset of the substitutions that a shell performs 52on unquoted and double-quoted strings. Other kinds of substitutions done 53by a shell, such as @code{$@{@var{variable}-@var{default}@}} or 54@code{$(@var{command-list})} or @code{`@var{command-list}`}, are not performed 55by the @code{envsubst} program, due to security reasons. 56 57When @code{--variables} is used, standard input is ignored, and the output 58consists of the environment variables that are referenced in 59@var{shell-format}, one per line. 60