commit bash-20140919 snapshot

This commit is contained in:
Chet Ramey
2014-10-02 10:22:00 -04:00
parent 96f3fb6664
commit fc5270550f
23 changed files with 13207 additions and 13005 deletions
+62 -62
View File
@@ -21,10 +21,10 @@ DDEESSCCRRIIPPTTIIOONN
1003.1). BBaasshh can be configured to be POSIX-conformant by default.
OOPPTTIIOONNSS
All of the single-character shell options documented in the descrip-
tion of the sseett builtin command can be used as options when the shell
is invoked. In addition, bbaasshh interprets the following options when it
is invoked:
All of the single-character shell options documented in the description
of the sseett builtin command can be used as options when the shell is
invoked. In addition, bbaasshh interprets the following options when it is
invoked:
--cc If the --cc option is present, then commands are read from the
first non-option argument _c_o_m_m_a_n_d___s_t_r_i_n_g. If there are argu-
@@ -108,7 +108,7 @@ OOPPTTIIOONNSS
The shell becomes restricted (see RREESSTTRRIICCTTEEDD SSHHEELLLL below).
----vveerrbboossee
Equivalent to --vv.
Equivalent to --vv.
----vveerrssiioonn
Show version information for this instance of bbaasshh on the stan-
@@ -455,21 +455,21 @@ SSHHEELLLL GGRRAAMMMMAARR
each _p_a_t_t_e_r_n in turn, using the same matching rules as for path-
name expansion (see PPaatthhnnaammee EExxppaannssiioonn below). The _w_o_r_d is
expanded using tilde expansion, parameter and variable expan-
sion, arithmetic substitution, command substitution, process
substitution and quote removal. Each _p_a_t_t_e_r_n examined is
expanded using tilde expansion, parameter and variable expan-
sion, arithmetic substitution, command substitution, and process
substitution. If the shell option nnooccaasseemmaattcchh is enabled, the
match is performed without regard to the case of alphabetic
characters. When a match is found, the corresponding _l_i_s_t is
executed. If the ;;;; operator is used, no subsequent matches are
attempted after the first pattern match. Using ;;&& in place of
;;;; causes execution to continue with the _l_i_s_t associated with
the next set of patterns. Using ;;;;&& in place of ;;;; causes the
shell to test the next pattern list in the statement, if any,
and execute any associated _l_i_s_t on a successful match. The exit
status is zero if no pattern matches. Otherwise, it is the exit
status of the last command executed in _l_i_s_t.
sion, arithmetic expansion, command substitution, process sub-
stitution and quote removal. Each _p_a_t_t_e_r_n examined is expanded
using tilde expansion, parameter and variable expansion, arith-
metic expansion, command substitution, and process substitution.
If the shell option nnooccaasseemmaattcchh is enabled, the match is per-
formed without regard to the case of alphabetic characters.
When a match is found, the corresponding _l_i_s_t is executed. If
the ;;;; operator is used, no subsequent matches are attempted
after the first pattern match. Using ;;&& in place of ;;;; causes
execution to continue with the _l_i_s_t associated with the next set
of patterns. Using ;;;;&& in place of ;;;; causes the shell to test
the next pattern list in the statement, if any, and execute any
associated _l_i_s_t on a successful match. The exit status is zero
if no pattern matches. Otherwise, it is the exit status of the
last command executed in _l_i_s_t.
iiff _l_i_s_t; tthheenn _l_i_s_t; [ eelliiff _l_i_s_t; tthheenn _l_i_s_t; ] ... [ eellssee _l_i_s_t; ] ffii
The iiff _l_i_s_t is executed. If its exit status is zero, the tthheenn
@@ -680,26 +680,26 @@ PPAARRAAMMEETTEERRSS
and llooccaall below) to create a _n_a_m_e_r_e_f, or a reference to another vari-
able. This allows variables to be manipulated indirectly. Whenever
the nameref variable is referenced, assigned to, unset, or has its
attributes modified (other than the _n_a_m_e_r_e_f_P _a_t_t_r_i_b_u_t_e _i_t_s_e_l_f_)_, _t_h_e
_o_p_e_r_a_t_i_o_n _i_s _a_c_t_u_a_l_l_y _p_e_r_f_o_r_m_e_d _o_n _t_h_e _v_a_r_i_a_b_l_e _s_p_e_c_i_f_i_e_d _b_y _t_h_e
_n_a_m_e_r_e_f _v_a_r_i_a_b_l_e_'_s _v_a_l_u_e_. _A _n_a_m_e_r_e_f _i_s _c_o_m_m_o_n_l_y _u_s_e_d _w_i_t_h_i_n _s_h_e_l_l
_f_u_n_c_t_i_o_n_s _t_o _r_e_f_e_r _t_o _a _v_a_r_i_a_b_l_e _w_h_o_s_e _n_a_m_e _i_s _p_a_s_s_e_d _a_s _a_n _a_r_g_u_m_e_n_t _t_o
_t_h_e _f_u_n_c_t_i_o_n_. _F_o_r _i_n_s_t_a_n_c_e_, _i_f _a _v_a_r_i_a_b_l_e _n_a_m_e _i_s _p_a_s_s_e_d _t_o _a _s_h_e_l_l
_f_u_n_c_t_i_o_n _a_s _i_t_s _f_i_r_s_t _a_r_g_u_m_e_n_t_, _r_u_n_n_i_n_g
_d_e_c_l_a_r_e _-_n _r_e_f_=_$_1
_i_n_s_i_d_e _t_h_e _f_u_n_c_t_i_o_n _c_r_e_a_t_e_s _a _n_a_m_e_r_e_f _v_a_r_i_a_b_l_e rreeff _w_h_o_s_e _v_a_l_u_e _i_s _t_h_e
_v_a_r_i_a_b_l_e _n_a_m_e _p_a_s_s_e_d _a_s _t_h_e _f_i_r_s_t _a_r_g_u_m_e_n_t_. _R_e_f_e_r_e_n_c_e_s _a_n_d _a_s_s_i_g_n_m_e_n_t_s
_t_o rreeff_, _a_n_d _c_h_a_n_g_e_s _t_o _i_t_s _a_t_t_r_i_b_u_t_e_s_, _a_r_e _t_r_e_a_t_e_d _a_s _r_e_f_e_r_e_n_c_e_s_,
_a_s_s_i_g_n_m_e_n_t_s_, _a_n_d _a_t_t_r_i_b_u_t_e _m_o_d_i_f_i_c_a_t_i_o_n_s _t_o _t_h_e _v_a_r_i_a_b_l_e _w_h_o_s_e _n_a_m_e _w_a_s
_p_a_s_s_e_d _a_s $$11_. _I_f _t_h_e _c_o_n_t_r_o_l _v_a_r_i_a_b_l_e _i_n _a ffoorr _l_o_o_p _h_a_s _t_h_e _n_a_m_e_r_e_f
_a_t_t_r_i_b_u_t_e_, _t_h_e _l_i_s_t _o_f _w_o_r_d_s _c_a_n _b_e _a _l_i_s_t _o_f _s_h_e_l_l _v_a_r_i_a_b_l_e_s_, _a_n_d _a
_n_a_m_e _r_e_f_e_r_e_n_c_e _w_i_l_l _b_e _e_s_t_a_b_l_i_s_h_e_d _f_o_r _e_a_c_h _w_o_r_d _i_n _t_h_e _l_i_s_t_, _i_n _t_u_r_n_,
_w_h_e_n _t_h_e _l_o_o_p _i_s _e_x_e_c_u_t_e_d_. _A_r_r_a_y _v_a_r_i_a_b_l_e_s _c_a_n_n_o_t _b_e _g_i_v_e_n _t_h_e 00mmeerreeff
_a_t_t_r_i_b_u_t_e_. _H_o_w_e_v_e_r_, _n_a_m_e_r_e_f _v_a_r_i_a_b_l_e_s _c_a_n _r_e_f_e_r_e_n_c_e _a_r_r_a_y _v_a_r_i_a_b_l_e_s
_a_n_d _s_u_b_s_c_r_i_p_t_e_d _a_r_r_a_y _v_a_r_i_a_b_l_e_s_. _N_a_m_e_r_e_f_s _c_a_n _b_e _u_n_s_e_t _u_s_i_n_g _t_h_e --nn
_o_p_t_i_o_n _t_o _t_h_e uunnsseett _b_u_i_l_t_i_n_. _O_t_h_e_r_w_i_s_e_, _i_f uunnsseett _i_s _e_x_e_c_u_t_e_d _w_i_t_h _t_h_e
_n_a_m_e _o_f _a _n_a_m_e_r_e_f _v_a_r_i_a_b_l_e _a_s _a_n _a_r_g_u_m_e_n_t_, _t_h_e _v_a_r_i_a_b_l_e _r_e_f_e_r_e_n_c_e_d _b_y
_t_h_e _n_a_m_e_r_e_f _v_a_r_i_a_b_l_e _w_i_l_l _b_e _u_n_s_e_t_.
attributes modified (other than the _n_a_m_e_r_e_f attribute itself), the
operation is actually performed on the variable specified by the
nameref variable's value. A nameref is commonly used within shell
functions to refer to a variable whose name is passed as an argument to
the function. For instance, if a variable name is passed to a shell
function as its first argument, running
declare -n ref=$1
inside the function creates a nameref variable rreeff whose value is the
variable name passed as the first argument. References and assignments
to rreeff, and changes to its attributes, are treated as references,
assignments, and attribute modifications to the variable whose name was
passed as $$11. If the control variable in a ffoorr loop has the nameref
attribute, the list of words can be a list of shell variables, and a
name reference will be established for each word in the list, in turn,
when the loop is executed. Array variables cannot be given the 00mmeerreeff
attribute. However, nameref variables can reference array variables
and subscripted array variables. Namerefs can be unset using the --nn
option to the uunnsseett builtin. Otherwise, if uunnsseett is executed with the
name of a nameref variable as an argument, the variable referenced by
the nameref variable will be unset.
PPoossiittiioonnaall PPaarraammeetteerrss
A _p_o_s_i_t_i_o_n_a_l _p_a_r_a_m_e_t_e_r is a parameter denoted by one or more digits,
@@ -1320,9 +1320,9 @@ PPAARRAAMMEETTEERRSS
explicitly declare an array. There is no maximum limit on the size of
an array, nor any requirement that members be indexed or assigned con-
tiguously. Indexed arrays are referenced using integers (including
arithmetic expressions) and are zero-based; associative arrays are
referenced using arbitrary strings. Unless otherwise noted, indexed
array indices must be non-negative integers.
arithmetic expressions) and are zero-based; associative arrays are ref-
erenced using arbitrary strings. Unless otherwise noted, indexed array
indices must be non-negative integers.
An indexed array is created automatically if any variable is assigned
to using the syntax _n_a_m_e[_s_u_b_s_c_r_i_p_t]=_v_a_l_u_e. The _s_u_b_s_c_r_i_p_t is treated as
@@ -2181,7 +2181,7 @@ FFUUNNCCTTIIOONNSS
tion while the function is executing.
All other aspects of the shell execution environment are identical
between a function and its caller with these exceptions: the DDEEBBUUGG and
between a function and its caller with these exceptions: the DDEEBBUUGG and
RREETTUURRNN traps (see the description of the ttrraapp builtin under SSHHEELLLL
BBUUIILLTTIINN CCOOMMMMAANNDDSS below) are not inherited unless the function has been
given the ttrraaccee attribute (see the description of the ddeeccllaarree builtin
@@ -2576,7 +2576,7 @@ EEXXIITT SSTTAATTUUSS
_w_a_i_t_p_i_d system call or equivalent function. Exit statuses fall between
0 and 255, though, as explained below, the shell may use values above
125 specially. Exit statuses from shell builtins and compound commands
are also limited to this range. Under certain circumstances, the shell
are also limited to this range. Under certain circumstances, the shell
will use special values to indicate specific failure modes.
For the shell's purposes, a command which exits with a zero exit status
@@ -2833,7 +2833,7 @@ RREEAADDLLIINNEE
RReeaaddlliinnee KKeeyy BBiinnddiinnggss
The syntax for controlling key bindings in the _i_n_p_u_t_r_c file is simple.
All that is required is the name of the command or the text of a macro
and a key sequence to which it should be bound. The name may be speci-
and a key sequence to which it should be bound. The name may be speci-
fied in one of two ways: as a symbolic key name, possibly with _M_e_t_a_- or
_C_o_n_t_r_o_l_- prefixes, or as a key sequence.
@@ -3545,7 +3545,7 @@ RREEAADDLLIINNEE
Without a numeric argument, the value of the readline ccoomm--
mmeenntt--bbeeggiinn variable is inserted at the beginning of the current
line. If a numeric argument is supplied, this command acts as a
toggle: if the characters at the beginning of the line do not
toggle: if the characters at the beginning of the line do not
match the value of ccoommmmeenntt--bbeeggiinn, the value is inserted, other-
wise the characters in ccoommmmeenntt--bbeeggiinn are deleted from the begin-
ning of the line. In either case, the line is accepted as if a
@@ -3927,7 +3927,7 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
AAlliiaass with no arguments or with the --pp option prints the list of
aliases in the form aalliiaass _n_a_m_e=_v_a_l_u_e on standard output. When
arguments are supplied, an alias is defined for each _n_a_m_e whose
_v_a_l_u_e is given. A trailing space in _v_a_l_u_e causes the next word
_v_a_l_u_e is given. A trailing space in _v_a_l_u_e causes the next word
to be checked for alias substitution when the alias is expanded.
For each _n_a_m_e in the argument list for which no _v_a_l_u_e is sup-
plied, the name and value of the alias is printed. AAlliiaass
@@ -4033,7 +4033,7 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
directory names in CCDDPPAATTHH are separated by a colon (:). A null
directory name in CCDDPPAATTHH is the same as the current directory,
i.e., ``..''. If _d_i_r begins with a slash (/), then CCDDPPAATTHH is not
used. The --PP option causes ccdd to use the physical directory
used. The --PP option causes ccdd to use the physical directory
structure by resolving symbolic links while traversing _d_i_r and
before processing instances of _._. in _d_i_r (see also the --PP option
to the sseett builtin command); the --LL option forces symbolic links
@@ -4934,18 +4934,18 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
is effective only when job control is enabled.
--ee Exit immediately if a _p_i_p_e_l_i_n_e (which may consist of a
single _s_i_m_p_l_e _c_o_m_m_a_n_d), a _l_i_s_t, or a _c_o_m_p_o_u_n_d _c_o_m_m_a_n_d
(see SSHHEELLLL GGRRAAMMMMAARR above), exits with a non-zero sta-
tus. The shell does not exit if the command that fails
is part of the command list immediately following a
wwhhiillee or uunnttiill keyword, part of the test following the
iiff or eelliiff reserved words, part of any command executed
in a &&&& or |||| list except the command following the
final &&&& or ||||, any command in a pipeline but the last,
or if the command's return value is being inverted with
!!. If a compound command other than a subshell returns
a non-zero status because a command failed while --ee was
being ignored, the shell does not exit. A trap on EERRRR,
if set, is executed before the shell exits. This option
(see SSHHEELLLL GGRRAAMMMMAARR above), exits with a non-zero status.
The shell does not exit if the command that fails is
part of the command list immediately following a wwhhiillee
or uunnttiill keyword, part of the test following the iiff or
eelliiff reserved words, part of any command executed in a
&&&& or |||| list except the command following the final &&&&
or ||||, any command in a pipeline but the last, or if the
command's return value is being inverted with !!. If a
compound command other than a subshell returns a non-
zero status because a command failed while --ee was being
ignored, the shell does not exit. A trap on EERRRR, if
set, is executed before the shell exits. This option
applies to the shell environment and each subshell envi-
ronment separately (see CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT
above), and may cause subshells to exit before executing
@@ -5256,7 +5256,7 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
simulates a call to rreettuurrnn.
44.. BBAASSHH__AARRGGCC and BBAASSHH__AARRGGVV are updated as described
in their descriptions above.
55.. Function tracing is enabled: command substitu-
55.. Function tracing is enabled: command substitu-
tion, shell functions, and subshells invoked with
(( _c_o_m_m_a_n_d )) inherit the DDEEBBUUGG and RREETTUURRNN traps.
66.. Error tracing is enabled: command substitution,
+131 -133
View File
@@ -67,7 +67,7 @@ Shell and Utilities portion of the IEEE POSIX specification
.B Bash
can be configured to be POSIX-conformant by default.
.SH OPTIONS
All of the single-character shell options documented in the
All of the single-character shell options documented in the
description of the \fBset\fR builtin command can be used as options
when the shell is invoked.
In addition, \fBbash\fR
@@ -239,7 +239,7 @@ The shell becomes restricted (see
below).
.TP
.B \-\-verbose
Equivalent to \fB\-v\fP.
Equivalent to \fB\-v\fP.
.TP
.B \-\-version
Show version information for this instance of
@@ -255,7 +255,7 @@ option has been supplied, the first argument is assumed to
be the name of a file containing shell commands.
If
.B bash
is invoked in this fashion,
is invoked in this fashion,
.B $0
is set to the name of the file, and the positional parameters
are set to the remaining arguments.
@@ -272,7 +272,7 @@ for the script.
.SH INVOCATION
A \fIlogin shell\fP is one whose first character of argument zero is a
.BR \- ,
or one started with the
or one started with the
.B \-\-login
option.
.PP
@@ -454,7 +454,7 @@ The following definitions are used throughout the rest of this
document.
.PD 0
.TP
.B blank
.B blank
A space or tab.
.TP
.B word
@@ -463,7 +463,7 @@ Also known as a
.BR token .
.TP
.B name
A
A
.I word
consisting only of alphanumeric characters and underscores, and
beginning with an alphabetic character or an underscore. Also
@@ -495,8 +495,8 @@ The following words are recognized as reserved when unquoted and either
the first word of a simple command (see
.SM
.B SHELL GRAMMAR
below) or the third word of a
.B case
below) or the third word of a
.B case
or
.B for
command:
@@ -729,7 +729,7 @@ to be matched as a string.
An additional binary operator, \fB=~\fP, is available, with the same
precedence as \fB==\fP and \fB!=\fP.
When it is used, the string to the right of the operator is considered
an extended regular expression and matched accordingly (as in \fIregex\fP(3)).
an extended regular expression and matched accordingly (as in \fIregex\fP(3)).
The return value is 0 if the string matches
the pattern, and 1 otherwise.
If the regular expression is syntactically incorrect, the conditional
@@ -889,7 +889,7 @@ last command executed in \fIlist\fP.
[ \fBelif\fP \fIlist\fP; \fBthen\fP \fIlist\fP; ] ... \
[ \fBelse\fP \fIlist\fP; ] \fBfi\fP
The
.B if
.B if
.I list
is executed. If its exit status is zero, the
\fBthen\fP \fIlist\fP is executed. Otherwise, each \fBelif\fP
@@ -977,7 +977,7 @@ This defines a function named \fIname\fP.
The reserved word \fBfunction\fP is optional.
If the \fBfunction\fP reserved word is supplied, the parentheses are optional.
The \fIbody\fP of the function is the compound command
.I compound\-command
.I compound\-command
(see \fBCompound Commands\fP above).
That command is usually a \fIlist\fP of commands between { and }, but
may be any command listed under \fBCompound Commands\fP above,
@@ -1017,7 +1017,7 @@ option enabled does not allow comments. The
option is on by default in interactive shells.
.SH QUOTING
\fIQuoting\fP is used to remove the special meaning of certain
characters or words to the shell. Quoting can be used to
characters or words to the shell. Quoting can be used to
disable special treatment for special characters, to prevent
reserved words from being recognized as such, and to prevent
parameter expansion.
@@ -1108,19 +1108,19 @@ backspace
.TP
.B \eE
an escape character
.TP
.TP
.B \ef
form feed
.TP
.TP
.B \en
new line
.TP
.TP
.B \er
carriage return
.TP
.B \et
horizontal tab
.TP
.TP
.B \ev
vertical tab
.TP
@@ -1132,7 +1132,7 @@ single quote
.TP
.B \e\(dq
double quote
.TP
.TP
.B \e\fInnn\fP
the eight-bit character whose value is the octal value \fInnn\fP
(one to three digits)
@@ -1321,8 +1321,7 @@ expands to a separate word.
In contexts where it is performed, those words
are subject to further word splitting and pathname expansion.
When the expansion occurs within double quotes, it expands to a single word
with the value of each parameter separated by the first character
of the
with the value of each parameter separated by the first character of the
.SM
.B IFS
special variable. That is, "\fB$*\fP" is equivalent
@@ -1349,7 +1348,7 @@ If the double-quoted expansion occurs within a word, the expansion of
the first parameter is joined with the beginning part of the original
word, and the expansion of the last parameter is joined with the last
part of the original word.
When there are no positional parameters, "\fB$@\fP" and
When there are no positional parameters, "\fB$@\fP" and
.B $@
expand to nothing (i.e., they are removed).
.TP
@@ -1700,7 +1699,7 @@ information.
.B GROUPS
An array variable containing the list of groups of which the current
user is a member.
Assignments to
Assignments to
.SM
.B GROUPS
have no effect and return an error status.
@@ -1838,7 +1837,7 @@ builtin command when no arguments are supplied.
.B SECONDS
Each time this parameter is
referenced, the number of seconds since shell invocation is returned. If a
value is assigned to
value is assigned to
.SM
.BR SECONDS ,
the value returned upon subsequent
@@ -2031,7 +2030,7 @@ If the list of values includes
lines which begin with a
.B space
character are not saved in the history list.
A value of
A value of
.I ignoredups
causes lines matching the previous history entry to not be saved.
A value of
@@ -2233,11 +2232,11 @@ If this variable is unset, or set to a value that is not a number
greater than or equal to zero, the shell disables mail checking.
.TP
.B MAILPATH
A colon-separated list of filenames to be checked for mail.
A colon-separated list of filenames to be checked for mail.
The message to be printed when mail arrives in a particular file
may be specified by separating the filename from the message with a `?'.
When used in the text of the message, \fB$_\fP expands to the name of
the current mailfile.
the current mailfile.
Example:
.RS
.PP
@@ -2470,7 +2469,7 @@ There is no maximum
limit on the size of an array, nor any requirement that members
be indexed or assigned contiguously.
Indexed arrays are referenced using integers (including arithmetic
expressions) and are zero-based; associative arrays are referenced
expressions) and are zero-based; associative arrays are referenced
using arbitrary strings.
Unless otherwise noted, indexed array indices must be non-negative integers.
.PP
@@ -2548,7 +2547,7 @@ referencing the array with a subscript of 0.
If the
.I subscript
used to reference an element of an indexed array
evaluates to a number less than zero, it is
evaluates to a number less than zero, it is
interpreted as relative to one greater than the maximum index of the array,
so negative indices count back from the end of the
array, and an index of \-1 references the last element.
@@ -2583,7 +2582,7 @@ builtins each accept a
option to specify an indexed array and a
.B \-A
option to specify an associative array.
If both options are supplied,
If both options are supplied,
.B \-A
takes precedence.
The
@@ -2718,7 +2717,7 @@ If strict compatibility with
is desired, start
.B bash
with the
.B +B
.B +B
option or disable brace expansion with the
.B +B
option to the
@@ -2924,7 +2923,7 @@ zero.
Substring expansion applied to an associative array produces undefined
results.
.sp 1
Substring indexing is zero-based unless the positional parameters
Substring indexing is zero-based unless the positional parameters
are used, in which case the indexing starts at 1 by default.
If \fIoffset\fP is 0, and the positional parameters are used, \fB$0\fP is
prefixed to the list.
@@ -2963,7 +2962,7 @@ If
.I parameter
is
.B *
or
or
.BR @ ,
the value substituted is the number of positional parameters.
If
@@ -2986,7 +2985,7 @@ ${\fIparameter\fP\fB#\fP\fIword\fP}
${\fIparameter\fP\fB##\fP\fIword\fP}
.PD
\fBRemove matching prefix pattern\fP.
The
The
.I word
is expanded to produce a pattern just as in pathname
expansion. If the pattern matches the beginning of
@@ -3196,7 +3195,7 @@ the file will provide input for \fIlist\fP. If the
argument should be read to obtain the output of \fIlist\fP.
.PP
When available, process substitution is performed
simultaneously with parameter and variable expansion,
simultaneously with parameter and variable expansion,
command substitution,
and arithmetic expansion.
.SS Word Splitting
@@ -3301,7 +3300,7 @@ If no matching filenames are found,
and the shell option
.B nullglob
is not enabled, the word is left unchanged.
If the
If the
.B nullglob
option is set, and no matches are found,
the word is removed.
@@ -3437,7 +3436,7 @@ shell variable to
or enable the
.B globasciiranges
shell option.
A
A
.B \-
may be matched by including it as the first or last character
in the set.
@@ -3468,7 +3467,7 @@ The \fBword\fP character class matches letters, digits, and the character _.
.if n .sp 1
Within
.B [
and
and
.BR ] ,
an \fIequivalence class\fP can be specified using the syntax
\fB[=\fP\fIc\fP\fB=]\fP, which matches all characters with the
@@ -3479,7 +3478,7 @@ the character \fIc\fP.
.if n .sp 1
Within
.B [
and
and
.BR ] ,
the syntax \fB[.\fP\fIsymbol\fP\fB.]\fP matches the collating symbol
\fIsymbol\fP.
@@ -3567,14 +3566,14 @@ If it expands to more than one word,
.B bash
reports an error.
.PP
Note that the order of redirections is significant. For example,
Note that the order of redirections is significant. For example,
the command
.RS
.PP
ls \fB>\fP dirlist 2\fB>&\fP1
.RE
.PP
directs both standard output and standard error to the file
directs both standard output and standard error to the file
.IR dirlist ,
while the command
.RS
@@ -4005,7 +4004,7 @@ is executing.
.PP
All other aspects of the shell execution
environment are identical between a function and its caller
with these exceptions: the
with these exceptions: the
.SM
.B DEBUG
and
@@ -4454,7 +4453,7 @@ If the program is a file beginning with
the remainder of the first line specifies an interpreter
for the program. The shell executes the
specified interpreter on operating systems that do not
handle this executable format themselves. The arguments to the
handle this executable format themselves. The arguments to the
interpreter consist of a single optional argument following the
interpreter name on the first line of the program, followed
by the name of the program, followed by the command
@@ -4513,7 +4512,7 @@ traps caught by the shell are reset to the values inherited from the
shell's parent, and traps ignored by the shell are ignored
.PP
A command invoked in this separate environment cannot affect the
shell's execution environment.
shell's execution environment.
.PP
Command substitution, commands grouped with parentheses,
and asynchronous commands are invoked in a
@@ -4536,7 +4535,7 @@ shell as modified by redirections.
When a program is invoked it is given an array of strings
called the
.IR environment .
This is a list of
This is a list of
\fIname\fP\-\fIvalue\fP pairs, of the form
.IR "name\fR=\fPvalue" .
.PP
@@ -4573,7 +4572,7 @@ parameter assignments, as described above in
These assignment statements affect only the environment seen
by that command.
.PP
If the
If the
.B \-k
option is set (see the
.B set
@@ -4594,11 +4593,11 @@ The exit status of an executed command is the value returned by the
\fIwaitpid\fP system call or equivalent function. Exit statuses
fall between 0 and 255, though, as explained below, the shell may
use values above 125 specially. Exit statuses from shell builtins and
compound commands are also limited to this range. Under certain
compound commands are also limited to this range. Under certain
circumstances, the shell will use special values to indicate specific
failure modes.
.PP
For the shell's purposes, a command which exits with a
For the shell's purposes, a command which exits with a
zero exit status has succeeded. An exit status of zero
indicates success. A non-zero exit status indicates failure.
When a command terminates on a fatal signal \fIN\fP, \fBbash\fP uses
@@ -4613,7 +4612,7 @@ the exit status is greater than zero.
.PP
Shell builtin commands return a status of 0 (\fItrue\fP) if
successful, and non-zero (\fIfalse\fP) if an error occurs
while they execute.
while they execute.
All builtins return an exit status of 2 to indicate incorrect usage,
generally invalid options or missing arguments.
.PP
@@ -4679,12 +4678,12 @@ to ensure that they receive the
.BR SIGHUP .
To prevent the shell from
sending the signal to a particular job, it should be removed from the
jobs table with the
jobs table with the
.B disown
builtin (see
.SM
.B "SHELL BUILTIN COMMANDS"
below) or marked
below) or marked
to not receive
.SM
.B SIGHUP
@@ -4696,14 +4695,14 @@ If the
shell option has been set with
.BR shopt ,
.B bash
sends a
sends a
.SM
.B SIGHUP
to all jobs when an interactive login shell exits.
.PP
If \fBbash\fP is waiting for a command to complete and receives a signal
for which a trap has been set, the trap will not be executed until
the command completes.
the command completes.
When \fBbash\fP is waiting for an asynchronous command via the \fBwait\fP
builtin, the reception of a signal for which a trap has been set will
cause the \fBwait\fP builtin to return immediately with an exit status
@@ -4757,7 +4756,7 @@ user so specifies with \f(CWstty tostop\fP, write to the
terminal.
Background processes which attempt to read from (write to when
\f(CWstty tostop\fP is in effect) the
terminal are sent a
terminal are sent a
.SM
.B SIGTTIN (SIGTTOU)
signal by the kernel's terminal driver,
@@ -4774,7 +4773,7 @@ Typing the
character (typically
.BR ^Z ,
Control-Z) while a process is running
causes that process to be stopped and returns control to
causes that process to be stopped and returns control to
.BR bash .
Typing the
.I "delayed suspend"
@@ -4824,7 +4823,7 @@ refer to the shell's notion of the
.IR "current job" ,
which is the last job stopped while it was in
the foreground or started in the background.
The
The
.I "previous job"
may be referenced using
.BR %\- .
@@ -4855,7 +4854,7 @@ Normally,
.B bash
waits until it is about to print a prompt before reporting
changes in a job's status so as to not interrupt
any other output. If the
any other output. If the
.B \-b
option to the
.B set
@@ -4876,12 +4875,12 @@ warning message, and, if the \fBcheckjobs\fP option is enabled, lists the
jobs and their statuses.
The
.B jobs
command may then be used to inspect their status.
command may then be used to inspect their status.
If a second attempt to exit is made without an intervening command,
the shell does not print another warning, and any stopped
jobs are terminated.
.SH PROMPTING
When executing interactively,
When executing interactively,
.B bash
displays the primary prompt
.SM
@@ -5045,10 +5044,10 @@ builtin.
.PP
In this section, the Emacs-style notation is used to denote
keystrokes. Control keys are denoted by C\-\fIkey\fR, e.g., C\-n
means Control\-N. Similarly,
means Control\-N. Similarly,
.I meta
keys are denoted by M\-\fIkey\fR, so M\-x means Meta\-X. (On keyboards
without a
without a
.I meta
key, M\-\fIx\fP means ESC \fIx\fP, i.e., press the Escape key
then the
@@ -5066,7 +5065,7 @@ which normally act as a repeat count.
Sometimes, however, it is the sign of the argument that is significant.
Passing a negative argument to a command that acts in the forward
direction (e.g., \fBkill\-line\fP) causes that command to act in a
backward direction.
backward direction.
Commands whose behavior with arguments deviates from this are noted
below.
.PP
@@ -5074,7 +5073,7 @@ When a command is described as \fIkilling\fP text, the text
deleted is saved for possible future retrieval
(\fIyanking\fP). The killed text is saved in a
\fIkill ring\fP. Consecutive kills cause the text to be
accumulated into one unit, which can be yanked all at once.
accumulated into one unit, which can be yanked all at once.
Commands which do not kill text separate the chunks of text
on the kill ring.
.SS "Readline Initialization"
@@ -5097,7 +5096,7 @@ Lines beginning with a \fB$\fP indicate conditional constructs.
Other lines denote key bindings and variable settings.
.PP
The default key-bindings may be changed with an
.I inputrc
.I inputrc
file.
Other programs that use this library may add their own commands
and bindings.
@@ -5111,7 +5110,7 @@ or
.RS
C\-Meta\-u: universal\-argument
.RE
into the
into the
.I inputrc
would make M\-C\-u execute the readline command
.IR universal\-argument .
@@ -5137,7 +5136,7 @@ The syntax for controlling key bindings in the
.I inputrc
file is simple. All that is required is the name of the
command or the text of a macro and a key sequence to which
it should be bound. The name may be specified in one of two ways:
it should be bound. The name may be specified in one of two ways:
as a symbolic key name, possibly with \fIMeta\-\fP or \fIControl\-\fP
prefixes, or as a key sequence.
.PP
@@ -5193,7 +5192,7 @@ is again bound to the function
.I "C\-x C\-r"
is bound to the function
.BR re\-read\-init\-file ,
and
and
.I "ESC [ 1 1 ~"
is bound to insert the text
.if t \f(CWFunction Key 1\fP.
@@ -5319,7 +5318,7 @@ equivalents.
.TP
.B colored\-stats (Off)
If set to \fBOn\fP, readline displays possible completions using different
colors to indicate their file type.
colors to indicate their file type.
The color definitions are taken from the value of the \fBLS_COLORS\fP
environment variable.
.TP
@@ -5463,7 +5462,7 @@ have a slash appended (subject to the value of
.TP
.B match\-hidden\-files (On)
This variable, when set to \fBOn\fP, causes readline to match files whose
names begin with a `.' (hidden files) when performing filename
names begin with a `.' (hidden files) when performing filename
completion.
If set to \fBOff\fP, the leading `.' must be
supplied by the user in the filename to be completed.
@@ -5485,9 +5484,9 @@ to display a screenful of possible completions at a time.
.B print\-completions\-horizontally (Off)
If set to \fBOn\fP, readline will display completions with matches
sorted horizontally in alphabetical order, rather than down the screen.
.TP
.TP
.B revert\-all\-at\-newline (Off)
If set to \fBOn\fP, readline will undo all changes to history lines
If set to \fBOn\fP, readline will undo all changes to history lines
before returning when \fBaccept\-line\fP is executed. By default,
history lines may be modified and retain individual undo lists across
calls to \fBreadline\fP.
@@ -5534,7 +5533,7 @@ compilation features of the C preprocessor which allows key
bindings and variable settings to be performed as the result
of tests. There are four parser directives used.
.IP \fB$if\fP
The
The
.B $if
construct allows bindings to be made based on the
editing mode, the terminal being used, or the application using
@@ -5865,7 +5864,7 @@ Negative arguments have no effect.
Drag the word before point past the word after point,
moving point over that word as well.
If point is at the end of the line, this transposes
the last two words on the line.
the last two words on the line.
.TP
.B upcase\-word (M\-u)
Uppercase the current (or following) word. With a negative argument,
@@ -5885,7 +5884,7 @@ switches to overwrite mode. With an explicit non-positive numeric
argument, switches to insert mode. This command affects only
\fBemacs\fP mode; \fBvi\fP mode does overwrite differently.
Each call to \fIreadline()\fP starts in insert mode.
In overwrite mode, characters bound to \fBself\-insert\fP replace
In overwrite mode, characters bound to \fBself\-insert\fP replace
the text at point rather than pushing the text to the right.
Characters bound to \fBbackward\-delete\-char\fP replace the character
before point with a space. By default, this command is unbound.
@@ -5908,7 +5907,7 @@ The killed text is saved on the kill-ring.
.B kill\-whole\-line
Kill all characters on the current line, no matter where point is.
.TP
.B kill\-word (M\-d)
.B kill\-word (M\-d)
Kill from point to the end of the current word, or if between
words, to the end of the next word.
Word boundaries are the same as those used by \fBforward\-word\fP.
@@ -6172,10 +6171,10 @@ but usually bound to ESC\-[.
Without a numeric argument, the value of the readline
.B comment\-begin
variable is inserted at the beginning of the current line.
If a numeric argument is supplied, this command acts as a toggle: if
If a numeric argument is supplied, this command acts as a toggle: if
the characters at the beginning of the line do not match the value
of \fBcomment\-begin\fP, the value is inserted, otherwise
the characters in \fBcomment\-begin\fP are deleted from the beginning of
the characters in \fBcomment\-begin\fP are deleted from the beginning of
the line.
In either case, the line is accepted as if a newline had been typed.
The default value of
@@ -6286,7 +6285,7 @@ Shell quoting is honored.
Each word is then expanded using
brace expansion, tilde expansion, parameter and variable expansion,
command substitution, and arithmetic expansion,
as described above under
as described above under
.SM
.BR EXPANSION .
The results are split using the rules described above under
@@ -6308,7 +6307,7 @@ and
.B COMP_TYPE
variables are assigned values as described above under
\fBShell Variables\fP.
If a shell function is being invoked, the
If a shell function is being invoked, the
.SM
.B COMP_WORDS
and
@@ -6376,7 +6375,7 @@ generate no matches.
.PP
When a compspec indicates that directory name completion is desired,
the programmable completion functions force readline to append a slash
to completed names which are symbolic links to directories, subject to
to completed names which are symbolic links to directories, subject to
the value of the \fBmark\-directories\fP readline variable, regardless
of the setting of the \fBmark-symlinked\-directories\fP readline variable.
.PP
@@ -6680,7 +6679,7 @@ The entire command line typed so far.
.SS Word Designators
.PP
Word designators are used to select desired words from the event.
A
A
.B :
separates the event specification from the word designator.
It may be omitted if the word designator begins with a
@@ -6884,7 +6883,7 @@ option prints the list of aliases in the form
\fBalias\fP \fIname\fP=\fIvalue\fP on standard output.
When arguments are supplied, an alias is defined for
each \fIname\fP whose \fIvalue\fP is given.
A trailing space in \fIvalue\fP causes the next word to be
A trailing space in \fIvalue\fP causes the next word to be
checked for alias substitution when the alias is expanded.
For each \fIname\fP in the argument list for which no \fIvalue\fP
is supplied, the name and value of the alias is printed.
@@ -7041,7 +7040,7 @@ Returns the context of any active subroutine call (a shell function or
a script executed with the \fB.\fP or \fBsource\fP builtins).
Without \fIexpr\fP, \fBcaller\fP displays the line number and source
filename of the current subroutine call.
If a non-negative integer is supplied as \fIexpr\fP, \fBcaller\fP
If a non-negative integer is supplied as \fIexpr\fP, \fBcaller\fP
displays the line number, subroutine name, and source file corresponding
to that position in the current execution call stack. This extra
information may be used, for example, to print a stack trace. The
@@ -7078,7 +7077,7 @@ begins with a slash (/),
then
.SM
.B CDPATH
is not used. The
is not used. The
.B \-P
option causes \fBcd\fP to use the physical directory structure
by resolving symbolic links while traversing \fIdir\fP and
@@ -7123,8 +7122,8 @@ Run
.I command
with
.I args
suppressing the normal shell function lookup. Only builtin
commands or commands found in the
suppressing the normal shell function lookup.
Only builtin commands or commands found in the
.SM
.B PATH
are executed. If the
@@ -7247,7 +7246,7 @@ Tell readline not to append a space (the default) to words completed at
the end of the line.
.TP 8
.B plusdirs
After any matches defined by the compspec are generated,
After any matches defined by the compspec are generated,
directory name completion is attempted and any
matches are added to the results of the other actions.
.RE
@@ -7559,7 +7558,7 @@ or an attempt is made to display a non-existent function with \fB\-f\fP.
Without options, displays the list of currently remembered directories.
The default display is on a single line with directory names separated
by spaces.
Directories are added to the list with the
Directories are added to the list with the
.B pushd
command; the
.B popd
@@ -7758,7 +7757,7 @@ become the arguments to \fIcommand\fP.
If the
.B \-l
option is supplied,
the shell places a dash at the beginning of the zeroth argument passed to
the shell places a dash at the beginning of the zeroth argument passed to
.IR command .
This is what
.IR login (1)
@@ -7804,10 +7803,9 @@ is executed before the shell terminates.
The supplied
.I names
are marked for automatic export to the environment of
subsequently executed commands. If the
subsequently executed commands. If the
.B \-f
option is given,
the
option is given, the
.I names
refer to functions.
If no
@@ -7847,7 +7845,7 @@ and
may be specified as a string (to locate the last command beginning
with that string) or as a number (an index into the history list,
where a negative number is used as an offset from the current
command number). If
command number). If
.I last
is not specified it is set to
the current command for listing (so that
@@ -8004,7 +8002,7 @@ If the variable
.SM
.B OPTERR
is set to 0, no error messages will be displayed, even if the first
character of
character of
.I optstring
is not a colon.
.sp 1
@@ -8048,7 +8046,7 @@ error occurs.
.TP
\fBhash\fP [\fB\-lr\fP] [\fB\-p\fP \fIfilename\fP] [\fB\-dt\fP] [\fIname\fP]
Each time \fBhash\fP is invoked,
the full pathname of the command
the full pathname of the command
.I name
is determined by searching
the directories in
@@ -8121,7 +8119,7 @@ The return status is 0 unless no command matches
.PD
With no options, display the command
history list with line numbers. Lines listed
with a
with a
.B *
have been modified. An argument of
.I n
@@ -8311,7 +8309,7 @@ returns 1; 0 is returned otherwise.
.TP
\fBlocal\fP [\fIoption\fP] [\fIname\fP[=\fIvalue\fP] ...]
For each argument, a local variable named
.I name
.I name
is created, and assigned
.IR value .
The \fIoption\fP can be any of the options accepted by \fBdeclare\fP.
@@ -8342,9 +8340,9 @@ Exit a login shell.
.PD
Read lines from the standard input into the indexed array variable
.IR array ,
or from file descriptor
or from file descriptor
.IR fd
if the
if the
.B \-u
option is supplied.
The variable
@@ -8393,13 +8391,13 @@ Specify the number of lines read between each call to
.PP
If
.B \-C
is specified without
is specified without
.BR \-c ,
the default quantum is 5000.
When \fIcallback\fP is evaluated, it is supplied the index of the next
array element to be assigned and the line to be assigned to that element
as additional arguments.
\fIcallback\fP is evaluated after the line is read but before the
\fIcallback\fP is evaluated after the line is read but before the
array element is assigned.
.PP
If not supplied with an explicit origin, \fBmapfile\fP will clear \fIarray\fP
@@ -8450,7 +8448,7 @@ the next to last.
.PP
If the
.B popd
command is successful, a
command is successful, a
.B dirs
is performed as well, and the return status is 0.
.B popd
@@ -8549,7 +8547,7 @@ to the \fBcd\fP builtin.
.PP
If the
.B pushd
command is successful, a
command is successful, a
.B dirs
is performed as well.
If the first form is used,
@@ -8568,7 +8566,7 @@ fails.
Print the absolute pathname of the current working directory.
The pathname printed contains no symbolic links if the
.B \-P
option is supplied or the
option is supplied or the
.B \-o physical
option to the
.B set
@@ -8592,7 +8590,7 @@ to the last
.IR name .
If there are fewer words read from the input stream than names,
the remaining names are assigned empty values.
The characters in
The characters in
.SM
.B IFS
are used to split the line into words using the same rules the shell
@@ -8737,7 +8735,7 @@ that is not a function.
Causes a function to stop executing and return the value specified by
.I n
to its caller.
If
If
.I n
is omitted, the return status is that of the last command
executed in the function body.
@@ -8749,7 +8747,7 @@ handler before \fBreturn\fP was invoked.
If
.B return
is used outside a function,
but during execution of a script by the
but during execution of a script by the
.B .
(\fBsource\fP) command, it causes the shell to stop executing
that script and return either
@@ -8779,7 +8777,7 @@ In \fIposix\fP mode, only shell variables are listed.
The output is sorted according to the current locale.
When options are specified, they set or unset shell attributes.
Any arguments remaining after option processing are treated
as values for the positional parameters and are assigned, in order, to
as values for the positional parameters and are assigned, in order, to
.BR $1 ,
.BR $2 ,
.B ...
@@ -8805,13 +8803,13 @@ or a \fIcompound command\fP
(see
.SM
.B SHELL GRAMMAR
above), exits with a non-zero status.
above), exits with a non-zero status.
The shell does not exit if the
command that fails is part of the command list immediately following a
.B while
or
.B until
keyword,
keyword,
part of the test following the
.B if
or
@@ -8849,7 +8847,7 @@ call completes.
.TP 8
.B \-f
Disable pathname expansion.
.TP 8
.TP 8
.B \-h
Remember the location of commands as they are looked up for execution.
This is enabled by default.
@@ -8871,9 +8869,9 @@ When a background job completes, the shell prints a line
containing its exit status.
.TP 8
.B \-n
Read commands but do not execute them. This may be used to
check a shell script for syntax errors. This is ignored by
interactive shells.
Read commands but do not execute them.
This may be used to check a shell script for syntax errors.
This is ignored by interactive shells.
.TP 8
.B \-o \fIoption\-name\fP
The \fIoption\-name\fP can be one of the following:
@@ -9079,7 +9077,7 @@ does not overwrite an existing file with the
.BR >& ,
and
.B <>
redirection operators. This may be overridden when
redirection operators. This may be overridden when
creating output files by using the redirection operator
.B >|
instead of
@@ -9151,7 +9149,7 @@ If
.I n
is 0, no parameters are changed.
If
.I n
.I n
is not given, it is assumed to be 1.
If
.I n
@@ -9355,7 +9353,7 @@ attempts spelling correction on directory names during word completion
if the directory name initially supplied does not exist.
.TP 8
.B dotglob
If set,
If set,
.B bash
includes filenames beginning with a `.' in the results of pathname
expansion.
@@ -9402,12 +9400,12 @@ and
are updated as described in their descriptions above.
.TP
.B 5.
Function tracing is enabled: command substitution, shell functions, and
Function tracing is enabled: command substitution, shell functions, and
subshells invoked with \fB(\fP \fIcommand\fP \fB)\fP inherit the
\fBDEBUG\fP and \fBRETURN\fP traps.
.TP
.B 6.
Error tracing is enabled: command substitution, shell functions, and
Error tracing is enabled: command substitution, shell functions, and
subshells invoked with \fB(\fP \fIcommand\fP \fB)\fP inherit the
\fBERR\fP trap.
.RE
@@ -9478,7 +9476,7 @@ is being used, a user is given the opportunity to re-edit a
failed history substitution.
.TP 8
.B histverify
If set, and
If set, and
.B readline
is being used, the results of history substitution are not immediately
passed to the shell parser. Instead, the resulting line is loaded into
@@ -9529,7 +9527,7 @@ above).
The value may not be changed.
.TP 8
.B mailwarn
If set, and a file that \fBbash\fP is checking for mail has been
If set, and a file that \fBbash\fP is checking for mail has been
accessed since the last time it was checked, the message ``The mail in
\fImailfile\fP has been read'' is displayed.
.TP 8
@@ -9698,7 +9696,7 @@ under
the result of the expression is the result of the binary test using
the first and third arguments as operands.
The \fB\-a\fP and \fB\-o\fP operators are considered binary operators
when there are three arguments.
when there are three arguments.
If the first argument is \fB!\fP, the value is the negation of
the two-argument test using the second and third arguments.
If the first argument is exactly \fB(\fP and the third argument is
@@ -9709,7 +9707,7 @@ Otherwise, the expression is false.
4 arguments
If the first argument is \fB!\fP, the result is the negation of
the three-argument expression composed of the remaining arguments.
Otherwise, the expression is parsed and evaluated according to
Otherwise, the expression is parsed and evaluated according to
precedence using the rules listed above.
.TP
5 or more arguments
@@ -9740,7 +9738,7 @@ is absent (and there is a single \fIsigspec\fP) or
each specified signal is
reset to its original disposition (the value it had
upon entrance to the shell).
If
If
.I arg
is the null string the signal specified by each
.I sigspec
@@ -9812,9 +9810,9 @@ is
.BR ERR ,
the command
.I arg
is executed whenever a
is executed whenever a
a pipeline (which may consist of a single simple
command), a list, or a compound command returns a
command), a list, or a compound command returns a
non\-zero exit status,
subject to the following conditions.
The
@@ -9825,7 +9823,7 @@ command is part of the command list immediately following a
.B while
or
.B until
keyword,
keyword,
part of the test in an
.I if
statement, part of a command executed in a
@@ -9850,7 +9848,7 @@ is invalid; otherwise
returns true.
.TP
\fBtype\fP [\fB\-aftpP\fP] \fIname\fP [\fIname\fP ...]
With no options,
With no options,
indicate how each
.I name
would be interpreted if used as a command name.
@@ -9864,7 +9862,7 @@ prints a string which is one of
.IR function ,
.IR builtin ,
or
.I file
.I file
if
.I name
is an alias, shell reserved word, function, builtin, or disk file,
@@ -9901,18 +9899,18 @@ If a command is hashed,
and
.B \-P
print the hashed value, which is not necessarily the file that appears
first in
first in
.SM
.BR PATH .
If the
.B \-a
option is used,
option is used,
.B type
prints all of the places that contain
an executable named
an executable named
.IR name .
This includes aliases and functions,
if and only if the
if and only if the
.B \-p
option is not also used.
The table of hashed commands is not consulted
@@ -10038,7 +10036,7 @@ or an error occurs while setting a new limit.
.RE
.TP
\fBumask\fP [\fB\-p\fP] [\fB\-S\fP] [\fImode\fP]
The user file-creation mask is set to
The user file-creation mask is set to
.IR mode .
If
.I mode
@@ -10325,7 +10323,7 @@ this manual page should be directed to
.PP
It's too big and too slow.
.PP
There are some subtle differences between
There are some subtle differences between
.B bash
and traditional versions of
.BR sh ,
+175 -153
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+6543 -6516
View File
File diff suppressed because it is too large Load Diff
+14 -14
View File
@@ -78,9 +78,9 @@
@xrdef{Shell Parameters-pg}{18}
@xrdef{Positional Parameters-title}{Positional Parameters}
@xrdef{Positional Parameters-snt}{Section@tie 3.4.1}
@xrdef{Positional Parameters-pg}{19}
@xrdef{Special Parameters-title}{Special Parameters}
@xrdef{Special Parameters-snt}{Section@tie 3.4.2}
@xrdef{Positional Parameters-pg}{20}
@xrdef{Special Parameters-pg}{20}
@xrdef{Shell Expansions-title}{Shell Expansions}
@xrdef{Shell Expansions-snt}{Section@tie 3.5}
@@ -96,9 +96,9 @@
@xrdef{Shell Parameter Expansion-pg}{23}
@xrdef{Command Substitution-title}{Command Substitution}
@xrdef{Command Substitution-snt}{Section@tie 3.5.4}
@xrdef{Command Substitution-pg}{28}
@xrdef{Arithmetic Expansion-title}{Arithmetic Expansion}
@xrdef{Arithmetic Expansion-snt}{Section@tie 3.5.5}
@xrdef{Command Substitution-pg}{28}
@xrdef{Process Substitution-title}{Process Substitution}
@xrdef{Process Substitution-snt}{Section@tie 3.5.6}
@xrdef{Word Splitting-title}{Word Splitting}
@@ -116,8 +116,8 @@
@xrdef{Quote Removal-snt}{Section@tie 3.5.9}
@xrdef{Redirections-title}{Redirections}
@xrdef{Redirections-snt}{Section@tie 3.6}
@xrdef{Quote Removal-pg}{31}
@xrdef{Redirections-pg}{31}
@xrdef{Quote Removal-pg}{32}
@xrdef{Redirections-pg}{32}
@xrdef{Executing Commands-title}{Executing Commands}
@xrdef{Executing Commands-snt}{Section@tie 3.7}
@xrdef{Simple Command Expansion-title}{Simple Command Expansion}
@@ -126,21 +126,21 @@
@xrdef{Simple Command Expansion-pg}{35}
@xrdef{Command Search and Execution-title}{Command Search and Execution}
@xrdef{Command Search and Execution-snt}{Section@tie 3.7.2}
@xrdef{Command Search and Execution-pg}{36}
@xrdef{Command Execution Environment-title}{Command Execution Environment}
@xrdef{Command Execution Environment-snt}{Section@tie 3.7.3}
@xrdef{Command Search and Execution-pg}{36}
@xrdef{Command Execution Environment-pg}{36}
@xrdef{Command Execution Environment-pg}{37}
@xrdef{Environment-title}{Environment}
@xrdef{Environment-snt}{Section@tie 3.7.4}
@xrdef{Environment-pg}{37}
@xrdef{Exit Status-title}{Exit Status}
@xrdef{Exit Status-snt}{Section@tie 3.7.5}
@xrdef{Environment-pg}{38}
@xrdef{Exit Status-pg}{38}
@xrdef{Signals-title}{Signals}
@xrdef{Signals-snt}{Section@tie 3.7.6}
@xrdef{Exit Status-pg}{38}
@xrdef{Signals-pg}{38}
@xrdef{Shell Scripts-title}{Shell Scripts}
@xrdef{Shell Scripts-snt}{Section@tie 3.8}
@xrdef{Signals-pg}{39}
@xrdef{Shell Scripts-pg}{39}
@xrdef{Shell Builtin Commands-title}{Shell Builtin Commands}
@xrdef{Shell Builtin Commands-snt}{Chapter@tie 4}
@@ -156,10 +156,10 @@
@xrdef{The Set Builtin-title}{The Set Builtin}
@xrdef{The Set Builtin-snt}{Section@tie 4.3.1}
@xrdef{Modifying Shell Behavior-pg}{58}
@xrdef{The Set Builtin-pg}{58}
@xrdef{The Set Builtin-pg}{59}
@xrdef{The Shopt Builtin-title}{The Shopt Builtin}
@xrdef{The Shopt Builtin-snt}{Section@tie 4.3.2}
@xrdef{The Shopt Builtin-pg}{62}
@xrdef{The Shopt Builtin-pg}{63}
@xrdef{Special Builtins-title}{Special Builtins}
@xrdef{Special Builtins-snt}{Section@tie 4.4}
@xrdef{Special Builtins-pg}{68}
@@ -186,11 +186,11 @@
@xrdef{What is an Interactive Shell?-title}{What is an Interactive Shell?}
@xrdef{What is an Interactive Shell?-snt}{Section@tie 6.3.1}
@xrdef{Interactive Shells-pg}{83}
@xrdef{What is an Interactive Shell?-pg}{83}
@xrdef{Is this Shell Interactive?-title}{Is this Shell Interactive?}
@xrdef{Is this Shell Interactive?-snt}{Section@tie 6.3.2}
@xrdef{Interactive Shell Behavior-title}{Interactive Shell Behavior}
@xrdef{Interactive Shell Behavior-snt}{Section@tie 6.3.3}
@xrdef{What is an Interactive Shell?-pg}{84}
@xrdef{Is this Shell Interactive?-pg}{84}
@xrdef{Interactive Shell Behavior-pg}{84}
@xrdef{Bash Conditional Expressions-title}{Bash Conditional Expressions}
@@ -207,10 +207,10 @@
@xrdef{Arrays-pg}{89}
@xrdef{The Directory Stack-title}{The Directory Stack}
@xrdef{The Directory Stack-snt}{Section@tie 6.8}
@xrdef{The Directory Stack-pg}{90}
@xrdef{Directory Stack Builtins-title}{Directory Stack Builtins}
@xrdef{Directory Stack Builtins-snt}{Section@tie 6.8.1}
@xrdef{The Directory Stack-pg}{90}
@xrdef{Directory Stack Builtins-pg}{90}
@xrdef{Directory Stack Builtins-pg}{91}
@xrdef{Controlling the Prompt-title}{Controlling the Prompt}
@xrdef{Controlling the Prompt-snt}{Section@tie 6.9}
@xrdef{Controlling the Prompt-pg}{92}
+6 -6
View File
@@ -15,7 +15,7 @@
\entry{shift}{45}{\code {shift}}
\entry{test}{45}{\code {test}}
\entry{[}{45}{\code {[}}
\entry{times}{46}{\code {times}}
\entry{times}{47}{\code {times}}
\entry{trap}{47}{\code {trap}}
\entry{umask}{47}{\code {umask}}
\entry{unset}{48}{\code {unset}}
@@ -30,19 +30,19 @@
\entry{help}{53}{\code {help}}
\entry{let}{53}{\code {let}}
\entry{local}{53}{\code {local}}
\entry{logout}{53}{\code {logout}}
\entry{logout}{54}{\code {logout}}
\entry{mapfile}{54}{\code {mapfile}}
\entry{printf}{54}{\code {printf}}
\entry{read}{55}{\code {read}}
\entry{readarray}{56}{\code {readarray}}
\entry{source}{56}{\code {source}}
\entry{type}{56}{\code {type}}
\entry{type}{57}{\code {type}}
\entry{typeset}{57}{\code {typeset}}
\entry{ulimit}{57}{\code {ulimit}}
\entry{unalias}{58}{\code {unalias}}
\entry{set}{58}{\code {set}}
\entry{shopt}{62}{\code {shopt}}
\entry{dirs}{90}{\code {dirs}}
\entry{set}{59}{\code {set}}
\entry{shopt}{63}{\code {shopt}}
\entry{dirs}{91}{\code {dirs}}
\entry{popd}{91}{\code {popd}}
\entry{pushd}{91}{\code {pushd}}
\entry{bg}{98}{\code {bg}}
+6 -6
View File
@@ -21,7 +21,7 @@
\entry {\code {continue}}{42}
\initial {D}
\entry {\code {declare}}{50}
\entry {\code {dirs}}{90}
\entry {\code {dirs}}{91}
\entry {\code {disown}}{99}
\initial {E}
\entry {\code {echo}}{52}
@@ -46,7 +46,7 @@
\initial {L}
\entry {\code {let}}{53}
\entry {\code {local}}{53}
\entry {\code {logout}}{53}
\entry {\code {logout}}{54}
\initial {M}
\entry {\code {mapfile}}{54}
\initial {P}
@@ -60,16 +60,16 @@
\entry {\code {readonly}}{44}
\entry {\code {return}}{45}
\initial {S}
\entry {\code {set}}{58}
\entry {\code {set}}{59}
\entry {\code {shift}}{45}
\entry {\code {shopt}}{62}
\entry {\code {shopt}}{63}
\entry {\code {source}}{56}
\entry {\code {suspend}}{99}
\initial {T}
\entry {\code {test}}{45}
\entry {\code {times}}{46}
\entry {\code {times}}{47}
\entry {\code {trap}}{47}
\entry {\code {type}}{56}
\entry {\code {type}}{57}
\entry {\code {typeset}}{57}
\initial {U}
\entry {\code {ulimit}}{57}
+7 -7
View File
@@ -42,7 +42,7 @@
\entry{parameters}{18}{parameters}
\entry{variable, shell}{18}{variable, shell}
\entry{shell variable}{18}{shell variable}
\entry{parameters, positional}{19}{parameters, positional}
\entry{parameters, positional}{20}{parameters, positional}
\entry{parameters, special}{20}{parameters, special}
\entry{expansion}{21}{expansion}
\entry{brace expansion}{21}{brace expansion}
@@ -62,18 +62,18 @@
\entry{pathname expansion}{30}{pathname expansion}
\entry{pattern matching}{30}{pattern matching}
\entry{matching, pattern}{30}{matching, pattern}
\entry{redirection}{31}{redirection}
\entry{redirection}{32}{redirection}
\entry{command expansion}{35}{command expansion}
\entry{command execution}{36}{command execution}
\entry{command search}{36}{command search}
\entry{execution environment}{36}{execution environment}
\entry{environment}{37}{environment}
\entry{execution environment}{37}{execution environment}
\entry{environment}{38}{environment}
\entry{exit status}{38}{exit status}
\entry{signal handling}{38}{signal handling}
\entry{signal handling}{39}{signal handling}
\entry{shell script}{39}{shell script}
\entry{special builtin}{68}{special builtin}
\entry{login shell}{81}{login shell}
\entry{interactive shell}{81}{interactive shell}
\entry{login shell}{82}{login shell}
\entry{interactive shell}{82}{interactive shell}
\entry{startup files}{82}{startup files}
\entry{interactive shell}{83}{interactive shell}
\entry{shell, interactive}{83}{shell, interactive}
+7 -7
View File
@@ -36,10 +36,10 @@
\entry {directory stack}{90}
\initial {E}
\entry {editing command lines}{102}
\entry {environment}{37}
\entry {environment}{38}
\entry {evaluation, arithmetic}{87}
\entry {event designators}{135}
\entry {execution environment}{36}
\entry {execution environment}{37}
\entry {exit status}{3, 38}
\entry {expansion}{21}
\entry {expansion, arithmetic}{29}
@@ -67,7 +67,7 @@
\entry {initialization file, readline}{104}
\entry {installation}{138}
\entry {interaction, readline}{101}
\entry {interactive shell}{81, 83}
\entry {interactive shell}{82, 83}
\entry {internationalization}{7}
\initial {J}
\entry {job}{3}
@@ -77,7 +77,7 @@
\entry {killing text}{103}
\initial {L}
\entry {localization}{7}
\entry {login shell}{81}
\entry {login shell}{82}
\initial {M}
\entry {matching, pattern}{30}
\entry {metacharacter}{3}
@@ -90,7 +90,7 @@
\initial {P}
\entry {parameter expansion}{23}
\entry {parameters}{18}
\entry {parameters, positional}{19}
\entry {parameters, positional}{20}
\entry {parameters, special}{20}
\entry {pathname expansion}{30}
\entry {pattern matching}{30}
@@ -107,7 +107,7 @@
\entry {quoting, ANSI}{6}
\initial {R}
\entry {Readline, how to use}{100}
\entry {redirection}{31}
\entry {redirection}{32}
\entry {reserved word}{3}
\entry {restricted shell}{93}
\entry {return status}{4}
@@ -118,7 +118,7 @@
\entry {shell variable}{18}
\entry {shell, interactive}{83}
\entry {signal}{4}
\entry {signal handling}{38}
\entry {signal handling}{39}
\entry {special builtin}{4, 68}
\entry {startup files}{82}
\entry {suspending jobs}{97}
BIN
View File
Binary file not shown.
+487 -453
View File
File diff suppressed because it is too large Load Diff
+331 -299
View File
File diff suppressed because it is too large Load Diff
+40 -13
View File
@@ -1,4 +1,4 @@
This is TeX, Version 3.1415926 (TeX Live 2011/Fink) (format=tex 2012.4.18) 24 FEB 2014 08:28
This is TeX, Version 3.1415926 (TeX Live 2011/Fink) (format=tex 2012.4.18) 15 SEP 2014 12:01
**/usr/homes/chet/src/bash/src/doc/bashref.texi
(/usr/homes/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
Loading texinfo [version 2013-09-11.11]:
@@ -239,10 +239,37 @@ arallel -k traceroute[]
[16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30]
[31] [32] [33] [34] [35] [36] [37] [38] [39] Chapter 4 [40] [41] [42] [43]
[44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58]
[59] [60] [61] [62] [63] [64] [65] [66] [67] Chapter 5 [68] [69] [70] [71]
[72] [73] [74] [75] [76] [77] [78] Chapter 6 [79]
Overfull \hbox (49.43388pt too wide) in paragraph at lines 6003--6003
[44] [45] [46] [47] [48] [49] [50] [51] [52] [53]
Overfull \hbox (26.76846pt too wide) in paragraph at lines 4184--4184
[]@texttt mapfile [-d @textttsl de-lim@texttt ] [-n @textttsl count@texttt ] [
-O @textttsl ori-gin@texttt ] [-s @textttsl count@texttt ] [-t] [-u @textttsl f
d@texttt ][]
@hbox(7.60416+2.43333)x433.62
.@glue(@leftskip) 86.72375
.@hbox(0.0+0.0)x0.0
.@texttt m
.@texttt a
.@texttt p
.etc.
[54] [55]
Overfull \hbox (38.26584pt too wide) in paragraph at lines 4383--4383
[]@texttt readarray [-d @textttsl de-lim@texttt ] [-n @textttsl count@texttt ]
[-O @textttsl ori-gin@texttt ] [-s @textttsl count@texttt ] [-t] [-u @textttsl
fd@texttt ][]
@hbox(7.60416+2.43333)x433.62
.@glue(@leftskip) 86.72375
.@hbox(0.0+0.0)x0.0
.@texttt r
.@texttt e
.@texttt a
.etc.
[56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] Chapter 5 [68]
[69] [70] [71] [72] [73] [74] [75] [76] [77] [78] Chapter 6 [79]
Overfull \hbox (49.43388pt too wide) in paragraph at lines 6018--6018
[]@texttt bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@t
exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -255,7 +282,7 @@ exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
Overfull \hbox (72.42863pt too wide) in paragraph at lines 6004--6004
Overfull \hbox (72.42863pt too wide) in paragraph at lines 6019--6019
[]@texttt bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@texttt
] [-O @textttsl shopt_option@texttt ] -c @textttsl string @texttt [@textttsl ar
-
@@ -269,7 +296,7 @@ Overfull \hbox (72.42863pt too wide) in paragraph at lines 6004--6004
.etc.
Overfull \hbox (32.18782pt too wide) in paragraph at lines 6005--6005
Overfull \hbox (32.18782pt too wide) in paragraph at lines 6020--6020
[]@texttt bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@text
tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -288,7 +315,7 @@ texinfo.tex: doing @include of rluser.texi
(/usr/homes/chet/src/bash/src/lib/readline/doc/rluser.texi Chapter 8 [100]
[101] [102] [103] [104] [105] [106] [107] [108] [109]
Underfull \hbox (badness 7540) in paragraph at lines 736--742
Underfull \hbox (badness 7540) in paragraph at lines 742--748
[]@textrm In the above ex-am-ple, @textttsl C-u[] @textrm is bound to the func
-tion
@@ -301,7 +328,7 @@ Underfull \hbox (badness 7540) in paragraph at lines 736--742
.etc.
Underfull \hbox (badness 10000) in paragraph at lines 736--742
Underfull \hbox (badness 10000) in paragraph at lines 742--748
@texttt universal-argument[]@textrm , @textttsl M-DEL[] @textrm is bound to th
e func-tion
@@ -314,7 +341,7 @@ e func-tion
.etc.
[110] [111] [112]
Overfull \hbox (26.43913pt too wide) in paragraph at lines 931--931
Overfull \hbox (26.43913pt too wide) in paragraph at lines 937--937
[]@texttt Meta-Control-h: backward-kill-word Text after the function name is i
gnored[]
@@ -328,7 +355,7 @@ gnored[]
[113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124]
[125] [126] [127] [128] [129] [130]
Overfull \hbox (26.43913pt too wide) in paragraph at lines 2150--2150
Overfull \hbox (26.43913pt too wide) in paragraph at lines 2158--2158
[] @texttt # Tilde expansion, with side effect of expanding tilde to full p
athname[]
@@ -379,10 +406,10 @@ Overfull \vbox (10.81442pt too high) has occurred while \output is active
Here is how much of TeX's memory you used:
2225 strings out of 497974
30407 string characters out of 3220833
68774 words of memory out of 3000000
68686 words of memory out of 3000000
3040 multiletter control sequences out of 15000+200000
32896 words of font info for 113 fonts, out of 3000000 for 9000
51 hyphenation exceptions out of 8191
16i,6n,14p,319b,749s stack positions out of 5000i,500n,10000p,200000b,50000s
Output written on bashref.dvi (172 pages, 721984 bytes).
Output written on bashref.dvi (172 pages, 724260 bytes).
BIN
View File
Binary file not shown.
+3652 -3612
View File
File diff suppressed because it is too large Load Diff
+17 -18
View File
@@ -1011,7 +1011,7 @@ to be matched as a string.
An additional binary operator, @samp{=~}, is available, with the same
precedence as @samp{==} and @samp{!=}.
When it is used, the string to the right of the operator is considered
an extended regular expression and matched accordingly (as in @i{regex}3)).
an extended regular expression and matched accordingly (as in @i{regex}3)).
The return value is 0 if the string matches
the pattern, and 1 otherwise.
If the regular expression is syntactically incorrect, the conditional
@@ -1578,9 +1578,8 @@ expands to a separate word.
In contexts where it is performed, those words
are subject to further word splitting and pathname expansion.
When the expansion occurs within double quotes, it expands to a single word
with the value of each parameter separated by the first character
of the @env{IFS}
special variable. That is, @code{"$*"} is equivalent
with the value of each parameter separated by the first character of the
@env{IFS} special variable. That is, @code{"$*"} is equivalent
to @code{"$1@var{c}$2@var{c}@dots{}"}, where @var{c}
is the first character of the value of the @code{IFS}
variable.
@@ -2951,7 +2950,7 @@ shell's parent, and traps ignored by the shell are ignored
@end itemize
A command invoked in this separate environment cannot affect the
shell's execution environment.
shell's execution environment.
Command substitution, commands grouped with parentheses,
and asynchronous commands are invoked in a
@@ -3086,7 +3085,7 @@ an interactive login shell exits.
If Bash is waiting for a command to complete and receives a signal
for which a trap has been set, the trap will not be executed until
the command completes.
the command completes.
When Bash is waiting for an asynchronous
command via the @code{wait} builtin, the reception of a signal for
which a trap has been set will cause the @code{wait} builtin to return
@@ -3178,7 +3177,7 @@ This section briefly describes the builtins which Bash inherits from
the Bourne Shell, as well as the builtin commands which are unique
to or have been extended in Bash.
Several builtin commands are described in other chapters: builtin
Several builtin commands are described in other chapters: builtin
commands which provide the Bash interface to the job control
facilities (@pxref{Job Control Builtins}), the directory stack
(@pxref{Directory Stack Builtins}), the command history
@@ -3619,7 +3618,7 @@ Otherwise, the expression is false.
@item 4 arguments
If the first argument is @samp{!}, the result is the negation of
the three-argument expression composed of the remaining arguments.
Otherwise, the expression is parsed and evaluated according to
Otherwise, the expression is parsed and evaluated according to
precedence using the rules listed above.
@item 5 or more arguments
@@ -3679,7 +3678,7 @@ each time a shell function or a script executed with the @code{.} or
If a @var{sigspec} is @code{ERR}, the command @var{arg}
is executed whenever
a pipeline (which may consist of a single simple
command), a list, or a compound command returns a
command), a list, or a compound command returns a
non-zero exit status,
subject to the following conditions.
The @code{ERR} trap is not executed if the failed command is part of the
@@ -3886,7 +3885,7 @@ a script executed with the @code{.} or @code{source} builtins).
Without @var{expr}, @code{caller} displays the line number and source
filename of the current subroutine call.
If a non-negative integer is supplied as @var{expr}, @code{caller}
If a non-negative integer is supplied as @var{expr}, @code{caller}
displays the line number, subroutine name, and source file corresponding
to that position in the current execution call stack. This extra
information may be used, for example, to print a stack trace. The
@@ -4215,12 +4214,12 @@ The @option{-c} option specifies @var{quantum}.
Specify the number of lines read between each call to @var{callback}.
@end table
If @option{-C} is specified without @option{-c},
If @option{-C} is specified without @option{-c},
the default quantum is 5000.
When @var{callback} is evaluated, it is supplied the index of the next
array element to be assigned and the line to be assigned to that element
as additional arguments.
@var{callback} is evaluated after the line is read but before the
@var{callback} is evaluated after the line is read but before the
array element is assigned.
If not supplied with an explicit origin, @code{mapfile} will clear @var{array}
@@ -4649,8 +4648,8 @@ When a background job completes, the shell prints a line
containing its exit status.
@item -n
Read commands but do not execute them; this may be used to check a
script for syntax errors.
Read commands but do not execute them.
This may be used to check a script for syntax errors.
This option is ignored by interactive shells.
@item -o @var{option-name}
@@ -5059,12 +5058,12 @@ a call to @code{return}.
descriptions (@pxref{Bash Variables}).
@item
Function tracing is enabled: command substitution, shell functions, and
Function tracing is enabled: command substitution, shell functions, and
subshells invoked with @code{( @var{command} )} inherit the
@code{DEBUG} and @code{RETURN} traps.
@item
Error tracing is enabled: command substitution, shell functions, and
Error tracing is enabled: command substitution, shell functions, and
subshells invoked with @code{( @var{command} )} inherit the
@code{ERR} trap.
@end enumerate
@@ -5155,7 +5154,7 @@ The shell sets this option if it is started as a login shell
The value may not be changed.
@item mailwarn
If set, and a file that Bash is checking for mail has been
If set, and a file that Bash is checking for mail has been
accessed since the last time it was checked, the message
@code{"The mail in @var{mailfile} has been read"} is displayed.
@@ -6854,7 +6853,7 @@ Referencing an array variable without a subscript is equivalent to
referencing with a subscript of 0.
If the @var{subscript}
used to reference an element of an indexed array
evaluates to a number less than zero, it is
evaluates to a number less than zero, it is
interpreted as relative to one greater than the maximum index of the array,
so negative indices count back from the end of the array,
and an index of -1 refers to the last element.
+11 -11
View File
@@ -24,7 +24,7 @@
@numsubsecentry{GNU Parallel}{3.2.6}{GNU Parallel}{15}
@numsecentry{Shell Functions}{3.3}{Shell Functions}{17}
@numsecentry{Shell Parameters}{3.4}{Shell Parameters}{18}
@numsubsecentry{Positional Parameters}{3.4.1}{Positional Parameters}{19}
@numsubsecentry{Positional Parameters}{3.4.1}{Positional Parameters}{20}
@numsubsecentry{Special Parameters}{3.4.2}{Special Parameters}{20}
@numsecentry{Shell Expansions}{3.5}{Shell Expansions}{21}
@numsubsecentry{Brace Expansion}{3.5.1}{Brace Expansion}{21}
@@ -36,8 +36,8 @@
@numsubsecentry{Word Splitting}{3.5.7}{Word Splitting}{29}
@numsubsecentry{Filename Expansion}{3.5.8}{Filename Expansion}{30}
@numsubsubsecentry{Pattern Matching}{3.5.8.1}{Pattern Matching}{30}
@numsubsecentry{Quote Removal}{3.5.9}{Quote Removal}{31}
@numsecentry{Redirections}{3.6}{Redirections}{31}
@numsubsecentry{Quote Removal}{3.5.9}{Quote Removal}{32}
@numsecentry{Redirections}{3.6}{Redirections}{32}
@numsubsecentry{Redirecting Input}{3.6.1}{}{33}
@numsubsecentry{Redirecting Output}{3.6.2}{}{33}
@numsubsecentry{Appending Redirected Output}{3.6.3}{}{33}
@@ -45,23 +45,23 @@
@numsubsecentry{Appending Standard Output and Standard Error}{3.6.5}{}{34}
@numsubsecentry{Here Documents}{3.6.6}{}{34}
@numsubsecentry{Here Strings}{3.6.7}{}{34}
@numsubsecentry{Duplicating File Descriptors}{3.6.8}{}{34}
@numsubsecentry{Duplicating File Descriptors}{3.6.8}{}{35}
@numsubsecentry{Moving File Descriptors}{3.6.9}{}{35}
@numsubsecentry{Opening File Descriptors for Reading and Writing}{3.6.10}{}{35}
@numsecentry{Executing Commands}{3.7}{Executing Commands}{35}
@numsubsecentry{Simple Command Expansion}{3.7.1}{Simple Command Expansion}{35}
@numsubsecentry{Command Search and Execution}{3.7.2}{Command Search and Execution}{36}
@numsubsecentry{Command Execution Environment}{3.7.3}{Command Execution Environment}{36}
@numsubsecentry{Environment}{3.7.4}{Environment}{37}
@numsubsecentry{Command Execution Environment}{3.7.3}{Command Execution Environment}{37}
@numsubsecentry{Environment}{3.7.4}{Environment}{38}
@numsubsecentry{Exit Status}{3.7.5}{Exit Status}{38}
@numsubsecentry{Signals}{3.7.6}{Signals}{38}
@numsubsecentry{Signals}{3.7.6}{Signals}{39}
@numsecentry{Shell Scripts}{3.8}{Shell Scripts}{39}
@numchapentry{Shell Builtin Commands}{4}{Shell Builtin Commands}{41}
@numsecentry{Bourne Shell Builtins}{4.1}{Bourne Shell Builtins}{41}
@numsecentry{Bash Builtin Commands}{4.2}{Bash Builtins}{48}
@numsecentry{Modifying Shell Behavior}{4.3}{Modifying Shell Behavior}{58}
@numsubsecentry{The Set Builtin}{4.3.1}{The Set Builtin}{58}
@numsubsecentry{The Shopt Builtin}{4.3.2}{The Shopt Builtin}{62}
@numsubsecentry{The Set Builtin}{4.3.1}{The Set Builtin}{59}
@numsubsecentry{The Shopt Builtin}{4.3.2}{The Shopt Builtin}{63}
@numsecentry{Special Builtins}{4.4}{Special Builtins}{68}
@numchapentry{Shell Variables}{5}{Shell Variables}{69}
@numsecentry{Bourne Shell Variables}{5.1}{Bourne Shell Variables}{69}
@@ -70,7 +70,7 @@
@numsecentry{Invoking Bash}{6.1}{Invoking Bash}{80}
@numsecentry{Bash Startup Files}{6.2}{Bash Startup Files}{82}
@numsecentry{Interactive Shells}{6.3}{Interactive Shells}{83}
@numsubsecentry{What is an Interactive Shell?}{6.3.1}{What is an Interactive Shell?}{83}
@numsubsecentry{What is an Interactive Shell?}{6.3.1}{What is an Interactive Shell?}{84}
@numsubsecentry{Is this Shell Interactive?}{6.3.2}{Is this Shell Interactive?}{84}
@numsubsecentry{Interactive Shell Behavior}{6.3.3}{Interactive Shell Behavior}{84}
@numsecentry{Bash Conditional Expressions}{6.4}{Bash Conditional Expressions}{85}
@@ -78,7 +78,7 @@
@numsecentry{Aliases}{6.6}{Aliases}{88}
@numsecentry{Arrays}{6.7}{Arrays}{89}
@numsecentry{The Directory Stack}{6.8}{The Directory Stack}{90}
@numsubsecentry{Directory Stack Builtins}{6.8.1}{Directory Stack Builtins}{90}
@numsubsecentry{Directory Stack Builtins}{6.8.1}{Directory Stack Builtins}{91}
@numsecentry{Controlling the Prompt}{6.9}{Controlling the Prompt}{92}
@numsecentry{The Restricted Shell}{6.10}{The Restricted Shell}{93}
@numsecentry{Bash POSIX Mode}{6.11}{Bash POSIX Mode}{94}
+7 -6
View File
@@ -15,10 +15,10 @@
\entry{$$}{20}{\code {$$}}
\entry{!}{20}{\code {!}}
\entry{$!}{20}{\code {$!}}
\entry{0}{20}{\code {0}}
\entry{$0}{20}{\code {$0}}
\entry{_}{20}{\code {_}}
\entry{$_}{20}{\code {$_}}
\entry{0}{21}{\code {0}}
\entry{$0}{21}{\code {$0}}
\entry{_}{21}{\code {_}}
\entry{$_}{21}{\code {$_}}
\entry{CDPATH}{69}{\code {CDPATH}}
\entry{HOME}{69}{\code {HOME}}
\entry{IFS}{69}{\code {IFS}}
@@ -118,18 +118,19 @@
\entry{auto_resume}{100}{\code {auto_resume}}
\entry{bell-style}{105}{\code {bell-style}}
\entry{bind-tty-special-chars}{105}{\code {bind-tty-special-chars}}
\entry{blink-matching-paren}{105}{\code {blink-matching-paren}}
\entry{colored-stats}{105}{\code {colored-stats}}
\entry{comment-begin}{105}{\code {comment-begin}}
\entry{completion-display-width}{105}{\code {completion-display-width}}
\entry{completion-ignore-case}{105}{\code {completion-ignore-case}}
\entry{completion-map-case}{105}{\code {completion-map-case}}
\entry{completion-map-case}{106}{\code {completion-map-case}}
\entry{completion-prefix-display-length}{106}{\code {completion-prefix-display-length}}
\entry{completion-query-items}{106}{\code {completion-query-items}}
\entry{convert-meta}{106}{\code {convert-meta}}
\entry{disable-completion}{106}{\code {disable-completion}}
\entry{editing-mode}{106}{\code {editing-mode}}
\entry{enable-keypad}{106}{\code {enable-keypad}}
\entry{expand-tilde}{106}{\code {expand-tilde}}
\entry{expand-tilde}{107}{\code {expand-tilde}}
\entry{history-preserve-point}{107}{\code {history-preserve-point}}
\entry{history-size}{107}{\code {history-size}}
\entry{horizontal-scroll-mode}{107}{\code {horizontal-scroll-mode}}
+7 -6
View File
@@ -11,8 +11,8 @@
\entry {\code {$-}}{20}
\entry {\code {$?}}{20}
\entry {\code {$@}}{20}
\entry {\code {$_}}{20}
\entry {\code {$0}}{20}
\entry {\code {$_}}{21}
\entry {\code {$0}}{21}
\initial {*}
\entry {\code {*}}{20}
\initial {-}
@@ -22,9 +22,9 @@
\initial {@}
\entry {\code {@}}{20}
\initial {_}
\entry {\code {_}}{20}
\entry {\code {_}}{21}
\initial {0}
\entry {\code {0}}{20}
\entry {\code {0}}{21}
\initial {A}
\entry {\code {auto_resume}}{100}
\initial {B}
@@ -48,6 +48,7 @@
\entry {\code {BASHPID}}{70}
\entry {\code {bell-style}}{105}
\entry {\code {bind-tty-special-chars}}{105}
\entry {\code {blink-matching-paren}}{105}
\initial {C}
\entry {\code {CDPATH}}{69}
\entry {\code {CHILD_MAX}}{72}
@@ -63,7 +64,7 @@
\entry {\code {COMP_WORDS}}{73}
\entry {\code {completion-display-width}}{105}
\entry {\code {completion-ignore-case}}{105}
\entry {\code {completion-map-case}}{105}
\entry {\code {completion-map-case}}{106}
\entry {\code {completion-prefix-display-length}}{106}
\entry {\code {completion-query-items}}{106}
\entry {\code {COMPREPLY}}{73}
@@ -78,7 +79,7 @@
\entry {\code {enable-keypad}}{106}
\entry {\code {ENV}}{73}
\entry {\code {EUID}}{73}
\entry {\code {expand-tilde}}{106}
\entry {\code {expand-tilde}}{107}
\initial {F}
\entry {\code {FCEDIT}}{73}
\entry {\code {FIGNORE}}{74}
+147 -140
View File
@@ -46,7 +46,7 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
AAlliiaass with no arguments or with the --pp option prints the list of
aliases in the form aalliiaass _n_a_m_e=_v_a_l_u_e on standard output. When
arguments are supplied, an alias is defined for each _n_a_m_e whose
_v_a_l_u_e is given. A trailing space in _v_a_l_u_e causes the next word
_v_a_l_u_e is given. A trailing space in _v_a_l_u_e causes the next word
to be checked for alias substitution when the alias is expanded.
For each _n_a_m_e in the argument list for which no _v_a_l_u_e is sup-
plied, the name and value of the alias is printed. AAlliiaass
@@ -66,7 +66,7 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
bbiinndd [--mm _k_e_y_m_a_p] --ff _f_i_l_e_n_a_m_e
bbiinndd [--mm _k_e_y_m_a_p] --xx _k_e_y_s_e_q:_s_h_e_l_l_-_c_o_m_m_a_n_d
bbiinndd [--mm _k_e_y_m_a_p] _k_e_y_s_e_q:_f_u_n_c_t_i_o_n_-_n_a_m_e
bbiinndd _r_e_a_d_l_i_n_e_-_c_o_m_m_a_n_d
bbiinndd [--mm _k_e_y_m_a_p] _k_e_y_s_e_q:_r_e_a_d_l_i_n_e_-_c_o_m_m_a_n_d
Display current rreeaaddlliinnee key and function bindings, bind a key
sequence to a rreeaaddlliinnee function or macro, or set a rreeaaddlliinnee
variable. Each non-option argument is a command as it would
@@ -152,7 +152,7 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
directory names in CCDDPPAATTHH are separated by a colon (:). A null
directory name in CCDDPPAATTHH is the same as the current directory,
i.e., ``..''. If _d_i_r begins with a slash (/), then CCDDPPAATTHH is not
used. The --PP option causes ccdd to use the physical directory
used. The --PP option causes ccdd to use the physical directory
structure by resolving symbolic links while traversing _d_i_r and
before processing instances of _._. in _d_i_r (see also the --PP option
to the sseett builtin command); the --LL option forces symbolic links
@@ -174,7 +174,7 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
ccoommmmaanndd [--ppVVvv] _c_o_m_m_a_n_d [_a_r_g ...]
Run _c_o_m_m_a_n_d with _a_r_g_s suppressing the normal shell function
lookup. Only builtin commands or commands found in the PPAATTHH are
lookup. Only builtin commands or commands found in the PPAATTHH are
executed. If the --pp option is given, the search for _c_o_m_m_a_n_d is
performed using a default value for PPAATTHH that is guaranteed to
find all of the standard utilities. If either the --VV or --vv
@@ -401,11 +401,11 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
attribute is disabled.
--nn Give each _n_a_m_e the _n_a_m_e_r_e_f attribute, making it a name
reference to another variable. That other variable is
defined by the value of _n_a_m_e. All references and assign-
ments to _n_a_m_e, except for changing the --nn attribute
itself, are performed on the variable referenced by
_n_a_m_e's value. The --nn attribute cannot be applied to
array variables.
defined by the value of _n_a_m_e. All references, assign-
ments, and attribute modifications to _n_a_m_e, except for
changing the --nn attribute itself, are performed on the
variable referenced by _n_a_m_e's value. The nameref
attribute cannot be applied to array variables.
--rr Make _n_a_m_es readonly. These names cannot then be assigned
values by subsequent assignment statements or unset.
--tt Give each _n_a_m_e the _t_r_a_c_e attribute. Traced functions
@@ -787,151 +787,153 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
llooggoouutt Exit a login shell.
mmaappffiillee [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC _c_a_l_l_b_a_c_k]
[--cc _q_u_a_n_t_u_m] [_a_r_r_a_y]
rreeaaddaarrrraayy [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC _c_a_l_l_b_a_c_k]
[--cc _q_u_a_n_t_u_m] [_a_r_r_a_y]
mmaappffiillee [--dd _d_e_l_i_m] [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC
_c_a_l_l_b_a_c_k] [--cc _q_u_a_n_t_u_m] [_a_r_r_a_y]
rreeaaddaarrrraayy [--dd _d_e_l_i_m] [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC
_c_a_l_l_b_a_c_k] [--cc _q_u_a_n_t_u_m] [_a_r_r_a_y]
Read lines from the standard input into the indexed array vari-
able _a_r_r_a_y, or from file descriptor _f_d if the --uu option is sup-
plied. The variable MMAAPPFFIILLEE is the default _a_r_r_a_y. Options, if
supplied, have the following meanings:
--nn Copy at most _c_o_u_n_t lines. If _c_o_u_n_t is 0, all lines are
--dd The first character of _d_e_l_i_m is used to terminate each
input line, rather than newline.
--nn Copy at most _c_o_u_n_t lines. If _c_o_u_n_t is 0, all lines are
copied.
--OO Begin assigning to _a_r_r_a_y at index _o_r_i_g_i_n. The default
--OO Begin assigning to _a_r_r_a_y at index _o_r_i_g_i_n. The default
index is 0.
--ss Discard the first _c_o_u_n_t lines read.
--tt Remove a trailing newline from each line read.
--uu Read lines from file descriptor _f_d instead of the stan-
--uu Read lines from file descriptor _f_d instead of the stan-
dard input.
--CC Evaluate _c_a_l_l_b_a_c_k each time _q_u_a_n_t_u_m lines are read. The
--CC Evaluate _c_a_l_l_b_a_c_k each time _q_u_a_n_t_u_m lines are read. The
--cc option specifies _q_u_a_n_t_u_m.
--cc Specify the number of lines read between each call to
--cc Specify the number of lines read between each call to
_c_a_l_l_b_a_c_k.
If --CC is specified without --cc, the default quantum is 5000.
If --CC is specified without --cc, the default quantum is 5000.
When _c_a_l_l_b_a_c_k is evaluated, it is supplied the index of the next
array element to be assigned and the line to be assigned to that
element as additional arguments. _c_a_l_l_b_a_c_k is evaluated after
element as additional arguments. _c_a_l_l_b_a_c_k is evaluated after
the line is read but before the array element is assigned.
If not supplied with an explicit origin, mmaappffiillee will clear
If not supplied with an explicit origin, mmaappffiillee will clear
_a_r_r_a_y before assigning to it.
mmaappffiillee returns successfully unless an invalid option or option
argument is supplied, _a_r_r_a_y is invalid or unassignable, or if
mmaappffiillee returns successfully unless an invalid option or option
argument is supplied, _a_r_r_a_y is invalid or unassignable, or if
_a_r_r_a_y is not an indexed array.
ppooppdd [-nn] [+_n] [-_n]
Removes entries from the directory stack. With no arguments,
removes the top directory from the stack, and performs a ccdd to
Removes entries from the directory stack. With no arguments,
removes the top directory from the stack, and performs a ccdd to
the new top directory. Arguments, if supplied, have the follow-
ing meanings:
--nn Suppresses the normal change of directory when removing
directories from the stack, so that only the stack is
--nn Suppresses the normal change of directory when removing
directories from the stack, so that only the stack is
manipulated.
++_n Removes the _nth entry counting from the left of the list
shown by ddiirrss, starting with zero. For example: ``popd
++_n Removes the _nth entry counting from the left of the list
shown by ddiirrss, starting with zero. For example: ``popd
+0'' removes the first directory, ``popd +1'' the second.
--_n Removes the _nth entry counting from the right of the list
shown by ddiirrss, starting with zero. For example: ``popd
-0'' removes the last directory, ``popd -1'' the next to
shown by ddiirrss, starting with zero. For example: ``popd
-0'' removes the last directory, ``popd -1'' the next to
last.
If the ppooppdd command is successful, a ddiirrss is performed as well,
and the return status is 0. ppooppdd returns false if an invalid
If the ppooppdd command is successful, a ddiirrss is performed as well,
and the return status is 0. ppooppdd returns false if an invalid
option is encountered, the directory stack is empty, a non-exis-
tent directory stack entry is specified, or the directory change
fails.
pprriinnttff [--vv _v_a_r] _f_o_r_m_a_t [_a_r_g_u_m_e_n_t_s]
Write the formatted _a_r_g_u_m_e_n_t_s to the standard output under the
control of the _f_o_r_m_a_t. The --vv option causes the output to be
assigned to the variable _v_a_r rather than being printed to the
Write the formatted _a_r_g_u_m_e_n_t_s to the standard output under the
control of the _f_o_r_m_a_t. The --vv option causes the output to be
assigned to the variable _v_a_r rather than being printed to the
standard output.
The _f_o_r_m_a_t is a character string which contains three types of
objects: plain characters, which are simply copied to standard
output, character escape sequences, which are converted and
copied to the standard output, and format specifications, each
of which causes printing of the next successive _a_r_g_u_m_e_n_t. In
The _f_o_r_m_a_t is a character string which contains three types of
objects: plain characters, which are simply copied to standard
output, character escape sequences, which are converted and
copied to the standard output, and format specifications, each
of which causes printing of the next successive _a_r_g_u_m_e_n_t. In
addition to the standard _p_r_i_n_t_f(1) format specifications, pprriinnttff
interprets the following extensions:
%%bb causes pprriinnttff to expand backslash escape sequences in the
corresponding _a_r_g_u_m_e_n_t (except that \\cc terminates output,
backslashes in \\'', \\"", and \\?? are not removed, and octal
backslashes in \\'', \\"", and \\?? are not removed, and octal
escapes beginning with \\00 may contain up to four digits).
%%qq causes pprriinnttff to output the corresponding _a_r_g_u_m_e_n_t in a
%%qq causes pprriinnttff to output the corresponding _a_r_g_u_m_e_n_t in a
format that can be reused as shell input.
%%((_d_a_t_e_f_m_t))TT
causes pprriinnttff to output the date-time string resulting
from using _d_a_t_e_f_m_t as a format string for _s_t_r_f_t_i_m_e(3).
causes pprriinnttff to output the date-time string resulting
from using _d_a_t_e_f_m_t as a format string for _s_t_r_f_t_i_m_e(3).
The corresponding _a_r_g_u_m_e_n_t is an integer representing the
number of seconds since the epoch. Two special argument
values may be used: -1 represents the current time, and
-2 represents the time the shell was invoked. If no
argument is specified, conversion behaves as if -1 had
been given. This is an exception to the usual pprriinnttff
number of seconds since the epoch. Two special argument
values may be used: -1 represents the current time, and
-2 represents the time the shell was invoked. If no
argument is specified, conversion behaves as if -1 had
been given. This is an exception to the usual pprriinnttff
behavior.
Arguments to non-string format specifiers are treated as C con-
Arguments to non-string format specifiers are treated as C con-
stants, except that a leading plus or minus sign is allowed, and
if the leading character is a single or double quote, the value
if the leading character is a single or double quote, the value
is the ASCII value of the following character.
The _f_o_r_m_a_t is reused as necessary to consume all of the _a_r_g_u_-
The _f_o_r_m_a_t is reused as necessary to consume all of the _a_r_g_u_-
_m_e_n_t_s. If the _f_o_r_m_a_t requires more _a_r_g_u_m_e_n_t_s than are supplied,
the extra format specifications behave as if a zero value or
null string, as appropriate, had been supplied. The return
the extra format specifications behave as if a zero value or
null string, as appropriate, had been supplied. The return
value is zero on success, non-zero on failure.
ppuusshhdd [--nn] [+_n] [-_n]
ppuusshhdd [--nn] [_d_i_r]
Adds a directory to the top of the directory stack, or rotates
the stack, making the new top of the stack the current working
Adds a directory to the top of the directory stack, or rotates
the stack, making the new top of the stack the current working
directory. With no arguments, exchanges the top two directories
and returns 0, unless the directory stack is empty. Arguments,
and returns 0, unless the directory stack is empty. Arguments,
if supplied, have the following meanings:
--nn Suppresses the normal change of directory when adding
directories to the stack, so that only the stack is
--nn Suppresses the normal change of directory when adding
directories to the stack, so that only the stack is
manipulated.
++_n Rotates the stack so that the _nth directory (counting
from the left of the list shown by ddiirrss, starting with
++_n Rotates the stack so that the _nth directory (counting
from the left of the list shown by ddiirrss, starting with
zero) is at the top.
--_n Rotates the stack so that the _nth directory (counting
from the right of the list shown by ddiirrss, starting with
--_n Rotates the stack so that the _nth directory (counting
from the right of the list shown by ddiirrss, starting with
zero) is at the top.
_d_i_r Adds _d_i_r to the directory stack at the top, making it the
new current working directory as if it had been supplied
new current working directory as if it had been supplied
as the argument to the ccdd builtin.
If the ppuusshhdd command is successful, a ddiirrss is performed as well.
If the first form is used, ppuusshhdd returns 0 unless the cd to _d_i_r
fails. With the second form, ppuusshhdd returns 0 unless the direc-
tory stack is empty, a non-existent directory stack element is
specified, or the directory change to the specified new current
If the first form is used, ppuusshhdd returns 0 unless the cd to _d_i_r
fails. With the second form, ppuusshhdd returns 0 unless the direc-
tory stack is empty, a non-existent directory stack element is
specified, or the directory change to the specified new current
directory fails.
ppwwdd [--LLPP]
Print the absolute pathname of the current working directory.
Print the absolute pathname of the current working directory.
The pathname printed contains no symbolic links if the --PP option
is supplied or the --oo pphhyyssiiccaall option to the sseett builtin command
is enabled. If the --LL option is used, the pathname printed may
contain symbolic links. The return status is 0 unless an error
occurs while reading the name of the current directory or an
is enabled. If the --LL option is used, the pathname printed may
contain symbolic links. The return status is 0 unless an error
occurs while reading the name of the current directory or an
invalid option is supplied.
rreeaadd [--eerrss] [--aa _a_n_a_m_e] [--dd _d_e_l_i_m] [--ii _t_e_x_t] [--nn _n_c_h_a_r_s] [--NN _n_c_h_a_r_s] [--pp
_p_r_o_m_p_t] [--tt _t_i_m_e_o_u_t] [--uu _f_d] [_n_a_m_e ...]
One line is read from the standard input, or from the file
descriptor _f_d supplied as an argument to the --uu option, and the
One line is read from the standard input, or from the file
descriptor _f_d supplied as an argument to the --uu option, and the
first word is assigned to the first _n_a_m_e, the second word to the
second _n_a_m_e, and so on, with leftover words and their interven-
ing separators assigned to the last _n_a_m_e. If there are fewer
second _n_a_m_e, and so on, with leftover words and their interven-
ing separators assigned to the last _n_a_m_e. If there are fewer
words read from the input stream than names, the remaining names
are assigned empty values. The characters in IIFFSS are used to
split the line into words using the same rules the shell uses
are assigned empty values. The characters in IIFFSS are used to
split the line into words using the same rules the shell uses
for expansion (described above under WWoorrdd SSpplliittttiinngg). The back-
slash character (\\) may be used to remove any special meaning
slash character (\\) may be used to remove any special meaning
for the next character read and for line continuation. Options,
if supplied, have the following meanings:
--aa _a_n_a_m_e
@@ -940,81 +942,86 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
new values are assigned. Other _n_a_m_e arguments are
ignored.
--dd _d_e_l_i_m
The first character of _d_e_l_i_m is used to terminate the
The first character of _d_e_l_i_m is used to terminate the
input line, rather than newline.
--ee If the standard input is coming from a terminal, rreeaaddlliinnee
(see RREEAADDLLIINNEE above) is used to obtain the line. Read-
line uses the current (or default, if line editing was
(see RREEAADDLLIINNEE above) is used to obtain the line. Read-
line uses the current (or default, if line editing was
not previously active) editing settings.
--ii _t_e_x_t
If rreeaaddlliinnee is being used to read the line, _t_e_x_t is
If rreeaaddlliinnee is being used to read the line, _t_e_x_t is
placed into the editing buffer before editing begins.
--nn _n_c_h_a_r_s
rreeaadd returns after reading _n_c_h_a_r_s characters rather than
waiting for a complete line of input, but honor a delim-
iter if fewer than _n_c_h_a_r_s characters are read before the
rreeaadd returns after reading _n_c_h_a_r_s characters rather than
waiting for a complete line of input, but honor a delim-
iter if fewer than _n_c_h_a_r_s characters are read before the
delimiter.
--NN _n_c_h_a_r_s
rreeaadd returns after reading exactly _n_c_h_a_r_s characters
rather than waiting for a complete line of input, unless
EOF is encountered or rreeaadd times out. Delimiter charac-
ters encountered in the input are not treated specially
and do not cause rreeaadd to return until _n_c_h_a_r_s characters
rreeaadd returns after reading exactly _n_c_h_a_r_s characters
rather than waiting for a complete line of input, unless
EOF is encountered or rreeaadd times out. Delimiter charac-
ters encountered in the input are not treated specially
and do not cause rreeaadd to return until _n_c_h_a_r_s characters
are read.
--pp _p_r_o_m_p_t
Display _p_r_o_m_p_t on standard error, without a trailing new-
line, before attempting to read any input. The prompt is
displayed only if input is coming from a terminal.
--rr Backslash does not act as an escape character. The back-
slash is considered to be part of the line. In particu-
lar, a backslash-newline pair may not be used as a line
slash is considered to be part of the line. In particu-
lar, a backslash-newline pair may not be used as a line
continuation.
--ss Silent mode. If input is coming from a terminal, charac-
ters are not echoed.
--tt _t_i_m_e_o_u_t
Cause rreeaadd to time out and return failure if a complete
line of input (or a specified number of characters) is
not read within _t_i_m_e_o_u_t seconds. _t_i_m_e_o_u_t may be a deci-
mal number with a fractional portion following the deci-
mal point. This option is only effective if rreeaadd is
reading input from a terminal, pipe, or other special
file; it has no effect when reading from regular files.
Cause rreeaadd to time out and return failure if a complete
line of input (or a specified number of characters) is
not read within _t_i_m_e_o_u_t seconds. _t_i_m_e_o_u_t may be a deci-
mal number with a fractional portion following the deci-
mal point. This option is only effective if rreeaadd is
reading input from a terminal, pipe, or other special
file; it has no effect when reading from regular files.
If rreeaadd times out, rreeaadd saves any partial input read into
the specified variable _n_a_m_e. If _t_i_m_e_o_u_t is 0, rreeaadd
returns immediately, without trying to read any data.
The exit status is 0 if input is available on the speci-
fied file descriptor, non-zero otherwise. The exit sta-
the specified variable _n_a_m_e. If _t_i_m_e_o_u_t is 0, rreeaadd
returns immediately, without trying to read any data.
The exit status is 0 if input is available on the speci-
fied file descriptor, non-zero otherwise. The exit sta-
tus is greater than 128 if the timeout is exceeded.
--uu _f_d Read input from file descriptor _f_d.
If no _n_a_m_e_s are supplied, the line read is assigned to the vari-
able RREEPPLLYY. The return code is zero, unless end-of-file is
encountered, rreeaadd times out (in which case the return code is
greater than 128), a variable assignment error (such as assign-
ing to a readonly variable) occurs, or an invalid file descrip-
able RREEPPLLYY. The return code is zero, unless end-of-file is
encountered, rreeaadd times out (in which case the return code is
greater than 128), a variable assignment error (such as assign-
ing to a readonly variable) occurs, or an invalid file descrip-
tor is supplied as the argument to --uu.
rreeaaddoonnllyy [--aaAAff] [--pp] [_n_a_m_e[=_w_o_r_d] ...]
The given _n_a_m_e_s are marked readonly; the values of these _n_a_m_e_s
may not be changed by subsequent assignment. If the --ff option
is supplied, the functions corresponding to the _n_a_m_e_s are so
marked. The --aa option restricts the variables to indexed
arrays; the --AA option restricts the variables to associative
arrays. If both options are supplied, --AA takes precedence. If
no _n_a_m_e arguments are given, or if the --pp option is supplied, a
The given _n_a_m_e_s are marked readonly; the values of these _n_a_m_e_s
may not be changed by subsequent assignment. If the --ff option
is supplied, the functions corresponding to the _n_a_m_e_s are so
marked. The --aa option restricts the variables to indexed
arrays; the --AA option restricts the variables to associative
arrays. If both options are supplied, --AA takes precedence. If
no _n_a_m_e arguments are given, or if the --pp option is supplied, a
list of all readonly names is printed. The other options may be
used to restrict the output to a subset of the set of readonly
names. The --pp option causes output to be displayed in a format
that may be reused as input. If a variable name is followed by
=_w_o_r_d, the value of the variable is set to _w_o_r_d. The return
status is 0 unless an invalid option is encountered, one of the
used to restrict the output to a subset of the set of readonly
names. The --pp option causes output to be displayed in a format
that may be reused as input. If a variable name is followed by
=_w_o_r_d, the value of the variable is set to _w_o_r_d. The return
status is 0 unless an invalid option is encountered, one of the
_n_a_m_e_s is not a valid shell variable name, or --ff is supplied with
a _n_a_m_e that is not a function.
rreettuurrnn [_n]
Causes a function to stop executing and return the value speci-
fied by _n to its caller. If _n is omitted, the return status is
that of the last command executed in the function body. If
Causes a function to stop executing and return the value speci-
fied by _n to its caller. If _n is omitted, the return status is
that of the last command executed in the function body. If
rreettuurrnn is executed by a trap handler, the last command used to
determine the status is the last command executed before the
trap handler. if rreettuurrnn is executed during a DDEEBBUUGG trap, the
last command used to determine the status is the last command
executed by the trap handler before rreettuurrnn was invoked. If
rreettuurrnn is used outside a function, but during execution of a
script by the .. (ssoouurrccee) command, it causes the shell to stop
executing that script and return either _n or the exit status of
@@ -1046,18 +1053,18 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
is effective only when job control is enabled.
--ee Exit immediately if a _p_i_p_e_l_i_n_e (which may consist of a
single _s_i_m_p_l_e _c_o_m_m_a_n_d), a _l_i_s_t, or a _c_o_m_p_o_u_n_d _c_o_m_m_a_n_d
(see SSHHEELLLL GGRRAAMMMMAARR above), exits with a non-zero sta-
tus. The shell does not exit if the command that fails
is part of the command list immediately following a
wwhhiillee or uunnttiill keyword, part of the test following the
iiff or eelliiff reserved words, part of any command executed
in a &&&& or |||| list except the command following the
final &&&& or ||||, any command in a pipeline but the last,
or if the command's return value is being inverted with
!!. If a compound command other than a subshell returns
a non-zero status because a command failed while --ee was
being ignored, the shell does not exit. A trap on EERRRR,
if set, is executed before the shell exits. This option
(see SSHHEELLLL GGRRAAMMMMAARR above), exits with a non-zero status.
The shell does not exit if the command that fails is
part of the command list immediately following a wwhhiillee
or uunnttiill keyword, part of the test following the iiff or
eelliiff reserved words, part of any command executed in a
&&&& or |||| list except the command following the final &&&&
or ||||, any command in a pipeline but the last, or if the
command's return value is being inverted with !!. If a
compound command other than a subshell returns a non-
zero status because a command failed while --ee was being
ignored, the shell does not exit. A trap on EERRRR, if
set, is executed before the shell exits. This option
applies to the shell environment and each subshell envi-
ronment separately (see CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT
above), and may cause subshells to exit before executing
@@ -1364,14 +1371,14 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
33.. If the command run by the DDEEBBUUGG trap returns a
value of 2, and the shell is executing in a sub-
routine (a shell function or a shell script exe-
cuted by the .. or ssoouurrccee builtins), a call to
rreettuurrnn is simulated.
cuted by the .. or ssoouurrccee builtins), the shell
simulates a call to rreettuurrnn.
44.. BBAASSHH__AARRGGCC and BBAASSHH__AARRGGVV are updated as described
in their descriptions above.
55.. Function tracing is enabled: command substitu-
55.. Function tracing is enabled: command substitu-
tion, shell functions, and subshells invoked with
(( _c_o_m_m_a_n_d )) inherit the DDEEBBUUGG and RREETTUURRNN traps.
66.. Error tracing is enabled: command substitution,
66.. Error tracing is enabled: command substitution,
shell functions, and subshells invoked with ((
_c_o_m_m_a_n_d )) inherit the EERRRR trap.
eexxttgglloobb If set, the extended pattern matching features described
+1556 -1542
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
%%CreationDate: Mon Feb 24 08:28:31 2014
%%CreationDate: Mon Sep 15 12:01:54 2014
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.19 2