mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-10 05:30:49 +02:00
commit bash-20061214 snapshot
This commit is contained in:
+90
-83
@@ -1336,12 +1336,16 @@ EEXXPPAANNSSIIOONN
|
||||
Note that a negative offset must be separated from the colon by
|
||||
at least one space to avoid being confused with the :- expan-
|
||||
sion. Substring indexing is zero-based unless the positional
|
||||
parameters are used, in which case the indexing starts at 1.
|
||||
parameters are used, in which case the indexing starts at 1 by
|
||||
default. If _o_f_f_s_e_t is 0, and the positional parameters are
|
||||
used, $$00 is prefixed to the list.
|
||||
|
||||
${!!_p_r_e_f_i_x**}
|
||||
${!!_p_r_e_f_i_x@@}
|
||||
Expands to the names of variables whose names begin with _p_r_e_f_i_x,
|
||||
separated by the first character of the IIFFSS special variable.
|
||||
separated by the first character of the IIFFSS special variable.
|
||||
When _@ is used and the expansion appears within double quotes,
|
||||
each variable name expands to a separate word.
|
||||
|
||||
${!!_n_a_m_e[_@]}
|
||||
${!!_n_a_m_e[_*]}
|
||||
@@ -3689,64 +3693,67 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
environment.
|
||||
|
||||
Using `+' instead of `-' turns off the attribute instead, with
|
||||
the exception that ++aa may not be used to destroy an array vari-
|
||||
able. When used in a function, makes each _n_a_m_e local, as with
|
||||
the llooccaall command. If a variable name is followed by =_v_a_l_u_e,
|
||||
the value of the variable is set to _v_a_l_u_e. The return value is
|
||||
0 unless an invalid option is encountered, an attempt is made to
|
||||
define a function using ``-f foo=bar'', an attempt is made to
|
||||
assign a value to a readonly variable, an attempt is made to
|
||||
assign a value to an array variable without using the compound
|
||||
assignment syntax (see AArrrraayyss above), one of the _n_a_m_e_s is not a
|
||||
valid shell variable name, an attempt is made to turn off read-
|
||||
only status for a readonly variable, an attempt is made to turn
|
||||
off array status for an array variable, or an attempt is made to
|
||||
display a non-existent function with --ff.
|
||||
the exceptions that ++aa may not be used to destroy an array vari-
|
||||
able and ++rr wwiillll nnoott rreemmoovvee tthhee rreeaaddoonnllyy aattttrriibbuuttee.. WWhheenn uusseedd
|
||||
iinn aa ffuunnccttiioonn,, mmaakkeess eeaacchh _n_a_m_e llooccaall,, aass wwiitthh tthhee llooccaall command.
|
||||
If a variable name is followed by =_v_a_l_u_e, the value of the vari-
|
||||
able is set to _v_a_l_u_e. The return value is 0 unless an invalid
|
||||
option is encountered, an attempt is made to define a function
|
||||
using ``-f foo=bar'', an attempt is made to assign a value to a
|
||||
readonly variable, an attempt is made to assign a value to an
|
||||
array variable without using the compound assignment syntax (see
|
||||
AArrrraayyss above), one of the _n_a_m_e_s is not a valid shell variable
|
||||
name, an attempt is made to turn off readonly status for a read-
|
||||
only variable, an attempt is made to turn off array status for
|
||||
an array variable, or an attempt is made to display a non-exis-
|
||||
tent function with --ff.
|
||||
|
||||
ddiirrss [[--ccllppvv]] [[++_n]] [[--_n]]
|
||||
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 ppuusshhdd command; the ppooppdd command removes
|
||||
ddiirrss [[++_n]] [[--_n]] [[--ccppllvv]]
|
||||
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 ppuusshhdd command; the ppooppdd command removes
|
||||
entries from the list.
|
||||
++_n Displays the _nth entry counting from the left of the list
|
||||
shown by ddiirrss when invoked without options, starting with
|
||||
zero.
|
||||
--_n Displays the _nth entry counting from the right of the
|
||||
--_n Displays the _nth entry counting from the right of the
|
||||
list shown by ddiirrss when invoked without options, starting
|
||||
with zero.
|
||||
--cc Clears the directory stack by deleting all of the
|
||||
entries.
|
||||
--ll Produces a longer listing; the default listing format
|
||||
--ll Produces a longer listing; the default listing format
|
||||
uses a tilde to denote the home directory.
|
||||
--pp Print the directory stack with one entry per line.
|
||||
--vv Print the directory stack with one entry per line, pre-
|
||||
--vv Print the directory stack with one entry per line, pre-
|
||||
fixing each entry with its index in the stack.
|
||||
|
||||
The return value is 0 unless an invalid option is supplied or _n
|
||||
The return value is 0 unless an invalid option is supplied or _n
|
||||
indexes beyond the end of the directory stack.
|
||||
|
||||
ddiissoowwnn [--aarr] [--hh] [_j_o_b_s_p_e_c ...]
|
||||
Without options, each _j_o_b_s_p_e_c is removed from the table of
|
||||
active jobs. If the --hh option is given, each _j_o_b_s_p_e_c is not
|
||||
removed from the table, but is marked so that SSIIGGHHUUPP is not sent
|
||||
to the job if the shell receives a SSIIGGHHUUPP. If no _j_o_b_s_p_e_c is
|
||||
present, and neither the --aa nor the --rr option is supplied, the
|
||||
_c_u_r_r_e_n_t _j_o_b is used. If no _j_o_b_s_p_e_c is supplied, the --aa option
|
||||
means to remove or mark all jobs; the --rr option without a _j_o_b_-
|
||||
_s_p_e_c argument restricts operation to running jobs. The return
|
||||
value is 0 unless a _j_o_b_s_p_e_c does not specify a valid job.
|
||||
Without options, each _j_o_b_s_p_e_c is removed from the table of
|
||||
active jobs. If _j_o_b_s_p_e_c is not present, and neither --aa nnoorr --rr
|
||||
iiss ssuupppplliieedd,, tthhee sshheellll''ss nnoottiioonn ooff tthhee _c_u_r_r_e_n_t _j_o_b iiss uusseedd.. IIff
|
||||
tthhee --hh ooppttiioonn iiss ggiivveenn,, eeaacchh _j_o_b_s_p_e_c is not removed from the ta-
|
||||
ble, but is marked so that SSIIGGHHUUPP is not sent to the job if the
|
||||
shell receives a SSIIGGHHUUPP. If no _j_o_b_s_p_e_c is present, and neither
|
||||
the --aa nor the --rr option is supplied, the _c_u_r_r_e_n_t _j_o_b is used.
|
||||
If no _j_o_b_s_p_e_c is supplied, the --aa option means to remove or mark
|
||||
all jobs; the --rr option without a _j_o_b_s_p_e_c argument restricts
|
||||
operation to running jobs. The return value is 0 unless a _j_o_b_-
|
||||
_s_p_e_c does not specify a valid job.
|
||||
|
||||
eecchhoo [--nneeEE] [_a_r_g ...]
|
||||
Output the _a_r_gs, separated by spaces, followed by a newline.
|
||||
Output the _a_r_gs, separated by spaces, followed by a newline.
|
||||
The return status is always 0. If --nn is specified, the trailing
|
||||
newline is suppressed. If the --ee option is given, interpreta-
|
||||
tion of the following backslash-escaped characters is enabled.
|
||||
The --EE option disables the interpretation of these escape char-
|
||||
acters, even on systems where they are interpreted by default.
|
||||
The xxppgg__eecchhoo shell option may be used to dynamically determine
|
||||
whether or not eecchhoo expands these escape characters by default.
|
||||
eecchhoo does not interpret ---- to mean the end of options. eecchhoo
|
||||
newline is suppressed. If the --ee option is given, interpreta-
|
||||
tion of the following backslash-escaped characters is enabled.
|
||||
The --EE option disables the interpretation of these escape char-
|
||||
acters, even on systems where they are interpreted by default.
|
||||
The xxppgg__eecchhoo shell option may be used to dynamically determine
|
||||
whether or not eecchhoo expands these escape characters by default.
|
||||
eecchhoo does not interpret ---- to mean the end of options. eecchhoo
|
||||
interprets the following escape sequences:
|
||||
\\aa alert (bell)
|
||||
\\bb backspace
|
||||
@@ -3758,52 +3765,52 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
\\tt horizontal tab
|
||||
\\vv vertical tab
|
||||
\\\\ backslash
|
||||
\\00_n_n_n the eight-bit character whose value is the octal value
|
||||
\\00_n_n_n the eight-bit character whose value is the octal value
|
||||
_n_n_n (zero to three octal digits)
|
||||
\\xx_H_H the eight-bit character whose value is the hexadecimal
|
||||
\\xx_H_H the eight-bit character whose value is the hexadecimal
|
||||
value _H_H (one or two hex digits)
|
||||
|
||||
eennaabbllee [--aaddnnppss] [--ff _f_i_l_e_n_a_m_e] [_n_a_m_e ...]
|
||||
Enable and disable builtin shell commands. Disabling a builtin
|
||||
Enable and disable builtin shell commands. Disabling a builtin
|
||||
allows a disk command which has the same name as a shell builtin
|
||||
to be executed without specifying a full pathname, even though
|
||||
the shell normally searches for builtins before disk commands.
|
||||
If --nn is used, each _n_a_m_e is disabled; otherwise, _n_a_m_e_s are
|
||||
to be executed without specifying a full pathname, even though
|
||||
the shell normally searches for builtins before disk commands.
|
||||
If --nn is used, each _n_a_m_e is disabled; otherwise, _n_a_m_e_s are
|
||||
enabled. For example, to use the tteesstt binary found via the PPAATTHH
|
||||
instead of the shell builtin version, run ``enable -n test''.
|
||||
The --ff option means to load the new builtin command _n_a_m_e from
|
||||
instead of the shell builtin version, run ``enable -n test''.
|
||||
The --ff option means to load the new builtin command _n_a_m_e from
|
||||
shared object _f_i_l_e_n_a_m_e, on systems that support dynamic loading.
|
||||
The --dd option will delete a builtin previously loaded with --ff.
|
||||
The --dd option will delete a builtin previously loaded with --ff.
|
||||
If no _n_a_m_e arguments are given, or if the --pp option is supplied,
|
||||
a list of shell builtins is printed. With no other option argu-
|
||||
ments, the list consists of all enabled shell builtins. If --nn
|
||||
is supplied, only disabled builtins are printed. If --aa is sup-
|
||||
plied, the list printed includes all builtins, with an indica-
|
||||
tion of whether or not each is enabled. If --ss is supplied, the
|
||||
output is restricted to the POSIX _s_p_e_c_i_a_l builtins. The return
|
||||
value is 0 unless a _n_a_m_e is not a shell builtin or there is an
|
||||
ments, the list consists of all enabled shell builtins. If --nn
|
||||
is supplied, only disabled builtins are printed. If --aa is sup-
|
||||
plied, the list printed includes all builtins, with an indica-
|
||||
tion of whether or not each is enabled. If --ss is supplied, the
|
||||
output is restricted to the POSIX _s_p_e_c_i_a_l builtins. The return
|
||||
value is 0 unless a _n_a_m_e is not a shell builtin or there is an
|
||||
error loading a new builtin from a shared object.
|
||||
|
||||
eevvaall [_a_r_g ...]
|
||||
The _a_r_gs are read and concatenated together into a single com-
|
||||
mand. This command is then read and executed by the shell, and
|
||||
its exit status is returned as the value of eevvaall. If there are
|
||||
The _a_r_gs are read and concatenated together into a single com-
|
||||
mand. This command is then read and executed by the shell, and
|
||||
its exit status is returned as the value of eevvaall. If there are
|
||||
no _a_r_g_s, or only null arguments, eevvaall returns 0.
|
||||
|
||||
eexxeecc [--ccll] [--aa _n_a_m_e] [_c_o_m_m_a_n_d [_a_r_g_u_m_e_n_t_s]]
|
||||
If _c_o_m_m_a_n_d is specified, it replaces the shell. No new process
|
||||
is created. The _a_r_g_u_m_e_n_t_s become the arguments to _c_o_m_m_a_n_d. If
|
||||
If _c_o_m_m_a_n_d is specified, it replaces the shell. No new process
|
||||
is created. The _a_r_g_u_m_e_n_t_s become the arguments to _c_o_m_m_a_n_d. If
|
||||
the --ll option is supplied, the shell places a dash at the begin-
|
||||
ning of the zeroth arg passed to _c_o_m_m_a_n_d. This is what _l_o_g_i_n(1)
|
||||
does. The --cc option causes _c_o_m_m_a_n_d to be executed with an empty
|
||||
environment. If --aa is supplied, the shell passes _n_a_m_e as the
|
||||
zeroth argument to the executed command. If _c_o_m_m_a_n_d cannot be
|
||||
executed for some reason, a non-interactive shell exits, unless
|
||||
the shell option eexxeeccffaaiill is enabled, in which case it returns
|
||||
failure. An interactive shell returns failure if the file can-
|
||||
not be executed. If _c_o_m_m_a_n_d is not specified, any redirections
|
||||
take effect in the current shell, and the return status is 0.
|
||||
If there is a redirection error, the return status is 1.
|
||||
ning of the zeroth argument passed to _c_o_m_m_a_n_d. This is what
|
||||
_l_o_g_i_n(1) does. The --cc option causes _c_o_m_m_a_n_d to be executed with
|
||||
an empty environment. If --aa is supplied, the shell passes _n_a_m_e
|
||||
as the zeroth argument to the executed command. If _c_o_m_m_a_n_d can-
|
||||
not be executed for some reason, a non-interactive shell exits,
|
||||
unless the shell option eexxeeccffaaiill is enabled, in which case it
|
||||
returns failure. An interactive shell returns failure if the
|
||||
file cannot be executed. If _c_o_m_m_a_n_d is not specified, any redi-
|
||||
rections take effect in the current shell, and the return status
|
||||
is 0. If there is a redirection error, the return status is 1.
|
||||
|
||||
eexxiitt [_n]
|
||||
Cause the shell to exit with a status of _n. If _n is omitted,
|
||||
@@ -4043,6 +4050,9 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
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
|
||||
manipulated.
|
||||
++_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.
|
||||
@@ -4050,9 +4060,6 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
shown by ddiirrss, starting with zero. For example: ``popd
|
||||
-0'' removes the last directory, ``popd -1'' the next to
|
||||
last.
|
||||
--nn Suppresses the normal change of directory when removing
|
||||
directories from the stack, so that only the stack is
|
||||
manipulated.
|
||||
|
||||
If the ppooppdd command is successful, a ddiirrss is performed as well,
|
||||
and the return status is 0. ppooppdd returns false if an invalid
|
||||
@@ -4084,22 +4091,22 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
null string, as appropriate, had been supplied. The return
|
||||
value is zero on success, non-zero on failure.
|
||||
|
||||
ppuusshhdd [--nn] [_d_i_r]
|
||||
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
|
||||
directory. With no arguments, exchanges the top two directories
|
||||
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
|
||||
manipulated.
|
||||
++_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
|
||||
zero) is at the top.
|
||||
--nn Suppresses the normal change of directory when adding
|
||||
directories to the stack, so that only the stack is
|
||||
manipulated.
|
||||
_d_i_r Adds _d_i_r to the directory stack at the top, making it the
|
||||
new current working directory.
|
||||
|
||||
@@ -4214,10 +4221,10 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
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 _i_f statement, part of a &&&& or ||||
|
||||
list, or if the command's return value is being inverted
|
||||
via !!. A trap on EERRRR, if set, is executed before the
|
||||
shell exits.
|
||||
part of the test in an iiff statement, part of a &&&& or ||||
|
||||
list, any command in a pipeline but the last, or if the
|
||||
command's return value is being inverted via !!. A trap
|
||||
on EERRRR, if set, is executed before the shell exits.
|
||||
--ff Disable pathname expansion.
|
||||
--hh Remember the location of commands as they are looked up
|
||||
for execution. This is enabled by default.
|
||||
@@ -4883,4 +4890,4 @@ BBUUGGSS
|
||||
|
||||
|
||||
|
||||
GNU Bash-3.2 2006 September 28 BASH(1)
|
||||
GNU Bash-3.2 2006 November 27 BASH(1)
|
||||
|
||||
Reference in New Issue
Block a user