commit bash-20090226 snapshot

This commit is contained in:
Chet Ramey
2011-12-08 20:05:53 -05:00
parent 76af2125b7
commit 6932f7f549
56 changed files with 17670 additions and 7478 deletions
+250 -240
View File
@@ -738,8 +738,8 @@ PPAARRAAMMEETTEERRSS
$${{BBAASSHH__LLIINNEENNOO[[_$_i]]}} is the line number in the source file where
$${{FFUUNNCCNNAAMMEE[[_$_i]]}} was called (or $${{BBAASSHH__LLIINNEENNOO[[_$_i_-_1]]}} if refer-
enced within another shell function). The corresponding source
file name is $${{BBAASSHH__SSOOUURRCCEE[[_$_i]]}}.. UUssee LLIINNEENNOO ttoo oobbttaaiinn tthhee ccuurr--
rreenntt lliinnee nnuummbbeerr..
file name is $${{BBAASSHH__SSOOUURRCCEE[[_$_i]]}}. Use LLIINNEENNOO to obtain the cur-
rent line number.
BBAASSHH__RREEMMAATTCCHH
An array variable whose members are assigned by the ==~~ binary
operator to the [[[[ conditional command. The element with index
@@ -805,18 +805,18 @@ PPAARRAAMMEETTEERRSS
below).
CCOOMMPP__WWOORRDDBBRREEAAKKSS
The set of characters that the Readline library treats as word
The set of characters that the rreeaaddlliinnee library treats as word
separators when performing word completion. If CCOOMMPP__WWOORRDDBBRREEAAKKSS
is unset, it loses its special properties, even if it is subse-
quently reset.
CCOOMMPP__WWOORRDDSS
An array variable (see AArrrraayyss below) consisting of the individ-
ual words in the current command line. The words are split on
shell metacharacters as the shell parser would separate them.
This variable is available only in shell functions invoked by
the programmable completion facilities (see PPrrooggrraammmmaabbllee CCoommppllee--
ttiioonn below).
ual words in the current command line. The line is split into
words as rreeaaddlliinnee would split it, using CCOOMMPP__WWOORRDDBBRREEAAKKSS as
described above. This variable is available only in shell func-
tions invoked by the programmable completion facilities (see
PPrrooggrraammmmaabbllee CCoommpplleettiioonn below).
DDIIRRSSTTAACCKK
An array variable (see AArrrraayyss below) containing the current con-
@@ -1743,8 +1743,8 @@ RREEDDIIRREECCTTIIOONN
ls 2>>&&1 >> dirlist
directs only the standard output to file _d_i_r_l_i_s_t, because the standard
error was duplicated as standard output before the standard output was
redirected to _d_i_r_l_i_s_t.
error was duplicated from the standard output before the standard out-
put was redirected to _d_i_r_l_i_s_t.
BBaasshh handles several filenames specially when they are used in redirec-
tions, as described in the following table:
@@ -3574,8 +3574,12 @@ HHIISSTTOORRYY EEXXPPAANNSSIIOONN
SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
Unless otherwise noted, each builtin command documented in this section
as accepting options preceded by -- accepts ---- to signify the end of the
options. For example, the ::, ttrruuee, ffaallssee, and tteesstt builtins do not
accept options.
options. The ::, ttrruuee, ffaallssee, and tteesstt builtins do not accept options
and do not treat ---- specially. The eexxiitt, llooggoouutt, bbrreeaakk, ccoonnttiinnuuee, lleett,
and sshhiifftt builtins accept and process arguments beginning with -- with-
out requiring ----. Other builtins that accept arguments but are not
specified as accepting options interpret arguments beginning with -- as
invalid options and require ---- to prevent this interpretation.
:: [_a_r_g_u_m_e_n_t_s]
No effect; the command does nothing beyond expanding _a_r_g_u_m_e_n_t_s
and performing any specified redirections. A zero exit code is
@@ -4185,7 +4189,7 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
_p_a_t_t_e_r_n; otherwise help for all the builtins and shell control
structures is printed.
--dd Display a short description of each _p_a_t_t_e_r_n
--mm Display the description of each _p_a_t_t_e_r_n in a manpage-like
--mm Display the description of each _p_a_t_t_e_r_n in a manpage-like
format
--ss Display only a short usage synopsis for each _p_a_t_t_e_r_n
The return status is 0 unless no command matches _p_a_t_t_e_r_n.
@@ -4406,7 +4410,7 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
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] [-- _t_e_x_t] [--nn _n_c_h_a_r_s] [--pp _p_r_o_m_p_t] [--tt
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] [--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
@@ -4511,32 +4515,37 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
--bb Report the status of terminated background jobs immedi-
ately, rather than before the next primary prompt. This
is effective only when job control is enabled.
--ee Exit immediately if a _s_i_m_p_l_e _c_o_m_m_a_n_d (see SSHHEELLLL GGRRAAMMMMAARR
--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 _s_u_b_s_h_e_l_l command enclosed in
parentheses, or one of the commands executed as part of
a command list enclosed by braces (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 in an iiff statement, part of a command
executed in a &&&& or |||| list, any command in a pipeline
but the last, or if the command's return value is being
inverted via !!. Failing simple commands that are part
of shell functions or command lists enclosed in braces
or parentheses satisfying the above conditions do not
cause the shell to exit. A trap on EERRRR, if set, is exe-
cuted before the shell exits.
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 !!. 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
all the commands in the subshell.
--ff Disable pathname expansion.
--hh Remember the location of commands as they are looked up
--hh Remember the location of commands as they are looked up
for execution. This is enabled by default.
--kk All arguments in the form of assignment statements are
placed in the environment for a command, not just those
--kk All arguments in the form of assignment statements are
placed in the environment for a command, not just those
that precede the command name.
--mm Monitor mode. Job control is enabled. This option is
on by default for interactive shells on systems that
support it (see JJOOBB CCOONNTTRROOLL above). Background pro-
cesses run in a separate process group and a line con-
taining their exit status is printed upon their comple-
--mm Monitor mode. Job control is enabled. This option is
on by default for interactive shells on systems that
support it (see JJOOBB CCOONNTTRROOLL above). Background pro-
cesses run in a separate process group and a line con-
taining their exit status is printed upon their comple-
tion.
--nn Read commands but do not execute them. This may be used
to check a shell script for syntax errors. This is
to check a shell script for syntax errors. This is
ignored by interactive shells.
--oo _o_p_t_i_o_n_-_n_a_m_e
The _o_p_t_i_o_n_-_n_a_m_e can be one of the following:
@@ -4544,10 +4553,10 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
Same as --aa.
bbrraacceeeexxppaanndd
Same as --BB.
eemmaaccss Use an emacs-style command line editing inter-
eemmaaccss Use an emacs-style command line editing inter-
face. This is enabled by default when the shell
is interactive, unless the shell is started with
the ----nnooeeddiittiinngg option. This also affects the
the ----nnooeeddiittiinngg option. This also affects the
editing interface used for rreeaadd --ee.
eerrrrttrraaccee
Same as --EE.
@@ -4561,8 +4570,8 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
HHIISSTTOORRYY. This option is on by default in inter-
active shells.
iiggnnoorreeeeooff
The effect is as if the shell command
``IGNOREEOF=10'' had been executed (see SShheellll
The effect is as if the shell command
``IGNOREEOF=10'' had been executed (see SShheellll
VVaarriiaabblleess above).
kkeeyywwoorrdd Same as --kk.
mmoonniittoorr Same as --mm.
@@ -4577,213 +4586,213 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
pphhyyssiiccaall
Same as --PP.
ppiippeeffaaiill
If set, the return value of a pipeline is the
value of the last (rightmost) command to exit
with a non-zero status, or zero if all commands
in the pipeline exit successfully. This option
If set, the return value of a pipeline is the
value of the last (rightmost) command to exit
with a non-zero status, or zero if all commands
in the pipeline exit successfully. This option
is disabled by default.
ppoossiixx Change the behavior of bbaasshh where the default
operation differs from the POSIX standard to
ppoossiixx Change the behavior of bbaasshh where the default
operation differs from the POSIX standard to
match the standard (_p_o_s_i_x _m_o_d_e).
pprriivviilleeggeedd
Same as --pp.
vveerrbboossee Same as --vv.
vvii Use a vi-style command line editing interface.
vvii Use a vi-style command line editing interface.
This also affects the editing interface used for
rreeaadd --ee.
xxttrraaccee Same as --xx.
If --oo is supplied with no _o_p_t_i_o_n_-_n_a_m_e, the values of the
current options are printed. If ++oo is supplied with no
_o_p_t_i_o_n_-_n_a_m_e, a series of sseett commands to recreate the
current option settings is displayed on the standard
current options are printed. If ++oo is supplied with no
_o_p_t_i_o_n_-_n_a_m_e, a series of sseett commands to recreate the
current option settings is displayed on the standard
output.
--pp Turn on _p_r_i_v_i_l_e_g_e_d mode. In this mode, the $$EENNVV and
$$BBAASSHH__EENNVV files are not processed, shell functions are
not inherited from the environment, and the SSHHEELLLLOOPPTTSS,
CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if they appear in the
environment, are ignored. If the shell is started with
--pp Turn on _p_r_i_v_i_l_e_g_e_d mode. In this mode, the $$EENNVV and
$$BBAASSHH__EENNVV files are not processed, shell functions are
not inherited from the environment, and the SSHHEELLLLOOPPTTSS,
CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if they appear in the
environment, are ignored. If the shell is started with
the effective user (group) id not equal to the real user
(group) id, and the --pp option is not supplied, these
actions are taken and the effective user id is set to
the real user id. If the --pp option is supplied at
startup, the effective user id is not reset. Turning
this option off causes the effective user and group ids
(group) id, and the --pp option is not supplied, these
actions are taken and the effective user id is set to
the real user id. If the --pp option is supplied at
startup, the effective user id is not reset. Turning
this option off causes the effective user and group ids
to be set to the real user and group ids.
--tt Exit after reading and executing one command.
--uu Treat unset variables as an error when performing param-
eter expansion. If expansion is attempted on an unset
eter expansion. If expansion is attempted on an unset
variable, the shell prints an error message, and, if not
interactive, exits with a non-zero status.
--vv Print shell input lines as they are read.
--xx After expanding each _s_i_m_p_l_e _c_o_m_m_a_n_d, ffoorr command, ccaassee
--xx After expanding each _s_i_m_p_l_e _c_o_m_m_a_n_d, ffoorr command, ccaassee
command, sseelleecctt command, or arithmetic ffoorr command, dis-
play the expanded value of PPSS44, followed by the command
play the expanded value of PPSS44, followed by the command
and its expanded arguments or associated word list.
--BB The shell performs brace expansion (see BBrraaccee EExxppaannssiioonn
--BB The shell performs brace expansion (see BBrraaccee EExxppaannssiioonn
above). This is on by default.
--CC If set, bbaasshh does not overwrite an existing file with
the >>, >>&&, and <<>> redirection operators. This may be
--CC If set, bbaasshh does not overwrite an existing file with
the >>, >>&&, and <<>> redirection operators. This may be
overridden when creating output files by using the redi-
rection operator >>|| instead of >>.
--EE If set, any trap on EERRRR is inherited by shell functions,
command substitutions, and commands executed in a sub-
shell environment. The EERRRR trap is normally not inher-
command substitutions, and commands executed in a sub-
shell environment. The EERRRR trap is normally not inher-
ited in such cases.
--HH Enable !! style history substitution. This option is on
by default when the shell is interactive.
--PP If set, the shell does not follow symbolic links when
executing commands such as ccdd that change the current
--PP If set, the shell does not follow symbolic links when
executing commands such as ccdd that change the current
working directory. It uses the physical directory
structure instead. By default, bbaasshh follows the logical
chain of directories when performing commands which
chain of directories when performing commands which
change the current directory.
--TT If set, any traps on DDEEBBUUGG and RREETTUURRNN are inherited by
shell functions, command substitutions, and commands
executed in a subshell environment. The DDEEBBUUGG and
--TT If set, any traps on DDEEBBUUGG and RREETTUURRNN are inherited by
shell functions, command substitutions, and commands
executed in a subshell environment. The DDEEBBUUGG and
RREETTUURRNN traps are normally not inherited in such cases.
---- If no arguments follow this option, then the positional
---- If no arguments follow this option, then the positional
parameters are unset. Otherwise, the positional parame-
ters are set to the _a_r_gs, even if some of them begin
ters are set to the _a_r_gs, even if some of them begin
with a --.
-- Signal the end of options, cause all remaining _a_r_gs to
-- Signal the end of options, cause all remaining _a_r_gs to
be assigned to the positional parameters. The --xx and --vv
options are turned off. If there are no _a_r_gs, the posi-
tional parameters remain unchanged.
The options are off by default unless otherwise noted. Using +
rather than - causes these options to be turned off. The
options can also be specified as arguments to an invocation of
the shell. The current set of options may be found in $$--. The
The options are off by default unless otherwise noted. Using +
rather than - causes these options to be turned off. The
options can also be specified as arguments to an invocation of
the shell. The current set of options may be found in $$--. The
return status is always true unless an invalid option is encoun-
tered.
sshhiifftt [_n]
The positional parameters from _n+1 ... are renamed to $$11 ........
Parameters represented by the numbers $$## down to $$##-_n+1 are
unset. _n must be a non-negative number less than or equal to
$$##. If _n is 0, no parameters are changed. If _n is not given,
it is assumed to be 1. If _n is greater than $$##, the positional
parameters are not changed. The return status is greater than
The positional parameters from _n+1 ... are renamed to $$11 ........
Parameters represented by the numbers $$## down to $$##-_n+1 are
unset. _n must be a non-negative number less than or equal to
$$##. If _n is 0, no parameters are changed. If _n is not given,
it is assumed to be 1. If _n is greater than $$##, the positional
parameters are not changed. The return status is greater than
zero if _n is greater than $$## or less than zero; otherwise 0.
sshhoopptt [--ppqqssuu] [--oo] [_o_p_t_n_a_m_e ...]
Toggle the values of variables controlling optional shell behav-
ior. With no options, or with the --pp option, a list of all set-
table options is displayed, with an indication of whether or not
each is set. The --pp option causes output to be displayed in a
form that may be reused as input. Other options have the fol-
each is set. The --pp option causes output to be displayed in a
form that may be reused as input. Other options have the fol-
lowing meanings:
--ss Enable (set) each _o_p_t_n_a_m_e.
--uu Disable (unset) each _o_p_t_n_a_m_e.
--qq Suppresses normal output (quiet mode); the return status
--qq Suppresses normal output (quiet mode); the return status
indicates whether the _o_p_t_n_a_m_e is set or unset. If multi-
ple _o_p_t_n_a_m_e arguments are given with --qq, the return sta-
tus is zero if all _o_p_t_n_a_m_e_s are enabled; non-zero other-
ple _o_p_t_n_a_m_e arguments are given with --qq, the return sta-
tus is zero if all _o_p_t_n_a_m_e_s are enabled; non-zero other-
wise.
--oo Restricts the values of _o_p_t_n_a_m_e to be those defined for
--oo Restricts the values of _o_p_t_n_a_m_e to be those defined for
the --oo option to the sseett builtin.
If either --ss or --uu is used with no _o_p_t_n_a_m_e arguments, the dis-
If either --ss or --uu is used with no _o_p_t_n_a_m_e arguments, the dis-
play is limited to those options which are set or unset, respec-
tively. Unless otherwise noted, the sshhoopptt options are disabled
tively. Unless otherwise noted, the sshhoopptt options are disabled
(unset) by default.
The return status when listing options is zero if all _o_p_t_n_a_m_e_s
are enabled, non-zero otherwise. When setting or unsetting
options, the return status is zero unless an _o_p_t_n_a_m_e is not a
The return status when listing options is zero if all _o_p_t_n_a_m_e_s
are enabled, non-zero otherwise. When setting or unsetting
options, the return status is zero unless an _o_p_t_n_a_m_e is not a
valid shell option.
The list of sshhoopptt options is:
aauuttooccdd If set, a command name that is the name of a directory
is executed as if it were the argument to the ccdd com-
aauuttooccdd If set, a command name that is the name of a directory
is executed as if it were the argument to the ccdd com-
mand. This option is only used by interactive shells.
ccddaabbllee__vvaarrss
If set, an argument to the ccdd builtin command that is
not a directory is assumed to be the name of a variable
If set, an argument to the ccdd builtin command that is
not a directory is assumed to be the name of a variable
whose value is the directory to change to.
ccddssppeellll If set, minor errors in the spelling of a directory com-
ponent in a ccdd command will be corrected. The errors
ponent in a ccdd command will be corrected. The errors
checked for are transposed characters, a missing charac-
ter, and one character too many. If a correction is
found, the corrected file name is printed, and the com-
mand proceeds. This option is only used by interactive
ter, and one character too many. If a correction is
found, the corrected file name is printed, and the com-
mand proceeds. This option is only used by interactive
shells.
cchheecckkhhaasshh
If set, bbaasshh checks that a command found in the hash ta-
ble exists before trying to execute it. If a hashed
command no longer exists, a normal path search is per-
ble exists before trying to execute it. If a hashed
command no longer exists, a normal path search is per-
formed.
cchheecckkjjoobbss
If set, bbaasshh lists the status of any stopped and running
jobs before exiting an interactive shell. If any jobs
jobs before exiting an interactive shell. If any jobs
are running, this causes the exit to be deferred until a
second exit is attempted without an intervening command
(see JJOOBB CCOONNTTRROOLL above). The shell always postpones
second exit is attempted without an intervening command
(see JJOOBB CCOONNTTRROOLL above). The shell always postpones
exiting if any jobs are stopped.
cchheecckkwwiinnssiizzee
If set, bbaasshh checks the window size after each command
and, if necessary, updates the values of LLIINNEESS and CCOOLL--
If set, bbaasshh checks the window size after each command
and, if necessary, updates the values of LLIINNEESS and CCOOLL--
UUMMNNSS.
ccmmddhhiisstt If set, bbaasshh attempts to save all lines of a multiple-
line command in the same history entry. This allows
ccmmddhhiisstt If set, bbaasshh attempts to save all lines of a multiple-
line command in the same history entry. This allows
easy re-editing of multi-line commands.
ccoommppaatt3311
If set, bbaasshh changes its behavior to that of version 3.1
with respect to quoted arguments to the conditional com-
mand's =~ operator.
ddiirrssppeellll
If set, bbaasshh attempts spelling correction on directory
names during word completion if the directory name ini-
If set, bbaasshh attempts spelling correction on directory
names during word completion if the directory name ini-
tially supplied does not exist.
ddoottgglloobb If set, bbaasshh includes filenames beginning with a `.' in
ddoottgglloobb If set, bbaasshh includes filenames beginning with a `.' in
the results of pathname expansion.
eexxeeccffaaiill
If set, a non-interactive shell will not exit if it can-
not execute the file specified as an argument to the
eexxeecc builtin command. An interactive shell does not
not execute the file specified as an argument to the
eexxeecc builtin command. An interactive shell does not
exit if eexxeecc fails.
eexxppaanndd__aalliiaasseess
If set, aliases are expanded as described above under
If set, aliases are expanded as described above under
AALLIIAASSEESS. This option is enabled by default for interac-
tive shells.
eexxttddeebbuugg
If set, behavior intended for use by debuggers is
If set, behavior intended for use by debuggers is
enabled:
11.. The --FF option to the ddeeccllaarree builtin displays the
source file name and line number corresponding to
each function name supplied as an argument.
22.. If the command run by the DDEEBBUUGG trap returns a
non-zero value, the next command is skipped and
22.. If the command run by the DDEEBBUUGG trap returns a
non-zero value, the next command is skipped and
not executed.
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
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.
44.. BBAASSHH__AARRGGCC and BBAASSHH__AARRGGVV are updated as described
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,
shell functions, and subshells invoked with ((
66.. Error tracing is enabled: command substitution,
shell functions, and subshells invoked with ((
_c_o_m_m_a_n_d )) inherit the EERRRROORR trap.
eexxttgglloobb If set, the extended pattern matching features described
above under PPaatthhnnaammee EExxppaannssiioonn are enabled.
eexxttqquuoottee
If set, $$'_s_t_r_i_n_g' and $$"_s_t_r_i_n_g" quoting is performed
within $${{_p_a_r_a_m_e_t_e_r}} expansions enclosed in double
If set, $$'_s_t_r_i_n_g' and $$"_s_t_r_i_n_g" quoting is performed
within $${{_p_a_r_a_m_e_t_e_r}} expansions enclosed in double
quotes. This option is enabled by default.
ffaaiillgglloobb
If set, patterns which fail to match filenames during
If set, patterns which fail to match filenames during
pathname expansion result in an expansion error.
ffoorrccee__ffiiggnnoorree
If set, the suffixes specified by the FFIIGGNNOORREE shell
variable cause words to be ignored when performing word
If set, the suffixes specified by the FFIIGGNNOORREE shell
variable cause words to be ignored when performing word
completion even if the ignored words are the only possi-
ble completions. See SSHHEELLLL VVAARRIIAABBLLEESS above for a
description of FFIIGGNNOORREE. This option is enabled by
description of FFIIGGNNOORREE. This option is enabled by
default.
gglloobbssttaarr
If set, the pattern **** used in a filename expansion con-
@@ -4794,58 +4803,58 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
If set, shell error messages are written in the standard
GNU error message format.
hhiissttaappppeenndd
If set, the history list is appended to the file named
by the value of the HHIISSTTFFIILLEE variable when the shell
If set, the history list is appended to the file named
by the value of the HHIISSTTFFIILLEE variable when the shell
exits, rather than overwriting the file.
hhiissttrreeeeddiitt
If set, and rreeaaddlliinnee is being used, a user is given the
If set, and rreeaaddlliinnee is being used, a user is given the
opportunity to re-edit a failed history substitution.
hhiissttvveerriiffyy
If set, and rreeaaddlliinnee is being used, the results of his-
tory substitution are not immediately passed to the
shell parser. Instead, the resulting line is loaded
If set, and rreeaaddlliinnee is being used, the results of his-
tory substitution are not immediately passed to the
shell parser. Instead, the resulting line is loaded
into the rreeaaddlliinnee editing buffer, allowing further modi-
fication.
hhoossttccoommpplleettee
If set, and rreeaaddlliinnee is being used, bbaasshh will attempt to
perform hostname completion when a word containing a @@
is being completed (see CCoommpplleettiinngg under RREEAADDLLIINNEE
perform hostname completion when a word containing a @@
is being completed (see CCoommpplleettiinngg under RREEAADDLLIINNEE
above). This is enabled by default.
hhuuppoonneexxiitt
If set, bbaasshh will send SSIIGGHHUUPP to all jobs when an inter-
active login shell exits.
iinntteerraaccttiivvee__ccoommmmeennttss
If set, allow a word beginning with ## to cause that word
and all remaining characters on that line to be ignored
in an interactive shell (see CCOOMMMMEENNTTSS above). This
and all remaining characters on that line to be ignored
in an interactive shell (see CCOOMMMMEENNTTSS above). This
option is enabled by default.
lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line
lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line
commands are saved to the history with embedded newlines
rather than using semicolon separators where possible.
llooggiinn__sshheellll
The shell sets this option if it is started as a login
shell (see IINNVVOOCCAATTIIOONN above). The value may not be
The shell sets this option if it is started as a login
shell (see IINNVVOOCCAATTIIOONN above). The value may not be
changed.
mmaaiillwwaarrnn
If set, and a file that bbaasshh is checking for mail has
been accessed since the last time it was checked, the
message ``The mail in _m_a_i_l_f_i_l_e has been read'' is dis-
If set, and a file that bbaasshh is checking for mail has
been accessed since the last time it was checked, the
message ``The mail in _m_a_i_l_f_i_l_e has been read'' is dis-
played.
nnoo__eemmppttyy__ccmmdd__ccoommpplleettiioonn
If set, and rreeaaddlliinnee is being used, bbaasshh will not
If set, and rreeaaddlliinnee is being used, bbaasshh will not
attempt to search the PPAATTHH for possible completions when
completion is attempted on an empty line.
nnooccaasseegglloobb
If set, bbaasshh matches filenames in a case-insensitive
If set, bbaasshh matches filenames in a case-insensitive
fashion when performing pathname expansion (see PPaatthhnnaammee
EExxppaannssiioonn above).
nnooccaasseemmaattcchh
If set, bbaasshh matches patterns in a case-insensitive
If set, bbaasshh matches patterns in a case-insensitive
fashion when performing matching while executing ccaassee or
[[[[ conditional commands.
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--
@@ -4853,47 +4862,47 @@ 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 or 1 depending on the evaluation of the
conditional expression _e_x_p_r. Each operator and operand must be
a separate argument. Expressions are composed of the primaries
described above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS. tteesstt does not
Return a status of 0 or 1 depending on the evaluation of the
conditional expression _e_x_p_r. Each operator and operand 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.
!! _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.
@@ -4910,108 +4919,108 @@ 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
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.
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
case insensitive and the SIG 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 executed before every
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 SIG 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 executed 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 EERRRR,
the command _a_r_g is executed whenever a simple command has a
non-zero exit status, subject to 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, part of a command executed
in a &&&& or |||| list, or if the command's return value is being
inverted via !!. These are the same conditions obeyed by the
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 EERRRR,
the command _a_r_g is executed whenever a simple command has a
non-zero exit status, subject to 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, part of a command executed
in a &&&& or |||| list, or if the command's return value is being
inverted via !!. These are the same conditions obeyed by the
eerrrreexxiitt option. If a _s_i_g_s_p_e_c is RREETTUURRNN, the command _a_r_g is exe-
cuted each time a shell function or a script executed with the ..
or ssoouurrccee builtins finishes executing. Signals ignored upon
entry to the shell cannot be trapped or reset. Trapped signals
or ssoouurrccee builtins finishes executing. 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 child process when it is created. The return status is false
a child process when it 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, not necessarily the
hashed, --pp and --PP print the hashed value, not necessarily 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 func-
tion lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true if
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 func-
tion lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true if
all of the arguments are found, false if any are not found.
uulliimmiitt [--HHSSTTaabbccddeeffiillmmnnppqqrrssttuuvvxx [_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:
@@ -5020,11 +5029,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
--ll The maximum size that may be locked into memory
--mm The maximum resident set size
--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)
--pp The pipe size in 512-byte blocks (this may not be set)
@@ -5163,7 +5173,7 @@ AAUUTTHHOORRSS
bfox@gnu.org
Chet Ramey, Case Western Reserve University
chet@po.cwru.edu
chet.ramey@case.edu
BBUUGG RREEPPOORRTTSS
If you find a bug in bbaasshh,, you should report it. But first, you should
@@ -5214,4 +5224,4 @@ BBUUGGSS
GNU Bash-4.0 2008 December 29 BASH(1)
GNU Bash-4.0 2009 February 7 BASH(1)