mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-24 06:17:57 +02:00
commit bash-20110415 snapshot
This commit is contained in:
@@ -11419,3 +11419,87 @@ lib/readline/terminal.c
|
||||
_rl_term_* variables
|
||||
- don't call tputs on DJGPP; there is no good terminfo support
|
||||
DJGPP support from Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
4/6
|
||||
---
|
||||
|
||||
config-top.h
|
||||
- change DEFAULT_PATH_VALUE to something more useful and modern
|
||||
|
||||
4/8
|
||||
---
|
||||
tests/printf2.sub
|
||||
- make sure LC_ALL and LC_CTYPE are set so LANG assignment takes effect.
|
||||
Reported by Cedric Arbogast <arbogast.cedric@gmail.com>
|
||||
|
||||
4/11
|
||||
----
|
||||
include/chartypes.h
|
||||
- fix a couple of dicey defines (though ones that don't cause any
|
||||
compiler warnings) in IN_CTYPE_DOMAIN
|
||||
|
||||
doc/{bashref.texi,bash.1}
|
||||
- add note referring to duplicating file descriptors in sections
|
||||
describing redirecting stdout and stderr and appending to stdout
|
||||
and stderr. Suggested by Matthew Dinger <mdinger.bugzilla@gmail.com>
|
||||
|
||||
pcomplete.c
|
||||
- it_init_helptopics: new function to support completing on help topics,
|
||||
not just builtins
|
||||
- it_helptopics: new programmable completion list of help topics
|
||||
- build list of helptopic completions in gen_action_completions on
|
||||
demand
|
||||
|
||||
pcomplete.h
|
||||
- new extern declaration for it_helptopics
|
||||
|
||||
builtins/complete.def
|
||||
- the `helptopic' action now maps to CA_HELPTOPIC intead of CA_BUILTIN,
|
||||
since there are more help topics than just builtins. Suggested by
|
||||
Clark Wang <dearvoid@gmail.com>
|
||||
|
||||
4/12
|
||||
----
|
||||
print_cmd.c
|
||||
- fix print_arith_for_command to add a call to PRINT_DEFERRED_HEREDOCS
|
||||
before ending the body of the command, so heredocs get attached to
|
||||
the right command instead of to the loop. From gentoo bug 363371
|
||||
http://bugs.gentoo.org/show_bug.cgi?id=363371
|
||||
|
||||
execute_cmd.c
|
||||
- change coproc_pidchk to unset the appropriate shell variables when
|
||||
the (currently single) known coproc pid terminates
|
||||
- cleanup and new functions to fully support multiple coprocesses when
|
||||
and if I decide to go there
|
||||
|
||||
4/13
|
||||
----
|
||||
print_cmd.c
|
||||
- fix print_group_command to add a call to PRINT_DEFERRED_HEREDOCS
|
||||
after call to make_command_string_internal before printing closing
|
||||
`}'
|
||||
- fix make_command_string_internal to add a call to
|
||||
PRINT_DEFERRED_HEREDOCS after recursive call to
|
||||
make_command_string_internal in case cm_subshell before printing
|
||||
closing `)'
|
||||
|
||||
4/14
|
||||
----
|
||||
print_cmd.c
|
||||
- change overlapping strcpy in named_function_string to memmove
|
||||
|
||||
sig.h
|
||||
- UNBLOCK_SIGNAL: convenience define, same as UNBLOCK_CHILD, just
|
||||
restores an old signal mask
|
||||
|
||||
trap.c
|
||||
- set_signal: instead of setting the signal handler to SIG_IGN while
|
||||
installing the new trap handler, block the signal and unblock it
|
||||
after the new handler is installed. Fixes bug reported by Roman
|
||||
Rakus <rrakus@redhat.com>
|
||||
|
||||
4/15
|
||||
----
|
||||
doc/{bash.1,bashref.texi}
|
||||
- make it clear that enabling monitor mode means that all jobs run in
|
||||
separate process groups
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@%:@! /bin/sh
|
||||
@%:@ From configure.in for Bash 4.2, version 4.038.
|
||||
@%:@ From configure.in for Bash 4.2, version 4.039.
|
||||
@%:@ Guess values for system-dependent variables and create Makefiles.
|
||||
@%:@ Generated by GNU Autoconf 2.63 for bash 4.2-maint.
|
||||
@%:@
|
||||
@@ -5033,6 +5033,9 @@ if test "$opt_profiling" = "yes"; then
|
||||
fi
|
||||
|
||||
if test "$opt_static_link" = yes; then
|
||||
enable_static=yes
|
||||
enable_shared=no
|
||||
enable_rpath=no
|
||||
# if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
|
||||
if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then
|
||||
STATIC_LD="-static"
|
||||
|
||||
+11
-11
@@ -15,25 +15,25 @@
|
||||
'configure.in'
|
||||
],
|
||||
{
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'AM_PROG_F77_C_O' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'_AM_COND_IF' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'_AM_COND_IF' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_FC_SRCEXT' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_FC_SRCEXT' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'LT_CONFIG_LTDL_DIR' => 1,
|
||||
'AC_REQUIRE_AUX_FILE' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AC_REQUIRE_AUX_FILE' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
|
||||
'_m4_warn' => 1,
|
||||
@@ -49,13 +49,13 @@
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AC_FC_FREEFORM' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'sinclude' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'_AM_SUBST_NOTMAKE' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'sinclude' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'm4_include' => 1,
|
||||
|
||||
+1330
-1330
File diff suppressed because it is too large
Load Diff
@@ -112,7 +112,7 @@ static const struct _compacts {
|
||||
{ "export", CA_EXPORT, 'e' },
|
||||
{ "file", CA_FILE, 'f' },
|
||||
{ "function", CA_FUNCTION, 0 },
|
||||
{ "helptopic", CA_BUILTIN, 0 }, /* for now */
|
||||
{ "helptopic", CA_HELPTOPIC, 0 },
|
||||
{ "hostname", CA_HOSTNAME, 0 },
|
||||
{ "group", CA_GROUP, 'g' },
|
||||
{ "job", CA_JOB, 'j' },
|
||||
|
||||
+2
-1
@@ -38,7 +38,8 @@ $DEPENDS_ON V9_ECHO
|
||||
$SHORT_DOC echo [-neE] [arg ...]
|
||||
Write arguments to the standard output.
|
||||
|
||||
Display the ARGs on the standard output followed by a newline.
|
||||
Display the ARGs, separated by a single space character and followed by a
|
||||
newline, on the standard output.
|
||||
|
||||
Options:
|
||||
-n do not append a newline
|
||||
|
||||
+5
-5
@@ -22,18 +22,18 @@ $BUILTIN wait
|
||||
$FUNCTION wait_builtin
|
||||
$DEPENDS_ON JOB_CONTROL
|
||||
$PRODUCES wait.c
|
||||
$SHORT_DOC wait [id]
|
||||
$SHORT_DOC wait [id ...]
|
||||
Wait for job completion and return exit status.
|
||||
|
||||
Waits for the process identified by ID, which may be a process ID or a
|
||||
Waits for each process identified by an ID, which may be a process ID or a
|
||||
job specification, and reports its termination status. If ID is not
|
||||
given, waits for all currently active child processes, and the return
|
||||
status is zero. If ID is a a job specification, waits for all processes
|
||||
in the job's pipeline.
|
||||
in that job's pipeline.
|
||||
|
||||
Exit Status:
|
||||
Returns the status of ID; fails if ID is invalid or an invalid option is
|
||||
given.
|
||||
Returns the status of the last ID; fails if ID is invalid or an invalid
|
||||
option is given.
|
||||
$END
|
||||
|
||||
$BUILTIN wait
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@
|
||||
/* The default value of the PATH variable. */
|
||||
#ifndef DEFAULT_PATH_VALUE
|
||||
#define DEFAULT_PATH_VALUE \
|
||||
"/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:."
|
||||
"/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:."
|
||||
#endif
|
||||
|
||||
/* The value for PATH when invoking `command -p'. This is only used when
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# From configure.in for Bash 4.2, version 4.038.
|
||||
# From configure.in for Bash 4.2, version 4.039.
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.63 for bash 4.2-maint.
|
||||
#
|
||||
@@ -5033,6 +5033,9 @@ if test "$opt_profiling" = "yes"; then
|
||||
fi
|
||||
|
||||
if test "$opt_static_link" = yes; then
|
||||
enable_static=yes
|
||||
enable_shared=no
|
||||
enable_rpath=no
|
||||
# if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
|
||||
if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then
|
||||
STATIC_LD="-static"
|
||||
|
||||
+4
-1
@@ -21,7 +21,7 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_REVISION([for Bash 4.2, version 4.038])dnl
|
||||
AC_REVISION([for Bash 4.2, version 4.039])dnl
|
||||
|
||||
define(bashvers, 4.2)
|
||||
define(relstatus, maint)
|
||||
@@ -461,6 +461,9 @@ if test "$opt_profiling" = "yes"; then
|
||||
fi
|
||||
|
||||
if test "$opt_static_link" = yes; then
|
||||
enable_static=yes
|
||||
enable_shared=no
|
||||
enable_rpath=no
|
||||
# if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
|
||||
if test -n "$GCC" || test "$ac_cv_prog_gcc" = "yes"; then
|
||||
STATIC_LD="-static"
|
||||
|
||||
+2046
-2040
File diff suppressed because it is too large
Load Diff
+13
-9
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet@po.cwru.edu
|
||||
.\"
|
||||
.\" Last Change: Thu Mar 24 10:21:02 EDT 2011
|
||||
.\" Last Change: Mon Apr 11 16:56:54 EDT 2011
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2011 March 24" "GNU Bash-4.2"
|
||||
.TH BASH 1 "2011 April 11" "GNU Bash 4.2"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -911,7 +911,7 @@ The format for a coprocess is:
|
||||
.RE
|
||||
.PP
|
||||
This creates a coprocess named \fINAME\fP.
|
||||
If \fINAME\fP is not supplied, the default name is \fICOPROC\fP.
|
||||
If \fINAME\fP is not supplied, the default name is \fBCOPROC\fP.
|
||||
\fINAME\fP must not be supplied if \fIcommand\fP is a \fIsimple
|
||||
command\fP (see above); otherwise, it is interpreted as the first word
|
||||
of the simple command.
|
||||
@@ -2164,8 +2164,8 @@ The default path is system-dependent,
|
||||
and is set by the administrator who installs
|
||||
.BR bash .
|
||||
A common value is
|
||||
.if t \f(CW/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin\fP.
|
||||
.if n ``/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin''.
|
||||
.if t \f(CW/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin\fP.
|
||||
.if n ``/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin''.
|
||||
.TP
|
||||
.B POSIXLY_CORRECT
|
||||
If this variable is in the environment when \fBbash\fP starts, the shell
|
||||
@@ -3529,6 +3529,7 @@ This is semantically equivalent to
|
||||
\fB>\fP\fIword\fP 2\fB>&\fP1
|
||||
.RE
|
||||
.PP
|
||||
(see \fBDuplicating File Descriptors\fP below).
|
||||
.SS Appending Standard Output and Standard Error
|
||||
.PP
|
||||
This construct allows both the
|
||||
@@ -3549,6 +3550,8 @@ This is semantically equivalent to
|
||||
.PP
|
||||
\fB>>\fP\fIword\fP 2\fB>&\fP1
|
||||
.RE
|
||||
.PP
|
||||
(see \fBDuplicating File Descriptors\fP below).
|
||||
.SS Here Documents
|
||||
.PP
|
||||
This type of redirection instructs the shell to read input from the
|
||||
@@ -7331,7 +7334,7 @@ does not specify a valid job.
|
||||
.TP
|
||||
\fBecho\fP [\fB\-neE\fP] [\fIarg\fP ...]
|
||||
Output the \fIarg\fPs, separated by spaces, followed by a newline.
|
||||
The return status is always 0.
|
||||
The return status is 0 unless a write error occurs.
|
||||
If \fB\-n\fP is specified, the trailing newline is
|
||||
suppressed. If the \fB\-e\fP option is given, interpretation of
|
||||
the following backslash-escaped characters is enabled. The
|
||||
@@ -8520,9 +8523,10 @@ by default for interactive shells on systems that support
|
||||
it (see
|
||||
.SM
|
||||
.B JOB CONTROL
|
||||
above). Background processes run in a separate process
|
||||
group and a line containing their exit status is printed
|
||||
upon their completion.
|
||||
above).
|
||||
All processes run in a separate process group.
|
||||
When a background job completes, the shell prints a line
|
||||
containing its exit status.
|
||||
.TP 8
|
||||
.B \-n
|
||||
Read commands but do not execute them. This may be used to
|
||||
|
||||
+16
-10
@@ -3,7 +3,7 @@
|
||||
</HEAD>
|
||||
<BODY><TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2010 December 28<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2011 April 11<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<BR><A HREF="#index">Index</A>
|
||||
@@ -1895,7 +1895,8 @@ The shell function
|
||||
<DT><B>BASH_SUBSHELL</B>
|
||||
|
||||
<DD>
|
||||
Incremented by one each time a subshell or subshell environment is spawned.
|
||||
Incremented by one within each subshell or subshell environment when
|
||||
the shell begins executing in that environment.
|
||||
The initial value is 0.
|
||||
<DT><B>BASH_VERSINFO</B>
|
||||
|
||||
@@ -3022,12 +3023,6 @@ using the syntax <I>name</I>[<I>subscript</I>]=<I>value</I>. The
|
||||
<I>subscript</I>
|
||||
|
||||
is treated as an arithmetic expression that must evaluate to a number.
|
||||
If
|
||||
<I>subscript</I>
|
||||
|
||||
evaluates to a number less than zero, it is used as
|
||||
an offset from one greater than the array's maximum index (so a subcript
|
||||
of -1 refers to the last element of the array).
|
||||
To explicitly declare an indexed array, use
|
||||
<B>declare -a </B><I>name</I>
|
||||
|
||||
@@ -3104,6 +3099,13 @@ ${<I>name</I>[<I>subscript</I>]}. If <I>subscript</I> is <B>*</B> or
|
||||
<B>@</B>, the expansion is the number of elements in the array.
|
||||
Referencing an array variable without a subscript is equivalent to
|
||||
referencing the array with a subscript of 0.
|
||||
If the
|
||||
<I>subscript</I>
|
||||
|
||||
used to reference an element of an indexed array
|
||||
evaluates to a number less than zero, it is used as
|
||||
an offset from one greater than the array's maximum index (so a subcript
|
||||
of -1 refers to the last element of the array).
|
||||
<P>
|
||||
|
||||
An array variable is considered set if a subscript has been assigned a
|
||||
@@ -4524,6 +4526,7 @@ This is semantically equivalent to
|
||||
|
||||
<P>
|
||||
|
||||
(see <B>Duplicating File Descriptors</B> below).
|
||||
<A NAME="lbBN"> </A>
|
||||
<H4>Appending Standard Output and Standard Error</H4>
|
||||
|
||||
@@ -4554,6 +4557,9 @@ This is semantically equivalent to
|
||||
<B>>></B><I>word</I> 2<B>>&</B>1
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
|
||||
(see <B>Duplicating File Descriptors</B> below).
|
||||
<A NAME="lbBO"> </A>
|
||||
<H4>Here Documents</H4>
|
||||
|
||||
@@ -12702,7 +12708,7 @@ There may be only one active coprocess at a time.
|
||||
<HR>
|
||||
<TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash-4.2<TH ALIGN=CENTER width=33%>2010 December 28<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash 4.2<TH ALIGN=CENTER width=33%>2011 April 11<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<HR>
|
||||
@@ -12808,6 +12814,6 @@ There may be only one active coprocess at a time.
|
||||
</DL>
|
||||
<HR>
|
||||
This document was created by man2html from bash.1.<BR>
|
||||
Time: 09 March 2011 17:05:44 EST
|
||||
Time: 11 April 2011 17:01:53 EDT
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
Binary file not shown.
+840
-835
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -122,9 +122,9 @@
|
||||
@xrdef{Executing Commands-snt}{Section@tie 3.7}
|
||||
@xrdef{Simple Command Expansion-title}{Simple Command Expansion}
|
||||
@xrdef{Simple Command Expansion-snt}{Section@tie 3.7.1}
|
||||
@xrdef{Executing Commands-pg}{30}
|
||||
@xrdef{Command Search and Execution-title}{Command Search and Execution}
|
||||
@xrdef{Command Search and Execution-snt}{Section@tie 3.7.2}
|
||||
@xrdef{Executing Commands-pg}{31}
|
||||
@xrdef{Simple Command Expansion-pg}{31}
|
||||
@xrdef{Command Search and Execution-pg}{31}
|
||||
@xrdef{Command Execution Environment-title}{Command Execution Environment}
|
||||
|
||||
Binary file not shown.
+17
-12
@@ -1,6 +1,6 @@
|
||||
<HTML>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<!-- Created on March, 9 2011 by texi2html 1.64 -->
|
||||
<!-- Created on April, 11 2011 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 4.2, 28 December 2010).
|
||||
the Bash shell (version 4.2, 11 April 2011).
|
||||
</P><P>
|
||||
|
||||
This is Edition 4.2, last updated 28 December 2010,
|
||||
This is Edition 4.2, last updated 11 April 2011,
|
||||
of <CITE>The GNU Bash Reference Manual</CITE>,
|
||||
for <CODE>Bash</CODE>, Version 4.2.
|
||||
</P><P>
|
||||
@@ -2069,7 +2069,7 @@ This mechanism is similar to
|
||||
<VAR>filename expansion</VAR> (see section <A HREF="bashref.html#SEC37">3.5.8 Filename Expansion</A>),
|
||||
but the file names generated need not exist.
|
||||
Patterns to be brace expanded take the form of an optional <VAR>preamble</VAR>,
|
||||
followed by either a series of comma-separated strings or a seqeunce expression
|
||||
followed by either a series of comma-separated strings or a sequence expression
|
||||
between a pair of braces,
|
||||
followed by an optional <VAR>postscript</VAR>.
|
||||
The preamble is prefixed to each string contained within the braces, and
|
||||
@@ -3101,7 +3101,8 @@ standard error:
|
||||
</pre></td></tr></table>Of the two forms, the first is preferred.
|
||||
This is semantically equivalent to
|
||||
<TABLE><tr><td> </td><td class=example><pre>><VAR>word</VAR> 2>&1
|
||||
</pre></td></tr></table></P><P>
|
||||
</pre></td></tr></table>(see Duplicating File Descriptors below).
|
||||
</P><P>
|
||||
|
||||
<HR SIZE="6">
|
||||
<A NAME="SEC45"></A>
|
||||
@@ -3129,7 +3130,8 @@ The format for appending standard output and standard error is:
|
||||
<TABLE><tr><td> </td><td class=example><pre>&>><VAR>word</VAR>
|
||||
</pre></td></tr></table>This is semantically equivalent to
|
||||
<TABLE><tr><td> </td><td class=example><pre>>><VAR>word</VAR> 2>&1
|
||||
</pre></td></tr></table></P><P>
|
||||
</pre></td></tr></table>(see Duplicating File Descriptors below).
|
||||
</P><P>
|
||||
|
||||
<HR SIZE="6">
|
||||
<A NAME="SEC46"></A>
|
||||
@@ -6383,7 +6385,8 @@ The shell function <CODE>${FUNCNAME[$i]}</CODE> is defined in the file
|
||||
<A NAME="IDX158"></A>
|
||||
<DT><CODE>BASH_SUBSHELL</CODE>
|
||||
<DD><A NAME="IDX159"></A>
|
||||
Incremented by one each time a subshell or subshell environment is spawned.
|
||||
Incremented by one within each subshell or subshell environment when
|
||||
the shell begins executing in that environment.
|
||||
The initial value is 0.
|
||||
<P>
|
||||
|
||||
@@ -8217,9 +8220,6 @@ using the syntax
|
||||
|
||||
The <VAR>subscript</VAR>
|
||||
is treated as an arithmetic expression that must evaluate to a number.
|
||||
If <VAR>subscript</VAR> evaluates to a number less than zero, it is used as
|
||||
an offset from one greater than the array's maximum index (so a subcript
|
||||
of -1 refers to the last element of the array).
|
||||
To explicitly declare an array, use
|
||||
<TABLE><tr><td> </td><td class=example><pre>declare -a <VAR>name</VAR>
|
||||
</pre></td></tr></table>The syntax
|
||||
@@ -8281,6 +8281,11 @@ If <VAR>subscript</VAR> is <SAMP>`@'</SAMP> or
|
||||
<SAMP>`*'</SAMP>, the expansion is the number of elements in the array.
|
||||
Referencing an array variable without a subscript is equivalent to
|
||||
referencing with a subscript of 0.
|
||||
If the <VAR>subscript</VAR>
|
||||
used to reference an element of an indexed array
|
||||
evaluates to a number less than zero, it is used as
|
||||
an offset from one greater than the array's maximum index (so a subcript
|
||||
of -1 refers to the last element of the array).
|
||||
</P><P>
|
||||
|
||||
An array variable is considered set if a subscript has been assigned a
|
||||
@@ -16386,7 +16391,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>March, 9 2011</I>
|
||||
This document was generated by <I>Chet Ramey</I> on <I>April, 11 2011</I>
|
||||
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
||||
"><I>texi2html</I></A>
|
||||
<P></P>
|
||||
@@ -16548,7 +16553,7 @@ the following structure:
|
||||
<BR>
|
||||
<FONT SIZE="-1">
|
||||
This document was generated
|
||||
by <I>Chet Ramey</I> on <I>March, 9 2011</I>
|
||||
by <I>Chet Ramey</I> on <I>April, 11 2011</I>
|
||||
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
|
||||
"><I>texi2html</I></A>
|
||||
|
||||
|
||||
+214
-210
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 4.13 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 4.2, 28 December 2010).
|
||||
the Bash shell (version 4.2, 11 April 2011).
|
||||
|
||||
This is Edition 4.2, last updated 28 December 2010, of `The GNU Bash
|
||||
This is Edition 4.2, last updated 11 April 2011, of `The GNU Bash
|
||||
Reference Manual', for `Bash', Version 4.2.
|
||||
|
||||
Copyright (C) 1988-2011 Free Software Foundation, Inc.
|
||||
@@ -38,9 +38,9 @@ Bash Features
|
||||
*************
|
||||
|
||||
This text is a brief description of the features that are present in
|
||||
the Bash shell (version 4.2, 28 December 2010).
|
||||
the Bash shell (version 4.2, 11 April 2011).
|
||||
|
||||
This is Edition 4.2, last updated 28 December 2010, of `The GNU Bash
|
||||
This is Edition 4.2, last updated 11 April 2011, of `The GNU Bash
|
||||
Reference Manual', for `Bash', Version 4.2.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -1356,7 +1356,7 @@ Brace expansion is a mechanism by which arbitrary strings may be
|
||||
generated. This mechanism is similar to FILENAME EXPANSION (*note
|
||||
Filename Expansion::), but the file names generated need not exist.
|
||||
Patterns to be brace expanded take the form of an optional PREAMBLE,
|
||||
followed by either a series of comma-separated strings or a seqeunce
|
||||
followed by either a series of comma-separated strings or a sequence
|
||||
expression between a pair of braces, followed by an optional POSTSCRIPT.
|
||||
The preamble is prefixed to each string contained within the braces, and
|
||||
the postscript is then appended to each resulting string, expanding left
|
||||
@@ -2022,6 +2022,7 @@ error:
|
||||
Of the two forms, the first is preferred. This is semantically
|
||||
equivalent to
|
||||
>WORD 2>&1
|
||||
(see Duplicating File Descriptors below).
|
||||
|
||||
3.6.5 Appending Standard Output and Standard Error
|
||||
--------------------------------------------------
|
||||
@@ -2034,6 +2035,7 @@ file whose name is the expansion of WORD.
|
||||
&>>WORD
|
||||
This is semantically equivalent to
|
||||
>>WORD 2>&1
|
||||
(see Duplicating File Descriptors below).
|
||||
|
||||
3.6.6 Here Documents
|
||||
--------------------
|
||||
@@ -4330,8 +4332,9 @@ Variables::).
|
||||
`${BASH_SOURCE[$i+1]}'
|
||||
|
||||
`BASH_SUBSHELL'
|
||||
Incremented by one each time a subshell or subshell environment is
|
||||
spawned. The initial value is 0.
|
||||
Incremented by one within each subshell or subshell environment
|
||||
when the shell begins executing in that environment. The initial
|
||||
value is 0.
|
||||
|
||||
`BASH_VERSINFO'
|
||||
A readonly array variable (*note Arrays::) whose members hold
|
||||
@@ -5535,10 +5538,7 @@ assigned to using the syntax
|
||||
name[SUBSCRIPT]=VALUE
|
||||
|
||||
The SUBSCRIPT is treated as an arithmetic expression that must evaluate
|
||||
to a number. If SUBSCRIPT evaluates to a number less than zero, it is
|
||||
used as an offset from one greater than the array's maximum index (so a
|
||||
subcript of -1 refers to the last element of the array). To explicitly
|
||||
declare an array, use
|
||||
to a number. To explicitly declare an array, use
|
||||
declare -a NAME
|
||||
The syntax
|
||||
declare -a NAME[SUBSCRIPT]
|
||||
@@ -5582,7 +5582,11 @@ expansion of the special parameters `@' and `*'.
|
||||
`${#name['SUBSCRIPT`]}' expands to the length of `${name['SUBSCRIPT`]}'.
|
||||
If SUBSCRIPT is `@' or `*', the expansion is the number of elements in
|
||||
the array. Referencing an array variable without a subscript is
|
||||
equivalent to referencing with a subscript of 0.
|
||||
equivalent to referencing with a subscript of 0. If the SUBSCRIPT used
|
||||
to reference an element of an indexed array evaluates to a number less
|
||||
than zero, it is used as an offset from one greater than the array's
|
||||
maximum index (so a subcript of -1 refers to the last element of the
|
||||
array).
|
||||
|
||||
An array variable is considered set if a subscript has been assigned
|
||||
a value. The null string is a valid value.
|
||||
@@ -10053,9 +10057,9 @@ D.3 Parameter and Variable Index
|
||||
* BASH_REMATCH: Bash Variables. (line 86)
|
||||
* BASH_SOURCE: Bash Variables. (line 94)
|
||||
* BASH_SUBSHELL: Bash Variables. (line 101)
|
||||
* BASH_VERSINFO: Bash Variables. (line 105)
|
||||
* BASH_VERSION: Bash Variables. (line 129)
|
||||
* BASH_XTRACEFD: Bash Variables. (line 132)
|
||||
* BASH_VERSINFO: Bash Variables. (line 106)
|
||||
* BASH_VERSION: Bash Variables. (line 130)
|
||||
* BASH_XTRACEFD: Bash Variables. (line 133)
|
||||
* BASHOPTS: Bash Variables. (line 16)
|
||||
* BASHPID: Bash Variables. (line 25)
|
||||
* bell-style: Readline Init File Syntax.
|
||||
@@ -10064,16 +10068,16 @@ D.3 Parameter and Variable Index
|
||||
(line 45)
|
||||
* CDPATH: Bourne Shell Variables.
|
||||
(line 9)
|
||||
* COLUMNS: Bash Variables. (line 143)
|
||||
* COLUMNS: Bash Variables. (line 144)
|
||||
* comment-begin: Readline Init File Syntax.
|
||||
(line 50)
|
||||
* COMP_CWORD: Bash Variables. (line 148)
|
||||
* COMP_KEY: Bash Variables. (line 177)
|
||||
* COMP_LINE: Bash Variables. (line 154)
|
||||
* COMP_POINT: Bash Variables. (line 159)
|
||||
* COMP_TYPE: Bash Variables. (line 167)
|
||||
* COMP_WORDBREAKS: Bash Variables. (line 181)
|
||||
* COMP_WORDS: Bash Variables. (line 187)
|
||||
* COMP_CWORD: Bash Variables. (line 149)
|
||||
* COMP_KEY: Bash Variables. (line 178)
|
||||
* COMP_LINE: Bash Variables. (line 155)
|
||||
* COMP_POINT: Bash Variables. (line 160)
|
||||
* COMP_TYPE: Bash Variables. (line 168)
|
||||
* COMP_WORDBREAKS: Bash Variables. (line 182)
|
||||
* COMP_WORDS: Bash Variables. (line 188)
|
||||
* completion-display-width: Readline Init File Syntax.
|
||||
(line 55)
|
||||
* completion-ignore-case: Readline Init File Syntax.
|
||||
@@ -10084,73 +10088,73 @@ D.3 Parameter and Variable Index
|
||||
(line 73)
|
||||
* completion-query-items: Readline Init File Syntax.
|
||||
(line 80)
|
||||
* COMPREPLY: Bash Variables. (line 195)
|
||||
* COMPREPLY: Bash Variables. (line 196)
|
||||
* convert-meta: Readline Init File Syntax.
|
||||
(line 90)
|
||||
* COPROC: Bash Variables. (line 200)
|
||||
* DIRSTACK: Bash Variables. (line 204)
|
||||
* COPROC: Bash Variables. (line 201)
|
||||
* DIRSTACK: Bash Variables. (line 205)
|
||||
* disable-completion: Readline Init File Syntax.
|
||||
(line 96)
|
||||
* editing-mode: Readline Init File Syntax.
|
||||
(line 101)
|
||||
* EMACS: Bash Variables. (line 214)
|
||||
* EMACS: Bash Variables. (line 215)
|
||||
* enable-keypad: Readline Init File Syntax.
|
||||
(line 112)
|
||||
* ENV: Bash Variables. (line 219)
|
||||
* EUID: Bash Variables. (line 223)
|
||||
* ENV: Bash Variables. (line 220)
|
||||
* EUID: Bash Variables. (line 224)
|
||||
* expand-tilde: Readline Init File Syntax.
|
||||
(line 123)
|
||||
* FCEDIT: Bash Variables. (line 227)
|
||||
* FIGNORE: Bash Variables. (line 231)
|
||||
* FUNCNAME: Bash Variables. (line 237)
|
||||
* FUNCNEST: Bash Variables. (line 255)
|
||||
* GLOBIGNORE: Bash Variables. (line 260)
|
||||
* GROUPS: Bash Variables. (line 266)
|
||||
* histchars: Bash Variables. (line 272)
|
||||
* HISTCMD: Bash Variables. (line 287)
|
||||
* HISTCONTROL: Bash Variables. (line 292)
|
||||
* HISTFILE: Bash Variables. (line 308)
|
||||
* HISTFILESIZE: Bash Variables. (line 312)
|
||||
* HISTIGNORE: Bash Variables. (line 320)
|
||||
* FCEDIT: Bash Variables. (line 228)
|
||||
* FIGNORE: Bash Variables. (line 232)
|
||||
* FUNCNAME: Bash Variables. (line 238)
|
||||
* FUNCNEST: Bash Variables. (line 256)
|
||||
* GLOBIGNORE: Bash Variables. (line 261)
|
||||
* GROUPS: Bash Variables. (line 267)
|
||||
* histchars: Bash Variables. (line 273)
|
||||
* HISTCMD: Bash Variables. (line 288)
|
||||
* HISTCONTROL: Bash Variables. (line 293)
|
||||
* HISTFILE: Bash Variables. (line 309)
|
||||
* HISTFILESIZE: Bash Variables. (line 313)
|
||||
* HISTIGNORE: Bash Variables. (line 321)
|
||||
* history-preserve-point: Readline Init File Syntax.
|
||||
(line 127)
|
||||
* history-size: Readline Init File Syntax.
|
||||
(line 133)
|
||||
* HISTSIZE: Bash Variables. (line 339)
|
||||
* HISTTIMEFORMAT: Bash Variables. (line 343)
|
||||
* HISTSIZE: Bash Variables. (line 340)
|
||||
* HISTTIMEFORMAT: Bash Variables. (line 344)
|
||||
* HOME: Bourne Shell Variables.
|
||||
(line 13)
|
||||
* horizontal-scroll-mode: Readline Init File Syntax.
|
||||
(line 138)
|
||||
* HOSTFILE: Bash Variables. (line 352)
|
||||
* HOSTNAME: Bash Variables. (line 363)
|
||||
* HOSTTYPE: Bash Variables. (line 366)
|
||||
* HOSTFILE: Bash Variables. (line 353)
|
||||
* HOSTNAME: Bash Variables. (line 364)
|
||||
* HOSTTYPE: Bash Variables. (line 367)
|
||||
* IFS: Bourne Shell Variables.
|
||||
(line 18)
|
||||
* IGNOREEOF: Bash Variables. (line 369)
|
||||
* IGNOREEOF: Bash Variables. (line 370)
|
||||
* input-meta: Readline Init File Syntax.
|
||||
(line 145)
|
||||
* INPUTRC: Bash Variables. (line 379)
|
||||
* INPUTRC: Bash Variables. (line 380)
|
||||
* isearch-terminators: Readline Init File Syntax.
|
||||
(line 152)
|
||||
* keymap: Readline Init File Syntax.
|
||||
(line 159)
|
||||
* LANG: Bash Variables. (line 383)
|
||||
* LC_ALL: Bash Variables. (line 387)
|
||||
* LC_COLLATE: Bash Variables. (line 391)
|
||||
* LC_CTYPE: Bash Variables. (line 398)
|
||||
* LANG: Bash Variables. (line 384)
|
||||
* LC_ALL: Bash Variables. (line 388)
|
||||
* LC_COLLATE: Bash Variables. (line 392)
|
||||
* LC_CTYPE: Bash Variables. (line 399)
|
||||
* LC_MESSAGES <1>: Locale Translation. (line 11)
|
||||
* LC_MESSAGES: Bash Variables. (line 403)
|
||||
* LC_NUMERIC: Bash Variables. (line 407)
|
||||
* LINENO: Bash Variables. (line 411)
|
||||
* LINES: Bash Variables. (line 415)
|
||||
* MACHTYPE: Bash Variables. (line 420)
|
||||
* LC_MESSAGES: Bash Variables. (line 404)
|
||||
* LC_NUMERIC: Bash Variables. (line 408)
|
||||
* LINENO: Bash Variables. (line 412)
|
||||
* LINES: Bash Variables. (line 416)
|
||||
* MACHTYPE: Bash Variables. (line 421)
|
||||
* MAIL: Bourne Shell Variables.
|
||||
(line 22)
|
||||
* MAILCHECK: Bash Variables. (line 424)
|
||||
* MAILCHECK: Bash Variables. (line 425)
|
||||
* MAILPATH: Bourne Shell Variables.
|
||||
(line 27)
|
||||
* MAPFILE: Bash Variables. (line 432)
|
||||
* MAPFILE: Bash Variables. (line 433)
|
||||
* mark-modified-lines: Readline Init File Syntax.
|
||||
(line 172)
|
||||
* mark-symlinked-directories: Readline Init File Syntax.
|
||||
@@ -10161,41 +10165,41 @@ D.3 Parameter and Variable Index
|
||||
(line 189)
|
||||
* meta-flag: Readline Init File Syntax.
|
||||
(line 145)
|
||||
* OLDPWD: Bash Variables. (line 436)
|
||||
* OLDPWD: Bash Variables. (line 437)
|
||||
* OPTARG: Bourne Shell Variables.
|
||||
(line 34)
|
||||
* OPTERR: Bash Variables. (line 439)
|
||||
* OPTERR: Bash Variables. (line 440)
|
||||
* OPTIND: Bourne Shell Variables.
|
||||
(line 38)
|
||||
* OSTYPE: Bash Variables. (line 443)
|
||||
* OSTYPE: Bash Variables. (line 444)
|
||||
* output-meta: Readline Init File Syntax.
|
||||
(line 194)
|
||||
* page-completions: Readline Init File Syntax.
|
||||
(line 199)
|
||||
* PATH: Bourne Shell Variables.
|
||||
(line 42)
|
||||
* PIPESTATUS: Bash Variables. (line 446)
|
||||
* POSIXLY_CORRECT: Bash Variables. (line 451)
|
||||
* PPID: Bash Variables. (line 460)
|
||||
* PROMPT_COMMAND: Bash Variables. (line 464)
|
||||
* PROMPT_DIRTRIM: Bash Variables. (line 468)
|
||||
* PIPESTATUS: Bash Variables. (line 447)
|
||||
* POSIXLY_CORRECT: Bash Variables. (line 452)
|
||||
* PPID: Bash Variables. (line 461)
|
||||
* PROMPT_COMMAND: Bash Variables. (line 465)
|
||||
* PROMPT_DIRTRIM: Bash Variables. (line 469)
|
||||
* PS1: Bourne Shell Variables.
|
||||
(line 48)
|
||||
* PS2: Bourne Shell Variables.
|
||||
(line 53)
|
||||
* PS3: Bash Variables. (line 474)
|
||||
* PS4: Bash Variables. (line 479)
|
||||
* PWD: Bash Variables. (line 485)
|
||||
* RANDOM: Bash Variables. (line 488)
|
||||
* READLINE_LINE: Bash Variables. (line 493)
|
||||
* READLINE_POINT: Bash Variables. (line 497)
|
||||
* REPLY: Bash Variables. (line 501)
|
||||
* PS3: Bash Variables. (line 475)
|
||||
* PS4: Bash Variables. (line 480)
|
||||
* PWD: Bash Variables. (line 486)
|
||||
* RANDOM: Bash Variables. (line 489)
|
||||
* READLINE_LINE: Bash Variables. (line 494)
|
||||
* READLINE_POINT: Bash Variables. (line 498)
|
||||
* REPLY: Bash Variables. (line 502)
|
||||
* revert-all-at-newline: Readline Init File Syntax.
|
||||
(line 209)
|
||||
* SECONDS: Bash Variables. (line 504)
|
||||
* SHELL: Bash Variables. (line 510)
|
||||
* SHELLOPTS: Bash Variables. (line 515)
|
||||
* SHLVL: Bash Variables. (line 524)
|
||||
* SECONDS: Bash Variables. (line 505)
|
||||
* SHELL: Bash Variables. (line 511)
|
||||
* SHELLOPTS: Bash Variables. (line 516)
|
||||
* SHLVL: Bash Variables. (line 525)
|
||||
* show-all-if-ambiguous: Readline Init File Syntax.
|
||||
(line 215)
|
||||
* show-all-if-unmodified: Readline Init File Syntax.
|
||||
@@ -10204,10 +10208,10 @@ D.3 Parameter and Variable Index
|
||||
(line 230)
|
||||
* TEXTDOMAIN: Locale Translation. (line 11)
|
||||
* TEXTDOMAINDIR: Locale Translation. (line 11)
|
||||
* TIMEFORMAT: Bash Variables. (line 529)
|
||||
* TMOUT: Bash Variables. (line 567)
|
||||
* TMPDIR: Bash Variables. (line 579)
|
||||
* UID: Bash Variables. (line 583)
|
||||
* TIMEFORMAT: Bash Variables. (line 530)
|
||||
* TMOUT: Bash Variables. (line 568)
|
||||
* TMPDIR: Bash Variables. (line 580)
|
||||
* UID: Bash Variables. (line 584)
|
||||
* visible-stats: Readline Init File Syntax.
|
||||
(line 243)
|
||||
|
||||
@@ -10478,133 +10482,133 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top1346
|
||||
Node: Introduction3185
|
||||
Node: What is Bash?3413
|
||||
Node: What is a shell?4526
|
||||
Node: Definitions7066
|
||||
Node: Basic Shell Features9984
|
||||
Node: Shell Syntax11203
|
||||
Node: Shell Operation12233
|
||||
Node: Quoting13527
|
||||
Node: Escape Character14830
|
||||
Node: Single Quotes15315
|
||||
Node: Double Quotes15663
|
||||
Node: ANSI-C Quoting16788
|
||||
Node: Locale Translation18032
|
||||
Node: Comments18928
|
||||
Node: Shell Commands19546
|
||||
Node: Simple Commands20418
|
||||
Node: Pipelines21049
|
||||
Node: Lists23743
|
||||
Node: Compound Commands25472
|
||||
Node: Looping Constructs26276
|
||||
Node: Conditional Constructs28735
|
||||
Node: Command Grouping36880
|
||||
Node: Coprocesses38359
|
||||
Node: GNU Parallel40024
|
||||
Node: Shell Functions42492
|
||||
Node: Shell Parameters47436
|
||||
Node: Positional Parameters49852
|
||||
Node: Special Parameters50752
|
||||
Node: Shell Expansions53716
|
||||
Node: Brace Expansion55641
|
||||
Node: Tilde Expansion58396
|
||||
Node: Shell Parameter Expansion60747
|
||||
Node: Command Substitution69882
|
||||
Node: Arithmetic Expansion71215
|
||||
Node: Process Substitution72065
|
||||
Node: Word Splitting73115
|
||||
Node: Filename Expansion74738
|
||||
Node: Pattern Matching76877
|
||||
Node: Quote Removal80516
|
||||
Node: Redirections80811
|
||||
Node: Executing Commands89434
|
||||
Node: Simple Command Expansion90104
|
||||
Node: Command Search and Execution92034
|
||||
Node: Command Execution Environment94371
|
||||
Node: Environment97357
|
||||
Node: Exit Status99017
|
||||
Node: Signals100638
|
||||
Node: Shell Scripts102606
|
||||
Node: Shell Builtin Commands105124
|
||||
Node: Bourne Shell Builtins107152
|
||||
Node: Bash Builtins125246
|
||||
Node: Modifying Shell Behavior151455
|
||||
Node: The Set Builtin151800
|
||||
Node: The Shopt Builtin161334
|
||||
Node: Special Builtins173508
|
||||
Node: Shell Variables174487
|
||||
Node: Bourne Shell Variables174927
|
||||
Node: Bash Variables176954
|
||||
Node: Bash Features201863
|
||||
Node: Invoking Bash202746
|
||||
Node: Bash Startup Files208510
|
||||
Node: Interactive Shells213531
|
||||
Node: What is an Interactive Shell?213941
|
||||
Node: Is this Shell Interactive?214590
|
||||
Node: Interactive Shell Behavior215405
|
||||
Node: Bash Conditional Expressions218685
|
||||
Node: Shell Arithmetic222474
|
||||
Node: Aliases225233
|
||||
Node: Arrays227805
|
||||
Node: The Directory Stack231974
|
||||
Node: Directory Stack Builtins232688
|
||||
Node: Printing a Prompt235580
|
||||
Node: The Restricted Shell238332
|
||||
Node: Bash POSIX Mode240164
|
||||
Node: Job Control248825
|
||||
Node: Job Control Basics249285
|
||||
Node: Job Control Builtins254002
|
||||
Node: Job Control Variables258366
|
||||
Node: Command Line Editing259524
|
||||
Node: Introduction and Notation261091
|
||||
Node: Readline Interaction262713
|
||||
Node: Readline Bare Essentials263904
|
||||
Node: Readline Movement Commands265693
|
||||
Node: Readline Killing Commands266658
|
||||
Node: Readline Arguments268578
|
||||
Node: Searching269622
|
||||
Node: Readline Init File271808
|
||||
Node: Readline Init File Syntax272955
|
||||
Node: Conditional Init Constructs288297
|
||||
Node: Sample Init File290830
|
||||
Node: Bindable Readline Commands293947
|
||||
Node: Commands For Moving295154
|
||||
Node: Commands For History296298
|
||||
Node: Commands For Text299733
|
||||
Node: Commands For Killing302406
|
||||
Node: Numeric Arguments304863
|
||||
Node: Commands For Completion306002
|
||||
Node: Keyboard Macros310194
|
||||
Node: Miscellaneous Commands310765
|
||||
Node: Readline vi Mode316571
|
||||
Node: Programmable Completion317478
|
||||
Node: Programmable Completion Builtins324688
|
||||
Node: Using History Interactively333824
|
||||
Node: Bash History Facilities334508
|
||||
Node: Bash History Builtins337422
|
||||
Node: History Interaction341279
|
||||
Node: Event Designators343984
|
||||
Node: Word Designators345206
|
||||
Node: Modifiers346845
|
||||
Node: Installing Bash348249
|
||||
Node: Basic Installation349386
|
||||
Node: Compilers and Options352078
|
||||
Node: Compiling For Multiple Architectures352819
|
||||
Node: Installation Names354483
|
||||
Node: Specifying the System Type355301
|
||||
Node: Sharing Defaults356017
|
||||
Node: Operation Controls356690
|
||||
Node: Optional Features357648
|
||||
Node: Reporting Bugs367216
|
||||
Node: Major Differences From The Bourne Shell368417
|
||||
Node: GNU Free Documentation License385104
|
||||
Node: Indexes410300
|
||||
Node: Builtin Index410754
|
||||
Node: Reserved Word Index417581
|
||||
Node: Variable Index420029
|
||||
Node: Function Index433124
|
||||
Node: Concept Index440133
|
||||
Node: Top1340
|
||||
Node: Introduction3173
|
||||
Node: What is Bash?3401
|
||||
Node: What is a shell?4514
|
||||
Node: Definitions7054
|
||||
Node: Basic Shell Features9972
|
||||
Node: Shell Syntax11191
|
||||
Node: Shell Operation12221
|
||||
Node: Quoting13515
|
||||
Node: Escape Character14818
|
||||
Node: Single Quotes15303
|
||||
Node: Double Quotes15651
|
||||
Node: ANSI-C Quoting16776
|
||||
Node: Locale Translation18020
|
||||
Node: Comments18916
|
||||
Node: Shell Commands19534
|
||||
Node: Simple Commands20406
|
||||
Node: Pipelines21037
|
||||
Node: Lists23731
|
||||
Node: Compound Commands25460
|
||||
Node: Looping Constructs26264
|
||||
Node: Conditional Constructs28723
|
||||
Node: Command Grouping36868
|
||||
Node: Coprocesses38347
|
||||
Node: GNU Parallel40012
|
||||
Node: Shell Functions42480
|
||||
Node: Shell Parameters47424
|
||||
Node: Positional Parameters49840
|
||||
Node: Special Parameters50740
|
||||
Node: Shell Expansions53704
|
||||
Node: Brace Expansion55629
|
||||
Node: Tilde Expansion58384
|
||||
Node: Shell Parameter Expansion60735
|
||||
Node: Command Substitution69870
|
||||
Node: Arithmetic Expansion71203
|
||||
Node: Process Substitution72053
|
||||
Node: Word Splitting73103
|
||||
Node: Filename Expansion74726
|
||||
Node: Pattern Matching76865
|
||||
Node: Quote Removal80504
|
||||
Node: Redirections80799
|
||||
Node: Executing Commands89512
|
||||
Node: Simple Command Expansion90182
|
||||
Node: Command Search and Execution92112
|
||||
Node: Command Execution Environment94449
|
||||
Node: Environment97435
|
||||
Node: Exit Status99095
|
||||
Node: Signals100716
|
||||
Node: Shell Scripts102684
|
||||
Node: Shell Builtin Commands105202
|
||||
Node: Bourne Shell Builtins107230
|
||||
Node: Bash Builtins125324
|
||||
Node: Modifying Shell Behavior151533
|
||||
Node: The Set Builtin151878
|
||||
Node: The Shopt Builtin161412
|
||||
Node: Special Builtins173586
|
||||
Node: Shell Variables174565
|
||||
Node: Bourne Shell Variables175005
|
||||
Node: Bash Variables177032
|
||||
Node: Bash Features201987
|
||||
Node: Invoking Bash202870
|
||||
Node: Bash Startup Files208634
|
||||
Node: Interactive Shells213655
|
||||
Node: What is an Interactive Shell?214065
|
||||
Node: Is this Shell Interactive?214714
|
||||
Node: Interactive Shell Behavior215529
|
||||
Node: Bash Conditional Expressions218809
|
||||
Node: Shell Arithmetic222598
|
||||
Node: Aliases225357
|
||||
Node: Arrays227929
|
||||
Node: The Directory Stack232151
|
||||
Node: Directory Stack Builtins232865
|
||||
Node: Printing a Prompt235757
|
||||
Node: The Restricted Shell238509
|
||||
Node: Bash POSIX Mode240341
|
||||
Node: Job Control249002
|
||||
Node: Job Control Basics249462
|
||||
Node: Job Control Builtins254179
|
||||
Node: Job Control Variables258543
|
||||
Node: Command Line Editing259701
|
||||
Node: Introduction and Notation261268
|
||||
Node: Readline Interaction262890
|
||||
Node: Readline Bare Essentials264081
|
||||
Node: Readline Movement Commands265870
|
||||
Node: Readline Killing Commands266835
|
||||
Node: Readline Arguments268755
|
||||
Node: Searching269799
|
||||
Node: Readline Init File271985
|
||||
Node: Readline Init File Syntax273132
|
||||
Node: Conditional Init Constructs288474
|
||||
Node: Sample Init File291007
|
||||
Node: Bindable Readline Commands294124
|
||||
Node: Commands For Moving295331
|
||||
Node: Commands For History296475
|
||||
Node: Commands For Text299910
|
||||
Node: Commands For Killing302583
|
||||
Node: Numeric Arguments305040
|
||||
Node: Commands For Completion306179
|
||||
Node: Keyboard Macros310371
|
||||
Node: Miscellaneous Commands310942
|
||||
Node: Readline vi Mode316748
|
||||
Node: Programmable Completion317655
|
||||
Node: Programmable Completion Builtins324865
|
||||
Node: Using History Interactively334001
|
||||
Node: Bash History Facilities334685
|
||||
Node: Bash History Builtins337599
|
||||
Node: History Interaction341456
|
||||
Node: Event Designators344161
|
||||
Node: Word Designators345383
|
||||
Node: Modifiers347022
|
||||
Node: Installing Bash348426
|
||||
Node: Basic Installation349563
|
||||
Node: Compilers and Options352255
|
||||
Node: Compiling For Multiple Architectures352996
|
||||
Node: Installation Names354660
|
||||
Node: Specifying the System Type355478
|
||||
Node: Sharing Defaults356194
|
||||
Node: Operation Controls356867
|
||||
Node: Optional Features357825
|
||||
Node: Reporting Bugs367393
|
||||
Node: Major Differences From The Bourne Shell368594
|
||||
Node: GNU Free Documentation License385281
|
||||
Node: Indexes410477
|
||||
Node: Builtin Index410931
|
||||
Node: Reserved Word Index417758
|
||||
Node: Variable Index420206
|
||||
Node: Function Index433301
|
||||
Node: Concept Index440310
|
||||
|
||||
End Tag Table
|
||||
|
||||
+11
-11
@@ -1,4 +1,4 @@
|
||||
This is TeX, Version 3.141592 (Web2C 7.5.4) (format=tex 2008.12.11) 9 MAR 2011 17:05
|
||||
This is TeX, Version 3.141592 (Web2C 7.5.4) (format=tex 2008.12.11) 11 APR 2011 17:01
|
||||
**/Users/chet/src/bash/src/doc/bashref.texi
|
||||
(/Users/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
|
||||
Loading texinfo [version 2009-01-18.17]:
|
||||
@@ -232,7 +232,7 @@ arallel -k traceroute[]
|
||||
[15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29]
|
||||
[30] [31] [32] [33] [34] Chapter 4 [35] [36] [37] [38] [39] [40] [41] [42]
|
||||
[43]
|
||||
Underfull \hbox (badness 5231) in paragraph at lines 3419--3432
|
||||
Underfull \hbox (badness 5231) in paragraph at lines 3421--3434
|
||||
@texttt emacs-meta[]@textrm , @texttt emacs-ctlx[]@textrm , @texttt vi[]@textr
|
||||
m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
|
||||
|
||||
@@ -245,7 +245,7 @@ m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
|
||||
.etc.
|
||||
|
||||
[44] [45] [46] [47] [48] [49]
|
||||
Overfull \hbox (172.34125pt too wide) in paragraph at lines 3877--3877
|
||||
Overfull \hbox (172.34125pt too wide) in paragraph at lines 3879--3879
|
||||
[]@texttt read [-ers] [-a @textttsl aname@texttt ] [-d @textttsl de-lim@texttt
|
||||
] [-i @textttsl text@texttt ] [-n @textttsl nchars@texttt ] [-N @textttsl ncha
|
||||
rs@texttt ] [-p @textttsl prompt@texttt ] [-t @textttsl time-
|
||||
@@ -260,7 +260,7 @@ rs@texttt ] [-p @textttsl prompt@texttt ] [-t @textttsl time-
|
||||
|
||||
[50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] Chapter 5 [62]
|
||||
[63] [64] [65] [66] [67] [68] [69] [70] [71] Chapter 6 [72]
|
||||
Overfull \hbox (51.96864pt too wide) in paragraph at lines 5498--5498
|
||||
Overfull \hbox (51.96864pt too wide) in paragraph at lines 5501--5501
|
||||
[]@texttt bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@t
|
||||
exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
|
||||
|
||||
@@ -273,7 +273,7 @@ exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
|
||||
.etc.
|
||||
|
||||
|
||||
Overfull \hbox (76.23077pt too wide) in paragraph at lines 5499--5499
|
||||
Overfull \hbox (76.23077pt too wide) in paragraph at lines 5502--5502
|
||||
[]@texttt bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@texttt
|
||||
] [-O @textttsl shopt_option@texttt ] -c @textttsl string @texttt [@textttsl ar
|
||||
-
|
||||
@@ -287,7 +287,7 @@ Overfull \hbox (76.23077pt too wide) in paragraph at lines 5499--5499
|
||||
.etc.
|
||||
|
||||
|
||||
Overfull \hbox (34.72258pt too wide) in paragraph at lines 5500--5500
|
||||
Overfull \hbox (34.72258pt too wide) in paragraph at lines 5503--5503
|
||||
[]@texttt bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@text
|
||||
tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
|
||||
|
||||
@@ -300,7 +300,7 @@ tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
|
||||
.etc.
|
||||
|
||||
[73] [74]
|
||||
Underfull \hbox (badness 2245) in paragraph at lines 5673--5675
|
||||
Underfull \hbox (badness 2245) in paragraph at lines 5676--5678
|
||||
[]@textrm When a lo-gin shell ex-its, Bash reads and ex-e-cutes com-mands from
|
||||
the file
|
||||
|
||||
@@ -313,7 +313,7 @@ the file
|
||||
.etc.
|
||||
|
||||
[75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88]
|
||||
Underfull \hbox (badness 2521) in paragraph at lines 6844--6847
|
||||
Underfull \hbox (badness 2521) in paragraph at lines 6849--6852
|
||||
@textrm `@texttt --enable-strict-posix-default[]@textrm '[] to @texttt configur
|
||||
e[] @textrm when build-ing (see Sec-tion 10.8
|
||||
|
||||
@@ -382,7 +382,7 @@ Underfull \hbox (badness 2753) in paragraph at lines 1929--1932
|
||||
[121] [122]) (/Users/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
|
||||
[123] [124] [125] [126] [127] [128]) Chapter 10 [129] [130] [131] [132]
|
||||
[133]
|
||||
Underfull \hbox (badness 2772) in paragraph at lines 7445--7449
|
||||
Underfull \hbox (badness 2772) in paragraph at lines 7450--7454
|
||||
[]@textrm Enable sup-port for large files (@texttt http://www.sas.com/standard
|
||||
s/large_
|
||||
|
||||
@@ -402,10 +402,10 @@ s/large_
|
||||
Here is how much of TeX's memory you used:
|
||||
2081 strings out of 97980
|
||||
28558 string characters out of 1221004
|
||||
65622 words of memory out of 1500000
|
||||
65616 words of memory out of 1500000
|
||||
2897 multiletter control sequences out of 10000+50000
|
||||
32127 words of font info for 112 fonts, out of 1200000 for 2000
|
||||
51 hyphenation exceptions out of 8191
|
||||
16i,6n,14p,315b,702s stack positions out of 5000i,500n,6000p,200000b,5000s
|
||||
|
||||
Output written on bashref.dvi (168 pages, 680528 bytes).
|
||||
Output written on bashref.dvi (168 pages, 680756 bytes).
|
||||
|
||||
+307
-303
@@ -11,7 +11,7 @@
|
||||
%DVIPSWebPage: (www.radicaleye.com)
|
||||
%DVIPSCommandLine: dvips -D 600 -t letter -o bashref.ps bashref.dvi
|
||||
%DVIPSParameters: dpi=600
|
||||
%DVIPSSource: TeX output 2011.03.09:1705
|
||||
%DVIPSSource: TeX output 2011.04.11:1701
|
||||
%%BeginProcSet: tex.pro 0 0
|
||||
%!
|
||||
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
|
||||
@@ -4319,26 +4319,25 @@ 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)2428 1589 y(Edition)h(4.2,)g(for)f
|
||||
Fs(Bash)g Ft(V)-8 b(ersion)31 b(4.2.)3145 1697 y(Decem)m(b)s(er)g(2010)
|
||||
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
|
||||
Fs(Bash)g Ft(V)-8 b(ersion)31 b(4.2.)3333 1697 y(April)f(2011)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(4.2,)c(28)f(Decem)m(b)s
|
||||
(er)g(2010\).)150 3133 y(This)f(is)g(Edition)h(4.2,)h(last)g(up)s
|
||||
(dated)d(28)i(Decem)m(b)s(er)h(2010,)h(of)d Fq(The)g(GNU)i(Bash)e
|
||||
(Reference)i(Man)m(ual)p Ft(,)150 3243 y(for)e Fs(Bash)p
|
||||
Ft(,)g(V)-8 b(ersion)31 b(4.2.)150 3377 y(Cop)m(yrigh)m(t)602
|
||||
3374 y(c)577 3377 y Fp(\015)f Ft(1988{2011)35 b(F)-8
|
||||
b(ree)31 b(Soft)m(w)m(are)h(F)-8 b(oundation,)31 b(Inc.)150
|
||||
3512 y(P)m(ermission)h(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
|
||||
(the)h(Bash)f(shell)h(\(v)m(ersion)150 2999 y(4.2,)c(11)f(April)f
|
||||
(2011\).)150 3133 y(This)j(is)h(Edition)f(4.2,)j(last)f(up)s(dated)d
|
||||
(11)j(April)e(2011,)k(of)d Fq(The)f(GNU)h(Bash)g(Reference)g(Man)m(ual)
|
||||
p Ft(,)i(for)150 3243 y Fs(Bash)p Ft(,)29 b(V)-8 b(ersion)31
|
||||
b(4.2.)150 3377 y(Cop)m(yrigh)m(t)602 3374 y(c)577 3377
|
||||
y Fp(\015)f Ft(1988{2011)35 b(F)-8 b(ree)31 b(Soft)m(w)m(are)h(F)-8
|
||||
b(oundation,)31 b(Inc.)150 3512 y(P)m(ermission)h(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
|
||||
@@ -6157,7 +6156,7 @@ Fq(\014lename)g(expansion)f Ft(\(see)i(Section)f(3.5.8)i([Filename)f
|
||||
b(to)g(b)s(e)f(brace)h(expanded)e(tak)m(e)j(the)f(form)f(of)150
|
||||
3705 y(an)29 b(optional)i Fq(pream)m(ble)5 b Ft(,)30
|
||||
b(follo)m(w)m(ed)i(b)m(y)d(either)h(a)g(series)g(of)g(comma-separated)h
|
||||
(strings)e(or)h(a)g(seqeunce)150 3815 y(expression)36
|
||||
(strings)e(or)h(a)g(sequence)150 3815 y(expression)36
|
||||
b(b)s(et)m(w)m(een)g(a)g(pair)g(of)g(braces,)i(follo)m(w)m(ed)f(b)m(y)f
|
||||
(an)g(optional)h Fq(p)s(ostscript)r Ft(.)56 b(The)36
|
||||
b(pream)m(ble)g(is)150 3924 y(pre\014xed)28 b(to)h(eac)m(h)h(string)f
|
||||
@@ -6949,267 +6948,269 @@ y Fj(3.6.3)63 b(App)s(ending)42 b(Redirected)e(Output)150
|
||||
(ending)e(on)i(\014le)g(descriptor)g Fq(n)p Ft(,)g(or)g(the)g(standard)
|
||||
f(output)h(\(\014le)g(descriptor)150 665 y(1\))31 b(if)f
|
||||
Fq(n)g Ft(is)h(not)f(sp)s(eci\014ed.)40 b(If)30 b(the)h(\014le)f(do)s
|
||||
(es)g(not)h(exist)g(it)g(is)f(created.)275 803 y(The)f(general)j
|
||||
(format)e(for)h(app)s(ending)e(output)h(is:)390 940 y
|
||||
Fs([)p Fi(n)11 b Fs(]>>)p Fi(word)150 1143 y Fj(3.6.4)63
|
||||
(es)g(not)h(exist)g(it)g(is)f(created.)275 807 y(The)f(general)j
|
||||
(format)e(for)h(app)s(ending)e(output)h(is:)390 948 y
|
||||
Fs([)p Fi(n)11 b Fs(]>>)p Fi(word)150 1155 y Fj(3.6.4)63
|
||||
b(Redirecting)40 b(Standard)h(Output)g(and)g(Standard)g(Error)150
|
||||
1290 y Ft(This)33 b(construct)i(allo)m(ws)g(b)s(oth)f(the)g(standard)g
|
||||
1302 y Ft(This)33 b(construct)i(allo)m(ws)g(b)s(oth)f(the)g(standard)g
|
||||
(output)f(\(\014le)i(descriptor)f(1\))h(and)f(the)g(standard)f(error)
|
||||
150 1399 y(output)d(\(\014le)h(descriptor)f(2\))h(to)g(b)s(e)f
|
||||
150 1411 y(output)d(\(\014le)h(descriptor)f(2\))h(to)g(b)s(e)f
|
||||
(redirected)h(to)g(the)f(\014le)h(whose)f(name)h(is)f(the)g(expansion)h
|
||||
(of)f Fq(w)m(ord)t Ft(.)275 1537 y(There)f(are)i(t)m(w)m(o)h(formats)e
|
||||
(of)f Fq(w)m(ord)t Ft(.)275 1553 y(There)f(are)i(t)m(w)m(o)h(formats)e
|
||||
(for)h(redirecting)g(standard)e(output)h(and)g(standard)f(error:)390
|
||||
1675 y Fs(&>)p Fi(word)150 1812 y Ft(and)390 1950 y Fs(>&)p
|
||||
Fi(word)150 2087 y Ft(Of)h(the)g(t)m(w)m(o)i(forms,)e(the)h(\014rst)e
|
||||
1695 y Fs(&>)p Fi(word)150 1837 y Ft(and)390 1978 y Fs(>&)p
|
||||
Fi(word)150 2120 y Ft(Of)h(the)g(t)m(w)m(o)i(forms,)e(the)h(\014rst)e
|
||||
(is)i(preferred.)39 b(This)30 b(is)g(seman)m(tically)j(equiv)-5
|
||||
b(alen)m(t)32 b(to)390 2225 y Fs(>)p Fi(word)57 b Fs(2>&1)150
|
||||
2427 y Fj(3.6.5)63 b(App)s(ending)42 b(Standard)f(Output)g(and)g
|
||||
(Standard)g(Error)150 2574 y Ft(This)33 b(construct)i(allo)m(ws)g(b)s
|
||||
b(alen)m(t)32 b(to)390 2262 y Fs(>)p Fi(word)57 b Fs(2>&1)275
|
||||
2403 y Ft(\(see)31 b(Duplicating)h(File)f(Descriptors)g(b)s(elo)m(w\).)
|
||||
150 2610 y Fj(3.6.5)63 b(App)s(ending)42 b(Standard)f(Output)g(and)g
|
||||
(Standard)g(Error)150 2757 y Ft(This)33 b(construct)i(allo)m(ws)g(b)s
|
||||
(oth)f(the)g(standard)g(output)f(\(\014le)i(descriptor)f(1\))h(and)f
|
||||
(the)g(standard)f(error)150 2684 y(output)d(\(\014le)h(descriptor)f
|
||||
(the)g(standard)f(error)150 2867 y(output)d(\(\014le)h(descriptor)f
|
||||
(2\))h(to)g(b)s(e)f(app)s(ended)f(to)i(the)f(\014le)h(whose)f(name)g
|
||||
(is)h(the)f(expansion)h(of)f Fq(w)m(ord)t Ft(.)275 2822
|
||||
(is)h(the)f(expansion)h(of)f Fq(w)m(ord)t Ft(.)275 3008
|
||||
y(The)f(format)i(for)f(app)s(ending)f(standard)h(output)g(and)f
|
||||
(standard)h(error)g(is:)390 2959 y Fs(&>>)p Fi(word)150
|
||||
3097 y Ft(This)g(is)g(seman)m(tically)j(equiv)-5 b(alen)m(t)32
|
||||
b(to)390 3235 y Fs(>>)p Fi(word)57 b Fs(2>&1)150 3437
|
||||
y Fj(3.6.6)63 b(Here)41 b(Do)s(cumen)m(ts)150 3584 y
|
||||
Ft(This)c(t)m(yp)s(e)h(of)f(redirection)i(instructs)e(the)h(shell)f(to)
|
||||
i(read)e(input)g(from)g(the)h(curren)m(t)f(source)h(un)m(til)g(a)150
|
||||
3694 y(line)31 b(con)m(taining)g(only)g Fq(w)m(ord)i
|
||||
(standard)h(error)g(is:)390 3150 y Fs(&>>)p Fi(word)150
|
||||
3292 y Ft(This)g(is)g(seman)m(tically)j(equiv)-5 b(alen)m(t)32
|
||||
b(to)390 3433 y Fs(>>)p Fi(word)57 b Fs(2>&1)275 3575
|
||||
y Ft(\(see)31 b(Duplicating)h(File)f(Descriptors)g(b)s(elo)m(w\).)150
|
||||
3782 y Fj(3.6.6)63 b(Here)41 b(Do)s(cumen)m(ts)150 3929
|
||||
y Ft(This)c(t)m(yp)s(e)h(of)f(redirection)i(instructs)e(the)h(shell)f
|
||||
(to)i(read)e(input)g(from)g(the)h(curren)m(t)f(source)h(un)m(til)g(a)
|
||||
150 4038 y(line)31 b(con)m(taining)g(only)g Fq(w)m(ord)i
|
||||
Ft(\(with)d(no)h(trailing)g(blanks\))f(is)g(seen.)41
|
||||
b(All)31 b(of)f(the)h(lines)f(read)g(up)f(to)i(that)150
|
||||
3803 y(p)s(oin)m(t)f(are)h(then)f(used)g(as)g(the)h(standard)f(input)f
|
||||
(for)h(a)h(command.)275 3941 y(The)e(format)i(of)g(here-do)s(cumen)m
|
||||
(ts)f(is:)390 4078 y Fs(<<[)p Fp(\000)p Fs(])p Fi(word)772
|
||||
4188 y(here-document)390 4298 y(delimiter)275 4435 y
|
||||
4148 y(p)s(oin)m(t)f(are)h(then)f(used)g(as)g(the)h(standard)f(input)f
|
||||
(for)h(a)h(command.)275 4289 y(The)e(format)i(of)g(here-do)s(cumen)m
|
||||
(ts)f(is:)390 4431 y Fs(<<[)p Fp(\000)p Fs(])p Fi(word)772
|
||||
4541 y(here-document)390 4650 y(delimiter)275 4792 y
|
||||
Ft(No)j(parameter)h(expansion,)g(command)f(substitution,)h(arithmetic)h
|
||||
(expansion,)f(or)f(\014lename)g(ex-)150 4545 y(pansion)h(is)h(p)s
|
||||
(expansion,)f(or)f(\014lename)g(ex-)150 4902 y(pansion)h(is)h(p)s
|
||||
(erformed)f(on)g Fq(w)m(ord)t Ft(.)54 b(If)34 b(an)m(y)h(c)m(haracters)
|
||||
i(in)d Fq(w)m(ord)k Ft(are)d(quoted,)i(the)e Fq(delimiter)42
|
||||
b Ft(is)35 b(the)150 4654 y(result)40 b(of)g(quote)h(remo)m(v)-5
|
||||
b Ft(is)35 b(the)150 5011 y(result)40 b(of)g(quote)h(remo)m(v)-5
|
||||
b(al)42 b(on)e Fq(w)m(ord)t Ft(,)i(and)d(the)i(lines)f(in)g(the)g
|
||||
(here-do)s(cumen)m(t)h(are)f(not)g(expanded.)150 4764
|
||||
(here-do)s(cumen)m(t)h(are)f(not)g(expanded.)150 5121
|
||||
y(If)32 b Fq(w)m(ord)k Ft(is)d(unquoted,)f(all)i(lines)f(of)f(the)h
|
||||
(here-do)s(cumen)m(t)g(are)g(sub)5 b(jected)32 b(to)i(parameter)f
|
||||
(expansion,)150 4874 y(command)25 b(substitution,)g(and)g(arithmetic)h
|
||||
(expansion,)150 5230 y(command)25 b(substitution,)g(and)g(arithmetic)h
|
||||
(expansion.)39 b(In)24 b(the)h(latter)h(case,)h(the)e(c)m(haracter)i
|
||||
(sequence)150 4983 y Fs(\\newline)h Ft(is)j(ignored,)f(and)g(`)p
|
||||
(sequence)150 5340 y Fs(\\newline)h Ft(is)j(ignored,)f(and)g(`)p
|
||||
Fs(\\)p Ft(')h(m)m(ust)f(b)s(e)g(used)f(to)i(quote)g(the)g(c)m
|
||||
(haracters)h(`)p Fs(\\)p Ft(',)e(`)p Fs($)p Ft(',)h(and)f(`)p
|
||||
Fs(`)p Ft('.)275 5121 y(If)21 b(the)i(redirection)g(op)s(erator)g(is)f
|
||||
(`)p Fs(<<-)p Ft(',)i(then)e(all)h(leading)g(tab)g(c)m(haracters)h(are)
|
||||
e(stripp)s(ed)f(from)h(input)150 5230 y(lines)33 b(and)e(the)i(line)g
|
||||
(con)m(taining)h Fq(delimiter)7 b Ft(.)47 b(This)31 b(allo)m(ws)j
|
||||
(here-do)s(cumen)m(ts)f(within)e(shell)i(scripts)f(to)150
|
||||
5340 y(b)s(e)e(inden)m(ted)g(in)g(a)h(natural)f(fashion.)p
|
||||
eop end
|
||||
Fs(`)p Ft('.)p eop end
|
||||
%%Page: 30 36
|
||||
TeXDict begin 30 35 bop 150 -116 a Ft(30)2572 b(Bash)31
|
||||
b(Reference)g(Man)m(ual)150 299 y Fj(3.6.7)63 b(Here)41
|
||||
b(Strings)150 446 y Ft(A)30 b(v)-5 b(arian)m(t)32 b(of)e(here)h(do)s
|
||||
(cumen)m(ts,)f(the)g(format)h(is:)390 596 y Fs(<<<)47
|
||||
b Fi(word)275 745 y Ft(The)28 b Fq(w)m(ord)k Ft(is)d(expanded)f(as)h
|
||||
(describ)s(ed)f(ab)s(o)m(v)m(e,)i(with)f(the)g(exception)h(that)f
|
||||
(pathname)g(expansion)150 855 y(is)h(not)h(applied,)f(and)g(supplied)f
|
||||
(as)i(a)g(single)g(string)f(to)h(the)g(command)f(on)g(its)h(standard)e
|
||||
(input.)150 1069 y Fj(3.6.8)63 b(Duplicating)41 b(File)g(Descriptors)
|
||||
150 1216 y Ft(The)30 b(redirection)h(op)s(erator)390
|
||||
1366 y Fs([)p Fi(n)11 b Fs(]<&)p Fi(word)150 1516 y Ft(is)35
|
||||
b(Reference)g(Man)m(ual)275 299 y(If)21 b(the)i(redirection)g(op)s
|
||||
(erator)g(is)f(`)p Fs(<<-)p Ft(',)i(then)e(all)h(leading)g(tab)g(c)m
|
||||
(haracters)h(are)e(stripp)s(ed)f(from)h(input)150 408
|
||||
y(lines)33 b(and)e(the)i(line)g(con)m(taining)h Fq(delimiter)7
|
||||
b Ft(.)47 b(This)31 b(allo)m(ws)j(here-do)s(cumen)m(ts)f(within)e
|
||||
(shell)i(scripts)f(to)150 518 y(b)s(e)e(inden)m(ted)g(in)g(a)h(natural)
|
||||
f(fashion.)150 725 y Fj(3.6.7)63 b(Here)41 b(Strings)150
|
||||
871 y Ft(A)30 b(v)-5 b(arian)m(t)32 b(of)e(here)h(do)s(cumen)m(ts,)f
|
||||
(the)g(format)h(is:)390 1013 y Fs(<<<)47 b Fi(word)275
|
||||
1155 y Ft(The)28 b Fq(w)m(ord)k Ft(is)d(expanded)f(as)h(describ)s(ed)f
|
||||
(ab)s(o)m(v)m(e,)i(with)f(the)g(exception)h(that)f(pathname)g
|
||||
(expansion)150 1264 y(is)h(not)h(applied,)f(and)g(supplied)f(as)i(a)g
|
||||
(single)g(string)f(to)h(the)g(command)f(on)g(its)h(standard)e(input.)
|
||||
150 1471 y Fj(3.6.8)63 b(Duplicating)41 b(File)g(Descriptors)150
|
||||
1618 y Ft(The)30 b(redirection)h(op)s(erator)390 1760
|
||||
y Fs([)p Fi(n)11 b Fs(]<&)p Fi(word)150 1901 y Ft(is)35
|
||||
b(used)e(to)j(duplicate)f(input)f(\014le)g(descriptors.)53
|
||||
b(If)34 b Fq(w)m(ord)k Ft(expands)c(to)h(one)g(or)g(more)g(digits,)h
|
||||
(the)f(\014le)150 1626 y(descriptor)e(denoted)h(b)m(y)g
|
||||
(the)f(\014le)150 2011 y(descriptor)e(denoted)h(b)m(y)g
|
||||
Fq(n)f Ft(is)g(made)h(to)g(b)s(e)f(a)h(cop)m(y)g(of)g(that)g(\014le)g
|
||||
(descriptor.)50 b(If)33 b(the)h(digits)g(in)f Fq(w)m(ord)150
|
||||
1735 y Ft(do)c(not)h(sp)s(ecify)f(a)h(\014le)f(descriptor)g(op)s(en)g
|
||||
2120 y Ft(do)c(not)h(sp)s(ecify)f(a)h(\014le)f(descriptor)g(op)s(en)g
|
||||
(for)g(input,)g(a)h(redirection)g(error)f(o)s(ccurs.)40
|
||||
b(If)29 b Fq(w)m(ord)j Ft(ev)-5 b(aluates)150 1845 y(to)31
|
||||
b(If)29 b Fq(w)m(ord)j Ft(ev)-5 b(aluates)150 2230 y(to)31
|
||||
b(`)p Fs(-)p Ft(',)g(\014le)g(descriptor)g Fq(n)f Ft(is)g(closed.)43
|
||||
b(If)30 b Fq(n)g Ft(is)g(not)h(sp)s(eci\014ed,)f(the)h(standard)f
|
||||
(input)g(\(\014le)h(descriptor)f(0\))150 1954 y(is)g(used.)275
|
||||
2104 y(The)f(op)s(erator)390 2254 y Fs([)p Fi(n)11 b
|
||||
Fs(]>&)p Fi(word)150 2404 y Ft(is)40 b(used)g(similarly)h(to)g
|
||||
(input)g(\(\014le)h(descriptor)f(0\))150 2340 y(is)g(used.)275
|
||||
2481 y(The)f(op)s(erator)390 2623 y Fs([)p Fi(n)11 b
|
||||
Fs(]>&)p Fi(word)150 2765 y Ft(is)40 b(used)g(similarly)h(to)g
|
||||
(duplicate)f(output)g(\014le)h(descriptors.)70 b(If)40
|
||||
b Fq(n)f Ft(is)i(not)f(sp)s(eci\014ed,)i(the)f(standard)150
|
||||
2513 y(output)30 b(\(\014le)g(descriptor)g(1\))h(is)f(used.)39
|
||||
2874 y(output)30 b(\(\014le)g(descriptor)g(1\))h(is)f(used.)39
|
||||
b(If)30 b(the)g(digits)h(in)e Fq(w)m(ord)34 b Ft(do)29
|
||||
b(not)i(sp)s(ecify)e(a)i(\014le)f(descriptor)g(op)s(en)150
|
||||
2623 y(for)38 b(output,)i(a)e(redirection)h(error)f(o)s(ccurs.)63
|
||||
2984 y(for)38 b(output,)i(a)e(redirection)h(error)f(o)s(ccurs.)63
|
||||
b(As)38 b(a)h(sp)s(ecial)f(case,)k(if)c Fq(n)f Ft(is)h(omitted,)k(and)
|
||||
37 b Fq(w)m(ord)k Ft(do)s(es)150 2732 y(not)28 b(expand)f(to)i(one)f
|
||||
37 b Fq(w)m(ord)k Ft(do)s(es)150 3093 y(not)28 b(expand)f(to)i(one)f
|
||||
(or)f(more)h(digits,)i(the)e(standard)e(output)i(and)f(standard)g
|
||||
(error)g(are)i(redirected)f(as)150 2842 y(describ)s(ed)h(previously)-8
|
||||
b(.)150 3057 y Fj(3.6.9)63 b(Mo)m(ving)41 b(File)h(Descriptors)150
|
||||
3203 y Ft(The)30 b(redirection)h(op)s(erator)390 3353
|
||||
y Fs([)p Fi(n)11 b Fs(]<&)p Fi(digit)g Fs(-)150 3503
|
||||
(error)g(are)i(redirected)f(as)150 3203 y(describ)s(ed)h(previously)-8
|
||||
b(.)150 3409 y Fj(3.6.9)63 b(Mo)m(ving)41 b(File)h(Descriptors)150
|
||||
3556 y Ft(The)30 b(redirection)h(op)s(erator)390 3698
|
||||
y Fs([)p Fi(n)11 b Fs(]<&)p Fi(digit)g Fs(-)150 3840
|
||||
y Ft(mo)m(v)m(es)33 b(the)f(\014le)g(descriptor)f Fq(digit)k
|
||||
Ft(to)d(\014le)g(descriptor)g Fq(n)p Ft(,)f(or)h(the)g(standard)f
|
||||
(input)f(\(\014le)j(descriptor)e(0\))150 3613 y(if)f
|
||||
(input)f(\(\014le)j(descriptor)e(0\))150 3949 y(if)f
|
||||
Fq(n)g Ft(is)h(not)f(sp)s(eci\014ed.)40 b Fq(digit)33
|
||||
b Ft(is)e(closed)g(after)g(b)s(eing)f(duplicated)g(to)h
|
||||
Fq(n)p Ft(.)275 3762 y(Similarly)-8 b(,)31 b(the)f(redirection)h(op)s
|
||||
(erator)390 3912 y Fs([)p Fi(n)11 b Fs(]>&)p Fi(digit)g
|
||||
Fs(-)150 4062 y Ft(mo)m(v)m(es)29 b(the)g(\014le)f(descriptor)f
|
||||
Fq(n)p Ft(.)275 4091 y(Similarly)-8 b(,)31 b(the)f(redirection)h(op)s
|
||||
(erator)390 4233 y Fs([)p Fi(n)11 b Fs(]>&)p Fi(digit)g
|
||||
Fs(-)150 4374 y Ft(mo)m(v)m(es)29 b(the)g(\014le)f(descriptor)f
|
||||
Fq(digit)k Ft(to)e(\014le)f(descriptor)g Fq(n)p Ft(,)g(or)g(the)g
|
||||
(standard)f(output)h(\(\014le)g(descriptor)g(1\))150
|
||||
4172 y(if)i Fq(n)g Ft(is)h(not)f(sp)s(eci\014ed.)150
|
||||
4386 y Fj(3.6.10)63 b(Op)s(ening)42 b(File)g(Descriptors)g(for)g
|
||||
(Reading)e(and)h(W)-10 b(riting)150 4533 y Ft(The)30
|
||||
b(redirection)h(op)s(erator)390 4683 y Fs([)p Fi(n)11
|
||||
b Fs(]<>)p Fi(word)150 4833 y Ft(causes)39 b(the)g(\014le)g(whose)g
|
||||
4484 y(if)i Fq(n)g Ft(is)h(not)f(sp)s(eci\014ed.)150
|
||||
4690 y Fj(3.6.10)63 b(Op)s(ening)42 b(File)g(Descriptors)g(for)g
|
||||
(Reading)e(and)h(W)-10 b(riting)150 4837 y Ft(The)30
|
||||
b(redirection)h(op)s(erator)390 4979 y Fs([)p Fi(n)11
|
||||
b Fs(]<>)p Fi(word)150 5121 y Ft(causes)39 b(the)g(\014le)g(whose)g
|
||||
(name)g(is)g(the)g(expansion)g(of)g Fq(w)m(ord)j Ft(to)d(b)s(e)g(op)s
|
||||
(ened)f(for)g(b)s(oth)h(reading)g(and)150 4942 y(writing)33
|
||||
(ened)f(for)g(b)s(oth)h(reading)g(and)150 5230 y(writing)33
|
||||
b(on)f(\014le)h(descriptor)f Fq(n)p Ft(,)h(or)g(on)f(\014le)h
|
||||
(descriptor)g(0)g(if)f Fq(n)g Ft(is)h(not)g(sp)s(eci\014ed.)47
|
||||
b(If)32 b(the)h(\014le)f(do)s(es)h(not)150 5052 y(exist,)e(it)g(is)g
|
||||
(created.)150 5307 y Fr(3.7)68 b(Executing)46 b(Commands)p
|
||||
eop end
|
||||
b(If)32 b(the)h(\014le)f(do)s(es)h(not)150 5340 y(exist,)e(it)g(is)g
|
||||
(created.)p eop end
|
||||
%%Page: 31 37
|
||||
TeXDict begin 31 36 bop 150 -116 a Ft(Chapter)30 b(3:)41
|
||||
b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(31)150 299
|
||||
y Fj(3.7.1)63 b(Simple)41 b(Command)h(Expansion)150 446
|
||||
y Ft(When)33 b(a)g(simple)g(command)g(is)g(executed,)h(the)g(shell)f(p)
|
||||
s(erforms)e(the)i(follo)m(wing)i(expansions,)e(assign-)150
|
||||
555 y(men)m(ts,)e(and)f(redirections,)h(from)f(left)h(to)g(righ)m(t.)
|
||||
199 702 y(1.)61 b(The)38 b(w)m(ords)f(that)i(the)g(parser)e(has)h(mark)
|
||||
m(ed)g(as)h(v)-5 b(ariable)39 b(assignmen)m(ts)g(\(those)g(preceding)f
|
||||
(the)330 812 y(command)30 b(name\))h(and)f(redirections)h(are)f(sa)m(v)
|
||||
m(ed)i(for)e(later)h(pro)s(cessing.)199 952 y(2.)61 b(The)39
|
||||
y Fr(3.7)68 b(Executing)46 b(Commands)150 523 y Fj(3.7.1)63
|
||||
b(Simple)41 b(Command)h(Expansion)150 670 y Ft(When)33
|
||||
b(a)g(simple)g(command)g(is)g(executed,)h(the)g(shell)f(p)s(erforms)e
|
||||
(the)i(follo)m(wing)i(expansions,)e(assign-)150 779 y(men)m(ts,)e(and)f
|
||||
(redirections,)h(from)f(left)h(to)g(righ)m(t.)199 913
|
||||
y(1.)61 b(The)38 b(w)m(ords)f(that)i(the)g(parser)e(has)h(mark)m(ed)g
|
||||
(as)h(v)-5 b(ariable)39 b(assignmen)m(ts)g(\(those)g(preceding)f(the)
|
||||
330 1023 y(command)30 b(name\))h(and)f(redirections)h(are)f(sa)m(v)m
|
||||
(ed)i(for)e(later)h(pro)s(cessing.)199 1157 y(2.)61 b(The)39
|
||||
b(w)m(ords)g(that)i(are)f(not)g(v)-5 b(ariable)40 b(assignmen)m(ts)h
|
||||
(or)e(redirections)i(are)f(expanded)f(\(see)h(Sec-)330
|
||||
1062 y(tion)d(3.5)i([Shell)e(Expansions],)h(page)g(19\).)61
|
||||
1267 y(tion)d(3.5)i([Shell)e(Expansions],)h(page)g(19\).)61
|
||||
b(If)37 b(an)m(y)g(w)m(ords)f(remain)h(after)h(expansion,)h(the)e
|
||||
(\014rst)330 1171 y(w)m(ord)31 b(is)g(tak)m(en)h(to)g(b)s(e)f(the)g
|
||||
(\014rst)330 1376 y(w)m(ord)31 b(is)g(tak)m(en)h(to)g(b)s(e)f(the)g
|
||||
(name)h(of)f(the)h(command)f(and)f(the)i(remaining)f(w)m(ords)g(are)g
|
||||
(the)h(argu-)330 1281 y(men)m(ts.)199 1422 y(3.)61 b(Redirections)25
|
||||
(the)h(argu-)330 1486 y(men)m(ts.)199 1620 y(3.)61 b(Redirections)25
|
||||
b(are)f(p)s(erformed)f(as)h(describ)s(ed)f(ab)s(o)m(v)m(e)i(\(see)g
|
||||
(Section)g(3.6)g([Redirections],)i(page)d(27\).)199 1562
|
||||
(Section)g(3.6)g([Redirections],)i(page)d(27\).)199 1754
|
||||
y(4.)61 b(The)25 b(text)h(after)f(the)g(`)p Fs(=)p Ft(')h(in)e(eac)m(h)
|
||||
j(v)-5 b(ariable)25 b(assignmen)m(t)h(undergo)s(es)e(tilde)i
|
||||
(expansion,)g(parameter)330 1672 y(expansion,)49 b(command)d
|
||||
(expansion,)g(parameter)330 1864 y(expansion,)49 b(command)d
|
||||
(substitution,)j(arithmetic)d(expansion,)k(and)45 b(quote)h(remo)m(v)-5
|
||||
b(al)46 b(b)s(efore)330 1781 y(b)s(eing)30 b(assigned)h(to)g(the)f(v)-5
|
||||
b(ariable.)275 1959 y(If)32 b(no)i(command)f(name)g(results,)h(the)g(v)
|
||||
b(al)46 b(b)s(efore)330 1973 y(b)s(eing)30 b(assigned)h(to)g(the)f(v)-5
|
||||
b(ariable.)275 2132 y(If)32 b(no)i(command)f(name)g(results,)h(the)g(v)
|
||||
-5 b(ariable)34 b(assignmen)m(ts)g(a\013ect)h(the)f(curren)m(t)f(shell)
|
||||
h(en)m(viron-)150 2069 y(men)m(t.)39 b(Otherwise,)27
|
||||
h(en)m(viron-)150 2242 y(men)m(t.)39 b(Otherwise,)27
|
||||
b(the)e(v)-5 b(ariables)26 b(are)g(added)f(to)h(the)f(en)m(vironmen)m
|
||||
(t)h(of)g(the)f(executed)h(command)g(and)150 2178 y(do)35
|
||||
(t)h(of)g(the)f(executed)h(command)g(and)150 2351 y(do)35
|
||||
b(not)f(a\013ect)j(the)d(curren)m(t)h(shell)g(en)m(vironmen)m(t.)54
|
||||
b(If)34 b(an)m(y)h(of)g(the)f(assignmen)m(ts)i(attempts)f(to)h(assign)
|
||||
150 2288 y(a)j(v)-5 b(alue)39 b(to)g(a)g(readonly)f(v)-5
|
||||
150 2461 y(a)j(v)-5 b(alue)39 b(to)g(a)g(readonly)f(v)-5
|
||||
b(ariable,)42 b(an)c(error)g(o)s(ccurs,)j(and)c(the)i(command)f(exits)h
|
||||
(with)g(a)f(non-zero)150 2397 y(status.)275 2544 y(If)33
|
||||
(with)g(a)f(non-zero)150 2570 y(status.)275 2705 y(If)33
|
||||
b(no)g(command)g(name)h(results,)g(redirections)g(are)g(p)s(erformed,)f
|
||||
(but)g(do)h(not)f(a\013ect)i(the)f(curren)m(t)150 2654
|
||||
(but)g(do)h(not)f(a\013ect)i(the)f(curren)m(t)150 2814
|
||||
y(shell)d(en)m(vironmen)m(t.)41 b(A)30 b(redirection)h(error)f(causes)h
|
||||
(the)g(command)f(to)h(exit)g(with)f(a)h(non-zero)g(status.)275
|
||||
2800 y(If)26 b(there)i(is)f(a)h(command)f(name)h(left)g(after)g
|
||||
2948 y(If)26 b(there)i(is)f(a)h(command)f(name)h(left)g(after)g
|
||||
(expansion,)g(execution)h(pro)s(ceeds)e(as)g(describ)s(ed)f(b)s(elo)m
|
||||
(w.)150 2910 y(Otherwise,)39 b(the)e(command)g(exits.)62
|
||||
(w.)150 3058 y(Otherwise,)39 b(the)e(command)g(exits.)62
|
||||
b(If)37 b(one)g(of)g(the)h(expansions)f(con)m(tained)h(a)g(command)f
|
||||
(substitu-)150 3020 y(tion,)i(the)d(exit)h(status)g(of)f(the)h(command)
|
||||
(substitu-)150 3167 y(tion,)i(the)d(exit)h(status)g(of)f(the)h(command)
|
||||
f(is)h(the)f(exit)h(status)g(of)f(the)h(last)g(command)f(substitution)
|
||||
150 3129 y(p)s(erformed.)55 b(If)35 b(there)g(w)m(ere)h(no)g(command)f
|
||||
150 3277 y(p)s(erformed.)55 b(If)35 b(there)g(w)m(ere)h(no)g(command)f
|
||||
(substitutions,)i(the)e(command)h(exits)g(with)f(a)h(status)g(of)150
|
||||
3239 y(zero.)150 3450 y Fj(3.7.2)63 b(Command)41 b(Searc)m(h)f(and)h
|
||||
(Execution)150 3597 y Ft(After)i(a)h(command)f(has)g(b)s(een)f(split)h
|
||||
3387 y(zero.)150 3585 y Fj(3.7.2)63 b(Command)41 b(Searc)m(h)f(and)h
|
||||
(Execution)150 3732 y Ft(After)i(a)h(command)f(has)g(b)s(een)f(split)h
|
||||
(in)m(to)h(w)m(ords,)j(if)c(it)g(results)g(in)g(a)h(simple)f(command)g
|
||||
(and)f(an)150 3707 y(optional)32 b(list)f(of)f(argumen)m(ts,)h(the)g
|
||||
(follo)m(wing)g(actions)h(are)f(tak)m(en.)199 3853 y(1.)61
|
||||
(and)f(an)150 3842 y(optional)32 b(list)f(of)f(argumen)m(ts,)h(the)g
|
||||
(follo)m(wing)g(actions)h(are)f(tak)m(en.)199 3976 y(1.)61
|
||||
b(If)24 b(the)g(command)g(name)g(con)m(tains)i(no)e(slashes,)i(the)e
|
||||
(shell)h(attempts)g(to)g(lo)s(cate)h(it.)39 b(If)24 b(there)g(exists)
|
||||
330 3963 y(a)h(shell)g(function)f(b)m(y)g(that)h(name,)h(that)f
|
||||
330 4085 y(a)h(shell)g(function)f(b)m(y)g(that)h(name,)h(that)f
|
||||
(function)f(is)h(in)m(v)m(ok)m(ed)h(as)e(describ)s(ed)g(in)g(Section)h
|
||||
(3.3)h([Shell)330 4073 y(F)-8 b(unctions],)31 b(page)h(15.)199
|
||||
4213 y(2.)61 b(If)41 b(the)g(name)h(do)s(es)f(not)g(matc)m(h)i(a)e
|
||||
(3.3)h([Shell)330 4195 y(F)-8 b(unctions],)31 b(page)h(15.)199
|
||||
4329 y(2.)61 b(If)41 b(the)g(name)h(do)s(es)f(not)g(matc)m(h)i(a)e
|
||||
(function,)j(the)e(shell)f(searc)m(hes)i(for)e(it)h(in)f(the)g(list)h
|
||||
(of)g(shell)330 4323 y(builtins.)e(If)30 b(a)h(matc)m(h)g(is)f(found,)g
|
||||
(that)h(builtin)f(is)g(in)m(v)m(ok)m(ed.)199 4463 y(3.)61
|
||||
(of)g(shell)330 4439 y(builtins.)e(If)30 b(a)h(matc)m(h)g(is)f(found,)g
|
||||
(that)h(builtin)f(is)g(in)m(v)m(ok)m(ed.)199 4573 y(3.)61
|
||||
b(If)40 b(the)g(name)h(is)f(neither)h(a)f(shell)h(function)f(nor)g(a)g
|
||||
(builtin,)j(and)d(con)m(tains)h(no)g(slashes,)i(Bash)330
|
||||
4573 y(searc)m(hes)c(eac)m(h)g(elemen)m(t)g(of)g Fs($PATH)d
|
||||
4682 y(searc)m(hes)c(eac)m(h)g(elemen)m(t)g(of)g Fs($PATH)d
|
||||
Ft(for)i(a)g(directory)h(con)m(taining)g(an)f(executable)h(\014le)f(b)m
|
||||
(y)g(that)330 4682 y(name.)56 b(Bash)36 b(uses)f(a)h(hash)e(table)j(to)
|
||||
(y)g(that)330 4792 y(name.)56 b(Bash)36 b(uses)f(a)h(hash)e(table)j(to)
|
||||
f(remem)m(b)s(er)f(the)h(full)f(pathnames)g(of)h(executable)h(\014les)e
|
||||
(to)330 4792 y(a)m(v)m(oid)e(m)m(ultiple)f Fs(PATH)f
|
||||
(to)330 4902 y(a)m(v)m(oid)e(m)m(ultiple)f Fs(PATH)f
|
||||
Ft(searc)m(hes)i(\(see)f(the)g(description)g(of)f Fs(hash)g
|
||||
Ft(in)g(Section)i(4.1)f([Bourne)g(Shell)330 4902 y(Builtins],)37
|
||||
Ft(in)g(Section)i(4.1)f([Bourne)g(Shell)330 5011 y(Builtins],)37
|
||||
b(page)f(37\).)55 b(A)35 b(full)g(searc)m(h)g(of)g(the)g(directories)h
|
||||
(in)f Fs($PATH)e Ft(is)i(p)s(erformed)f(only)h(if)g(the)330
|
||||
5011 y(command)24 b(is)h(not)g(found)e(in)i(the)g(hash)f(table.)39
|
||||
5121 y(command)24 b(is)h(not)g(found)e(in)i(the)g(hash)f(table.)39
|
||||
b(If)25 b(the)f(searc)m(h)i(is)e(unsuccessful,)h(the)g(shell)g(searc)m
|
||||
(hes)330 5121 y(for)e(a)h(de\014ned)e(shell)h(function)h(named)e
|
||||
(hes)330 5230 y(for)e(a)h(de\014ned)e(shell)h(function)h(named)e
|
||||
Fs(command_not_found_handle)p Ft(.)32 b(If)23 b(that)h(function)f
|
||||
(exists,)330 5230 y(it)32 b(is)f(in)m(v)m(ok)m(ed)i(with)e(the)h
|
||||
(exists,)330 5340 y(it)32 b(is)f(in)m(v)m(ok)m(ed)i(with)e(the)h
|
||||
(original)g(command)f(and)g(the)h(original)g(command's)f(argumen)m(ts)h
|
||||
(as)g(its)330 5340 y(argumen)m(ts,)h(and)e(the)i(function's)e(exit)i
|
||||
(status)g(b)s(ecomes)f(the)g(exit)h(status)f(of)h(the)f(shell.)46
|
||||
b(If)31 b(that)p eop end
|
||||
(as)g(its)p eop end
|
||||
%%Page: 32 38
|
||||
TeXDict begin 32 37 bop 150 -116 a Ft(32)2572 b(Bash)31
|
||||
b(Reference)g(Man)m(ual)330 299 y(function)g(is)g(not)g(de\014ned,)f
|
||||
(the)i(shell)f(prin)m(ts)f(an)h(error)g(message)h(and)f(returns)e(an)i
|
||||
(exit)h(status)g(of)330 408 y(127.)199 549 y(4.)61 b(If)33
|
||||
b(the)g(searc)m(h)h(is)g(successful,)g(or)f(if)g(the)h(command)f(name)g
|
||||
(con)m(tains)i(one)f(or)f(more)g(slashes,)i(the)330 658
|
||||
y(shell)g(executes)h(the)f(named)f(program)g(in)h(a)g(separate)h
|
||||
(execution)f(en)m(vironmen)m(t.)55 b(Argumen)m(t)35 b(0)330
|
||||
768 y(is)30 b(set)h(to)h(the)e(name)h(giv)m(en,)g(and)f(the)h
|
||||
b(Reference)g(Man)m(ual)330 299 y(argumen)m(ts,)i(and)e(the)i
|
||||
(function's)e(exit)i(status)g(b)s(ecomes)f(the)g(exit)h(status)f(of)h
|
||||
(the)f(shell.)46 b(If)31 b(that)330 408 y(function)g(is)g(not)g
|
||||
(de\014ned,)f(the)i(shell)f(prin)m(ts)f(an)h(error)g(message)h(and)f
|
||||
(returns)e(an)i(exit)h(status)g(of)330 518 y(127.)199
|
||||
654 y(4.)61 b(If)33 b(the)g(searc)m(h)h(is)g(successful,)g(or)f(if)g
|
||||
(the)h(command)f(name)g(con)m(tains)i(one)f(or)f(more)g(slashes,)i(the)
|
||||
330 763 y(shell)g(executes)h(the)f(named)f(program)g(in)h(a)g(separate)
|
||||
h(execution)f(en)m(vironmen)m(t.)55 b(Argumen)m(t)35
|
||||
b(0)330 873 y(is)30 b(set)h(to)h(the)e(name)h(giv)m(en,)g(and)f(the)h
|
||||
(remaining)f(argumen)m(ts)h(to)g(the)g(command)f(are)h(set)g(to)g(the)
|
||||
330 877 y(argumen)m(ts)g(supplied,)e(if)h(an)m(y)-8 b(.)199
|
||||
1018 y(5.)61 b(If)35 b(this)h(execution)h(fails)f(b)s(ecause)g(the)f
|
||||
330 983 y(argumen)m(ts)g(supplied,)e(if)h(an)m(y)-8 b(.)199
|
||||
1118 y(5.)61 b(If)35 b(this)h(execution)h(fails)f(b)s(ecause)g(the)f
|
||||
(\014le)h(is)g(not)g(in)f(executable)j(format,)f(and)e(the)h(\014le)g
|
||||
(is)g(not)330 1127 y(a)d(directory)-8 b(,)34 b(it)f(is)g(assumed)e(to)j
|
||||
(is)g(not)330 1228 y(a)d(directory)-8 b(,)34 b(it)f(is)g(assumed)e(to)j
|
||||
(b)s(e)d(a)i Fq(shell)g(script)h Ft(and)e(the)h(shell)f(executes)i(it)f
|
||||
(as)g(describ)s(ed)e(in)330 1237 y(Section)g(3.8)h([Shell)e(Scripts],)g
|
||||
(page)i(34.)199 1377 y(6.)61 b(If)38 b(the)h(command)f(w)m(as)h(not)g
|
||||
(as)g(describ)s(ed)e(in)330 1338 y(Section)g(3.8)h([Shell)e(Scripts],)g
|
||||
(page)i(34.)199 1473 y(6.)61 b(If)38 b(the)h(command)f(w)m(as)h(not)g
|
||||
(b)s(egun)e(async)m(hronously)-8 b(,)42 b(the)c(shell)h(w)m(aits)h(for)
|
||||
e(the)h(command)f(to)330 1487 y(complete)32 b(and)e(collects)i(its)f
|
||||
(exit)g(status.)150 1697 y Fj(3.7.3)63 b(Command)41 b(Execution)f(En)m
|
||||
(vironmen)m(t)150 1844 y Ft(The)30 b(shell)g(has)h(an)f
|
||||
e(the)h(command)f(to)330 1583 y(complete)32 b(and)e(collects)i(its)f
|
||||
(exit)g(status.)150 1785 y Fj(3.7.3)63 b(Command)41 b(Execution)f(En)m
|
||||
(vironmen)m(t)150 1932 y Ft(The)30 b(shell)g(has)h(an)f
|
||||
Fq(execution)h(en)m(vironmen)m(t)r Ft(,)h(whic)m(h)e(consists)h(of)f
|
||||
(the)h(follo)m(wing:)225 1990 y Fp(\017)60 b Ft(op)s(en)32
|
||||
(the)h(follo)m(wing:)225 2069 y Fp(\017)60 b Ft(op)s(en)32
|
||||
b(\014les)g(inherited)g(b)m(y)h(the)f(shell)h(at)g(in)m(v)m(o)s
|
||||
(cation,)j(as)c(mo)s(di\014ed)g(b)m(y)g(redirections)h(supplied)e(to)
|
||||
330 2100 y(the)g Fs(exec)e Ft(builtin)225 2240 y Fp(\017)60
|
||||
330 2178 y(the)g Fs(exec)e Ft(builtin)225 2314 y Fp(\017)60
|
||||
b Ft(the)28 b(curren)m(t)g(w)m(orking)h(directory)g(as)f(set)h(b)m(y)f
|
||||
Fs(cd)p Ft(,)g Fs(pushd)p Ft(,)g(or)g Fs(popd)p Ft(,)g(or)g(inherited)g
|
||||
(b)m(y)g(the)h(shell)f(at)330 2349 y(in)m(v)m(o)s(cation)225
|
||||
2489 y Fp(\017)60 b Ft(the)31 b(\014le)f(creation)i(mo)s(de)e(mask)g
|
||||
(b)m(y)g(the)h(shell)f(at)330 2424 y(in)m(v)m(o)s(cation)225
|
||||
2560 y Fp(\017)60 b Ft(the)31 b(\014le)f(creation)i(mo)s(de)e(mask)g
|
||||
(as)h(set)g(b)m(y)f Fs(umask)f Ft(or)h(inherited)g(from)g(the)h
|
||||
(shell's)f(paren)m(t)225 2630 y Fp(\017)60 b Ft(curren)m(t)30
|
||||
b(traps)g(set)h(b)m(y)f Fs(trap)225 2770 y Fp(\017)60
|
||||
(shell's)f(paren)m(t)225 2695 y Fp(\017)60 b Ft(curren)m(t)30
|
||||
b(traps)g(set)h(b)m(y)f Fs(trap)225 2831 y Fp(\017)60
|
||||
b Ft(shell)30 b(parameters)f(that)h(are)g(set)g(b)m(y)g(v)-5
|
||||
b(ariable)30 b(assignmen)m(t)g(or)g(with)f Fs(set)f Ft(or)i(inherited)f
|
||||
(from)g(the)330 2879 y(shell's)i(paren)m(t)f(in)g(the)h(en)m(vironmen)m
|
||||
(t)225 3020 y Fp(\017)60 b Ft(shell)44 b(functions)f(de\014ned)f
|
||||
(from)g(the)330 2941 y(shell's)i(paren)m(t)f(in)g(the)h(en)m(vironmen)m
|
||||
(t)225 3077 y Fp(\017)60 b Ft(shell)44 b(functions)f(de\014ned)f
|
||||
(during)h(execution)i(or)e(inherited)h(from)f(the)h(shell's)g(paren)m
|
||||
(t)f(in)h(the)330 3129 y(en)m(vironmen)m(t)225 3269 y
|
||||
(t)f(in)h(the)330 3186 y(en)m(vironmen)m(t)225 3322 y
|
||||
Fp(\017)60 b Ft(options)33 b(enabled)g(at)h(in)m(v)m(o)s(cation)h
|
||||
(\(either)f(b)m(y)f(default)g(or)g(with)g(command-line)g(argumen)m
|
||||
(ts\))h(or)330 3379 y(b)m(y)c Fs(set)225 3519 y Fp(\017)60
|
||||
(ts\))h(or)330 3432 y(b)m(y)c Fs(set)225 3567 y Fp(\017)60
|
||||
b Ft(options)31 b(enabled)f(b)m(y)g Fs(shopt)f Ft(\(see)j(Section)f
|
||||
(4.3.2)h([The)e(Shopt)g(Builtin],)h(page)g(57\))225 3659
|
||||
(4.3.2)h([The)e(Shopt)g(Builtin],)h(page)g(57\))225 3703
|
||||
y Fp(\017)60 b Ft(shell)31 b(aliases)g(de\014ned)f(with)g
|
||||
Fs(alias)f Ft(\(see)i(Section)g(6.6)h([Aliases],)g(page)f(81\))225
|
||||
3799 y Fp(\017)60 b Ft(v)-5 b(arious)50 b(pro)s(cess)f
|
||||
3839 y Fp(\017)60 b Ft(v)-5 b(arious)50 b(pro)s(cess)f
|
||||
Fl(id)p Ft(s,)55 b(including)49 b(those)i(of)e(bac)m(kground)h(jobs)f
|
||||
(\(see)i(Section)g(3.2.3)g([Lists],)330 3909 y(page)31
|
||||
(\(see)i(Section)g(3.2.3)g([Lists],)330 3948 y(page)31
|
||||
b(9\),)g(the)g(v)-5 b(alue)31 b(of)f Fs($$)p Ft(,)g(and)g(the)h(v)-5
|
||||
b(alue)31 b(of)f Fs($PPID)275 4085 y Ft(When)k(a)g(simple)h(command)f
|
||||
b(alue)31 b(of)f Fs($PPID)275 4112 y Ft(When)k(a)g(simple)h(command)f
|
||||
(other)g(than)g(a)h(builtin)f(or)g(shell)h(function)f(is)g(to)h(b)s(e)f
|
||||
(executed,)i(it)f(is)150 4195 y(in)m(v)m(ok)m(ed)25 b(in)f(a)g
|
||||
(executed,)i(it)f(is)150 4221 y(in)m(v)m(ok)m(ed)25 b(in)f(a)g
|
||||
(separate)h(execution)g(en)m(vironmen)m(t)g(that)f(consists)g(of)h(the)
|
||||
f(follo)m(wing.)40 b(Unless)24 b(otherwise)150 4305 y(noted,)31
|
||||
f(follo)m(wing.)40 b(Unless)24 b(otherwise)150 4331 y(noted,)31
|
||||
b(the)f(v)-5 b(alues)31 b(are)g(inherited)f(from)g(the)g(shell.)225
|
||||
4451 y Fp(\017)60 b Ft(the)31 b(shell's)h(op)s(en)e(\014les,)i(plus)e
|
||||
4468 y Fp(\017)60 b Ft(the)31 b(shell's)h(op)s(en)e(\014les,)i(plus)e
|
||||
(an)m(y)h(mo)s(di\014cations)h(and)e(additions)h(sp)s(eci\014ed)g(b)m
|
||||
(y)g(redirections)g(to)330 4560 y(the)g(command)225 4700
|
||||
(y)g(redirections)g(to)330 4578 y(the)g(command)225 4713
|
||||
y Fp(\017)60 b Ft(the)31 b(curren)m(t)f(w)m(orking)g(directory)225
|
||||
4840 y Fp(\017)60 b Ft(the)31 b(\014le)f(creation)i(mo)s(de)e(mask)225
|
||||
4981 y Fp(\017)60 b Ft(shell)32 b(v)-5 b(ariables)33
|
||||
4849 y Fp(\017)60 b Ft(the)31 b(\014le)f(creation)i(mo)s(de)e(mask)225
|
||||
4985 y Fp(\017)60 b Ft(shell)32 b(v)-5 b(ariables)33
|
||||
b(and)e(functions)h(mark)m(ed)g(for)g(exp)s(ort,)g(along)h(with)f(v)-5
|
||||
b(ariables)32 b(exp)s(orted)g(for)g(the)330 5090 y(command,)e(passed)g
|
||||
b(ariables)32 b(exp)s(orted)g(for)g(the)330 5095 y(command,)e(passed)g
|
||||
(in)g(the)h(en)m(vironmen)m(t)g(\(see)g(Section)g(3.7.4)i([En)m
|
||||
(vironmen)m(t],)e(page)g(33\))225 5230 y Fp(\017)60 b
|
||||
Ft(traps)31 b(caugh)m(t)h(b)m(y)f(the)g(shell)h(are)f(reset)h(to)g(the)
|
||||
@@ -9443,28 +9444,29 @@ Ft(arra)m(y)j(v)-5 b(ariable)30 b(are)f(de\014ned.)38
|
||||
b(The)630 2034 y(shell)26 b(function)g Fs(${FUNCNAME[$i]})c
|
||||
Ft(is)k(de\014ned)f(in)g(the)h(\014le)h Fs(${BASH_SOURCE[$i]})21
|
||||
b Ft(and)630 2144 y(called)32 b(from)d Fs(${BASH_SOURCE[$i+1]})150
|
||||
2299 y(BASH_SUBSHELL)630 2408 y Ft(Incremen)m(ted)34
|
||||
b(b)m(y)h(one)f(eac)m(h)i(time)f(a)f(subshell)g(or)g(subshell)f(en)m
|
||||
(vironmen)m(t)i(is)f(spa)m(wned.)630 2518 y(The)c(initial)h(v)-5
|
||||
b(alue)31 b(is)g(0.)150 2673 y Fs(BASH_VERSINFO)630 2783
|
||||
y Ft(A)36 b(readonly)g(arra)m(y)g(v)-5 b(ariable)37 b(\(see)f(Section)h
|
||||
(6.7)g([Arra)m(ys],)h(page)e(82\))h(whose)f(mem)m(b)s(ers)630
|
||||
2892 y(hold)c(v)m(ersion)h(information)f(for)g(this)g(instance)h(of)g
|
||||
(Bash.)46 b(The)32 b(v)-5 b(alues)32 b(assigned)h(to)g(the)630
|
||||
3002 y(arra)m(y)e(mem)m(b)s(ers)e(are)i(as)g(follo)m(ws:)630
|
||||
3157 y Fs(BASH_VERSINFO[0])1110 3267 y Ft(The)f(ma)5
|
||||
b(jor)30 b(v)m(ersion)h(n)m(um)m(b)s(er)e(\(the)i Fq(release)5
|
||||
b Ft(\).)630 3422 y Fs(BASH_VERSINFO[1])1110 3532 y Ft(The)30
|
||||
b(minor)g(v)m(ersion)h(n)m(um)m(b)s(er)e(\(the)i Fq(v)m(ersion)p
|
||||
Ft(\).)630 3687 y Fs(BASH_VERSINFO[2])1110 3797 y Ft(The)f(patc)m(h)h
|
||||
(lev)m(el.)630 3952 y Fs(BASH_VERSINFO[3])1110 4061 y
|
||||
Ft(The)f(build)f(v)m(ersion.)630 4217 y Fs(BASH_VERSINFO[4])1110
|
||||
4326 y Ft(The)h(release)i(status)e(\(e.g.,)j Fq(b)s(eta1)7
|
||||
b Ft(\).)630 4482 y Fs(BASH_VERSINFO[5])1110 4591 y Ft(The)30
|
||||
b(v)-5 b(alue)31 b(of)f Fs(MACHTYPE)p Ft(.)150 4746 y
|
||||
Fs(BASH_VERSION)630 4856 y Ft(The)g(v)m(ersion)h(n)m(um)m(b)s(er)e(of)h
|
||||
(the)h(curren)m(t)f(instance)h(of)g(Bash.)150 5011 y
|
||||
Fs(BASH_XTRACEFD)630 5121 y Ft(If)f(set)h(to)h(an)e(in)m(teger)i
|
||||
2299 y(BASH_SUBSHELL)630 2408 y Ft(Incremen)m(ted)24
|
||||
b(b)m(y)f(one)h(within)f(eac)m(h)i(subshell)d(or)i(subshell)e(en)m
|
||||
(vironmen)m(t)i(when)f(the)h(shell)630 2518 y(b)s(egins)30
|
||||
b(executing)h(in)f(that)h(en)m(vironmen)m(t.)42 b(The)30
|
||||
b(initial)h(v)-5 b(alue)31 b(is)f(0.)150 2673 y Fs(BASH_VERSINFO)630
|
||||
2783 y Ft(A)36 b(readonly)g(arra)m(y)g(v)-5 b(ariable)37
|
||||
b(\(see)f(Section)h(6.7)g([Arra)m(ys],)h(page)e(82\))h(whose)f(mem)m(b)
|
||||
s(ers)630 2892 y(hold)c(v)m(ersion)h(information)f(for)g(this)g
|
||||
(instance)h(of)g(Bash.)46 b(The)32 b(v)-5 b(alues)32
|
||||
b(assigned)h(to)g(the)630 3002 y(arra)m(y)e(mem)m(b)s(ers)e(are)i(as)g
|
||||
(follo)m(ws:)630 3157 y Fs(BASH_VERSINFO[0])1110 3267
|
||||
y Ft(The)f(ma)5 b(jor)30 b(v)m(ersion)h(n)m(um)m(b)s(er)e(\(the)i
|
||||
Fq(release)5 b Ft(\).)630 3422 y Fs(BASH_VERSINFO[1])1110
|
||||
3532 y Ft(The)30 b(minor)g(v)m(ersion)h(n)m(um)m(b)s(er)e(\(the)i
|
||||
Fq(v)m(ersion)p Ft(\).)630 3687 y Fs(BASH_VERSINFO[2])1110
|
||||
3797 y Ft(The)f(patc)m(h)h(lev)m(el.)630 3952 y Fs(BASH_VERSINFO[3])
|
||||
1110 4061 y Ft(The)f(build)f(v)m(ersion.)630 4217 y Fs
|
||||
(BASH_VERSINFO[4])1110 4326 y Ft(The)h(release)i(status)e(\(e.g.,)j
|
||||
Fq(b)s(eta1)7 b Ft(\).)630 4482 y Fs(BASH_VERSINFO[5])1110
|
||||
4591 y Ft(The)30 b(v)-5 b(alue)31 b(of)f Fs(MACHTYPE)p
|
||||
Ft(.)150 4746 y Fs(BASH_VERSION)630 4856 y Ft(The)g(v)m(ersion)h(n)m
|
||||
(um)m(b)s(er)e(of)h(the)h(curren)m(t)f(instance)h(of)g(Bash.)150
|
||||
5011 y Fs(BASH_XTRACEFD)630 5121 y Ft(If)f(set)h(to)h(an)e(in)m(teger)i
|
||||
(corresp)s(onding)e(to)h(a)g(v)-5 b(alid)31 b(\014le)g(descriptor,)g
|
||||
(Bash)g(will)g(write)g(the)630 5230 y(trace)37 b(output)f(generated)h
|
||||
(when)f(`)p Fs(set)29 b(-x)p Ft(')36 b(is)g(enabled)h(to)g(that)f
|
||||
@@ -10657,169 +10659,171 @@ b(Reference)g(Man)m(ual)275 299 y(Aliases)i(are)h(not)e(expanded)g
|
||||
(when)g(the)h(shell)g(is)g(not)g(in)m(teractiv)m(e,)j(unless)c(the)h
|
||||
Fs(expand_aliases)150 408 y Ft(shell)e(option)f(is)h(set)g(using)f
|
||||
Fs(shopt)f Ft(\(see)i(Section)g(4.3.2)h([The)e(Shopt)g(Builtin],)h
|
||||
(page)g(57\).)275 542 y(The)38 b(rules)h(concerning)h(the)f
|
||||
(page)g(57\).)275 540 y(The)38 b(rules)h(concerning)h(the)f
|
||||
(de\014nition)g(and)g(use)g(of)g(aliases)i(are)e(somewhat)h(confusing.)
|
||||
67 b(Bash)150 651 y(alw)m(a)m(ys)42 b(reads)f(at)h(least)g(one)f
|
||||
67 b(Bash)150 650 y(alw)m(a)m(ys)42 b(reads)f(at)h(least)g(one)f
|
||||
(complete)i(line)e(of)g(input)f(b)s(efore)h(executing)h(an)m(y)f(of)g
|
||||
(the)g(commands)150 761 y(on)h(that)h(line.)77 b(Aliases)44
|
||||
(the)g(commands)150 760 y(on)h(that)h(line.)77 b(Aliases)44
|
||||
b(are)e(expanded)g(when)f(a)i(command)f(is)g(read,)k(not)c(when)g(it)g
|
||||
(is)h(executed.)150 870 y(Therefore,)f(an)e(alias)h(de\014nition)e(app)
|
||||
(is)h(executed.)150 869 y(Therefore,)f(an)e(alias)h(de\014nition)e(app)
|
||||
s(earing)h(on)f(the)h(same)h(line)f(as)g(another)g(command)f(do)s(es)h
|
||||
(not)150 980 y(tak)m(e)31 b(e\013ect)f(un)m(til)g(the)f(next)g(line)h
|
||||
(not)150 979 y(tak)m(e)31 b(e\013ect)f(un)m(til)g(the)f(next)g(line)h
|
||||
(of)f(input)f(is)h(read.)41 b(The)28 b(commands)h(follo)m(wing)i(the)e
|
||||
(alias)h(de\014nition)150 1090 y(on)d(that)h(line)f(are)h(not)f
|
||||
(alias)h(de\014nition)150 1088 y(on)d(that)h(line)f(are)h(not)f
|
||||
(a\013ected)i(b)m(y)e(the)g(new)g(alias.)41 b(This)26
|
||||
b(b)s(eha)m(vior)h(is)g(also)h(an)f(issue)g(when)f(functions)150
|
||||
1199 y(are)d(executed.)39 b(Aliases)24 b(are)f(expanded)f(when)f(a)i
|
||||
1198 y(are)d(executed.)39 b(Aliases)24 b(are)f(expanded)f(when)f(a)i
|
||||
(function)g(de\014nition)f(is)h(read,)h(not)f(when)e(the)i(function)150
|
||||
1309 y(is)i(executed,)j(b)s(ecause)d(a)h(function)f(de\014nition)f(is)i
|
||||
1308 y(is)i(executed,)j(b)s(ecause)d(a)h(function)f(de\014nition)f(is)i
|
||||
(itself)g(a)f(comp)s(ound)f(command.)39 b(As)25 b(a)h(consequence,)150
|
||||
1418 y(aliases)36 b(de\014ned)d(in)h(a)g(function)g(are)h(not)f(a)m(v)
|
||||
1417 y(aliases)36 b(de\014ned)d(in)h(a)g(function)g(are)h(not)f(a)m(v)
|
||||
-5 b(ailable)37 b(un)m(til)d(after)h(that)g(function)f(is)g(executed.)
|
||||
53 b(T)-8 b(o)35 b(b)s(e)150 1528 y(safe,)41 b(alw)m(a)m(ys)f(put)d
|
||||
53 b(T)-8 b(o)35 b(b)s(e)150 1527 y(safe,)41 b(alw)m(a)m(ys)f(put)d
|
||||
(alias)j(de\014nitions)e(on)g(a)h(separate)g(line,)i(and)d(do)g(not)g
|
||||
(use)g Fs(alias)f Ft(in)h(comp)s(ound)150 1638 y(commands.)275
|
||||
1771 y(F)-8 b(or)31 b(almost)g(ev)m(ery)g(purp)s(ose,)e(shell)i
|
||||
(use)g Fs(alias)f Ft(in)h(comp)s(ound)150 1636 y(commands.)275
|
||||
1768 y(F)-8 b(or)31 b(almost)g(ev)m(ery)g(purp)s(ose,)e(shell)i
|
||||
(functions)f(are)g(preferred)g(o)m(v)m(er)h(aliases.)150
|
||||
2001 y Fr(6.7)68 b(Arra)l(ys)150 2160 y Ft(Bash)33 b(pro)m(vides)g
|
||||
1996 y Fr(6.7)68 b(Arra)l(ys)150 2155 y Ft(Bash)33 b(pro)m(vides)g
|
||||
(one-dimensional)g(indexed)f(and)h(asso)s(ciativ)m(e)i(arra)m(y)e(v)-5
|
||||
b(ariables.)49 b(An)m(y)33 b(v)-5 b(ariable)33 b(ma)m(y)150
|
||||
2270 y(b)s(e)e(used)h(as)g(an)g(indexed)f(arra)m(y;)j(the)e
|
||||
2265 y(b)s(e)e(used)h(as)g(an)g(indexed)f(arra)m(y;)j(the)e
|
||||
Fs(declare)e Ft(builtin)h(will)i(explicitly)g(declare)g(an)f(arra)m(y)
|
||||
-8 b(.)46 b(There)32 b(is)150 2379 y(no)h(maxim)m(um)g(limit)h(on)f
|
||||
-8 b(.)46 b(There)32 b(is)150 2374 y(no)h(maxim)m(um)g(limit)h(on)f
|
||||
(the)g(size)h(of)g(an)f(arra)m(y)-8 b(,)35 b(nor)d(an)m(y)i(requiremen)
|
||||
m(t)f(that)h(mem)m(b)s(ers)e(b)s(e)g(indexed)150 2489
|
||||
m(t)f(that)h(mem)m(b)s(ers)e(b)s(e)g(indexed)150 2484
|
||||
y(or)26 b(assigned)h(con)m(tiguously)-8 b(.)41 b(Indexed)25
|
||||
b(arra)m(ys)i(are)f(referenced)g(using)g(in)m(tegers)i(\(including)e
|
||||
(arithmetic)150 2598 y(expressions)38 b(\(see)h(Section)g(6.5)h([Shell)
|
||||
(arithmetic)150 2593 y(expressions)38 b(\(see)h(Section)g(6.5)h([Shell)
|
||||
e(Arithmetic],)k(page)d(80\)\))h(and)d(are)i(zero-based;)k(asso)s
|
||||
(ciativ)m(e)150 2708 y(arra)m(ys)31 b(use)f(arbitrary)g(strings.)275
|
||||
2841 y(An)c(indexed)h(arra)m(y)h(is)f(created)h(automatically)j(if)c
|
||||
(ciativ)m(e)150 2703 y(arra)m(ys)31 b(use)f(arbitrary)g(strings.)275
|
||||
2835 y(An)c(indexed)h(arra)m(y)h(is)f(created)h(automatically)j(if)c
|
||||
(an)m(y)g(v)-5 b(ariable)28 b(is)g(assigned)f(to)h(using)f(the)g(syn)m
|
||||
(tax)390 2974 y Fs(name[)p Fi(subscript)11 b Fs(]=)p
|
||||
Fi(value)150 3108 y Ft(The)37 b Fq(subscript)h Ft(is)f(treated)h(as)f
|
||||
(an)g(arithmetic)i(expression)e(that)g(m)m(ust)g(ev)-5
|
||||
b(aluate)39 b(to)f(a)g(n)m(um)m(b)s(er.)59 b(If)150 3217
|
||||
y Fq(subscript)29 b Ft(ev)-5 b(aluates)29 b(to)g(a)g(n)m(um)m(b)s(er)d
|
||||
(less)j(than)e(zero,)j(it)e(is)h(used)e(as)h(an)g(o\013set)h(from)f
|
||||
(one)g(greater)h(than)150 3327 y(the)h(arra)m(y's)h(maxim)m(um)e(index)
|
||||
h(\(so)g(a)h(sub)s(cript)d(of)i(-1)h(refers)e(to)i(the)f(last)h(elemen)
|
||||
m(t)g(of)f(the)g(arra)m(y\).)41 b(T)-8 b(o)150 3436 y(explicitly)32
|
||||
b(declare)f(an)g(arra)m(y)-8 b(,)31 b(use)390 3570 y
|
||||
Fs(declare)46 b(-a)h Fi(name)150 3703 y Ft(The)30 b(syn)m(tax)390
|
||||
3836 y Fs(declare)46 b(-a)h Fi(name)11 b Fs([)p Fi(subscript)g
|
||||
Fs(])150 3969 y Ft(is)30 b(also)i(accepted;)g(the)e Fq(subscript)h
|
||||
Ft(is)g(ignored.)275 4102 y(Asso)s(ciativ)m(e)h(arra)m(ys)f(are)g
|
||||
(created)g(using)390 4236 y Fs(declare)46 b(-A)h Fi(name)11
|
||||
b Fs(.)275 4369 y Ft(A)m(ttributes)46 b(ma)m(y)h(b)s(e)e(sp)s
|
||||
(eci\014ed)g(for)h(an)g(arra)m(y)g(v)-5 b(ariable)47
|
||||
b(using)e(the)h Fs(declare)e Ft(and)h Fs(readonly)150
|
||||
4478 y Ft(builtins.)40 b(Eac)m(h)31 b(attribute)g(applies)g(to)g(all)g
|
||||
(mem)m(b)s(ers)f(of)g(an)h(arra)m(y)-8 b(.)275 4612 y(Arra)m(ys)30
|
||||
b(are)h(assigned)f(to)h(using)f(comp)s(ound)f(assignmen)m(ts)i(of)g
|
||||
(the)f(form)390 4745 y Fs(name=\(value)p Fi(1)55 b Fs(...)47
|
||||
b(value)p Fi(n)11 b Fs(\))150 4878 y Ft(where)37 b(eac)m(h)i
|
||||
Fq(v)-5 b(alue)42 b Ft(is)c(of)g(the)f(form)g Fs([)p
|
||||
Fi(subscript)11 b Fs(]=)p Fq(string)d Ft(.)58 b(Indexed)36
|
||||
b(arra)m(y)i(assignmen)m(ts)g(do)g(not)150 4988 y(require)c(the)g(brac)
|
||||
m(k)m(et)h(and)e(subscript.)50 b(When)34 b(assigning)g(to)g(indexed)g
|
||||
(arra)m(ys,)h(if)f(the)g(optional)h(sub-)150 5097 y(script)c(is)h
|
||||
(supplied,)f(that)h(index)f(is)h(assigned)g(to;)h(otherwise)f(the)f
|
||||
(index)h(of)f(the)h(elemen)m(t)h(assigned)f(is)150 5207
|
||||
y(the)f(last)g(index)f(assigned)g(to)h(b)m(y)g(the)f(statemen)m(t)i
|
||||
(plus)e(one.)41 b(Indexing)30 b(starts)g(at)i(zero.)275
|
||||
5340 y(When)e(assigning)h(to)g(an)f(asso)s(ciativ)m(e)j(arra)m(y)-8
|
||||
b(,)32 b(the)e(subscript)f(is)i(required.)p eop end
|
||||
(tax)390 2967 y Fs(name[)p Fi(subscript)11 b Fs(]=)p
|
||||
Fi(value)150 3099 y Ft(The)34 b Fq(subscript)h Ft(is)g(treated)g(as)g
|
||||
(an)f(arithmetic)i(expression)e(that)h(m)m(ust)g(ev)-5
|
||||
b(aluate)36 b(to)f(a)g(n)m(um)m(b)s(er.)51 b(T)-8 b(o)150
|
||||
3208 y(explicitly)32 b(declare)f(an)g(arra)m(y)-8 b(,)31
|
||||
b(use)390 3340 y Fs(declare)46 b(-a)h Fi(name)150 3472
|
||||
y Ft(The)30 b(syn)m(tax)390 3604 y Fs(declare)46 b(-a)h
|
||||
Fi(name)11 b Fs([)p Fi(subscript)g Fs(])150 3736 y Ft(is)30
|
||||
b(also)i(accepted;)g(the)e Fq(subscript)h Ft(is)g(ignored.)275
|
||||
3868 y(Asso)s(ciativ)m(e)h(arra)m(ys)f(are)g(created)g(using)390
|
||||
4000 y Fs(declare)46 b(-A)h Fi(name)11 b Fs(.)275 4132
|
||||
y Ft(A)m(ttributes)46 b(ma)m(y)h(b)s(e)e(sp)s(eci\014ed)g(for)h(an)g
|
||||
(arra)m(y)g(v)-5 b(ariable)47 b(using)e(the)h Fs(declare)e
|
||||
Ft(and)h Fs(readonly)150 4242 y Ft(builtins.)40 b(Eac)m(h)31
|
||||
b(attribute)g(applies)g(to)g(all)g(mem)m(b)s(ers)f(of)g(an)h(arra)m(y)
|
||||
-8 b(.)275 4374 y(Arra)m(ys)30 b(are)h(assigned)f(to)h(using)f(comp)s
|
||||
(ound)f(assignmen)m(ts)i(of)g(the)f(form)390 4506 y Fs(name=\(value)p
|
||||
Fi(1)55 b Fs(...)47 b(value)p Fi(n)11 b Fs(\))150 4638
|
||||
y Ft(where)37 b(eac)m(h)i Fq(v)-5 b(alue)42 b Ft(is)c(of)g(the)f(form)g
|
||||
Fs([)p Fi(subscript)11 b Fs(]=)p Fq(string)d Ft(.)58
|
||||
b(Indexed)36 b(arra)m(y)i(assignmen)m(ts)g(do)g(not)150
|
||||
4747 y(require)c(the)g(brac)m(k)m(et)h(and)e(subscript.)50
|
||||
b(When)34 b(assigning)g(to)g(indexed)g(arra)m(ys,)h(if)f(the)g
|
||||
(optional)h(sub-)150 4857 y(script)c(is)h(supplied,)f(that)h(index)f
|
||||
(is)h(assigned)g(to;)h(otherwise)f(the)f(index)h(of)f(the)h(elemen)m(t)
|
||||
h(assigned)f(is)150 4966 y(the)f(last)g(index)f(assigned)g(to)h(b)m(y)g
|
||||
(the)f(statemen)m(t)i(plus)e(one.)41 b(Indexing)30 b(starts)g(at)i
|
||||
(zero.)275 5098 y(When)e(assigning)h(to)g(an)f(asso)s(ciativ)m(e)j
|
||||
(arra)m(y)-8 b(,)32 b(the)e(subscript)f(is)i(required.)275
|
||||
5230 y(This)f(syn)m(tax)j(is)e(also)i(accepted)g(b)m(y)f(the)f
|
||||
Fs(declare)f Ft(builtin.)44 b(Individual)31 b(arra)m(y)h(elemen)m(ts)h
|
||||
(ma)m(y)g(b)s(e)150 5340 y(assigned)e(to)g(using)f(the)g
|
||||
Fs(name[)p Fq(subscript)r Fs(]=)p Fq(v)-5 b(alue)33 b
|
||||
Ft(syn)m(tax)e(in)m(tro)s(duced)f(ab)s(o)m(v)m(e.)p eop
|
||||
end
|
||||
%%Page: 83 89
|
||||
TeXDict begin 83 88 bop 150 -116 a Ft(Chapter)30 b(6:)41
|
||||
b(Bash)30 b(F)-8 b(eatures)2484 b(83)275 299 y(This)30
|
||||
b(syn)m(tax)j(is)e(also)i(accepted)g(b)m(y)f(the)f Fs(declare)f
|
||||
Ft(builtin.)44 b(Individual)31 b(arra)m(y)h(elemen)m(ts)h(ma)m(y)g(b)s
|
||||
(e)150 408 y(assigned)e(to)g(using)f(the)g Fs(name[)p
|
||||
Fq(subscript)r Fs(]=)p Fq(v)-5 b(alue)33 b Ft(syn)m(tax)e(in)m(tro)s
|
||||
(duced)f(ab)s(o)m(v)m(e.)275 543 y(An)m(y)j(elemen)m(t)i(of)f(an)f
|
||||
(arra)m(y)h(ma)m(y)g(b)s(e)f(referenced)g(using)g Fs(${name[)p
|
||||
Fq(subscript)r Fs(]})p Ft(.)46 b(The)33 b(braces)h(are)150
|
||||
652 y(required)28 b(to)j(a)m(v)m(oid)f(con\015icts)g(with)f(the)h
|
||||
(shell's)f(\014lename)h(expansion)f(op)s(erators.)41
|
||||
b(If)28 b(the)i Fq(subscript)g Ft(is)150 762 y(`)p Fs(@)p
|
||||
Ft(')f(or)g(`)p Fs(*)p Ft(',)g(the)g(w)m(ord)g(expands)f(to)i(all)f
|
||||
(mem)m(b)s(ers)f(of)h(the)g(arra)m(y)h Fq(name)5 b Ft(.)40
|
||||
b(These)29 b(subscripts)e(di\013er)i(only)150 872 y(when)36
|
||||
b(the)g(w)m(ord)g(app)s(ears)g(within)g(double)g(quotes.)60
|
||||
b(If)36 b(the)h(w)m(ord)f(is)g(double-quoted,)j Fs(${name[*]})150
|
||||
981 y Ft(expands)20 b(to)h(a)g(single)g(w)m(ord)f(with)h(the)g(v)-5
|
||||
b(Bash)30 b(F)-8 b(eatures)2484 b(83)275 299 y(An)m(y)33
|
||||
b(elemen)m(t)i(of)f(an)f(arra)m(y)h(ma)m(y)g(b)s(e)f(referenced)g
|
||||
(using)g Fs(${name[)p Fq(subscript)r Fs(]})p Ft(.)46
|
||||
b(The)33 b(braces)h(are)150 408 y(required)28 b(to)j(a)m(v)m(oid)f
|
||||
(con\015icts)g(with)f(the)h(shell's)f(\014lename)h(expansion)f(op)s
|
||||
(erators.)41 b(If)28 b(the)i Fq(subscript)g Ft(is)150
|
||||
518 y(`)p Fs(@)p Ft(')f(or)g(`)p Fs(*)p Ft(',)g(the)g(w)m(ord)g
|
||||
(expands)f(to)i(all)f(mem)m(b)s(ers)f(of)h(the)g(arra)m(y)h
|
||||
Fq(name)5 b Ft(.)40 b(These)29 b(subscripts)e(di\013er)i(only)150
|
||||
628 y(when)36 b(the)g(w)m(ord)g(app)s(ears)g(within)g(double)g(quotes.)
|
||||
60 b(If)36 b(the)h(w)m(ord)f(is)g(double-quoted,)j Fs(${name[*]})150
|
||||
737 y Ft(expands)20 b(to)h(a)g(single)g(w)m(ord)f(with)h(the)g(v)-5
|
||||
b(alue)21 b(of)f(eac)m(h)i(arra)m(y)f(mem)m(b)s(er)f(separated)h(b)m(y)
|
||||
g(the)f(\014rst)g(c)m(haracter)150 1091 y(of)38 b(the)g
|
||||
g(the)f(\014rst)g(c)m(haracter)150 847 y(of)38 b(the)g
|
||||
Fs(IFS)f Ft(v)-5 b(ariable,)41 b(and)c Fs(${name[@]})e
|
||||
Ft(expands)i(eac)m(h)i(elemen)m(t)g(of)f Fq(name)43 b
|
||||
Ft(to)c(a)f(separate)h(w)m(ord.)150 1200 y(When)32 b(there)h(are)f(no)g
|
||||
Ft(to)c(a)f(separate)h(w)m(ord.)150 956 y(When)32 b(there)h(are)f(no)g
|
||||
(arra)m(y)h(mem)m(b)s(ers,)f Fs(${name[@]})e Ft(expands)h(to)i
|
||||
(nothing.)47 b(If)31 b(the)i(double-quoted)150 1310 y(expansion)39
|
||||
(nothing.)47 b(If)31 b(the)i(double-quoted)150 1066 y(expansion)39
|
||||
b(o)s(ccurs)h(within)f(a)h(w)m(ord,)i(the)d(expansion)h(of)g(the)f
|
||||
(\014rst)g(parameter)h(is)g(joined)f(with)h(the)150 1420
|
||||
(\014rst)g(parameter)h(is)g(joined)f(with)h(the)150 1176
|
||||
y(b)s(eginning)j(part)h(of)g(the)g(original)h(w)m(ord,)j(and)43
|
||||
b(the)h(expansion)g(of)g(the)g(last)h(parameter)f(is)g(joined)150
|
||||
1529 y(with)35 b(the)g(last)h(part)f(of)g(the)g(original)h(w)m(ord.)55
|
||||
1285 y(with)35 b(the)g(last)h(part)f(of)g(the)g(original)h(w)m(ord.)55
|
||||
b(This)34 b(is)h(analogous)h(to)g(the)f(expansion)g(of)g(the)g(sp)s
|
||||
(ecial)150 1639 y(parameters)28 b(`)p Fs(@)p Ft(')g(and)f(`)p
|
||||
(ecial)150 1395 y(parameters)28 b(`)p Fs(@)p Ft(')g(and)f(`)p
|
||||
Fs(*)p Ft('.)39 b Fs(${#name[)p Fq(subscript)r Fs(]})24
|
||||
b Ft(expands)j(to)h(the)g(length)g(of)f Fs(${name[)p
|
||||
Fq(subscript)r Fs(]})p Ft(.)150 1748 y(If)j Fq(subscript)i
|
||||
Fq(subscript)r Fs(]})p Ft(.)150 1504 y(If)j Fq(subscript)i
|
||||
Ft(is)f(`)p Fs(@)p Ft(')f(or)h(`)p Fs(*)p Ft(',)g(the)g(expansion)g(is)
|
||||
g(the)g(n)m(um)m(b)s(er)e(of)i(elemen)m(ts)h(in)f(the)g(arra)m(y)-8
|
||||
b(.)42 b(Referencing)150 1858 y(an)30 b(arra)m(y)h(v)-5
|
||||
b(ariable)31 b(without)g(a)f(subscript)g(is)g(equiv)-5
|
||||
b(alen)m(t)32 b(to)f(referencing)g(with)f(a)g(subscript)g(of)g(0.)275
|
||||
1992 y(An)35 b(arra)m(y)i(v)-5 b(ariable)37 b(is)g(considered)f(set)h
|
||||
(if)f(a)h(subscript)e(has)h(b)s(een)g(assigned)g(a)h(v)-5
|
||||
b(alue.)59 b(The)36 b(n)m(ull)150 2102 y(string)30 b(is)h(a)g(v)-5
|
||||
b(alid)30 b(v)-5 b(alue.)275 2236 y(The)32 b Fs(unset)g
|
||||
Ft(builtin)h(is)g(used)g(to)h(destro)m(y)g(arra)m(ys.)50
|
||||
b Fs(unset)31 b Fq(name)5 b Ft([)p Fq(subscript)r Ft(])33
|
||||
b(destro)m(ys)h(the)f(arra)m(y)150 2346 y(elemen)m(t)i(at)g(index)f
|
||||
Fq(subscript)r Ft(.)50 b(Care)34 b(m)m(ust)f(b)s(e)h(tak)m(en)h(to)f(a)
|
||||
m(v)m(oid)i(un)m(w)m(an)m(ted)e(side)g(e\013ects)h(caused)f(b)m(y)150
|
||||
2456 y(\014lename)40 b(expansion.)69 b Fs(unset)39 b
|
||||
Fq(name)5 b Ft(,)42 b(where)e Fq(name)45 b Ft(is)39 b(an)h(arra)m(y)-8
|
||||
b(,)44 b(remo)m(v)m(es)d(the)f(en)m(tire)h(arra)m(y)-8
|
||||
b(.)70 b(A)150 2565 y(subscript)29 b(of)i(`)p Fs(*)p
|
||||
b(.)42 b(Referencing)150 1614 y(an)33 b(arra)m(y)g(v)-5
|
||||
b(ariable)34 b(without)f(a)h(subscript)e(is)h(equiv)-5
|
||||
b(alen)m(t)34 b(to)g(referencing)f(with)g(a)g(subscript)f(of)h(0.)49
|
||||
b(If)150 1724 y(the)33 b Fq(subscript)h Ft(used)e(to)h(reference)h(an)f
|
||||
(elemen)m(t)h(of)f(an)g(indexed)f(arra)m(y)i(ev)-5 b(aluates)34
|
||||
b(to)g(a)f(n)m(um)m(b)s(er)f(less)150 1833 y(than)j(zero,)i(it)f(is)f
|
||||
(used)g(as)g(an)g(o\013set)h(from)f(one)h(greater)g(than)f(the)g(arra)m
|
||||
(y's)h(maxim)m(um)f(index)g(\(so)h(a)150 1943 y(sub)s(cript)29
|
||||
b(of)h(-1)h(refers)f(to)h(the)g(last)g(elemen)m(t)h(of)f(the)f(arra)m
|
||||
(y\).)275 2071 y(An)35 b(arra)m(y)i(v)-5 b(ariable)37
|
||||
b(is)g(considered)f(set)h(if)f(a)h(subscript)e(has)h(b)s(een)g
|
||||
(assigned)g(a)h(v)-5 b(alue.)59 b(The)36 b(n)m(ull)150
|
||||
2180 y(string)30 b(is)h(a)g(v)-5 b(alid)30 b(v)-5 b(alue.)275
|
||||
2308 y(The)32 b Fs(unset)g Ft(builtin)h(is)g(used)g(to)h(destro)m(y)g
|
||||
(arra)m(ys.)50 b Fs(unset)31 b Fq(name)5 b Ft([)p Fq(subscript)r
|
||||
Ft(])33 b(destro)m(ys)h(the)f(arra)m(y)150 2418 y(elemen)m(t)i(at)g
|
||||
(index)f Fq(subscript)r Ft(.)50 b(Care)34 b(m)m(ust)f(b)s(e)h(tak)m(en)
|
||||
h(to)f(a)m(v)m(oid)i(un)m(w)m(an)m(ted)e(side)g(e\013ects)h(caused)f(b)
|
||||
m(y)150 2527 y(\014lename)40 b(expansion.)69 b Fs(unset)39
|
||||
b Fq(name)5 b Ft(,)42 b(where)e Fq(name)45 b Ft(is)39
|
||||
b(an)h(arra)m(y)-8 b(,)44 b(remo)m(v)m(es)d(the)f(en)m(tire)h(arra)m(y)
|
||||
-8 b(.)70 b(A)150 2637 y(subscript)29 b(of)i(`)p Fs(*)p
|
||||
Ft(')f(or)h(`)p Fs(@)p Ft(')f(also)h(remo)m(v)m(es)h(the)f(en)m(tire)g
|
||||
(arra)m(y)-8 b(.)275 2700 y(The)41 b Fs(declare)p Ft(,)i
|
||||
(arra)m(y)-8 b(.)275 2765 y(The)41 b Fs(declare)p Ft(,)i
|
||||
Fs(local)p Ft(,)h(and)d Fs(readonly)f Ft(builtins)h(eac)m(h)j(accept)f
|
||||
(a)f(`)p Fs(-a)p Ft(')g(option)h(to)f(sp)s(ecify)g(an)150
|
||||
2809 y(indexed)25 b(arra)m(y)h(and)e(a)i(`)p Fs(-A)p
|
||||
2874 y(indexed)25 b(arra)m(y)h(and)e(a)i(`)p Fs(-A)p
|
||||
Ft(')f(option)h(to)g(sp)s(ecify)f(an)g(asso)s(ciativ)m(e)j(arra)m(y)-8
|
||||
b(.)40 b(If)25 b(b)s(oth)g(options)g(are)h(supplied,)150
|
||||
2919 y(`)p Fs(-A)p Ft(')k(tak)m(es)i(precedence.)41 b(The)30
|
||||
2984 y(`)p Fs(-A)p Ft(')k(tak)m(es)i(precedence.)41 b(The)30
|
||||
b Fs(read)f Ft(builtin)g(accepts)j(a)e(`)p Fs(-a)p Ft(')g(option)h(to)g
|
||||
(assign)g(a)f(list)h(of)f(w)m(ords)g(read)150 3028 y(from)40
|
||||
(assign)g(a)f(list)h(of)f(w)m(ords)g(read)150 3094 y(from)40
|
||||
b(the)g(standard)f(input)h(to)h(an)f(arra)m(y)-8 b(,)44
|
||||
b(and)39 b(can)i(read)f(v)-5 b(alues)40 b(from)g(the)g(standard)g
|
||||
(input)f(in)m(to)150 3138 y(individual)26 b(arra)m(y)h(elemen)m(ts.)41
|
||||
(input)f(in)m(to)150 3203 y(individual)26 b(arra)m(y)h(elemen)m(ts.)41
|
||||
b(The)26 b Fs(set)f Ft(and)h Fs(declare)f Ft(builtins)g(displa)m(y)i
|
||||
(arra)m(y)g(v)-5 b(alues)27 b(in)f(a)h(w)m(a)m(y)g(that)150
|
||||
3248 y(allo)m(ws)32 b(them)e(to)h(b)s(e)f(reused)f(as)i(input.)150
|
||||
3480 y Fr(6.8)68 b(The)45 b(Directory)g(Stac)l(k)150
|
||||
3639 y Ft(The)21 b(directory)h(stac)m(k)h(is)e(a)h(list)g(of)f(recen)m
|
||||
3313 y(allo)m(ws)32 b(them)e(to)h(b)s(e)f(reused)f(as)i(input.)150
|
||||
3532 y Fr(6.8)68 b(The)45 b(Directory)g(Stac)l(k)150
|
||||
3691 y Ft(The)21 b(directory)h(stac)m(k)h(is)e(a)h(list)g(of)f(recen)m
|
||||
(tly-visited)j(directories.)39 b(The)20 b Fs(pushd)g
|
||||
Ft(builtin)h(adds)g(directories)150 3749 y(to)42 b(the)f(stac)m(k)i(as)
|
||||
Ft(builtin)h(adds)g(directories)150 3801 y(to)42 b(the)f(stac)m(k)i(as)
|
||||
e(it)h(c)m(hanges)g(the)f(curren)m(t)g(directory)-8 b(,)45
|
||||
b(and)40 b(the)i Fs(popd)e Ft(builtin)g(remo)m(v)m(es)j(sp)s(eci\014ed)
|
||||
150 3859 y(directories)29 b(from)f(the)h(stac)m(k)h(and)d(c)m(hanges)j
|
||||
150 3911 y(directories)29 b(from)f(the)h(stac)m(k)h(and)d(c)m(hanges)j
|
||||
(the)e(curren)m(t)g(directory)h(to)g(the)g(directory)f(remo)m(v)m(ed.)
|
||||
41 b(The)150 3968 y Fs(dirs)29 b Ft(builtin)h(displa)m(ys)h(the)f(con)m
|
||||
(ten)m(ts)i(of)f(the)f(directory)h(stac)m(k.)275 4103
|
||||
41 b(The)150 4020 y Fs(dirs)29 b Ft(builtin)h(displa)m(ys)h(the)f(con)m
|
||||
(ten)m(ts)i(of)f(the)f(directory)h(stac)m(k.)275 4148
|
||||
y(The)k(con)m(ten)m(ts)i(of)f(the)h(directory)f(stac)m(k)h(are)f(also)h
|
||||
(visible)g(as)f(the)g(v)-5 b(alue)36 b(of)g(the)g Fs(DIRSTACK)e
|
||||
Ft(shell)150 4212 y(v)-5 b(ariable.)150 4411 y Fj(6.8.1)63
|
||||
b(Directory)40 b(Stac)m(k)g(Builtins)150 4583 y Fs(dirs)870
|
||||
4717 y(dirs)47 b([+)p Fi(N)57 b Fs(|)48 b(-)p Fi(N)11
|
||||
b Fs(])46 b([-clpv])630 4852 y Ft(Displa)m(y)35 b(the)f(list)g(of)g
|
||||
Ft(shell)150 4258 y(v)-5 b(ariable.)150 4444 y Fj(6.8.1)63
|
||||
b(Directory)40 b(Stac)m(k)g(Builtins)150 4609 y Fs(dirs)870
|
||||
4737 y(dirs)47 b([+)p Fi(N)57 b Fs(|)48 b(-)p Fi(N)11
|
||||
b Fs(])46 b([-clpv])630 4865 y Ft(Displa)m(y)35 b(the)f(list)g(of)g
|
||||
(curren)m(tly)g(remem)m(b)s(ered)f(directories.)51 b(Directories)36
|
||||
b(are)e(added)f(to)630 4962 y(the)28 b(list)h(with)f(the)g
|
||||
b(are)e(added)f(to)630 4975 y(the)28 b(list)h(with)f(the)g
|
||||
Fs(pushd)f Ft(command;)i(the)f Fs(popd)f Ft(command)h(remo)m(v)m(es)h
|
||||
(directories)g(from)630 5071 y(the)i(list.)630 5230 y
|
||||
(directories)g(from)630 5084 y(the)i(list.)630 5230 y
|
||||
Fs(+)p Fi(N)384 b Ft(Displa)m(ys)23 b(the)f Fq(N)10 b
|
||||
Ft(th)21 b(directory)h(\(coun)m(ting)h(from)e(the)h(left)g(of)g(the)g
|
||||
(list)g(prin)m(ted)1110 5340 y(b)m(y)30 b Fs(dirs)f Ft(when)h(in)m(v)m
|
||||
|
||||
+7
-2
@@ -1554,7 +1554,7 @@ This mechanism is similar to
|
||||
@var{filename expansion} (@pxref{Filename Expansion}),
|
||||
but the file names generated need not exist.
|
||||
Patterns to be brace expanded take the form of an optional @var{preamble},
|
||||
followed by either a series of comma-separated strings or a seqeunce expression
|
||||
followed by either a series of comma-separated strings or a sequence expression
|
||||
between a pair of braces,
|
||||
followed by an optional @var{postscript}.
|
||||
The preamble is prefixed to each string contained within the braces, and
|
||||
@@ -2337,6 +2337,7 @@ This is semantically equivalent to
|
||||
@example
|
||||
>@var{word} 2>&1
|
||||
@end example
|
||||
(see Duplicating File Descriptors below).
|
||||
|
||||
@subsection Appending Standard Output and Standard Error
|
||||
This construct allows both the
|
||||
@@ -2354,6 +2355,7 @@ This is semantically equivalent to
|
||||
@example
|
||||
>>@var{word} 2>&1
|
||||
@end example
|
||||
(see Duplicating File Descriptors below).
|
||||
|
||||
@subsection Here Documents
|
||||
This type of redirection instructs the shell to read input from the
|
||||
@@ -3641,7 +3643,7 @@ echo [-neE] [@var{arg} @dots{}]
|
||||
@end example
|
||||
Output the @var{arg}s, separated by spaces, terminated with a
|
||||
newline.
|
||||
The return status is always 0.
|
||||
The return status is 0 unless a write error occurs.
|
||||
If @option{-n} is specified, the trailing newline is suppressed.
|
||||
If the @option{-e} option is given, interpretation of the following
|
||||
backslash-escaped characters is enabled.
|
||||
@@ -4208,6 +4210,9 @@ the command name.
|
||||
|
||||
@item -m
|
||||
Job control is enabled (@pxref{Job Control}).
|
||||
All processes run in a separate process group.
|
||||
When a background job completes, the shell prints a line
|
||||
containing its exit status.
|
||||
|
||||
@item -n
|
||||
Read commands but do not execute them; this may be used to check a
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@
|
||||
@numsubsecentry{Duplicating File Descriptors}{3.6.8}{}{30}
|
||||
@numsubsecentry{Moving File Descriptors}{3.6.9}{}{30}
|
||||
@numsubsecentry{Opening File Descriptors for Reading and Writing}{3.6.10}{}{30}
|
||||
@numsecentry{Executing Commands}{3.7}{Executing Commands}{30}
|
||||
@numsecentry{Executing Commands}{3.7}{Executing Commands}{31}
|
||||
@numsubsecentry{Simple Command Expansion}{3.7.1}{Simple Command Expansion}{31}
|
||||
@numsubsecentry{Command Search and Execution}{3.7.2}{Command Search and Execution}{31}
|
||||
@numsubsecentry{Command Execution Environment}{3.7.3}{Command Execution Environment}{32}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.19.2
|
||||
%%CreationDate: Wed Mar 9 17:05:39 2011
|
||||
%%CreationDate: Mon Apr 11 16:57:06 2011
|
||||
%%DocumentNeededResources: font Times-Roman
|
||||
%%+ font Times-Bold
|
||||
%%+ font Times-Italic
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.19.2
|
||||
%%CreationDate: Wed Mar 9 17:05:39 2011
|
||||
%%CreationDate: Mon Apr 11 16:57:06 2011
|
||||
%%DocumentNeededResources: font Times-Roman
|
||||
%%+ font Times-Bold
|
||||
%%DocumentSuppliedResources: procset grops 1.19 2
|
||||
|
||||
+3
-3
@@ -2,9 +2,9 @@
|
||||
Copyright (C) 1988-2011 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Thu Mar 24 10:20:44 EDT 2011
|
||||
@set LASTCHANGE Mon Apr 11 16:56:36 EDT 2011
|
||||
|
||||
@set EDITION 4.2
|
||||
@set VERSION 4.2
|
||||
@set UPDATED 24 March 2011
|
||||
@set UPDATED-MONTH March 2011
|
||||
@set UPDATED 11 April 2011
|
||||
@set UPDATED-MONTH April 2011
|
||||
|
||||
+98
-23
@@ -1548,10 +1548,14 @@ static struct cpelement *cpl_add __P((struct coproc *));
|
||||
static struct cpelement *cpl_delete __P((pid_t));
|
||||
static void cpl_reap __P((void));
|
||||
static void cpl_flush __P((void));
|
||||
static void cpl_closeall __P((void));
|
||||
static struct cpelement *cpl_search __P((pid_t));
|
||||
static struct cpelement *cpl_searchbyname __P((char *));
|
||||
static struct cpelement *cpl_searchbyname __P((const char *));
|
||||
static void cpl_prune __P((void));
|
||||
|
||||
static void coproc_free __P((struct coproc *));
|
||||
|
||||
/* Will go away when there is fully-implemented support for multiple coprocs. */
|
||||
Coproc sh_coproc = { 0, NO_PID, -1, -1, 0, 0, 0, 0 };
|
||||
|
||||
cplist_t coproc_list = {0, 0, 0};
|
||||
@@ -1685,17 +1689,36 @@ cpl_flush ()
|
||||
coproc_list.ncoproc = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
cpl_closeall ()
|
||||
{
|
||||
struct cpelement *cpe;
|
||||
|
||||
for (cpe = coproc_list.head; cpe; )
|
||||
coproc_close (cpe->coproc);
|
||||
}
|
||||
|
||||
static void
|
||||
cpl_fdchk (fd)
|
||||
int fd;
|
||||
{
|
||||
struct cpelement *cpe;
|
||||
|
||||
for (cpe = coproc_list.head; cpe; )
|
||||
coproc_checkfd (cpe->coproc, fd);
|
||||
}
|
||||
|
||||
/* Search for PID in the list of coprocs; return the cpelement struct if
|
||||
found. If not found, return NULL. */
|
||||
static struct cpelement *
|
||||
cpl_search (pid)
|
||||
pid_t pid;
|
||||
{
|
||||
struct cpelement *cp;
|
||||
struct cpelement *cpe;
|
||||
|
||||
for (cp = coproc_list.head ; cp; cp = cp->next)
|
||||
if (cp->coproc->c_pid == pid)
|
||||
return cp;
|
||||
for (cpe = coproc_list.head ; cpe; cpe = cpe->next)
|
||||
if (cpe->coproc->c_pid == pid)
|
||||
return cpe;
|
||||
return (struct cpelement *)NULL;
|
||||
}
|
||||
|
||||
@@ -1703,7 +1726,7 @@ cpl_search (pid)
|
||||
cpelement struct if found. If not found, return NULL. */
|
||||
static struct cpelement *
|
||||
cpl_searchbyname (name)
|
||||
char *name;
|
||||
const char *name;
|
||||
{
|
||||
struct cpelement *cp;
|
||||
|
||||
@@ -1738,14 +1761,28 @@ struct coproc *
|
||||
getcoprocbypid (pid)
|
||||
pid_t pid;
|
||||
{
|
||||
#if MULTIPLE_COPROCS
|
||||
struct cpelement *p;
|
||||
|
||||
p = cpl_search (pid);
|
||||
return (p ? p->coproc : 0);
|
||||
#else
|
||||
return (pid == sh_coproc.c_pid ? &sh_coproc : 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
struct coproc *
|
||||
getcoprocbyname (name)
|
||||
const char *name;
|
||||
{
|
||||
#if MULTIPLE_COPROCS
|
||||
struct cpelement *p;
|
||||
|
||||
p = cpl_searchbyname (name);
|
||||
return (p ? p->coproc : 0);
|
||||
#else
|
||||
return ((sh_coproc.c_name && STREQ (sh_coproc.c_name, name)) ? &sh_coproc : 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1766,15 +1803,30 @@ coproc_alloc (name, pid)
|
||||
{
|
||||
struct coproc *cp;
|
||||
|
||||
cp = &sh_coproc; /* XXX */
|
||||
#if MULTIPLE_COPROCS
|
||||
cp = (struct coproc *)xmalloc (sizeof (struct coproc));
|
||||
#else
|
||||
cp = &sh_coproc;
|
||||
#endif
|
||||
coproc_init (cp);
|
||||
|
||||
cp->c_name = savestring (name);
|
||||
cp->c_pid = pid;
|
||||
|
||||
#if MULTIPLE_COPROCS
|
||||
cpl_add (cp);
|
||||
#endif
|
||||
|
||||
return (cp);
|
||||
}
|
||||
|
||||
static void
|
||||
coproc_free (cp)
|
||||
struct coproc *cp;
|
||||
{
|
||||
free (cp);
|
||||
}
|
||||
|
||||
void
|
||||
coproc_dispose (cp)
|
||||
struct coproc *cp;
|
||||
@@ -1785,14 +1837,22 @@ coproc_dispose (cp)
|
||||
coproc_unsetvars (cp);
|
||||
FREE (cp->c_name);
|
||||
coproc_close (cp);
|
||||
#if MULTIPLE_COPROCS
|
||||
coproc_free (cp);
|
||||
#else
|
||||
coproc_init (cp);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Placeholder for now. */
|
||||
/* Placeholder for now. Will require changes for multiple coprocs */
|
||||
void
|
||||
coproc_flush ()
|
||||
{
|
||||
#if MULTIPLE_COPROCS
|
||||
cpl_flush ();
|
||||
#else
|
||||
coproc_dispose (&sh_coproc);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1815,17 +1875,25 @@ coproc_close (cp)
|
||||
void
|
||||
coproc_closeall ()
|
||||
{
|
||||
coproc_close (&sh_coproc);
|
||||
#if MULTIPLE_COPROCS
|
||||
cpl_closeall ();
|
||||
#else
|
||||
coproc_close (&sh_coproc); /* XXX - will require changes for multiple coprocs */
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
coproc_reap ()
|
||||
{
|
||||
#if MULTIPLE_COPROCS
|
||||
cpl_reap ();
|
||||
#else
|
||||
struct coproc *cp;
|
||||
|
||||
cp = &sh_coproc;
|
||||
cp = &sh_coproc; /* XXX - will require changes for multiple coprocs */
|
||||
if (cp && (cp->c_flags & COPROC_DEAD))
|
||||
coproc_dispose (cp);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1872,7 +1940,11 @@ void
|
||||
coproc_fdchk (fd)
|
||||
int fd;
|
||||
{
|
||||
#if MULTIPLE_COPROCS
|
||||
cpl_fdchk (fd);
|
||||
#else
|
||||
coproc_checkfd (&sh_coproc, fd);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1907,18 +1979,26 @@ coproc_pidchk (pid, status)
|
||||
{
|
||||
struct coproc *cp;
|
||||
|
||||
#if MULTIPLE_COPROCS
|
||||
struct cpelement *cpe;
|
||||
|
||||
cpe = cpl_delete (pid);
|
||||
cp = cpe ? cpe->coproc : 0;
|
||||
#else
|
||||
cp = getcoprocbypid (pid);
|
||||
#if 0
|
||||
if (cp)
|
||||
itrace("coproc_pidchk: pid %d has died", pid);
|
||||
#endif
|
||||
if (cp)
|
||||
{
|
||||
#if 0
|
||||
itrace("coproc_pidchk: pid %d has died", pid);
|
||||
#endif
|
||||
cp->c_status = status;
|
||||
cp->c_flags |= COPROC_DEAD;
|
||||
cp->c_flags &= ~COPROC_RUNNING;
|
||||
#if 0
|
||||
#if MULTIPLE_COPROCS
|
||||
coproc_dispose (cp);
|
||||
#else
|
||||
coproc_unsetvars (cp);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -2014,17 +2094,12 @@ execute_coproc (command, pipe_in, pipe_out, fds_to_close)
|
||||
Coproc *cp;
|
||||
char *tcmd;
|
||||
|
||||
/* XXX -- will require changes to handle multiple coprocs */
|
||||
/* XXX -- can be removed after changes to handle multiple coprocs */
|
||||
#if !MULTIPLE_COPROCS
|
||||
if (sh_coproc.c_pid != NO_PID)
|
||||
{
|
||||
#if 0
|
||||
internal_error ("execute_coproc: coproc [%d:%s] already exists", sh_coproc.c_pid, sh_coproc.c_name);
|
||||
return (last_command_exit_value = EXECUTION_FAILURE);
|
||||
#else
|
||||
internal_warning ("execute_coproc: coproc [%d:%s] still exists", sh_coproc.c_pid, sh_coproc.c_name);
|
||||
#endif
|
||||
}
|
||||
internal_warning ("execute_coproc: coproc [%d:%s] still exists", sh_coproc.c_pid, sh_coproc.c_name);
|
||||
coproc_init (&sh_coproc);
|
||||
#endif
|
||||
|
||||
command_string_index = 0;
|
||||
tcmd = make_command_string (command);
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
eliminate the && through constant folding."
|
||||
Solaris defines some of these symbols so we must undefine them first. */
|
||||
|
||||
#if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
|
||||
#if STDC_HEADERS || (!defined (isascii) && !HAVE_ISASCII)
|
||||
# define IN_CTYPE_DOMAIN(c) 1
|
||||
#else
|
||||
# define IN_CTYPE_DOMAIN(c) isascii(c)
|
||||
|
||||
+21
@@ -99,6 +99,7 @@ static int it_init_disabled __P((ITEMLIST *));
|
||||
static int it_init_enabled __P((ITEMLIST *));
|
||||
static int it_init_exported __P((ITEMLIST *));
|
||||
static int it_init_functions __P((ITEMLIST *));
|
||||
static int it_init_helptopics __P((ITEMLIST *));
|
||||
static int it_init_hostnames __P((ITEMLIST *));
|
||||
static int it_init_jobs __P((ITEMLIST *));
|
||||
static int it_init_running __P((ITEMLIST *));
|
||||
@@ -157,6 +158,7 @@ ITEMLIST it_enabled = { 0, it_init_enabled, (STRINGLIST *)0 };
|
||||
ITEMLIST it_exports = { LIST_DYNAMIC, it_init_exported, (STRINGLIST *)0 };
|
||||
ITEMLIST it_files = { LIST_DYNAMIC }; /* unused */
|
||||
ITEMLIST it_functions = { 0, it_init_functions, (STRINGLIST *)0 };
|
||||
ITEMLIST it_helptopics = { 0, it_init_helptopics, (STRINGLIST *)0 };
|
||||
ITEMLIST it_hostnames = { LIST_DYNAMIC, it_init_hostnames, (STRINGLIST *)0 };
|
||||
ITEMLIST it_groups = { LIST_DYNAMIC }; /* unused */
|
||||
ITEMLIST it_jobs = { LIST_DYNAMIC, it_init_jobs, (STRINGLIST *)0 };
|
||||
@@ -497,6 +499,24 @@ it_init_functions (itp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Like it_init_builtins, but includes everything the help builtin looks at,
|
||||
not just builtins with an active implementing function. */
|
||||
static int
|
||||
it_init_helptopics (itp)
|
||||
ITEMLIST *itp;
|
||||
{
|
||||
STRINGLIST *sl;
|
||||
register int i, n;
|
||||
|
||||
sl = strlist_create (num_shell_builtins);
|
||||
for (i = n = 0; i < num_shell_builtins; i++)
|
||||
sl->list[n++] = shell_builtins[i].name;
|
||||
sl->list[sl->list_len = n] = (char *)NULL;
|
||||
itp->flags |= LIST_DONTFREEMEMBERS;
|
||||
itp->slist = sl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
it_init_hostnames (itp)
|
||||
ITEMLIST *itp;
|
||||
@@ -764,6 +784,7 @@ gen_action_completions (cs, text)
|
||||
GEN_COMPS (flags, CA_ENABLED, &it_enabled, text, ret, tmatches);
|
||||
GEN_COMPS (flags, CA_EXPORT, &it_exports, text, ret, tmatches);
|
||||
GEN_COMPS (flags, CA_FUNCTION, &it_functions, text, ret, tmatches);
|
||||
GEN_COMPS (flags, CA_HELPTOPIC, &it_helptopics, text, ret, tmatches);
|
||||
GEN_COMPS (flags, CA_HOSTNAME, &it_hostnames, text, ret, tmatches);
|
||||
GEN_COMPS (flags, CA_JOB, &it_jobs, text, ret, tmatches);
|
||||
GEN_COMPS (flags, CA_KEYWORD, &it_keywords, text, ret, tmatches);
|
||||
|
||||
@@ -116,6 +116,7 @@ extern ITEMLIST it_exports;
|
||||
extern ITEMLIST it_files;
|
||||
extern ITEMLIST it_functions;
|
||||
extern ITEMLIST it_groups;
|
||||
extern ITEMLIST it_helptopics;
|
||||
extern ITEMLIST it_hostnames;
|
||||
extern ITEMLIST it_jobs;
|
||||
extern ITEMLIST it_keywords;
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
# This file is distributed under the same license as the bash package.
|
||||
# Primož PETERLIN <primozz.peterlin@gmail.com>, 2011.
|
||||
#
|
||||
# $Id: bash-4.2.sl.po,v 1.5 2011/03/27 20:33:04 peterlin Exp $
|
||||
# $Id: bash-4.2.sl.po,v 1.7 2011/04/03 16:15:52 peterlin Exp $
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: bash 4.2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-01-28 22:09-0500\n"
|
||||
"PO-Revision-Date: 2011-03-27 22:32+0200\n"
|
||||
"PO-Revision-Date: 2011-04-03 18:15+0200\n"
|
||||
"Last-Translator: Primož PETERLIN <primozz.peterlin@gmail.com>\n"
|
||||
"Language-Team: Slovenian <translation-team-sl@lists.sourceforge.net>\n"
|
||||
"Language: sl\n"
|
||||
@@ -107,7 +107,7 @@ msgstr "%s je mogoče poklicati prek "
|
||||
|
||||
#: builtins/break.def:77 builtins/break.def:117
|
||||
msgid "loop count"
|
||||
msgstr ""
|
||||
msgstr "število zank"
|
||||
|
||||
#: builtins/break.def:137
|
||||
msgid "only meaningful in a `for', `while', or `until' loop"
|
||||
@@ -200,7 +200,7 @@ msgstr "%s: neveljavna specifikacija signala"
|
||||
#: builtins/common.c:257
|
||||
#, c-format
|
||||
msgid "`%s': not a pid or valid job spec"
|
||||
msgstr ""
|
||||
msgstr "»%s«: ni PID, niti veljavna določitev posla"
|
||||
|
||||
#: builtins/common.c:264 error.c:454
|
||||
#, c-format
|
||||
@@ -238,11 +238,11 @@ msgstr "ni nadzora poslov"
|
||||
#: builtins/common.c:302
|
||||
#, c-format
|
||||
msgid "%s: restricted"
|
||||
msgstr ""
|
||||
msgstr "%s: omejeno"
|
||||
|
||||
#: builtins/common.c:304
|
||||
msgid "restricted"
|
||||
msgstr ""
|
||||
msgstr "omejeno"
|
||||
|
||||
#: builtins/common.c:312
|
||||
#, c-format
|
||||
@@ -283,7 +283,7 @@ msgstr "%s: neveljavno ime dejanja"
|
||||
#: builtins/complete.def:853
|
||||
#, c-format
|
||||
msgid "%s: no completion specification"
|
||||
msgstr ""
|
||||
msgstr "%s: dopolnitev ni določena"
|
||||
|
||||
#: builtins/complete.def:696
|
||||
msgid "warning: -F option may not work as you expect"
|
||||
@@ -295,7 +295,7 @@ msgstr "opozorilo: izbira -C morda deluje drugače od pričakovanega"
|
||||
|
||||
#: builtins/complete.def:826
|
||||
msgid "not currently executing completion function"
|
||||
msgstr ""
|
||||
msgstr "trenutno se funkcija dopolnjevanja ne izvaja"
|
||||
|
||||
#: builtins/declare.def:124
|
||||
msgid "can only be used in a function"
|
||||
@@ -303,17 +303,17 @@ msgstr "dovoljena je le raba v funkciji"
|
||||
|
||||
#: builtins/declare.def:366
|
||||
msgid "cannot use `-f' to make functions"
|
||||
msgstr ""
|
||||
msgstr "ni mogoče uporabiti »-f« za ustvarjanje funkcij"
|
||||
|
||||
#: builtins/declare.def:378 execute_cmd.c:5105
|
||||
#, c-format
|
||||
msgid "%s: readonly function"
|
||||
msgstr ""
|
||||
msgstr "%s: funkcija samo za branje"
|
||||
|
||||
#: builtins/declare.def:474
|
||||
#, c-format
|
||||
msgid "%s: cannot destroy array variables in this way"
|
||||
msgstr ""
|
||||
msgstr "%s: na ta način ni mogoče razdefinirati polja spremenljivk"
|
||||
|
||||
#: builtins/declare.def:481
|
||||
#, c-format
|
||||
@@ -396,7 +396,7 @@ msgstr "ukaza ni moč najti"
|
||||
|
||||
#: builtins/fc.def:312 builtins/fc.def:359
|
||||
msgid "history specification"
|
||||
msgstr ""
|
||||
msgstr "določitev zgodovine"
|
||||
|
||||
#: builtins/fc.def:380
|
||||
#, c-format
|
||||
@@ -405,7 +405,7 @@ msgstr "%s: ni mogoče odpreti začasne datoteke: %s"
|
||||
|
||||
#: builtins/fg_bg.def:149 builtins/jobs.def:282
|
||||
msgid "current"
|
||||
msgstr ""
|
||||
msgstr "trenutno"
|
||||
|
||||
#: builtins/fg_bg.def:158
|
||||
#, c-format
|
||||
@@ -429,12 +429,12 @@ msgstr ""
|
||||
#: builtins/hash.def:138
|
||||
#, c-format
|
||||
msgid "%s: hash table empty\n"
|
||||
msgstr ""
|
||||
msgstr "%s: zgoščevalna tabela je prazna\n"
|
||||
|
||||
#: builtins/hash.def:245
|
||||
#, c-format
|
||||
msgid "hits\tcommand\n"
|
||||
msgstr ""
|
||||
msgstr "zadetki\tukaz\n"
|
||||
|
||||
#: builtins/help.def:130
|
||||
#, c-format
|
||||
@@ -497,7 +497,7 @@ msgstr ""
|
||||
#: builtins/kill.def:198
|
||||
#, c-format
|
||||
msgid "%s: arguments must be process or job IDs"
|
||||
msgstr ""
|
||||
msgstr "%s: argumenti morajo biti določila procesa ali posla"
|
||||
|
||||
#: builtins/kill.def:261
|
||||
msgid "Unknown error"
|
||||
@@ -525,12 +525,12 @@ msgstr "%d: neveljaven deskriptor datoteke: %s"
|
||||
#: builtins/mapfile.def:273 builtins/mapfile.def:311
|
||||
#, c-format
|
||||
msgid "%s: invalid line count"
|
||||
msgstr ""
|
||||
msgstr "%s: neveljavna številka vrstice"
|
||||
|
||||
#: builtins/mapfile.def:284
|
||||
#, c-format
|
||||
msgid "%s: invalid array origin"
|
||||
msgstr ""
|
||||
msgstr "%s: neveljavno izhodišče polja"
|
||||
|
||||
#: builtins/mapfile.def:301
|
||||
#, c-format
|
||||
@@ -539,7 +539,7 @@ msgstr ""
|
||||
|
||||
#: builtins/mapfile.def:333
|
||||
msgid "empty array variable name"
|
||||
msgstr ""
|
||||
msgstr "prazno ime polja spremenljivk"
|
||||
|
||||
#: builtins/mapfile.def:354
|
||||
msgid "array variable support required"
|
||||
@@ -548,17 +548,17 @@ msgstr ""
|
||||
#: builtins/printf.def:394
|
||||
#, c-format
|
||||
msgid "`%s': missing format character"
|
||||
msgstr ""
|
||||
msgstr "»%s«: manjkajoči formatni znak"
|
||||
|
||||
#: builtins/printf.def:448
|
||||
#, c-format
|
||||
msgid "`%c': invalid time format specification"
|
||||
msgstr ""
|
||||
msgstr "»%c«: neveljavno formatno določilo časa"
|
||||
|
||||
#: builtins/printf.def:635
|
||||
#, c-format
|
||||
msgid "`%c': invalid format character"
|
||||
msgstr ""
|
||||
msgstr "»%c«: neveljavni formatni znak<"
|
||||
|
||||
#: builtins/printf.def:662
|
||||
#, c-format
|
||||
@@ -567,20 +567,20 @@ msgstr "opozorilo: %s: %s"
|
||||
|
||||
#: builtins/printf.def:840
|
||||
msgid "missing hex digit for \\x"
|
||||
msgstr ""
|
||||
msgstr "manjkajoča šestnajstiška števka za \\x"
|
||||
|
||||
#: builtins/printf.def:855
|
||||
#, c-format
|
||||
msgid "missing unicode digit for \\%c"
|
||||
msgstr ""
|
||||
msgstr "manjkajoča unikodna števka za \\%c"
|
||||
|
||||
#: builtins/pushd.def:195
|
||||
msgid "no other directory"
|
||||
msgstr ""
|
||||
msgstr "ni drugega imenika"
|
||||
|
||||
#: builtins/pushd.def:462
|
||||
msgid "<no current directory>"
|
||||
msgstr ""
|
||||
msgstr "<ni trenutnega imenika>"
|
||||
|
||||
#: builtins/pushd.def:506
|
||||
msgid "directory stack empty"
|
||||
@@ -588,10 +588,9 @@ msgstr "sklad imenikov je prazen"
|
||||
|
||||
#: builtins/pushd.def:508
|
||||
msgid "directory stack index"
|
||||
msgstr ""
|
||||
msgstr "indeks imenika skladov"
|
||||
|
||||
#: builtins/pushd.def:683
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Display the list of currently remembered directories. Directories\n"
|
||||
" find their way onto the list with the `pushd' command; you can get\n"
|
||||
@@ -625,7 +624,10 @@ msgstr ""
|
||||
" \tuveden s svojim položajem na skladu\n"
|
||||
"\n"
|
||||
" Argumenti:\n"
|
||||
" +N\tIzpiši N-ti vnos, šteto od leve s sezana"
|
||||
" +N\tIzpiši N-ti vnos (začenši z nič), šteto od leve s seznama,\n"
|
||||
"\tki ga prikaže dirs brez dodatnih izbir\n"
|
||||
" -N\tIzpiši N-ti vnos (začenši z nič), šteto od desne s seznama,\n"
|
||||
"\tki ga prikaže dirs brez dodatnih izbir"
|
||||
|
||||
#: builtins/pushd.def:705
|
||||
msgid ""
|
||||
@@ -651,6 +653,23 @@ msgid ""
|
||||
" \n"
|
||||
" The `dirs' builtin displays the directory stack."
|
||||
msgstr ""
|
||||
"Doda imenik na vrh sklada imenikov ali zavrti imenike na skladu tako,\n"
|
||||
" da je trenutni delovni imenik na vrhu sklada. Brez argumentov zamenja\n"
|
||||
" vrstnih red prvih dveh imenikov na skladu.\n"
|
||||
"\n"
|
||||
" Izbire:\n"
|
||||
" -n\tBrez običajne zamenjave imenikov ob dodajanju imenikov\n"
|
||||
"\tna sklad, tako da se spreminja le sklad.\n"
|
||||
"\n"
|
||||
" Argumenti:\n"
|
||||
" +N\tZavrti sklad imenikov tako, da je na vrhu N-ti imenik\n"
|
||||
"\t(začenši od nič, šteto od leve s seznama, ki ga prikaže »dirs«)\n"
|
||||
" -N\tZavrti sklad imenikov tako, da je na vrhu N-ti imenik\n"
|
||||
"\t(začenši od nič, šteto od desne s seznama, ki ga prikaže »dirs«)\n"
|
||||
" imenik\tDoda IMENIK na vrh sklada imenikov, tako da postane novi\n"
|
||||
"\ttrenutni delovni imenik.\n"
|
||||
"\n"
|
||||
" Vgrajeni ukaz »dirs« izpiše sklad imenikov."
|
||||
|
||||
#: builtins/pushd.def:730
|
||||
msgid ""
|
||||
@@ -672,6 +691,22 @@ msgid ""
|
||||
" \n"
|
||||
" The `dirs' builtin displays the directory stack."
|
||||
msgstr ""
|
||||
"Odstrani vnose s sklada imenikov. Brez podanih argumentov odstrani vrhnji\n"
|
||||
" imenik s sklada in nas prestavi v novi vrhnji imenik.\n"
|
||||
"\n"
|
||||
" Izbire:\n"
|
||||
" -n\tBrez običajne zamenjave imenika pri odstranitvi imenika\n"
|
||||
"\ts sklada, tako da je spremenjen le sklad imenikov.\n"
|
||||
"\n"
|
||||
" Argumenti:\n"
|
||||
" +N\tOdstrani N-ti vnos (začenši od nič) šteto od leve s seznama,\n"
|
||||
"\tki ga prikaže »dirs«. Zgled: »popd +0« odstrani s sklada vrhnji\n"
|
||||
"\timenik, »popd +1« drugega itd.\n"
|
||||
" -N\tOdstrani N-ti vnos (začenši od nič) šteto od desne s seznama,\n"
|
||||
"\tki ga prikaže »dirs«. Zgled: »popd -0« odstrani s sklada zadnji\n"
|
||||
"\timenik, »popd -1« predzadnjega itd.\n"
|
||||
"\n"
|
||||
" Vgrajeni ukaz »dirs« izpiše sklad imenikov."
|
||||
|
||||
#: builtins/read.def:252
|
||||
#, c-format
|
||||
@@ -3874,6 +3909,14 @@ msgid ""
|
||||
" Exit Status:\n"
|
||||
" Returns success unless an invalid option is supplied or an error occurs."
|
||||
msgstr ""
|
||||
"Prikaži mogoče dopolnitve glede na izbire.\n"
|
||||
"\n"
|
||||
" Ukaz je namenjen uporabi znotraj lupinske funkcije za generiranje\n"
|
||||
" mogočih dopolnitev. Če je podana neobvezna izbira BESEDA, se ustvarijo\n"
|
||||
" dopolnitve, ujemajoče se z BESEDO.\n"
|
||||
"\n"
|
||||
" Izhodni status:\n"
|
||||
" Vedno uspel, razen če je podana neveljavna izbira ali v primeru napake."
|
||||
|
||||
#: builtins.c:1956
|
||||
msgid ""
|
||||
|
||||
+7
-1
@@ -316,6 +316,7 @@ make_command_string_internal (command)
|
||||
cprintf ("( ");
|
||||
skip_this_indent++;
|
||||
make_command_string_internal (command->value.Subshell->command);
|
||||
PRINT_DEFERRED_HEREDOCS ("");
|
||||
cprintf (" )");
|
||||
break;
|
||||
|
||||
@@ -604,6 +605,7 @@ print_arith_for_command (arith_for_command)
|
||||
newline ("do\n");
|
||||
indentation += indentation_amount;
|
||||
make_command_string_internal (arith_for_command->action);
|
||||
PRINT_DEFERRED_HEREDOCS ("");
|
||||
semicolon ();
|
||||
indentation -= indentation_amount;
|
||||
newline ("done");
|
||||
@@ -665,6 +667,7 @@ print_group_command (group_command)
|
||||
}
|
||||
|
||||
make_command_string_internal (group_command->command);
|
||||
PRINT_DEFERRED_HEREDOCS ("");
|
||||
|
||||
if (inside_function_def)
|
||||
{
|
||||
@@ -1268,6 +1271,7 @@ print_function_def (func)
|
||||
make_command_string_internal (cmdcopy->type == cm_group
|
||||
? cmdcopy->value.Group->command
|
||||
: cmdcopy);
|
||||
/* XXX - PRINT_DEFERRED_HEREDOCS (""); ? */
|
||||
|
||||
remove_unwind_protect ();
|
||||
indentation -= indentation_amount;
|
||||
@@ -1339,6 +1343,7 @@ named_function_string (name, command, flags)
|
||||
make_command_string_internal (cmdcopy->type == cm_group
|
||||
? cmdcopy->value.Group->command
|
||||
: cmdcopy);
|
||||
/* XXX - PRINT_DEFERRED_HEREDOCS (""); ? */
|
||||
|
||||
indentation = old_indent;
|
||||
indentation_amount = old_amount;
|
||||
@@ -1367,7 +1372,8 @@ named_function_string (name, command, flags)
|
||||
}
|
||||
#else
|
||||
if (result[2] == '\n') /* XXX -- experimental */
|
||||
strcpy (result + 2, result + 3);
|
||||
memmove (result + 2, result + 3, strlen (result) - 2);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -636,7 +636,7 @@ sigprocmask (operation, newset, oldset)
|
||||
break;
|
||||
|
||||
case SIG_SETMASK:
|
||||
sigsetmask (new);
|
||||
old = sigsetmask (new);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -96,6 +96,8 @@ do { \
|
||||
sigprocmask (SIG_BLOCK, &nvar, &ovar); \
|
||||
} while (0)
|
||||
|
||||
#define UNBLOCK_SIGNAL(ovar) sigprocmask (SIG_SETMASK, &ovar, (sigset_t)NULL)
|
||||
|
||||
#if defined (HAVE_POSIX_SIGNALS)
|
||||
# define BLOCK_CHILD(nvar, ovar) \
|
||||
BLOCK_SIGNAL (SIGCHLD, nvar, ovar)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
UNSET LC_ALL LC_CTYPE
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
case $(printf %d\\n \'À) in
|
||||
|
||||
@@ -533,6 +533,8 @@ set_signal (sig, string)
|
||||
int sig;
|
||||
char *string;
|
||||
{
|
||||
sigset_t set, oset;
|
||||
|
||||
if (SPECIAL_TRAP (sig))
|
||||
{
|
||||
change_signal (sig, savestring (string));
|
||||
@@ -563,9 +565,10 @@ set_signal (sig, string)
|
||||
environment in which it is safe to do so. */
|
||||
if ((sigmodes[sig] & SIG_NO_TRAP) == 0)
|
||||
{
|
||||
set_signal_handler (sig, SIG_IGN);
|
||||
BLOCK_SIGNAL (sig, set, oset);
|
||||
change_signal (sig, savestring (string));
|
||||
set_signal_handler (sig, trap_handler);
|
||||
UNBLOCK_SIGNAL (oset);
|
||||
}
|
||||
else
|
||||
change_signal (sig, savestring (string));
|
||||
|
||||
Reference in New Issue
Block a user