commit bash-20191122 snapshot

This commit is contained in:
Chet Ramey
2019-11-25 11:48:29 -05:00
parent dfc7113bf2
commit fc35c477cd
48 changed files with 13660 additions and 11860 deletions
+42
View File
@@ -6850,6 +6850,8 @@ doc/bash.1,lib/readline/doc/{history.3,hsuser.texi}
Reported by Jim Monte <jim.monte01@gmail.com>
- note that a word designator of `-' is equivalent to `0-'.
Reported by Jim Monte <jim.monte01@gmail.com>
- note that a missing `new' in a substitution modifier causes
instances of `old' to be deleted
lib/readline/histexpand.c
- history_expand_internal: make multiple :p modifiers work to suppress
@@ -6864,3 +6866,43 @@ lib/readline/histexpand.c
immediately by a `-' and a non-digit (e.g. !-a), make sure the - is
treated as part of a search string instead of making it an offset of
0. Reported by Jim Monte <jim.monte01@gmail.com>
11/19
-----
lib/readline/{colors,complete,histfile,input}.c,support/shobj-conf
- fixes to make readline compile on the latest HPE Nonstop (Tandem)
releases. From Randall S. Becker <rsbecker@nexbridge.com>
subst.c
- pat_subst: if we have a null match, make sure we advance by one
character, not one byte. Bug reported by Chris Carlen
<crobc@sbcglobal.net>
11/22
-----
jobs.[ch],nojobs.c,builtins/jobs.def
- get_job_by_pid: now takes a PROCESS ** third argument; if non-null,
it gets a pointer to the PROCESS struct corresponding to the PID
argument. A convenience, not used by any caller yet
builtins/wait.def
- interrupt_immediately: remove any uses, no longer used anywheren
variables.c
- check_unbind_variable: return -2 if the variable name is readonly
(change) or non-unsettable (new) to differentiate the return value
from -1 from makunboud (which means variable not found)
builtins/common.[ch]
- builtin_unbind_variable: identical to check_unbind_variable but calls
builtin_error; for use by builtin commands
buitins/wait.def
- wait_builtin: now has -p VARNAME option, which takes the pid
returned by `wait -n' or wait without arguments and assigns it to
VARNAME, unsetting VARNAME first. Requested by Robert Elz
<kre@bmunnari.oz.au> after a similar feature in netbsd sh (not
completely compatible yet)
doc/{bash.1,bashref.texi}
- wait: document new -p option
+15 -19
View File
@@ -173,66 +173,62 @@ The following list is what's changed when 'POSIX mode' is in effect:
option, so numeric arguments to 'shift' that exceed the number of
positional parameters will result in an error message.
45. Enabling POSIX mode has the effect of setting the 'posixglob'
option, which affects how unquoted backslashes are treated during
filename expansion (*note Filename Expansion::).
46. When the 'alias' builtin displays alias definitions, it does not
45. When the 'alias' builtin displays alias definitions, it does not
display them with a leading 'alias ' unless the '-p' option is
supplied.
47. When the 'set' builtin is invoked without options, it does not
46. When the 'set' builtin is invoked without options, it does not
display shell function names and definitions.
48. When the 'set' builtin is invoked without options, it displays
47. When the 'set' builtin is invoked without options, it displays
variable values without quotes, unless they contain shell
metacharacters, even if the result contains nonprinting characters.
49. When the 'cd' builtin is invoked in LOGICAL mode, and the pathname
48. When the 'cd' builtin is invoked in LOGICAL mode, and the pathname
constructed from '$PWD' and the directory name supplied as an
argument does not refer to an existing directory, 'cd' will fail
instead of falling back to PHYSICAL mode.
50. When the 'cd' builtin cannot change a directory because the length
49. When the 'cd' builtin cannot change a directory because the length
of the pathname constructed from '$PWD' and the directory name
supplied as an argument exceeds PATH_MAX when all symbolic links
are expanded, 'cd' will fail instead of attempting to use only the
supplied directory name.
51. The 'pwd' builtin verifies that the value it prints is the same as
50. The 'pwd' builtin verifies that the value it prints is the same as
the current directory, even if it is not asked to check the file
system with the '-P' option.
52. When listing the history, the 'fc' builtin does not include an
51. When listing the history, the 'fc' builtin does not include an
indication of whether or not a history entry has been modified.
53. The default editor used by 'fc' is 'ed'.
52. The default editor used by 'fc' is 'ed'.
54. The 'type' and 'command' builtins will not report a non-executable
53. The 'type' and 'command' builtins will not report a non-executable
file as having been found, though the shell will attempt to execute
such a file if it is the only so-named file found in '$PATH'.
55. The 'vi' editing mode will invoke the 'vi' editor directly when
54. The 'vi' editing mode will invoke the 'vi' editor directly when
the 'v' command is run, instead of checking '$VISUAL' and
'$EDITOR'.
56. When the 'xpg_echo' option is enabled, Bash does not attempt to
55. When the 'xpg_echo' option is enabled, Bash does not attempt to
interpret any arguments to 'echo' as options. Each argument is
displayed, after escape characters are converted.
57. The 'ulimit' builtin uses a block size of 512 bytes for the '-c'
56. The 'ulimit' builtin uses a block size of 512 bytes for the '-c'
and '-f' options.
58. The arrival of 'SIGCHLD' when a trap is set on 'SIGCHLD' does not
57. The arrival of 'SIGCHLD' when a trap is set on 'SIGCHLD' does not
interrupt the 'wait' builtin and cause it to return immediately.
The trap command is run once for each child that exits.
59. The 'read' builtin may be interrupted by a signal for which a trap
58. The 'read' builtin may be interrupted by a signal for which a trap
has been set. If Bash receives a trapped signal while executing
'read', the trap handler executes and 'read' returns an exit status
greater than 128.
60. Bash removes an exited background process's status from the list
59. Bash removes an exited background process's status from the list
of such statuses after the 'wait' builtin is used to obtain it.
There is other POSIX behavior that Bash does not implement by default
+22
View File
@@ -937,3 +937,25 @@ builtin_bind_variable (name, value, flags)
return v;
}
/* Like check_unbind_variable, but for use by builtins (only matters for
error messages). */
int
builtin_unbind_variable (vname)
const char *vname;
{
SHELL_VAR *v;
v = find_variable (vname);
if (v && readonly_p (v))
{
builtin_error (_("%s: cannot unset: readonly %s"), vname, "variable");
return -2;
}
else if (v && non_unsettable_p (v))
{
builtin_error (_("%s: cannot unset"), vname);
return -2;
}
return (unbind_variable (vname));
}
+1
View File
@@ -218,6 +218,7 @@ extern sh_builtin_func_t *this_shell_builtin;
extern sh_builtin_func_t *last_shell_builtin;
extern SHELL_VAR *builtin_bind_variable __P((char *, char *, int));
extern int builtin_unbind_variable __P((const char *));
/* variables from evalfile.c */
extern int sourcelevel;
+1 -1
View File
@@ -276,7 +276,7 @@ disown_builtin (list)
{
BLOCK_CHILD (set, oset);
job = (list && legal_number (list->word->word, &pid_value) && pid_value == (pid_t) pid_value)
? get_job_by_pid ((pid_t) pid_value, 0)
? get_job_by_pid ((pid_t) pid_value, 0, 0)
: get_job_spec (list);
if (job == NO_JOB || jobs == 0 || INVALID_JOB (job))
+29 -8
View File
@@ -22,7 +22,7 @@ $BUILTIN wait
$FUNCTION wait_builtin
$DEPENDS_ON JOB_CONTROL
$PRODUCES wait.c
$SHORT_DOC wait [-fn] [id ...]
$SHORT_DOC wait [-fn] [-p var] [id ...]
Wait for job completion and return exit status.
Waits for each process identified by an ID, which may be a process ID or a
@@ -34,6 +34,11 @@ in that job's pipeline.
If the -n option is supplied, waits for the next job to terminate and
returns its exit status.
If the -p option is supplied, the process or job identifier of the job
for which the exit status is returned is assigned to the variable VAR
named by the option argument. The variable will be unset initially, before
any assignment. This is useful only when the -n option is supplied.
If the -f option is supplied, and job control is enabled, waits for the
specified ID to terminate, instead of waiting for it to change status.
@@ -89,7 +94,6 @@ int wait_intr_flag;
#define WAIT_RETURN(s) \
do \
{ \
interrupt_immediately = old_interrupt_immediately;\
wait_signal_received = 0; \
wait_intr_flag = 0; \
return (s);\
@@ -101,14 +105,17 @@ wait_builtin (list)
WORD_LIST *list;
{
int status, code, opt, nflag, wflags;
volatile int old_interrupt_immediately;
char *vname;
SHELL_VAR *pidvar;
struct procstat pstat;
USE_VAR(list);
nflag = wflags = 0;
vname = NULL;
pidvar = (SHELL_VAR *)NULL;
reset_internal_getopt ();
while ((opt = internal_getopt (list, "nf")) != -1)
while ((opt = internal_getopt (list, "fnp:")) != -1)
{
switch (opt)
{
@@ -119,6 +126,9 @@ wait_builtin (list)
case 'f':
wflags |= JWAIT_FORCE;
break;
case 'p':
vname = list_optarg;
break;
#endif
CASE_HELPOPT;
default:
@@ -128,10 +138,17 @@ wait_builtin (list)
}
list = loptend;
old_interrupt_immediately = interrupt_immediately;
#if 0
interrupt_immediately++;
#endif
/* Sanity-check variable name if -p supplied. */
if (vname)
{
if (legal_identifier (vname) == 0)
{
sh_invalidid (vname);
WAIT_RETURN (EXECUTION_FAILURE);
}
if (builtin_unbind_variable (vname) == -2)
WAIT_RETURN (EXECUTION_FAILURE);
}
/* POSIX.2 says: When the shell is waiting (by means of the wait utility)
for asynchronous commands to complete, the reception of a signal for
@@ -161,6 +178,8 @@ wait_builtin (list)
status = wait_for_any_job (wflags, &pstat);
if (status < 0)
status = 127;
if (vname && status >= 0)
bind_var_to_int (vname, pstat.pid);
WAIT_RETURN (status);
}
#endif
@@ -170,6 +189,8 @@ wait_builtin (list)
if (list == 0)
{
wait_for_background_pids (&pstat);
if (vname)
bind_var_to_int (vname, pstat.pid);
WAIT_RETURN (EXECUTION_SUCCESS);
}
+1667 -1664
View File
File diff suppressed because it is too large Load Diff
+16 -5
View File
@@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
.\" Last Change: Fri Nov 15 09:39:07 EST 2019
.\" Last Change: Fri Nov 22 15:26:59 EST 2019
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2019 November 15" "GNU Bash 5.0"
.TH BASH 1 "2019 November 22" "GNU Bash 5.0"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -7268,6 +7268,7 @@ previous command is used as the event.
.PP
After the optional word designator, there may appear a sequence of
one or more of the following modifiers, each preceded by a `:'.
These modify, or edit, the word or words selected from the history event.
.PP
.PD 0
.PP
@@ -7328,6 +7329,11 @@ the last
in a
.B !?\fIstring\fR\fB[?]\fR
search.
If
.I new
is null, each matching
.I old
is deleted.
.TP
.B &
Repeat the previous substitution.
@@ -7729,9 +7735,9 @@ will be displayed.
The return value is true unless an invalid option is supplied, or no
matches were generated.
.TP
\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-DEI\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP] [\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP]
\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-DEI\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP]
.br
[\fB\-X\fP \fIfilterpat\fP] [\fB\-P\fP \fIprefix\fP] [\fB\-S\fP \fIsuffix\fP] \fIname\fP [\fIname ...\fP]
[\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP] [\fB\-X\fP \fIfilterpat\fP] [\fB\-P\fP \fIprefix\fP] [\fB\-S\fP \fIsuffix\fP] \fIname\fP [\fIname ...\fP]
.PD 0
.TP
\fBcomplete\fP \fB\-pr\fP [\fB\-DEI\fP] [\fIname\fP ...]
@@ -10819,7 +10825,7 @@ subsequently reset. The exit status is true unless a
.I name
is readonly.
.TP
\fBwait\fP [\fB\-fn\fP] [\fIid ...\fP]
\fBwait\fP [\fB\-fn\fP] [\fP\-p\fP \fIvarname\fP] [\fIid ...\fP]
Wait for each specified child process and return its termination status.
Each
.I id
@@ -10834,6 +10840,11 @@ the last-executed process substitution, if its process id is the same as
and the return status is zero.
If the \fB\-n\fP option is supplied, \fBwait\fP waits for a single job
to terminate and returns its exit status.
If the \fB\-p\fP option is supplied, the process or job identifier of the job
for which the exit status is returned is assigned to the variable
\fIvarname\fP named by the option argument.
The variable will be unset initially, before any assignment.
This is useful only when the \fB\-n\fP option is supplied.
Supplying the \fB\-f\fP option, when job control is enabled,
forces \fBwait\fP to wait for \fIid\fP to terminate before returning
its status, instead of returning when it changes status.
+63 -41
View File
@@ -3,7 +3,7 @@
</HEAD>
<BODY><TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2019 July 8<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2019 November 22<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<BR><A HREF="#index">Index</A>
@@ -980,7 +980,9 @@ to be matched as a string.
An additional binary operator, <B>=~</B>, is available, with the same
precedence as <B>==</B> and <B>!=</B>.
When it is used, the string to the right of the operator is considered
a POSIX extended regular expression and matched accordingly (as in <I>regex</I>(3)).
a POSIX extended regular expression and matched accordingly
(using the POSIX <I>regcomp</I> and <I>regexec</I> interfaces
usually described in <I>regex</I>(3)).
The return value is 0 if the string matches
the pattern, and 1 otherwise.
If the regular expression is syntactically incorrect, the conditional
@@ -996,18 +998,29 @@ Bracket expressions in regular expressions must be treated carefully,
since normal quoting characters lose their meanings between brackets.
If the pattern is stored in a shell variable, quoting the variable
expansion forces the entire pattern to be matched as a string.
Substrings matched by parenthesized subexpressions within the regular
expression are saved in the array variable
<FONT SIZE=-1><B>BASH_REMATCH</B>.
<P>
The pattern will match if it matches any part of the string.
Anchor the pattern using the <B>^</B> and <B>$</B> regular expression
operators to force it to match the entire string.
The array variable
<FONT SIZE=-1><B>BASH_REMATCH</B>
</FONT>
records which parts of the string matched the pattern.
The element of
<FONT SIZE=-1><B>BASH_REMATCH</B>
</FONT>
with index 0 is the portion of the string
matching the entire regular expression.
The element of
with index 0 contains the portion of
the string matching the entire regular expression.
Substrings matched by parenthesized subexpressions within the regular
expression are saved in the remaining
<FONT SIZE=-1><B>BASH_REMATCH</B>
</FONT>
indices. The element of
<FONT SIZE=-1><B>BASH_REMATCH</B>
</FONT>
@@ -2055,7 +2068,6 @@ The element with index 0 is the portion of the string
matching the entire regular expression.
The element with index <I>n</I> is the portion of the
string matching the <I>n</I>th parenthesized subexpression.
This variable is read-only.
<DT><B>BASH_SOURCE</B>
<DD>
@@ -4480,14 +4492,10 @@ scans each word for the characters
<B>?</B>,
<B>[</B>,
and
<B>[</B>.
and, under certain circumstances (e.g., when it appears in the expansion of
an unquoted shell variable, depending on the setting of the <B>posixglob</B>
shell option),
<B>\</B>.
If one of these characters appears, then the word is
If one of these characters appears, and is not quoted, then the word is
regarded as a
<I>pattern</I>,
@@ -9176,6 +9184,8 @@ The trailing <B>?</B> may be omitted if
<I>string</I>
is followed immediately by a newline.
If <I>string</I> is missing, the string from the most recent search is used;
it is an error if there is no previous search string.
<DT><B></B><FONT SIZE=+2><B>^</B></FONT><B></B><I>string1</I><FONT SIZE=+2>^</FONT><I>string2</I><FONT SIZE=+2>^</FONT>
<DD>
@@ -9186,7 +9196,7 @@ with
<I>string2</I>.
Equivalent to
``!!:s/<I>string1</I>/<I>string2</I>/''
``!!:s<FONT SIZE=+2>^</FONT><I>string1</I><FONT SIZE=+2>^</FONT><I>string2</I><FONT SIZE=+2>^</FONT>''
(see <B>Modifiers</B> below).
<DT><B>!#</B>
@@ -9244,7 +9254,8 @@ zeroth word if there is only one word in the line.
<DT><B>%</B>
<DD>
The word matched by the most recent `?<I>string</I>?' search.
The first word matched by the most recent `?<I>string</I>?' search,
if the search string begins with a character that is part of a word.
<DT><I>x</I><B>-</B>y
<DD>
@@ -9266,6 +9277,7 @@ Abbreviates <I>x-$</I>.
<DD>
Abbreviates <I>x-$</I> like <B>x*</B>, but omits the last word.
If <B>x</B> is missing, it defaults to 0.
</DL>
<P>
@@ -9279,6 +9291,7 @@ previous command is used as the event.
After the optional word designator, there may appear a sequence of
one or more of the following modifiers, each preceded by a `:'.
These modify, or edit, the word or words selected from the history event.
<P>
@@ -9320,6 +9333,8 @@ but break into words at
<B>blanks</B>
and newlines.
The <B>q</B> and <B>x</B> modifiers are mutually exclusive; the last one
supplied is used.
<DT><B>s/</B><I>old</I>/<I>new</I>/
<DD>
@@ -9329,9 +9344,11 @@ Substitute
for the first occurrence of
<I>old</I>
in the event line. Any delimiter can be used in place of /. The
final delimiter is optional if it is the last character of the
event line. The delimiter may be quoted in
in the event line.
Any character may be used as the delimiter in place of /.
The final delimiter is optional if it is the last character of the
event line.
The delimiter may be quoted in
<I>old</I>
and
@@ -9343,7 +9360,8 @@ with a single backslash. If &amp; appears in
it is replaced by
<I>old</I>.
A single backslash will quote the &amp;. If
A single backslash will quote the &amp;.
If
<I>old</I>
is null, it is set to the last
@@ -9357,6 +9375,13 @@ in a
<B>!?</B><I>string</I><B>[?]</B>
search.
If
<I>new</I>
is null, each matching
<I>old</I>
is deleted.
<DT><B>&amp;</B>
<DD>
@@ -9374,7 +9399,8 @@ An <B>a</B> may be used as a synonym for <B>g</B>.
<DT><B>G</B>
<DD>
Apply the following `<B>s</B>' modifier once to each word in the event line.
Apply the following `<B>s</B>' or `<B>&amp;</B>' modifier once to each word
in the event line.
</DL>
<A NAME="lbDB">&nbsp;</A>
@@ -9839,10 +9865,10 @@ will be displayed.
<P>
The return value is true unless an invalid option is supplied, or no
matches were generated.
<DT><B>complete</B> [<B>-abcdefgjksuv</B>] [<B>-o</B> <I>comp-option</I>] [<B>-DEI</B>] [<B>-A</B> <I>action</I>] [<B>-G</B> <I>globpat</I>] [<B>-W</B> <I>wordlist</I>] [<B>-F</B> <I>function</I>] [<B>-C</B> <I>command</I>]<DD>
<DT><B>complete</B> [<B>-abcdefgjksuv</B>] [<B>-o</B> <I>comp-option</I>] [<B>-DEI</B>] [<B>-A</B> <I>action</I>] [<B>-G</B> <I>globpat</I>] [<B>-W</B> <I>wordlist</I>]<DD>
<BR>
[<B>-X</B> <I>filterpat</I>] [<B>-P</B> <I>prefix</I>] [<B>-S</B> <I>suffix</I>] <I>name</I> [<I>name ...</I>]
[<B>-F</B> <I>function</I>] [<B>-C</B> <I>command</I>] [<B>-X</B> <I>filterpat</I>] [<B>-P</B> <I>prefix</I>] [<B>-S</B> <I>suffix</I>] <I>name</I> [<I>name ...</I>]
<DT><B>complete</B> <B>-pr</B> [<B>-DEI</B>] [<I>name</I> ...]<DD>
@@ -10781,7 +10807,7 @@ does not specify a valid job or
<I>jobspec</I>
specifies a job that was started without job control.
<DT><B>getopts</B> <I>optstring</I> <I>name</I> [<I>args</I>]<DD>
<DT><B>getopts</B> <I>optstring</I> <I>name</I> [<I>arg ...</I>]<DD>
<B>getopts</B>
is used by shell procedures to parse positional parameters.
@@ -10840,9 +10866,10 @@ and <I>name</I> is set to ?.
<B>getopts</B>
normally parses the positional parameters, but if more arguments are
given in
<I>args</I>,
supplied as
<I>arg</I>
values,
<B>getopts</B>
parses those instead.
@@ -12942,16 +12969,6 @@ files (see
above)
to expand to a null string, rather than themselves.
<DT><B>posixglob</B>
<DD>
If set,
<B>bash</B>
makes words containing unquoted backslashes after expansion eligible for
pathname expansion, even if they don't contain any other unquoted pattern
characters. This option is enabled by default, and is enabled when
<I>posix mode</I> is enabled.
<DT><B>progcomp</B>
<DD>
@@ -13704,7 +13721,7 @@ subsequently reset. The exit status is true unless a
<I>name</I>
is readonly.
<DT><B>wait</B> [<B>-fn</B>] [<I>id ...</I>]<DD>
<DT><B>wait</B> [<B>-fn</B>] [-p <I>varname</I>] [<I>id ...</I>]<DD>
Wait for each specified child process and return its termination status.
Each
<I>id</I>
@@ -13721,6 +13738,11 @@ the last-executed process substitution, if its process id is the same as
and the return status is zero.
If the <B>-n</B> option is supplied, <B>wait</B> waits for a single job
to terminate and returns its exit status.
If the <B>-p</B> option is supplied, the process or job identifier of the job
for which the exit status is returned is assigned to the variable
<I>varname</I> named by the option argument.
The variable will be unset initially, before any assignment.
This is useful only when the <B>-n</B> option is supplied.
Supplying the <B>-f</B> option, when job control is enabled,
forces <B>wait</B> to wait for <I>id</I> to terminate before returning
its status, instead of returning when it changes status.
@@ -14018,7 +14040,7 @@ There may be only one active coprocess at a time.
<HR>
<TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>GNU Bash 5.0<TH ALIGN=CENTER width=33%>2019 July 8<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>GNU Bash 5.0<TH ALIGN=CENTER width=33%>2019 November 22<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<HR>
@@ -14124,6 +14146,6 @@ There may be only one active coprocess at a time.
</DL>
<HR>
This document was created by man2html from bash.1.<BR>
Time: 08 July 2019 15:16:27 EDT
Time: 22 November 2019 15:53:56 EST
</BODY>
</HTML>
+264 -234
View File
@@ -1,10 +1,10 @@
This is bash.info, produced by makeinfo version 6.5 from
This is bash.info, produced by makeinfo version 6.7 from
bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.0, 8 July 2019).
Bash shell (version 5.0, 22 November 2019).
This is Edition 5.0, last updated 8 July 2019, of 'The GNU Bash
This is Edition 5.0, last updated 22 November 2019, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.0.
Copyright (C) 1988-2018 Free Software Foundation, Inc.
@@ -27,10 +27,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
Bash shell (version 5.0, 8 July 2019). The Bash home page is
Bash shell (version 5.0, 22 November 2019). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.0, last updated 8 July 2019, of 'The GNU Bash
This is Edition 5.0, last updated 22 November 2019, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.0.
Bash contains features that appear in other popular shells, and some
@@ -893,7 +893,8 @@ File: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev:
An additional binary operator, '=~', is available, with the same
precedence as '==' and '!='. When it is used, the string to the
right of the operator is considered a POSIX extended regular
expression and matched accordingly (as in regex3)). The return
expression and matched accordingly (using the POSIX 'regcomp' and
'regexec' interfaces usually described in regex(3)). The return
value is 0 if the string matches the pattern, and 1 otherwise. If
the regular expression is syntactically incorrect, the conditional
expression's return value is 2. If the 'nocasematch' shell option
@@ -905,18 +906,24 @@ File: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev:
normal quoting characters lose their meanings between brackets. If
the pattern is stored in a shell variable, quoting the variable
expansion forces the entire pattern to be matched as a string.
The pattern will match if it matches any part of the string.
Anchor the pattern using the '^' and '$' regular expression
operators to force it to match the entire string. The array
variable 'BASH_REMATCH' records which parts of the string matched
the pattern. The element of 'BASH_REMATCH' with index 0 contains
the portion of the string matching the entire regular expression.
Substrings matched by parenthesized subexpressions within the
regular expression are saved in the array variable 'BASH_REMATCH'.
The element of 'BASH_REMATCH' with index 0 is the portion of the
string matching the entire regular expression. The element of
'BASH_REMATCH' with index N is the portion of the string matching
the Nth parenthesized subexpression.
regular expression are saved in the remaining 'BASH_REMATCH'
indices. The element of 'BASH_REMATCH' with index N is the portion
of the string matching the Nth parenthesized subexpression.
For example, the following will match a line (stored in the shell
variable LINE) if there is a sequence of characters in the value
consisting of any number, including zero, of space characters, zero
or one instances of 'a', then a 'b':
[[ $line =~ [[:space:]]*?(a)b ]]
variable LINE) if there is a sequence of characters anywhere in the
value consisting of any number, including zero, of characters in
the 'space' character class, zero or one instances of 'a', then a
'b':
[[ $line =~ [[:space:]]*(a)?b ]]
That means values like 'aab' and ' aaaaaab' will match, as will a
line containing a 'b' anywhere in its value.
@@ -929,7 +936,7 @@ File: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev:
to the shell's quote removal. Using a shell variable to store the
pattern decreases these problems. For example, the following is
equivalent to the above:
pattern='[[:space:]]*?(a)b'
pattern='[[:space:]]*(a)?b'
[[ $line =~ $pattern ]]
If you want to match a character that's special to the regular
@@ -1083,21 +1090,27 @@ names, use find's '-print0' option and parallel's '-0' option.
You can use Parallel to move files from the current directory when
the number of files is too large to process with one 'mv' invocation:
ls | parallel mv {} destdir
printf '%s\n' * | parallel mv {} destdir
As you can see, the {} is replaced with each line read from standard
input. While using 'ls' will work in most instances, it is not
sufficient to deal with all filenames. If you need to accommodate
special characters in filenames, you can use
sufficient to deal with all filenames. 'printf' is a shell builtin, and
therefore is not subject to the kernel's limit on the number of
arguments to a program, so you can use '*' (but see below about the
'dotglob' shell option). If you need to accommodate special characters
in filenames, you can use
find . -depth 1 \! -name '.*' -print0 | parallel -0 mv {} destdir
printf '%s\0' * | parallel -0 mv {} destdir
as alluded to above.
This will run as many 'mv' commands as there are files in the current
directory. You can emulate a parallel 'xargs' by adding the '-X'
option:
find . -depth 1 \! -name '.*' -print0 | parallel -0 -X mv {} destdir
printf '%s\0' * | parallel -0 -X mv {} destdir
(You may have to modify the pattern if you have the 'dotglob' option
enabled.)
GNU Parallel can replace certain common idioms that operate on lines
read from a file (in this case, filenames listed one per line):
@@ -1410,7 +1423,7 @@ only be referenced; assignment to them is not allowed.
the expansion is not within double quotes, each positional
parameter expands to a separate word. In contexts where it is
performed, those words are subject to further word splitting and
pathname expansion. When the expansion occurs within double
filename expansion. When the expansion occurs within double
quotes, it expands to a single word with the value of each
parameter separated by the first character of the 'IFS' special
variable. That is, '"$*"' is equivalent to '"$1C$2C..."', where C
@@ -1984,7 +1997,7 @@ omitted, the operator tests only for existence.
and the expansion is the resultant list.
The result of the expansion is subject to word splitting and
pathname expansion as described below.
filename expansion as described below.

File: bash.info, Node: Command Substitution, Next: Arithmetic Expansion, Prev: Shell Parameter Expansion, Up: Shell Expansions
@@ -2116,18 +2129,17 @@ File: bash.info, Node: Filename Expansion, Next: Quote Removal, Prev: Word Sp
* Pattern Matching:: How the shell matches patterns.
After word splitting, unless the '-f' option has been set (*note The Set
Builtin::), Bash scans each word for the characters '*', '?', '[', and,
under certain circumstances (e.g., when it appears in the expansion of
an unquoted shell variable), '\\'. If one of these characters appears,
then the word is regarded as a PATTERN, and replaced with an
alphabetically sorted list of filenames matching the pattern (*note
Pattern Matching::). If no matching filenames are found, and the shell
option 'nullglob' is disabled, the word is left unchanged. If the
'nullglob' option is set, and no matches are found, the word is removed.
If the 'failglob' shell option is set, and no matches are found, an
error message is printed and the command is not executed. If the shell
option 'nocaseglob' is enabled, the match is performed without regard to
the case of alphabetic characters.
Builtin::), Bash scans each word for the characters '*', '?', and '['.
If one of these characters appears, and is not quoted, then the word is
regarded as a PATTERN, and replaced with an alphabetically sorted list
of filenames matching the pattern (*note Pattern Matching::). If no
matching filenames are found, and the shell option 'nullglob' is
disabled, the word is left unchanged. If the 'nullglob' option is set,
and no matches are found, the word is removed. If the 'failglob' shell
option is set, and no matches are found, an error message is printed and
the command is not executed. If the shell option 'nocaseglob' is
enabled, the match is performed without regard to the case of alphabetic
characters.
When a pattern is used for filename expansion, the character '.' at
the start of a filename or immediately following a slash must be matched
@@ -2443,7 +2455,7 @@ A variant of here documents, the format is:
[N]<<< WORD
The WORD undergoes tilde expansion, parameter and variable expansion,
command substitution, arithmetic expansion, and quote removal. Pathname
command substitution, arithmetic expansion, and quote removal. Filename
expansion and word splitting are not performed. The result is supplied
as a single string, with a newline appended, to the command on its
standard input (or file descriptor N if N is specified).
@@ -2828,20 +2840,28 @@ of commands remembered by the parent (see the description of 'hash' in
Most versions of Unix make this a part of the operating system's
command execution mechanism. If the first line of a script begins with
the two characters '#!', the remainder of the line specifies an
interpreter for the program. Thus, you can specify Bash, 'awk', Perl,
or some other interpreter and write the rest of the script file in that
language.
interpreter for the program and, depending on the operating system, one
or more optional arguments for that interpreter. Thus, you can specify
Bash, 'awk', Perl, or some other interpreter and write the rest of the
script file in that language.
The arguments to the interpreter consist of a single optional
argument following the interpreter name on the first line of the script
The arguments to the interpreter consist of one or more optional
arguments following the interpreter name on the first line of the script
file, followed by the name of the script file, followed by the rest of
the arguments. Bash will perform this action on operating systems that
do not handle it themselves. Note that some older versions of Unix
limit the interpreter name and argument to a maximum of 32 characters.
the arguments supplied to the script. The details of how the
interpreter line is split into an interpreter name and a set of
arguments vary across systems. Bash will perform this action on
operating systems that do not handle it themselves. Note that some
older versions of Unix limit the interpreter name and a single argument
to a maximum of 32 characters, so it's not portable to assume that using
more than one argument will work.
Bash scripts often begin with '#! /bin/bash' (assuming that Bash has
been installed in '/bin'), since this ensures that Bash will be used to
interpret the script, even if it is executed under another shell.
interpret the script, even if it is executed under another shell. It's
a common idiom to use 'env' to find 'bash' even if it's been installed
in another directory: '#!/usr/bin/env bash' will find the first
occurrence of 'bash' in '$PATH'.

File: bash.info, Node: Shell Builtin Commands, Next: Shell Variables, Prev: Basic Shell Features, Up: Top
@@ -3032,7 +3052,7 @@ standard.
supplied with a name that is not a shell function.
'getopts'
getopts OPTSTRING NAME [ARGS]
getopts OPTSTRING NAME [ARG ...]
'getopts' is used by shell scripts to parse positional parameters.
OPTSTRING contains the option characters to be recognized; if a
@@ -3054,7 +3074,8 @@ standard.
the first non-option argument, and NAME is set to '?'.
'getopts' normally parses the positional parameters, but if more
arguments are given in ARGS, 'getopts' parses those instead.
arguments are supplied as ARG values, 'getopts' parses those
instead.
'getopts' can report errors in two ways. If the first character of
OPTSTRING is a colon, SILENT error reporting is used. In normal
@@ -4681,12 +4702,6 @@ This builtin allows you to change additional shell optional behavior.
If set, Bash allows filename patterns which match no files to
expand to a null string, rather than themselves.
'posixglob'
If set, Bash makes words containing unquoted backslashes after
expansion eligible for filename expansion, even if they don't
contain any other unquoted pattern characters. This option is
enabled by default and is enabled when POSIX mode is enabled.
'progcomp'
If set, the programmable completion facilities (*note
Programmable Completion::) are enabled. This option is
@@ -4963,7 +4978,7 @@ Variables::).
Constructs::). The element with index 0 is the portion of the
string matching the entire regular expression. The element with
index N is the portion of the string matching the Nth parenthesized
subexpression. This variable is read-only.
subexpression.
'BASH_SOURCE'
An array variable whose members are the source filenames where the
@@ -6776,66 +6791,62 @@ startup files.
option, so numeric arguments to 'shift' that exceed the number of
positional parameters will result in an error message.
45. Enabling POSIX mode has the effect of setting the 'posixglob'
option, which affects how unquoted backslashes are treated during
filename expansion (*note Filename Expansion::).
46. When the 'alias' builtin displays alias definitions, it does not
45. When the 'alias' builtin displays alias definitions, it does not
display them with a leading 'alias ' unless the '-p' option is
supplied.
47. When the 'set' builtin is invoked without options, it does not
46. When the 'set' builtin is invoked without options, it does not
display shell function names and definitions.
48. When the 'set' builtin is invoked without options, it displays
47. When the 'set' builtin is invoked without options, it displays
variable values without quotes, unless they contain shell
metacharacters, even if the result contains nonprinting characters.
49. When the 'cd' builtin is invoked in LOGICAL mode, and the pathname
48. When the 'cd' builtin is invoked in LOGICAL mode, and the pathname
constructed from '$PWD' and the directory name supplied as an
argument does not refer to an existing directory, 'cd' will fail
instead of falling back to PHYSICAL mode.
50. When the 'cd' builtin cannot change a directory because the length
49. When the 'cd' builtin cannot change a directory because the length
of the pathname constructed from '$PWD' and the directory name
supplied as an argument exceeds PATH_MAX when all symbolic links
are expanded, 'cd' will fail instead of attempting to use only the
supplied directory name.
51. The 'pwd' builtin verifies that the value it prints is the same as
50. The 'pwd' builtin verifies that the value it prints is the same as
the current directory, even if it is not asked to check the file
system with the '-P' option.
52. When listing the history, the 'fc' builtin does not include an
51. When listing the history, the 'fc' builtin does not include an
indication of whether or not a history entry has been modified.
53. The default editor used by 'fc' is 'ed'.
52. The default editor used by 'fc' is 'ed'.
54. The 'type' and 'command' builtins will not report a non-executable
53. The 'type' and 'command' builtins will not report a non-executable
file as having been found, though the shell will attempt to execute
such a file if it is the only so-named file found in '$PATH'.
55. The 'vi' editing mode will invoke the 'vi' editor directly when
54. The 'vi' editing mode will invoke the 'vi' editor directly when
the 'v' command is run, instead of checking '$VISUAL' and
'$EDITOR'.
56. When the 'xpg_echo' option is enabled, Bash does not attempt to
55. When the 'xpg_echo' option is enabled, Bash does not attempt to
interpret any arguments to 'echo' as options. Each argument is
displayed, after escape characters are converted.
57. The 'ulimit' builtin uses a block size of 512 bytes for the '-c'
56. The 'ulimit' builtin uses a block size of 512 bytes for the '-c'
and '-f' options.
58. The arrival of 'SIGCHLD' when a trap is set on 'SIGCHLD' does not
57. The arrival of 'SIGCHLD' when a trap is set on 'SIGCHLD' does not
interrupt the 'wait' builtin and cause it to return immediately.
The trap command is run once for each child that exits.
59. The 'read' builtin may be interrupted by a signal for which a trap
58. The 'read' builtin may be interrupted by a signal for which a trap
has been set. If Bash receives a trapped signal while executing
'read', the trap handler executes and 'read' returns an exit status
greater than 128.
60. Bash removes an exited background process's status from the list
59. Bash removes an exited background process's status from the list
of such statuses after the 'wait' builtin is used to obtain it.
There is other POSIX behavior that Bash does not implement by default
@@ -7037,7 +7048,7 @@ File: bash.info, Node: Job Control Builtins, Next: Job Control Variables, Pre
option is encountered.
'wait'
wait [-fn] [JOBSPEC or PID ...]
wait [-fn] [-p VARNAME] [JOBSPEC or PID ...]
Wait until the child process specified by each process ID PID or
job specification JOBSPEC exits and return the exit status of the
@@ -7046,12 +7057,16 @@ File: bash.info, Node: Job Control Builtins, Next: Job Control Variables, Pre
for all running background jobs and the last-executed process
substitution, if its process id is the same as $!, and the return
status is zero. If the '-n' option is supplied, 'wait' waits for a
single job to terminate and returns its exit status. Supplying the
'-f' option, when job control is enabled, forces 'wait' to wait for
each PID or JOBSPEC to terminate before returning its status,
intead of returning when it changes status. If neither JOBSPEC nor
PID specifies an active child process of the shell, the return
status is 127.
single job to terminate and returns its exit status. If the '-p'
option is supplied, the process or job identifier of the job for
which the exit status is returned is assigned to the variable
VARNAME named by the option argument. The variable will be unset
initially, before any assignment. This is useful only when the
'-n' option is supplied. Supplying the '-f' option, when job
control is enabled, forces 'wait' to wait for each PID or JOBSPEC
to terminate before returning its status, intead of returning when
it changes status. If neither JOBSPEC nor PID specifies an active
child process of the shell, the return status is 127.
'disown'
disown [-ar] [-h] [JOBSPEC ... | PID ... ]
@@ -9490,11 +9505,13 @@ the current position in the history list.
'!?STRING[?]'
Refer to the most recent command preceding the current position in
the history list containing STRING. The trailing '?' may be
omitted if the STRING is followed immediately by a newline.
omitted if the STRING is followed immediately by a newline. If
STRING is missing, the string from the most recent search is used;
it is an error if there is no previous search string.
'^STRING1^STRING2^'
Quick Substitution. Repeat the last command, replacing STRING1
with STRING2. Equivalent to '!!:s/STRING1/STRING2/'.
with STRING2. Equivalent to '!!:s^STRING1^STRING2^'.
'!#'
The entire command line typed so far.
@@ -9541,7 +9558,8 @@ separated by single spaces.
The last argument.
'%'
The word matched by the most recent '?STRING?' search.
The first word matched by the most recent '?STRING?' search, if the
search string begins with a character that is part of a word.
'X-Y'
A range of words; '-Y' abbreviates '0-Y'.
@@ -9555,7 +9573,8 @@ separated by single spaces.
Abbreviates 'X-$'
'X-'
Abbreviates 'X-$' like 'X*', but omits the last word.
Abbreviates 'X-$' like 'X*', but omits the last word. If 'x' is
missing, it defaults to 0.
If a word designator is supplied without an event specification, the
previous command is used as the event.
@@ -9567,7 +9586,8 @@ File: bash.info, Node: Modifiers, Prev: Word Designators, Up: History Interac
---------------
After the optional word designator, you can add a sequence of one or
more of the following modifiers, each preceded by a ':'.
more of the following modifiers, each preceded by a ':'. These modify,
or edit, the word or words selected from the history event.
'h'
Remove a trailing pathname component, leaving only the head.
@@ -9590,15 +9610,19 @@ more of the following modifiers, each preceded by a ':'.
'x'
Quote the substituted words as with 'q', but break into words at
spaces, tabs, and newlines.
spaces, tabs, and newlines. The 'q' and 'x' modifiers are mutually
exclusive; the last one supplied is used.
's/OLD/NEW/'
Substitute NEW for the first occurrence of OLD in the event line.
Any delimiter may be used in place of '/'. The delimiter may be
quoted in OLD and NEW with a single backslash. If '&' appears in
NEW, it is replaced by OLD. A single backslash will quote the '&'.
The final delimiter is optional if it is the last character on the
input line.
Any character may be used as the delimiter in place of '/'. The
delimiter may be quoted in OLD and NEW with a single backslash. If
'&' appears in NEW, it is replaced by OLD. A single backslash will
quote the '&'. If OLD is null, it is set to the last OLD
substituted, or, if no previous history substitutions took place,
the last STRING in a !?STRING'[?]' search. If NEW is is null, each
matching OLD is deleted. The final delimiter is optional if it is
the last character on the input line.
'&'
Repeat the previous substitution.
@@ -9609,7 +9633,8 @@ more of the following modifiers, each preceded by a ':'.
conjunction with 's', as in 'gs/OLD/NEW/', or with '&'.
'G'
Apply the following 's' modifier once to each word in the event.
Apply the following 's' or '&' modifier once to each word in the
event.

File: bash.info, Node: Installing Bash, Next: Reporting Bugs, Prev: Using History Interactively, Up: Top
@@ -11019,7 +11044,7 @@ D.1 Index of Shell Builtin Commands
* :: Bourne Shell Builtins.
(line 11)
* [: Bourne Shell Builtins.
(line 269)
(line 270)
* alias: Bash Builtins. (line 11)
* bg: Job Control Builtins.
(line 7)
@@ -11043,7 +11068,7 @@ D.1 Index of Shell Builtin Commands
* dirs: Directory Stack Builtins.
(line 7)
* disown: Job Control Builtins.
(line 93)
(line 97)
* echo: Bash Builtins. (line 246)
* enable: Bash Builtins. (line 295)
* eval: Bourne Shell Builtins.
@@ -11061,7 +11086,7 @@ D.1 Index of Shell Builtin Commands
* getopts: Bourne Shell Builtins.
(line 143)
* hash: Bourne Shell Builtins.
(line 186)
(line 187)
* help: Bash Builtins. (line 324)
* history: Bash History Builtins.
(line 40)
@@ -11079,34 +11104,34 @@ D.1 Index of Shell Builtin Commands
* pushd: Directory Stack Builtins.
(line 53)
* pwd: Bourne Shell Builtins.
(line 206)
(line 207)
* read: Bash Builtins. (line 460)
* readarray: Bash Builtins. (line 554)
* readonly: Bourne Shell Builtins.
(line 216)
(line 217)
* return: Bourne Shell Builtins.
(line 235)
(line 236)
* set: The Set Builtin. (line 11)
* shift: Bourne Shell Builtins.
(line 256)
(line 257)
* shopt: The Shopt Builtin. (line 9)
* source: Bash Builtins. (line 563)
* suspend: Job Control Builtins.
(line 105)
(line 109)
* test: Bourne Shell Builtins.
(line 269)
(line 270)
* times: Bourne Shell Builtins.
(line 348)
(line 349)
* trap: Bourne Shell Builtins.
(line 354)
(line 355)
* type: Bash Builtins. (line 568)
* typeset: Bash Builtins. (line 600)
* ulimit: Bash Builtins. (line 606)
* umask: Bourne Shell Builtins.
(line 403)
(line 404)
* unalias: Bash Builtins. (line 705)
* unset: Bourne Shell Builtins.
(line 421)
(line 422)
* wait: Job Control Builtins.
(line 76)
@@ -11743,134 +11768,139 @@ D.5 Concept Index

Tag Table:
Node: Top887
Node: Introduction2797
Node: What is Bash?3013
Node: What is a shell?4127
Node: Definitions6665
Node: Basic Shell Features9616
Node: Shell Syntax10835
Node: Shell Operation11861
Node: Quoting13154
Node: Escape Character14454
Node: Single Quotes14939
Node: Double Quotes15287
Node: ANSI-C Quoting16565
Node: Locale Translation17824
Node: Comments18720
Node: Shell Commands19338
Node: Simple Commands20210
Node: Pipelines20841
Node: Lists23773
Node: Compound Commands25564
Node: Looping Constructs26576
Node: Conditional Constructs29071
Node: Command Grouping40239
Node: Coprocesses41718
Node: GNU Parallel43621
Node: Shell Functions47679
Node: Shell Parameters54762
Node: Positional Parameters59175
Node: Special Parameters60075
Node: Shell Expansions63829
Node: Brace Expansion65952
Node: Tilde Expansion68675
Node: Shell Parameter Expansion71292
Node: Command Substitution85725
Node: Arithmetic Expansion87080
Node: Process Substitution88012
Node: Word Splitting89132
Node: Filename Expansion91076
Node: Pattern Matching93713
Node: Quote Removal97699
Node: Redirections97994
Node: Executing Commands107552
Node: Simple Command Expansion108222
Node: Command Search and Execution110176
Node: Command Execution Environment112552
Node: Environment115536
Node: Exit Status117195
Node: Signals118865
Node: Shell Scripts120832
Node: Shell Builtin Commands123347
Node: Bourne Shell Builtins125385
Node: Bash Builtins146284
Node: Modifying Shell Behavior175209
Node: The Set Builtin175554
Node: The Shopt Builtin185967
Node: Special Builtins203945
Node: Shell Variables204924
Node: Bourne Shell Variables205361
Node: Bash Variables207465
Node: Bash Features238906
Node: Invoking Bash239805
Node: Bash Startup Files245818
Node: Interactive Shells250921
Node: What is an Interactive Shell?251331
Node: Is this Shell Interactive?251980
Node: Interactive Shell Behavior252795
Node: Bash Conditional Expressions256282
Node: Shell Arithmetic260859
Node: Aliases263799
Node: Arrays266419
Node: The Directory Stack271784
Node: Directory Stack Builtins272568
Node: Controlling the Prompt275536
Node: The Restricted Shell278457
Node: Bash POSIX Mode280939
Node: Job Control292066
Node: Job Control Basics292526
Node: Job Control Builtins297490
Node: Job Control Variables302308
Node: Command Line Editing303464
Node: Introduction and Notation305135
Node: Readline Interaction306758
Node: Readline Bare Essentials307949
Node: Readline Movement Commands309732
Node: Readline Killing Commands310692
Node: Readline Arguments312610
Node: Searching313654
Node: Readline Init File315840
Node: Readline Init File Syntax317099
Node: Conditional Init Constructs337538
Node: Sample Init File341734
Node: Bindable Readline Commands344851
Node: Commands For Moving346055
Node: Commands For History347914
Node: Commands For Text352209
Node: Commands For Killing355597
Node: Numeric Arguments358412
Node: Commands For Completion359551
Node: Keyboard Macros363742
Node: Miscellaneous Commands364429
Node: Readline vi Mode370382
Node: Programmable Completion371289
Node: Programmable Completion Builtins379069
Node: A Programmable Completion Example389764
Node: Using History Interactively395011
Node: Bash History Facilities395695
Node: Bash History Builtins398700
Node: History Interaction403231
Node: Event Designators406851
Node: Word Designators408070
Node: Modifiers409707
Node: Installing Bash411109
Node: Basic Installation412246
Node: Compilers and Options415504
Node: Compiling For Multiple Architectures416245
Node: Installation Names417938
Node: Specifying the System Type418756
Node: Sharing Defaults419472
Node: Operation Controls420145
Node: Optional Features421103
Node: Reporting Bugs431621
Node: Major Differences From The Bourne Shell432815
Node: GNU Free Documentation License449667
Node: Indexes474844
Node: Builtin Index475298
Node: Reserved Word Index482125
Node: Variable Index484573
Node: Function Index500397
Node: Concept Index513836
Node: Top897
Node: Introduction2817
Node: What is Bash?3033
Node: What is a shell?4147
Node: Definitions6685
Node: Basic Shell Features9636
Node: Shell Syntax10855
Node: Shell Operation11881
Node: Quoting13174
Node: Escape Character14474
Node: Single Quotes14959
Node: Double Quotes15307
Node: ANSI-C Quoting16585
Node: Locale Translation17844
Node: Comments18740
Node: Shell Commands19358
Node: Simple Commands20230
Node: Pipelines20861
Node: Lists23793
Node: Compound Commands25584
Node: Looping Constructs26596
Node: Conditional Constructs29091
Node: Command Grouping40662
Node: Coprocesses42141
Node: GNU Parallel44044
Node: Shell Functions48345
Node: Shell Parameters55428
Node: Positional Parameters59841
Node: Special Parameters60741
Node: Shell Expansions64495
Node: Brace Expansion66618
Node: Tilde Expansion69341
Node: Shell Parameter Expansion71958
Node: Command Substitution86391
Node: Arithmetic Expansion87746
Node: Process Substitution88678
Node: Word Splitting89798
Node: Filename Expansion91742
Node: Pattern Matching94291
Node: Quote Removal98277
Node: Redirections98572
Node: Executing Commands108130
Node: Simple Command Expansion108800
Node: Command Search and Execution110754
Node: Command Execution Environment113130
Node: Environment116114
Node: Exit Status117773
Node: Signals119443
Node: Shell Scripts121410
Node: Shell Builtin Commands124422
Node: Bourne Shell Builtins126460
Node: Bash Builtins147376
Node: Modifying Shell Behavior176301
Node: The Set Builtin176646
Node: The Shopt Builtin187059
Node: Special Builtins204729
Node: Shell Variables205708
Node: Bourne Shell Variables206145
Node: Bash Variables208249
Node: Bash Features239661
Node: Invoking Bash240560
Node: Bash Startup Files246573
Node: Interactive Shells251676
Node: What is an Interactive Shell?252086
Node: Is this Shell Interactive?252735
Node: Interactive Shell Behavior253550
Node: Bash Conditional Expressions257037
Node: Shell Arithmetic261614
Node: Aliases264554
Node: Arrays267174
Node: The Directory Stack272539
Node: Directory Stack Builtins273323
Node: Controlling the Prompt276291
Node: The Restricted Shell279212
Node: Bash POSIX Mode281694
Node: Job Control292627
Node: Job Control Basics293087
Node: Job Control Builtins298051
Node: Job Control Variables303197
Node: Command Line Editing304353
Node: Introduction and Notation306024
Node: Readline Interaction307647
Node: Readline Bare Essentials308838
Node: Readline Movement Commands310621
Node: Readline Killing Commands311581
Node: Readline Arguments313499
Node: Searching314543
Node: Readline Init File316729
Node: Readline Init File Syntax317988
Node: Conditional Init Constructs338427
Node: Sample Init File342623
Node: Bindable Readline Commands345740
Node: Commands For Moving346944
Node: Commands For History348803
Node: Commands For Text353098
Node: Commands For Killing356486
Node: Numeric Arguments359301
Node: Commands For Completion360440
Node: Keyboard Macros364631
Node: Miscellaneous Commands365318
Node: Readline vi Mode371271
Node: Programmable Completion372178
Node: Programmable Completion Builtins379958
Node: A Programmable Completion Example390653
Node: Using History Interactively395900
Node: Bash History Facilities396584
Node: Bash History Builtins399589
Node: History Interaction404120
Node: Event Designators407740
Node: Word Designators409094
Node: Modifiers410854
Node: Installing Bash412665
Node: Basic Installation413802
Node: Compilers and Options417060
Node: Compiling For Multiple Architectures417801
Node: Installation Names419494
Node: Specifying the System Type420312
Node: Sharing Defaults421028
Node: Operation Controls421701
Node: Optional Features422659
Node: Reporting Bugs433177
Node: Major Differences From The Bourne Shell434371
Node: GNU Free Documentation License451223
Node: Indexes476400
Node: Builtin Index476854
Node: Reserved Word Index483681
Node: Variable Index486129
Node: Function Index501953
Node: Concept Index515392

End Tag Table

Local Variables:
coding: utf-8
End:
BIN
View File
Binary file not shown.
+2202 -2148
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -87,13 +87,13 @@
@xrdef{Shell Expansions-pg}{22}
@xrdef{Brace Expansion-title}{Brace Expansion}
@xrdef{Brace Expansion-snt}{Section@tie 3.5.1}
@xrdef{Brace Expansion-pg}{23}
@xrdef{Tilde Expansion-title}{Tilde Expansion}
@xrdef{Tilde Expansion-snt}{Section@tie 3.5.2}
@xrdef{Brace Expansion-pg}{23}
@xrdef{Tilde Expansion-pg}{24}
@xrdef{Shell Parameter Expansion-title}{Shell Parameter Expansion}
@xrdef{Shell Parameter Expansion-snt}{Section@tie 3.5.3}
@xrdef{Tilde Expansion-pg}{24}
@xrdef{Shell Parameter Expansion-pg}{24}
@xrdef{Shell Parameter Expansion-pg}{25}
@xrdef{Command Substitution-title}{Command Substitution}
@xrdef{Command Substitution-snt}{Section@tie 3.5.4}
@xrdef{Arithmetic Expansion-title}{Arithmetic Expansion}
+59 -59
View File
@@ -1,80 +1,80 @@
\initial {.}
\entry {\code {.}}{44}
\entry{\code {.}}{44}
\initial {:}
\entry {\code {:}}{44}
\entry{\code {:}}{44}
\initial {[}
\entry {\code {[}}{48}
\entry{\code {[}}{48}
\initial {A}
\entry {\code {alias}}{51}
\entry{\code {alias}}{51}
\initial {B}
\entry {\code {bg}}{106}
\entry {\code {bind}}{51}
\entry {\code {break}}{45}
\entry {\code {builtin}}{53}
\entry{\code {bg}}{106}
\entry{\code {bind}}{51}
\entry{\code {break}}{45}
\entry{\code {builtin}}{53}
\initial {C}
\entry {\code {caller}}{53}
\entry {\code {cd}}{45}
\entry {\code {command}}{53}
\entry {\code {compgen}}{137}
\entry {\code {complete}}{137}
\entry {\code {compopt}}{141}
\entry {\code {continue}}{45}
\entry{\code {caller}}{53}
\entry{\code {cd}}{45}
\entry{\code {command}}{53}
\entry{\code {compgen}}{137}
\entry{\code {complete}}{137}
\entry{\code {compopt}}{141}
\entry{\code {continue}}{45}
\initial {D}
\entry {\code {declare}}{53}
\entry {\code {dirs}}{97}
\entry {\code {disown}}{107}
\entry{\code {declare}}{53}
\entry{\code {dirs}}{97}
\entry{\code {disown}}{107}
\initial {E}
\entry {\code {echo}}{55}
\entry {\code {enable}}{56}
\entry {\code {eval}}{45}
\entry {\code {exec}}{46}
\entry {\code {exit}}{46}
\entry {\code {export}}{46}
\entry{\code {echo}}{55}
\entry{\code {enable}}{56}
\entry{\code {eval}}{45}
\entry{\code {exec}}{46}
\entry{\code {exit}}{46}
\entry{\code {export}}{46}
\initial {F}
\entry {\code {fc}}{145}
\entry {\code {fg}}{106}
\entry{\code {fc}}{145}
\entry{\code {fg}}{106}
\initial {G}
\entry {\code {getopts}}{46}
\entry{\code {getopts}}{46}
\initial {H}
\entry {\code {hash}}{47}
\entry {\code {help}}{56}
\entry {\code {history}}{145}
\entry{\code {hash}}{47}
\entry{\code {help}}{56}
\entry{\code {history}}{145}
\initial {J}
\entry {\code {jobs}}{106}
\entry{\code {jobs}}{106}
\initial {K}
\entry {\code {kill}}{107}
\entry{\code {kill}}{107}
\initial {L}
\entry {\code {let}}{56}
\entry {\code {local}}{56}
\entry {\code {logout}}{57}
\entry{\code {let}}{56}
\entry{\code {local}}{56}
\entry{\code {logout}}{57}
\initial {M}
\entry {\code {mapfile}}{57}
\entry{\code {mapfile}}{57}
\initial {P}
\entry {\code {popd}}{97}
\entry {\code {printf}}{57}
\entry {\code {pushd}}{98}
\entry {\code {pwd}}{47}
\entry{\code {popd}}{97}
\entry{\code {printf}}{57}
\entry{\code {pushd}}{98}
\entry{\code {pwd}}{47}
\initial {R}
\entry {\code {read}}{58}
\entry {\code {readarray}}{60}
\entry {\code {readonly}}{47}
\entry {\code {return}}{48}
\entry{\code {read}}{58}
\entry{\code {readarray}}{60}
\entry{\code {readonly}}{47}
\entry{\code {return}}{48}
\initial {S}
\entry {\code {set}}{62}
\entry {\code {shift}}{48}
\entry {\code {shopt}}{66}
\entry {\code {source}}{60}
\entry {\code {suspend}}{108}
\entry{\code {set}}{62}
\entry{\code {shift}}{48}
\entry{\code {shopt}}{66}
\entry{\code {source}}{60}
\entry{\code {suspend}}{108}
\initial {T}
\entry {\code {test}}{48}
\entry {\code {times}}{50}
\entry {\code {trap}}{50}
\entry {\code {type}}{60}
\entry {\code {typeset}}{60}
\entry{\code {test}}{48}
\entry{\code {times}}{50}
\entry{\code {trap}}{50}
\entry{\code {type}}{60}
\entry{\code {typeset}}{60}
\initial {U}
\entry {\code {ulimit}}{60}
\entry {\code {umask}}{51}
\entry {\code {unalias}}{62}
\entry {\code {unset}}{51}
\entry{\code {ulimit}}{60}
\entry{\code {umask}}{51}
\entry{\code {unalias}}{62}
\entry{\code {unset}}{51}
\initial {W}
\entry {\code {wait}}{107}
\entry{\code {wait}}{107}
+2 -2
View File
@@ -49,8 +49,8 @@
\entry{expansion, brace}{23}{expansion, brace}
\entry{tilde expansion}{24}{tilde expansion}
\entry{expansion, tilde}{24}{expansion, tilde}
\entry{parameter expansion}{24}{parameter expansion}
\entry{expansion, parameter}{24}{expansion, parameter}
\entry{parameter expansion}{25}{parameter expansion}
\entry{expansion, parameter}{25}{expansion, parameter}
\entry{command substitution}{31}{command substitution}
\entry{expansion, arithmetic}{31}{expansion, arithmetic}
\entry{arithmetic expansion}{31}{arithmetic expansion}
+114 -114
View File
@@ -1,136 +1,136 @@
\initial {A}
\entry {alias expansion}{94}
\entry {arithmetic evaluation}{93}
\entry {arithmetic expansion}{31}
\entry {arithmetic, shell}{93}
\entry {arrays}{95}
\entry{alias expansion}{94}
\entry{arithmetic evaluation}{93}
\entry{arithmetic expansion}{31}
\entry{arithmetic, shell}{93}
\entry{arrays}{95}
\initial {B}
\entry {background}{105}
\entry {Bash configuration}{150}
\entry {Bash installation}{150}
\entry {Bourne shell}{5}
\entry {brace expansion}{23}
\entry {builtin}{3}
\entry{background}{105}
\entry{Bash configuration}{150}
\entry{Bash installation}{150}
\entry{Bourne shell}{5}
\entry{brace expansion}{23}
\entry{builtin}{3}
\initial {C}
\entry {command editing}{110}
\entry {command execution}{39}
\entry {command expansion}{38}
\entry {command history}{144}
\entry {command search}{39}
\entry {command substitution}{31}
\entry {command timing}{8}
\entry {commands, compound}{9}
\entry {commands, conditional}{11}
\entry {commands, grouping}{15}
\entry {commands, lists}{9}
\entry {commands, looping}{10}
\entry {commands, pipelines}{8}
\entry {commands, shell}{8}
\entry {commands, simple}{8}
\entry {comments, shell}{7}
\entry {completion builtins}{137}
\entry {configuration}{150}
\entry {control operator}{3}
\entry {coprocess}{15}
\entry{command editing}{110}
\entry{command execution}{39}
\entry{command expansion}{38}
\entry{command history}{144}
\entry{command search}{39}
\entry{command substitution}{31}
\entry{command timing}{8}
\entry{commands, compound}{9}
\entry{commands, conditional}{11}
\entry{commands, grouping}{15}
\entry{commands, lists}{9}
\entry{commands, looping}{10}
\entry{commands, pipelines}{8}
\entry{commands, shell}{8}
\entry{commands, simple}{8}
\entry{comments, shell}{7}
\entry{completion builtins}{137}
\entry{configuration}{150}
\entry{control operator}{3}
\entry{coprocess}{15}
\initial {D}
\entry {directory stack}{97}
\entry{directory stack}{97}
\initial {E}
\entry {editing command lines}{110}
\entry {environment}{40}
\entry {evaluation, arithmetic}{93}
\entry {event designators}{147}
\entry {execution environment}{39}
\entry {exit status}{3, 41}
\entry {expansion}{22}
\entry {expansion, arithmetic}{31}
\entry {expansion, brace}{23}
\entry {expansion, filename}{32}
\entry {expansion, parameter}{24}
\entry {expansion, pathname}{32}
\entry {expansion, tilde}{24}
\entry {expressions, arithmetic}{93}
\entry {expressions, conditional}{91}
\entry{editing command lines}{110}
\entry{environment}{40}
\entry{evaluation, arithmetic}{93}
\entry{event designators}{147}
\entry{execution environment}{39}
\entry{exit status}{3, 41}
\entry{expansion}{22}
\entry{expansion, arithmetic}{31}
\entry{expansion, brace}{23}
\entry{expansion, filename}{32}
\entry{expansion, parameter}{25}
\entry{expansion, pathname}{32}
\entry{expansion, tilde}{24}
\entry{expressions, arithmetic}{93}
\entry{expressions, conditional}{91}
\initial {F}
\entry {field}{3}
\entry {filename}{3}
\entry {filename expansion}{32}
\entry {foreground}{105}
\entry {functions, shell}{17}
\entry{field}{3}
\entry{filename}{3}
\entry{filename expansion}{32}
\entry{foreground}{105}
\entry{functions, shell}{17}
\initial {H}
\entry {history builtins}{144}
\entry {history events}{147}
\entry {history expansion}{146}
\entry {history list}{144}
\entry {History, how to use}{143}
\entry{history builtins}{144}
\entry{history events}{147}
\entry{history expansion}{146}
\entry{history list}{144}
\entry{History, how to use}{143}
\initial {I}
\entry {identifier}{3}
\entry {initialization file, readline}{112}
\entry {installation}{150}
\entry {interaction, readline}{109}
\entry {interactive shell}{88, 89}
\entry {internationalization}{7}
\entry{identifier}{3}
\entry{initialization file, readline}{112}
\entry{installation}{150}
\entry{interaction, readline}{109}
\entry{interactive shell}{88, 89}
\entry{internationalization}{7}
\initial {J}
\entry {job}{3}
\entry {job control}{3, 105}
\entry{job}{3}
\entry{job control}{3, 105}
\initial {K}
\entry {kill ring}{111}
\entry {killing text}{111}
\entry{kill ring}{111}
\entry{killing text}{111}
\initial {L}
\entry {localization}{7}
\entry {login shell}{88}
\entry{localization}{7}
\entry{login shell}{88}
\initial {M}
\entry {matching, pattern}{33}
\entry {metacharacter}{3}
\entry{matching, pattern}{33}
\entry{metacharacter}{3}
\initial {N}
\entry {name}{3}
\entry {native languages}{7}
\entry {notation, readline}{110}
\entry{name}{3}
\entry{native languages}{7}
\entry{notation, readline}{110}
\initial {O}
\entry {operator, shell}{3}
\entry{operator, shell}{3}
\initial {P}
\entry {parameter expansion}{24}
\entry {parameters}{20}
\entry {parameters, positional}{21}
\entry {parameters, special}{21}
\entry {pathname expansion}{32}
\entry {pattern matching}{33}
\entry {pipeline}{8}
\entry {POSIX}{3}
\entry {POSIX Mode}{100}
\entry {process group}{3}
\entry {process group ID}{3}
\entry {process substitution}{31}
\entry {programmable completion}{135}
\entry {prompting}{98}
\entry{parameter expansion}{25}
\entry{parameters}{20}
\entry{parameters, positional}{21}
\entry{parameters, special}{21}
\entry{pathname expansion}{32}
\entry{pattern matching}{33}
\entry{pipeline}{8}
\entry{POSIX}{3}
\entry{POSIX Mode}{100}
\entry{process group}{3}
\entry{process group ID}{3}
\entry{process substitution}{31}
\entry{programmable completion}{135}
\entry{prompting}{98}
\initial {Q}
\entry {quoting}{6}
\entry {quoting, ANSI}{6}
\entry{quoting}{6}
\entry{quoting, ANSI}{6}
\initial {R}
\entry {Readline, how to use}{108}
\entry {redirection}{34}
\entry {reserved word}{3}
\entry {restricted shell}{100}
\entry {return status}{4}
\entry{Readline, how to use}{108}
\entry{redirection}{34}
\entry{reserved word}{3}
\entry{restricted shell}{100}
\entry{return status}{4}
\initial {S}
\entry {shell arithmetic}{93}
\entry {shell function}{17}
\entry {shell script}{42}
\entry {shell variable}{20}
\entry {shell, interactive}{89}
\entry {signal}{4}
\entry {signal handling}{41}
\entry {special builtin}{4, 72}
\entry {startup files}{88}
\entry {suspending jobs}{105}
\entry{shell arithmetic}{93}
\entry{shell function}{17}
\entry{shell script}{42}
\entry{shell variable}{20}
\entry{shell, interactive}{89}
\entry{signal}{4}
\entry{signal handling}{41}
\entry{special builtin}{4, 72}
\entry{startup files}{88}
\entry{suspending jobs}{105}
\initial {T}
\entry {tilde expansion}{24}
\entry {token}{4}
\entry {translation, native languages}{7}
\entry{tilde expansion}{24}
\entry{token}{4}
\entry{translation, native languages}{7}
\initial {V}
\entry {variable, shell}{20}
\entry {variables, readline}{113}
\entry{variable, shell}{20}
\entry{variables, readline}{113}
\initial {W}
\entry {word}{4}
\entry {word splitting}{32}
\entry{word}{4}
\entry{word splitting}{32}
\initial {Y}
\entry {yanking text}{111}
\entry{yanking text}{111}
BIN
View File
Binary file not shown.
+111 -111
View File
@@ -1,131 +1,131 @@
\initial {A}
\entry {\code {abort (C-g)}}{132}
\entry {\code {accept-line (Newline or Return)}}{126}
\entry {\code {alias-expand-line ()}}{134}
\entry{\code {abort (C-g)}}{132}
\entry{\code {accept-line (Newline or Return)}}{126}
\entry{\code {alias-expand-line ()}}{134}
\initial {B}
\entry {\code {backward-char (C-b)}}{125}
\entry {\code {backward-delete-char (Rubout)}}{128}
\entry {\code {backward-kill-line (C-x Rubout)}}{129}
\entry {\code {backward-kill-word (M-\key {DEL})}}{129}
\entry {\code {backward-word (M-b)}}{125}
\entry {\code {beginning-of-history (M-<)}}{126}
\entry {\code {beginning-of-line (C-a)}}{125}
\entry {\code {bracketed-paste-begin ()}}{128}
\entry{\code {backward-char (C-b)}}{125}
\entry{\code {backward-delete-char (Rubout)}}{128}
\entry{\code {backward-kill-line (C-x Rubout)}}{129}
\entry{\code {backward-kill-word (M-\key {DEL})}}{129}
\entry{\code {backward-word (M-b)}}{125}
\entry{\code {beginning-of-history (M-<)}}{126}
\entry{\code {beginning-of-line (C-a)}}{125}
\entry{\code {bracketed-paste-begin ()}}{128}
\initial {C}
\entry {\code {call-last-kbd-macro (C-x e)}}{132}
\entry {\code {capitalize-word (M-c)}}{128}
\entry {\code {character-search (C-])}}{133}
\entry {\code {character-search-backward (M-C-])}}{133}
\entry {\code {clear-screen (C-l)}}{126}
\entry {\code {complete (\key {TAB})}}{130}
\entry {\code {complete-command (M-!)}}{131}
\entry {\code {complete-filename (M-/)}}{131}
\entry {\code {complete-hostname (M-@)}}{131}
\entry {\code {complete-into-braces (M-{\tt \char 123})}}{132}
\entry {\code {complete-username (M-~)}}{131}
\entry {\code {complete-variable (M-$)}}{131}
\entry {\code {copy-backward-word ()}}{130}
\entry {\code {copy-forward-word ()}}{130}
\entry {\code {copy-region-as-kill ()}}{130}
\entry{\code {call-last-kbd-macro (C-x e)}}{132}
\entry{\code {capitalize-word (M-c)}}{128}
\entry{\code {character-search (C-])}}{133}
\entry{\code {character-search-backward (M-C-])}}{133}
\entry{\code {clear-screen (C-l)}}{126}
\entry{\code {complete (\key {TAB})}}{130}
\entry{\code {complete-command (M-!)}}{131}
\entry{\code {complete-filename (M-/)}}{131}
\entry{\code {complete-hostname (M-@)}}{131}
\entry{\code {complete-into-braces (M-{\tt \char 123})}}{132}
\entry{\code {complete-username (M-~)}}{131}
\entry{\code {complete-variable (M-$)}}{131}
\entry{\code {copy-backward-word ()}}{130}
\entry{\code {copy-forward-word ()}}{130}
\entry{\code {copy-region-as-kill ()}}{130}
\initial {D}
\entry {\code {dabbrev-expand ()}}{132}
\entry {\code {delete-char (C-d)}}{127}
\entry {\code {delete-char-or-list ()}}{131}
\entry {\code {delete-horizontal-space ()}}{129}
\entry {\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}{130}
\entry {\code {display-shell-version (C-x C-v)}}{134}
\entry {\code {do-lowercase-version (M-A, M-B, M-\var {x}, \dots {})}}{132}
\entry {\code {downcase-word (M-l)}}{128}
\entry {\code {dump-functions ()}}{133}
\entry {\code {dump-macros ()}}{134}
\entry {\code {dump-variables ()}}{133}
\entry {\code {dynamic-complete-history (M-\key {TAB})}}{132}
\entry{\code {dabbrev-expand ()}}{132}
\entry{\code {delete-char (C-d)}}{127}
\entry{\code {delete-char-or-list ()}}{131}
\entry{\code {delete-horizontal-space ()}}{129}
\entry{\code {digit-argument (\kbd {M-0}, \kbd {M-1}, \dots {} \kbd {M--})}}{130}
\entry{\code {display-shell-version (C-x C-v)}}{134}
\entry{\code {do-lowercase-version (M-A, M-B, M-\var {x}, \dots {})}}{132}
\entry{\code {downcase-word (M-l)}}{128}
\entry{\code {dump-functions ()}}{133}
\entry{\code {dump-macros ()}}{134}
\entry{\code {dump-variables ()}}{133}
\entry{\code {dynamic-complete-history (M-\key {TAB})}}{132}
\initial {E}
\entry {\code {edit-and-execute-command (C-x C-e)}}{134}
\entry {\code {end-kbd-macro (C-x ))}}{132}
\entry {\code {\i {end-of-file} (usually C-d)}}{127}
\entry {\code {end-of-history (M->)}}{126}
\entry {\code {end-of-line (C-e)}}{125}
\entry {\code {exchange-point-and-mark (C-x C-x)}}{133}
\entry{\code {edit-and-execute-command (C-x C-e)}}{134}
\entry{\code {end-kbd-macro (C-x ))}}{132}
\entry{\code {\i {end-of-file} (usually C-d)}}{127}
\entry{\code {end-of-history (M->)}}{126}
\entry{\code {end-of-line (C-e)}}{125}
\entry{\code {exchange-point-and-mark (C-x C-x)}}{133}
\initial {F}
\entry {\code {forward-backward-delete-char ()}}{128}
\entry {\code {forward-char (C-f)}}{125}
\entry {\code {forward-search-history (C-s)}}{126}
\entry {\code {forward-word (M-f)}}{125}
\entry{\code {forward-backward-delete-char ()}}{128}
\entry{\code {forward-char (C-f)}}{125}
\entry{\code {forward-search-history (C-s)}}{126}
\entry{\code {forward-word (M-f)}}{125}
\initial {G}
\entry {\code {glob-complete-word (M-g)}}{134}
\entry {\code {glob-expand-word (C-x *)}}{134}
\entry {\code {glob-list-expansions (C-x g)}}{134}
\entry{\code {glob-complete-word (M-g)}}{134}
\entry{\code {glob-expand-word (C-x *)}}{134}
\entry{\code {glob-list-expansions (C-x g)}}{134}
\initial {H}
\entry {\code {history-and-alias-expand-line ()}}{134}
\entry {\code {history-expand-line (M-^)}}{134}
\entry {\code {history-search-backward ()}}{127}
\entry {\code {history-search-forward ()}}{126}
\entry {\code {history-substring-search-backward ()}}{127}
\entry {\code {history-substring-search-forward ()}}{127}
\entry{\code {history-and-alias-expand-line ()}}{134}
\entry{\code {history-expand-line (M-^)}}{134}
\entry{\code {history-search-backward ()}}{127}
\entry{\code {history-search-forward ()}}{126}
\entry{\code {history-substring-search-backward ()}}{127}
\entry{\code {history-substring-search-forward ()}}{127}
\initial {I}
\entry {\code {insert-comment (M-#)}}{133}
\entry {\code {insert-completions (M-*)}}{131}
\entry {\code {insert-last-argument (M-. or M-_)}}{134}
\entry{\code {insert-comment (M-#)}}{133}
\entry{\code {insert-completions (M-*)}}{131}
\entry{\code {insert-last-argument (M-. or M-_)}}{134}
\initial {K}
\entry {\code {kill-line (C-k)}}{129}
\entry {\code {kill-region ()}}{129}
\entry {\code {kill-whole-line ()}}{129}
\entry {\code {kill-word (M-d)}}{129}
\entry{\code {kill-line (C-k)}}{129}
\entry{\code {kill-region ()}}{129}
\entry{\code {kill-whole-line ()}}{129}
\entry{\code {kill-word (M-d)}}{129}
\initial {M}
\entry {\code {magic-space ()}}{134}
\entry {\code {menu-complete ()}}{131}
\entry {\code {menu-complete-backward ()}}{131}
\entry{\code {magic-space ()}}{134}
\entry{\code {menu-complete ()}}{131}
\entry{\code {menu-complete-backward ()}}{131}
\initial {N}
\entry {\code {next-history (C-n)}}{126}
\entry {\code {next-screen-line ()}}{126}
\entry {\code {non-incremental-forward-search-history (M-n)}}{126}
\entry {\code {non-incremental-reverse-search-history (M-p)}}{126}
\entry{\code {next-history (C-n)}}{126}
\entry{\code {next-screen-line ()}}{126}
\entry{\code {non-incremental-forward-search-history (M-n)}}{126}
\entry{\code {non-incremental-reverse-search-history (M-p)}}{126}
\initial {O}
\entry {\code {operate-and-get-next (C-o)}}{134}
\entry {\code {overwrite-mode ()}}{128}
\entry{\code {operate-and-get-next (C-o)}}{134}
\entry{\code {overwrite-mode ()}}{128}
\initial {P}
\entry {\code {possible-command-completions (C-x !)}}{132}
\entry {\code {possible-completions (M-?)}}{130}
\entry {\code {possible-filename-completions (C-x /)}}{131}
\entry {\code {possible-hostname-completions (C-x @)}}{131}
\entry {\code {possible-username-completions (C-x ~)}}{131}
\entry {\code {possible-variable-completions (C-x $)}}{131}
\entry {\code {prefix-meta (\key {ESC})}}{132}
\entry {\code {previous-history (C-p)}}{126}
\entry {\code {previous-screen-line ()}}{125}
\entry {\code {print-last-kbd-macro ()}}{132}
\entry{\code {possible-command-completions (C-x !)}}{132}
\entry{\code {possible-completions (M-?)}}{130}
\entry{\code {possible-filename-completions (C-x /)}}{131}
\entry{\code {possible-hostname-completions (C-x @)}}{131}
\entry{\code {possible-username-completions (C-x ~)}}{131}
\entry{\code {possible-variable-completions (C-x $)}}{131}
\entry{\code {prefix-meta (\key {ESC})}}{132}
\entry{\code {previous-history (C-p)}}{126}
\entry{\code {previous-screen-line ()}}{125}
\entry{\code {print-last-kbd-macro ()}}{132}
\initial {Q}
\entry {\code {quoted-insert (C-q or C-v)}}{128}
\entry{\code {quoted-insert (C-q or C-v)}}{128}
\initial {R}
\entry {\code {re-read-init-file (C-x C-r)}}{132}
\entry {\code {redraw-current-line ()}}{126}
\entry {\code {reverse-search-history (C-r)}}{126}
\entry {\code {revert-line (M-r)}}{133}
\entry{\code {re-read-init-file (C-x C-r)}}{132}
\entry{\code {redraw-current-line ()}}{126}
\entry{\code {reverse-search-history (C-r)}}{126}
\entry{\code {revert-line (M-r)}}{133}
\initial {S}
\entry {\code {self-insert (a, b, A, 1, !, \dots {})}}{128}
\entry {\code {set-mark (C-@)}}{133}
\entry {\code {shell-backward-kill-word ()}}{129}
\entry {\code {shell-backward-word (M-C-b)}}{125}
\entry {\code {shell-expand-line (M-C-e)}}{134}
\entry {\code {shell-forward-word (M-C-f)}}{125}
\entry {\code {shell-kill-word (M-C-d)}}{129}
\entry {\code {shell-transpose-words (M-C-t)}}{129}
\entry {\code {skip-csi-sequence ()}}{133}
\entry {\code {start-kbd-macro (C-x ()}}{132}
\entry{\code {self-insert (a, b, A, 1, !, \dots {})}}{128}
\entry{\code {set-mark (C-@)}}{133}
\entry{\code {shell-backward-kill-word ()}}{129}
\entry{\code {shell-backward-word (M-C-b)}}{125}
\entry{\code {shell-expand-line (M-C-e)}}{134}
\entry{\code {shell-forward-word (M-C-f)}}{125}
\entry{\code {shell-kill-word (M-C-d)}}{129}
\entry{\code {shell-transpose-words (M-C-t)}}{129}
\entry{\code {skip-csi-sequence ()}}{133}
\entry{\code {start-kbd-macro (C-x ()}}{132}
\initial {T}
\entry {\code {tilde-expand (M-&)}}{133}
\entry {\code {transpose-chars (C-t)}}{128}
\entry {\code {transpose-words (M-t)}}{128}
\entry{\code {tilde-expand (M-&)}}{133}
\entry{\code {transpose-chars (C-t)}}{128}
\entry{\code {transpose-words (M-t)}}{128}
\initial {U}
\entry {\code {undo (C-_ or C-x C-u)}}{132}
\entry {\code {universal-argument ()}}{130}
\entry {\code {unix-filename-rubout ()}}{129}
\entry {\code {unix-line-discard (C-u)}}{129}
\entry {\code {unix-word-rubout (C-w)}}{129}
\entry {\code {upcase-word (M-u)}}{128}
\entry{\code {undo (C-_ or C-x C-u)}}{132}
\entry{\code {universal-argument ()}}{130}
\entry{\code {unix-filename-rubout ()}}{129}
\entry{\code {unix-line-discard (C-u)}}{129}
\entry{\code {unix-word-rubout (C-w)}}{129}
\entry{\code {upcase-word (M-u)}}{128}
\initial {Y}
\entry {\code {yank (C-y)}}{130}
\entry {\code {yank-last-arg (M-. or M-_)}}{127}
\entry {\code {yank-nth-arg (M-C-y)}}{127}
\entry {\code {yank-pop (M-y)}}{130}
\entry{\code {yank (C-y)}}{130}
\entry{\code {yank-last-arg (M-. or M-_)}}{127}
\entry{\code {yank-nth-arg (M-C-y)}}{127}
\entry{\code {yank-pop (M-y)}}{130}
+1210 -1469
View File
File diff suppressed because it is too large Load Diff
+264 -234
View File
@@ -1,10 +1,10 @@
This is bashref.info, produced by makeinfo version 6.5 from
This is bashref.info, produced by makeinfo version 6.7 from
bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.0, 8 July 2019).
Bash shell (version 5.0, 22 November 2019).
This is Edition 5.0, last updated 8 July 2019, of 'The GNU Bash
This is Edition 5.0, last updated 22 November 2019, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.0.
Copyright (C) 1988-2018 Free Software Foundation, Inc.
@@ -27,10 +27,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
Bash shell (version 5.0, 8 July 2019). The Bash home page is
Bash shell (version 5.0, 22 November 2019). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.0, last updated 8 July 2019, of 'The GNU Bash
This is Edition 5.0, last updated 22 November 2019, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.0.
Bash contains features that appear in other popular shells, and some
@@ -893,7 +893,8 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre
An additional binary operator, '=~', is available, with the same
precedence as '==' and '!='. When it is used, the string to the
right of the operator is considered a POSIX extended regular
expression and matched accordingly (as in regex3)). The return
expression and matched accordingly (using the POSIX 'regcomp' and
'regexec' interfaces usually described in regex(3)). The return
value is 0 if the string matches the pattern, and 1 otherwise. If
the regular expression is syntactically incorrect, the conditional
expression's return value is 2. If the 'nocasematch' shell option
@@ -905,18 +906,24 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre
normal quoting characters lose their meanings between brackets. If
the pattern is stored in a shell variable, quoting the variable
expansion forces the entire pattern to be matched as a string.
The pattern will match if it matches any part of the string.
Anchor the pattern using the '^' and '$' regular expression
operators to force it to match the entire string. The array
variable 'BASH_REMATCH' records which parts of the string matched
the pattern. The element of 'BASH_REMATCH' with index 0 contains
the portion of the string matching the entire regular expression.
Substrings matched by parenthesized subexpressions within the
regular expression are saved in the array variable 'BASH_REMATCH'.
The element of 'BASH_REMATCH' with index 0 is the portion of the
string matching the entire regular expression. The element of
'BASH_REMATCH' with index N is the portion of the string matching
the Nth parenthesized subexpression.
regular expression are saved in the remaining 'BASH_REMATCH'
indices. The element of 'BASH_REMATCH' with index N is the portion
of the string matching the Nth parenthesized subexpression.
For example, the following will match a line (stored in the shell
variable LINE) if there is a sequence of characters in the value
consisting of any number, including zero, of space characters, zero
or one instances of 'a', then a 'b':
[[ $line =~ [[:space:]]*?(a)b ]]
variable LINE) if there is a sequence of characters anywhere in the
value consisting of any number, including zero, of characters in
the 'space' character class, zero or one instances of 'a', then a
'b':
[[ $line =~ [[:space:]]*(a)?b ]]
That means values like 'aab' and ' aaaaaab' will match, as will a
line containing a 'b' anywhere in its value.
@@ -929,7 +936,7 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre
to the shell's quote removal. Using a shell variable to store the
pattern decreases these problems. For example, the following is
equivalent to the above:
pattern='[[:space:]]*?(a)b'
pattern='[[:space:]]*(a)?b'
[[ $line =~ $pattern ]]
If you want to match a character that's special to the regular
@@ -1083,21 +1090,27 @@ names, use find's '-print0' option and parallel's '-0' option.
You can use Parallel to move files from the current directory when
the number of files is too large to process with one 'mv' invocation:
ls | parallel mv {} destdir
printf '%s\n' * | parallel mv {} destdir
As you can see, the {} is replaced with each line read from standard
input. While using 'ls' will work in most instances, it is not
sufficient to deal with all filenames. If you need to accommodate
special characters in filenames, you can use
sufficient to deal with all filenames. 'printf' is a shell builtin, and
therefore is not subject to the kernel's limit on the number of
arguments to a program, so you can use '*' (but see below about the
'dotglob' shell option). If you need to accommodate special characters
in filenames, you can use
find . -depth 1 \! -name '.*' -print0 | parallel -0 mv {} destdir
printf '%s\0' * | parallel -0 mv {} destdir
as alluded to above.
This will run as many 'mv' commands as there are files in the current
directory. You can emulate a parallel 'xargs' by adding the '-X'
option:
find . -depth 1 \! -name '.*' -print0 | parallel -0 -X mv {} destdir
printf '%s\0' * | parallel -0 -X mv {} destdir
(You may have to modify the pattern if you have the 'dotglob' option
enabled.)
GNU Parallel can replace certain common idioms that operate on lines
read from a file (in this case, filenames listed one per line):
@@ -1410,7 +1423,7 @@ only be referenced; assignment to them is not allowed.
the expansion is not within double quotes, each positional
parameter expands to a separate word. In contexts where it is
performed, those words are subject to further word splitting and
pathname expansion. When the expansion occurs within double
filename expansion. When the expansion occurs within double
quotes, it expands to a single word with the value of each
parameter separated by the first character of the 'IFS' special
variable. That is, '"$*"' is equivalent to '"$1C$2C..."', where C
@@ -1984,7 +1997,7 @@ omitted, the operator tests only for existence.
and the expansion is the resultant list.
The result of the expansion is subject to word splitting and
pathname expansion as described below.
filename expansion as described below.

File: bashref.info, Node: Command Substitution, Next: Arithmetic Expansion, Prev: Shell Parameter Expansion, Up: Shell Expansions
@@ -2116,18 +2129,17 @@ File: bashref.info, Node: Filename Expansion, Next: Quote Removal, Prev: Word
* Pattern Matching:: How the shell matches patterns.
After word splitting, unless the '-f' option has been set (*note The Set
Builtin::), Bash scans each word for the characters '*', '?', '[', and,
under certain circumstances (e.g., when it appears in the expansion of
an unquoted shell variable), '\\'. If one of these characters appears,
then the word is regarded as a PATTERN, and replaced with an
alphabetically sorted list of filenames matching the pattern (*note
Pattern Matching::). If no matching filenames are found, and the shell
option 'nullglob' is disabled, the word is left unchanged. If the
'nullglob' option is set, and no matches are found, the word is removed.
If the 'failglob' shell option is set, and no matches are found, an
error message is printed and the command is not executed. If the shell
option 'nocaseglob' is enabled, the match is performed without regard to
the case of alphabetic characters.
Builtin::), Bash scans each word for the characters '*', '?', and '['.
If one of these characters appears, and is not quoted, then the word is
regarded as a PATTERN, and replaced with an alphabetically sorted list
of filenames matching the pattern (*note Pattern Matching::). If no
matching filenames are found, and the shell option 'nullglob' is
disabled, the word is left unchanged. If the 'nullglob' option is set,
and no matches are found, the word is removed. If the 'failglob' shell
option is set, and no matches are found, an error message is printed and
the command is not executed. If the shell option 'nocaseglob' is
enabled, the match is performed without regard to the case of alphabetic
characters.
When a pattern is used for filename expansion, the character '.' at
the start of a filename or immediately following a slash must be matched
@@ -2443,7 +2455,7 @@ A variant of here documents, the format is:
[N]<<< WORD
The WORD undergoes tilde expansion, parameter and variable expansion,
command substitution, arithmetic expansion, and quote removal. Pathname
command substitution, arithmetic expansion, and quote removal. Filename
expansion and word splitting are not performed. The result is supplied
as a single string, with a newline appended, to the command on its
standard input (or file descriptor N if N is specified).
@@ -2828,20 +2840,28 @@ of commands remembered by the parent (see the description of 'hash' in
Most versions of Unix make this a part of the operating system's
command execution mechanism. If the first line of a script begins with
the two characters '#!', the remainder of the line specifies an
interpreter for the program. Thus, you can specify Bash, 'awk', Perl,
or some other interpreter and write the rest of the script file in that
language.
interpreter for the program and, depending on the operating system, one
or more optional arguments for that interpreter. Thus, you can specify
Bash, 'awk', Perl, or some other interpreter and write the rest of the
script file in that language.
The arguments to the interpreter consist of a single optional
argument following the interpreter name on the first line of the script
The arguments to the interpreter consist of one or more optional
arguments following the interpreter name on the first line of the script
file, followed by the name of the script file, followed by the rest of
the arguments. Bash will perform this action on operating systems that
do not handle it themselves. Note that some older versions of Unix
limit the interpreter name and argument to a maximum of 32 characters.
the arguments supplied to the script. The details of how the
interpreter line is split into an interpreter name and a set of
arguments vary across systems. Bash will perform this action on
operating systems that do not handle it themselves. Note that some
older versions of Unix limit the interpreter name and a single argument
to a maximum of 32 characters, so it's not portable to assume that using
more than one argument will work.
Bash scripts often begin with '#! /bin/bash' (assuming that Bash has
been installed in '/bin'), since this ensures that Bash will be used to
interpret the script, even if it is executed under another shell.
interpret the script, even if it is executed under another shell. It's
a common idiom to use 'env' to find 'bash' even if it's been installed
in another directory: '#!/usr/bin/env bash' will find the first
occurrence of 'bash' in '$PATH'.

File: bashref.info, Node: Shell Builtin Commands, Next: Shell Variables, Prev: Basic Shell Features, Up: Top
@@ -3032,7 +3052,7 @@ standard.
supplied with a name that is not a shell function.
'getopts'
getopts OPTSTRING NAME [ARGS]
getopts OPTSTRING NAME [ARG ...]
'getopts' is used by shell scripts to parse positional parameters.
OPTSTRING contains the option characters to be recognized; if a
@@ -3054,7 +3074,8 @@ standard.
the first non-option argument, and NAME is set to '?'.
'getopts' normally parses the positional parameters, but if more
arguments are given in ARGS, 'getopts' parses those instead.
arguments are supplied as ARG values, 'getopts' parses those
instead.
'getopts' can report errors in two ways. If the first character of
OPTSTRING is a colon, SILENT error reporting is used. In normal
@@ -4681,12 +4702,6 @@ This builtin allows you to change additional shell optional behavior.
If set, Bash allows filename patterns which match no files to
expand to a null string, rather than themselves.
'posixglob'
If set, Bash makes words containing unquoted backslashes after
expansion eligible for filename expansion, even if they don't
contain any other unquoted pattern characters. This option is
enabled by default and is enabled when POSIX mode is enabled.
'progcomp'
If set, the programmable completion facilities (*note
Programmable Completion::) are enabled. This option is
@@ -4963,7 +4978,7 @@ Variables::).
Constructs::). The element with index 0 is the portion of the
string matching the entire regular expression. The element with
index N is the portion of the string matching the Nth parenthesized
subexpression. This variable is read-only.
subexpression.
'BASH_SOURCE'
An array variable whose members are the source filenames where the
@@ -6776,66 +6791,62 @@ startup files.
option, so numeric arguments to 'shift' that exceed the number of
positional parameters will result in an error message.
45. Enabling POSIX mode has the effect of setting the 'posixglob'
option, which affects how unquoted backslashes are treated during
filename expansion (*note Filename Expansion::).
46. When the 'alias' builtin displays alias definitions, it does not
45. When the 'alias' builtin displays alias definitions, it does not
display them with a leading 'alias ' unless the '-p' option is
supplied.
47. When the 'set' builtin is invoked without options, it does not
46. When the 'set' builtin is invoked without options, it does not
display shell function names and definitions.
48. When the 'set' builtin is invoked without options, it displays
47. When the 'set' builtin is invoked without options, it displays
variable values without quotes, unless they contain shell
metacharacters, even if the result contains nonprinting characters.
49. When the 'cd' builtin is invoked in LOGICAL mode, and the pathname
48. When the 'cd' builtin is invoked in LOGICAL mode, and the pathname
constructed from '$PWD' and the directory name supplied as an
argument does not refer to an existing directory, 'cd' will fail
instead of falling back to PHYSICAL mode.
50. When the 'cd' builtin cannot change a directory because the length
49. When the 'cd' builtin cannot change a directory because the length
of the pathname constructed from '$PWD' and the directory name
supplied as an argument exceeds PATH_MAX when all symbolic links
are expanded, 'cd' will fail instead of attempting to use only the
supplied directory name.
51. The 'pwd' builtin verifies that the value it prints is the same as
50. The 'pwd' builtin verifies that the value it prints is the same as
the current directory, even if it is not asked to check the file
system with the '-P' option.
52. When listing the history, the 'fc' builtin does not include an
51. When listing the history, the 'fc' builtin does not include an
indication of whether or not a history entry has been modified.
53. The default editor used by 'fc' is 'ed'.
52. The default editor used by 'fc' is 'ed'.
54. The 'type' and 'command' builtins will not report a non-executable
53. The 'type' and 'command' builtins will not report a non-executable
file as having been found, though the shell will attempt to execute
such a file if it is the only so-named file found in '$PATH'.
55. The 'vi' editing mode will invoke the 'vi' editor directly when
54. The 'vi' editing mode will invoke the 'vi' editor directly when
the 'v' command is run, instead of checking '$VISUAL' and
'$EDITOR'.
56. When the 'xpg_echo' option is enabled, Bash does not attempt to
55. When the 'xpg_echo' option is enabled, Bash does not attempt to
interpret any arguments to 'echo' as options. Each argument is
displayed, after escape characters are converted.
57. The 'ulimit' builtin uses a block size of 512 bytes for the '-c'
56. The 'ulimit' builtin uses a block size of 512 bytes for the '-c'
and '-f' options.
58. The arrival of 'SIGCHLD' when a trap is set on 'SIGCHLD' does not
57. The arrival of 'SIGCHLD' when a trap is set on 'SIGCHLD' does not
interrupt the 'wait' builtin and cause it to return immediately.
The trap command is run once for each child that exits.
59. The 'read' builtin may be interrupted by a signal for which a trap
58. The 'read' builtin may be interrupted by a signal for which a trap
has been set. If Bash receives a trapped signal while executing
'read', the trap handler executes and 'read' returns an exit status
greater than 128.
60. Bash removes an exited background process's status from the list
59. Bash removes an exited background process's status from the list
of such statuses after the 'wait' builtin is used to obtain it.
There is other POSIX behavior that Bash does not implement by default
@@ -7037,7 +7048,7 @@ File: bashref.info, Node: Job Control Builtins, Next: Job Control Variables,
option is encountered.
'wait'
wait [-fn] [JOBSPEC or PID ...]
wait [-fn] [-p VARNAME] [JOBSPEC or PID ...]
Wait until the child process specified by each process ID PID or
job specification JOBSPEC exits and return the exit status of the
@@ -7046,12 +7057,16 @@ File: bashref.info, Node: Job Control Builtins, Next: Job Control Variables,
for all running background jobs and the last-executed process
substitution, if its process id is the same as $!, and the return
status is zero. If the '-n' option is supplied, 'wait' waits for a
single job to terminate and returns its exit status. Supplying the
'-f' option, when job control is enabled, forces 'wait' to wait for
each PID or JOBSPEC to terminate before returning its status,
intead of returning when it changes status. If neither JOBSPEC nor
PID specifies an active child process of the shell, the return
status is 127.
single job to terminate and returns its exit status. If the '-p'
option is supplied, the process or job identifier of the job for
which the exit status is returned is assigned to the variable
VARNAME named by the option argument. The variable will be unset
initially, before any assignment. This is useful only when the
'-n' option is supplied. Supplying the '-f' option, when job
control is enabled, forces 'wait' to wait for each PID or JOBSPEC
to terminate before returning its status, intead of returning when
it changes status. If neither JOBSPEC nor PID specifies an active
child process of the shell, the return status is 127.
'disown'
disown [-ar] [-h] [JOBSPEC ... | PID ... ]
@@ -9490,11 +9505,13 @@ the current position in the history list.
'!?STRING[?]'
Refer to the most recent command preceding the current position in
the history list containing STRING. The trailing '?' may be
omitted if the STRING is followed immediately by a newline.
omitted if the STRING is followed immediately by a newline. If
STRING is missing, the string from the most recent search is used;
it is an error if there is no previous search string.
'^STRING1^STRING2^'
Quick Substitution. Repeat the last command, replacing STRING1
with STRING2. Equivalent to '!!:s/STRING1/STRING2/'.
with STRING2. Equivalent to '!!:s^STRING1^STRING2^'.
'!#'
The entire command line typed so far.
@@ -9541,7 +9558,8 @@ separated by single spaces.
The last argument.
'%'
The word matched by the most recent '?STRING?' search.
The first word matched by the most recent '?STRING?' search, if the
search string begins with a character that is part of a word.
'X-Y'
A range of words; '-Y' abbreviates '0-Y'.
@@ -9555,7 +9573,8 @@ separated by single spaces.
Abbreviates 'X-$'
'X-'
Abbreviates 'X-$' like 'X*', but omits the last word.
Abbreviates 'X-$' like 'X*', but omits the last word. If 'x' is
missing, it defaults to 0.
If a word designator is supplied without an event specification, the
previous command is used as the event.
@@ -9567,7 +9586,8 @@ File: bashref.info, Node: Modifiers, Prev: Word Designators, Up: History Inte
---------------
After the optional word designator, you can add a sequence of one or
more of the following modifiers, each preceded by a ':'.
more of the following modifiers, each preceded by a ':'. These modify,
or edit, the word or words selected from the history event.
'h'
Remove a trailing pathname component, leaving only the head.
@@ -9590,15 +9610,19 @@ more of the following modifiers, each preceded by a ':'.
'x'
Quote the substituted words as with 'q', but break into words at
spaces, tabs, and newlines.
spaces, tabs, and newlines. The 'q' and 'x' modifiers are mutually
exclusive; the last one supplied is used.
's/OLD/NEW/'
Substitute NEW for the first occurrence of OLD in the event line.
Any delimiter may be used in place of '/'. The delimiter may be
quoted in OLD and NEW with a single backslash. If '&' appears in
NEW, it is replaced by OLD. A single backslash will quote the '&'.
The final delimiter is optional if it is the last character on the
input line.
Any character may be used as the delimiter in place of '/'. The
delimiter may be quoted in OLD and NEW with a single backslash. If
'&' appears in NEW, it is replaced by OLD. A single backslash will
quote the '&'. If OLD is null, it is set to the last OLD
substituted, or, if no previous history substitutions took place,
the last STRING in a !?STRING'[?]' search. If NEW is is null, each
matching OLD is deleted. The final delimiter is optional if it is
the last character on the input line.
'&'
Repeat the previous substitution.
@@ -9609,7 +9633,8 @@ more of the following modifiers, each preceded by a ':'.
conjunction with 's', as in 'gs/OLD/NEW/', or with '&'.
'G'
Apply the following 's' modifier once to each word in the event.
Apply the following 's' or '&' modifier once to each word in the
event.

File: bashref.info, Node: Installing Bash, Next: Reporting Bugs, Prev: Using History Interactively, Up: Top
@@ -11019,7 +11044,7 @@ D.1 Index of Shell Builtin Commands
* :: Bourne Shell Builtins.
(line 11)
* [: Bourne Shell Builtins.
(line 269)
(line 270)
* alias: Bash Builtins. (line 11)
* bg: Job Control Builtins.
(line 7)
@@ -11043,7 +11068,7 @@ D.1 Index of Shell Builtin Commands
* dirs: Directory Stack Builtins.
(line 7)
* disown: Job Control Builtins.
(line 93)
(line 97)
* echo: Bash Builtins. (line 246)
* enable: Bash Builtins. (line 295)
* eval: Bourne Shell Builtins.
@@ -11061,7 +11086,7 @@ D.1 Index of Shell Builtin Commands
* getopts: Bourne Shell Builtins.
(line 143)
* hash: Bourne Shell Builtins.
(line 186)
(line 187)
* help: Bash Builtins. (line 324)
* history: Bash History Builtins.
(line 40)
@@ -11079,34 +11104,34 @@ D.1 Index of Shell Builtin Commands
* pushd: Directory Stack Builtins.
(line 53)
* pwd: Bourne Shell Builtins.
(line 206)
(line 207)
* read: Bash Builtins. (line 460)
* readarray: Bash Builtins. (line 554)
* readonly: Bourne Shell Builtins.
(line 216)
(line 217)
* return: Bourne Shell Builtins.
(line 235)
(line 236)
* set: The Set Builtin. (line 11)
* shift: Bourne Shell Builtins.
(line 256)
(line 257)
* shopt: The Shopt Builtin. (line 9)
* source: Bash Builtins. (line 563)
* suspend: Job Control Builtins.
(line 105)
(line 109)
* test: Bourne Shell Builtins.
(line 269)
(line 270)
* times: Bourne Shell Builtins.
(line 348)
(line 349)
* trap: Bourne Shell Builtins.
(line 354)
(line 355)
* type: Bash Builtins. (line 568)
* typeset: Bash Builtins. (line 600)
* ulimit: Bash Builtins. (line 606)
* umask: Bourne Shell Builtins.
(line 403)
(line 404)
* unalias: Bash Builtins. (line 705)
* unset: Bourne Shell Builtins.
(line 421)
(line 422)
* wait: Job Control Builtins.
(line 76)
@@ -11743,134 +11768,139 @@ D.5 Concept Index

Tag Table:
Node: Top887
Node: Introduction2797
Node: What is Bash?3013
Node: What is a shell?4127
Node: Definitions6665
Node: Basic Shell Features9616
Node: Shell Syntax10835
Node: Shell Operation11861
Node: Quoting13154
Node: Escape Character14454
Node: Single Quotes14939
Node: Double Quotes15287
Node: ANSI-C Quoting16565
Node: Locale Translation17824
Node: Comments18720
Node: Shell Commands19338
Node: Simple Commands20210
Node: Pipelines20841
Node: Lists23773
Node: Compound Commands25564
Node: Looping Constructs26576
Node: Conditional Constructs29071
Node: Command Grouping40239
Node: Coprocesses41718
Node: GNU Parallel43621
Node: Shell Functions47679
Node: Shell Parameters54762
Node: Positional Parameters59175
Node: Special Parameters60075
Node: Shell Expansions63829
Node: Brace Expansion65952
Node: Tilde Expansion68675
Node: Shell Parameter Expansion71292
Node: Command Substitution85725
Node: Arithmetic Expansion87080
Node: Process Substitution88012
Node: Word Splitting89132
Node: Filename Expansion91076
Node: Pattern Matching93713
Node: Quote Removal97699
Node: Redirections97994
Node: Executing Commands107552
Node: Simple Command Expansion108222
Node: Command Search and Execution110176
Node: Command Execution Environment112552
Node: Environment115536
Node: Exit Status117195
Node: Signals118865
Node: Shell Scripts120832
Node: Shell Builtin Commands123347
Node: Bourne Shell Builtins125385
Node: Bash Builtins146284
Node: Modifying Shell Behavior175209
Node: The Set Builtin175554
Node: The Shopt Builtin185967
Node: Special Builtins203945
Node: Shell Variables204924
Node: Bourne Shell Variables205361
Node: Bash Variables207465
Node: Bash Features238906
Node: Invoking Bash239805
Node: Bash Startup Files245818
Node: Interactive Shells250921
Node: What is an Interactive Shell?251331
Node: Is this Shell Interactive?251980
Node: Interactive Shell Behavior252795
Node: Bash Conditional Expressions256282
Node: Shell Arithmetic260859
Node: Aliases263799
Node: Arrays266419
Node: The Directory Stack271784
Node: Directory Stack Builtins272568
Node: Controlling the Prompt275536
Node: The Restricted Shell278457
Node: Bash POSIX Mode280939
Node: Job Control292066
Node: Job Control Basics292526
Node: Job Control Builtins297490
Node: Job Control Variables302308
Node: Command Line Editing303464
Node: Introduction and Notation305135
Node: Readline Interaction306758
Node: Readline Bare Essentials307949
Node: Readline Movement Commands309732
Node: Readline Killing Commands310692
Node: Readline Arguments312610
Node: Searching313654
Node: Readline Init File315840
Node: Readline Init File Syntax317099
Node: Conditional Init Constructs337538
Node: Sample Init File341734
Node: Bindable Readline Commands344851
Node: Commands For Moving346055
Node: Commands For History347914
Node: Commands For Text352209
Node: Commands For Killing355597
Node: Numeric Arguments358412
Node: Commands For Completion359551
Node: Keyboard Macros363742
Node: Miscellaneous Commands364429
Node: Readline vi Mode370382
Node: Programmable Completion371289
Node: Programmable Completion Builtins379069
Node: A Programmable Completion Example389764
Node: Using History Interactively395011
Node: Bash History Facilities395695
Node: Bash History Builtins398700
Node: History Interaction403231
Node: Event Designators406851
Node: Word Designators408070
Node: Modifiers409707
Node: Installing Bash411109
Node: Basic Installation412246
Node: Compilers and Options415504
Node: Compiling For Multiple Architectures416245
Node: Installation Names417938
Node: Specifying the System Type418756
Node: Sharing Defaults419472
Node: Operation Controls420145
Node: Optional Features421103
Node: Reporting Bugs431621
Node: Major Differences From The Bourne Shell432815
Node: GNU Free Documentation License449667
Node: Indexes474844
Node: Builtin Index475298
Node: Reserved Word Index482125
Node: Variable Index484573
Node: Function Index500397
Node: Concept Index513836
Node: Top897
Node: Introduction2817
Node: What is Bash?3033
Node: What is a shell?4147
Node: Definitions6685
Node: Basic Shell Features9636
Node: Shell Syntax10855
Node: Shell Operation11881
Node: Quoting13174
Node: Escape Character14474
Node: Single Quotes14959
Node: Double Quotes15307
Node: ANSI-C Quoting16585
Node: Locale Translation17844
Node: Comments18740
Node: Shell Commands19358
Node: Simple Commands20230
Node: Pipelines20861
Node: Lists23793
Node: Compound Commands25584
Node: Looping Constructs26596
Node: Conditional Constructs29091
Node: Command Grouping40662
Node: Coprocesses42141
Node: GNU Parallel44044
Node: Shell Functions48345
Node: Shell Parameters55428
Node: Positional Parameters59841
Node: Special Parameters60741
Node: Shell Expansions64495
Node: Brace Expansion66618
Node: Tilde Expansion69341
Node: Shell Parameter Expansion71958
Node: Command Substitution86391
Node: Arithmetic Expansion87746
Node: Process Substitution88678
Node: Word Splitting89798
Node: Filename Expansion91742
Node: Pattern Matching94291
Node: Quote Removal98277
Node: Redirections98572
Node: Executing Commands108130
Node: Simple Command Expansion108800
Node: Command Search and Execution110754
Node: Command Execution Environment113130
Node: Environment116114
Node: Exit Status117773
Node: Signals119443
Node: Shell Scripts121410
Node: Shell Builtin Commands124422
Node: Bourne Shell Builtins126460
Node: Bash Builtins147376
Node: Modifying Shell Behavior176301
Node: The Set Builtin176646
Node: The Shopt Builtin187059
Node: Special Builtins204729
Node: Shell Variables205708
Node: Bourne Shell Variables206145
Node: Bash Variables208249
Node: Bash Features239661
Node: Invoking Bash240560
Node: Bash Startup Files246573
Node: Interactive Shells251676
Node: What is an Interactive Shell?252086
Node: Is this Shell Interactive?252735
Node: Interactive Shell Behavior253550
Node: Bash Conditional Expressions257037
Node: Shell Arithmetic261614
Node: Aliases264554
Node: Arrays267174
Node: The Directory Stack272539
Node: Directory Stack Builtins273323
Node: Controlling the Prompt276291
Node: The Restricted Shell279212
Node: Bash POSIX Mode281694
Node: Job Control292627
Node: Job Control Basics293087
Node: Job Control Builtins298051
Node: Job Control Variables303197
Node: Command Line Editing304353
Node: Introduction and Notation306024
Node: Readline Interaction307647
Node: Readline Bare Essentials308838
Node: Readline Movement Commands310621
Node: Readline Killing Commands311581
Node: Readline Arguments313499
Node: Searching314543
Node: Readline Init File316729
Node: Readline Init File Syntax317988
Node: Conditional Init Constructs338427
Node: Sample Init File342623
Node: Bindable Readline Commands345740
Node: Commands For Moving346944
Node: Commands For History348803
Node: Commands For Text353098
Node: Commands For Killing356486
Node: Numeric Arguments359301
Node: Commands For Completion360440
Node: Keyboard Macros364631
Node: Miscellaneous Commands365318
Node: Readline vi Mode371271
Node: Programmable Completion372178
Node: Programmable Completion Builtins379958
Node: A Programmable Completion Example390653
Node: Using History Interactively395900
Node: Bash History Facilities396584
Node: Bash History Builtins399589
Node: History Interaction404120
Node: Event Designators407740
Node: Word Designators409094
Node: Modifiers410854
Node: Installing Bash412665
Node: Basic Installation413802
Node: Compilers and Options417060
Node: Compiling For Multiple Architectures417801
Node: Installation Names419494
Node: Specifying the System Type420312
Node: Sharing Defaults421028
Node: Operation Controls421701
Node: Optional Features422659
Node: Reporting Bugs433177
Node: Major Differences From The Bourne Shell434371
Node: GNU Free Documentation License451223
Node: Indexes476400
Node: Builtin Index476854
Node: Reserved Word Index483681
Node: Variable Index486129
Node: Function Index501953
Node: Concept Index515392

End Tag Table

Local Variables:
coding: utf-8
End:
+16 -39
View File
@@ -1,11 +1,11 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/MacPorts 2018.47642_7) (preloaded format=pdfetex 2019.1.16) 20 SEP 2019 14:50
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/MacPorts 2019.50896_1) (preloaded format=etex 2019.11.6) 22 NOV 2019 15:35
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
**\input /usr/homes/chet/src/bash/src/doc/bashref.texi
**\nonstopmode \input /usr/homes/chet/src/bash/src/doc/bashref.texi
(/usr/homes/chet/src/bash/src/doc/bashref.texi
(/Users/chet/src/bash/src/doc/texinfo.tex
(/usr/homes/chet/src/bash/src/doc/texinfo.tex
Loading texinfo [version 2015-11-22.14]:
\outerhsize=\dimen16
\outervsize=\dimen17
@@ -161,14 +161,12 @@ This is `epsf.tex' v2.7.4 <14 February 2011>
texinfo.tex: doing @include of version.texi
(/Users/chet/src/bash/src/doc/version.texi) [1{/opt/local/var/db/texmf/fonts/ma
p/pdftex/updmap/pdftex.map}] [2] (/Users/chet/src/bash/src/doc/bashref.toc
[-1] [-2] [-3]) [-4] (/Users/chet/src/bash/src/doc/bashref.toc)
(/Users/chet/src/bash/src/doc/bashref.toc) Chapter 1
(/usr/homes/chet/src/bash/src/doc/version.texi) [1] [2]
(/usr/homes/chet/src/bash/src/doc/bashref.toc [-1] [-2] [-3]) [-4] Chapter 1
\openout0 = `bashref.toc'.
(/Users/chet/src/bash/src/doc/bashref.aux)
(/usr/homes/chet/src/bash/src/doc/bashref.aux)
\openout1 = `bashref.aux'.
Chapter 2 [1] [2]
@@ -192,7 +190,7 @@ p/pdftex/updmap/pdftex.map}] [2] (/Users/chet/src/bash/src/doc/bashref.toc
[44] [45] [46] [47]
[48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62]
[63] [64] [65] [66] [67] [68] [69] [70] [71] [72] Chapter 5 [73] [74] [75]
[63] [64] [65] [66] [67] [68] [69] [70] [71] Chapter 5 [72] [73] [74] [75]
[76] [77] [78] [79] [80] [81] [82] [83] [84] Chapter 6 [85] [86] [87] [88]
[89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102]
[103] Chapter 7 [104] [105] [106] [107]
@@ -267,8 +265,9 @@ texinfo.tex: doing @include of hsuser.texi
[163] Appendix C [164]
texinfo.tex: doing @include of fdl.texi
(/Users/chet/src/bash/src/doc/fdl.texi [165] [166]
[167] [168] [169] [170] [171]) Appendix D [172] [173] [174] [175] [176]
(/usr/homes/chet/src/bash/src/doc/fdl.texi [165]
[166] [167] [168] [169] [170] [171]) Appendix D [172] [173] [174] [175]
[176]
Overfull \vbox (0.67252pt too high) has occurred while \output is active
\vbox(340.17245+0.0)x207.80492
.\glue(\topskip) 0.0
@@ -284,34 +283,12 @@ Overfull \vbox (0.67252pt too high) has occurred while \output is active
[177] [178] [179] [180] [181] )
Here is how much of TeX's memory you used:
4069 strings out of 497100
47090 string characters out of 6206794
137054 words of memory out of 5000000
4846 multiletter control sequences out of 15000+600000
3517 strings out of 497108
39941 string characters out of 6207178
86576 words of memory out of 5000000
4683 multiletter control sequences out of 15000+600000
34315 words of font info for 116 fonts, out of 8000000 for 9000
51 hyphenation exceptions out of 8191
16i,6n,16p,326b,968s stack positions out of 5000i,500n,10000p,200000b,80000s
{/opt/local/share/texmf-texlive/fonts/enc/dvips/
cm-super/cm-super-t1.enc}</opt/local/share/texmf-texlive/fonts/type1/public/ams
fonts/cm/cmbx12.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts
/cm/cmcsc10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/
cmmi10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi1
2.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmmi9.pfb>
</opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr10.pfb></opt/
local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr9.pfb></opt/local/s
hare/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsl10.pfb></opt/local/share/
texmf-texlive/fonts/type1/public/amsfonts/cm/cmsltt10.pfb></opt/local/share/tex
mf-texlive/fonts/type1/public/amsfonts/cm/cmsy10.pfb></opt/local/share/texmf-te
xlive/fonts/type1/public/amsfonts/cm/cmti10.pfb></opt/local/share/texmf-texlive
/fonts/type1/public/amsfonts/cm/cmtt10.pfb></opt/local/share/texmf-texlive/font
s/type1/public/amsfonts/cm/cmtt12.pfb></opt/local/share/texmf-texlive/fonts/typ
e1/public/amsfonts/cm/cmtt9.pfb></opt/local/share/texmf-texlive/fonts/type1/pub
lic/cm-super/sfrm1095.pfb></opt/local/share/texmf-texlive/fonts/type1/public/cm
-super/sfrm1440.pfb>
Output written on bashref.pdf (187 pages, 757573 bytes).
PDF statistics:
2644 PDF objects out of 2984 (max. 8388607)
2411 compressed objects within 25 object streams
313 named destinations out of 1000 (max. 500000)
1125 words of extra memory for PDF output out of 10000 (max. 10000000)
16i,6n,16p,339b,936s stack positions out of 5000i,500n,10000p,200000b,80000s
Output written on bashref.dvi (187 pages, 774688 bytes).
BIN
View File
Binary file not shown.
+1459 -1416
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -18,4 +18,4 @@
\entry{]]}{13}{\code {]]}}
\entry{{\indexlbrace }}{15}{\code {{\tt \char 123}}}
\entry{{\indexrbrace }}{15}{\code {{\tt \char 125}}}
\entry{function}{17}{\code {function}}
\entry{function}{18}{\code {function}}
+21 -21
View File
@@ -1,35 +1,35 @@
\initial {!}
\entry {\code {!}}{8}
\entry{\code {!}}{8}
\initial {[}
\entry {\code {[[}}{13}
\entry{\code {[[}}{13}
\initial {]}
\entry {\code {]]}}{13}
\entry{\code {]]}}{13}
\initial {{\indexlbrace }}
\entry {\code {{\tt \char 123}}}{15}
\entry{\code {{\tt \char 123}}}{15}
\initial {{\indexrbrace }}
\entry {\code {{\tt \char 125}}}{15}
\entry{\code {{\tt \char 125}}}{15}
\initial {C}
\entry {\code {case}}{11}
\entry{\code {case}}{11}
\initial {D}
\entry {\code {do}}{10}
\entry {\code {done}}{10}
\entry{\code {do}}{10}
\entry{\code {done}}{10}
\initial {E}
\entry {\code {elif}}{11}
\entry {\code {else}}{11}
\entry {\code {esac}}{11}
\entry{\code {elif}}{11}
\entry{\code {else}}{11}
\entry{\code {esac}}{11}
\initial {F}
\entry {\code {fi}}{11}
\entry {\code {for}}{10}
\entry {\code {function}}{17}
\entry{\code {fi}}{11}
\entry{\code {for}}{10}
\entry{\code {function}}{18}
\initial {I}
\entry {\code {if}}{11}
\entry {\code {in}}{11}
\entry{\code {if}}{11}
\entry{\code {in}}{11}
\initial {S}
\entry {\code {select}}{12}
\entry{\code {select}}{12}
\initial {T}
\entry {\code {then}}{11}
\entry {\code {time}}{8}
\entry{\code {then}}{11}
\entry{\code {time}}{8}
\initial {U}
\entry {\code {until}}{10}
\entry{\code {until}}{10}
\initial {W}
\entry {\code {while}}{10}
\entry{\code {while}}{10}
+6 -1
View File
@@ -8161,7 +8161,7 @@ or non-zero if an error occurs or an invalid option is encountered.
@item wait
@btindex wait
@example
wait [-fn] [@var{jobspec} or @var{pid} @dots{}]
wait [-fn] [-p @var{varname}] [@var{jobspec} or @var{pid} @dots{}]
@end example
Wait until the child process specified by each process @sc{id} @var{pid}
@@ -8175,6 +8175,11 @@ the last-executed process substitution, if its process id is the same as
and the return status is zero.
If the @option{-n} option is supplied, @code{wait} waits for a single job
to terminate and returns its exit status.
If the @option{-p} option is supplied, the process or job identifier of the job
for which the exit status is returned is assigned to the variable
@var{varname} named by the option argument.
The variable will be unset initially, before any assignment.
This is useful only when the @option{-n} option is supplied.
Supplying the @option{-f} option, when job control is enabled,
forces @code{wait} to wait for each @var{pid} or @var{jobspec} to
terminate before returning its status, intead of returning when it changes
+1 -1
View File
@@ -29,7 +29,7 @@
@numsecentry{Shell Expansions}{3.5}{Shell Expansions}{22}
@numsubsecentry{Brace Expansion}{3.5.1}{Brace Expansion}{23}
@numsubsecentry{Tilde Expansion}{3.5.2}{Tilde Expansion}{24}
@numsubsecentry{Shell Parameter Expansion}{3.5.3}{Shell Parameter Expansion}{24}
@numsubsecentry{Shell Parameter Expansion}{3.5.3}{Shell Parameter Expansion}{25}
@numsubsecentry{Command Substitution}{3.5.4}{Command Substitution}{31}
@numsubsecentry{Arithmetic Expansion}{3.5.5}{Arithmetic Expansion}{31}
@numsubsecentry{Process Substitution}{3.5.6}{Process Substitution}{31}
+2 -2
View File
@@ -5,8 +5,8 @@
\entry{$*}{21}{\code {$*}}
\entry{@}{21}{\code {@}}
\entry{$@}{21}{\code {$@}}
\entry{#}{21}{\code {#}}
\entry{$#}{21}{\code {$#}}
\entry{#}{22}{\code {#}}
\entry{$#}{22}{\code {$#}}
\entry{?}{22}{\code {?}}
\entry{$?}{22}{\code {$?}}
\entry{-}{22}{\code {-}}
+166 -166
View File
@@ -1,194 +1,194 @@
\initial {!}
\entry {\code {!}}{22}
\entry{\code {!}}{22}
\initial {#}
\entry {\code {#}}{21}
\entry{\code {#}}{22}
\initial {$}
\entry {\code {$}}{22}
\entry {\code {$!}}{22}
\entry {\code {$#}}{21}
\entry {\code {$$}}{22}
\entry {\code {$*}}{21}
\entry {\code {$-}}{22}
\entry {\code {$?}}{22}
\entry {\code {$@}}{21}
\entry {\code {$_}}{22}
\entry {\code {$0}}{22}
\entry{\code {$}}{22}
\entry{\code {$!}}{22}
\entry{\code {$#}}{22}
\entry{\code {$$}}{22}
\entry{\code {$*}}{21}
\entry{\code {$-}}{22}
\entry{\code {$?}}{22}
\entry{\code {$@}}{21}
\entry{\code {$_}}{22}
\entry{\code {$0}}{22}
\initial {*}
\entry {\code {*}}{21}
\entry{\code {*}}{21}
\initial {-}
\entry {\code {-}}{22}
\entry{\code {-}}{22}
\initial {?}
\entry {\code {?}}{22}
\entry{\code {?}}{22}
\initial {@}
\entry {\code {@}}{21}
\entry{\code {@}}{21}
\initial {_}
\entry {\code {_}}{22}
\entry{\code {_}}{22}
\initial {0}
\entry {\code {0}}{22}
\entry{\code {0}}{22}
\initial {A}
\entry {\code {auto_resume}}{108}
\entry{\code {auto_resume}}{108}
\initial {B}
\entry {\code {BASH}}{74}
\entry {\code {BASH_ALIASES}}{75}
\entry {\code {BASH_ARGC}}{75}
\entry {\code {BASH_ARGV}}{75}
\entry {\code {BASH_ARGV0}}{75}
\entry {\code {BASH_CMDS}}{76}
\entry {\code {BASH_COMMAND}}{76}
\entry {\code {BASH_COMPAT}}{76}
\entry {\code {BASH_ENV}}{76}
\entry {\code {BASH_EXECUTION_STRING}}{76}
\entry {\code {BASH_LINENO}}{76}
\entry {\code {BASH_LOADABLES_PATH}}{76}
\entry {\code {BASH_REMATCH}}{76}
\entry {\code {BASH_SOURCE}}{77}
\entry {\code {BASH_SUBSHELL}}{77}
\entry {\code {BASH_VERSINFO}}{77}
\entry {\code {BASH_VERSION}}{77}
\entry {\code {BASH_XTRACEFD}}{77}
\entry {\code {BASHOPTS}}{75}
\entry {\code {BASHPID}}{75}
\entry {\code {bell-style}}{113}
\entry {\code {bind-tty-special-chars}}{113}
\entry {\code {blink-matching-paren}}{113}
\entry{\code {BASH}}{74}
\entry{\code {BASH_ALIASES}}{75}
\entry{\code {BASH_ARGC}}{75}
\entry{\code {BASH_ARGV}}{75}
\entry{\code {BASH_ARGV0}}{75}
\entry{\code {BASH_CMDS}}{76}
\entry{\code {BASH_COMMAND}}{76}
\entry{\code {BASH_COMPAT}}{76}
\entry{\code {BASH_ENV}}{76}
\entry{\code {BASH_EXECUTION_STRING}}{76}
\entry{\code {BASH_LINENO}}{76}
\entry{\code {BASH_LOADABLES_PATH}}{76}
\entry{\code {BASH_REMATCH}}{76}
\entry{\code {BASH_SOURCE}}{77}
\entry{\code {BASH_SUBSHELL}}{77}
\entry{\code {BASH_VERSINFO}}{77}
\entry{\code {BASH_VERSION}}{77}
\entry{\code {BASH_XTRACEFD}}{77}
\entry{\code {BASHOPTS}}{75}
\entry{\code {BASHPID}}{75}
\entry{\code {bell-style}}{113}
\entry{\code {bind-tty-special-chars}}{113}
\entry{\code {blink-matching-paren}}{113}
\initial {C}
\entry {\code {CDPATH}}{74}
\entry {\code {CHILD_MAX}}{77}
\entry {\code {colored-completion-prefix}}{113}
\entry {\code {colored-stats}}{113}
\entry {\code {COLUMNS}}{78}
\entry {\code {comment-begin}}{113}
\entry {\code {COMP_CWORD}}{78}
\entry {\code {COMP_KEY}}{78}
\entry {\code {COMP_LINE}}{78}
\entry {\code {COMP_POINT}}{78}
\entry {\code {COMP_TYPE}}{78}
\entry {\code {COMP_WORDBREAKS}}{78}
\entry {\code {COMP_WORDS}}{78}
\entry {\code {completion-display-width}}{113}
\entry {\code {completion-ignore-case}}{114}
\entry {\code {completion-map-case}}{114}
\entry {\code {completion-prefix-display-length}}{114}
\entry {\code {completion-query-items}}{114}
\entry {\code {COMPREPLY}}{78}
\entry {\code {convert-meta}}{114}
\entry {\code {COPROC}}{79}
\entry{\code {CDPATH}}{74}
\entry{\code {CHILD_MAX}}{77}
\entry{\code {colored-completion-prefix}}{113}
\entry{\code {colored-stats}}{113}
\entry{\code {COLUMNS}}{78}
\entry{\code {comment-begin}}{113}
\entry{\code {COMP_CWORD}}{78}
\entry{\code {COMP_KEY}}{78}
\entry{\code {COMP_LINE}}{78}
\entry{\code {COMP_POINT}}{78}
\entry{\code {COMP_TYPE}}{78}
\entry{\code {COMP_WORDBREAKS}}{78}
\entry{\code {COMP_WORDS}}{78}
\entry{\code {completion-display-width}}{113}
\entry{\code {completion-ignore-case}}{114}
\entry{\code {completion-map-case}}{114}
\entry{\code {completion-prefix-display-length}}{114}
\entry{\code {completion-query-items}}{114}
\entry{\code {COMPREPLY}}{78}
\entry{\code {convert-meta}}{114}
\entry{\code {COPROC}}{79}
\initial {D}
\entry {\code {DIRSTACK}}{79}
\entry {\code {disable-completion}}{114}
\entry{\code {DIRSTACK}}{79}
\entry{\code {disable-completion}}{114}
\initial {E}
\entry {\code {echo-control-characters}}{114}
\entry {\code {editing-mode}}{114}
\entry {\code {emacs-mode-string}}{115}
\entry {\code {EMACS}}{79}
\entry {\code {enable-bracketed-paste}}{115}
\entry {\code {enable-keypad}}{115}
\entry {\code {ENV}}{79}
\entry {\code {EPOCHREALTIME}}{79}
\entry {\code {EPOCHSECONDS}}{79}
\entry {\code {EUID}}{79}
\entry {\code {EXECIGNORE}}{79}
\entry {\code {expand-tilde}}{115}
\entry{\code {echo-control-characters}}{114}
\entry{\code {editing-mode}}{114}
\entry{\code {emacs-mode-string}}{115}
\entry{\code {EMACS}}{79}
\entry{\code {enable-bracketed-paste}}{115}
\entry{\code {enable-keypad}}{115}
\entry{\code {ENV}}{79}
\entry{\code {EPOCHREALTIME}}{79}
\entry{\code {EPOCHSECONDS}}{79}
\entry{\code {EUID}}{79}
\entry{\code {EXECIGNORE}}{79}
\entry{\code {expand-tilde}}{115}
\initial {F}
\entry {\code {FCEDIT}}{79}
\entry {\code {FIGNORE}}{79}
\entry {\code {FUNCNAME}}{79}
\entry {\code {FUNCNEST}}{80}
\entry{\code {FCEDIT}}{79}
\entry{\code {FIGNORE}}{79}
\entry{\code {FUNCNAME}}{79}
\entry{\code {FUNCNEST}}{80}
\initial {G}
\entry {\code {GLOBIGNORE}}{80}
\entry {\code {GROUPS}}{80}
\entry{\code {GLOBIGNORE}}{80}
\entry{\code {GROUPS}}{80}
\initial {H}
\entry {\code {histchars}}{80}
\entry {\code {HISTCMD}}{80}
\entry {\code {HISTCONTROL}}{80}
\entry {\code {HISTFILE}}{81}
\entry {\code {HISTFILESIZE}}{81}
\entry {\code {HISTIGNORE}}{81}
\entry {\code {history-preserve-point}}{115}
\entry {\code {history-size}}{115}
\entry {\code {HISTSIZE}}{81}
\entry {\code {HISTTIMEFORMAT}}{81}
\entry {\code {HOME}}{74}
\entry {\code {horizontal-scroll-mode}}{115}
\entry {\code {HOSTFILE}}{81}
\entry {\code {HOSTNAME}}{82}
\entry {\code {HOSTTYPE}}{82}
\entry{\code {histchars}}{80}
\entry{\code {HISTCMD}}{80}
\entry{\code {HISTCONTROL}}{80}
\entry{\code {HISTFILE}}{81}
\entry{\code {HISTFILESIZE}}{81}
\entry{\code {HISTIGNORE}}{81}
\entry{\code {history-preserve-point}}{115}
\entry{\code {history-size}}{115}
\entry{\code {HISTSIZE}}{81}
\entry{\code {HISTTIMEFORMAT}}{81}
\entry{\code {HOME}}{74}
\entry{\code {horizontal-scroll-mode}}{115}
\entry{\code {HOSTFILE}}{81}
\entry{\code {HOSTNAME}}{82}
\entry{\code {HOSTTYPE}}{82}
\initial {I}
\entry {\code {IFS}}{74}
\entry {\code {IGNOREEOF}}{82}
\entry {\code {input-meta}}{116}
\entry {\code {INPUTRC}}{82}
\entry {\code {INSIDE_EMACS}}{82}
\entry {\code {isearch-terminators}}{116}
\entry{\code {IFS}}{74}
\entry{\code {IGNOREEOF}}{82}
\entry{\code {input-meta}}{116}
\entry{\code {INPUTRC}}{82}
\entry{\code {INSIDE_EMACS}}{82}
\entry{\code {isearch-terminators}}{116}
\initial {K}
\entry {\code {keymap}}{116}
\entry{\code {keymap}}{116}
\initial {L}
\entry {\code {LANG}}{82}
\entry {\code {LC_ALL}}{82}
\entry {\code {LC_COLLATE}}{82}
\entry {\code {LC_CTYPE}}{82}
\entry {\code {LC_MESSAGES}}{7, 82}
\entry {\code {LC_NUMERIC}}{82}
\entry {\code {LC_TIME}}{82}
\entry {\code {LINENO}}{82}
\entry {\code {LINES}}{82}
\entry{\code {LANG}}{82}
\entry{\code {LC_ALL}}{82}
\entry{\code {LC_COLLATE}}{82}
\entry{\code {LC_CTYPE}}{82}
\entry{\code {LC_MESSAGES}}{7, 82}
\entry{\code {LC_NUMERIC}}{82}
\entry{\code {LC_TIME}}{82}
\entry{\code {LINENO}}{82}
\entry{\code {LINES}}{82}
\initial {M}
\entry {\code {MACHTYPE}}{82}
\entry {\code {MAIL}}{74}
\entry {\code {MAILCHECK}}{83}
\entry {\code {MAILPATH}}{74}
\entry {\code {MAPFILE}}{83}
\entry {\code {mark-modified-lines}}{116}
\entry {\code {mark-symlinked-directories}}{117}
\entry {\code {match-hidden-files}}{117}
\entry {\code {menu-complete-display-prefix}}{117}
\entry {\code {meta-flag}}{116}
\entry{\code {MACHTYPE}}{82}
\entry{\code {MAIL}}{74}
\entry{\code {MAILCHECK}}{83}
\entry{\code {MAILPATH}}{74}
\entry{\code {MAPFILE}}{83}
\entry{\code {mark-modified-lines}}{116}
\entry{\code {mark-symlinked-directories}}{117}
\entry{\code {match-hidden-files}}{117}
\entry{\code {menu-complete-display-prefix}}{117}
\entry{\code {meta-flag}}{116}
\initial {O}
\entry {\code {OLDPWD}}{83}
\entry {\code {OPTARG}}{74}
\entry {\code {OPTERR}}{83}
\entry {\code {OPTIND}}{74}
\entry {\code {OSTYPE}}{83}
\entry {\code {output-meta}}{117}
\entry{\code {OLDPWD}}{83}
\entry{\code {OPTARG}}{74}
\entry{\code {OPTERR}}{83}
\entry{\code {OPTIND}}{74}
\entry{\code {OSTYPE}}{83}
\entry{\code {output-meta}}{117}
\initial {P}
\entry {\code {page-completions}}{117}
\entry {\code {PATH}}{74}
\entry {\code {PIPESTATUS}}{83}
\entry {\code {POSIXLY_CORRECT}}{83}
\entry {\code {PPID}}{83}
\entry {\code {PROMPT_COMMAND}}{83}
\entry {\code {PROMPT_DIRTRIM}}{83}
\entry {\code {PS0}}{83}
\entry {\code {PS1}}{74}
\entry {\code {PS2}}{74}
\entry {\code {PS3}}{83}
\entry {\code {PS4}}{83}
\entry {\code {PWD}}{84}
\entry{\code {page-completions}}{117}
\entry{\code {PATH}}{74}
\entry{\code {PIPESTATUS}}{83}
\entry{\code {POSIXLY_CORRECT}}{83}
\entry{\code {PPID}}{83}
\entry{\code {PROMPT_COMMAND}}{83}
\entry{\code {PROMPT_DIRTRIM}}{83}
\entry{\code {PS0}}{83}
\entry{\code {PS1}}{74}
\entry{\code {PS2}}{74}
\entry{\code {PS3}}{83}
\entry{\code {PS4}}{83}
\entry{\code {PWD}}{84}
\initial {R}
\entry {\code {RANDOM}}{84}
\entry {\code {READLINE_LINE}}{84}
\entry {\code {READLINE_POINT}}{84}
\entry {\code {REPLY}}{84}
\entry {\code {revert-all-at-newline}}{117}
\entry{\code {RANDOM}}{84}
\entry{\code {READLINE_LINE}}{84}
\entry{\code {READLINE_POINT}}{84}
\entry{\code {REPLY}}{84}
\entry{\code {revert-all-at-newline}}{117}
\initial {S}
\entry {\code {SECONDS}}{84}
\entry {\code {SHELL}}{84}
\entry {\code {SHELLOPTS}}{84}
\entry {\code {SHLVL}}{84}
\entry {\code {show-all-if-ambiguous}}{117}
\entry {\code {show-all-if-unmodified}}{117}
\entry {\code {show-mode-in-prompt}}{118}
\entry {\code {skip-completed-text}}{118}
\entry {\code {SRANDOM}}{84}
\entry{\code {SECONDS}}{84}
\entry{\code {SHELL}}{84}
\entry{\code {SHELLOPTS}}{84}
\entry{\code {SHLVL}}{84}
\entry{\code {show-all-if-ambiguous}}{117}
\entry{\code {show-all-if-unmodified}}{117}
\entry{\code {show-mode-in-prompt}}{118}
\entry{\code {skip-completed-text}}{118}
\entry{\code {SRANDOM}}{84}
\initial {T}
\entry {\code {TEXTDOMAIN}}{7}
\entry {\code {TEXTDOMAINDIR}}{7}
\entry {\code {TIMEFORMAT}}{84}
\entry {\code {TMOUT}}{85}
\entry {\code {TMPDIR}}{85}
\entry{\code {TEXTDOMAIN}}{7}
\entry{\code {TEXTDOMAINDIR}}{7}
\entry{\code {TIMEFORMAT}}{84}
\entry{\code {TMOUT}}{85}
\entry{\code {TMPDIR}}{85}
\initial {U}
\entry {\code {UID}}{85}
\entry{\code {UID}}{85}
\initial {V}
\entry {\code {vi-cmd-mode-string}}{118}
\entry {\code {vi-ins-mode-string}}{118}
\entry {\code {visible-stats}}{118}
\entry{\code {vi-cmd-mode-string}}{118}
\entry{\code {vi-ins-mode-string}}{118}
\entry{\code {visible-stats}}{118}
+744 -745
View File
File diff suppressed because it is too large Load Diff
+2030 -2033
View File
File diff suppressed because it is too large Load Diff
+13 -13
View File
@@ -1,9 +1,9 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.22.3
%%CreationDate: Mon Jul 8 15:16:14 2019
%%Creator: groff version 1.22.4
%%CreationDate: Fri Nov 22 15:53:55 2019
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.22 3
%%DocumentSuppliedResources: procset grops 1.22 4
%%Pages: 1
%%PageOrder: Ascend
%%DocumentMedia: Default 612 792 0 () ()
@@ -13,7 +13,7 @@
%%PageMedia: Default
%%EndDefaults
%%BeginProlog
%%BeginResource: procset grops 1.22 3
%%BeginResource: procset grops 1.22 4
%!PS-Adobe-3.0 Resource-ProcSet
/setpacking where{
pop
@@ -236,15 +236,15 @@ BP
(Commands Manual)2.5 E(RB)132.97 E(ASH\(1\))-.35 E/F1 10.95/Times-Bold@0
SF -.219(NA)72 84 S(ME).219 E F0(rbash \255 restricted bash, see)108 96
Q/F2 10/Times-Bold@0 SF(bash)2.5 E F0(\(1\))A F1(RESTRICTED SHELL)72
112.8 Q F0(If)108 124.8 Q F2(bash)4.397 E F0 1.897
(is started with the name)4.397 F F2(rbash)4.397 E F0 4.397(,o)C 4.397
(rt)-4.397 G(he)-4.397 E F2<ad72>4.397 E F0 1.896
(option is supplied at in)4.397 F -.2(vo)-.4 G 1.896
(cation, the shell becomes).2 F 3.445(restricted. A)108 136.8 R .945
(restricted shell is used to set up an en)3.445 F .946
(vironment more controlled than the standard shell.)-.4 F(It)5.946 E
(beha)108 148.8 Q -.15(ve)-.2 G 2.5(si).15 G(dentically to)-2.5 E F2
(bash)2.5 E F0(with the e)2.5 E(xception that the follo)-.15 E
112.8 Q F0(If)108 124.8 Q F2(bash)3.582 E F0 1.081
(is started with the name)3.581 F F2(rbash)3.581 E F0 3.581(,o)C 3.581
(rt)-3.581 G(he)-3.581 E F2<ad72>3.581 E F0 1.081
(option is supplied at in)3.581 F -.2(vo)-.4 G 1.081
(cation, the shell becomes re-).2 F 2.976(stricted. A)108 136.8 R .476
(restricted shell is used to set up an en)2.976 F .476
(vironment more controlled than the standard shell.)-.4 F .477(It be-)
5.477 F(ha)108 148.8 Q -.15(ve)-.2 G 2.5(si).15 G(dentically to)-2.5 E
F2(bash)2.5 E F0(with the e)2.5 E(xception that the follo)-.15 E
(wing are disallo)-.25 E(wed or not performed:)-.25 E<83>108 165.6 Q
(changing directories with)144 165.6 Q F2(cd)2.5 E F0<83>108 182.4 Q
(setting or unsetting the v)144 182.4 Q(alues of)-.25 E/F3 9
+2 -2
View File
@@ -2,10 +2,10 @@
Copyright (C) 1988-2019 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Fri Nov 15 09:34:39 EST 2019
@set LASTCHANGE Fri Nov 22 15:27:24 EST 2019
@set EDITION 5.0
@set VERSION 5.0
@set UPDATED 15 November 2019
@set UPDATED 22 November 2019
@set UPDATED-MONTH November 2019
+3 -2
View File
@@ -1802,9 +1802,10 @@ find_job (pid, alive_only, procp)
/* Find a job given a PID. If BLOCK is non-zero, block SIGCHLD as
required by find_job. */
int
get_job_by_pid (pid, block)
get_job_by_pid (pid, block, procp)
pid_t pid;
int block;
PROCESS **procp;
{
int job;
sigset_t set, oset;
@@ -1812,7 +1813,7 @@ get_job_by_pid (pid, block)
if (block)
BLOCK_CHILD (set, oset);
job = find_job (pid, 0, NULL);
job = find_job (pid, 0, procp);
if (block)
UNBLOCK_CHILD (oset);
+4 -3
View File
@@ -41,6 +41,7 @@
/* Defines for the wait_for functions and for the wait builtin to use */
#define JWAIT_PERROR 0x01
#define JWAIT_FORCE 0x02
#define JWAIT_NOWAIT 0x04 /* don't waitpid(), just return status if already exited */
/* The max time to sleep while retrying fork() on EAGAIN failure */
#define FORKSLEEP_MAX 16
@@ -101,7 +102,7 @@ typedef enum { JNONE = -1, JRUNNING = 1, JSTOPPED = 2, JDEAD = 4, JMIXED = 8 } J
#define J_NOTIFIED 0x02 /* Non-zero if already notified about job state. */
#define J_JOBCONTROL 0x04 /* Non-zero if this job started under job control. */
#define J_NOHUP 0x08 /* Don't send SIGHUP to job if shell gets SIGHUP. */
#define J_STATSAVED 0x10 /* A process in this job had had status saved via $! */
#define J_STATSAVED 0x10 /* A process in this job had status saved via $! */
#define J_ASYNC 0x20 /* Job was started asynchronously */
#define J_PIPEFAIL 0x40 /* pipefail set when job was started */
@@ -245,10 +246,10 @@ extern void hangup_all_jobs PARAMS((void));
extern void kill_current_pipeline PARAMS((void));
#if defined (__STDC__) && defined (pid_t)
extern int get_job_by_pid PARAMS((int, int));
extern int get_job_by_pid PARAMS((int, int, PROCESS **));
extern void describe_pid PARAMS((int));
#else
extern int get_job_by_pid PARAMS((pid_t, int));
extern int get_job_by_pid PARAMS((pid_t, int, PROCESS **));
extern void describe_pid PARAMS((pid_t));
#endif
+8 -1
View File
@@ -2,7 +2,7 @@
Modified by Chet Ramey for Readline.
Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2015, 2017
Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2015, 2017, 2019
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -32,6 +32,13 @@
#include "rlconf.h"
#if defined __TANDEM
# define _XOPEN_SOURCE_EXTENDED 1
# define _TANDEM_SOURCE 1
# include <sys/types.h>
# include <sys/stat.h>
#endif
#include <stdio.h>
#include "posixstat.h" // stat related macros (S_ISREG, ...)
+8 -1
View File
@@ -1,6 +1,6 @@
/* complete.c -- filename completion for readline. */
/* Copyright (C) 1987-2017 Free Software Foundation, Inc.
/* Copyright (C) 1987-2019 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
@@ -21,11 +21,18 @@
#define READLINE_LIBRARY
#if defined (__TANDEM)
# define _XOPEN_SOURCE_EXTENDED 1
#endif
#if defined (HAVE_CONFIG_H)
# include <config.h>
#endif
#include <sys/types.h>
#if defined (__TANDEM)
# include <sys/stat.h>
#endif
#include <fcntl.h>
#if defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
+6
View File
@@ -194,6 +194,7 @@ previous command is used as the event.
.PP
After the optional word designator, there may appear a sequence of
one or more of the following modifiers, each preceded by a `:'.
These modify, or edit, the word or words selected from the history event.
.PP
.PD 0
.PP
@@ -254,6 +255,11 @@ the last
in a
.B !?\fIstring\fR\fB[?]\fR
search.
If
.I new
is null, each matching
.I old
is deleted.
.TP
.B &
Repeat the previous substitution.
+3 -1
View File
@@ -456,6 +456,7 @@ previous command is used as the event.
After the optional word designator, you can add a sequence of one or more
of the following modifiers, each preceded by a @samp{:}.
These modify, or edit, the word or words selected from the history event.
@table @code
@@ -497,8 +498,9 @@ the @samp{&}.
If @var{old} is null, it is set to the last @var{old}
substituted, or, if no previous history substitutions took place,
the last @var{string}
in a !?@var{string}@code[?]}
in a !?@var{string}@code{[?]}
search.
If @var{new} is is null, each matching @var{old} is deleted.
The final delimiter is optional if it is the last
character on the input line.
+2
View File
@@ -26,6 +26,8 @@
#define READLINE_LIBRARY
#if defined (__TANDEM)
# define _XOPEN_SOURCE_EXTENDED 1
# include <unistd.h>
# include <floss.h>
#endif
+2
View File
@@ -22,6 +22,8 @@
#define READLINE_LIBRARY
#if defined (__TANDEM)
# define _XOPEN_SOURCE_EXTENDED 1
# define _TANDEM_SOURCE 1
# include <floss.h>
#endif
+2 -1
View File
@@ -1016,9 +1016,10 @@ without_job_control ()
}
int
get_job_by_pid (pid, block)
get_job_by_pid (pid, block, ignore)
pid_t pid;
int block;
PROCESS **ignore;
{
int i;
+257 -494
View File
File diff suppressed because it is too large Load Diff
+15 -2
View File
@@ -8076,9 +8076,10 @@ pat_subst (string, pat, rep, mflags)
char *string, *pat, *rep;
int mflags;
{
char *ret, *s, *e, *str, *rstr, *mstr;
char *ret, *s, *e, *str, *rstr, *mstr, *send;
int rptr, mtype, rxpand, mlen;
size_t rsize, l, replen, rslen;
DECLARE_MBSTATE;
if (string == 0)
return (savestring (""));
@@ -8132,6 +8133,7 @@ pat_subst (string, pat, rep, mflags)
ret = (char *)xmalloc (rsize = 64);
ret[0] = '\0';
send = string + strlen (string);
for (replen = STRLEN (rep), rptr = 0, str = string; *str;)
{
@@ -8185,9 +8187,20 @@ pat_subst (string, pat, rep, mflags)
{
/* On a zero-length match, make sure we copy one character, since
we increment one character to avoid infinite recursion. */
RESIZE_MALLOCED_BUFFER (ret, rptr, 1, rsize, 64);
char *p, *origp, *origs;
size_t clen;
RESIZE_MALLOCED_BUFFER (ret, rptr, locale_mb_cur_max, rsize, 64);
#if defined (HANDLE_MULTIBYTE)
p = origp = ret + rptr;
origs = str;
COPY_CHAR_P (p, str, send);
rptr += p - origp;
e += str - origs;
#else
ret[rptr++] = *str++;
e++; /* avoid infinite recursion on zero-length match */
#endif
}
}
+1 -1
View File
@@ -65,7 +65,7 @@ while [ $# -gt 0 ]; do
done
case "${host_os}-${SHOBJ_CC}-${host_vendor}" in
nsk-cc-tandem)
nsk-cc-tandem|nsk-c99-tandem)
SHOBJ_CFLAGS=-Wglobalized
case `uname -m` in
NSR*)
+853 -801
View File
File diff suppressed because it is too large Load Diff
+1944
View File
File diff suppressed because it is too large Load Diff
+6 -1
View File
@@ -3944,7 +3944,12 @@ check_unbind_variable (name)
if (v && readonly_p (v))
{
internal_error (_("%s: cannot unset: readonly %s"), name, "variable");
return -1;
return -2;
}
else if (v && non_unsettable_p (v))
{
internal_error (_("%s: cannot unset"), name);
return -2;
}
return (unbind_variable (name));
}