commit bash-20141128 snapshot

This commit is contained in:
Chet Ramey
2014-12-02 16:15:47 -05:00
parent 0a233f3ec4
commit 09f70f2f67
59 changed files with 54337 additions and 2021 deletions
+161 -154
View File
@@ -367,7 +367,7 @@ SSHHEELLLL GGRRAAMMMMAARR
of the operator is considered a pattern and matched according to
the rules described below under PPaatttteerrnn MMaattcchhiinngg, as if the eexxtt--
gglloobb shell option were enabled. The == operator is equivalent to
====. If the shell option nnooccaasseemmaattcchh is enabled, the match is
====. If the nnooccaasseemmaattcchh shell option is enabled, the match is
performed without regard to the case of alphabetic characters.
The return value is 0 if the string matches (====) or does not
match (!!==) the pattern, and 1 otherwise. Any part of the pat-
@@ -380,7 +380,7 @@ SSHHEELLLL GGRRAAMMMMAARR
sion and matched accordingly (as in _r_e_g_e_x(3)). The return value
is 0 if the string matches the pattern, and 1 otherwise. If the
regular expression is syntactically incorrect, the conditional
expression's return value is 2. If the shell option nnooccaasseemmaattcchh
expression's return value is 2. If the nnooccaasseemmaattcchh shell option
is enabled, the match is performed without regard to the case of
alphabetic characters. Any part of the pattern may be quoted to
force the quoted portion to be matched as a string. Bracket
@@ -458,7 +458,7 @@ SSHHEELLLL GGRRAAMMMMAARR
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-
If the nnooccaasseemmaattcchh shell option 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
@@ -1667,12 +1667,14 @@ EEXXPPAANNSSIIOONN
ning of the expanded value of _p_a_r_a_m_e_t_e_r. If _p_a_t_t_e_r_n begins with
%%, it must match at the end of the expanded value of _p_a_r_a_m_e_t_e_r.
If _s_t_r_i_n_g is null, matches of _p_a_t_t_e_r_n are deleted and the // fol-
lowing _p_a_t_t_e_r_n may be omitted. If _p_a_r_a_m_e_t_e_r is @@ or **, the sub-
stitution operation is applied to each positional parameter in
turn, and the expansion is the resultant list. If _p_a_r_a_m_e_t_e_r is
an array variable subscripted with @@ or **, the substitution
operation is applied to each member of the array in turn, and
the expansion is the resultant list.
lowing _p_a_t_t_e_r_n may be omitted. If the nnooccaasseemmaattcchh shell option
is enabled, the match is performed without regard to the case of
alphabetic characters. If _p_a_r_a_m_e_t_e_r is @@ or **, the substitution
operation is applied to each positional parameter in turn, and
the expansion is the resultant list. If _p_a_r_a_m_e_t_e_r is an array
variable subscripted with @@ or **, the substitution operation is
applied to each member of the array in turn, and the expansion
is the resultant list.
${_p_a_r_a_m_e_t_e_r^^_p_a_t_t_e_r_n}
${_p_a_r_a_m_e_t_e_r^^^^_p_a_t_t_e_r_n}
@@ -1805,13 +1807,15 @@ EEXXPPAANNSSIIOONN
The GGLLOOBBIIGGNNOORREE shell variable may be used to restrict the set of file-
names matching a _p_a_t_t_e_r_n. If GGLLOOBBIIGGNNOORREE is set, each matching filename
that also matches one of the patterns in GGLLOOBBIIGGNNOORREE is removed from the
list of matches. The filenames ````..'''' and ````....'''' are always ignored
when GGLLOOBBIIGGNNOORREE is set and not null. However, setting GGLLOOBBIIGGNNOORREE to a
non-null value has the effect of enabling the ddoottgglloobb shell option, so
all other filenames beginning with a ````..'''' will match. To get the old
behavior of ignoring filenames beginning with a ````..'''', make ````..**'''' one
of the patterns in GGLLOOBBIIGGNNOORREE. The ddoottgglloobb option is disabled when
GGLLOOBBIIGGNNOORREE is unset.
list of matches. If the nnooccaasseegglloobb option is set, the matching against
the patterns in GGLLOOBBIIGGNNOORREE is performed without regard to case. The
filenames ````..'''' and ````....'''' are always ignored when GGLLOOBBIIGGNNOORREE is set
and not null. However, setting GGLLOOBBIIGGNNOORREE to a non-null value has the
effect of enabling the ddoottgglloobb shell option, so all other filenames
beginning with a ````..'''' will match. To get the old behavior of ignor-
ing filenames beginning with a ````..'''', make ````..**'''' one of the patterns
in GGLLOOBBIIGGNNOORREE. The ddoottgglloobb option is disabled when GGLLOOBBIIGGNNOORREE is
unset.
PPaatttteerrnn MMaattcchhiinngg
@@ -3689,7 +3693,9 @@ RREEAADDLLIINNEE
with a backslash; the backslash is removed before attempting a match.
Any completion that matches the pattern will be removed from the list.
A leading !! negates the pattern; in this case any completion not match-
ing the pattern will be removed.
ing the pattern will be removed. If the nnooccaasseemmaattcchh shell option is
enabled, the match is performed without regard to the case of alpha-
betic characters.
Finally, any prefix and suffix specified with the --PP and --SS options are
added to each member of the completion list, and the result is returned
@@ -5379,10 +5385,11 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
nnooccaasseemmaattcchh
If set, bbaasshh matches patterns in a case-insensitive
fashion when performing matching while executing ccaassee or
[[[[ conditional commands.
[[[[ conditional commands, or when filtering possible com-
pletions as part of programmable completion.
nnuullllgglloobb
If set, bbaasshh allows patterns which match no files (see
PPaatthhnnaammee EExxppaannssiioonn above) to expand to a null string,
If set, bbaasshh allows patterns which match no files (see
PPaatthhnnaammee EExxppaannssiioonn above) to expand to a null string,
rather than themselves.
pprrooggccoommpp
If set, the programmable completion facilities (see PPrroo--
@@ -5390,50 +5397,50 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
enabled by default.
pprroommppttvvaarrss
If set, prompt strings undergo parameter expansion, com-
mand substitution, arithmetic expansion, and quote
removal after being expanded as described in PPRROOMMPPTTIINNGG
mand substitution, arithmetic expansion, and quote
removal after being expanded as described in PPRROOMMPPTTIINNGG
above. This option is enabled by default.
rreessttrriicctteedd__sshheellll
The shell sets this option if it is started in
The shell sets this option if it is started in
restricted mode (see RREESSTTRRIICCTTEEDD SSHHEELLLL below). The value
may not be changed. This is not reset when the startup
files are executed, allowing the startup files to dis-
may not be changed. This is not reset when the startup
files are executed, allowing the startup files to dis-
cover whether or not a shell is restricted.
sshhiifftt__vveerrbboossee
If set, the sshhiifftt builtin prints an error message when
If set, the sshhiifftt builtin prints an error message when
the shift count exceeds the number of positional parame-
ters.
ssoouurrcceeppaatthh
If set, the ssoouurrccee (..) builtin uses the value of PPAATTHH to
find the directory containing the file supplied as an
find the directory containing the file supplied as an
argument. This option is enabled by default.
xxppgg__eecchhoo
If set, the eecchhoo builtin expands backslash-escape
If set, the eecchhoo builtin expands backslash-escape
sequences by default.
ssuussppeenndd [--ff]
Suspend the execution of this shell until it receives a SSIIGGCCOONNTT
Suspend the execution of this shell until it receives a SSIIGGCCOONNTT
signal. A login shell cannot be suspended; the --ff option can be
used to override this and force the suspension. The return sta-
tus is 0 unless the shell is a login shell and --ff is not sup-
tus is 0 unless the shell is a login shell and --ff is not sup-
plied, or if job control is not enabled.
tteesstt _e_x_p_r
[[ _e_x_p_r ]]
Return a status of 0 (true) or 1 (false) depending on the evalu-
ation of the conditional expression _e_x_p_r. Each operator and op-
erand must be a separate argument. Expressions are composed of
the primaries described above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS.
tteesstt does not accept any options, nor does it accept and ignore
erand must be a separate argument. Expressions are composed of
the primaries described above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS.
tteesstt does not accept any options, nor does it accept and ignore
an argument of ---- as signifying the end of options.
Expressions may be combined using the following operators,
Expressions may be combined using the following operators,
listed in decreasing order of precedence. The evaluation
depends on the number of arguments; see below. Operator prece-
depends on the number of arguments; see below. Operator prece-
dence is used when there are five or more arguments.
!! _e_x_p_r True if _e_x_p_r is false.
(( _e_x_p_r ))
Returns the value of _e_x_p_r. This may be used to override
Returns the value of _e_x_p_r. This may be used to override
the normal precedence of operators.
_e_x_p_r_1 -aa _e_x_p_r_2
True if both _e_x_p_r_1 and _e_x_p_r_2 are true.
@@ -5450,120 +5457,120 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
null.
2 arguments
If the first argument is !!, the expression is true if and
only if the second argument is null. If the first argu-
ment is one of the unary conditional operators listed
above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is
only if the second argument is null. If the first argu-
ment is one of the unary conditional operators listed
above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is
true if the unary test is true. If the first argument is
not a valid unary conditional operator, the expression is
false.
3 arguments
The following conditions are applied in the order listed.
If the second argument is one of the binary conditional
If the second argument is one of the binary conditional
operators listed above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the
result of the expression is the result of the binary test
using the first and third arguments as operands. The --aa
and --oo operators are considered binary operators when
there are three arguments. If the first argument is !!,
the value is the negation of the two-argument test using
using the first and third arguments as operands. The --aa
and --oo operators are considered binary operators when
there are three arguments. If the first argument is !!,
the value is the negation of the two-argument test using
the second and third arguments. If the first argument is
exactly (( and the third argument is exactly )), the result
is the one-argument test of the second argument. Other-
is the one-argument test of the second argument. Other-
wise, the expression is false.
4 arguments
If the first argument is !!, the result is the negation of
the three-argument expression composed of the remaining
the three-argument expression composed of the remaining
arguments. Otherwise, the expression is parsed and eval-
uated according to precedence using the rules listed
uated according to precedence using the rules listed
above.
5 or more arguments
The expression is parsed and evaluated according to
The expression is parsed and evaluated according to
precedence using the rules listed above.
When used with tteesstt or [[, the << and >> operators sort lexico-
When used with tteesstt or [[, the << and >> operators sort lexico-
graphically using ASCII ordering.
ttiimmeess Print the accumulated user and system times for the shell and
ttiimmeess Print the accumulated user and system times for the shell and
for processes run from the shell. The return status is 0.
ttrraapp [--llpp] [[_a_r_g] _s_i_g_s_p_e_c ...]
The command _a_r_g is to be read and executed when the shell
receives signal(s) _s_i_g_s_p_e_c. If _a_r_g is absent (and there is a
single _s_i_g_s_p_e_c) or --, each specified signal is reset to its
original disposition (the value it had upon entrance to the
shell). If _a_r_g is the null string the signal specified by each
_s_i_g_s_p_e_c is ignored by the shell and by the commands it invokes.
If _a_r_g is not present and --pp has been supplied, then the trap
commands associated with each _s_i_g_s_p_e_c are displayed. If no
arguments are supplied or if only --pp is given, ttrraapp prints the
list of commands associated with each signal. The --ll option
causes the shell to print a list of signal names and their cor-
responding numbers. Each _s_i_g_s_p_e_c is either a signal name
defined in <_s_i_g_n_a_l_._h>, or a signal number. Signal names are
The command _a_r_g is to be read and executed when the shell
receives signal(s) _s_i_g_s_p_e_c. If _a_r_g is absent (and there is a
single _s_i_g_s_p_e_c) or --, each specified signal is reset to its
original disposition (the value it had upon entrance to the
shell). If _a_r_g is the null string the signal specified by each
_s_i_g_s_p_e_c is ignored by the shell and by the commands it invokes.
If _a_r_g is not present and --pp has been supplied, then the trap
commands associated with each _s_i_g_s_p_e_c are displayed. If no
arguments are supplied or if only --pp is given, ttrraapp prints the
list of commands associated with each signal. The --ll option
causes the shell to print a list of signal names and their cor-
responding numbers. Each _s_i_g_s_p_e_c is either a signal name
defined in <_s_i_g_n_a_l_._h>, or a signal number. Signal names are
case insensitive and the SSIIGG prefix is optional.
If a _s_i_g_s_p_e_c is EEXXIITT (0) the command _a_r_g is executed on exit
from the shell. If a _s_i_g_s_p_e_c is DDEEBBUUGG, the command _a_r_g is exe-
cuted before every _s_i_m_p_l_e _c_o_m_m_a_n_d, _f_o_r command, _c_a_s_e command,
_s_e_l_e_c_t command, every arithmetic _f_o_r command, and before the
first command executes in a shell function (see SSHHEELLLL GGRRAAMMMMAARR
above). Refer to the description of the eexxttddeebbuugg option to the
If a _s_i_g_s_p_e_c is EEXXIITT (0) the command _a_r_g is executed on exit
from the shell. If a _s_i_g_s_p_e_c is DDEEBBUUGG, the command _a_r_g is exe-
cuted before every _s_i_m_p_l_e _c_o_m_m_a_n_d, _f_o_r command, _c_a_s_e command,
_s_e_l_e_c_t command, every arithmetic _f_o_r command, and before the
first command executes in a shell function (see SSHHEELLLL GGRRAAMMMMAARR
above). Refer to the description of the eexxttddeebbuugg option to the
sshhoopptt builtin for details of its effect on the DDEEBBUUGG trap. If a
_s_i_g_s_p_e_c is RREETTUURRNN, the command _a_r_g is executed each time a shell
function or a script executed with the .. or ssoouurrccee builtins fin-
ishes executing.
If a _s_i_g_s_p_e_c is EERRRR, the command _a_r_g is executed whenever a a
If a _s_i_g_s_p_e_c is EERRRR, the command _a_r_g is executed whenever a a
pipeline (which may consist of a single simple command), a list,
or a compound command returns a non-zero exit status, subject to
the following conditions. The EERRRR trap is not executed if the
the following conditions. The EERRRR trap is not executed if the
failed command is part of the command list immediately following
a wwhhiillee or uunnttiill keyword, part of the test in an _i_f statement,
a wwhhiillee or uunnttiill keyword, part of the test in an _i_f statement,
part of a 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 using
!!. These are the same conditions obeyed by the eerrrreexxiitt (--ee)
following the final &&&& or ||||, any command in a pipeline but the
last, or if the command's return value is being inverted using
!!. These are the same conditions obeyed by the eerrrreexxiitt (--ee)
option.
Signals ignored upon entry to the shell cannot be trapped or
reset. Trapped signals that are not being ignored are reset to
Signals ignored upon entry to the shell cannot be trapped or
reset. Trapped signals that are not being ignored are reset to
their original values in a subshell or subshell environment when
one is created. The return status is false if any _s_i_g_s_p_e_c is
one is created. The return status is false if any _s_i_g_s_p_e_c is
invalid; otherwise ttrraapp returns true.
ttyyppee [--aaffttppPP] _n_a_m_e [_n_a_m_e ...]
With no options, indicate how each _n_a_m_e would be interpreted if
With no options, indicate how each _n_a_m_e would be interpreted if
used as a command name. If the --tt option is used, ttyyppee prints a
string which is one of _a_l_i_a_s, _k_e_y_w_o_r_d, _f_u_n_c_t_i_o_n, _b_u_i_l_t_i_n, or
_f_i_l_e if _n_a_m_e is an alias, shell reserved word, function,
builtin, or disk file, respectively. If the _n_a_m_e is not found,
then nothing is printed, and an exit status of false is
returned. If the --pp option is used, ttyyppee either returns the
string which is one of _a_l_i_a_s, _k_e_y_w_o_r_d, _f_u_n_c_t_i_o_n, _b_u_i_l_t_i_n, or
_f_i_l_e if _n_a_m_e is an alias, shell reserved word, function,
builtin, or disk file, respectively. If the _n_a_m_e is not found,
then nothing is printed, and an exit status of false is
returned. If the --pp option is used, ttyyppee either returns the
name of the disk file that would be executed if _n_a_m_e were speci-
fied as a command name, or nothing if ``type -t name'' would not
return _f_i_l_e. The --PP option forces a PPAATTHH search for each _n_a_m_e,
return _f_i_l_e. The --PP option forces a PPAATTHH search for each _n_a_m_e,
even if ``type -t name'' would not return _f_i_l_e. If a command is
hashed, --pp and --PP print the hashed value, which is not necessar-
ily the file that appears first in PPAATTHH. If the --aa option is
used, ttyyppee prints all of the places that contain an executable
ily the file that appears first in PPAATTHH. If the --aa option is
used, ttyyppee prints all of the places that contain an executable
named _n_a_m_e. This includes aliases and functions, if and only if
the --pp option is not also used. The table of hashed commands is
not consulted when using --aa. The --ff option suppresses shell
not consulted when using --aa. The --ff option suppresses shell
function lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true
if all of the arguments are found, false if any are not found.
uulliimmiitt [--HHSSaabbccddeeffiikkllmmnnppqqrrssttuuvvxxPPTT [_l_i_m_i_t]]
Provides control over the resources available to the shell and
to processes started by it, on systems that allow such control.
Provides control over the resources available to the shell and
to processes started by it, on systems that allow such control.
The --HH and --SS options specify that the hard or soft limit is set
for the given resource. A hard limit cannot be increased by a
non-root user once it is set; a soft limit may be increased up
to the value of the hard limit. If neither --HH nor --SS is speci-
for the given resource. A hard limit cannot be increased by a
non-root user once it is set; a soft limit may be increased up
to the value of the hard limit. If neither --HH nor --SS is speci-
fied, both the soft and hard limits are set. The value of _l_i_m_i_t
can be a number in the unit specified for the resource or one of
the special values hhaarrdd, ssoofftt, or uunnlliimmiitteedd, which stand for the
current hard limit, the current soft limit, and no limit,
respectively. If _l_i_m_i_t is omitted, the current value of the
soft limit of the resource is printed, unless the --HH option is
current hard limit, the current soft limit, and no limit,
respectively. If _l_i_m_i_t is omitted, the current value of the
soft limit of the resource is printed, unless the --HH option is
given. When more than one resource is specified, the limit name
and unit are printed before the value. Other options are inter-
preted as follows:
@@ -5572,12 +5579,12 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
--cc The maximum size of core files created
--dd The maximum size of a process's data segment
--ee The maximum scheduling priority ("nice")
--ff The maximum size of files written by the shell and its
--ff The maximum size of files written by the shell and its
children
--ii The maximum number of pending signals
--kk The maximum number of kqueues that may be allocated
--ll The maximum size that may be locked into memory
--mm The maximum resident set size (many systems do not honor
--mm The maximum resident set size (many systems do not honor
this limit)
--nn The maximum number of open file descriptors (most systems
do not allow this value to be set)
@@ -5586,52 +5593,52 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
--rr The maximum real-time scheduling priority
--ss The maximum stack size
--tt The maximum amount of cpu time in seconds
--uu The maximum number of processes available to a single
--uu The maximum number of processes available to a single
user
--vv The maximum amount of virtual memory available to the
--vv The maximum amount of virtual memory available to the
shell and, on some systems, to its children
--xx The maximum number of file locks
--PP The maximum number of pseudoterminals
--TT The maximum number of threads
If _l_i_m_i_t is given, and the --aa option is not used, _l_i_m_i_t is the
new value of the specified resource. If no option is given,
then --ff is assumed. Values are in 1024-byte increments, except
for --tt, which is in seconds; --pp, which is in units of 512-byte
blocks; and --PP, --TT, --bb, --kk, --nn, and --uu, which are unscaled val-
ues. The return status is 0 unless an invalid option or argu-
If _l_i_m_i_t is given, and the --aa option is not used, _l_i_m_i_t is the
new value of the specified resource. If no option is given,
then --ff is assumed. Values are in 1024-byte increments, except
for --tt, which is in seconds; --pp, which is in units of 512-byte
blocks; and --PP, --TT, --bb, --kk, --nn, and --uu, which are unscaled val-
ues. The return status is 0 unless an invalid option or argu-
ment is supplied, or an error occurs while setting a new limit.
uummaasskk [--pp] [--SS] [_m_o_d_e]
The user file-creation mask is set to _m_o_d_e. If _m_o_d_e begins with
a digit, it is interpreted as an octal number; otherwise it is
interpreted as a symbolic mode mask similar to that accepted by
_c_h_m_o_d(1). If _m_o_d_e is omitted, the current value of the mask is
printed. The --SS option causes the mask to be printed in sym-
bolic form; the default output is an octal number. If the --pp
a digit, it is interpreted as an octal number; otherwise it is
interpreted as a symbolic mode mask similar to that accepted by
_c_h_m_o_d(1). If _m_o_d_e is omitted, the current value of the mask is
printed. The --SS option causes the mask to be printed in sym-
bolic form; the default output is an octal number. If the --pp
option is supplied, and _m_o_d_e is omitted, the output is in a form
that may be reused as input. The return status is 0 if the mode
was successfully changed or if no _m_o_d_e argument was supplied,
was successfully changed or if no _m_o_d_e argument was supplied,
and false otherwise.
uunnaalliiaass [-aa] [_n_a_m_e ...]
Remove each _n_a_m_e from the list of defined aliases. If --aa is
supplied, all alias definitions are removed. The return value
Remove each _n_a_m_e from the list of defined aliases. If --aa is
supplied, all alias definitions are removed. The return value
is true unless a supplied _n_a_m_e is not a defined alias.
uunnsseett [-ffvv] [-nn] [_n_a_m_e ...]
For each _n_a_m_e, remove the corresponding variable or function.
For each _n_a_m_e, remove the corresponding variable or function.
If the --vv option is given, each _n_a_m_e refers to a shell variable,
and that variable is removed. Read-only variables may not be
unset. If --ff is specified, each _n_a_m_e refers to a shell func-
tion, and the function definition is removed. If the --nn option
is supplied, and _n_a_m_e is a variable with the _n_a_m_e_r_e_f attribute,
_n_a_m_e will be unset rather than the variable it references. --nn
has no effect if the --ff option is supplied. If no options are
supplied, each _n_a_m_e refers to a variable; if there is no vari-
able by that name, any function with that name is unset. Each
unset variable or function is removed from the environment
passed to subsequent commands. If any of CCOOMMPP__WWOORRDDBBRREEAAKKSS, RRAANN--
and that variable is removed. Read-only variables may not be
unset. If --ff is specified, each _n_a_m_e refers to a shell func-
tion, and the function definition is removed. If the --nn option
is supplied, and _n_a_m_e is a variable with the _n_a_m_e_r_e_f attribute,
_n_a_m_e will be unset rather than the variable it references. --nn
has no effect if the --ff option is supplied. If no options are
supplied, each _n_a_m_e refers to a variable; if there is no vari-
able by that name, any function with that name is unset. Each
unset variable or function is removed from the environment
passed to subsequent commands. If any of CCOOMMPP__WWOORRDDBBRREEAAKKSS, RRAANN--
DDOOMM, SSEECCOONNDDSS, LLIINNEENNOO, HHIISSTTCCMMDD, FFUUNNCCNNAAMMEE, GGRROOUUPPSS, or DDIIRRSSTTAACCKK are
unset, they lose their special properties, even if they are sub-
sequently reset. The exit status is true unless a _n_a_m_e is read-
@@ -5640,19 +5647,19 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
wwaaiitt [--nn] [_n _._._.]
Wait for each specified child process and return its termination
status. Each _n may be a process ID or a job specification; if a
job spec is given, all processes in that job's pipeline are
waited for. If _n is not given, all currently active child pro-
job spec is given, all processes in that job's pipeline are
waited for. If _n is not given, all currently active child pro-
cesses are waited for, and the return status is zero. If the --nn
option is supplied, wwaaiitt waits for any job to terminate and
returns its exit status. If _n specifies a non-existent process
or job, the return status is 127. Otherwise, the return status
option is supplied, wwaaiitt waits for any job to terminate and
returns its exit status. If _n specifies a non-existent process
or job, the return status is 127. Otherwise, the return status
is the exit status of the last process or job waited for.
RREESSTTRRIICCTTEEDD SSHHEELLLL
If bbaasshh is started with the name rrbbaasshh, or the --rr option is supplied at
invocation, the shell becomes restricted. A restricted shell is used
to set up an environment more controlled than the standard shell. It
behaves identically to bbaasshh with the exception that the following are
invocation, the shell becomes restricted. A restricted shell is used
to set up an environment more controlled than the standard shell. It
behaves identically to bbaasshh with the exception that the following are
disallowed or not performed:
+o changing directories with ccdd
@@ -5661,16 +5668,16 @@ RREESSTTRRIICCTTEEDD SSHHEELLLL
+o specifying command names containing //
+o specifying a filename containing a // as an argument to the ..
+o specifying a filename containing a // as an argument to the ..
builtin command
+o specifying a filename containing a slash as an argument to the
+o specifying a filename containing a slash as an argument to the
--pp option to the hhaasshh builtin command
+o importing function definitions from the shell environment at
+o importing function definitions from the shell environment at
startup
+o parsing the value of SSHHEELLLLOOPPTTSS from the shell environment at
+o parsing the value of SSHHEELLLLOOPPTTSS from the shell environment at
startup
+o redirecting output using the >, >|, <>, >&, &>, and >> redirect-
@@ -5679,10 +5686,10 @@ RREESSTTRRIICCTTEEDD SSHHEELLLL
+o using the eexxeecc builtin command to replace the shell with another
command
+o adding or deleting builtin commands with the --ff and --dd options
+o adding or deleting builtin commands with the --ff and --dd options
to the eennaabbllee builtin command
+o using the eennaabbllee builtin command to enable disabled shell
+o using the eennaabbllee builtin command to enable disabled shell
builtins
+o specifying the --pp option to the ccoommmmaanndd builtin command
@@ -5692,14 +5699,14 @@ RREESSTTRRIICCTTEEDD SSHHEELLLL
These restrictions are enforced after any startup files are read.
When a command that is found to be a shell script is executed (see CCOOMM--
MMAANNDD EEXXEECCUUTTIIOONN above), rrbbaasshh turns off any restrictions in the shell
MMAANNDD EEXXEECCUUTTIIOONN above), rrbbaasshh turns off any restrictions in the shell
spawned to execute the script.
SSEEEE AALLSSOO
_B_a_s_h _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, Brian Fox and Chet Ramey
_T_h_e _G_n_u _R_e_a_d_l_i_n_e _L_i_b_r_a_r_y, Brian Fox and Chet Ramey
_T_h_e _G_n_u _H_i_s_t_o_r_y _L_i_b_r_a_r_y, Brian Fox and Chet Ramey
_P_o_r_t_a_b_l_e _O_p_e_r_a_t_i_n_g _S_y_s_t_e_m _I_n_t_e_r_f_a_c_e _(_P_O_S_I_X_) _P_a_r_t _2_: _S_h_e_l_l _a_n_d _U_t_i_l_i_-
_P_o_r_t_a_b_l_e _O_p_e_r_a_t_i_n_g _S_y_s_t_e_m _I_n_t_e_r_f_a_c_e _(_P_O_S_I_X_) _P_a_r_t _2_: _S_h_e_l_l _a_n_d _U_t_i_l_i_-
_t_i_e_s, IEEE --
http://pubs.opengroup.org/onlinepubs/9699919799/
http://tiswww.case.edu/~chet/bash/POSIX -- a description of posix mode
@@ -5717,7 +5724,7 @@ FFIILLEESS
_~_/_._b_a_s_h_r_c
The individual per-interactive-shell startup file
_~_/_._b_a_s_h___l_o_g_o_u_t
The individual login shell cleanup file, executed when a login
The individual login shell cleanup file, executed when a login
shell exits
_~_/_._i_n_p_u_t_r_c
Individual _r_e_a_d_l_i_n_e initialization file
@@ -5731,14 +5738,14 @@ AAUUTTHHOORRSS
BBUUGG RREEPPOORRTTSS
If you find a bug in bbaasshh,, you should report it. But first, you should
make sure that it really is a bug, and that it appears in the latest
version of bbaasshh. The latest version is always available from
make sure that it really is a bug, and that it appears in the latest
version of bbaasshh. The latest version is always available from
_f_t_p_:_/_/_f_t_p_._g_n_u_._o_r_g_/_p_u_b_/_g_n_u_/_b_a_s_h_/.
Once you have determined that a bug actually exists, use the _b_a_s_h_b_u_g
command to submit a bug report. If you have a fix, you are encouraged
to mail that as well! Suggestions and `philosophical' bug reports may
be mailed to _b_u_g_-_b_a_s_h_@_g_n_u_._o_r_g or posted to the Usenet newsgroup
Once you have determined that a bug actually exists, use the _b_a_s_h_b_u_g
command to submit a bug report. If you have a fix, you are encouraged
to mail that as well! Suggestions and `philosophical' bug reports may
be mailed to _b_u_g_-_b_a_s_h_@_g_n_u_._o_r_g or posted to the Usenet newsgroup
ggnnuu..bbaasshh..bbuugg.
ALL bug reports should include:
@@ -5749,7 +5756,7 @@ BBUUGG RREEPPOORRTTSS
A description of the bug behaviour
A short script or `recipe' which exercises the bug
_b_a_s_h_b_u_g inserts the first three items automatically into the template
_b_a_s_h_b_u_g inserts the first three items automatically into the template
it provides for filing a bug report.
Comments and bug reports concerning this manual page should be directed
@@ -5766,10 +5773,10 @@ BBUUGGSS
Shell builtin commands and functions are not stoppable/restartable.
Compound commands and command sequences of the form `a ; b ; c' are not
handled gracefully when process suspension is attempted. When a
process is stopped, the shell immediately executes the next command in
the sequence. It suffices to place the sequence of commands between
parentheses to force it into a subshell, which may be stopped as a
handled gracefully when process suspension is attempted. When a
process is stopped, the shell immediately executes the next command in
the sequence. It suffices to place the sequence of commands between
parentheses to force it into a subshell, which may be stopped as a
unit.
Array variables may not (yet) be exported.
@@ -5778,4 +5785,4 @@ BBUUGGSS
GNU Bash 4.3 2014 November 19 BASH(1)
GNU Bash 4.3 2014 November 21 BASH(1)
+60 -4
View File
@@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
.\" Last Change: Fri Nov 21 08:07:56 EST 2014
.\" Last Change: Fri Nov 28 18:21:13 EST 2014
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2014 November 21" "GNU Bash 4.3"
.TH BASH 1 "2014 November 28" "GNU Bash 4.3"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -2542,8 +2542,6 @@ of the special parameters \fB*\fP and \fB@\fP (see
above). ${#\fIname\fP[\fIsubscript\fP]} expands to the length of
${\fIname\fP[\fIsubscript\fP]}. If \fIsubscript\fP is \fB*\fP or
\fB@\fP, the expansion is the number of elements in the array.
Referencing an array variable without a subscript is equivalent to
referencing the array with a subscript of 0.
If the
.I subscript
used to reference an element of an indexed array
@@ -2552,6 +2550,12 @@ 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.
.PP
Referencing an array variable without a subscript is equivalent to
referencing the array with a subscript of 0.
Any reference to a variable using a valid subscript is legal, and
.B bash
will create an array if necessary.
.PP
An array variable is considered set if a subscript has been assigned a
value. The null string is a valid value.
.PP
@@ -3118,6 +3122,57 @@ or
.BR * ,
the case modification operation is applied to each member of the
array in turn, and the expansion is the resultant list.
.TP
${\fIparameter\fP\fB@\fP\fIoperator\fP}
\fBParameter transformation\fP.
The expansion is either a transformation of the value of \fIparameter\fP
or information about \fIparameter\fP itself, depending on the value of
\fIoperator\fP. Each \fIoperator\fP is a single letter:
.sp 1
.RS
.PD 0
.TP
.B Q
The expansion is a string that is the value of \fIparameter\fP quoted in a
format that can be reused as input.
.TP
.B E
The expansion is a string that is the value of \fIparameter\fP with backslash
escape sequences expanded as with the \fB$'...'\fP quoting mechansim.
.TP
.B P
The expansion is a string that is the result of expanding the value of
\fIparameter\fP as if it were a prompt string (see \fBPROMPTING\fP below).
.TP
.B A
The expansion is a string in the form of a \fBdeclare\fP command that, if
evaluated, will recreate \fIparameter\fP with its attributes and value.
.TP
.B a
The expansion is a string consisting of flag values representing
\fIparameter\fP's attributes.
.PD
.PP
If
.I parameter
is
.B @
or
.BR * ,
the operation is applied to each positional
parameter in turn, and the expansion is the resultant list.
If
.I parameter
is an array variable subscripted with
.B @
or
.BR * ,
the case modification operation is applied to each member of the
array in turn, and the expansion is the resultant list.
.sp 1
The result of the expansion is subject to word splitting and pathname
expansion as described below.
.RE
.SS Command Substitution
.PP
\fICommand substitution\fP allows the output of a command to replace
@@ -9610,6 +9665,7 @@ If set,
.B bash
matches patterns in a case\-insensitive fashion when performing matching
while executing \fBcase\fP or \fB[[\fP conditional commands,
when performing pattern substitution word expansions,
or when filtering possible completions as part of programmable completion.
.TP 8
.B nullglob
+10471
View File
File diff suppressed because it is too large Load Diff
+40 -2
View File
@@ -2186,6 +2186,40 @@ If @var{parameter}
is an array variable subscripted with @samp{@@} or @samp{*},
the case modification operation is applied to each member of the
array in turn, and the expansion is the resultant list.
@item $@{@var{parameter}@@@var{operator}@}
The expansion is either a transformation of the value of @var{parameter}
or information about @var{parameter} itself, depending on the value of
@var{operator}. Each @var{operator} is a single letter:
@table @code
@item Q
The expansion is a string that is the value of @var{parameter} quoted in a
format that can be reused as input.
@item E
The expansion is a string that is the value of @var{parameter} with backslash
escape sequences expanded as with the @code{$'@dots{}'} quoting mechansim.
@item P
The expansion is a string that is the result of expanding the value of
@var{parameter} as if it were a prompt string (@pxref{Controlling the Prompt}).
@item A
The expansion is a string in the form of a @code{declare} command that, if
evaluated, will recreate @var{parameter} with its attributes and value.
@item a
The expansion is a string consisting of flag values representing
@var{parameter}'s attributes.
@end table
If @var{parameter} is @samp{@@} or @samp{*},
the operation is applied to each positional
parameter in turn, and the expansion is the resultant list.
If @var{parameter}
is an array variable subscripted with @samp{@@} or @samp{*},
the operation is applied to each member of the
array in turn, and the expansion is the resultant list.
The result of the expansion is subject to word splitting and pathname
expansion as described below.
@end table
@node Command Substitution
@@ -5185,6 +5219,7 @@ performing filename expansion.
If set, Bash matches patterns in a case-insensitive fashion when
performing matching while executing @code{case} or @code{[[}
conditional commands,
when performing pattern substitution word expansions,
or when filtering possible completions as part of programmable completion.
@item nullglob
@@ -6864,8 +6899,6 @@ expansion of the special parameters @samp{@@} and @samp{*}.
@code{$@{@var{name}[@var{subscript}]@}}.
If @var{subscript} is @samp{@@} or
@samp{*}, the expansion is the number of elements in the array.
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
@@ -6873,6 +6906,11 @@ 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.
Referencing an array variable without a subscript is equivalent to
referencing with a subscript of 0.
Any reference to a variable using a valid subscript is legal, and
@code{bash} will create an array if necessary.
An array variable is considered set if a subscript has been assigned a
value. The null string is a valid value.
+8824
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -2,10 +2,10 @@
Copyright (C) 1988-2014 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Fri Nov 21 08:07:43 EST 2014
@set LASTCHANGE Fri Nov 28 18:36:44 EST 2014
@set EDITION 4.3
@set VERSION 4.3
@set UPDATED 21 November 2014
@set UPDATED 28 November 2014
@set UPDATED-MONTH November 2014
+11
View File
@@ -0,0 +1,11 @@
@ignore
Copyright (C) 1988-2014 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Fri Nov 21 08:07:43 EST 2014
@set EDITION 4.3
@set VERSION 4.3
@set UPDATED 21 November 2014
@set UPDATED-MONTH November 2014