~win-cross-dev/win-cross/gettext

« back to all changes in this revision

Viewing changes to gettext-runtime/doc/rt-envsubst.texi

  • Committer: Nathan Osman
  • Date: 2012-08-11 05:06:52 UTC
  • Revision ID: admin@quickmediasolutions.com-20120811050652-ochkxjtonbw6kkve
Initial commit.

Show diffs side-by-side

added added

removed removed

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