commit bash-20050217 snapshot

This commit is contained in:
Chet Ramey
2011-12-03 13:43:32 -05:00
parent cc87ba64ee
commit 2206f89ab4
45 changed files with 2735 additions and 979 deletions
+51
View File
@@ -11063,3 +11063,54 @@ variables.c
doc/{bashref.texi,bash.1}
- a couple of clarifying changes to the description of $_ based on
comments from Glenn Morris <gmorris+mail@ast.cam.ac.uk>
2/15
----
shell.c
- use strstr instead of strmatch when checking whether $EMACS contains
`term' -- simpler and faster
2/18
----
builtins/cd.def
- implement posix requirement that `pwd -P' set $PWD to a directory
name containing no symlinks
- add new function, setpwd(), just sets (and changes exported value)
of PWD
doc/bashref.texi
- add note to posix mode section about pwd -P setting $PWD
doc{bash.1,bashref.texi}
- added note that BASH_ARGC and BASH_ARGV are only set in extended
debug mode
- expand description of extdebug option to include everything changed
by extended debug mode
2/19
----
pathexp.h
- new flag macro, FNMATCH_IGNCASE, evaluates to FNM_CASEFOLD if the
match_ignore_case variable is non-zero
execute_cmd.c
- new variable, match_ignore_case
- change call to strmatch() in execute_case_command so it includes
FNMATCH_IGNCASE
test.c
- change call to strmatch() in patcomp() so that pattern matching
calls for [[ ... ]] obey the match_ignore_case variable
lib/sh/shmatch.c
- if match_ignore_case is set, enable REG_ICASE in the regexp match
flags
builtins/shopt.def
- new settable option, `nocasematch', controls the match_ignore_case
variable. Currently alters pattern matching for case and [[ ... ]]
commands (==, !=, and =~ operators)
doc/{bashref.texi,bash.1}
- updated descriptions of [[ and case to include reference to
nocasematch option
+51
View File
@@ -11056,6 +11056,57 @@ jobs.c
<pierre.humblet@ieee.org> to fix pid aliasing and reuse problems on
cygwin
variables.c
- set $_ from the environment if we get it there, set to $0 by
default if not in env
doc/{bashref.texi,bash.1}
- a couple of clarifying changes to the description of $_ based on
comments from Glenn Morris <gmorris+mail@ast.cam.ac.uk>
2/15
----
shell.c
- use strstr instead of strmatch when checking whether $EMACS contains
`term' -- simpler and faster
2/18
----
builtins/cd.def
- implement posix requirement that `pwd -P' set $PWD to a directory
name containing no symlinks
- add new function, setpwd(), just sets (and changes exported value)
of PWD
doc/bashref.texi
- add note to posix mode section about pwd -P setting $PWD
doc{bash.1,bashref.texi}
- added note that BASH_ARGC and BASH_ARGV are only set in extended
debug mode
- expand description of extdebug option to include everything changed
by extended debug mode
2/19
----
pathexp.h
- new flag macro, FNMATCH_IGNCASE, evaluates to FNM_CASEFOLD if the
match_ignore_case variable is non-zero
execute_cmd.c
- new variable, match_ignore_case
- change call to strmatch() in execute_case_command so it includes
FNMATCH_IGNCASE
test.c
- change call to strmatch() in patcomp() so that pattern matching
calls for [[ ... ]] obey the match_ignore_case variable
lib/sh/shmatch.c
- if match_ignore_case is set, enable REG_ICASE in the regexp match
flags
builtins/shopt.def
- new settable option, `nocasematch', controls the match_ignore_case
variable. Currently alters pattern matching for case and [[ ... ]]
commands (==, !=, and =~ operators)
+26 -9
View File
@@ -1,7 +1,7 @@
This file is cd.def, from which is created cd.c. It implements the
builtins "cd" and "pwd" in Bash.
Copyright (C) 1987-2004 Free Software Foundation, Inc.
Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -59,6 +59,7 @@ extern int array_needs_making;
extern char *bash_getcwd_errstr;
static int bindpwd __P((int));
static void setpwd __P((char *));
static int change_to_directory __P((char *, int));
static char *cdspell __P((char *));
@@ -84,6 +85,23 @@ instead of following symbolic links; the -L option forces symbolic links
to be followed.
$END
/* Just set $PWD, don't change OLDPWD. Used by `pwd -P' in posix mode. */
static void
setpwd (dirname)
char *dirname;
{
int old_anm;
SHELL_VAR *tvar;
old_anm = array_needs_making;
tvar = bind_variable ("PWD", dirname ? dirname : "", 0);
if (old_anm == 0 && array_needs_making && exported_p (tvar))
{
update_export_env_inplace ("PWD=", 4, dirname ? dirname : "");
array_needs_making = 0;
}
}
static int
bindpwd (no_symlinks)
int no_symlinks;
@@ -107,12 +125,7 @@ bindpwd (no_symlinks)
array_needs_making = 0;
}
tvar = bind_variable ("PWD", dirname ? dirname : "", 0);
if (old_anm == 0 && array_needs_making && exported_p (tvar))
{
update_export_env_inplace ("PWD=", 4, dirname ? dirname : "");
array_needs_making = 0;
}
setpwd (dirname);
if (dirname && dirname != the_current_working_directory)
free (dirname);
@@ -314,16 +327,17 @@ pwd_builtin (list)
WORD_LIST *list;
{
char *directory;
int opt;
int opt, pflag;
verbatim_pwd = no_symbolic_links;
pflag = 0;
reset_internal_getopt ();
while ((opt = internal_getopt (list, "LP")) != -1)
{
switch (opt)
{
case 'P':
verbatim_pwd = 1;
verbatim_pwd = pflag = 1;
break;
case 'L':
verbatim_pwd = 0;
@@ -350,6 +364,9 @@ pwd_builtin (list)
if (directory)
{
printf ("%s\n", directory);
/* This is dumb but posix-mandated. */
if (posixly_correct && pflag)
setpwd (directory);
if (directory != the_current_working_directory)
free (directory);
fflush (stdout);
+25 -3
View File
@@ -1,7 +1,7 @@
This file is cd.def, from which is created cd.c. It implements the
builtins "cd" and "pwd" in Bash.
Copyright (C) 1987-2003 Free Software Foundation, Inc.
Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -59,6 +59,7 @@ extern int array_needs_making;
extern char *bash_getcwd_errstr;
static int bindpwd __P((int));
static void setpwd __P((char *));
static int change_to_directory __P((char *, int));
static char *cdspell __P((char *));
@@ -120,6 +121,23 @@ bindpwd (no_symlinks)
return (EXECUTION_SUCCESS);
}
/* Just set $PWD, don't change OLDPWD. Used by `pwd -P' in posix mode. */
static void
setpwd (dirname)
char *dirname;
{
int old_anm;
SHELL_VAR *tvar;
old_anm = array_needs_making;
tvar = bind_variable ("PWD", dirname ? dirname : "", 0);
if (old_anm == 0 && array_needs_making && exported_p (tvar))
{
update_export_env_inplace ("PWD=", 4, dirname ? dirname : "");
array_needs_making = 0;
}
}
/* Call get_working_directory to reset the value of
the_current_working_directory () */
static char *
@@ -314,16 +332,17 @@ pwd_builtin (list)
WORD_LIST *list;
{
char *directory;
int opt;
int opt, pflag;
verbatim_pwd = no_symbolic_links;
pflag = 0;
reset_internal_getopt ();
while ((opt = internal_getopt (list, "LP")) != -1)
{
switch (opt)
{
case 'P':
verbatim_pwd = 1;
verbatim_pwd = pflag = 1;
break;
case 'L':
verbatim_pwd = 0;
@@ -350,6 +369,9 @@ pwd_builtin (list)
if (directory)
{
printf ("%s\n", directory);
/* This is dumb but posix-mandated. */
if (posixly_correct && pflag)
setpwd (directory);
if (directory != the_current_working_directory)
free (directory);
fflush (stdout);
+3 -2
View File
@@ -1,7 +1,7 @@
This file is shopt.def, from which is created shopt.c.
It implements the Bash `shopt' builtin.
Copyright (C) 1994-2003 Free Software Foundation, Inc.
Copyright (C) 1994-2005 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -64,7 +64,7 @@ extern int check_hashed_filenames, promptvars;
extern int cdspelling, expand_aliases;
extern int extended_quote;
extern int check_window_size;
extern int glob_ignore_case;
extern int glob_ignore_case, match_ignore_case;
extern int hup_on_exit;
extern int xpg_echo;
extern int gnu_error_format;
@@ -155,6 +155,7 @@ static struct {
{ "no_empty_cmd_completion", &no_empty_command_completion, (shopt_set_func_t *)NULL },
#endif
{ "nocaseglob", &glob_ignore_case, (shopt_set_func_t *)NULL },
{ "nocasematch", &match_ignore_case, (shopt_set_func_t *)NULL },
{ "nullglob", &allow_null_glob_expansion, (shopt_set_func_t *)NULL },
#if defined (PROGRAMMABLE_COMPLETION)
{ "progcomp", &prog_completion_enabled, (shopt_set_func_t *)NULL },
+4 -3
View File
@@ -64,7 +64,7 @@ extern int check_hashed_filenames, promptvars;
extern int cdspelling, expand_aliases;
extern int extended_quote;
extern int check_window_size;
extern int glob_ignore_case;
extern int glob_ignore_case, match_ignore_case;
extern int hup_on_exit;
extern int xpg_echo;
extern int gnu_error_format;
@@ -134,13 +134,13 @@ static struct {
{ "failglob", &fail_glob_expansion, (shopt_set_func_t *)NULL },
#if defined (READLINE)
{ "force_fignore", &force_fignore, (shopt_set_func_t *)NULL },
{ "gnu_errfmt", &gnu_error_format, (shopt_set_func_t *)NULL },
{ "histreedit", &history_reediting, (shopt_set_func_t *)NULL },
#endif
{ "gnu_errfmt", &gnu_error_format, (shopt_set_func_t *)NULL },
#if defined (HISTORY)
{ "histappend", &force_append_history, (shopt_set_func_t *)NULL },
#endif
#if defined (READLINE)
{ "histreedit", &history_reediting, (shopt_set_func_t *)NULL },
{ "histverify", &hist_verify, (shopt_set_func_t *)NULL },
{ "hostcomplete", &perform_hostname_completion, enable_hostname_completion },
#endif
@@ -155,6 +155,7 @@ static struct {
{ "no_empty_cmd_completion", &no_empty_command_completion, (shopt_set_func_t *)NULL },
#endif
{ "nocaseglob", &glob_ignore_case, (shopt_set_func_t *)NULL },
{ "nocasematch", &match_ignore_case, (shopt_set_func_t *)NULL },
{ "nullglob", &allow_null_glob_expansion, (shopt_set_func_t *)NULL },
#if defined (PROGRAMMABLE_COMPLETION)
{ "progcomp", &prog_completion_enabled, (shopt_set_func_t *)NULL },
+5 -1
View File
@@ -1,4 +1,4 @@
This is the Bash FAQ, version 3.29, for Bash version 3.0.
This is the Bash FAQ, version 3.30, for Bash version 3.0.
This document contains a set of frequently-asked questions concerning
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
@@ -157,6 +157,10 @@ Formatted versions of the documentation are available with the URLs:
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.0.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.0.tar.gz
Any patches for the current version are available with the URL:
ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/
A4) On what machines will bash run?
Bash has been ported to nearly every version of Unix. All you
+367 -366
View File
File diff suppressed because it is too large Load Diff
+53 -9
View File
@@ -6,12 +6,12 @@
.\" Case Western Reserve University
.\" chet@po.CWRU.Edu
.\"
.\" Last Change: Fri Feb 11 15:43:40 EST 2005
.\" Last Change: Sat Feb 19 17:38:29 EST 2005
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2005 Feb 11" "GNU Bash-3.1-devel"
.TH BASH 1 "2005 Feb 19" "GNU Bash-3.1-devel"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -154,11 +154,13 @@ single-character options to be recognized.
.TP
.B \-\-debugger
Arrange for the debugger profile to be executed before the shell
starts. Turns on extended debugging mode (see the description of the
starts.
Turns on extended debugging mode (see the description of the
.B extdebug
option to the
.B shopt
builtin below) and shell function tracing (see the description of the
builtin below)
and shell function tracing (see the description of the
\fB\-o functrace\fP option to the
.B set
builtin below).
@@ -669,6 +671,10 @@ as primaries.
When the \fB==\fP and \fB!=\fP operators are used, the string to the
right of the operator is considered a pattern and matched according
to the rules described below under \fBPattern Matching\fP.
If the shell option
.B nocasematch
is enabled, the match is performed without regard to the case
of alphabetic characters.
The return value is 0 if the string matches or does not match
the pattern, respectively, and 1 otherwise.
Any part of the pattern may be quoted to force it to be matched as a
@@ -684,7 +690,7 @@ the pattern, and 1 otherwise.
If the regular expression is syntactically incorrect, the conditional
expression's return value is 2.
If the shell option
.B nocaseglob
.B nocasematch
is enabled, the match is performed without regard to the case
of alphabetic characters.
Substrings matched by parenthesized subexpressions within the regular
@@ -798,7 +804,12 @@ A \fBcase\fP command first expands \fIword\fP, and tries to match
it against each \fIpattern\fP in turn, using the same matching rules
as for pathname expansion (see
.B Pathname Expansion
below). When a match is found, the
below).
If the shell option
.B nocasematch
is enabled, the match is performed without regard to the case
of alphabetic characters.
When a match is found, the
corresponding \fIlist\fP is executed. After the first match, no
subsequent matches are attempted. The exit status is zero if no
pattern matches. Otherwise, it is the exit status of the
@@ -1227,11 +1238,18 @@ Expands to the full file name used to invoke this instance of
.TP
.B BASH_ARGC
An array variable whose values are the number of parameters in each
frame of the current bash execution call stack. The number of
frame of the current bash execution call stack.
The number of
parameters to the current subroutine (shell function or script executed
with \fB.\fP or \fBsource\fP) is at the top of the stack. When a
subroutine is executed, the number of parameters passed is pushed onto
with \fB.\fP or \fBsource\fP) is at the top of the stack.
When a subroutine is executed, the number of parameters passed is pushed onto
\fBBASH_ARGC\fP.
The shell sets \fBBASH_ARGC\fP only when in extended debugging mode
(see the description of the
.B extdebug
option to the
.B shopt
builtin below)
.TP
.B BASH_ARGV
An array variable containing all of the parameters in the current bash
@@ -1239,6 +1257,12 @@ execution call stack. The final parameter of the last subroutine call
is at the top of the stack; the first parameter of the initial call is
at the bottom. When a subroutine is executed, the parameters supplied
are pushed onto \fBBASH_ARGV\fP.
The shell sets \fBBASH_ARGV\fP only when in extended debugging mode
(see the description of the
.B extdebug
option to the
.B shopt
builtin below)
.TP
.B BASH_COMMAND
The command currently being executed or about to be executed, unless the
@@ -7970,6 +7994,20 @@ If the command run by the \fBDEBUG\fP trap returns a value of 2, and the
shell is executing in a subroutine (a shell function or a shell script
executed by the \fB.\fP or \fBsource\fP builtins), a call to
\fBreturn\fP is simulated.
.TP
.B 4.
\fBBASH_ARGC\fP and \fBBASH_ARGV\fP are updated as described in their
descriptions above.
.TP
.B 5.
Function tracing is enabled: command substitution, shell functions, and
subshells invoked with \fB(\fP \fIcommand\fP \fB)\fP inherit the
\fBDEBUG\fP and \fBRETURN\fP traps.
.TP
.B 6.
Error tracing is enabled: command substitution, shell functions, and
subshells invoked with \fB(\fP \fIcommand\fP \fB)\fP inherit the
\fBERROR\fP trap.
.RE
.TP 8
.B extglob
@@ -8079,6 +8117,12 @@ expansion (see
.B Pathname Expansion
above).
.TP 8
.B nocasematch
If set,
.B bash
matches patterns in a case\-insensitive fashion when performing matching
while executing \fBcase\fP or \fB[[\fP conditional commands.
.TP 8
.B nullglob
If set,
.B bash
+52 -13
View File
@@ -6,12 +6,12 @@
.\" Case Western Reserve University
.\" chet@po.CWRU.Edu
.\"
.\" Last Change: Tue Jan 4 17:23:59 EST 2005
.\" Last Change: Sat Feb 19 17:38:29 EST 2005
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2005 Jan 4" "GNU Bash-3.1-devel"
.TH BASH 1 "2005 Feb 19" "GNU Bash-3.1-devel"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -154,11 +154,13 @@ single-character options to be recognized.
.TP
.B \-\-debugger
Arrange for the debugger profile to be executed before the shell
starts. Turns on extended debugging mode (see the description of the
starts.
Turns on extended debugging mode (see the description of the
.B extdebug
option to the
.B shopt
builtin below) and shell function tracing (see the description of the
builtin below)
and shell function tracing (see the description of the
\fB\-o functrace\fP option to the
.B set
builtin below).
@@ -669,6 +671,10 @@ as primaries.
When the \fB==\fP and \fB!=\fP operators are used, the string to the
right of the operator is considered a pattern and matched according
to the rules described below under \fBPattern Matching\fP.
If the shell option
.B nocasematch
is enabled, the match is performed without regard to the case
of alphabetic characters.
The return value is 0 if the string matches or does not match
the pattern, respectively, and 1 otherwise.
Any part of the pattern may be quoted to force it to be matched as a
@@ -684,7 +690,7 @@ the pattern, and 1 otherwise.
If the regular expression is syntactically incorrect, the conditional
expression's return value is 2.
If the shell option
.B nocaseglob
.B nocasematch
is enabled, the match is performed without regard to the case
of alphabetic characters.
Substrings matched by parenthesized subexpressions within the regular
@@ -798,7 +804,12 @@ A \fBcase\fP command first expands \fIword\fP, and tries to match
it against each \fIpattern\fP in turn, using the same matching rules
as for pathname expansion (see
.B Pathname Expansion
below). When a match is found, the
below).
If the shell option
.B nocasematch
is enabled, the match is performed without regard to the case
of alphabetic characters.
When a match is found, the
corresponding \fIlist\fP is executed. After the first match, no
subsequent matches are attempted. The exit status is zero if no
pattern matches. Otherwise, it is the exit status of the
@@ -1205,12 +1216,13 @@ to the file name used to invoke
as given by argument zero.
.TP
.B _
At shell startup, set to the absolute file name of the shell or shell
script being executed as passed in the argument list.
At shell startup, set to the absolute pathname used to invoke the
shell or shell script being executed as passed in the environment
or argument list.
Subsequently, expands to the last argument to the previous command,
after expansion.
Also set to the full file name of each command executed and placed in
the environment exported to that command.
Also set to the full pathname used to invoke each command executed
and placed in the environment exported to that command.
When checking mail, this parameter holds the name of the mail file
currently being checked.
.PD
@@ -1226,11 +1238,18 @@ Expands to the full file name used to invoke this instance of
.TP
.B BASH_ARGC
An array variable whose values are the number of parameters in each
frame of the current bash execution call stack. The number of
frame of the current bash execution call stack.
The number of
parameters to the current subroutine (shell function or script executed
with \fB.\fP or \fBsource\fP) is at the top of the stack. When a
subroutine is executed, the number of parameters passed is pushed onto
with \fB.\fP or \fBsource\fP) is at the top of the stack.
When a subroutine is executed, the number of parameters passed is pushed onto
\fBBASH_ARGC\fP.
The shell sets \fBBASH_ARGC\fP only when in extended debugging mode
(see the description of the
.B extdebug
option to the
.B shopt
builtin below)
.TP
.B BASH_ARGV
An array variable containing all of the parameters in the current bash
@@ -1238,6 +1257,12 @@ execution call stack. The final parameter of the last subroutine call
is at the top of the stack; the first parameter of the initial call is
at the bottom. When a subroutine is executed, the parameters supplied
are pushed onto \fBBASH_ARGV\fP.
The shell sets \fBBASH_ARGV\fP only when in extended debugging mode
(see the description of the
.B extdebug
option to the
.B shopt
builtin below)
.TP
.B BASH_COMMAND
The command currently being executed or about to be executed, unless the
@@ -7969,6 +7994,20 @@ If the command run by the \fBDEBUG\fP trap returns a value of 2, and the
shell is executing in a subroutine (a shell function or a shell script
executed by the \fB.\fP or \fBsource\fP builtins), a call to
\fBreturn\fP is simulated.
.TP
.B 4.
\fBBASH_ARGC\fP and \fBBASH_ARGV\fP are updated as described in their
descriptions above.
.TP
.B 5.
Function tracing is enabled: command substitution, shell functions, and
subshells invoked with \fB(\fP \fIcommand\fP \fB)\fP inherit the
\fBDEBUG\fP and \fBRETURN\fP traps.
.TP
.B 6.
Error tracing is enabled: command substitution, shell functions, and
subshells invoked with \fB(\fP \fIcommand\fP \fB)\fP inherit the
\fBERROR\fP trap.
.RE
.TP 8
.B extglob
+9 -8
View File
@@ -2,7 +2,7 @@
<TITLE>BASH(1) Manual Page</TITLE>
</HEAD>
<BODY><TABLE WIDTH=100%>
<TH ALIGN=LEFT>BASH(1)<TH ALIGN=CENTER>2004 Dec 22<TH ALIGN=RIGHT>BASH(1)
<TH ALIGN=LEFT>BASH(1)<TH ALIGN=CENTER>2005 Feb 11<TH ALIGN=RIGHT>BASH(1)
</TABLE>
<BR><A HREF="#index">Index</A>
<HR>
@@ -40,7 +40,7 @@ bash - GNU Bourne-Again SHell
<H2>COPYRIGHT</H2>
Bash is Copyright &#169; 1989-2004 by the Free Software Foundation, Inc.
Bash is Copyright &#169; 1989-2005 by the Free Software Foundation, Inc.
<A NAME="lbAE">&nbsp;</A>
<H2>DESCRIPTION</H2>
@@ -1573,12 +1573,13 @@ as given by argument zero.
<DT><B>_</B>
<DD>
At shell startup, set to the absolute file name of the shell or shell
script being executed as passed in the argument list.
At shell startup, set to the absolute pathname used to invoke the
shell or shell script being executed as passed in the environment
or argument list.
Subsequently, expands to the last argument to the previous command,
after expansion.
Also set to the full file name of each command executed and placed in
the environment exported to that command.
Also set to the full pathname used to invoke each command executed
and placed in the environment exported to that command.
When checking mail, this parameter holds the name of the mail file
currently being checked.
@@ -7014,7 +7015,7 @@ special variable as delimiters.
Shell quoting is honored.
Each word is then expanded using
brace expansion, tilde expansion, parameter and variable expansion,
command substitution, arithmetic expansion, and pathname expansion,
command substitution, and arithmetic expansion,
as described above under
<FONT SIZE=-1><B>EXPANSION</B>.
@@ -11428,6 +11429,6 @@ Array variables may not (yet) be exported.
</DL>
<HR>
This document was created by man2html from bash.1.<BR>
Time: 30 December 2004 17:01:32 EST
Time: 14 February 2005 11:56:43 EST
</BODY>
</HTML>
+212 -208
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.18.1
%%CreationDate: Thu Dec 30 17:01:21 2004
%%CreationDate: Mon Feb 14 11:56:35 2005
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
@@ -10,7 +10,7 @@
%%+ font Palatino-Italic
%%+ font Palatino-Bold
%%DocumentSuppliedResources: procset grops 1.18 1
%%Pages: 64
%%Pages: 65
%%PageOrder: Ascend
%%Orientation: Portrait
%%EndComments
@@ -225,12 +225,17 @@ ENC0/Courier RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(1)535 768 Q 0 Cg EP
%%Page: 1 2
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
-.35 E/F1 10.95/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0
(bash \255 GNU Bourne-Ag)108 96 Q(ain SHell)-.05 E F1(SYNOPSIS)72 112.8
Q/F2 10/Times-Bold@0 SF(bash)108 124.8 Q F0([options] [\214le])2.5 E F1
(COPYRIGHT)72 141.6 Q F0(Bash is Cop)108 153.6 Q
(yright \251 1989-2004 by the Free Softw)-.1 E(are F)-.1 E
(yright \251 1989-2005 by the Free Softw)-.1 E(are F)-.1 E
(oundation, Inc.)-.15 E F1(DESCRIPTION)72 170.4 Q F2(Bash)108 182.4 Q F0
.973(is an)3.474 F F2(sh)3.473 E F0 .973
(-compatible command language interpreter that e)B -.15(xe)-.15 G .973
@@ -321,9 +326,9 @@ E F2(po)2.5 E F0(\(portable object\) \214le format.)2.5 E F2
144 686.4 Q .3 -.15(ve \()-.25 H(see).15 E F4(INV)2.5 E(OCA)-.405 E
(TION)-.855 E F0(belo)2.25 E(w\).)-.25 E F2(\255\255login)108 703.2 Q F0
(Equi)144 715.2 Q -.25(va)-.25 G(lent to).25 E F2<ad6c>2.5 E F0(.)A
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(1)203.45 E 0 Cg EP
%%Page: 2 2
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(1)204 E 0 Cg EP
%%Page: 2 3
%%BeginPageSetup
BP
%%EndPageSetup
@@ -444,9 +449,9 @@ F(ariable)-.25 E F3 -.27(BA)108 679.2 S(SH_ENV).27 E F0 1.01(in the en)
108 727.2 S 2.5(tt).2 G(he v)-2.5 E(alue of the)-.25 E F3 -.666(PA)2.5 G
(TH)-.189 E F0 -.25(va)2.25 G
(riable is not used to search for the \214le name.).25 E
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(2)203.45 E 0 Cg EP
%%Page: 3 3
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(2)204 E 0 Cg EP
%%Page: 3 4
%%BeginPageSetup
BP
%%EndPageSetup
@@ -570,9 +575,9 @@ F1(Pipelines)87 679.2 Q F0(A)108 691.2 Q F2(pipeline)2.919 E F0 .419
F F1(|)2.92 E F0 5.42(.T)C .42(he format for a pipeline)-5.42 F(is:)108
703.2 Q([)144 720 Q F1(time)A F0([)2.5 E F1<ad70>A F0(]] [ ! ])A F2
(command)2.5 E F0([)2.5 E F1(|)2.5 E F2(command2)2.5 E F0(... ])2.5 E
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(3)203.45 E 0 Cg EP
%%Page: 4 4
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(3)204 E 0 Cg EP
%%Page: 4 5
%%BeginPageSetup
BP
%%EndPageSetup
@@ -691,9 +696,9 @@ A({)108 573.6 Q F1(list)2.5 E F0 2.5(;})C F1(list)3.89 E F0 .402
F(SIONS)144 727.2 Q F5(.)A F0 -.8(Wo)5.633 G 1.133
(rd splitting and pathname e).8 F 1.133
(xpansion are not performed on the w)-.15 F 1.133(ords between the)-.1 F
F3([[)3.632 E F0(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G
(004 Dec 22)-123.87 E(4)203.45 E 0 Cg EP
%%Page: 5 5
F3([[)3.632 E F0(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G
(005 Feb 11)-124.42 E(4)204 E 0 Cg EP
%%Page: 5 6
%%BeginPageSetup
BP
%%EndPageSetup
@@ -831,9 +836,9 @@ F F2(name)144 727.2 Q F0 .759(to be set to null.)3.439 F .759
(The line read is sa)5.759 F -.15(ve)-.2 G 3.26(di).15 G 3.26(nt)-3.26 G
.76(he v)-3.26 F(ariable)-.25 E F1(REPL)3.26 E(Y)-.92 E F0 5.76(.T)C(he)
-5.76 E F2(list)3.35 E F0 .76(is e)3.94 F -.15(xe)-.15 G .76
(cuted after).15 F(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15
G(004 Dec 22)-123.87 E(5)203.45 E 0 Cg EP
%%Page: 6 6
(cuted after).15 F(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15
G(005 Feb 11)-124.42 E(5)204 E 0 Cg EP
%%Page: 6 7
%%BeginPageSetup
BP
%%EndPageSetup
@@ -969,9 +974,9 @@ E -.15(ve)-.25 G(nt history e).15 E(xpansion.)-.15 E
G(he)-2.974 E F2 .474(escape c)2.974 F(har)-.15 E(acter)-.15 E F0 5.474
(.I).73 G 2.974(tp)-5.474 G(reserv)-2.974 E .474(es the literal v)-.15 F
.474(alue of the ne)-.25 F .474(xt character that)-.15 F
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(6)203.45 E 0 Cg EP
%%Page: 7 7
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(6)204 E 0 Cg EP
%%Page: 7 8
%%BeginPageSetup
BP
%%EndPageSetup
@@ -1092,9 +1097,9 @@ E F0(,)A F1(export)3.648 E F0(,)A F1 -.18(re)108 700.8 S(adonly).18 E F0
(operator can be used to append to or add to the v)108 729.6 R(ariable')
-.25 E 2.757(sp)-.55 G(re)-2.757 E .257(vious v)-.25 F 2.757(alue. When)
-.25 F .257(+= is applied to a v)2.757 F(ariable)-.25 E(GNU Bash-3.1-de)
72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(7)203.45 E
0 Cg EP
%%Page: 8 8
72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(7)204 E 0
Cg EP
%%Page: 8 9
%%BeginPageSetup
BP
%%EndPageSetup
@@ -1190,23 +1195,24 @@ F0 .578(is started with the)3.078 F F2<ad63>3.078 E F0 .369
(-)-.2 E(wise, it is set to the \214le name used to in)144 530.4 Q -.2
(vo)-.4 G -.1(ke).2 G F2(bash)2.6 E F0 2.5(,a)C 2.5(sg)-2.5 G -2.15 -.25
(iv e)-2.5 H 2.5(nb).25 G 2.5(ya)-2.5 G -.18(rg)-2.5 G(ument zero.).18 E
F2(_)108 542.4 Q F0 .1(At shell startup, set to the absolute \214le nam\
e of the shell or shell script being e)31 F -.15(xe)-.15 G .1
(cuted as passed in).15 F 1.706(the ar)144 554.4 R 1.706(gument list.)
-.18 F(Subsequently)6.706 E 4.206(,e)-.65 G 1.705(xpands to the last ar)
-4.356 F 1.705(gument to the pre)-.18 F 1.705(vious command, after)-.25
F -.15(ex)144 566.4 S 2.515(pansion. Also).15 F .016
(set to the full \214le name of each command e)2.515 F -.15(xe)-.15 G
.016(cuted and placed in the en).15 F(vironment)-.4 E -.15(ex)144 578.4
S 1.006(ported to that command.).15 F 1.006
(When checking mail, this parameter holds the name of the mail \214le)
6.006 F(currently being check)144 590.4 Q(ed.)-.1 E F2(Shell V)87 607.2
Q(ariables)-.92 E F0(The follo)108 619.2 Q(wing v)-.25 E
(ariables are set by the shell:)-.25 E F2 -.3(BA)108 636 S(SH).3 E F0
(Expands to the full \214le name used to in)9.07 E -.2(vo)-.4 G .2 -.1
(ke t).2 H(his instance of).1 E F2(bash)2.5 E F0(.)A F2 -.3(BA)108 648 S
(SH_ARGC).3 E F0 1.039(An array v)144 660 R 1.039(ariable whose v)-.25 F
1.039
F2(_)108 542.4 Q F0 .054
(At shell startup, set to the absolute pathname used to in)31 F -.2(vo)
-.4 G .255 -.1(ke t).2 H .055(he shell or shell script being e).1 F -.15
(xe)-.15 G(cuted).15 E .692(as passed in the en)144 554.4 R .692
(vironment or ar)-.4 F .691(gument list.)-.18 F(Subsequently)5.691 E
3.191(,e)-.65 G .691(xpands to the last ar)-3.341 F .691(gument to the)
-.18 F(pre)144 566.4 Q .57(vious command, after e)-.25 F 3.07
(xpansion. Also)-.15 F .571(set to the full pathname used to in)3.071 F
-.2(vo)-.4 G .771 -.1(ke e).2 H .571(ach command).1 F -.15(exe)144 578.4
S 1.6(cuted and placed in the en).15 F 1.6(vironment e)-.4 F 1.6
(xported to that command.)-.15 F 1.6(When checking mail, this)6.6 F
(parameter holds the name of the mail \214le currently being check)144
590.4 Q(ed.)-.1 E F2(Shell V)87 607.2 Q(ariables)-.92 E F0(The follo)108
619.2 Q(wing v)-.25 E(ariables are set by the shell:)-.25 E F2 -.3(BA)
108 636 S(SH).3 E F0(Expands to the full \214le name used to in)9.07 E
-.2(vo)-.4 G .2 -.1(ke t).2 H(his instance of).1 E F2(bash)2.5 E F0(.)A
F2 -.3(BA)108 648 S(SH_ARGC).3 E F0 1.039(An array v)144 660 R 1.039
(ariable whose v)-.25 F 1.039
(alues are the number of parameters in each frame of the current bash)
-.25 F -.15(exe)144 672 S .535(cution call stack.).15 F .535(The number\
of parameters to the current subroutine \(shell function or script)
@@ -1216,8 +1222,8 @@ Q(ariables)-.92 E F0(The follo)108 619.2 Q(wing v)-.25 E
(When a subroutine is e)5.142 F -.15(xe)-.15 G .142
(cuted, the number of).15 F(parameters passed is pushed onto)144 696 Q
F2 -.3(BA)2.5 G(SH_ARGC).3 E F0(.)A(GNU Bash-3.1-de)72 768 Q -.15(ve)
-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(8)203.45 E 0 Cg EP
%%Page: 9 9
-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(8)204 E 0 Cg EP
%%Page: 9 10
%%BeginPageSetup
BP
%%EndPageSetup
@@ -1310,9 +1316,9 @@ F .667(If the)5.667 F .535
F(in)144 697.2 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(db).1 G 2.5(yt)-2.5 G
(he programmable completion f)-2.5 E(acilities \(see)-.1 E F1(Pr)2.5 E
(ogrammable Completion)-.18 E F0(belo)2.5 E(w\).)-.25 E(GNU Bash-3.1-de)
72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(9)203.45 E
0 Cg EP
%%Page: 10 10
72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(9)204 E 0
Cg EP
%%Page: 10 11
%%BeginPageSetup
BP
%%EndPageSetup
@@ -1404,9 +1410,9 @@ F1(cd)2.5 E F0(command.)2.5 E F1(OPT)108 681.6 Q(ARG)-.9 E F0 1.627
(gument processed by the)-.18 F F1(getopts)4.127 E F0 -.2(bu)4.127 G
1.626(iltin command \(see).2 F F2(SHELL)4.126 E -.09(BU)144 705.6 S(IL)
.09 E(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 E(GNU Bash-3.1-de)72
768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(10)198.45 E 0
Cg EP
%%Page: 11 11
768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(10)199 E 0 Cg
EP
%%Page: 11 12
%%BeginPageSetup
BP
%%EndPageSetup
@@ -1500,9 +1506,9 @@ en printing selection lists.).2 F
(in)144 705.6 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(db).1 G 2.5(yt)-2.5 G
(he programmable completion f)-2.5 E(acility \(see)-.1 E F1(Pr)2.5 E
(ogrammable Completion)-.18 E F0(belo)2.5 E(w\).)-.25 E(GNU Bash-3.1-de)
72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(11)198.45 E
0 Cg EP
%%Page: 12 12
72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(11)199 E 0
Cg EP
%%Page: 12 13
%%BeginPageSetup
BP
%%EndPageSetup
@@ -1620,9 +1626,9 @@ R F1(history)3.173 E F0 -.2(bu)3.172 G 3.172(iltin. If).2 F .672(this v)
(adds the contents of the ne)3.215 F 3.215<778c>-.25 G .715(le to the e)
-3.215 F .715(xisting list.)-.15 F(If)5.716 E F3(HOSTFILE)3.216 E F0
.716(is set, b)2.966 F .716(ut has no v)-.2 F(alue,)-.25 E
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(12)198.45 E 0 Cg EP
%%Page: 13 13
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(12)199 E 0 Cg EP
%%Page: 13 14
%%BeginPageSetup
BP
%%EndPageSetup
@@ -1727,9 +1733,9 @@ F F3 .359(SHELL B)144 636 R(UIL)-.09 E .359(TIN COMMANDS)-.828 F F0
-.1 F 26.329(administrator who installs)144 708 R F1(bash)28.829 E F0
31.329(.A)C 26.328(common v)-2.501 F 26.328(alue is)-.25 F/F4 10
/Courier@0 SF(/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin)144 720
Q F0(.)A(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G
(004 Dec 22)-123.87 E(13)198.45 E 0 Cg EP
%%Page: 14 14
Q F0(.)A(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G
(005 Feb 11)-124.42 E(13)199 E 0 Cg EP
%%Page: 14 15
%%BeginPageSetup
BP
%%EndPageSetup
@@ -1845,9 +1851,9 @@ F F2(substring)3.125 E F0 3.125(,t).22 G .625
.833(job identi\214er \(see)5.833 F F4 .834(JOB CONTR)3.334 F(OL)-.27 E
F0(belo)3.084 E 3.334(w\). If)-.25 F .834(set to an)3.334 F 3.334(yo)
-.15 G .834(ther v)-3.334 F .834(alue, the supplied string)-.25 F
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(14)198.45 E 0 Cg EP
%%Page: 15 15
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(14)199 E 0 Cg EP
%%Page: 15 16
%%BeginPageSetup
BP
%%EndPageSetup
@@ -1989,9 +1995,9 @@ E .471(The order of e)108 703.2 R .471(xpansions is: brace e)-.15 F .471
.47(ariable and arithmetic e)-3.221 F(xpansion)-.15 E
(and command substitution \(done in a left-to-right f)108 715.2 Q
(ashion\), w)-.1 E(ord splitting, and pathname e)-.1 E(xpansion.)-.15 E
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(15)198.45 E 0 Cg EP
%%Page: 16 16
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(15)199 E 0 Cg EP
%%Page: 16 17
%%BeginPageSetup
BP
%%EndPageSetup
@@ -2121,9 +2127,9 @@ ith the corresponding element from the directory stack, as it w)108
(consist of a number without a leading `+' or `\255', `+' is assumed.)
108 712.8 Q(If the login name is in)108 729.6 Q -.25(va)-.4 G
(lid, or the tilde e).25 E(xpansion f)-.15 E(ails, the w)-.1 E
(ord is unchanged.)-.1 E(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87
(l2).15 G(004 Dec 22)-123.87 E(16)198.45 E 0 Cg EP
%%Page: 17 17
(ord is unchanged.)-.1 E(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42
(l2).15 G(005 Feb 11)-124.42 E(16)199 E 0 Cg EP
%%Page: 17 18
%%BeginPageSetup
BP
%%EndPageSetup
@@ -2253,9 +2259,9 @@ F0 .111(is tak)2.61 F .111(en relati)-.1 F .411 -.15(ve t)-.25 H 2.611
(id being confused with the :- e).2 F 3.141(xpansion. Substring)-.15 F
(inde)3.141 E .641(xing is zero-based unless the)-.15 F
(positional parameters are used, in which case the inde)144 712.8 Q
(xing starts at 1.)-.15 E(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87
(l2).15 G(004 Dec 22)-123.87 E(17)198.45 E 0 Cg EP
%%Page: 18 18
(xing starts at 1.)-.15 E(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42
(l2).15 G(005 Feb 11)-124.42 E(17)199 E 0 Cg EP
%%Page: 18 19
%%BeginPageSetup
BP
%%EndPageSetup
@@ -2373,9 +2379,8 @@ F1(`)A(Bash)108 715.2 Q F0 .019(performs the e)2.519 F .019
(dard output of the command, with an)108 727.2 R 3.268(yt)-.15 G .768
(railing ne)-3.268 F .768(wlines deleted.)-.25 F .768(Embedded ne)5.768
F .768(wlines are not deleted, b)-.25 F(ut)-.2 E(GNU Bash-3.1-de)72 768
Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(18)198.45 E 0 Cg
EP
%%Page: 19 19
Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(18)199 E 0 Cg EP
%%Page: 19 20
%%BeginPageSetup
BP
%%EndPageSetup
@@ -2502,8 +2507,8 @@ F .765(ord is left unchanged.)-.1 F .765(If the)5.765 F F1(nullglob)
2.065(is printed and the command is not e)108 727.2 R -.15(xe)-.15 G
4.565(cuted. If).15 F 2.065(the shell option)4.565 F F1(nocaseglob)4.565
E F0 2.066(is enabled, the match is)4.566 F(GNU Bash-3.1-de)72 768 Q
-.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(19)198.45 E 0 Cg EP
%%Page: 20 20
-.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(19)199 E 0 Cg EP
%%Page: 20 21
%%BeginPageSetup
BP
%%EndPageSetup
@@ -2620,9 +2625,9 @@ F0(.)A(Composite patterns may be formed using one or more of the follo)
(Matches one or more occurrences of the gi)180 682.8 Q -.15(ve)-.25 G
2.5(np).15 G(atterns)-2.5 E F1(@\()144 694.8 Q F3(pattern-list).833 E F1
(\)).833 E F0(Matches one of the gi)180 706.8 Q -.15(ve)-.25 G 2.5(np)
.15 G(atterns)-2.5 E(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2)
.15 G(004 Dec 22)-123.87 E(20)198.45 E 0 Cg EP
%%Page: 21 21
.15 G(atterns)-2.5 E(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2)
.15 G(005 Feb 11)-124.42 E(20)199 E 0 Cg EP
%%Page: 21 22
%%BeginPageSetup
BP
%%EndPageSetup
@@ -2712,8 +2717,8 @@ hould be used with care, as the)108 626.4 R 3.447(ym)-.15 G .947
(is not speci\214ed.)2.74 E
(The general format for redirecting input is:)108 696 Q([)144 712.8 Q F2
(n)A F0(])A F1(<)A F2(wor)A(d)-.37 E F0(GNU Bash-3.1-de)72 768 Q -.15
(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(21)198.45 E 0 Cg EP
%%Page: 22 22
(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(21)199 E 0 Cg EP
%%Page: 22 23
%%BeginPageSetup
BP
%%EndPageSetup
@@ -2802,9 +2807,9 @@ F0 .774(are quoted, the)4.044 F F2(delimiter)3.624 E F0 .774
(<<<)144 679.2 Q F2(wor)A(d)-.37 E F0(The)108 696 Q F2(wor)2.5 E(d)-.37
E F0(is e)2.5 E
(xpanded and supplied to the command on its standard input.)-.15 E
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(22)198.45 E 0 Cg EP
%%Page: 23 23
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(22)199 E 0 Cg EP
%%Page: 23 24
%%BeginPageSetup
BP
%%EndPageSetup
@@ -2917,9 +2922,9 @@ E .436
(another command does not tak)108 727.2 R 3.662(ee)-.1 G -.25(ff)-3.662
G 1.162(ect until the ne).25 F 1.162(xt line of input is read.)-.15 F
1.162(The commands follo)6.162 F 1.162(wing the)-.25 F(GNU Bash-3.1-de)
72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(23)198.45 E
0 Cg EP
%%Page: 24 24
72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(23)199 E 0
Cg EP
%%Page: 24 25
%%BeginPageSetup
BP
%%EndPageSetup
@@ -3040,9 +3045,9 @@ F .206(gers with no)-.15 F .429(check for o)108 537.6 R -.15(ve)-.15 G
(multiplication, di)10.72 E(vision, remainder)-.25 E F1 2.5<2bad>108
674.4 S F0(addition, subtraction)19.6 E F1(<< >>)108 686.4 Q F0
(left and right bitwise shifts)10.7 E F1(<= >= < >)108 698.4 Q F0
(comparison)144 710.4 Q(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87
(l2).15 G(004 Dec 22)-123.87 E(24)198.45 E 0 Cg EP
%%Page: 25 25
(comparison)144 710.4 Q(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42
(l2).15 G(005 Feb 11)-124.42 E(24)199 E 0 Cg EP
%%Page: 25 26
%%BeginPageSetup
BP
%%EndPageSetup
@@ -3146,8 +3151,8 @@ F2(\214le)2.5 E F0 -.35(Tr)10.02 G(ue if).35 E F2(\214le)2.5 E F0 -.15
(ex)2.5 G(ists and its set-user).15 E(-id bit is set.)-.2 E F1<ad77>108
708 Q F2(\214le)2.5 E F0 -.35(Tr)8.36 G(ue if).35 E F2(\214le)2.5 E F0
-.15(ex)2.5 G(ists and is writable.).15 E(GNU Bash-3.1-de)72 768 Q -.15
(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(25)198.45 E 0 Cg EP
%%Page: 26 26
(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(25)199 E 0 Cg EP
%%Page: 26 27
%%BeginPageSetup
BP
%%EndPageSetup
@@ -3247,8 +3252,8 @@ R(an)3.176 E 3.176(yo)-.15 G 3.176(ft)-3.176 G .677
.149(ut do not af)-.2 F .149(fect the current shell en)-.25 F 2.649
(vironment. A)-.4 F(redirection error causes the command to e)108 729.6
Q(xit with a non-zero status.)-.15 E(GNU Bash-3.1-de)72 768 Q -.15(ve)
-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(26)198.45 E 0 Cg EP
%%Page: 27 27
-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(26)199 E 0 Cg EP
%%Page: 27 28
%%BeginPageSetup
BP
%%EndPageSetup
@@ -3358,9 +3363,9 @@ F4($PPID)2.5 E F0 .426(When a simple command other than a b)108 686.4 R
-2.927 G(eparate)-2.927 E -.15(exe)108 698.4 S .134(cution en).15 F .134
(vironment that consists of the follo)-.4 F 2.634(wing. Unless)-.25 F
.133(otherwise noted, the v)2.634 F .133(alues are inherited from)-.25 F
(the shell.)108 710.4 Q(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87
(l2).15 G(004 Dec 22)-123.87 E(27)198.45 E 0 Cg EP
%%Page: 28 28
(the shell.)108 710.4 Q(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42
(l2).15 G(005 Feb 11)-124.42 E(27)199 E 0 Cg EP
%%Page: 28 29
%%BeginPageSetup
BP
%%EndPageSetup
@@ -3476,9 +3481,9 @@ F0 .202(itself returns the e)2.702 F .202
(cuted, unless a syntax error occurs, in which case).15 F(it e)108 705.6
Q(xits with a non-zero v)-.15 E 2.5(alue. See)-.25 F(also the)2.5 E F1
(exit)2.5 E F0 -.2(bu)2.5 G(iltin command belo).2 E -.65(w.)-.25 G
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(28)198.45 E 0 Cg EP
%%Page: 29 29
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(28)199 E 0 Cg EP
%%Page: 29 30
%%BeginPageSetup
BP
%%EndPageSetup
@@ -3614,9 +3619,9 @@ E F0 .277(refers to a stopped)2.777 F F2(ce)2.777 E F0(job)2.777 E 5.277
724.8 R F2(bash)2.88 E F0 .38(reports an error)2.88 F 5.38(.U)-.55 G
(sing)-5.38 E F2(%?ce)2.88 E F0 2.88(,o)C 2.88(nt)-2.88 G .38
(he other hand, refers to an)-2.88 F 2.88(yj)-.15 G(ob)-2.88 E
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(29)198.45 E 0 Cg EP
%%Page: 30 30
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(29)199 E 0 Cg EP
%%Page: 30 31
%%BeginPageSetup
BP
%%EndPageSetup
@@ -3719,9 +3724,9 @@ uld be used to embed a terminal)-.15 F(control sequence into the prompt)
(end a sequence of non-printing characters)29.89 E .119
(The command number and the history number are usually dif)108 720 R .12
(ferent: the history number of a command is its)-.25 F(GNU Bash-3.1-de)
72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(30)198.45 E
0 Cg EP
%%Page: 31 31
72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(30)199 E 0
Cg EP
%%Page: 31 32
%%BeginPageSetup
BP
%%EndPageSetup
@@ -3850,9 +3855,9 @@ F0(,).72 E F4(SP)2.5 E -.3(AC)-.9 G(E).3 E F0 2.5(,a).73 G(nd)-2.5 E F4
E F4(macr)4.042 E(o)-.45 E F0(,)A F4 -.1(ke)4.042 G(yname)-.2 E F0 1.542
(is the name of a k)4.222 F 1.841 -.15(ey s)-.1 H 1.541(pelled out in)
.15 F 2.5(English. F)108 717.6 R(or e)-.15 E(xample:)-.15 E
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(31)198.45 E 0 Cg EP
%%Page: 32 32
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(31)199 E 0 Cg EP
%%Page: 32 33
%%BeginPageSetup
BP
%%EndPageSetup
@@ -3939,9 +3944,9 @@ F0 .01(Controls what happens when readline w)144 700.8 R .011
F0 3.44(,r)C .94(eadline uses a visible bell if one is a)-3.44 F -.25
(va)-.2 G 3.44(ilable. If).25 F .94(set to)3.44 F F2(audible)3.44 E F0
(,)A(readline attempts to ring the terminal')144 724.8 Q 2.5(sb)-.55 G
(ell.)-2.5 E(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G
(004 Dec 22)-123.87 E(32)198.45 E 0 Cg EP
%%Page: 33 33
(ell.)-2.5 E(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G
(005 Feb 11)-124.42 E(32)199 E 0 Cg EP
%%Page: 33 34
%%BeginPageSetup
BP
%%EndPageSetup
@@ -4038,9 +4043,9 @@ E(ault k)-.1 E -.15(ey)-.1 G(map.).15 E F1(mark\255dir)108 672 Q
.15 E F1(mark\255modi\214ed\255lines \(Off\))108 696 Q F0(If set to)144
708 Q F1(On)2.5 E F0 2.5(,h)C(istory lines that ha)-2.5 E .3 -.15(ve b)
-.2 H(een modi\214ed are displayed with a preceding asterisk \().15 E F1
(*)A F0(\).)A(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G
(004 Dec 22)-123.87 E(33)198.45 E 0 Cg EP
%%Page: 34 34
(*)A F0(\).)A(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G
(005 Feb 11)-124.42 E(33)199 E 0 Cg EP
%%Page: 34 35
%%BeginPageSetup
BP
%%EndPageSetup
@@ -4138,9 +4143,9 @@ Q F1(application)3.003 E F0 .503
(ey s)-.1 H .397(equence that quotes the).15 F(current or pre)180 684 Q
(vious w)-.25 E(ord in Bash:)-.1 E F1($if)180 708 Q F0(Bash)2.5 E 2.5
(#Q)180 720 S(uote the current or pre)-2.5 E(vious w)-.25 E(ord)-.1 E
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(34)198.45 E 0 Cg EP
%%Page: 35 35
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(34)199 E 0 Cg EP
%%Page: 35 36
%%BeginPageSetup
BP
%%EndPageSetup
@@ -4230,8 +4235,8 @@ Q .822 -.15(ve f)-.15 H(orw).15 E .522(ard to the end of the ne)-.1 F
(ack to the start of the current or pre).15 F 1.41(vious w)-.25 F 3.91
(ord. W)-.1 F 1.41(ords are composed of alphanumeric)-.8 F
(characters \(letters and digits\).)144 696 Q(GNU Bash-3.1-de)72 768 Q
-.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(35)198.45 E 0 Cg EP
%%Page: 36 36
-.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(35)199 E 0 Cg EP
%%Page: 36 37
%%BeginPageSetup
BP
%%EndPageSetup
@@ -4327,9 +4332,9 @@ E(g)-.1 E F0(mo)3.236 E -.15(ve)-.15 G .728
(See)5.939 E F2(HIST)3.439 E(OR)-.162 E 3.189(YE)-.315 G(XP)-3.189 E
(ANSION)-.666 E F0(belo)3.189 E 3.439(wf)-.25 G .939(or a descrip-)
-3.439 F(tion of history e)144 724.8 Q(xpansion.)-.15 E(GNU Bash-3.1-de)
72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(36)198.45 E
0 Cg EP
%%Page: 37 37
72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(36)199 E 0
Cg EP
%%Page: 37 38
%%BeginPageSetup
BP
%%EndPageSetup
@@ -4431,9 +4436,9 @@ F(ferently)-.25 E 6.894(.E)-.65 G 1.894(ach call to)-6.894 F F4 -.37(re)
(mode. In)144 724.8 R -.15(ove)3.968 G 1.468
(rwrite mode, characters bound to).15 F F1(self\255insert)3.969 E F0
1.469(replace the te)3.969 F 1.469(xt at point rather than)-.15 F
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(37)198.45 E 0 Cg EP
%%Page: 38 38
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(37)199 E 0 Cg EP
%%Page: 38 39
%%BeginPageSetup
BP
%%EndPageSetup
@@ -4516,9 +4521,9 @@ F0(or)2.5 E F1(yank\255pop)2.5 E F0(.)A F1(Numeric Ar)87 549.6 Q
(cuting this function the \214rst time mak).15 F .378(es the ar)-.1 F
.378(gument count)-.18 F(four)144 681.6 Q 2.5(,as)-.4 G(econd time mak)
-2.5 E(es the ar)-.1 E(gument count sixteen, and so on.)-.18 E F1
(Completing)87 698.4 Q F0(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87
(l2).15 G(004 Dec 22)-123.87 E(38)198.45 E 0 Cg EP
%%Page: 39 39
(Completing)87 698.4 Q F0(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42
(l2).15 G(005 Feb 11)-124.42 E(38)199 E 0 Cg EP
%%Page: 39 40
%%BeginPageSetup
BP
%%EndPageSetup
@@ -4609,9 +4614,9 @@ in braces so)144 648 R(the list is a)144 660 Q -.25(va)-.2 G
E(start\255kbd\255macr)108 688.8 Q 2.5(o\()-.18 G(C\255x \()-2.5 E(\))
.833 E F0(Be)144 700.8 Q(gin sa)-.15 E
(ving the characters typed into the current k)-.2 E -.15(ey)-.1 G
(board macro.).15 E(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2)
.15 G(004 Dec 22)-123.87 E(39)198.45 E 0 Cg EP
%%Page: 40 40
(board macro.).15 E(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2)
.15 G(005 Feb 11)-124.42 E(39)199 E 0 Cg EP
%%Page: 40 41
%%BeginPageSetup
BP
%%EndPageSetup
@@ -4709,8 +4714,8 @@ F .872(the line is redra)144 712.8 R 3.372(wn. If)-.15 F 3.372(an)3.372
G .872(umeric ar)-3.372 F .872
(gument is supplied, an asterisk is appended before pathname)-.18 F -.15
(ex)144 724.8 S(pansion.).15 E(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G
123.87(l2).15 G(004 Dec 22)-123.87 E(40)198.45 E 0 Cg EP
%%Page: 41 41
124.42(l2).15 G(005 Feb 11)-124.42 E(40)199 E 0 Cg EP
%%Page: 41 42
%%BeginPageSetup
BP
%%EndPageSetup
@@ -4779,18 +4784,17 @@ F1<ad57>2.821 E F0 .32(option is considered.)2.821 F .32
(The string is \214rst split using the)5.32 F .412(characters in the)108
472.8 R F3(IFS)2.912 E F0 .412(special v)2.662 F .412
(ariable as delimiters.)-.25 F .412(Shell quoting is honored.)5.412 F
.413(Each w)5.412 F .413(ord is then e)-.1 F(xpanded)-.15 E 1.64
(using brace e)108 484.8 R 1.64(xpansion, tilde e)-.15 F 1.64
(xpansion, parameter and v)-.15 F 1.64(ariable e)-.25 F 1.64
(xpansion, command substitution, arith-)-.15 F 1.344(metic e)108 496.8 R
1.344(xpansion, and pathname e)-.15 F 1.344(xpansion, as described abo)
-.15 F 1.644 -.15(ve u)-.15 H(nder).15 E F3(EXP)3.844 E(ANSION)-.666 E
/F4 9/Times-Roman@0 SF(.)A F0 1.345(The results are split)5.844 F 1.265
(using the rules described abo)108 508.8 R 1.565 -.15(ve u)-.15 H(nder)
.15 E F1 -.75(Wo)3.765 G 1.265(rd Splitting).75 F F0 6.265(.T)C 1.265
(he results of the e)-6.265 F 1.265(xpansion are pre\214x-matched)-.15 F
(ag)108 520.8 Q(ainst the w)-.05 E
(ord being completed, and the matching w)-.1 E
.413(Each w)5.412 F .413(ord is then e)-.1 F(xpanded)-.15 E .092
(using brace e)108 484.8 R .092(xpansion, tilde e)-.15 F .092
(xpansion, parameter and v)-.15 F .092(ariable e)-.25 F .091
(xpansion, command substitution, and arith-)-.15 F 1.396(metic e)108
496.8 R 1.396(xpansion, as described abo)-.15 F 1.696 -.15(ve u)-.15 H
(nder).15 E F3(EXP)3.896 E(ANSION)-.666 E/F4 9/Times-Roman@0 SF(.)A F0
1.396(The results are split using the rules described)5.896 F(abo)108
508.8 Q .51 -.15(ve u)-.15 H(nder).15 E F1 -.75(Wo)2.71 G .21
(rd Splitting).75 F F0 5.21(.T)C .209(he results of the e)-5.21 F .209
(xpansion are pre\214x-matched ag)-.15 F .209(ainst the w)-.05 F .209
(ord being com-)-.1 F(pleted, and the matching w)108 520.8 Q
(ords become the possible completions.)-.1 E 1.237
(After these matches ha)108 537.6 R 1.537 -.15(ve b)-.2 H 1.237
(een generated, an).15 F 3.737(ys)-.15 G 1.238
@@ -4833,8 +4837,8 @@ F1<ad43>2.581 E F0 .081(option is in)2.581 F -.2(vo)-.4 G -.1(ke).2 G
.377(After all of the possible completions are generated, an)108 720 R
2.877<798c>-.15 G .377(lter speci\214ed with the)-2.877 F F1<ad58>2.876
E F0 .376(option is applied to the)2.876 F(GNU Bash-3.1-de)72 768 Q -.15
(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(41)198.45 E 0 Cg EP
%%Page: 42 42
(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(41)199 E 0 Cg EP
%%Page: 42 43
%%BeginPageSetup
BP
%%EndPageSetup
@@ -4978,9 +4982,9 @@ H .374(he command with embedded ne).15 F .373
2.014(can be disabled using the)108 720 R F1(+H)4.514 E F0 2.014
(option to the)4.514 F F1(set)4.514 E F0 -.2(bu)4.514 G 2.014
(iltin command \(see).2 F F4 2.013(SHELL B)4.513 F(UIL)-.09 E 2.013
(TIN COMMANDS)-.828 F F0(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87
(l2).15 G(004 Dec 22)-123.87 E(42)198.45 E 0 Cg EP
%%Page: 43 43
(TIN COMMANDS)-.828 F F0(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42
(l2).15 G(005 Feb 11)-124.42 E(42)199 E 0 Cg EP
%%Page: 43 44
%%BeginPageSetup
BP
%%EndPageSetup
@@ -5098,9 +5102,9 @@ F2 2.5(0\()108 667.2 S(zer)-2.5 E(o\))-.18 E F0(The zeroth w)144 679.2 Q
F1(n)108.36 691.2 Q F0(The)30.64 E F1(n)2.5 E F0(th w)A(ord.)-.1 E F2(^)
108 703.2 Q F0(The \214rst ar)32.67 E 2.5(gument. That)-.18 F(is, w)2.5
E(ord 1.)-.1 E F2($)108 715.2 Q F0(The last ar)31 E(gument.)-.18 E
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(43)198.45 E 0 Cg EP
%%Page: 44 44
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(43)199 E 0 Cg EP
%%Page: 44 45
%%BeginPageSetup
BP
%%EndPageSetup
@@ -5225,8 +5229,8 @@ F 1.313(plied, the name and v)144 730.8 R 1.314
(alue of the alias is printed.)-.25 F F1(Alias)6.314 E F0 1.314
(returns true unless a)3.814 F F2(name)3.814 E F0 1.314(is gi)3.814 F
-.15(ve)-.25 G 3.814(nf).15 G(or)-3.814 E(GNU Bash-3.1-de)72 768 Q -.15
(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(44)198.45 E 0 Cg EP
%%Page: 45 45
(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(44)199 E 0 Cg EP
%%Page: 45 46
%%BeginPageSetup
BP
%%EndPageSetup
@@ -5339,9 +5343,9 @@ R F2(dir)2.71 E F0 5.21(.T)C .21(he v)-5.21 F(ariable)-.25 E/F4 9
(de\214nes the search path for the directory containing)144 724.8 R F2
(dir)3.276 E F0 5.776(.A).73 G(lternati)-5.776 E 1.076 -.15(ve d)-.25 H
.776(irectory names in).15 F F4(CDP)3.276 E -.855(AT)-.666 G(H).855 E F0
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(45)198.45 E 0 Cg EP
%%Page: 46 46
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(45)199 E 0 Cg EP
%%Page: 46 47
%%BeginPageSetup
BP
%%EndPageSetup
@@ -5471,9 +5475,9 @@ F2<ad53>3.223 E F0 .722
(options\) should be quoted to protect them from e)3.223 F(xpan-)-.15 E
(sion before the)144 715.2 Q F2(complete)2.5 E F0 -.2(bu)2.5 G
(iltin is in).2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E(GNU Bash-3.1-de)72
768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(46)198.45 E 0
Cg EP
%%Page: 47 47
768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(46)199 E 0 Cg
EP
%%Page: 47 48
%%BeginPageSetup
BP
%%EndPageSetup
@@ -5543,9 +5547,9 @@ F0(option to the)2.5 E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1
(May also be speci\214ed as)5 E F1<ad75>2.5 E F0(.)A F1 -.1(va)184 708 S
(riable).1 E F0(Names of all shell v)5.1 E 2.5(ariables. May)-.25 F
(also be speci\214ed as)2.5 E F1<ad76>2.5 E F0(.)A(GNU Bash-3.1-de)72
768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(47)198.45 E 0
Cg EP
%%Page: 48 48
768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(47)199 E 0 Cg
EP
%%Page: 48 49
%%BeginPageSetup
BP
%%EndPageSetup
@@ -5665,9 +5669,9 @@ E(UG)-.1 E F0(and)2.929 E F1(RETURN)2.929 E F0
.801(return v)144 727.2 R .801(alue is 0 unless an in)-.25 F -.25(va)-.4
G .8
(lid option is encountered, an attempt is made to de\214ne a function)
.25 F(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G
(004 Dec 22)-123.87 E(48)198.45 E 0 Cg EP
%%Page: 49 49
.25 F(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G
(005 Feb 11)-124.42 E(48)199 E 0 Cg EP
%%Page: 49 50
%%BeginPageSetup
BP
%%EndPageSetup
@@ -5777,9 +5781,9 @@ F3(\214lename)2.5 E F0 2.5(][)C F3(name)-2.5 E F0(...])2.5 E .277
(ws a disk command which has)-.25 F .834(the same name as a shell b)144
720 R .834(uiltin to be e)-.2 F -.15(xe)-.15 G .834
(cuted without specifying a full pathname, e).15 F -.15(ve)-.25 G 3.333
(nt).15 G(hough)-3.333 E(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87
(l2).15 G(004 Dec 22)-123.87 E(49)198.45 E 0 Cg EP
%%Page: 50 50
(nt).15 G(hough)-3.333 E(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42
(l2).15 G(005 Feb 11)-124.42 E(49)199 E 0 Cg EP
%%Page: 50 51
%%BeginPageSetup
BP
%%EndPageSetup
@@ -5921,8 +5925,8 @@ F0 -.25(va)2.881 G .631(riable is used, and the v).25 F .631(alue of)
(ariable is set,)-.25 F F2(vi)5.116 E F0 .95(is used.)5.116 F .951
(When editing is complete, the edited commands are echoed and)5.95 F
-.15(exe)144 708 S(cuted.).15 E(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G
123.87(l2).15 G(004 Dec 22)-123.87 E(50)198.45 E 0 Cg EP
%%Page: 51 51
124.42(l2).15 G(005 Feb 11)-124.42 E(50)199 E 0 Cg EP
%%Page: 51 52
%%BeginPageSetup
BP
%%EndPageSetup
@@ -6049,9 +6053,9 @@ F3<ad72>2.952 E F0 .452(option causes the shell to for)2.952 F .453
(If the)144 722.4 R F3<ad74>4.206 E F0 1.706
(option is supplied, the full pathname to which each)4.206 F F1(name)
4.206 E F0 1.707(corresponds is printed.)4.207 F(If)6.707 E
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(51)198.45 E 0 Cg EP
%%Page: 52 52
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(51)199 E 0 Cg EP
%%Page: 52 53
%%BeginPageSetup
BP
%%EndPageSetup
@@ -6160,9 +6164,9 @@ E F1(jobspec)4.24 E F0(is supplied.)2.81 E 2.067(If the)144 724.8 R F2
<ad78>4.567 E F0 2.067(option is supplied,)4.567 F F2(jobs)4.567 E F0
2.067(replaces an)4.567 F(y)-.15 E F1(jobspec)6.307 E F0 2.067(found in)
4.877 F F1(command)4.767 E F0(or)5.337 E F1(ar)4.897 E(gs)-.37 E F0
2.066(with the)4.836 F(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87
(l2).15 G(004 Dec 22)-123.87 E(52)198.45 E 0 Cg EP
%%Page: 53 53
2.066(with the)4.836 F(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42
(l2).15 G(005 Feb 11)-124.42 E(52)199 E 0 Cg EP
%%Page: 53 54
%%BeginPageSetup
BP
%%EndPageSetup
@@ -6288,9 +6292,9 @@ F0 .033(than are supplied, the e)2.534 F .033
.15 G 2.533(faz)-2.533 G .033(ero v)-2.533 F .033(alue or null string,)
-.25 F(as appropriate, had been supplied.)144 693.6 Q(The return v)5 E
(alue is zero on success, non-zero on f)-.25 E(ailure.)-.1 E
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(53)198.45 E 0 Cg EP
%%Page: 54 54
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(53)199 E 0 Cg EP
%%Page: 54 55
%%BeginPageSetup
BP
%%EndPageSetup
@@ -6406,9 +6410,9 @@ F4(.)A .335(If no)144 727.2 R F5(names)3.095 E F4(ar)2.895 E 2.835(es)
-.18 G .335(upplied, the line r)-2.835 F .336
(ead is assigned to the variable)-.18 F/F6 9/Palatino-Bold@0 SF(REPL)
2.836 E(Y)-.828 E/F7 9/Palatino-Roman@0 SF(.)A F4 .336(The r)4.836 F
.336(eturn code)-.18 F F0(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87
(l2).15 G(004 Dec 22)-123.87 E(54)198.45 E 0 Cg EP
%%Page: 55 55
.336(eturn code)-.18 F F0(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42
(l2).15 G(005 Feb 11)-124.42 E(54)199 E 0 Cg EP
%%Page: 55 56
%%BeginPageSetup
BP
%%EndPageSetup
@@ -6521,9 +6525,9 @@ F1(or)3.196 E F2(until)3.196 E F1(keywor)3.196 E .696
-.18 E F2<ad6f>144 662.4 Q F3(option\255name)2.5 E F1(The)184 674.4 Q F3
(option\255name)2.5 E F1(can be one of the following:)2.5 E F2
(allexport)184 686.4 Q F1(Same as)224 698.4 Q F2<ad61>2.5 E F1(.)A F0
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(55)198.45 E 0 Cg EP
%%Page: 56 56
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(55)199 E 0 Cg EP
%%Page: 56 57
%%BeginPageSetup
BP
%%EndPageSetup
@@ -6596,9 +6600,9 @@ F F1<ad70>3.185 E F2 .684(option is supplied at startup, the ef)3.185 F
(fective)-.18 E .752(user id is not r)184 726 R 3.252(eset. T)-.18 F
.752(urning this option of)-.9 F 3.252(fc)-.18 G .752(auses the ef)
-3.252 F .753(fective user and gr)-.18 F(oup)-.18 E F0(GNU Bash-3.1-de)
72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(56)198.45 E
0 Cg EP
%%Page: 57 57
72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(56)199 E 0
Cg EP
%%Page: 57 58
%%BeginPageSetup
BP
%%EndPageSetup
@@ -6713,8 +6717,8 @@ F1(Disable \(unset\) each)23.83 E F3(optname)2.5 E F1(.)A F2<ad71>144
(re)180 710.4 S(turn status is zer).18 E 2.5(oi)-.18 G 2.5(fa)-2.5 G(ll)
-2.5 E F3(optnames)2.5 E F1(ar)2.5 E 2.5(ee)-.18 G(nabled; non-zer)-2.5
E 2.5(oo)-.18 G(therwise.)-2.5 E F0(GNU Bash-3.1-de)72 768 Q -.15(ve)
-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(57)198.45 E 0 Cg EP
%%Page: 58 58
-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(57)199 E 0 Cg EP
%%Page: 58 59
%%BeginPageSetup
BP
%%EndPageSetup
@@ -6801,8 +6805,8 @@ Q F2(ar)2.5 E 2.5(ee)-.18 G(nabled.)-2.5 E F1(extquote)144 680.4 Q F2
(uoting is performed within)-2.643 F F1(${)2.643 E F3(parameter)A F1(})A
F2(expansions)2.643 E(enclosed in double quotes.)184 704.4 Q
(This option is enabled by default.)5 E F0(GNU Bash-3.1-de)72 768 Q -.15
(ve)-.25 G 123.87(l2).15 G(004 Dec 22)-123.87 E(58)198.45 E 0 Cg EP
%%Page: 59 59
(ve)-.25 G 124.42(l2).15 G(005 Feb 11)-124.42 E(58)199 E 0 Cg EP
%%Page: 59 60
%%BeginPageSetup
BP
%%EndPageSetup
@@ -6880,9 +6884,9 @@ F1(progcomp)144 684 Q F2 1.198(If set, the pr)184 696 R 1.199
(ogrammable completion facilities \(see)-.18 F F1 1.199
(Programmable Completion)3.699 F F2(above\) ar)184 708 Q 2.5(ee)-.18 G
2.5(nabled. This)-2.5 F(option is enabled by default.)2.5 E F0
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(59)198.45 E 0 Cg EP
%%Page: 60 60
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(59)199 E 0 Cg EP
%%Page: 60 61
%%BeginPageSetup
BP
%%EndPageSetup
@@ -6973,8 +6977,8 @@ F .107(gument test using the second and)-.18 F(thir)180 712.8 Q 4.633
.18 F(exactly)180 724.8 Q F1(\))2.925 E F2 2.925(,t)C .426(he r)-2.925 F
.426(esult is the one-ar)-.18 F .426(gument test of the second ar)-.18 F
2.926(gument. Otherwise,)-.18 F F0(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25
G 123.87(l2).15 G(004 Dec 22)-123.87 E(60)198.45 E 0 Cg EP
%%Page: 61 61
G 124.42(l2).15 G(005 Feb 11)-124.42 E(60)199 E 0 Cg EP
%%Page: 61 62
%%BeginPageSetup
BP
%%EndPageSetup
@@ -7111,9 +7115,9 @@ E F1 2.515(,e)C .015(ven if)-2.515 F F7 .015(type -t)2.515 F(name)144
7.058 E F1 -.18(re)4.558 G 2.058(turns tr).18 F 2.057
(ue if any of the ar)-.08 F 2.057(guments ar)-.18 F 4.557(ef)-.18 G
2.057(ound, false if none ar)-4.557 F(e)-.18 E(found.)144 698.4 Q F0
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(61)198.45 E 0 Cg EP
%%Page: 62 62
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(61)199 E 0 Cg EP
%%Page: 62 63
%%BeginPageSetup
BP
%%EndPageSetup
@@ -7233,8 +7237,8 @@ E F1(wait)108 684 Q F2([)2.5 E F3 2.5(n.)C(..)-2.5 E F2(])A -.92(Wa)144
(is not given, all curr)3.595 F 1.014(ently active child pr)-.18 F 1.014
(ocesses ar)-.18 F 3.514(ew)-.18 G 1.014(aited for)-3.514 F 3.514(,a)
-.74 G 1.014(nd the)-3.514 F F0(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G
123.87(l2).15 G(004 Dec 22)-123.87 E(62)198.45 E 0 Cg EP
%%Page: 63 63
124.42(l2).15 G(005 Feb 11)-124.42 E(62)199 E 0 Cg EP
%%Page: 63 64
%%BeginPageSetup
BP
%%EndPageSetup
@@ -7312,8 +7316,8 @@ Q F2(~/.bashr)109.666 650.4 Q(c)-.18 E F1(The individual per)144 662.4 Q
ogin shell exits)144 686.4 Q F2(~/.inputr)109.666 698.4 Q(c)-.18 E F1
(Individual)144 710.4 Q F2 -.18(re)2.5 G(adline).18 E F1
(initialization \214le)2.5 E F0(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G
123.87(l2).15 G(004 Dec 22)-123.87 E(63)198.45 E 0 Cg EP
%%Page: 64 64
124.42(l2).15 G(005 Feb 11)-124.42 E(63)199 E 0 Cg EP
%%Page: 64 65
%%BeginPageSetup
BP
%%EndPageSetup
@@ -7376,8 +7380,8 @@ G(onfusing in some uses.)-2.5 E(Shell builtin commands and functions ar)
-.18 F .431(or messages while the con-)-.18 F(str)108 578.4 Q
(uct is being r)-.08 E(ead.)-.18 E
(Array variables may not \(yet\) be exported.)108 595.2 Q F0
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 123.87(l2).15 G(004 Dec 22)
-123.87 E(64)198.45 E 0 Cg EP
(GNU Bash-3.1-de)72 768 Q -.15(ve)-.25 G 124.42(l2).15 G(005 Feb 11)
-124.42 E(64)199 E 0 Cg EP
%%Trailer
end
%%EOF
BIN
View File
Binary file not shown.
+11 -10
View File
@@ -1,6 +1,6 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on December, 30 2004 by texi2html 1.64 -->
<!-- Created on February, 14 2005 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
@@ -33,10 +33,10 @@ Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
<H1>Bash Reference Manual</H1></P><P>
This text is a brief description of the features that are present in
the Bash shell (version 3.1-devel, 30 December 2004)..
the Bash shell (version 3.1-devel, 11 February 2005)..
</P><P>
This is Edition 3.1-devel, last updated 30 December 2004,
This is Edition 3.1-devel, last updated 11 February 2005,
of <CITE>The GNU Bash Reference Manual</CITE>,
for <CODE>Bash</CODE>, Version 3.1-devel.
</P><P>
@@ -1830,12 +1830,13 @@ to the filename used to invoke Bash, as given by argument zero.
<DT><CODE>_</CODE>
<DD><A NAME="IDX63"></A>
(An underscore.)
At shell startup, set to the absolute filename of the shell or shell
script being executed as passed in the argument list.
At shell startup, set to the absolute pathname used to invoke the
shell or shell script being executed as passed in the environment
or argument list.
Subsequently, expands to the last argument to the previous command,
after expansion.
Also set to the full pathname of each command executed and placed in
the environment exported to that command.
Also set to the full pathname used to invoke each command executed
and placed in the environment exported to that command.
When checking mail, this parameter holds the name of the mail file.
</DL>
<P>
@@ -10594,7 +10595,7 @@ special variable as delimiters.
Shell quoting is honored.
Each word is then expanded using
brace expansion, tilde expansion, parameter and variable expansion,
command substitution, arithmetic expansion, and pathname expansion,
command substitution, and arithmetic expansion,
as described above (see section <A HREF="bashref.html#SEC27">3.5 Shell Expansions</A>).
The results are split using the rules described above
(see section <A HREF="bashref.html#SEC34">3.5.7 Word Splitting</A>).
@@ -15124,7 +15125,7 @@ to permit their use in free software.
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1>About this document</H1>
This document was generated by <I>Chet Ramey</I> on <I>December, 30 2004</I>
This document was generated by <I>Chet Ramey</I> on <I>February, 14 2005</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
<P></P>
@@ -15286,7 +15287,7 @@ the following structure:
<BR>
<FONT SIZE="-1">
This document was generated
by <I>Chet Ramey</I> on <I>December, 30 2004</I>
by <I>Chet Ramey</I> on <I>February, 14 2005</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
+114 -115
View File
@@ -2,12 +2,12 @@ This is bashref.info, produced by makeinfo version 4.7 from
/Users/chet/src/bash/src/doc/bashref.texi.
This text is a brief description of the features that are present in
the Bash shell (version 3.1-devel, 30 December 2004).
the Bash shell (version 3.1-devel, 11 February 2005).
This is Edition 3.1-devel, last updated 30 December 2004, of `The
This is Edition 3.1-devel, last updated 11 February 2005, of `The
GNU Bash Reference Manual', for `Bash', Version 3.1-devel.
Copyright (C) 1988-2004 Free Software Foundation, Inc.
Copyright (C) 1988-2005 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
@@ -37,9 +37,9 @@ Bash Features
*************
This text is a brief description of the features that are present in
the Bash shell (version 3.1-devel, 30 December 2004)..
the Bash shell (version 3.1-devel, 11 February 2005)..
This is Edition 3.1-devel, last updated 30 December 2004, of `The
This is Edition 3.1-devel, last updated 11 February 2005, of `The
GNU Bash Reference Manual', for `Bash', Version 3.1-devel.
Bash contains features that appear in other popular shells, and some
@@ -1139,13 +1139,13 @@ only be referenced; assignment to them is not allowed.
invoke Bash, as given by argument zero.
`_'
(An underscore.) At shell startup, set to the absolute filename
of the shell or shell script being executed as passed in the
argument list. Subsequently, expands to the last argument to the
previous command, after expansion. Also set to the full pathname
of each command executed and placed in the environment exported to
that command. When checking mail, this parameter holds the name
of the mail file.
(An underscore.) At shell startup, set to the absolute pathname
used to invoke the shell or shell script being executed as passed
in the environment or argument list. Subsequently, expands to the
last argument to the previous command, after expansion. Also set
to the full pathname used to invoke each command executed and
placed in the environment exported to that command. When checking
mail, this parameter holds the name of the mail file.

File: bashref.info, Node: Shell Expansions, Next: Redirections, Prev: Shell Parameters, Up: Basic Shell Features
@@ -6972,12 +6972,11 @@ variable is used.
considered. The string is first split using the characters in the `IFS'
special variable as delimiters. Shell quoting is honored. Each word
is then expanded using brace expansion, tilde expansion, parameter and
variable expansion, command substitution, arithmetic expansion, and
pathname expansion, as described above (*note Shell Expansions::). The
results are split using the rules described above (*note Word
Splitting::). The results of the expansion are prefix-matched against
the word being completed, and the matching words become the possible
completions.
variable expansion, command substitution, and arithmetic expansion, as
described above (*note Shell Expansions::). The results are split
using the rules described above (*note Word Splitting::). The results
of the expansion are prefix-matched against the word being completed,
and the matching words become the possible completions.
After these matches have been generated, any shell function or
command specified with the `-F' and `-C' options is invoked. When the
@@ -9486,102 +9485,102 @@ Node: Shell Functions36064
Node: Shell Parameters40354
Node: Positional Parameters42684
Node: Special Parameters43584
Node: Shell Expansions46509
Node: Brace Expansion48434
Node: Tilde Expansion50759
Node: Shell Parameter Expansion53110
Node: Command Substitution60619
Node: Arithmetic Expansion61952
Node: Process Substitution62802
Node: Word Splitting63852
Node: Filename Expansion65313
Node: Pattern Matching67449
Node: Quote Removal70774
Node: Redirections71069
Node: Executing Commands78799
Node: Simple Command Expansion79474
Node: Command Search and Execution81404
Node: Command Execution Environment83410
Node: Environment86181
Node: Exit Status87841
Node: Signals89045
Node: Shell Scripts91009
Node: Shell Builtin Commands93527
Node: Bourne Shell Builtins95106
Node: Bash Builtins112059
Node: The Set Builtin140199
Node: Special Builtins148606
Node: Shell Variables149583
Node: Bourne Shell Variables150023
Node: Bash Variables152004
Node: Bash Features171711
Node: Invoking Bash172594
Node: Bash Startup Files178415
Node: Interactive Shells183273
Node: What is an Interactive Shell?183683
Node: Is this Shell Interactive?184333
Node: Interactive Shell Behavior185148
Node: Bash Conditional Expressions188424
Node: Shell Arithmetic192003
Node: Aliases194749
Node: Arrays197317
Node: The Directory Stack200584
Node: Directory Stack Builtins201298
Node: Printing a Prompt204189
Node: The Restricted Shell206903
Node: Bash POSIX Mode208735
Node: Job Control216068
Node: Job Control Basics216535
Node: Job Control Builtins220911
Node: Job Control Variables225263
Node: Command Line Editing226421
Node: Introduction and Notation227420
Node: Readline Interaction229042
Node: Readline Bare Essentials230233
Node: Readline Movement Commands232022
Node: Readline Killing Commands232987
Node: Readline Arguments234907
Node: Searching235951
Node: Readline Init File238137
Node: Readline Init File Syntax239196
Node: Conditional Init Constructs251055
Node: Sample Init File253588
Node: Bindable Readline Commands256705
Node: Commands For Moving257912
Node: Commands For History258773
Node: Commands For Text261928
Node: Commands For Killing264601
Node: Numeric Arguments266743
Node: Commands For Completion267882
Node: Keyboard Macros271475
Node: Miscellaneous Commands272046
Node: Readline vi Mode277357
Node: Programmable Completion278271
Node: Programmable Completion Builtins284083
Node: Using History Interactively291679
Node: Bash History Facilities292359
Node: Bash History Builtins295054
Node: History Interaction298911
Node: Event Designators301467
Node: Word Designators302482
Node: Modifiers304121
Node: Installing Bash305527
Node: Basic Installation306664
Node: Compilers and Options309356
Node: Compiling For Multiple Architectures310097
Node: Installation Names311761
Node: Specifying the System Type312579
Node: Sharing Defaults313295
Node: Operation Controls313968
Node: Optional Features314926
Node: Reporting Bugs323735
Node: Major Differences From The Bourne Shell324929
Node: Copying This Manual340837
Node: GNU Free Documentation License341113
Node: Builtin Index363519
Node: Reserved Word Index370068
Node: Variable Index372504
Node: Function Index383364
Node: Concept Index390084
Node: Shell Expansions46548
Node: Brace Expansion48473
Node: Tilde Expansion50798
Node: Shell Parameter Expansion53149
Node: Command Substitution60658
Node: Arithmetic Expansion61991
Node: Process Substitution62841
Node: Word Splitting63891
Node: Filename Expansion65352
Node: Pattern Matching67488
Node: Quote Removal70813
Node: Redirections71108
Node: Executing Commands78838
Node: Simple Command Expansion79513
Node: Command Search and Execution81443
Node: Command Execution Environment83449
Node: Environment86220
Node: Exit Status87880
Node: Signals89084
Node: Shell Scripts91048
Node: Shell Builtin Commands93566
Node: Bourne Shell Builtins95145
Node: Bash Builtins112098
Node: The Set Builtin140238
Node: Special Builtins148645
Node: Shell Variables149622
Node: Bourne Shell Variables150062
Node: Bash Variables152043
Node: Bash Features171750
Node: Invoking Bash172633
Node: Bash Startup Files178454
Node: Interactive Shells183312
Node: What is an Interactive Shell?183722
Node: Is this Shell Interactive?184372
Node: Interactive Shell Behavior185187
Node: Bash Conditional Expressions188463
Node: Shell Arithmetic192042
Node: Aliases194788
Node: Arrays197356
Node: The Directory Stack200623
Node: Directory Stack Builtins201337
Node: Printing a Prompt204228
Node: The Restricted Shell206942
Node: Bash POSIX Mode208774
Node: Job Control216107
Node: Job Control Basics216574
Node: Job Control Builtins220950
Node: Job Control Variables225302
Node: Command Line Editing226460
Node: Introduction and Notation227459
Node: Readline Interaction229081
Node: Readline Bare Essentials230272
Node: Readline Movement Commands232061
Node: Readline Killing Commands233026
Node: Readline Arguments234946
Node: Searching235990
Node: Readline Init File238176
Node: Readline Init File Syntax239235
Node: Conditional Init Constructs251094
Node: Sample Init File253627
Node: Bindable Readline Commands256744
Node: Commands For Moving257951
Node: Commands For History258812
Node: Commands For Text261967
Node: Commands For Killing264640
Node: Numeric Arguments266782
Node: Commands For Completion267921
Node: Keyboard Macros271514
Node: Miscellaneous Commands272085
Node: Readline vi Mode277396
Node: Programmable Completion278310
Node: Programmable Completion Builtins284102
Node: Using History Interactively291698
Node: Bash History Facilities292378
Node: Bash History Builtins295073
Node: History Interaction298930
Node: Event Designators301486
Node: Word Designators302501
Node: Modifiers304140
Node: Installing Bash305546
Node: Basic Installation306683
Node: Compilers and Options309375
Node: Compiling For Multiple Architectures310116
Node: Installation Names311780
Node: Specifying the System Type312598
Node: Sharing Defaults313314
Node: Operation Controls313987
Node: Optional Features314945
Node: Reporting Bugs323754
Node: Major Differences From The Bourne Shell324948
Node: Copying This Manual340856
Node: GNU Free Documentation License341132
Node: Builtin Index363538
Node: Reserved Word Index370087
Node: Variable Index372523
Node: Function Index383383
Node: Concept Index390103

End Tag Table
+10 -10
View File
@@ -1,4 +1,4 @@
This is TeX, Version 3.14159 (Web2C 7.4.5) (format=tex 2003.12.31) 30 DEC 2004 17:01
This is TeX, Version 3.14159 (Web2C 7.4.5) (format=tex 2003.12.31) 14 FEB 2005 11:56
**/Users/chet/src/bash/src/doc/bashref.texi
(/Users/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
Loading texinfo [version 2003-02-03.16]: Basics,
@@ -172,7 +172,7 @@ textttsl pat-tern@texttt ][]) @textttsl command-list @texttt ;;][] esac[][]
[11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25]
[26] [27] [28] [29] [30] [31] Chapter 4 [32] [33] [34] [35] [36] [37] [38]
Underfull \hbox (badness 5231) in paragraph at lines 3132--3145
Underfull \hbox (badness 5231) in paragraph at lines 3133--3146
@texttt emacs-meta[]@textrm , @texttt emacs-ctlx[]@textrm , @texttt vi[]@textr
m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
@@ -185,7 +185,7 @@ m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
.etc.
[39] [40] [41] [42] [43]
Overfull \hbox (43.33536pt too wide) in paragraph at lines 3470--3470
Overfull \hbox (43.33536pt too wide) in paragraph at lines 3471--3471
[]@texttt read [-ers] [-a @textttsl aname@texttt ] [-d @textttsl de-lim@texttt
] [-n @textttsl nchars@texttt ] [-p @textttsl prompt@texttt ] [-t @textttsl ti
me-
@@ -199,7 +199,7 @@ me-
.etc.
[44] [45] [46] [47] [48] [49] [50] [51]
Underfull \hbox (badness 4036) in paragraph at lines 4082--4089
Underfull \hbox (badness 4036) in paragraph at lines 4083--4090
@texttt -x[]@textrm Print a trace of sim-ple com-mands, @texttt \@textrm fB-fo
r@texttt \@textrm fP com-mands,
@@ -212,7 +212,7 @@ r@texttt \@textrm fP com-mands,
.etc.
[52] [53] Chapter 5 [54] [55] [56] [57] [58] [59] [60] [61] Chapter 6 [62]
Overfull \hbox (51.96864pt too wide) in paragraph at lines 4801--4801
Overfull \hbox (51.96864pt too wide) in paragraph at lines 4802--4802
[]@texttt bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@t
exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -225,7 +225,7 @@ exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
Overfull \hbox (76.23077pt too wide) in paragraph at lines 4802--4802
Overfull \hbox (76.23077pt too wide) in paragraph at lines 4803--4803
[]@texttt bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@texttt
] [-O @textttsl shopt_option@texttt ] -c @textttsl string @texttt [@textttsl ar
-
@@ -239,7 +239,7 @@ Overfull \hbox (76.23077pt too wide) in paragraph at lines 4802--4802
.etc.
Overfull \hbox (34.72258pt too wide) in paragraph at lines 4803--4803
Overfull \hbox (34.72258pt too wide) in paragraph at lines 4804--4804
[]@texttt bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@text
tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
@@ -252,7 +252,7 @@ tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
[63] [64]
Underfull \hbox (badness 2245) in paragraph at lines 4977--4979
Underfull \hbox (badness 2245) in paragraph at lines 4978--4980
[]@textrm When a lo-gin shell ex-its, Bash reads and ex-e-cutes com-mands from
the file
@@ -320,7 +320,7 @@ Underfull \hbox (badness 2753) in paragraph at lines 1758--1761
[109]) (/Users/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
[110] [111] [112] [113] [114]) Chapter 10 [115] [116] [117] [118] [119]
Underfull \hbox (badness 2772) in paragraph at lines 6675--6679
Underfull \hbox (badness 2772) in paragraph at lines 6676--6680
[]@textrm Enable sup-port for large files (@texttt http://www.sas.com/standard
s/large_
@@ -365,4 +365,4 @@ Here is how much of TeX's memory you used:
19 hyphenation exceptions out of 1000
15i,8n,11p,269b,465s stack positions out of 1500i,500n,5000p,200000b,5000s
Output written on bashref.dvi (156 pages, 585544 bytes).
Output written on bashref.dvi (156 pages, 585568 bytes).
+59 -58
View File
@@ -10,7 +10,7 @@
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips -D 600 -t letter -o bashref.ps bashref.dvi
%DVIPSParameters: dpi=600, compressed
%DVIPSSource: TeX output 2004.12.30:1701
%DVIPSSource: TeX output 2005.02.14:1156
%%BeginProcSet: texc.pro
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
@@ -4226,30 +4226,31 @@ letter
TeXDict begin 1 0 bop 150 1318 a Fu(Bash)64 b(Reference)j(Man)-5
b(ual)p 150 1385 3600 34 v 2361 1481 a Ft(Reference)31
b(Do)s(cumen)m(tation)i(for)d(Bash)1963 1589 y(Edition)h(3.1-dev)m(el,)
i(for)d Fs(Bash)f Ft(V)-8 b(ersion)31 b(3.1-dev)m(el.)3145
1697 y(Decem)m(b)s(er)g(2004)150 4935 y Fr(Chet)45 b(Ramey)-11
b(,)46 b(Case)g(W)-11 b(estern)46 b(Reserv)l(e)g(Univ)l(ersit)l(y)150
5068 y(Brian)f(F)-11 b(o)l(x,)45 b(F)-11 b(ree)45 b(Soft)l(w)l(are)h(F)
-11 b(oundation)p 150 5141 3600 17 v eop end
i(for)d Fs(Bash)f Ft(V)-8 b(ersion)31 b(3.1-dev)m(el.)3180
1697 y(F)-8 b(ebruary)30 b(2005)150 4935 y Fr(Chet)45
b(Ramey)-11 b(,)46 b(Case)g(W)-11 b(estern)46 b(Reserv)l(e)g(Univ)l
(ersit)l(y)150 5068 y(Brian)f(F)-11 b(o)l(x,)45 b(F)-11
b(ree)45 b(Soft)l(w)l(are)h(F)-11 b(oundation)p 150 5141
3600 17 v eop end
%%Page: 2 2
TeXDict begin 2 1 bop 150 2889 a Ft(This)35 b(text)h(is)g(a)g(brief)f
(description)h(of)f(the)h(features)g(that)g(are)g(presen)m(t)g(in)f
(the)h(Bash)f(shell)h(\(v)m(ersion)150 2999 y(3.1-dev)m(el,)d(30)e
(Decem)m(b)s(er)g(2004\).)150 3133 y(This)39 b(is)g(Edition)h(3.1-dev)m
(el,)45 b(last)40 b(up)s(dated)f(30)h(Decem)m(b)s(er)g(2004,)k(of)c
Fq(The)f(GNU)h(Bash)g(Reference)150 3243 y(Man)m(ual)p
Ft(,)32 b(for)e Fs(Bash)p Ft(,)f(V)-8 b(ersion)31 b(3.1-dev)m(el.)150
3377 y(Cop)m(yrigh)m(t)602 3374 y(c)577 3377 y Fp(\015)f
Ft(1988-2004)k(F)-8 b(ree)32 b(Soft)m(w)m(are)f(F)-8
b(oundation,)32 b(Inc.)150 3512 y(P)m(ermission)g(is)h(gran)m(ted)g(to)
f(mak)m(e)i(and)d(distribute)h(v)m(erbatim)h(copies)g(of)f(this)g(man)m
(ual)h(pro)m(vided)f(the)150 3621 y(cop)m(yrigh)m(t)g(notice)f(and)f
(this)g(p)s(ermission)g(notice)h(are)g(preserv)m(ed)f(on)h(all)g
(copies.)390 3756 y(P)m(ermission)k(is)h(gran)m(ted)f(to)h(cop)m(y)-8
b(,)38 b(distribute)d(and/or)g(mo)s(dify)f(this)h(do)s(cumen)m(t)g
(under)390 3866 y(the)j(terms)g(of)g(the)g(GNU)h(F)-8
b(ree)39 b(Do)s(cumen)m(tation)h(License,)g(V)-8 b(ersion)39
b(1.1)g(or)f(an)m(y)g(later)390 3975 y(v)m(ersion)28
(the)h(Bash)f(shell)h(\(v)m(ersion)150 2999 y(3.1-dev)m(el,)d(11)e(F)-8
b(ebruary)30 b(2005\).)150 3133 y(This)41 b(is)i(Edition)f(3.1-dev)m
(el,)48 b(last)43 b(up)s(dated)e(11)i(F)-8 b(ebruary)42
b(2005,)47 b(of)42 b Fq(The)g(GNU)h(Bash)f(Reference)150
3243 y(Man)m(ual)p Ft(,)32 b(for)e Fs(Bash)p Ft(,)f(V)-8
b(ersion)31 b(3.1-dev)m(el.)150 3377 y(Cop)m(yrigh)m(t)602
3374 y(c)577 3377 y Fp(\015)f Ft(1988-2005)k(F)-8 b(ree)32
b(Soft)m(w)m(are)f(F)-8 b(oundation,)32 b(Inc.)150 3512
y(P)m(ermission)g(is)h(gran)m(ted)g(to)f(mak)m(e)i(and)d(distribute)h
(v)m(erbatim)h(copies)g(of)f(this)g(man)m(ual)h(pro)m(vided)f(the)150
3621 y(cop)m(yrigh)m(t)g(notice)f(and)f(this)g(p)s(ermission)g(notice)h
(are)g(preserv)m(ed)f(on)h(all)g(copies.)390 3756 y(P)m(ermission)k(is)
h(gran)m(ted)f(to)h(cop)m(y)-8 b(,)38 b(distribute)d(and/or)g(mo)s
(dify)f(this)h(do)s(cumen)m(t)g(under)390 3866 y(the)j(terms)g(of)g
(the)g(GNU)h(F)-8 b(ree)39 b(Do)s(cumen)m(tation)h(License,)g(V)-8
b(ersion)39 b(1.1)g(or)f(an)m(y)g(later)390 3975 y(v)m(ersion)28
b(published)d(b)m(y)j(the)f(F)-8 b(ree)29 b(Soft)m(w)m(are)f(F)-8
b(oundation;)30 b(with)d(no)g(In)m(v)-5 b(arian)m(t)28
b(Sections,)390 4085 y(with)i(the)h(F)-8 b(ron)m(t-Co)m(v)m(er)33
@@ -5728,25 +5729,25 @@ Ft(')630 3393 y(option)i(\(see)g(Section)h(6.1)f([In)m(v)m(oking)h
f(executed,)i(if)f(one)g(is)f(presen)m(t.)42 b(Otherwise,)31
b(it)g(is)f(set)630 3613 y(to)h(the)g(\014lename)f(used)g(to)h(in)m(v)m
(ok)m(e)h(Bash,)f(as)g(giv)m(en)g(b)m(y)f(argumen)m(t)h(zero.)150
3773 y Fs(_)432 b Ft(\(An)34 b(underscore.\))50 b(A)m(t)34
b(shell)g(startup,)h(set)f(to)g(the)g(absolute)g(\014lename)g(of)g(the)
g(shell)g(or)630 3882 y(shell)j(script)h(b)s(eing)e(executed)i(as)g
(passed)f(in)g(the)g(argumen)m(t)h(list.)62 b(Subsequen)m(tly)-8
b(,)38 b(ex-)630 3992 y(pands)e(to)i(the)g(last)g(argumen)m(t)g(to)h
(the)e(previous)g(command,)i(after)f(expansion.)62 b(Also)630
4102 y(set)30 b(to)f(the)h(full)e(pathname)h(of)h(eac)m(h)g(command)f
(executed)h(and)e(placed)i(in)e(the)i(en)m(viron-)630
4211 y(men)m(t)37 b(exp)s(orted)f(to)h(that)h(command.)58
b(When)37 b(c)m(hec)m(king)h(mail,)h(this)d(parameter)h(holds)630
4321 y(the)31 b(name)f(of)h(the)f(mail)h(\014le.)150
4580 y Fr(3.5)68 b(Shell)45 b(Expansions)275 4825 y Ft(Expansion)29
b(is)h(p)s(erformed)e(on)i(the)g(command)g(line)g(after)h(it)f(has)g(b)
s(een)f(split)h(in)m(to)h Fs(token)p Ft(s.)39 b(There)150
4935 y(are)31 b(sev)m(en)g(kinds)e(of)i(expansion)f(p)s(erformed:)225
5070 y Fp(\017)60 b Ft(brace)31 b(expansion)225 5205
y Fp(\017)60 b Ft(tilde)31 b(expansion)225 5340 y Fp(\017)60
b Ft(parameter)31 b(and)f(v)-5 b(ariable)31 b(expansion)p
eop end
3773 y Fs(_)432 b Ft(\(An)27 b(underscore.\))39 b(A)m(t)29
b(shell)e(startup,)h(set)f(to)h(the)g(absolute)g(pathname)f(used)f(to)i
(in)m(v)m(ok)m(e)630 3882 y(the)22 b(shell)g(or)g(shell)g(script)f(b)s
(eing)h(executed)h(as)f(passed)f(in)g(the)h(en)m(vironmen)m(t)h(or)e
(argumen)m(t)630 3992 y(list.)72 b(Subsequen)m(tly)-8
b(,)43 b(expands)c(to)j(the)e(last)i(argumen)m(t)f(to)g(the)g(previous)
f(command,)630 4102 y(after)35 b(expansion.)54 b(Also)36
b(set)f(to)h(the)f(full)f(pathname)h(used)f(to)h(in)m(v)m(ok)m(e)i(eac)
m(h)f(command)630 4211 y(executed)42 b(and)e(placed)i(in)e(the)h(en)m
(vironmen)m(t)h(exp)s(orted)f(to)g(that)h(command.)72
b(When)630 4321 y(c)m(hec)m(king)32 b(mail,)f(this)g(parameter)g(holds)
e(the)i(name)f(of)h(the)g(mail)g(\014le.)150 4580 y Fr(3.5)68
b(Shell)45 b(Expansions)275 4825 y Ft(Expansion)29 b(is)h(p)s(erformed)
e(on)i(the)g(command)g(line)g(after)h(it)f(has)g(b)s(een)f(split)h(in)m
(to)h Fs(token)p Ft(s.)39 b(There)150 4935 y(are)31 b(sev)m(en)g(kinds)
e(of)i(expansion)f(p)s(erformed:)225 5070 y Fp(\017)60
b Ft(brace)31 b(expansion)225 5205 y Fp(\017)60 b Ft(tilde)31
b(expansion)225 5340 y Fp(\017)60 b Ft(parameter)31 b(and)f(v)-5
b(ariable)31 b(expansion)p eop end
%%Page: 17 23
TeXDict begin 17 22 bop 150 -116 a Ft(Chapter)30 b(3:)41
b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(17)225 299
@@ -11848,23 +11849,23 @@ Fs(FIGNORE)f Ft(shell)150 1093 y(v)-5 b(ariable)31 b(is)g(used.)275
b(The)33 b(string)150 1340 y(is)g(\014rst)e(split)i(using)f(the)h(c)m
(haracters)h(in)e(the)h Fs(IFS)e Ft(sp)s(ecial)j(v)-5
b(ariable)33 b(as)g(delimiters.)48 b(Shell)32 b(quoting)h(is)150
1450 y(honored.)k(Eac)m(h)21 b(w)m(ord)g(is)g(then)f(expanded)g(using)h
(brace)g(expansion,)i(tilde)e(expansion,)i(parameter)f(and)150
1559 y(v)-5 b(ariable)26 b(expansion,)g(command)f(substitution,)h
(arithmetic)g(expansion,)g(and)f(pathname)g(expansion,)150
1669 y(as)j(describ)s(ed)e(ab)s(o)m(v)m(e)j(\(see)f(Section)h(3.5)f
([Shell)g(Expansions],)f(page)i(16\).)41 b(The)27 b(results)g(are)h
(split)f(using)150 1778 y(the)33 b(rules)g(describ)s(ed)e(ab)s(o)m(v)m
(e)j(\(see)g(Section)g(3.5.7)h([W)-8 b(ord)33 b(Splitting],)i(page)e
(22\).)50 b(The)32 b(results)h(of)g(the)150 1888 y(expansion)h(are)h
(pre\014x-matc)m(hed)f(against)i(the)e(w)m(ord)g(b)s(eing)g(completed,)
j(and)d(the)g(matc)m(hing)h(w)m(ords)150 1998 y(b)s(ecome)c(the)f(p)s
(ossible)g(completions.)275 2134 y(After)f(these)g(matc)m(hes)i(ha)m(v)
m(e)f(b)s(een)f(generated,)h(an)m(y)g(shell)f(function)g(or)g(command)g
(sp)s(eci\014ed)f(with)150 2244 y(the)i(`)p Fs(-F)p Ft(')g(and)f(`)p
Fs(-C)p Ft(')h(options)g(is)g(in)m(v)m(ok)m(ed.)41 b(When)30
b(the)g(command)g(or)f(function)h(is)g(in)m(v)m(ok)m(ed,)h(the)f
Fs(COMP_)150 2354 y(LINE)21 b Ft(and)h Fs(COMP_POINT)d
1450 y(honored.)56 b(Eac)m(h)37 b(w)m(ord)e(is)h(then)f(expanded)g
(using)h(brace)g(expansion,)h(tilde)f(expansion,)h(parameter)150
1559 y(and)44 b(v)-5 b(ariable)46 b(expansion,)j(command)44
b(substitution,)49 b(and)44 b(arithmetic)i(expansion,)j(as)c(describ)s
(ed)150 1669 y(ab)s(o)m(v)m(e)38 b(\(see)f(Section)h(3.5)g([Shell)e
(Expansions],)i(page)f(16\).)61 b(The)36 b(results)h(are)g(split)f
(using)h(the)f(rules)150 1778 y(describ)s(ed)29 b(ab)s(o)m(v)m(e)i
(\(see)f(Section)h(3.5.7)h([W)-8 b(ord)30 b(Splitting],)h(page)f(22\).)
42 b(The)30 b(results)f(of)h(the)g(expansion)150 1888
y(are)f(pre\014x-matc)m(hed)h(against)g(the)f(w)m(ord)g(b)s(eing)f
(completed,)j(and)d(the)i(matc)m(hing)g(w)m(ords)e(b)s(ecome)i(the)150
1998 y(p)s(ossible)g(completions.)275 2134 y(After)f(these)g(matc)m
(hes)i(ha)m(v)m(e)f(b)s(een)f(generated,)h(an)m(y)g(shell)f(function)g
(or)g(command)g(sp)s(eci\014ed)f(with)150 2244 y(the)i(`)p
Fs(-F)p Ft(')g(and)f(`)p Fs(-C)p Ft(')h(options)g(is)g(in)m(v)m(ok)m
(ed.)41 b(When)30 b(the)g(command)g(or)f(function)h(is)g(in)m(v)m(ok)m
(ed,)h(the)f Fs(COMP_)150 2354 y(LINE)21 b Ft(and)h Fs(COMP_POINT)d
Ft(v)-5 b(ariables)23 b(are)g(assigned)g(v)-5 b(alues)22
b(as)h(describ)s(ed)e(ab)s(o)m(v)m(e)j(\(see)f(Section)g(5.2)h([Bash)
150 2463 y(V)-8 b(ariables],)33 b(page)f(55\).)44 b(If)30
+40 -1
View File
@@ -867,6 +867,10 @@ The syntax of the @code{case} command is:
@code{case} will selectively execute the @var{command-list} corresponding to
the first @var{pattern} that matches @var{word}.
If the shell option @code{nocasematch}
(see the description of @code{shopt} in @ref{Bash Builtins})
is enabled, the match is performed without regard to the case
of alphabetic characters.
The @samp{|} is used to separate multiple patterns, and the @samp{)}
operator terminates a pattern list.
A list of patterns and an associated command-list is known
@@ -975,6 +979,10 @@ as primaries.
When the @samp{==} and @samp{!=} operators are used, the string to the
right of the operator is considered a pattern and matched according
to the rules described below in @ref{Pattern Matching}.
If the shell option @code{nocasematch}
(see the description of @code{shopt} in @ref{Bash Builtins})
is enabled, the match is performed without regard to the case
of alphabetic characters.
The return value is 0 if the string matches or does not match
the pattern, respectively, and 1 otherwise.
Any part of the pattern may be quoted to force it to be matched as a
@@ -988,7 +996,7 @@ The return value is 0 if the string matches
the pattern, and 1 otherwise.
If the regular expression is syntactically incorrect, the conditional
expression's return value is 2.
If the shell option @code{nocaseglob}
If the shell option @code{nocasematch}
(see the description of @code{shopt} in @ref{Bash Builtins})
is enabled, the match is performed without regard to the case
of alphabetic characters.
@@ -3642,6 +3650,20 @@ If the command run by the @code{DEBUG} trap returns a value of 2, and the
shell is executing in a subroutine (a shell function or a shell script
executed by the @code{.} or @code{source} builtins), a call to
@code{return} is simulated.
@item
@code{BASH_ARGC} and @code{BASH_ARGV} are updated as described in their
descriptions (@pxref{Bash Variables}).
@item
Function tracing is enabled: command substitution, shell functions, and
subshells invoked with @code{( @var{command} )} inherit the
@code{DEBUG} and @code{RETURN} traps.
@item
Error tracing is enabled: command substitution, shell functions, and
subshells invoked with @code{( @var{command} )} inherit the
@code{ERROR} trap.
@end enumerate
@item extglob
@@ -3724,6 +3746,11 @@ on an empty line.
If set, Bash matches filenames in a case-insensitive fashion when
performing filename expansion.
@item nocasematch
If set, Bash matches patterns in a case-insensitive fashion when
performing matching while executing @code{case} or @code{[[}
conditional commands.
@item nullglob
If set, Bash allows filename patterns which match no
files to expand to a null string, rather than themselves.
@@ -4286,6 +4313,10 @@ parameters to the current subroutine (shell function or script executed
with @code{.} or @code{source}) is at the top of the stack. When a
subroutine is executed, the number of parameters passed is pushed onto
@code{BASH_ARGC}.
The shell sets @code{BASH_ARGC} only when in extended debugging mode
(see @ref{Bash Builtins}
for a description of the @code{extdebug} option to the @code{shopt}
builtin).
@item BASH_ARGV
An array variable containing all of the parameters in the current bash
@@ -4293,6 +4324,10 @@ execution call stack. The final parameter of the last subroutine call
is at the top of the stack; the first parameter of the initial call is
at the bottom. When a subroutine is executed, the parameters supplied
are pushed onto @code{BASH_ARGV}.
The shell sets @code{BASH_ARGV} only when in extended debugging mode
(see @ref{Bash Builtins}
for a description of the @code{extdebug} option to the @code{shopt}
builtin).
@item BASH_COMMAND
The command currently being executed or about to be executed, unless the
@@ -6036,6 +6071,10 @@ constructed from @code{$PWD} and the directory name supplied as an argument
does not refer to an existing directory, @code{cd} will fail instead of
falling back to @var{physical} mode.
@item
When the @code{pwd} builtin is supplied the @opt{-P} option, it resets
@code{$PWD} to a pathname containing no symlinks.
@item
When listing the history, the @code{fc} builtin does not include an
indication of whether or not a history entry has been modified.
+395 -126
View File
File diff suppressed because it is too large Load Diff
+36 -2
View File
@@ -867,6 +867,10 @@ The syntax of the @code{case} command is:
@code{case} will selectively execute the @var{command-list} corresponding to
the first @var{pattern} that matches @var{word}.
If the shell option @code{nocasematch}
(see the description of @code{shopt} in @ref{Bash Builtins})
is enabled, the match is performed without regard to the case
of alphabetic characters.
The @samp{|} is used to separate multiple patterns, and the @samp{)}
operator terminates a pattern list.
A list of patterns and an associated command-list is known
@@ -975,6 +979,10 @@ as primaries.
When the @samp{==} and @samp{!=} operators are used, the string to the
right of the operator is considered a pattern and matched according
to the rules described below in @ref{Pattern Matching}.
If the shell option @code{nocasematch}
(see the description of @code{shopt} in @ref{Bash Builtins})
is enabled, the match is performed without regard to the case
of alphabetic characters.
The return value is 0 if the string matches or does not match
the pattern, respectively, and 1 otherwise.
Any part of the pattern may be quoted to force it to be matched as a
@@ -988,7 +996,7 @@ The return value is 0 if the string matches
the pattern, and 1 otherwise.
If the regular expression is syntactically incorrect, the conditional
expression's return value is 2.
If the shell option @code{nocaseglob}
If the shell option @code{nocasematch}
(see the description of @code{shopt} in @ref{Bash Builtins})
is enabled, the match is performed without regard to the case
of alphabetic characters.
@@ -1314,7 +1322,7 @@ to the filename used to invoke Bash, as given by argument zero.
@item _
(An underscore.)
At shell startup, set to the absolute file name used to invoke the
At shell startup, set to the absolute pathname used to invoke the
shell or shell script being executed as passed in the environment
or argument list.
Subsequently, expands to the last argument to the previous command,
@@ -3642,6 +3650,20 @@ If the command run by the @code{DEBUG} trap returns a value of 2, and the
shell is executing in a subroutine (a shell function or a shell script
executed by the @code{.} or @code{source} builtins), a call to
@code{return} is simulated.
@item
@code{BASH_ARGC} and @code{BASH_ARGV} are updated as described in their
descriptions (@pxref{Bash Variables}).
@item
Function tracing is enabled: command substitution, shell functions, and
subshells invoked with @code{( @var{command} )} inherit the
@code{DEBUG} and @code{RETURN} traps.
@item
Error tracing is enabled: command substitution, shell functions, and
subshells invoked with @code{( @var{command} )} inherit the
@code{ERROR} trap.
@end enumerate
@item extglob
@@ -4286,6 +4308,10 @@ parameters to the current subroutine (shell function or script executed
with @code{.} or @code{source}) is at the top of the stack. When a
subroutine is executed, the number of parameters passed is pushed onto
@code{BASH_ARGC}.
The shell sets @code{BASH_ARGC} only when in extended debugging mode
(see @ref{Bash Builtins}
for a description of the @code{extdebug} option to the @code{shopt}
builtin).
@item BASH_ARGV
An array variable containing all of the parameters in the current bash
@@ -4293,6 +4319,10 @@ execution call stack. The final parameter of the last subroutine call
is at the top of the stack; the first parameter of the initial call is
at the bottom. When a subroutine is executed, the parameters supplied
are pushed onto @code{BASH_ARGV}.
The shell sets @code{BASH_ARGV} only when in extended debugging mode
(see @ref{Bash Builtins}
for a description of the @code{extdebug} option to the @code{shopt}
builtin).
@item BASH_COMMAND
The command currently being executed or about to be executed, unless the
@@ -6036,6 +6066,10 @@ constructed from @code{$PWD} and the directory name supplied as an argument
does not refer to an existing directory, @code{cd} will fail instead of
falling back to @var{physical} mode.
@item
When the @code{pwd} builtin is supplied the @opt{-P} option, it resets
@code{$PWD} to a pathname containing no symlinks.
@item
When listing the history, the @code{fc} builtin does not include an
indication of whether or not a history entry has been modified.
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.18.1
%%CreationDate: Thu Dec 30 17:01:22 2004
%%CreationDate: Mon Feb 14 11:56:35 2005
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
+1 -1
View File
@@ -1,5 +1,5 @@
From: chet@po.cwru.edu (Chet Ramey)
To: bug-bash@gnu.org
Subject: BASH Frequently-Asked Questions (FAQ version 3.29)
Subject: BASH Frequently-Asked Questions (FAQ version 3.30)
Reply-To: chet@po.cwru.edu
+1 -1
View File
@@ -1,7 +1,7 @@
Newsgroups: comp.unix.shell,comp.unix.questions
Distribution: world
From: chet@po.cwru.edu (Chet Ramey)
Subject: BASH Frequently-Asked Questions (FAQ version 3.29)
Subject: BASH Frequently-Asked Questions (FAQ version 3.30)
Organization: Case Western Reserve University
Summary: A's to Q's about BASH, the Bourne-Again SHell
Reply-To: chet@po.cwru.edu
+1 -1
View File
@@ -1,6 +1,6 @@
Newsgroups: comp.unix.shell,comp.unix.questions,comp.answers,news.answers
From: chet@po.cwru.edu (Chet Ramey)
Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.29)
Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.30)
Organization: Case Western Reserve University
Summary: A's to Q's about BASH, the Bourne-Again SHell
Reply-To: chet@po.cwru.edu
+8 -4
View File
@@ -1,18 +1,18 @@
From: chet@po.cwru.edu (Chet Ramey)
To: bug-bash@gnu.org
Subject: BASH Frequently-Asked Questions (FAQ version 3.29)
Subject: BASH Frequently-Asked Questions (FAQ version 3.30)
Reply-To: chet@po.cwru.edu
Archive-name: unix-faq/shell/bash
Posting-Frequency: monthly
Submitted-By: chet@po.cwru.edu (Chet Ramey)
Last-Modified: Mon Sep 13 09:03:53 EDT 2004
FAQ-Version: 3.29
Last-Modified: Mon Feb 14 11:57:02 EST 2005
FAQ-Version: 3.30
Bash-Version: 3.0
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
Maintainer: chet@po.cwru.edu (Chet Ramey)
This is the Bash FAQ, version 3.29, for Bash version 3.0.
This is the Bash FAQ, version 3.30, for Bash version 3.0.
This document contains a set of frequently-asked questions concerning
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
@@ -171,6 +171,10 @@ Formatted versions of the documentation are available with the URLs:
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.0.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.0.tar.gz
Any patches for the current version are available with the URL:
ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/
A4) On what machines will bash run?
Bash has been ported to nearly every version of Unix. All you
+8 -4
View File
@@ -1,7 +1,7 @@
Newsgroups: comp.unix.shell,comp.unix.questions
Distribution: world
From: chet@po.cwru.edu (Chet Ramey)
Subject: BASH Frequently-Asked Questions (FAQ version 3.29)
Subject: BASH Frequently-Asked Questions (FAQ version 3.30)
Organization: Case Western Reserve University
Summary: A's to Q's about BASH, the Bourne-Again SHell
Reply-To: chet@po.cwru.edu
@@ -10,13 +10,13 @@ Followup-To: poster
Archive-name: unix-faq/shell/bash
Posting-Frequency: monthly
Submitted-By: chet@po.cwru.edu (Chet Ramey)
Last-Modified: Mon Sep 13 09:03:53 EDT 2004
FAQ-Version: 3.29
Last-Modified: Mon Feb 14 11:57:02 EST 2005
FAQ-Version: 3.30
Bash-Version: 3.0
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
Maintainer: chet@po.cwru.edu (Chet Ramey)
This is the Bash FAQ, version 3.29, for Bash version 3.0.
This is the Bash FAQ, version 3.30, for Bash version 3.0.
This document contains a set of frequently-asked questions concerning
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
@@ -175,6 +175,10 @@ Formatted versions of the documentation are available with the URLs:
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.0.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.0.tar.gz
Any patches for the current version are available with the URL:
ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/
A4) On what machines will bash run?
Bash has been ported to nearly every version of Unix. All you
+8 -4
View File
@@ -1,6 +1,6 @@
Newsgroups: comp.unix.shell,comp.unix.questions,comp.answers,news.answers
From: chet@po.cwru.edu (Chet Ramey)
Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.29)
Subject: [gnu.bash.bug] BASH Frequently-Asked Questions (FAQ version 3.30)
Organization: Case Western Reserve University
Summary: A's to Q's about BASH, the Bourne-Again SHell
Reply-To: chet@po.cwru.edu
@@ -10,13 +10,13 @@ Approved: news-answers-request@MIT.EDU
Archive-name: unix-faq/shell/bash
Posting-Frequency: monthly
Submitted-By: chet@po.cwru.edu (Chet Ramey)
Last-Modified: Mon Sep 13 09:03:53 EDT 2004
FAQ-Version: 3.29
Last-Modified: Mon Feb 14 11:57:02 EST 2005
FAQ-Version: 3.30
Bash-Version: 3.0
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
Maintainer: chet@po.cwru.edu (Chet Ramey)
This is the Bash FAQ, version 3.29, for Bash version 3.0.
This is the Bash FAQ, version 3.30, for Bash version 3.0.
This document contains a set of frequently-asked questions concerning
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
@@ -175,6 +175,10 @@ Formatted versions of the documentation are available with the URLs:
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.0.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.0.tar.gz
Any patches for the current version are available with the URL:
ftp://ftp.cwru.edu/pub/bash/bash-3.0-patches/
A4) On what machines will bash run?
Bash has been ported to nearly every version of Unix. All you
+2 -2
View File
@@ -1,8 +1,8 @@
Archive-name: unix-faq/shell/bash
Posting-Frequency: monthly
Submitted-By: chet@po.cwru.edu (Chet Ramey)
Last-Modified: Mon Sep 13 09:03:53 EDT 2004
FAQ-Version: 3.29
Last-Modified: Mon Feb 14 11:57:02 EST 2005
FAQ-Version: 3.30
Bash-Version: 3.0
URL: ftp://ftp.cwru.edu/pub/bash/FAQ
Maintainer: chet@po.cwru.edu (Chet Ramey)
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.18.1
%%CreationDate: Thu Dec 30 17:01:22 2004
%%CreationDate: Mon Feb 14 11:56:35 2005
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.18 1
+2 -2
View File
@@ -2,9 +2,9 @@
Copyright (C) 1988-2005 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Fri Feb 11 15:43:59 EST 2005
@set LASTCHANGE Sat Feb 19 17:38:46 EST 2005
@set EDITION 3.1-devel
@set VERSION 3.1-devel
@set UPDATED 11 February 2005
@set UPDATED 19 February 2005
@set UPDATED-MONTH February 2005
+3 -3
View File
@@ -2,9 +2,9 @@
Copyright (C) 1988-2005 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Thu Dec 30 17:00:22 EST 2004
@set LASTCHANGE Fri Feb 18 22:22:06 EST 2005
@set EDITION 3.1-devel
@set VERSION 3.1-devel
@set UPDATED 30 December 2004
@set UPDATED-MONTH December 2004
@set UPDATED 18 February 2005
@set UPDATED-MONTH February 2005
+4 -1
View File
@@ -245,6 +245,9 @@ int subshell_level = 0;
/* Currently-executing shell function. */
SHELL_VAR *this_shell_function;
/* If non-zero, matches in case and [[ ... ]] are case-insensitive */
int match_ignore_case = 0;
struct fd_bitmap *current_fds_to_close = (struct fd_bitmap *)NULL;
#define FD_BITMAP_DEFAULT_SIZE 32
@@ -2223,7 +2226,7 @@ execute_case_command (case_command)
/* Since the pattern does not undergo quote removal (as per
Posix.2, section 3.9.4.3), the strmatch () call must be able
to recognize backslashes as escape characters. */
match = strmatch (pattern, word, FNMATCH_EXTFLAG) != FNM_NOMATCH;
match = strmatch (pattern, word, FNMATCH_EXTFLAG|FNMATCH_IGNCASE) != FNM_NOMATCH;
free (pattern);
dispose_words (es);
+1 -1
View File
@@ -1,6 +1,6 @@
/* execute_command.c -- Execute a COMMAND structure. */
/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
+2 -1
View File
@@ -1135,7 +1135,7 @@ evalerror (msg)
Base may be >=2 and <=64. If base is <= 36, the numbers are drawn
from [0-9][a-zA-Z], and lowercase and uppercase letters may be used
interchangably. If base is > 36 and <= 64, the numbers are drawn
from [0-9][a-z][A-Z]_@ (a = 10, z = 35, A = 36, Z = 61, _ = 62, @ = 63 --
from [0-9][a-z][A-Z]_@ (a = 10, z = 35, A = 36, Z = 61, @ = 62, _ = 63 --
you get the picture). */
static intmax_t
@@ -1206,6 +1206,7 @@ strlong (num)
else
break;
}
return (val);
}
+2 -2
View File
@@ -39,7 +39,7 @@
#include "variables.h"
#include "externs.h"
extern int glob_ignore_case;
extern int glob_ignore_case, match_ignore_case;
int
sh_regmatch (string, pattern, flags)
@@ -65,7 +65,7 @@ sh_regmatch (string, pattern, flags)
#endif
rflags = REG_EXTENDED;
if (glob_ignore_case)
if (glob_ignore_case || match_ignore_case)
rflags |= REG_ICASE;
#if !defined (ARRAY_VARS)
rflags |= REG_NOSUB;
+121
View File
@@ -0,0 +1,121 @@
/* Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
Bash is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with Bash; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
/*
* shmatch.c -- shell interface to posix regular expression matching.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#if defined (HAVE_POSIX_REGEXP)
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "bashansi.h"
#include <stdio.h>
#include <regex.h>
#include "shell.h"
#include "variables.h"
#include "externs.h"
extern int glob_ignore_case;
int
sh_regmatch (string, pattern, flags)
const char *string;
const char *pattern;
int flags;
{
regex_t regex = { 0 };
regmatch_t *matches;
int rflags;
#if defined (ARRAY_VARS)
SHELL_VAR *rematch;
ARRAY *amatch;
int subexp_ind;
char *subexp_str;
int subexp_len;
#endif
int result;
#if defined (ARRAY_VARS)
rematch = (SHELL_VAR *)NULL;
#endif
rflags = REG_EXTENDED;
if (glob_ignore_case)
rflags |= REG_ICASE;
#if !defined (ARRAY_VARS)
rflags |= REG_NOSUB;
#endif
if (regcomp (&regex, pattern, rflags))
return 2; /* flag for printing a warning here. */
#if defined (ARRAY_VARS)
matches = (regmatch_t *)malloc (sizeof (regmatch_t) * (regex.re_nsub + 1));
#else
matches = NULL;
#endif
if (regexec (&regex, string, regex.re_nsub + 1, matches, 0))
result = EXECUTION_FAILURE;
else
result = EXECUTION_SUCCESS; /* match */
#if defined (ARRAY_VARS)
subexp_len = strlen (string) + 10;
subexp_str = malloc (subexp_len + 1);
/* Store the parenthesized subexpressions in the array BASH_REMATCH.
Element 0 is the portion that matched the entire regexp. Element 1
is the part that matched the first subexpression, and so on. */
unbind_variable ("BASH_REMATCH");
rematch = make_new_array_variable ("BASH_REMATCH");
amatch = array_cell (rematch);
if ((flags & SHMAT_SUBEXP) && result == EXECUTION_SUCCESS && subexp_str)
{
for (subexp_ind = 0; subexp_ind <= regex.re_nsub; subexp_ind++)
{
memset (subexp_str, 0, subexp_len);
strncpy (subexp_str, string + matches[subexp_ind].rm_so,
matches[subexp_ind].rm_eo - matches[subexp_ind].rm_so);
array_insert (amatch, subexp_ind, subexp_str);
}
}
VSETATTR (rematch, att_readonly);
free (subexp_str);
free (matches);
#endif /* ARRAY_VARS */
regfree (&regex);
return result;
}
#endif /* HAVE_POSIX_REGEXP */
+4 -1
View File
@@ -1,6 +1,6 @@
/* pathexp.h -- The shell interface to the globbing library. */
/* Copyright (C) 1987,1989 Free Software Foundation, Inc.
/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -41,8 +41,11 @@ extern char *glob_error_return;
# define FNMATCH_EXTFLAG 0
#endif /* !EXTENDED_GLOB */
#define FNMATCH_IGNCASE (match_ignore_case ? FNM_CASEFOLD : 0)
extern int glob_dot_filenames;
extern int extended_glob;
extern int match_ignore_case; /* doesn't really belong here */
extern int unquoted_glob_pattern_p __P((char *));
+98
View File
@@ -0,0 +1,98 @@
/* pathexp.h -- The shell interface to the globbing library. */
/* Copyright (C) 1987,1989 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
Bash is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with Bash; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#if !defined (_PATHEXP_H_)
#define _PATHEXP_H_
#if defined (USE_POSIX_GLOB_LIBRARY)
# define GLOB_FAILED(glist) !(glist)
#else /* !USE_POSIX_GLOB_LIBRARY */
# define GLOB_FAILED(glist) (glist) == (char **)&glob_error_return
extern int noglob_dot_filenames;
extern char *glob_error_return;
#endif /* !USE_POSIX_GLOB_LIBRARY */
/* Flag values for quote_string_for_globbing */
#define QGLOB_CVTNULL 0x01 /* convert QUOTED_NULL strings to '\0' */
#define QGLOB_FILENAME 0x02 /* do correct quoting for matching filenames */
#if defined (EXTENDED_GLOB)
/* Flags to OR with other flag args to strmatch() to enabled the extended
pattern matching. */
# define FNMATCH_EXTFLAG (extended_glob ? FNM_EXTMATCH : 0)
#else
# define FNMATCH_EXTFLAG 0
#endif /* !EXTENDED_GLOB */
#define FNMATCH_IGNCASE (match_ignore_case ? FNM_CASEFOLD : 0)
extern int glob_dot_filenames;
extern int extended_glob;
extern int unquoted_glob_pattern_p __P((char *));
/* PATHNAME can contain characters prefixed by CTLESC; this indicates
that the character is to be quoted. We quote it here in the style
that the glob library recognizes. If flags includes QGLOB_CVTNULL,
we change quoted null strings (pathname[0] == CTLNUL) into empty
strings (pathname[0] == 0). If this is called after quote removal
is performed, (flags & QGLOB_CVTNULL) should be 0; if called when quote
removal has not been done (for example, before attempting to match a
pattern while executing a case statement), flags should include
QGLOB_CVTNULL. If flags includes QGLOB_FILENAME, appropriate quoting
to match a filename should be performed. */
extern char *quote_string_for_globbing __P((const char *, int));
extern char *quote_globbing_chars __P((char *));
/* Call the glob library to do globbing on PATHNAME. */
extern char **shell_glob_filename __P((const char *));
/* Filename completion ignore. Used to implement the "fignore" facility of
tcsh and GLOBIGNORE (like ksh-93 FIGNORE).
It is passed a NULL-terminated array of (char *)'s that must be
free()'d if they are deleted. The first element (names[0]) is the
least-common-denominator string of the matching patterns (i.e.
u<TAB> produces names[0] = "und", names[1] = "under.c", names[2] =
"undun.c", name[3] = NULL). */
struct ign {
char *val;
int len, flags;
};
typedef int sh_iv_item_func_t __P((struct ign *));
struct ignorevar {
char *varname; /* FIGNORE or GLOBIGNORE */
struct ign *ignores; /* Store the ignore strings here */
int num_ignores; /* How many are there? */
char *last_ignoreval; /* Last value of variable - cached for speed */
sh_iv_item_func_t *item_func; /* Called when each item is parsed from $`varname' */
};
extern void setup_ignore_patterns __P((struct ignorevar *));
extern void setup_glob_ignore __P((char *));
extern int should_ignore_glob_matches __P((void));
extern void ignore_glob_matches __P((char **));
#endif
+1 -2
View File
@@ -533,8 +533,7 @@ main (argc, argv, env)
term = get_string_value ("TERM");
no_line_editing |= term && (STREQ (term, "emacs"));
emacs = get_string_value ("EMACS");
running_under_emacs = emacs ? ((strmatch ("*term*", emacs, 0) == 0) ? 2 : 1)
: 0;
running_under_emacs = emacs ? ((strstr (emacs, "term") != 0) ? 2 : 1) : 0;
#if 0
no_line_editing |= emacs && emacs[0] == 't' && emacs[1] == '\0';
#else
+2 -2
View File
@@ -2,7 +2,7 @@
/* Modified to run with the GNU shell Apr 25, 1988 by bfox. */
/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -459,7 +459,7 @@ patcomp (string, pat, op)
{
int m;
m = strmatch (pat, string, FNMATCH_EXTFLAG);
m = strmatch (pat, string, FNMATCH_EXTFLAG|FNMATCH_IGNCASE);
return ((op == EQ) ? (m == 0) : (m != 0));
}
+924
View File
@@ -0,0 +1,924 @@
/* GNU test program (ksb and mjb) */
/* Modified to run with the GNU shell Apr 25, 1988 by bfox. */
/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
Bash is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with Bash; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
/* Define PATTERN_MATCHING to get the csh-like =~ and !~ pattern-matching
binary operators. */
/* #define PATTERN_MATCHING */
#if defined (HAVE_CONFIG_H)
# include <config.h>
#endif
#include <stdio.h>
#include "bashtypes.h"
#if !defined (HAVE_LIMITS_H)
# include <sys/param.h>
#endif
#if defined (HAVE_UNISTD_H)
# include <unistd.h>
#endif
#include <errno.h>
#if !defined (errno)
extern int errno;
#endif /* !errno */
#if !defined (_POSIX_VERSION) && defined (HAVE_SYS_FILE_H)
# include <sys/file.h>
#endif /* !_POSIX_VERSION */
#include "posixstat.h"
#include "filecntl.h"
#include "bashintl.h"
#include "shell.h"
#include "pathexp.h"
#include "test.h"
#include "builtins/common.h"
#include <glob/strmatch.h>
#if !defined (STRLEN)
# define STRLEN(s) ((s)[0] ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0)
#endif
#if !defined (STREQ)
# define STREQ(a, b) ((a)[0] == (b)[0] && strcmp (a, b) == 0)
#endif /* !STREQ */
#if !defined (R_OK)
#define R_OK 4
#define W_OK 2
#define X_OK 1
#define F_OK 0
#endif /* R_OK */
#define EQ 0
#define NE 1
#define LT 2
#define GT 3
#define LE 4
#define GE 5
#define NT 0
#define OT 1
#define EF 2
/* The following few defines control the truth and false output of each stage.
TRUE and FALSE are what we use to compute the final output value.
SHELL_BOOLEAN is the form which returns truth or falseness in shell terms.
Default is TRUE = 1, FALSE = 0, SHELL_BOOLEAN = (!value). */
#define TRUE 1
#define FALSE 0
#define SHELL_BOOLEAN(value) (!(value))
#define TEST_ERREXIT_STATUS 2
static procenv_t test_exit_buf;
static int test_error_return;
#define test_exit(val) \
do { test_error_return = val; longjmp (test_exit_buf, 1); } while (0)
/* We have to use access(2) for machines running AFS, because it's
not a Unix file system. This may produce incorrect answers for
non-AFS files. I hate AFS. */
#if defined (AFS)
# define EACCESS(path, mode) access(path, mode)
#else
# define EACCESS(path, mode) test_eaccess(path, mode)
#endif /* AFS */
static int pos; /* The offset of the current argument in ARGV. */
static int argc; /* The number of arguments present in ARGV. */
static char **argv; /* The argument list. */
static int noeval;
static void test_syntax_error __P((char *, char *)) __attribute__((__noreturn__));
static void beyond __P((void)) __attribute__((__noreturn__));
static void integer_expected_error __P((char *)) __attribute__((__noreturn__));
static int test_stat __P((char *, struct stat *));
static int unary_operator __P((void));
static int binary_operator __P((void));
static int two_arguments __P((void));
static int three_arguments __P((void));
static int posixtest __P((void));
static int expr __P((void));
static int term __P((void));
static int and __P((void));
static int or __P((void));
static int filecomp __P((char *, char *, int));
static int arithcomp __P((char *, char *, int, int));
static int patcomp __P((char *, char *, int));
static void
test_syntax_error (format, arg)
char *format, *arg;
{
builtin_error (format, arg);
test_exit (TEST_ERREXIT_STATUS);
}
/*
* beyond - call when we're beyond the end of the argument list (an
* error condition)
*/
static void
beyond ()
{
test_syntax_error (_("argument expected"), (char *)NULL);
}
/* Syntax error for when an integer argument was expected, but
something else was found. */
static void
integer_expected_error (pch)
char *pch;
{
test_syntax_error (_("%s: integer expression expected"), pch);
}
/* A wrapper for stat () which disallows pathnames that are empty strings
and handles /dev/fd emulation on systems that don't have it. */
static int
test_stat (path, finfo)
char *path;
struct stat *finfo;
{
if (*path == '\0')
{
errno = ENOENT;
return (-1);
}
if (path[0] == '/' && path[1] == 'd' && strncmp (path, "/dev/fd/", 8) == 0)
{
#if !defined (HAVE_DEV_FD)
intmax_t fd;
int r;
if (legal_number (path + 8, &fd) && fd == (int)fd)
{
r = fstat ((int)fd, finfo);
if (r == 0 || errno != EBADF)
return (r);
}
errno = ENOENT;
return (-1);
#else
/* If HAVE_DEV_FD is defined, DEV_FD_PREFIX is defined also, and has a
trailing slash. Make sure /dev/fd/xx really uses DEV_FD_PREFIX/xx.
On most systems, with the notable exception of linux, this is
effectively a no-op. */
char pbuf[32];
strcpy (pbuf, DEV_FD_PREFIX);
strcat (pbuf, path + 8);
return (stat (pbuf, finfo));
#endif /* !HAVE_DEV_FD */
}
#if !defined (HAVE_DEV_STDIN)
else if (STREQN (path, "/dev/std", 8))
{
if (STREQ (path+8, "in"))
return (fstat (0, finfo));
else if (STREQ (path+8, "out"))
return (fstat (1, finfo));
else if (STREQ (path+8, "err"))
return (fstat (2, finfo));
else
return (stat (path, finfo));
}
#endif /* !HAVE_DEV_STDIN */
return (stat (path, finfo));
}
/* Do the same thing access(2) does, but use the effective uid and gid,
and don't make the mistake of telling root that any file is
executable. */
int
test_eaccess (path, mode)
char *path;
int mode;
{
struct stat st;
if (test_stat (path, &st) < 0)
return (-1);
if (current_user.euid == 0)
{
/* Root can read or write any file. */
if (mode != X_OK)
return (0);
/* Root can execute any file that has any one of the execute
bits set. */
if (st.st_mode & S_IXUGO)
return (0);
}
if (st.st_uid == current_user.euid) /* owner */
mode <<= 6;
else if (group_member (st.st_gid))
mode <<= 3;
if (st.st_mode & mode)
return (0);
errno = EACCES;
return (-1);
}
/* Increment our position in the argument list. Check that we're not
past the end of the argument list. This check is supressed if the
argument is FALSE. Made a macro for efficiency. */
#define advance(f) do { ++pos; if (f && pos >= argc) beyond (); } while (0)
#define unary_advance() do { advance (1); ++pos; } while (0)
/*
* expr:
* or
*/
static int
expr ()
{
if (pos >= argc)
beyond ();
return (FALSE ^ or ()); /* Same with this. */
}
/*
* or:
* and
* and '-o' or
*/
static int
or ()
{
int value, v2;
value = and ();
if (pos < argc && argv[pos][0] == '-' && argv[pos][1] == 'o' && !argv[pos][2])
{
advance (0);
v2 = or ();
return (value || v2);
}
return (value);
}
/*
* and:
* term
* term '-a' and
*/
static int
and ()
{
int value, v2;
value = term ();
if (pos < argc && argv[pos][0] == '-' && argv[pos][1] == 'a' && !argv[pos][2])
{
advance (0);
v2 = and ();
return (value && v2);
}
return (value);
}
/*
* term - parse a term and return 1 or 0 depending on whether the term
* evaluates to true or false, respectively.
*
* term ::=
* '-'('a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'|'k'|'p'|'r'|'s'|'u'|'w'|'x') filename
* '-'('G'|'L'|'O'|'S'|'N') filename
* '-t' [int]
* '-'('z'|'n') string
* '-o' option
* string
* string ('!='|'='|'==') string
* <int> '-'(eq|ne|le|lt|ge|gt) <int>
* file '-'(nt|ot|ef) file
* '(' <expr> ')'
* int ::=
* positive and negative integers
*/
static int
term ()
{
int value;
if (pos >= argc)
beyond ();
/* Deal with leading `not's. */
if (argv[pos][0] == '!' && argv[pos][1] == '\0')
{
value = 0;
while (pos < argc && argv[pos][0] == '!' && argv[pos][1] == '\0')
{
advance (1);
value = 1 - value;
}
return (value ? !term() : term());
}
/* A paren-bracketed argument. */
if (argv[pos][0] == '(' && argv[pos][1] == '\0') /* ) */
{
advance (1);
value = expr ();
if (argv[pos] == 0) /* ( */
test_syntax_error (_("`)' expected"), (char *)NULL);
else if (argv[pos][0] != ')' || argv[pos][1]) /* ( */
test_syntax_error (_("`)' expected, found %s"), argv[pos]);
advance (0);
return (value);
}
/* are there enough arguments left that this could be dyadic? */
if ((pos + 3 <= argc) && test_binop (argv[pos + 1]))
value = binary_operator ();
/* Might be a switch type argument */
else if (argv[pos][0] == '-' && argv[pos][2] == '\0')
{
if (test_unop (argv[pos]))
value = unary_operator ();
else
test_syntax_error (_("%s: unary operator expected"), argv[pos]);
}
else
{
value = argv[pos][0] != '\0';
advance (0);
}
return (value);
}
static int
filecomp (s, t, op)
char *s, *t;
int op;
{
struct stat st1, st2;
int r1, r2;
if ((r1 = test_stat (s, &st1)) < 0)
{
if (op == EF)
return (FALSE);
}
if ((r2 = test_stat (t, &st2)) < 0)
{
if (op == EF)
return (FALSE);
}
switch (op)
{
case OT: return (r1 < r2 || (r2 == 0 && st1.st_mtime < st2.st_mtime));
case NT: return (r1 > r2 || (r1 == 0 && st1.st_mtime > st2.st_mtime));
case EF: return ((st1.st_dev == st2.st_dev) && (st1.st_ino == st2.st_ino));
}
return (FALSE);
}
static int
arithcomp (s, t, op, flags)
char *s, *t;
int op, flags;
{
intmax_t l, r;
int expok;
if (flags & TEST_ARITHEXP)
{
l = evalexp (s, &expok);
if (expok == 0)
return (FALSE); /* should probably longjmp here */
r = evalexp (t, &expok);
if (expok == 0)
return (FALSE); /* ditto */
}
else
{
if (legal_number (s, &l) == 0)
integer_expected_error (s);
if (legal_number (t, &r) == 0)
integer_expected_error (t);
}
switch (op)
{
case EQ: return (l == r);
case NE: return (l != r);
case LT: return (l < r);
case GT: return (l > r);
case LE: return (l <= r);
case GE: return (l >= r);
}
return (FALSE);
}
static int
patcomp (string, pat, op)
char *string, *pat;
int op;
{
int m;
m = strmatch (pat, string, FNMATCH_EXTFLAG|FNMATCH_IGNCASE);
return ((op == EQ) ? (m == 0) : (m != 0));
}
int
binary_test (op, arg1, arg2, flags)
char *op, *arg1, *arg2;
int flags;
{
int patmatch;
patmatch = (flags & TEST_PATMATCH);
if (op[0] == '=' && (op[1] == '\0' || (op[1] == '=' && op[2] == '\0')))
return (patmatch ? patcomp (arg1, arg2, EQ) : STREQ (arg1, arg2));
else if ((op[0] == '>' || op[0] == '<') && op[1] == '\0')
return ((op[0] == '>') ? (strcmp (arg1, arg2) > 0) : (strcmp (arg1, arg2) < 0));
else if (op[0] == '!' && op[1] == '=' && op[2] == '\0')
return (patmatch ? patcomp (arg1, arg2, NE) : (STREQ (arg1, arg2) == 0));
else if (op[2] == 't')
{
switch (op[1])
{
case 'n': return (filecomp (arg1, arg2, NT)); /* -nt */
case 'o': return (filecomp (arg1, arg2, OT)); /* -ot */
case 'l': return (arithcomp (arg1, arg2, LT, flags)); /* -lt */
case 'g': return (arithcomp (arg1, arg2, GT, flags)); /* -gt */
}
}
else if (op[1] == 'e')
{
switch (op[2])
{
case 'f': return (filecomp (arg1, arg2, EF)); /* -ef */
case 'q': return (arithcomp (arg1, arg2, EQ, flags)); /* -eq */
}
}
else if (op[2] == 'e')
{
switch (op[1])
{
case 'n': return (arithcomp (arg1, arg2, NE, flags)); /* -ne */
case 'g': return (arithcomp (arg1, arg2, GE, flags)); /* -ge */
case 'l': return (arithcomp (arg1, arg2, LE, flags)); /* -le */
}
}
return (FALSE); /* should never get here */
}
static int
binary_operator ()
{
int value;
char *w;
w = argv[pos + 1];
if ((w[0] == '=' && (w[1] == '\0' || (w[1] == '=' && w[2] == '\0'))) || /* =, == */
((w[0] == '>' || w[0] == '<') && w[1] == '\0') || /* <, > */
(w[0] == '!' && w[1] == '=' && w[2] == '\0')) /* != */
{
value = binary_test (w, argv[pos], argv[pos + 2], 0);
pos += 3;
return (value);
}
#if defined (PATTERN_MATCHING)
if ((w[0] == '=' || w[0] == '!') && w[1] == '~' && w[2] == '\0')
{
value = patcomp (argv[pos], argv[pos + 2], w[0] == '=' ? EQ : NE);
pos += 3;
return (value);
}
#endif
if ((w[0] != '-' || w[3] != '\0') || test_binop (w) == 0)
{
test_syntax_error (_("%s: binary operator expected"), w);
/* NOTREACHED */
return (FALSE);
}
value = binary_test (w, argv[pos], argv[pos + 2], 0);
pos += 3;
return value;
}
static int
unary_operator ()
{
char *op;
intmax_t r;
op = argv[pos];
if (test_unop (op) == 0)
return (FALSE);
/* the only tricky case is `-t', which may or may not take an argument. */
if (op[1] == 't')
{
advance (0);
if (pos < argc)
{
if (legal_number (argv[pos], &r))
{
advance (0);
return (unary_test (op, argv[pos - 1]));
}
else
return (FALSE);
}
else
return (unary_test (op, "1"));
}
/* All of the unary operators take an argument, so we first call
unary_advance (), which checks to make sure that there is an
argument, and then advances pos right past it. This means that
pos - 1 is the location of the argument. */
unary_advance ();
return (unary_test (op, argv[pos - 1]));
}
int
unary_test (op, arg)
char *op, *arg;
{
intmax_t r;
struct stat stat_buf;
switch (op[1])
{
case 'a': /* file exists in the file system? */
case 'e':
return (test_stat (arg, &stat_buf) == 0);
case 'r': /* file is readable? */
return (EACCESS (arg, R_OK) == 0);
case 'w': /* File is writeable? */
return (EACCESS (arg, W_OK) == 0);
case 'x': /* File is executable? */
return (EACCESS (arg, X_OK) == 0);
case 'O': /* File is owned by you? */
return (test_stat (arg, &stat_buf) == 0 &&
(uid_t) current_user.euid == (uid_t) stat_buf.st_uid);
case 'G': /* File is owned by your group? */
return (test_stat (arg, &stat_buf) == 0 &&
(gid_t) current_user.egid == (gid_t) stat_buf.st_gid);
case 'N':
return (test_stat (arg, &stat_buf) == 0 &&
stat_buf.st_atime <= stat_buf.st_mtime);
case 'f': /* File is a file? */
if (test_stat (arg, &stat_buf) < 0)
return (FALSE);
/* -f is true if the given file exists and is a regular file. */
#if defined (S_IFMT)
return (S_ISREG (stat_buf.st_mode) || (stat_buf.st_mode & S_IFMT) == 0);
#else
return (S_ISREG (stat_buf.st_mode));
#endif /* !S_IFMT */
case 'd': /* File is a directory? */
return (test_stat (arg, &stat_buf) == 0 && (S_ISDIR (stat_buf.st_mode)));
case 's': /* File has something in it? */
return (test_stat (arg, &stat_buf) == 0 && stat_buf.st_size > (off_t) 0);
case 'S': /* File is a socket? */
#if !defined (S_ISSOCK)
return (FALSE);
#else
return (test_stat (arg, &stat_buf) == 0 && S_ISSOCK (stat_buf.st_mode));
#endif /* S_ISSOCK */
case 'c': /* File is character special? */
return (test_stat (arg, &stat_buf) == 0 && S_ISCHR (stat_buf.st_mode));
case 'b': /* File is block special? */
return (test_stat (arg, &stat_buf) == 0 && S_ISBLK (stat_buf.st_mode));
case 'p': /* File is a named pipe? */
#ifndef S_ISFIFO
return (FALSE);
#else
return (test_stat (arg, &stat_buf) == 0 && S_ISFIFO (stat_buf.st_mode));
#endif /* S_ISFIFO */
case 'L': /* Same as -h */
case 'h': /* File is a symbolic link? */
#if !defined (S_ISLNK) || !defined (HAVE_LSTAT)
return (FALSE);
#else
return ((arg[0] != '\0') &&
(lstat (arg, &stat_buf) == 0) && S_ISLNK (stat_buf.st_mode));
#endif /* S_IFLNK && HAVE_LSTAT */
case 'u': /* File is setuid? */
return (test_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISUID) != 0);
case 'g': /* File is setgid? */
return (test_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISGID) != 0);
case 'k': /* File has sticky bit set? */
#if !defined (S_ISVTX)
/* This is not Posix, and is not defined on some Posix systems. */
return (FALSE);
#else
return (test_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISVTX) != 0);
#endif
case 't': /* File fd is a terminal? */
if (legal_number (arg, &r) == 0)
return (FALSE);
return ((r == (int)r) && isatty ((int)r));
case 'n': /* True if arg has some length. */
return (arg[0] != '\0');
case 'z': /* True if arg has no length. */
return (arg[0] == '\0');
case 'o': /* True if option `arg' is set. */
return (minus_o_option_value (arg) == 1);
}
/* We can't actually get here, but this shuts up gcc. */
return (FALSE);
}
/* Return TRUE if OP is one of the test command's binary operators. */
int
test_binop (op)
char *op;
{
if (op[0] == '=' && op[1] == '\0')
return (1); /* '=' */
else if ((op[0] == '<' || op[0] == '>') && op[1] == '\0') /* string <, > */
return (1);
else if ((op[0] == '=' || op[0] == '!') && op[1] == '=' && op[2] == '\0')
return (1); /* `==' and `!=' */
#if defined (PATTERN_MATCHING)
else if (op[2] == '\0' && op[1] == '~' && (op[0] == '=' || op[0] == '!'))
return (1);
#endif
else if (op[0] != '-' || op[2] == '\0' || op[3] != '\0')
return (0);
else
{
if (op[2] == 't')
switch (op[1])
{
case 'n': /* -nt */
case 'o': /* -ot */
case 'l': /* -lt */
case 'g': /* -gt */
return (1);
default:
return (0);
}
else if (op[1] == 'e')
switch (op[2])
{
case 'q': /* -eq */
case 'f': /* -ef */
return (1);
default:
return (0);
}
else if (op[2] == 'e')
switch (op[1])
{
case 'n': /* -ne */
case 'g': /* -ge */
case 'l': /* -le */
return (1);
default:
return (0);
}
else
return (0);
}
}
/* Return non-zero if OP is one of the test command's unary operators. */
int
test_unop (op)
char *op;
{
if (op[0] != '-')
return (0);
switch (op[1])
{
case 'a': case 'b': case 'c': case 'd': case 'e':
case 'f': case 'g': case 'h': case 'k': case 'n':
case 'o': case 'p': case 'r': case 's': case 't':
case 'u': case 'w': case 'x': case 'z':
case 'G': case 'L': case 'O': case 'S': case 'N':
return (1);
}
return (0);
}
static int
two_arguments ()
{
if (argv[pos][0] == '!' && argv[pos][1] == '\0')
return (argv[pos + 1][0] == '\0');
else if (argv[pos][0] == '-' && argv[pos][2] == '\0')
{
if (test_unop (argv[pos]))
return (unary_operator ());
else
test_syntax_error (_("%s: unary operator expected"), argv[pos]);
}
else
test_syntax_error (_("%s: unary operator expected"), argv[pos]);
return (0);
}
#define ANDOR(s) (s[0] == '-' && !s[2] && (s[1] == 'a' || s[1] == 'o'))
/* This could be augmented to handle `-t' as equivalent to `-t 1', but
POSIX requires that `-t' be given an argument. */
#define ONE_ARG_TEST(s) ((s)[0] != '\0')
static int
three_arguments ()
{
int value;
if (test_binop (argv[pos+1]))
{
value = binary_operator ();
pos = argc;
}
else if (ANDOR (argv[pos+1]))
{
if (argv[pos+1][1] == 'a')
value = ONE_ARG_TEST(argv[pos]) && ONE_ARG_TEST(argv[pos+2]);
else
value = ONE_ARG_TEST(argv[pos]) || ONE_ARG_TEST(argv[pos+2]);
pos = argc;
}
else if (argv[pos][0] == '!' && argv[pos][1] == '\0')
{
advance (1);
value = !two_arguments ();
}
else if (argv[pos][0] == '(' && argv[pos+2][0] == ')')
{
value = ONE_ARG_TEST(argv[pos+1]);
pos = argc;
}
else
test_syntax_error (_("%s: binary operator expected"), argv[pos+1]);
return (value);
}
/* This is an implementation of a Posix.2 proposal by David Korn. */
static int
posixtest ()
{
int value;
switch (argc - 1) /* one extra passed in */
{
case 0:
value = FALSE;
pos = argc;
break;
case 1:
value = ONE_ARG_TEST(argv[1]);
pos = argc;
break;
case 2:
value = two_arguments ();
pos = argc;
break;
case 3:
value = three_arguments ();
break;
case 4:
if (argv[pos][0] == '!' && argv[pos][1] == '\0')
{
advance (1);
value = !three_arguments ();
break;
}
/* FALLTHROUGH */
default:
value = expr ();
}
return (value);
}
/*
* [:
* '[' expr ']'
* test:
* test expr
*/
int
test_command (margc, margv)
int margc;
char **margv;
{
int value;
int code;
USE_VAR(margc);
code = setjmp (test_exit_buf);
if (code)
return (test_error_return);
argv = margv;
if (margv[0] && margv[0][0] == '[' && margv[0][1] == '\0')
{
--margc;
if (margv[margc] && (margv[margc][0] != ']' || margv[margc][1]))
test_syntax_error (_("missing `]'"), (char *)NULL);
if (margc < 2)
test_exit (SHELL_BOOLEAN (FALSE));
}
argc = margc;
pos = 1;
if (pos >= argc)
test_exit (SHELL_BOOLEAN (FALSE));
noeval = 0;
value = posixtest ();
if (pos != argc)
test_syntax_error (_("too many arguments"), (char *)NULL);
test_exit (SHELL_BOOLEAN (value));
}
+1 -1
View File
@@ -1,4 +1,4 @@
BUILD_DIR=/usr/local/build/chet/bash/bash-current
BUILD_DIR=/usr/local/build/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
+1
View File
@@ -38,3 +38,4 @@ argv[1] = <^?>
argv[1] = <-^?->
argv[1] = <^?>
argv[1] = <-^?->
ok
+12
View File
@@ -100,3 +100,15 @@ recho "-${*:1}-"
recho ${*:1}
recho -${*:1}-
shift $#
DEL=`awk 'END{printf("%c", 0+127)}' </dev/null`
T1=a\ $DEL
T2="a $DEL"
set -- x $(echo $T1|wc -c) $(echo $T2|wc -c); shift
L1=$1; L2=$2
case "$L1/$L2" in
4/4) echo ok;;
*) echo CTLNUL bug: L1=$L1, L2=$L2;;
esac
+3
View File
@@ -26,6 +26,7 @@ shopt -u login_shell
shopt -u mailwarn
shopt -u no_empty_cmd_completion
shopt -u nocaseglob
shopt -u nocasematch
shopt -u nullglob
shopt -s progcomp
shopt -s promptvars
@@ -67,6 +68,7 @@ shopt -u login_shell
shopt -u mailwarn
shopt -u no_empty_cmd_completion
shopt -u nocaseglob
shopt -u nocasematch
shopt -u nullglob
shopt -u restricted_shell
shopt -u shift_verbose
@@ -90,6 +92,7 @@ login_shell off
mailwarn off
no_empty_cmd_completion off
nocaseglob off
nocasematch off
nullglob off
restricted_shell off
shift_verbose off