doc/{bash.1,bashref.texi}
- document new -@ option to cd builtin
+
+ 10/28
+ -----
+lib/glob/{{gmisc,glob}.c,glob.h}
+ - extglob_pattern renamed to extglob_pattern_p, declared in glob.h
+
+subst.c
+ - expand_word_internal: typo fix: case to fix " $@\ " bug in bash-4.2
+ had a typo (& isexp instead of &&)
+
+ 10/29
+ -----
+input.c
+ - getc_with_restart: make sure local_index and local_bufused are
+ reset to 0 before returning EOF, in case we are running an interactive
+ shell without line editing and ignoreeof is set. Report and fix
+ from Yong Zhang <yong.zhang@windriver.com>
+
+lib/readline/search.c
+ - _rl_nsearch_init: take out extra third argument to rl_message; it
+ only matches prototype (and maybe format) in cases where
+ PREFER_STDARG and USE_VARARGS are both undefined, which is rare
+
+ 10/31
+ -----
+subst.c
+ - process_substitute: when opening the named pipe in the child, open
+ without O_NONBLOCK to avoid race conditions. Happens often on AIX.
+ Bug report and fix from Michael Haubenwallner
+ <michael.haubenwallner@salomon.at>
+
+builtins/ulimit.def
+ - RLIMIT_NTHR: if RLIMIT_PTHREAD is not defined, but RLIMIT_NTHR is,
+ use RLIMIT_NTHR (NetBSD)
- BASH_CHECK_MULTIBYTE: check for wcwidth being broken with unicode
combining characters needs a value to use when cross-compiling.
Bug report from Bert Sutherland <bertsutherland@gmail.com>
+
+doc/{bash.1,bashref.texi}
+ - document new -@ option to cd builtin
+
+ 10/28
+ -----
+lib/glob/{{gmisc,glob}.c,glob.h}
+ - extglob_pattern renamed to extglob_pattern_p, declared in glob.h
+
+subst.c
+ - expand_word_internal: typo fix: case to fix " $@\ " bug in bash-4.2
+ had a typo (& isexp instead of &&)
+
+ 10/29
+ -----
+input.c
+ - getc_with_restart: make sure local_index and local_bufused are
+ reset to 0 before returning EOF, in case we are running an interactive
+ shell without line editing and ignoreeof is set. Report and fix
+ from Yong Zhang <yong.zhang@windriver.com>
+
+lib/readline/search.c
+ - _rl_nsearch_init: take out extra third argument to rl_message; it
+ only matches prototype (and maybe format) in cases where
+ PREFER_STDARG and USE_VARARGS are both undefined, which is rare
+
+ 10/31
+ -----
+subst.c
+ - process_substitute: when opening the named pipe in the child, open
+ without O_NONBLOCK to avoid race conditions. Happens often on AIX.
+ Bug report and fix from Michael Haubenwallner
+ <michael.haubenwallner@salomon.at>
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
+ bash_cv_wcwidth_broken=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
'configure.ac'
],
{
- 'AM_PROG_F77_C_O' => 1,
'_LT_AC_TAGCONFIG' => 1,
- 'm4_pattern_forbid' => 1,
+ 'AM_PROG_F77_C_O' => 1,
'AC_INIT' => 1,
- 'AC_CANONICAL_TARGET' => 1,
+ 'm4_pattern_forbid' => 1,
'_AM_COND_IF' => 1,
- 'AC_CONFIG_LIBOBJ_DIR' => 1,
+ 'AC_CANONICAL_TARGET' => 1,
'AC_SUBST' => 1,
- 'AC_CANONICAL_HOST' => 1,
+ 'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_FC_SRCEXT' => 1,
+ 'AC_CANONICAL_HOST' => 1,
'AC_PROG_LIBTOOL' => 1,
'AM_INIT_AUTOMAKE' => 1,
- 'AC_CONFIG_SUBDIRS' => 1,
'AM_PATH_GUILE' => 1,
+ 'AC_CONFIG_SUBDIRS' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
- 'AC_CONFIG_LINKS' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
- 'LT_SUPPORTED_TAG' => 1,
+ 'AC_CONFIG_LINKS' => 1,
'm4_sinclude' => 1,
+ 'LT_SUPPORTED_TAG' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_NLS' => 1,
'AC_FC_PP_DEFINE' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
- '_m4_warn' => 1,
'AM_MAKEFILE_INCLUDE' => 1,
+ '_m4_warn' => 1,
'AM_PROG_CXX_C_O' => 1,
- '_AM_MAKEFILE_INCLUDE' => 1,
'_AM_COND_ENDIF' => 1,
+ '_AM_MAKEFILE_INCLUDE' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AM_SILENT_RULES' => 1,
'AM_PROG_MOC' => 1,
'AC_CONFIG_FILES' => 1,
- 'LT_INIT' => 1,
'include' => 1,
- 'AM_GNU_GETTEXT' => 1,
+ 'LT_INIT' => 1,
'AM_PROG_AR' => 1,
+ 'AM_GNU_GETTEXT' => 1,
'AC_LIBSOURCE' => 1,
- 'AC_CANONICAL_BUILD' => 1,
'AM_PROG_FC_C_O' => 1,
+ 'AC_CANONICAL_BUILD' => 1,
'AC_FC_FREEFORM' => 1,
- 'AC_FC_PP_SRCEXT' => 1,
'AH_OUTPUT' => 1,
- 'AC_CONFIG_AUX_DIR' => 1,
+ 'AC_FC_PP_SRCEXT' => 1,
'_AM_SUBST_NOTMAKE' => 1,
- 'm4_pattern_allow' => 1,
- 'AM_PROG_CC_C_O' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
'sinclude' => 1,
- 'AM_CONDITIONAL' => 1,
- 'AC_CANONICAL_SYSTEM' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'm4_pattern_allow' => 1,
'AM_XGETTEXT_OPTION' => 1,
+ 'AC_CANONICAL_SYSTEM' => 1,
+ 'AM_CONDITIONAL' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AM_POT_TOOLS' => 1,
../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from...
aclocal.m4:1689: BASH_CHECK_MULTIBYTE is expanded from...
configure.ac:849: the top level])
-m4trace:configure.ac:849: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [../../lib/autoconf/general.m4:2748: AC_RUN_IFELSE is expanded from...
-../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from...
-../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
-../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from...
-../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from...
-aclocal.m4:1689: BASH_CHECK_MULTIBYTE is expanded from...
-configure.ac:849: the top level])
m4trace:configure.ac:849: -1- AC_DEFINE_TRACE_LITERAL([WCWIDTH_BROKEN])
m4trace:configure.ac:849: -1- m4_pattern_allow([^WCWIDTH_BROKEN$])
m4trace:configure.ac:849: -1- AH_OUTPUT([WCWIDTH_BROKEN], [/* wcwidth is usually not broken */
#include "findcmd.h"
#include "pathexp.h"
#include "shmbutil.h"
+#include "trap.h"
#include "builtins/common.h"
bashline_reset_event_hook ();
check_signals_and_traps (); /* XXX */
+ return 0;
}
#endif /* READLINE */
#include "findcmd.h"
#include "pathexp.h"
#include "shmbutil.h"
+#include "trap.h"
#include "builtins/common.h"
/* Helper functions for Readline. */
static char *restore_tilde __P((char *, char *));
+static char *maybe_restore_tilde __P((char *, char *));
static char *bash_filename_rewrite_hook __P((char *, int));
{
if (*hint_text == '~' && directory_part)
{
- temp = restore_tilde (val, directory_part);
+ temp = maybe_restore_tilde (val, directory_part);
free (val);
val = temp;
}
/* If we performed tilde expansion, restore the original
filename. */
if (*hint_text == '~')
- temp = restore_tilde (val, directory_part);
+ temp = maybe_restore_tilde (val, directory_part);
else
temp = savestring (val);
freetemp = 1;
return (ret);
}
+static char *
+maybe_restore_tilde (val, directory_part)
+ char *val, *directory_part;
+{
+ rl_icppfunc_t *save;
+ char *ret;
+
+ save = (dircomplete_expand == 0) ? save_directory_hook () : (rl_icppfunc_t *)0;
+ ret = restore_tilde (val, directory_part);
+ if (save)
+ restore_directory_hook (save);
+ return ret;
+}
+
/* Simulate the expansions that will be performed by
rl_filename_completion_function. This must be called with the address of
a pointer to malloc'd memory. */
if (ISDIGIT (rhs[0]) || ((rhs[0] == '+' || rhs[0] == '-') && ISDIGIT (rhs[1])))
{
rhs_t = ST_INT;
- errno == 0;
+ errno = 0;
tr = strtoimax (rhs, &ep, 10);
if (errno == ERANGE || (ep && *ep != 0 && *ep != '.'))
rhs_t = ST_BAD; /* invalid */
--- /dev/null
+/* braces.c -- code for doing word expansion in curly braces. */
+
+/* Copyright (C) 1987-2012 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Stuff in curly braces gets expanded before all other shell expansions. */
+
+#include "config.h"
+
+#if defined (BRACE_EXPANSION)
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <errno.h>
+
+#include "bashansi.h"
+
+#if defined (SHELL)
+# include "shell.h"
+#endif /* SHELL */
+
+#include "typemax.h" /* INTMAX_MIN, INTMAX_MAX */
+#include "general.h"
+#include "shmbutil.h"
+#include "chartypes.h"
+
+#ifndef errno
+extern int errno;
+#endif
+
+#define brace_whitespace(c) (!(c) || (c) == ' ' || (c) == '\t' || (c) == '\n')
+
+#define BRACE_SEQ_SPECIFIER ".."
+
+extern int asprintf __P((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3)));
+
+extern int last_command_exit_value;
+
+/* Basic idea:
+
+ Segregate the text into 3 sections: preamble (stuff before an open brace),
+ postamble (stuff after the matching close brace) and amble (stuff after
+ preamble, and before postamble). Expand amble, and then tack on the
+ expansions to preamble. Expand postamble, and tack on the expansions to
+ the result so far.
+ */
+
+/* The character which is used to separate arguments. */
+static const int brace_arg_separator = ',';
+
+#if defined (__P)
+static int brace_gobbler __P((char *, size_t, int *, int));
+static char **expand_amble __P((char *, size_t, int));
+static char **expand_seqterm __P((char *, size_t));
+static char **mkseq __P((intmax_t, intmax_t, intmax_t, int, int));
+static char **array_concat __P((char **, char **));
+#else
+static int brace_gobbler ();
+static char **expand_amble ();
+static char **expand_seqterm ();
+static char **mkseq();
+static char **array_concat ();
+#endif
+
+#if 0
+static void
+dump_result (a)
+ char **a;
+{
+ int i;
+
+ for (i = 0; a[i]; i++)
+ printf ("dump_result: a[%d] = -%s-\n", i, a[i]);
+}
+#endif
+
+/* Return an array of strings; the brace expansion of TEXT. */
+char **
+brace_expand (text)
+ char *text;
+{
+ register int start;
+ size_t tlen;
+ char *preamble, *postamble, *amble;
+ size_t alen;
+ char **tack, **result;
+ int i, j, c, c1;
+
+ DECLARE_MBSTATE;
+
+ /* Find the text of the preamble. */
+ tlen = strlen (text);
+ i = 0;
+#if defined (CSH_BRACE_COMPAT)
+ c = brace_gobbler (text, tlen, &i, '{'); /* } */
+#else
+ /* Make sure that when we exit this loop, c == 0 or text[i] begins a
+ valid brace expansion sequence. */
+ do
+ {
+ c = brace_gobbler (text, tlen, &i, '{'); /* } */
+ c1 = c;
+ /* Verify that c begins a valid brace expansion word. If it doesn't, we
+ go on. Loop stops when there are no more open braces in the word. */
+ if (c)
+ {
+ start = j = i + 1; /* { */
+ c = brace_gobbler (text, tlen, &j, '}');
+ if (c == 0) /* it's not */
+ {
+ i++;
+ c = c1;
+ continue;
+ }
+ else /* it is */
+ {
+ c = c1;
+ break;
+ }
+ }
+ else
+ break;
+ }
+ while (c);
+#endif /* !CSH_BRACE_COMPAT */
+
+ preamble = (char *)xmalloc (i + 1);
+ if (i > 0)
+ strncpy (preamble, text, i);
+ preamble[i] = '\0';
+
+ result = (char **)xmalloc (2 * sizeof (char *));
+ result[0] = preamble;
+ result[1] = (char *)NULL;
+
+ /* Special case. If we never found an exciting character, then
+ the preamble is all of the text, so just return that. */
+ if (c != '{')
+ return (result);
+
+ /* Find the amble. This is the stuff inside this set of braces. */
+ start = ++i;
+ c = brace_gobbler (text, tlen, &i, '}');
+
+ /* What if there isn't a matching close brace? */
+ if (c == 0)
+ {
+#if defined (NOTDEF)
+ /* Well, if we found an unquoted BRACE_ARG_SEPARATOR between START
+ and I, then this should be an error. Otherwise, it isn't. */
+ j = start;
+ while (j < i)
+ {
+ if (text[j] == '\\')
+ {
+ j++;
+ ADVANCE_CHAR (text, tlen, j);
+ continue;
+ }
+
+ if (text[j] == brace_arg_separator)
+ { /* { */
+ strvec_dispose (result);
+ last_command_exit_value = 1;
+ report_error ("no closing `%c' in %s", '}', text);
+ throw_to_top_level ();
+ }
+ ADVANCE_CHAR (text, tlen, j);
+ }
+#endif
+ free (preamble); /* Same as result[0]; see initialization. */
+ result[0] = savestring (text);
+ return (result);
+ }
+
+#if defined (SHELL)
+ amble = substring (text, start, i);
+ alen = i - start;
+#else
+ amble = (char *)xmalloc (1 + (i - start));
+ strncpy (amble, &text[start], (i - start));
+ alen = i - start;
+ amble[alen] = '\0';
+#endif
+
+#if defined (SHELL)
+ INITIALIZE_MBSTATE;
+
+ /* If the amble does not contain an unquoted BRACE_ARG_SEPARATOR, then
+ just return without doing any expansion. */
+ j = 0;
+ while (amble[j])
+ {
+ if (amble[j] == '\\')
+ {
+ j++;
+ ADVANCE_CHAR (amble, alen, j);
+ continue;
+ }
+
+ if (amble[j] == brace_arg_separator)
+ break;
+
+ ADVANCE_CHAR (amble, alen, j);
+ }
+
+ if (amble[j] == 0)
+ {
+ tack = expand_seqterm (amble, alen);
+ if (tack)
+ goto add_tack;
+ else if (text[i + 1])
+ {
+ /* If the sequence expansion fails (e.g., because the integers
+ overflow), but there is more in the string, try and process
+ the rest of the string, which may contain additional brace
+ expansions. Treat the unexpanded sequence term as a simple
+ string (including the braces). */
+ tack = strvec_create (2);
+ tack[0] = savestring (text+start-1);
+ tack[0][i-start+2] = '\0';
+ tack[1] = (char *)0;
+ goto add_tack;
+ }
+ else
+ {
+ free (amble);
+ free (preamble);
+ result[0] = savestring (text);
+ return (result);
+ }
+ }
+#endif /* SHELL */
+
+ tack = expand_amble (amble, alen, 0);
+add_tack:
+ result = array_concat (result, tack);
+ free (amble);
+ if (tack != result)
+ strvec_dispose (tack);
+
+ postamble = text + i + 1;
+
+ if (postamble && *postamble)
+ {
+ tack = brace_expand (postamble);
+ result = array_concat (result, tack);
+ if (tack != result)
+ strvec_dispose (tack);
+ }
+
+ return (result);
+}
+
+/* Expand the text found inside of braces. We simply try to split the
+ text at BRACE_ARG_SEPARATORs into separate strings. We then brace
+ expand each slot which needs it, until there are no more slots which
+ need it. */
+static char **
+expand_amble (text, tlen, flags)
+ char *text;
+ size_t tlen;
+ int flags;
+{
+ char **result, **partial;
+ char *tem;
+ int start, i, c;
+
+ DECLARE_MBSTATE;
+
+ result = (char **)NULL;
+
+ start = i = 0;
+ c = 1;
+ while (c)
+ {
+ c = brace_gobbler (text, tlen, &i, brace_arg_separator);
+#if defined (SHELL)
+ tem = substring (text, start, i);
+#else
+ tem = (char *)xmalloc (1 + (i - start));
+ strncpy (tem, &text[start], (i - start));
+ tem[i- start] = '\0';
+#endif
+
+ partial = brace_expand (tem);
+
+ if (!result)
+ result = partial;
+ else
+ {
+ register int lr, lp, j;
+
+ lr = strvec_len (result);
+ lp = strvec_len (partial);
+
+ result = strvec_resize (result, lp + lr + 1);
+
+ for (j = 0; j < lp; j++)
+ result[lr + j] = partial[j];
+
+ result[lr + j] = (char *)NULL;
+ free (partial);
+ }
+ free (tem);
+ ADVANCE_CHAR (text, tlen, i);
+ start = i;
+ }
+ return (result);
+}
+
+#define ST_BAD 0
+#define ST_INT 1
+#define ST_CHAR 2
+#define ST_ZINT 3
+
+#ifndef sh_imaxabs
+# define sh_imaxabs(x) (((x) >= 0) ? (x) : -(x))
+#endif
+
+/* Handle signed arithmetic overflow and underflow. Have to do it this way
+ to avoid compilers optimizing out simpler overflow checks. */
+
+/* Make sure that a+b does not exceed MAXV or is smaller than MINV (if b < 0).
+ Assumes that b > 0 if a > 0 and b < 0 if a < 0 */
+#define ADDOVERFLOW(a,b,minv,maxv) \
+ ((((a) > 0) && ((b) > ((maxv) - (a)))) || \
+ (((a) < 0) && ((b) < ((minv) - (a)))))
+
+/* Make sure that a-b is not smaller than MINV or exceeds MAXV (if b < 0).
+ Assumes that b > 0 if a > 0 and b < 0 if a < 0 */
+#define SUBOVERFLOW(a,b,minv,maxv) \
+ ((((b) > 0) && ((a) < ((minv) + (b)))) || \
+ (((b) < 0) && ((a) > ((maxv) + (b)))))
+
+static char **
+mkseq (start, end, incr, type, width)
+ intmax_t start, end, incr;
+ int type, width;
+{
+ intmax_t n, prevn;
+ int i, nelem;
+ char **result, *t;
+
+ if (incr == 0)
+ incr = 1;
+
+ if (start > end && incr > 0)
+ incr = -incr;
+ else if (start < end && incr < 0)
+ {
+ if (incr == INTMAX_MIN) /* Don't use -INTMAX_MIN */
+ return ((char **)NULL);
+ incr = -incr;
+ }
+
+ /* Check that end-start will not overflow INTMAX_MIN, INTMAX_MAX. The +3
+ and -2, not strictly necessary, are there because of the way the number
+ of elements and value passed to strvec_create() are calculated below. */
+ if (SUBOVERFLOW (end, start, INTMAX_MIN+3, INTMAX_MAX-2))
+ return ((char **)NULL);
+
+ prevn = sh_imaxabs (end - start);
+ /* Need to check this way in case INT_MAX == INTMAX_MAX */
+ if (INT_MAX == INTMAX_MAX && (ADDOVERFLOW (prevn, 2, INT_MIN, INT_MAX)))
+ return ((char **)NULL);
+ /* Make sure the assignment to nelem below doesn't end up <= 0 due to
+ intmax_t overflow */
+ else if (ADDOVERFLOW ((prevn/sh_imaxabs(incr)), 1, INTMAX_MIN, INTMAX_MAX))
+ return ((char **)NULL);
+
+ /* XXX - TOFIX: potentially allocating a lot of extra memory if
+ imaxabs(incr) != 1 */
+ /* Instead of a simple nelem = prevn + 1, something like:
+ nelem = (prevn / imaxabs(incr)) + 1;
+ would work */
+ nelem = (prevn / sh_imaxabs(incr)) + 1;
+ if (nelem > INT_MAX - 2) /* Don't overflow int */
+ return ((char **)NULL);
+ result = strvec_create (nelem + 1);
+
+ /* Make sure we go through the loop at least once, so {3..3} prints `3' */
+ i = 0;
+ n = start;
+ do
+ {
+#if defined (SHELL)
+ QUIT; /* XXX - memory leak here */
+#endif
+ if (type == ST_INT)
+ result[i++] = itos (n);
+ else if (type == ST_ZINT)
+ {
+ int len, arg;
+ arg = n;
+ len = asprintf (&t, "%0*d", width, arg);
+ result[i++] = t;
+ }
+ else
+ {
+ t = (char *)xmalloc (2);
+ t[0] = n;
+ t[1] = '\0';
+ result[i++] = t;
+ }
+
+ /* Handle overflow and underflow of n+incr */
+ if (ADDOVERFLOW (n, incr, INTMAX_MIN, INTMAX_MAX))
+ break;
+
+ n += incr;
+
+ if ((incr < 0 && n < end) || (incr > 0 && n > end))
+ break;
+ }
+ while (1);
+
+ result[i] = (char *)0;
+ return (result);
+}
+
+static char **
+expand_seqterm (text, tlen)
+ char *text;
+ size_t tlen;
+{
+ char *t, *lhs, *rhs;
+ int i, lhs_t, rhs_t, lhs_l, rhs_l, width;
+ intmax_t lhs_v, rhs_v, incr;
+ intmax_t tl, tr;
+ char **result, *ep, *oep;
+
+ t = strstr (text, BRACE_SEQ_SPECIFIER);
+ if (t == 0)
+ return ((char **)NULL);
+
+ lhs_l = t - text; /* index of start of BRACE_SEQ_SPECIFIER */
+ lhs = substring (text, 0, lhs_l);
+ rhs = substring (text, lhs_l + sizeof(BRACE_SEQ_SPECIFIER) - 1, tlen);
+
+ if (lhs[0] == 0 || rhs[0] == 0)
+ {
+ free (lhs);
+ free (rhs);
+ return ((char **)NULL);
+ }
+
+ /* Now figure out whether LHS and RHS are integers or letters. Both
+ sides have to match. */
+ lhs_t = (legal_number (lhs, &tl)) ? ST_INT :
+ ((ISALPHA (lhs[0]) && lhs[1] == 0) ? ST_CHAR : ST_BAD);
+
+ /* Decide on rhs and whether or not it looks like the user specified
+ an increment */
+ ep = 0;
+ if (ISDIGIT (rhs[0]) || ((rhs[0] == '+' || rhs[0] == '-') && ISDIGIT (rhs[1])))
+ {
+ rhs_t = ST_INT;
+ errno == 0;
+ tr = strtoimax (rhs, &ep, 10);
+ if (errno == ERANGE || (ep && *ep != 0 && *ep != '.'))
+ rhs_t = ST_BAD; /* invalid */
+ }
+ else if (ISALPHA (rhs[0]) && (rhs[1] == 0 || rhs[1] == '.'))
+ {
+ rhs_t = ST_CHAR;
+ ep = rhs + 1;
+ }
+ else
+ {
+ rhs_t = ST_BAD;
+ ep = 0;
+ }
+
+ incr = 1;
+ if (rhs_t != ST_BAD)
+ {
+ oep = ep;
+ errno = 0;
+ if (ep && *ep == '.' && ep[1] == '.' && ep[2])
+ incr = strtoimax (ep + 2, &ep, 10);
+ if (*ep != 0 || errno == ERANGE)
+ rhs_t = ST_BAD; /* invalid incr or overflow */
+ tlen -= ep - oep;
+ }
+
+ if (lhs_t != rhs_t || lhs_t == ST_BAD || rhs_t == ST_BAD)
+ {
+ free (lhs);
+ free (rhs);
+ return ((char **)NULL);
+ }
+
+ /* OK, we have something. It's either a sequence of integers, ascending
+ or descending, or a sequence or letters, ditto. Generate the sequence,
+ put it into a string vector, and return it. */
+
+ if (lhs_t == ST_CHAR)
+ {
+ lhs_v = (unsigned char)lhs[0];
+ rhs_v = (unsigned char)rhs[0];
+ width = 1;
+ }
+ else
+ {
+ lhs_v = tl; /* integer truncation */
+ rhs_v = tr;
+
+ /* Decide whether or not the terms need zero-padding */
+ rhs_l = tlen - lhs_l - sizeof (BRACE_SEQ_SPECIFIER) + 1;
+ width = 0;
+ if (lhs_l > 1 && lhs[0] == '0')
+ width = lhs_l, lhs_t = ST_ZINT;
+ if (lhs_l > 2 && lhs[0] == '-' && lhs[1] == '0')
+ width = lhs_l, lhs_t = ST_ZINT;
+ if (rhs_l > 1 && rhs[0] == '0' && width < rhs_l)
+ width = rhs_l, lhs_t = ST_ZINT;
+ if (rhs_l > 2 && rhs[0] == '-' && rhs[1] == '0' && width < rhs_l)
+ width = rhs_l, lhs_t = ST_ZINT;
+
+ if (width < lhs_l && lhs_t == ST_ZINT)
+ width = lhs_l;
+ if (width < rhs_l && lhs_t == ST_ZINT)
+ width = rhs_l;
+ }
+
+ result = mkseq (lhs_v, rhs_v, incr, lhs_t, width);
+
+ free (lhs);
+ free (rhs);
+
+ return (result);
+}
+
+/* Start at INDEX, and skip characters in TEXT. Set INDEX to the
+ index of the character matching SATISFY. This understands about
+ quoting. Return the character that caused us to stop searching;
+ this is either the same as SATISFY, or 0. */
+/* If SATISFY is `}', we are looking for a brace expression, so we
+ should enforce the rules that govern valid brace expansions:
+ 1) to count as an arg separator, a comma or `..' has to be outside
+ an inner set of braces.
+*/
+static int
+brace_gobbler (text, tlen, indx, satisfy)
+ char *text;
+ size_t tlen;
+ int *indx;
+ int satisfy;
+{
+ register int i, c, quoted, level, commas, pass_next;
+#if defined (SHELL)
+ int si;
+ char *t;
+#endif
+ DECLARE_MBSTATE;
+
+ level = quoted = pass_next = 0;
+#if defined (CSH_BRACE_COMPAT)
+ commas = 1;
+#else
+ commas = (satisfy == '}') ? 0 : 1;
+#endif
+
+ i = *indx;
+ while (c = text[i])
+ {
+ if (pass_next)
+ {
+ pass_next = 0;
+ ADVANCE_CHAR (text, tlen, i);
+ continue;
+ }
+
+ /* A backslash escapes the next character. This allows backslash to
+ escape the quote character in a double-quoted string. */
+ if (c == '\\' && (quoted == 0 || quoted == '"' || quoted == '`'))
+ {
+ pass_next = 1;
+ i++;
+ continue;
+ }
+
+#if defined (SHELL)
+ /* If compiling for the shell, treat ${...} like \{...} */
+ if (c == '$' && text[i+1] == '{' && quoted != '\'') /* } */
+ {
+ pass_next = 1;
+ i++;
+ if (quoted == 0)
+ level++;
+ continue;
+ }
+#endif
+
+ if (quoted)
+ {
+ if (c == quoted)
+ quoted = 0;
+#if defined (SHELL)
+ /* The shell allows quoted command substitutions */
+ if (quoted == '"' && c == '$' && text[i+1] == '(') /*)*/
+ goto comsub;
+#endif
+ ADVANCE_CHAR (text, tlen, i);
+ continue;
+ }
+
+ if (c == '"' || c == '\'' || c == '`')
+ {
+ quoted = c;
+ i++;
+ continue;
+ }
+
+#if defined (SHELL)
+ /* Pass new-style command and process substitutions through unchanged. */
+ if ((c == '$' || c == '<' || c == '>') && text[i+1] == '(') /* ) */
+ {
+comsub:
+ si = i + 2;
+ t = extract_command_subst (text, &si, 0);
+ i = si;
+ free (t);
+ i++;
+ continue;
+ }
+#endif
+
+ if (c == satisfy && level == 0 && quoted == 0 && commas > 0)
+ {
+ /* We ignore an open brace surrounded by whitespace, and also
+ an open brace followed immediately by a close brace preceded
+ by whitespace. */
+ if (c == '{' &&
+ ((!i || brace_whitespace (text[i - 1])) &&
+ (brace_whitespace (text[i + 1]) || text[i + 1] == '}')))
+ {
+ i++;
+ continue;
+ }
+
+ break;
+ }
+
+ if (c == '{')
+ level++;
+ else if (c == '}' && level)
+ level--;
+#if !defined (CSH_BRACE_COMPAT)
+ else if (satisfy == '}' && c == brace_arg_separator && level == 0)
+ commas++;
+ else if (satisfy == '}' && STREQN (text+i, BRACE_SEQ_SPECIFIER, 2) &&
+ text[i+2] != satisfy && level == 0)
+ commas++;
+#endif
+
+ ADVANCE_CHAR (text, tlen, i);
+ }
+
+ *indx = i;
+ return (c);
+}
+
+/* Return 1 if ARR has any non-empty-string members. Used to short-circuit
+ in array_concat() below. */
+static int
+degenerate_array (arr)
+ char **arr;
+{
+ register int i;
+
+ for (i = 0; arr[i]; i++)
+ if (arr[i][0] != '\0')
+ return 0;
+ return 1;
+}
+
+/* Return a new array of strings which is the result of appending each
+ string in ARR2 to each string in ARR1. The resultant array is
+ len (arr1) * len (arr2) long. For convenience, ARR1 (and its contents)
+ are free ()'ed. ARR1 can be NULL, in that case, a new version of ARR2
+ is returned. */
+static char **
+array_concat (arr1, arr2)
+ char **arr1, **arr2;
+{
+ register int i, j, len, len1, len2;
+ register char **result;
+
+ if (arr1 == 0)
+ return (arr2); /* XXX - see if we can get away without copying? */
+
+ if (arr2 == 0)
+ return (arr1); /* XXX - caller expects us to free arr1 */
+
+ /* We can only short-circuit if the array consists of a single null element;
+ otherwise we need to replicate the contents of the other array and
+ prefix (or append, below) an empty element to each one. */
+ if (arr1[0] && arr1[0][0] == 0 && arr1[1] == 0)
+ {
+ strvec_dispose (arr1);
+ return (arr2); /* XXX - use flags to see if we can avoid copying here */
+ }
+
+ if (arr2[0] && arr2[0][0] == 0 && arr2[1] == 0)
+ return (arr1); /* XXX - rather than copying and freeing it */
+
+ len1 = strvec_len (arr1);
+ len2 = strvec_len (arr2);
+
+ result = (char **)xmalloc ((1 + (len1 * len2)) * sizeof (char *));
+
+ len = 0;
+ for (i = 0; i < len1; i++)
+ {
+ int strlen_1 = strlen (arr1[i]);
+
+ for (j = 0; j < len2; j++)
+ {
+ result[len] = (char *)xmalloc (1 + strlen_1 + strlen (arr2[j]));
+ strcpy (result[len], arr1[i]);
+ strcpy (result[len] + strlen_1, arr2[j]);
+ len++;
+ }
+ free (arr1[i]);
+ }
+ free (arr1);
+
+ result[len] = (char *)NULL;
+ return (result);
+}
+
+#if defined (TEST)
+#include <stdio.h>
+
+fatal_error (format, arg1, arg2)
+ char *format, *arg1, *arg2;
+{
+ report_error (format, arg1, arg2);
+ exit (1);
+}
+
+report_error (format, arg1, arg2)
+ char *format, *arg1, *arg2;
+{
+ fprintf (stderr, format, arg1, arg2);
+ fprintf (stderr, "\n");
+}
+
+main ()
+{
+ char example[256];
+
+ for (;;)
+ {
+ char **result;
+ int i;
+
+ fprintf (stderr, "brace_expand> ");
+
+ if ((!fgets (example, 256, stdin)) ||
+ (strncmp (example, "quit", 4) == 0))
+ break;
+
+ if (strlen (example))
+ example[strlen (example) - 1] = '\0';
+
+ result = brace_expand (example);
+
+ for (i = 0; result[i]; i++)
+ printf ("%s\n", result[i]);
+
+ free_array (result);
+ }
+}
+\f
+/*
+ * Local variables:
+ * compile-command: "gcc -g -Bstatic -DTEST -o brace_expand braces.c general.o"
+ * end:
+ */
+
+#endif /* TEST */
+#endif /* BRACE_EXPANSION */
# define RLIMIT_MAXUPROC 260
#endif
+#if !defined (RLIMIT_PTHREAD) && defined (RLIMIT_NTHR)
+# define RLIMIT_PTHREAD RLIMIT_NTHR
+#endif
+
#if !defined (RLIM_INFINITY)
# define RLIM_INFINITY 0x7fffffff
#endif
--- /dev/null
+This file is ulimit.def, from which is created ulimit.c.
+It implements the builtin "ulimit" in Bash.
+
+Copyright (C) 1987-2010 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES ulimit.c
+
+$BUILTIN ulimit
+$FUNCTION ulimit_builtin
+$DEPENDS_ON !_MINIX
+$SHORT_DOC ulimit [-SHabcdefilmnpqrstuvxT] [limit]
+Modify shell resource limits.
+
+Provides control over the resources available to the shell and processes
+it creates, on systems that allow such control.
+
+Options:
+ -S use the `soft' resource limit
+ -H use the `hard' resource limit
+ -a all current limits are reported
+ -b the socket buffer size
+ -c the maximum size of core files created
+ -d the maximum size of a process's data segment
+ -e the maximum scheduling priority (`nice')
+ -f the maximum size of files written by the shell and its children
+ -i the maximum number of pending signals
+ -l the maximum size a process may lock into memory
+ -m the maximum resident set size
+ -n the maximum number of open file descriptors
+ -p the pipe buffer size
+ -q the maximum number of bytes in POSIX message queues
+ -r the maximum real-time scheduling priority
+ -s the maximum stack size
+ -t the maximum amount of cpu time in seconds
+ -u the maximum number of user processes
+ -v the size of virtual memory
+ -x the maximum number of file locks
+ -T the maximum number of threads
+
+Not all options are available on all platforms.
+
+If LIMIT is given, it is the new value of the specified resource; the
+special LIMIT values `soft', `hard', and `unlimited' stand for the
+current soft limit, the current hard limit, and no limit, respectively.
+Otherwise, the current value of the specified resource is printed. If
+no option is given, then -f is assumed.
+
+Values are in 1024-byte increments, except for -t, which is in seconds,
+-p, which is in increments of 512 bytes, and -u, which is an unscaled
+number of processes.
+
+Exit Status:
+Returns success unless an invalid option is supplied or an error occurs.
+$END
+
+#if !defined (_MINIX)
+
+#include <config.h>
+
+#include "../bashtypes.h"
+#if defined (HAVE_SYS_PARAM_H)
+# include <sys/param.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "common.h"
+#include "bashgetopt.h"
+#include "pipesize.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+/* For some reason, HPUX chose to make these definitions visible only if
+ _KERNEL is defined, so we define _KERNEL before including <sys/resource.h>
+ and #undef it afterward. */
+#if defined (HAVE_RESOURCE)
+# include <sys/time.h>
+# if defined (HPUX) && defined (RLIMIT_NEEDS_KERNEL)
+# define _KERNEL
+# endif
+# include <sys/resource.h>
+# if defined (HPUX) && defined (RLIMIT_NEEDS_KERNEL)
+# undef _KERNEL
+# endif
+#elif defined (HAVE_SYS_TIMES_H)
+# include <sys/times.h>
+#endif
+
+#if defined (HAVE_LIMITS_H)
+# include <limits.h>
+#endif
+
+/* Check for the most basic symbols. If they aren't present, this
+ system's <sys/resource.h> isn't very useful to us. */
+#if !defined (RLIMIT_FSIZE) || !defined (HAVE_GETRLIMIT)
+# undef HAVE_RESOURCE
+#endif
+
+#if !defined (HAVE_RESOURCE) && defined (HAVE_ULIMIT_H)
+# include <ulimit.h>
+#endif
+
+#if !defined (RLIMTYPE)
+# define RLIMTYPE long
+# define string_to_rlimtype(s) strtol(s, (char **)NULL, 10)
+# define print_rlimtype(num, nl) printf ("%ld%s", num, nl ? "\n" : "")
+#endif
+
+/* Some systems use RLIMIT_NOFILE, others use RLIMIT_OFILE */
+#if defined (HAVE_RESOURCE) && defined (RLIMIT_OFILE) && !defined (RLIMIT_NOFILE)
+# define RLIMIT_NOFILE RLIMIT_OFILE
+#endif /* HAVE_RESOURCE && RLIMIT_OFILE && !RLIMIT_NOFILE */
+
+/* Some systems have these, some do not. */
+#ifdef RLIMIT_FSIZE
+# define RLIMIT_FILESIZE RLIMIT_FSIZE
+#else
+# define RLIMIT_FILESIZE 256
+#endif
+
+#define RLIMIT_PIPESIZE 257
+
+#ifdef RLIMIT_NOFILE
+# define RLIMIT_OPENFILES RLIMIT_NOFILE
+#else
+# define RLIMIT_OPENFILES 258
+#endif
+
+#ifdef RLIMIT_VMEM
+# define RLIMIT_VIRTMEM RLIMIT_VMEM
+# define RLIMIT_VMBLKSZ 1024
+#else
+# ifdef RLIMIT_AS
+# define RLIMIT_VIRTMEM RLIMIT_AS
+# define RLIMIT_VMBLKSZ 1024
+# else
+# define RLIMIT_VIRTMEM 259
+# define RLIMIT_VMBLKSZ 1
+# endif
+#endif
+
+#ifdef RLIMIT_NPROC
+# define RLIMIT_MAXUPROC RLIMIT_NPROC
+#else
+# define RLIMIT_MAXUPROC 260
+#endif
+
+#if !defined (RLIM_INFINITY)
+# define RLIM_INFINITY 0x7fffffff
+#endif
+
+#if !defined (RLIM_SAVED_CUR)
+# define RLIM_SAVED_CUR RLIM_INFINITY
+#endif
+
+#if !defined (RLIM_SAVED_MAX)
+# define RLIM_SAVED_MAX RLIM_INFINITY
+#endif
+
+#define LIMIT_HARD 0x01
+#define LIMIT_SOFT 0x02
+
+/* "Blocks" are defined as 512 bytes when in Posix mode and 1024 bytes
+ otherwise. */
+#define POSIXBLK -2
+
+#define BLOCKSIZE(x) (((x) == POSIXBLK) ? (posixly_correct ? 512 : 1024) : (x))
+
+extern int posixly_correct;
+
+static int _findlim __P((int));
+
+static int ulimit_internal __P((int, char *, int, int));
+
+static int get_limit __P((int, RLIMTYPE *, RLIMTYPE *));
+static int set_limit __P((int, RLIMTYPE, int));
+
+static void printone __P((int, RLIMTYPE, int));
+static void print_all_limits __P((int));
+
+static int set_all_limits __P((int, RLIMTYPE));
+
+static int filesize __P((RLIMTYPE *));
+static int pipesize __P((RLIMTYPE *));
+static int getmaxuprc __P((RLIMTYPE *));
+static int getmaxvm __P((RLIMTYPE *, RLIMTYPE *));
+
+typedef struct {
+ int option; /* The ulimit option for this limit. */
+ int parameter; /* Parameter to pass to get_limit (). */
+ int block_factor; /* Blocking factor for specific limit. */
+ const char * const description; /* Descriptive string to output. */
+ const char * const units; /* scale */
+} RESOURCE_LIMITS;
+
+static RESOURCE_LIMITS limits[] = {
+#ifdef RLIMIT_PTHREAD
+ { 'T', RLIMIT_PTHREAD, 1, "number of threads", (char *)NULL },
+#endif
+#ifdef RLIMIT_SBSIZE
+ { 'b', RLIMIT_SBSIZE, 1, "socket buffer size", "bytes" },
+#endif
+#ifdef RLIMIT_CORE
+ { 'c', RLIMIT_CORE, POSIXBLK, "core file size", "blocks" },
+#endif
+#ifdef RLIMIT_DATA
+ { 'd', RLIMIT_DATA, 1024, "data seg size", "kbytes" },
+#endif
+#ifdef RLIMIT_NICE
+ { 'e', RLIMIT_NICE, 1, "scheduling priority", (char *)NULL },
+#endif
+ { 'f', RLIMIT_FILESIZE, POSIXBLK, "file size", "blocks" },
+#ifdef RLIMIT_SIGPENDING
+ { 'i', RLIMIT_SIGPENDING, 1, "pending signals", (char *)NULL },
+#endif
+#ifdef RLIMIT_MEMLOCK
+ { 'l', RLIMIT_MEMLOCK, 1024, "max locked memory", "kbytes" },
+#endif
+#ifdef RLIMIT_RSS
+ { 'm', RLIMIT_RSS, 1024, "max memory size", "kbytes" },
+#endif /* RLIMIT_RSS */
+ { 'n', RLIMIT_OPENFILES, 1, "open files", (char *)NULL},
+ { 'p', RLIMIT_PIPESIZE, 512, "pipe size", "512 bytes" },
+#ifdef RLIMIT_MSGQUEUE
+ { 'q', RLIMIT_MSGQUEUE, 1, "POSIX message queues", "bytes" },
+#endif
+#ifdef RLIMIT_RTPRIO
+ { 'r', RLIMIT_RTPRIO, 1, "real-time priority", (char *)NULL },
+#endif
+#ifdef RLIMIT_STACK
+ { 's', RLIMIT_STACK, 1024, "stack size", "kbytes" },
+#endif
+#ifdef RLIMIT_CPU
+ { 't', RLIMIT_CPU, 1, "cpu time", "seconds" },
+#endif /* RLIMIT_CPU */
+ { 'u', RLIMIT_MAXUPROC, 1, "max user processes", (char *)NULL },
+#if defined (HAVE_RESOURCE)
+ { 'v', RLIMIT_VIRTMEM, RLIMIT_VMBLKSZ, "virtual memory", "kbytes" },
+#endif
+#ifdef RLIMIT_SWAP
+ { 'w', RLIMIT_SWAP, 1024, "swap size", "kbytes" },
+#endif
+#ifdef RLIMIT_LOCKS
+ { 'x', RLIMIT_LOCKS, 1, "file locks", (char *)NULL },
+#endif
+ { -1, -1, -1, (char *)NULL, (char *)NULL }
+};
+#define NCMDS (sizeof(limits) / sizeof(limits[0]))
+
+typedef struct _cmd {
+ int cmd;
+ char *arg;
+} ULCMD;
+
+static ULCMD *cmdlist;
+static int ncmd;
+static int cmdlistsz;
+
+#if !defined (HAVE_RESOURCE) && !defined (HAVE_ULIMIT)
+long
+ulimit (cmd, newlim)
+ int cmd;
+ long newlim;
+{
+ errno = EINVAL;
+ return -1;
+}
+#endif /* !HAVE_RESOURCE && !HAVE_ULIMIT */
+
+static int
+_findlim (opt)
+ int opt;
+{
+ register int i;
+
+ for (i = 0; limits[i].option > 0; i++)
+ if (limits[i].option == opt)
+ return i;
+ return -1;
+}
+
+static char optstring[4 + 2 * NCMDS];
+
+/* Report or set limits associated with certain per-process resources.
+ See the help documentation in builtins.c for a full description. */
+int
+ulimit_builtin (list)
+ register WORD_LIST *list;
+{
+ register char *s;
+ int c, limind, mode, opt, all_limits;
+
+ mode = 0;
+
+ all_limits = 0;
+
+ /* Idea stolen from pdksh -- build option string the first time called. */
+ if (optstring[0] == 0)
+ {
+ s = optstring;
+ *s++ = 'a'; *s++ = 'S'; *s++ = 'H';
+ for (c = 0; limits[c].option > 0; c++)
+ {
+ *s++ = limits[c].option;
+ *s++ = ';';
+ }
+ *s = '\0';
+ }
+
+ /* Initialize the command list. */
+ if (cmdlistsz == 0)
+ cmdlist = (ULCMD *)xmalloc ((cmdlistsz = 16) * sizeof (ULCMD));
+ ncmd = 0;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, optstring)) != -1)
+ {
+ switch (opt)
+ {
+ case 'a':
+ all_limits++;
+ break;
+
+ /* -S and -H are modifiers, not real options. */
+ case 'S':
+ mode |= LIMIT_SOFT;
+ break;
+
+ case 'H':
+ mode |= LIMIT_HARD;
+ break;
+
+ case '?':
+ builtin_usage ();
+ return (EX_USAGE);
+
+ default:
+ if (ncmd >= cmdlistsz)
+ cmdlist = (ULCMD *)xrealloc (cmdlist, (cmdlistsz *= 2) * sizeof (ULCMD));
+ cmdlist[ncmd].cmd = opt;
+ cmdlist[ncmd++].arg = list_optarg;
+ break;
+ }
+ }
+ list = loptend;
+
+ if (all_limits)
+ {
+#ifdef NOTYET
+ if (list) /* setting */
+ {
+ if (STREQ (list->word->word, "unlimited") == 0)
+ {
+ builtin_error (_("%s: invalid limit argument"), list->word->word);
+ return (EXECUTION_FAILURE);
+ }
+ return (set_all_limits (mode == 0 ? LIMIT_SOFT|LIMIT_HARD : mode, RLIM_INFINITY));
+ }
+#endif
+ print_all_limits (mode == 0 ? LIMIT_SOFT : mode);
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+ }
+
+ /* default is `ulimit -f' */
+ if (ncmd == 0)
+ {
+ cmdlist[ncmd].cmd = 'f';
+ /* `ulimit something' is same as `ulimit -f something' */
+ cmdlist[ncmd++].arg = list ? list->word->word : (char *)NULL;
+ if (list)
+ list = list->next;
+ }
+
+ /* verify each command in the list. */
+ for (c = 0; c < ncmd; c++)
+ {
+ limind = _findlim (cmdlist[c].cmd);
+ if (limind == -1)
+ {
+ builtin_error (_("`%c': bad command"), cmdlist[c].cmd);
+ return (EX_USAGE);
+ }
+ }
+
+ for (c = 0; c < ncmd; c++)
+ if (ulimit_internal (cmdlist[c].cmd, cmdlist[c].arg, mode, ncmd > 1) == EXECUTION_FAILURE)
+ return (EXECUTION_FAILURE);
+
+ return (EXECUTION_SUCCESS);
+}
+
+static int
+ulimit_internal (cmd, cmdarg, mode, multiple)
+ int cmd;
+ char *cmdarg;
+ int mode, multiple;
+{
+ int opt, limind, setting;
+ int block_factor;
+ RLIMTYPE soft_limit, hard_limit, real_limit, limit;
+
+ setting = cmdarg != 0;
+ limind = _findlim (cmd);
+ if (mode == 0)
+ mode = setting ? (LIMIT_HARD|LIMIT_SOFT) : LIMIT_SOFT;
+ opt = get_limit (limind, &soft_limit, &hard_limit);
+ if (opt < 0)
+ {
+ builtin_error (_("%s: cannot get limit: %s"), limits[limind].description,
+ strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+
+ if (setting == 0) /* print the value of the specified limit */
+ {
+ printone (limind, (mode & LIMIT_SOFT) ? soft_limit : hard_limit, multiple);
+ return (EXECUTION_SUCCESS);
+ }
+
+ /* Setting the limit. */
+ if (STREQ (cmdarg, "hard"))
+ real_limit = hard_limit;
+ else if (STREQ (cmdarg, "soft"))
+ real_limit = soft_limit;
+ else if (STREQ (cmdarg, "unlimited"))
+ real_limit = RLIM_INFINITY;
+ else if (all_digits (cmdarg))
+ {
+ limit = string_to_rlimtype (cmdarg);
+ block_factor = BLOCKSIZE(limits[limind].block_factor);
+ real_limit = limit * block_factor;
+
+ if ((real_limit / block_factor) != limit)
+ {
+ sh_erange (cmdarg, _("limit"));
+ return (EXECUTION_FAILURE);
+ }
+ }
+ else
+ {
+ sh_invalidnum (cmdarg);
+ return (EXECUTION_FAILURE);
+ }
+
+ if (set_limit (limind, real_limit, mode) < 0)
+ {
+ builtin_error (_("%s: cannot modify limit: %s"), limits[limind].description,
+ strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+
+ return (EXECUTION_SUCCESS);
+}
+
+static int
+get_limit (ind, softlim, hardlim)
+ int ind;
+ RLIMTYPE *softlim, *hardlim;
+{
+ RLIMTYPE value;
+#if defined (HAVE_RESOURCE)
+ struct rlimit limit;
+#endif
+
+ if (limits[ind].parameter >= 256)
+ {
+ switch (limits[ind].parameter)
+ {
+ case RLIMIT_FILESIZE:
+ if (filesize (&value) < 0)
+ return -1;
+ break;
+ case RLIMIT_PIPESIZE:
+ if (pipesize (&value) < 0)
+ return -1;
+ break;
+ case RLIMIT_OPENFILES:
+ value = (RLIMTYPE)getdtablesize ();
+ break;
+ case RLIMIT_VIRTMEM:
+ return (getmaxvm (softlim, hardlim));
+ case RLIMIT_MAXUPROC:
+ if (getmaxuprc (&value) < 0)
+ return -1;
+ break;
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+ *softlim = *hardlim = value;
+ return (0);
+ }
+ else
+ {
+#if defined (HAVE_RESOURCE)
+ if (getrlimit (limits[ind].parameter, &limit) < 0)
+ return -1;
+ *softlim = limit.rlim_cur;
+ *hardlim = limit.rlim_max;
+# if defined (HPUX9)
+ if (limits[ind].parameter == RLIMIT_FILESIZE)
+ {
+ *softlim *= 512;
+ *hardlim *= 512; /* Ugh. */
+ }
+ else
+# endif /* HPUX9 */
+ return 0;
+#else
+ errno = EINVAL;
+ return -1;
+#endif
+ }
+}
+
+static int
+set_limit (ind, newlim, mode)
+ int ind;
+ RLIMTYPE newlim;
+ int mode;
+{
+#if defined (HAVE_RESOURCE)
+ struct rlimit limit;
+ RLIMTYPE val;
+#endif
+
+ if (limits[ind].parameter >= 256)
+ switch (limits[ind].parameter)
+ {
+ case RLIMIT_FILESIZE:
+#if !defined (HAVE_RESOURCE)
+ return (ulimit (2, newlim / 512L));
+#else
+ errno = EINVAL;
+ return -1;
+#endif
+
+ case RLIMIT_OPENFILES:
+#if defined (HAVE_SETDTABLESIZE)
+# if defined (__CYGWIN__)
+ /* Grrr... Cygwin declares setdtablesize as void. */
+ setdtablesize (newlim);
+ return 0;
+# else
+ return (setdtablesize (newlim));
+# endif
+#endif
+ case RLIMIT_PIPESIZE:
+ case RLIMIT_VIRTMEM:
+ case RLIMIT_MAXUPROC:
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+ else
+ {
+#if defined (HAVE_RESOURCE)
+ if (getrlimit (limits[ind].parameter, &limit) < 0)
+ return -1;
+# if defined (HPUX9)
+ if (limits[ind].parameter == RLIMIT_FILESIZE)
+ newlim /= 512; /* Ugh. */
+# endif /* HPUX9 */
+ val = (current_user.euid != 0 && newlim == RLIM_INFINITY &&
+ (mode & LIMIT_HARD) == 0 && /* XXX -- test */
+ (limit.rlim_cur <= limit.rlim_max))
+ ? limit.rlim_max : newlim;
+ if (mode & LIMIT_SOFT)
+ limit.rlim_cur = val;
+ if (mode & LIMIT_HARD)
+ limit.rlim_max = val;
+
+ return (setrlimit (limits[ind].parameter, &limit));
+#else
+ errno = EINVAL;
+ return -1;
+#endif
+ }
+}
+
+static int
+getmaxvm (softlim, hardlim)
+ RLIMTYPE *softlim, *hardlim;
+{
+#if defined (HAVE_RESOURCE)
+ struct rlimit datalim, stacklim;
+
+ if (getrlimit (RLIMIT_DATA, &datalim) < 0)
+ return -1;
+
+ if (getrlimit (RLIMIT_STACK, &stacklim) < 0)
+ return -1;
+
+ /* Protect against overflow. */
+ *softlim = (datalim.rlim_cur / 1024L) + (stacklim.rlim_cur / 1024L);
+ *hardlim = (datalim.rlim_max / 1024L) + (stacklim.rlim_max / 1024L);
+ return 0;
+#else
+ errno = EINVAL;
+ return -1;
+#endif /* HAVE_RESOURCE */
+}
+
+static int
+filesize(valuep)
+ RLIMTYPE *valuep;
+{
+#if !defined (HAVE_RESOURCE)
+ long result;
+ if ((result = ulimit (1, 0L)) < 0)
+ return -1;
+ else
+ *valuep = (RLIMTYPE) result * 512;
+ return 0;
+#else
+ errno = EINVAL;
+ return -1;
+#endif
+}
+
+static int
+pipesize (valuep)
+ RLIMTYPE *valuep;
+{
+#if defined (PIPE_BUF)
+ /* This is defined on Posix systems. */
+ *valuep = (RLIMTYPE) PIPE_BUF;
+ return 0;
+#else
+# if defined (_POSIX_PIPE_BUF)
+ *valuep = (RLIMTYPE) _POSIX_PIPE_BUF;
+ return 0;
+# else
+# if defined (PIPESIZE)
+ /* This is defined by running a program from the Makefile. */
+ *valuep = (RLIMTYPE) PIPESIZE;
+ return 0;
+# else
+ errno = EINVAL;
+ return -1;
+# endif /* PIPESIZE */
+# endif /* _POSIX_PIPE_BUF */
+#endif /* PIPE_BUF */
+}
+
+static int
+getmaxuprc (valuep)
+ RLIMTYPE *valuep;
+{
+ long maxchild;
+
+ maxchild = getmaxchild ();
+ if (maxchild < 0)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ else
+ {
+ *valuep = (RLIMTYPE) maxchild;
+ return 0;
+ }
+}
+
+static void
+print_all_limits (mode)
+ int mode;
+{
+ register int i;
+ RLIMTYPE softlim, hardlim;
+
+ if (mode == 0)
+ mode |= LIMIT_SOFT;
+
+ for (i = 0; limits[i].option > 0; i++)
+ {
+ if (get_limit (i, &softlim, &hardlim) == 0)
+ printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1);
+ else if (errno != EINVAL)
+ builtin_error ("%s: cannot get limit: %s", limits[i].description,
+ strerror (errno));
+ }
+}
+
+static void
+printone (limind, curlim, pdesc)
+ int limind;
+ RLIMTYPE curlim;
+ int pdesc;
+{
+ char unitstr[64];
+ int factor;
+
+ factor = BLOCKSIZE(limits[limind].block_factor);
+ if (pdesc)
+ {
+ if (limits[limind].units)
+ sprintf (unitstr, "(%s, -%c) ", limits[limind].units, limits[limind].option);
+ else
+ sprintf (unitstr, "(-%c) ", limits[limind].option);
+
+ printf ("%-20s %16s", limits[limind].description, unitstr);
+ }
+ if (curlim == RLIM_INFINITY)
+ puts ("unlimited");
+ else if (curlim == RLIM_SAVED_MAX)
+ puts ("hard");
+ else if (curlim == RLIM_SAVED_CUR)
+ puts ("soft");
+ else
+ print_rlimtype ((curlim / factor), 1);
+}
+
+/* Set all limits to NEWLIM. NEWLIM currently must be RLIM_INFINITY, which
+ causes all limits to be set as high as possible depending on mode (like
+ csh `unlimit'). Returns -1 if NEWLIM is invalid, 0 if all limits
+ were set successfully, and 1 if at least one limit could not be set.
+
+ To raise all soft limits to their corresponding hard limits, use
+ ulimit -S -a unlimited
+ To attempt to raise all hard limits to infinity (superuser-only), use
+ ulimit -H -a unlimited
+ To attempt to raise all soft and hard limits to infinity, use
+ ulimit -a unlimited
+*/
+
+static int
+set_all_limits (mode, newlim)
+ int mode;
+ RLIMTYPE newlim;
+{
+ register int i;
+ int retval = 0;
+
+ if (newlim != RLIM_INFINITY)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ if (mode == 0)
+ mode = LIMIT_SOFT|LIMIT_HARD;
+
+ for (retval = i = 0; limits[i].option > 0; i++)
+ if (set_limit (i, newlim, mode) < 0)
+ {
+ builtin_error (_("%s: cannot modify limit: %s"), limits[i].description,
+ strerror (errno));
+ retval = 1;
+ }
+ return retval;
+}
+
+#endif /* !_MINIX */
#include "common.h"
#include "bashgetopt.h"
-#ifdef __LCC__
-#define mode_t int
-#endif
-
/* **************************************************************** */
/* */
/* UMASK Builtin and Helpers */
--- /dev/null
+This file is umask.def, from which is created umask.c.
+It implements the builtin "umask" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES umask.c
+
+$BUILTIN umask
+$FUNCTION umask_builtin
+$SHORT_DOC umask [-p] [-S] [mode]
+Display or set file mode mask.
+
+Sets the user file-creation mask to MODE. If MODE is omitted, prints
+the current value of the mask.
+
+If MODE begins with a digit, it is interpreted as an octal number;
+otherwise it is a symbolic mode string like that accepted by chmod(1).
+
+Options:
+ -p if MODE is omitted, output in a form that may be reused as input
+ -S makes the output symbolic; otherwise an octal number is output
+
+Exit Status:
+Returns success unless MODE is invalid or an invalid option is given.
+$END
+
+#include <config.h>
+
+#include "../bashtypes.h"
+#include "filecntl.h"
+#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <chartypes.h>
+
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "posixstat.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+#ifdef __LCC__
+#define mode_t int
+#endif
+
+/* **************************************************************** */
+/* */
+/* UMASK Builtin and Helpers */
+/* */
+/* **************************************************************** */
+
+static void print_symbolic_umask __P((mode_t));
+static int symbolic_umask __P((WORD_LIST *));
+
+/* Set or display the mask used by the system when creating files. Flag
+ of -S means display the umask in a symbolic mode. */
+int
+umask_builtin (list)
+ WORD_LIST *list;
+{
+ int print_symbolically, opt, umask_value, pflag;
+ mode_t umask_arg;
+
+ print_symbolically = pflag = 0;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "Sp")) != -1)
+ {
+ switch (opt)
+ {
+ case 'S':
+ print_symbolically++;
+ break;
+ case 'p':
+ pflag++;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+
+ list = loptend;
+
+ if (list)
+ {
+ if (DIGIT (*list->word->word))
+ {
+ umask_value = read_octal (list->word->word);
+
+ /* Note that other shells just let you set the umask to zero
+ by specifying a number out of range. This is a problem
+ with those shells. We don't change the umask if the input
+ is lousy. */
+ if (umask_value == -1)
+ {
+ sh_erange (list->word->word, _("octal number"));
+ return (EXECUTION_FAILURE);
+ }
+ }
+ else
+ {
+ umask_value = symbolic_umask (list);
+ if (umask_value == -1)
+ return (EXECUTION_FAILURE);
+ }
+ umask_arg = (mode_t)umask_value;
+ umask (umask_arg);
+ if (print_symbolically)
+ print_symbolic_umask (umask_arg);
+ }
+ else /* Display the UMASK for this user. */
+ {
+ umask_arg = umask (022);
+ umask (umask_arg);
+
+ if (pflag)
+ printf ("umask%s ", (print_symbolically ? " -S" : ""));
+ if (print_symbolically)
+ print_symbolic_umask (umask_arg);
+ else
+ printf ("%04lo\n", (unsigned long)umask_arg);
+ }
+
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+}
+
+/* Print the umask in a symbolic form. In the output, a letter is
+ printed if the corresponding bit is clear in the umask. */
+static void
+print_symbolic_umask (um)
+ mode_t um;
+{
+ char ubits[4], gbits[4], obits[4]; /* u=rwx,g=rwx,o=rwx */
+ int i;
+
+ i = 0;
+ if ((um & S_IRUSR) == 0)
+ ubits[i++] = 'r';
+ if ((um & S_IWUSR) == 0)
+ ubits[i++] = 'w';
+ if ((um & S_IXUSR) == 0)
+ ubits[i++] = 'x';
+ ubits[i] = '\0';
+
+ i = 0;
+ if ((um & S_IRGRP) == 0)
+ gbits[i++] = 'r';
+ if ((um & S_IWGRP) == 0)
+ gbits[i++] = 'w';
+ if ((um & S_IXGRP) == 0)
+ gbits[i++] = 'x';
+ gbits[i] = '\0';
+
+ i = 0;
+ if ((um & S_IROTH) == 0)
+ obits[i++] = 'r';
+ if ((um & S_IWOTH) == 0)
+ obits[i++] = 'w';
+ if ((um & S_IXOTH) == 0)
+ obits[i++] = 'x';
+ obits[i] = '\0';
+
+ printf ("u=%s,g=%s,o=%s\n", ubits, gbits, obits);
+}
+
+int
+parse_symbolic_mode (mode, initial_bits)
+ char *mode;
+ int initial_bits;
+{
+ int who, op, perm, bits, c;
+ char *s;
+
+ for (s = mode, bits = initial_bits;;)
+ {
+ who = op = perm = 0;
+
+ /* Parse the `who' portion of the symbolic mode clause. */
+ while (member (*s, "agou"))
+ {
+ switch (c = *s++)
+ {
+ case 'u':
+ who |= S_IRWXU;
+ continue;
+ case 'g':
+ who |= S_IRWXG;
+ continue;
+ case 'o':
+ who |= S_IRWXO;
+ continue;
+ case 'a':
+ who |= S_IRWXU | S_IRWXG | S_IRWXO;
+ continue;
+ default:
+ break;
+ }
+ }
+
+ /* The operation is now sitting in *s. */
+ op = *s++;
+ switch (op)
+ {
+ case '+':
+ case '-':
+ case '=':
+ break;
+ default:
+ builtin_error (_("`%c': invalid symbolic mode operator"), op);
+ return (-1);
+ }
+
+ /* Parse out the `perm' section of the symbolic mode clause. */
+ while (member (*s, "rwx"))
+ {
+ c = *s++;
+
+ switch (c)
+ {
+ case 'r':
+ perm |= S_IRUGO;
+ break;
+ case 'w':
+ perm |= S_IWUGO;
+ break;
+ case 'x':
+ perm |= S_IXUGO;
+ break;
+ }
+ }
+
+ /* Now perform the operation or return an error for a
+ bad permission string. */
+ if (!*s || *s == ',')
+ {
+ if (who)
+ perm &= who;
+
+ switch (op)
+ {
+ case '+':
+ bits |= perm;
+ break;
+ case '-':
+ bits &= ~perm;
+ break;
+ case '=':
+ if (who == 0)
+ who = S_IRWXU | S_IRWXG | S_IRWXO;
+ bits &= ~who;
+ bits |= perm;
+ break;
+
+ /* No other values are possible. */
+ }
+
+ if (*s == '\0')
+ break;
+ else
+ s++; /* skip past ',' */
+ }
+ else
+ {
+ builtin_error (_("`%c': invalid symbolic mode character"), *s);
+ return (-1);
+ }
+ }
+
+ return (bits);
+}
+
+/* Set the umask from a symbolic mode string similar to that accepted
+ by chmod. If the -S argument is given, then print the umask in a
+ symbolic form. */
+static int
+symbolic_umask (list)
+ WORD_LIST *list;
+{
+ int um, bits;
+
+ /* Get the initial umask. Don't change it yet. */
+ um = umask (022);
+ umask (um);
+
+ /* All work is done with the complement of the umask -- it's
+ more intuitive and easier to deal with. It is complemented
+ again before being returned. */
+ bits = parse_symbolic_mode (list->word->word, ~um & 0777);
+ if (bits == -1)
+ return (-1);
+
+ um = ~bits & 0777;
+ return (um);
+}
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
+ bash_cv_wcwidth_broken=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
bashref.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
$(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
+# can also use:
+# $(MAKEINFO) --html --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
bashref.html: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
$(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi
--- /dev/null
+# This Makefile is for the Bash/documentation directory -*- text -*-.
+#
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+PACKAGE = @PACKAGE_NAME@
+VERSION = @PACKAGE_VERSION@
+
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+
+#
+SHELL = @MAKE_SHELL@
+RM = rm -f
+
+topdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = .:@srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+datarootdir = @datarootdir@
+
+infodir = @infodir@
+
+docdir = @docdir@
+
+# set this to a directory name to have the HTML files installed
+htmldir = @htmldir@
+
+# Support an alternate destination root directory for package building
+DESTDIR =
+
+mandir = @mandir@
+manpfx = man
+
+man1ext = .1
+man1dir = $(mandir)/$(manpfx)1
+man3ext = .3
+man3dir = $(mandir)/$(manpfx)3
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+BUILD_DIR = @BUILD_DIR@
+
+SUPPORT_SRCDIR = $(topdir)/support
+
+# bad style
+RL_LIBDIR = $(topdir)/lib/readline
+
+# unused
+TEXINDEX = texindex
+TEX = tex
+
+MAKEINFO = makeinfo
+TEXI2DVI = ${SUPPORT_SRCDIR}/texi2dvi
+TEXI2HTML = ${SUPPORT_SRCDIR}/texi2html
+MAN2HTML = ${BUILD_DIR}/support/man2html
+HTMLPOST = ${srcdir}/htmlpost.sh
+INFOPOST = ${srcdir}/infopost.sh
+QUIETPS = #set this to -q to shut up dvips
+PAPERSIZE = letter # change to a4 for A4-size paper
+PSDPI = 600 # could be 300 if you like
+DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky
+
+TEXINPUTDIR = $(RL_LIBDIR)/doc
+SET_TEXINPUTS = TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS
+
+# These tools might not be available; they're not required
+DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE}
+PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@
+
+MKDIRS = ${SUPPORT_SRCDIR}/mkdirs
+
+# This should be a program that converts troff to an ascii-readable format
+NROFF = groff -Tascii
+
+# This should be a program that converts troff to postscript
+GROFF = groff
+
+HSUSER = $(RL_LIBDIR)/doc/hsuser.texi
+RLUSER = $(RL_LIBDIR)/doc/rluser.texi
+
+BASHREF_FILES = $(srcdir)/bashref.texi $(srcdir)/fdl.texi $(srcdir)/version.texi
+
+.SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html .pdf
+
+.1.ps:
+ $(RM) $@
+ -${GROFF} -man $< > $@
+
+.1.0:
+ $(RM) $@
+ -${NROFF} -man $< > $@
+
+.1.html:
+ $(RM) $@
+ -${MAN2HTML} $< | ${HTMLPOST} > $@
+
+.ms.ps:
+ $(RM) $@
+ -${GROFF} -ms $< > $@
+
+.ms.txt:
+ $(RM) $@
+ -${NROFF} -ms $< > $@
+
+.3.ps:
+ $(RM) $@
+ -${GROFF} -man $< > $@
+
+.3.0:
+ $(RM) $@
+ -${NROFF} -man $< > $@
+
+.3.html:
+ $(RM) $@
+ -${MAN2HTML} $< > $@
+
+.ps.pdf:
+ $(RM) $@
+ -${PSPDF} $<
+
+.dvi.pdf:
+ $(RM) $@
+ -${DVIPDF} $<
+
+.dvi.ps:
+ ${RM} $@
+ -${DVIPS} $<
+
+all: ps info dvi text html
+nodvi: ps info text html
+everything: all pdf
+
+PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps
+DVIFILES = bashref.dvi bashref.ps
+INFOFILES = bashref.info
+MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0
+HTMLFILES = bashref.html bash.html
+PDFFILES = bash.pdf bashref.pdf article.pdf rose94.pdf
+
+ps: ${PSFILES}
+dvi: ${DVIFILES}
+info: ${INFOFILES}
+text: ${MAN0FILES}
+html: ${HTMLFILES}
+pdf: ${PDFFILES}
+
+bashref.dvi: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
+ ${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bashref.texi || { ${RM} $@ ; exit 1; }
+
+bashref.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
+ $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
+
+bashref.html: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi
+
+bash.info: bashref.info
+ ${SHELL} ${INFOPOST} < $(srcdir)/bashref.info > $@ ; \
+
+bash.txt: bash.1
+bash.ps: bash.1
+bash.html: bash.1 $(MAN2HTML)
+bashbug.ps: bashbug.1
+builtins.ps: builtins.1 bash.1
+rbash.ps: rbash.1 bash.1
+bash.0: bash.1
+bashbug.0: bashbug.1
+builtins.0: builtins.1 bash.1
+rbash.0: rbash.1 bash.1
+article.ps: article.ms
+
+bashref.ps: bashref.dvi
+
+article.pdf: article.ps
+bashref.pdf: bashref.dvi
+bash.pdf: bash.ps
+rose94.pdf: rose94.ps
+
+OTHER_DOCS = $(srcdir)/FAQ $(srcdir)/INTRO
+OTHER_INSTALLED_DOCS = FAQ INTRO
+
+$(MAN2HTML): ${topdir}/support/man2html.c
+ -( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html)
+
+clean:
+ $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \
+ *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o
+ ${RM} core *.core
+
+mostlyclean: clean
+ $(RM) Makefile
+
+distclean: clean maybe-clean
+ $(RM) Makefile
+
+maintainer-clean: clean
+ ${RM} ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}
+ ${RM} ${CREATED_FAQ}
+ $(RM) Makefile
+
+maybe-clean:
+ -if test "X$(topdir)" != "X$(BUILD_DIR)"; then \
+ $(RM) ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}; \
+ fi
+
+installdirs:
+ -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(man1dir)
+ -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(infodir)
+ -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(docdir)
+ -if test -n "$(htmldir)" ; then \
+ $(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(htmldir) ; \
+ fi
+
+install: info installdirs bash.info
+ -$(INSTALL_DATA) $(srcdir)/bash.1 $(DESTDIR)$(man1dir)/bash${man1ext}
+ -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext}
+ -$(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir)
+# uncomment the next lines to install the builtins man page
+# sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
+# -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
+# -$(RM) $${TMPDIR:-/var/tmp}/builtins.1
+ -if test -f bash.info; then d=.; else d=$(srcdir); fi; \
+ $(INSTALL_DATA) $$d/bash.info $(DESTDIR)$(infodir)/bash.info
+# run install-info if it is present to update the info directory
+ if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
+ install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \
+ else true; fi
+# if htmldir is set, install the html files into that directory
+ -if test -n "${htmldir}" ; then \
+ $(INSTALL_DATA) $(srcdir)/bash.html $(DESTDIR)$(htmldir) ; \
+ $(INSTALL_DATA) $(srcdir)/bashref.html $(DESTDIR)$(htmldir) ; \
+ fi
+
+install_builtins: installdirs
+ sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
+ -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
+ -$(RM) $${TMPDIR:-/var/tmp}/builtins.1
+
+install_everything: install install_builtins
+
+uninstall:
+ -$(RM) $(DESTDIR)$(man1dir)/bash${man1ext} $(DESTDIR)$(man1dir)/bashbug${man1ext}
+ -$(RM) $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
+ $(RM) $(DESTDIR)$(infodir)/bash.info
+ -( cd $(DESTDIR)$(docdir) && $(RM) $(OTHER_INSTALLED_DOCS) )
+ -if test -n "$(htmldir)" ; then \
+ $(RM) $(DESTDIR)$(htmldir)/bash.html ; \
+ $(RM) $(DESTDIR)$(htmldir)/bashref.html ; \
+ fi
+
+# for use by chet
+CREATED_FAQ = faq.news faq.news2 faq.mail faq.version
+
+faq: ${CREATED_FAQ}
+
+faq.version: FAQ.version FAQ
+ sh mkfaqvers FAQ.version > $@
+
+faq.headers.mail: FAQ.headers.mail FAQ
+ sh mkfaqvers FAQ.headers.mail > $@
+
+faq.headers.news: FAQ.headers.news FAQ
+ sh mkfaqvers FAQ.headers.news > $@
+
+faq.headers.news2: FAQ.headers.news2 FAQ
+ sh mkfaqvers FAQ.headers.news2 > $@
+
+faq.news: FAQ faq.headers.news faq.version
+ $(RM) $@
+ cat faq.headers.news faq.version FAQ > $@
+
+faq.news2: FAQ faq.headers.news2 faq.version
+ $(RM) $@
+ cat faq.headers.news2 faq.version FAQ > $@
+
+faq.mail: FAQ faq.headers.mail faq.version
+ $(RM) $@
+ cat faq.headers.mail faq.version FAQ > $@
+
+inst: bashref.texi
+ $(SHELL) ./mkinstall
+ cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL
+ $(RM) INSTALL
+
+posix: bashref.texi
+ $(SHELL) ./mkposix
+ cmp -s POSIX ../POSIX || mv POSIX ../POSIX
+ $(RM) POSIX
+
+rbash: bashref.texi
+ $(SH) ./mkrbash
+ cmp -s RBASH ../RBASH || mv RBASH ../RBASH
+ $(RM) RBASH
+
+xdist: pdf inst posix rbash
%!PS-Adobe-3.0
-%%Creator: groff version 1.16.1
-%%CreationDate: Mon Nov 19 13:06:55 2001
+%%Creator: groff version 1.19.2
+%%CreationDate: Tue Oct 22 11:07:52 2013
%%DocumentNeededResources: font Times-Bold
%%+ font Times-Italic
%%+ font Times-Roman
%%+ font Courier
-%%DocumentSuppliedResources: procset grops 1.16 1
+%%DocumentSuppliedResources: procset grops 1.19 2
%%Pages: 11
%%PageOrder: Ascend
+%%DocumentMedia: Default 612 792 0 () ()
%%Orientation: Portrait
%%EndComments
+%%BeginDefaults
+%%PageMedia: Default
+%%EndDefaults
%%BeginProlog
-%%BeginResource: procset grops 1.16 1
+%%BeginResource: procset grops 1.19 2
+%!PS-Adobe-3.0 Resource-ProcSet
/setpacking where{
pop
currentpacking
/EP{
level0 restore
showpage
-}bind def
+}def
/DA{
newpath arcn stroke
}bind def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
-/FL{
-currentgray exch setgray fill setgray
+/Fr{
+setrgbcolor fill
+}bind def
+/setcmykcolor where{
+pop
+/Fk{
+setcmykcolor fill
+}bind def
+}if
+/Fg{
+setgray fill
}bind def
-/BL/fill load def
+/FL/fill load def
/LW/setlinewidth load def
+/Cr/setrgbcolor load def
+/setcmykcolor where{
+pop
+/Ck/setcmykcolor load def
+}if
+/Cg/setgray load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
/CNT countdictstack def
userdict begin
/showpage{}def
+/setpagedevice{}def
}bind def
/PEND{
-clear
countdictstack CNT sub{end}repeat
level1 restore
}bind def
setpacking
}if
%%EndResource
+%%EndProlog
+%%BeginSetup
+%%BeginFeature: *PageSize Default
+<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice
+%%EndFeature
%%IncludeResource: font Times-Bold
%%IncludeResource: font Times-Italic
%%IncludeResource: font Times-Roman
%%IncludeResource: font Courier
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
-/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef
+/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Courier@0 ENC0/Courier RE/Times-Roman@0 ENC0/Times-Roman RE
/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE
-%%EndProlog
+%%EndSetup
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 12/Times-Bold@0 SF(Bash \255 The GNU shell*)227.904 123 Q/F1 10
-/Times-Italic@0 SF(Chet Rame)263.85 147 Q(y)-.3 E(Case W)221.72 159 Q
-(estern Reserve Univer)-.92 E(sity)-.1 E -.15(ch)250.425 171 S
-(et@po.cwru.edu).15 E/F2 10/Times-Bold@0 SF 2.5(1. Intr)72 207 R
-(oduction)-.18 E(Bash)97 222.6 Q/F3 10/Times-Roman@0 SF .904
+/Times-Italic@0 SF(Chet Rame)263.85 159 Q(y)-.3 E(Case W)221.72 171 Q
+(estern Reserve Univer)-.92 E(sity)-.1 E -.15(ch)250.425 183 S
+(et@po.cwru.edu).15 E/F2 10/Times-Bold@0 SF 2.5(1. Intr)72 219 R
+(oduction)-.18 E(Bash)97 234.6 Q/F3 10/Times-Roman@0 SF .904
(is the shell, or command language interpreter)3.404 F 3.404(,t)-.4 G
.904(hat will appear in the GNU operating system.)-3.404 F 1.075
-(The name is an acron)72 234.6 R 1.075(ym for the \231Bourne-Ag)-.15 F
+(The name is an acron)72 246.6 R 1.075(ym for the \231Bourne-Ag)-.15 F
1.075(ain SHell\232, a pun on Ste)-.05 F 1.375 -.15(ve B)-.25 H 1.075
(ourne, the author of the direct).15 F .206(ancestor of the current)72
-246.6 R/F4 8/Times-Roman@0 SF(UNIX)2.706 E F3 2.706<ae73>C(hell)-2.706 E
+258.6 R/F4 8/Times-Roman@0 SF(UNIX)2.706 E F3 2.706<ae73>C(hell)-2.706 E
F1(/bin/sh)2.706 E F3 2.706(,w)C .205(hich appeared in the Se)-2.706 F
-.15(ve)-.25 G .205(nth Edition Bell Labs Research v).15 F(er)-.15 E(-)
--.2 E(sion of)72 258.6 Q/F5 9/Times-Roman@0 SF(UNIX)2.5 E F3(.)A .387
-(Bash is an)97 274.2 R F2(sh)2.887 E F3 .387
+-.2 E(sion of)72 270.6 Q/F5 9/Times-Roman@0 SF(UNIX)2.5 E F3(.)A .387
+(Bash is an)97 286.2 R F2(sh)2.887 E F3 .387
(\255compatible shell that incorporates useful features from the K)B
.388(orn shell \()-.35 F F2(ksh)A F3 2.888(\)a)C .388(nd the C)-2.888 F
-.023(shell \()72 286.2 R F2(csh)A F3 .023
+.023(shell \()72 298.2 R F2(csh)A F3 .023
(\), described later in this article.)B .022
(It is ultimately intended to be a conformant implementation of the)
5.022 F 3.568(IEEE POSIX Shell and Utilities speci\214cation \(IEEE W)72
-298.2 R 3.568(orking Group 1003.2\).)-.8 F 3.569(It of)8.569 F 3.569
-(fers functional)-.25 F(impro)72 310.2 Q -.15(ve)-.15 G(ments o).15 E
+310.2 R 3.568(orking Group 1003.2\).)-.8 F 3.569(It of)8.569 F 3.569
+(fers functional)-.25 F(impro)72 322.2 Q -.15(ve)-.15 G(ments o).15 E
-.15(ve)-.15 G 2.5(rs).15 G 2.5(hf)-2.5 G(or both interacti)-2.5 E .3
-.15(ve a)-.25 H(nd programming use.).15 E .697
-(While the GNU operating system will most lik)97 325.8 R .697
+(While the GNU operating system will most lik)97 337.8 R .697
(ely include a v)-.1 F .697(ersion of the Berk)-.15 F(ele)-.1 E 3.197
-(ys)-.15 G .696(hell csh, Bash)-3.197 F .015(will be the def)72 337.8 R
+(ys)-.15 G .696(hell csh, Bash)-3.197 F .015(will be the def)72 349.8 R
.015(ault shell.)-.1 F(Lik)5.015 E 2.515(eo)-.1 G .015(ther GNU softw)
-2.515 F .016(are, Bash is quite portable.)-.1 F .016
(It currently runs on nearly e)5.016 F -.15(ve)-.25 G(ry).15 E -.15(ve)
-72 349.8 S .523(rsion of).15 F F4(UNIX)3.023 E F3 .523(and a fe)3.023 F
+72 361.8 S .523(rsion of).15 F F4(UNIX)3.023 E F3 .523(and a fe)3.023 F
3.023(wo)-.25 G .523
(ther operating systems \255 an independently-supported port e)-3.023 F
.523(xists for OS/2, and)-.15 F .706
-(there are rumors of ports to DOS and W)72 361.8 R(indo)-.4 E .706
+(there are rumors of ports to DOS and W)72 373.8 R(indo)-.4 E .706
(ws NT)-.25 F 5.706(.P)-.74 G .706(orts to)-5.706 F F5(UNIX)3.206 E F3
(-lik)A 3.206(es)-.1 G .706(ystems such as QNX and Minix)-3.206 F
-(are part of the distrib)72 373.8 Q(ution.)-.2 E .405
-(The original author of Bash w)97 389.4 R .405(as Brian F)-.1 F .405
+(are part of the distrib)72 385.8 Q(ution.)-.2 E .405
+(The original author of Bash w)97 401.4 R .405(as Brian F)-.1 F .405
(ox, an emplo)-.15 F .405(yee of the Free Softw)-.1 F .405(are F)-.1 F
-2.905(oundation. The)-.15 F(cur)2.905 E(-)-.2 E(rent de)72 401.4 Q -.15
+2.905(oundation. The)-.15 F(cur)2.905 E(-)-.2 E(rent de)72 413.4 Q -.15
(ve)-.25 G(loper and maintainer is Chet Rame).15 E 1.3 -.65(y, a v)-.15
H(olunteer who w).45 E(orks at Case W)-.1 E(estern Reserv)-.8 E 2.5(eU)
-.15 G(ni)-2.5 E -.15(ve)-.25 G(rsity).15 E(.)-.65 E F2 2.5(2. What')72
-425.4 R 2.5(sP)-.37 G(OSIX, anyway?)-2.5 E F1(POSIX)97 441 Q F3 .343
+437.4 R 2.5(sP)-.37 G(OSIX, anyway?)-2.5 E F1(POSIX)97 453 Q F3 .343
(is a name originally coined by Richard Stallman for a f)2.843 F .343
-(amily of open system standards based)-.1 F(on)72 453 Q F5(UNIX)3.24 E
+(amily of open system standards based)-.1 F(on)72 465 Q F5(UNIX)3.24 E
F3 5.74(.T)C .74(here are a number of aspects of)-5.74 F F5(UNIX)3.24 E
F3 .74(under consideration for standardization, from the basic)3.24 F
-.192(system services at the system call and C library le)72 465 R -.15
+.192(system services at the system call and C library le)72 477 R -.15
(ve)-.25 G 2.692(lt).15 G 2.692(oa)-2.692 G .192
(pplications and tools to system administration and)-2.692 F 2.5
-(management. Each)72 477 R(area of standardization is assigned to a w)
+(management. Each)72 489 R(area of standardization is assigned to a w)
2.5 E(orking group in the 1003 series.)-.1 E 2.814
-(The POSIX Shell and Utilities standard has been de)97 492.6 R -.15(ve)
+(The POSIX Shell and Utilities standard has been de)97 504.6 R -.15(ve)
-.25 G 2.814(loped by IEEE W).15 F 2.813(orking Group 1003.2)-.8 F .254
(\(POSIX.2\).\210 It concentrates on the command interpreter interf)72
-504.6 R .253(ace and utility programs commonly e)-.1 F -.15(xe)-.15 G
-(cuted).15 E 1.112(from the command line or by other programs.)72 516.6
+516.6 R .253(ace and utility programs commonly e)-.1 F -.15(xe)-.15 G
+(cuted).15 E 1.112(from the command line or by other programs.)72 528.6
R 1.112(An initial v)6.112 F 1.113
(ersion of the standard has been appro)-.15 F -.15(ve)-.15 G 3.613(da)
-.15 G(nd)-3.613 E .365(published by the IEEE, and w)72 528.6 R .365
+.15 G(nd)-3.613 E .365(published by the IEEE, and w)72 540.6 R .365
(ork is currently underw)-.1 F .365(ay to update it.)-.1 F .365
(There are four primary areas of w)5.365 F(ork)-.1 E
-(in the 1003.2 standard:)72 540.6 Q 21.5<8341>72 556.2 S .835
+(in the 1003.2 standard:)72 552.6 Q 21.5<8341>72 568.2 S .835
(spects of the shell')-21.5 F 3.335(ss)-.55 G .835
(yntax and command language.)-3.335 F 3.335(An)5.835 G .835
(umber of special b)-3.335 F .835(uiltins such as)-.2 F F2(cd)3.335 E F3
-(and)3.335 E F2(exec)97 568.2 Q F3 .545(are being speci\214ed as part o\
+(and)3.335 E F2(exec)97 580.2 Q F3 .545(are being speci\214ed as part o\
f the shell, since their functionality usually cannot be implemented)
-3.046 F(by a separate e)97 580.2 Q -.15(xe)-.15 G(cutable;).15 E 21.5
-<8341>72 595.8 S .926
+3.046 F(by a separate e)97 592.2 Q -.15(xe)-.15 G(cutable;).15 E 21.5
+<8341>72 607.8 S .926
(set of utilities to be called by shell scripts and applications.)
-18.074 F .927(Examples are programs lik)5.927 F(e)-.1 E F1 .927
-(sed, tr)3.427 F(,)-1.11 E F3(and)97 607.8 Q F1(awk.)2.797 E F3 .297
+(sed, tr)3.427 F(,)-1.11 E F3(and)97 619.8 Q F1(awk.)2.797 E F3 .297
(Utilities commonly implemented as shell b)5.297 F .296
(uiltins are described in this section, such as)-.2 F F2(test)2.796 E F3
-(and)97 619.8 Q F2(kill)3.422 E F3 5.922(.A)C 3.422(ne)-5.922 G .922
+(and)97 631.8 Q F2(kill)3.422 E F3 5.922(.A)C 3.422(ne)-5.922 G .922
(xpansion of this section')-3.572 F 3.423(ss)-.55 G .923
(cope, termed the User Portability Extension, or UPE, has)-3.423 F
-(standardized interacti)97 631.8 Q .3 -.15(ve p)-.25 H(rograms such as)
-.15 E F1(vi)2.5 E F3(and)2.5 E F1(mailx;)2.5 E F3 21.5<8341>72 647.4 S
+(standardized interacti)97 643.8 Q .3 -.15(ve p)-.25 H(rograms such as)
+.15 E F1(vi)2.5 E F3(and)2.5 E F1(mailx;)2.5 E F3 21.5<8341>72 659.4 S
.288(group of functional interf)-18.712 F .287(aces to services pro)-.1
F .287(vided by the shell, such as the traditional)-.15 F/F6 10
-/Courier@0 SF(system\(\))2.787 E F3 3.289(Cl)97 659.4 S .789
+/Courier@0 SF(system\(\))2.787 E F3 3.289(Cl)97 671.4 S .789
(ibrary function.)-3.289 F .789(There are functions to perform shell w)
5.789 F .789(ord e)-.1 F .79(xpansions, perform \214lename e)-.15 F
-(xpan-)-.15 E .324(sion \()97 671.4 R F1(globbing)A F3 .324
-(\), obtain v)B .323(alues of POSIX.2 system con\214guration v)-.25 F
-.323(ariables, retrie)-.25 F .623 -.15(ve v)-.25 H .323(alues of en)-.1
-F(viron-)-.4 E(ment v)97 683.4 Q(ariables \()-.25 E F6(getenv\(\))A F3
-(\), and other services;).833 E .32 LW 144 691.4 72 691.4 DL F4
-(*An earlier v)72 703.2 Q
+(xpan-)-.15 E 3.624(sion \()97 683.4 R F1(globbing)A F3 3.624
+(\), obtain v)B 3.624(alues of POSIX.2 system con\214guration v)-.25 F
+3.623(ariables, retrie)-.25 F 3.923 -.15(ve v)-.25 H 3.623(alues of)-.1
+F .32 LW 144 691.4 72 691.4 DL F4(*An earlier v)72 703.2 Q
(ersion of this article appeared in The Linux Journal.)-.12 E(\210IEEE,)
72 715 Q/F7 8/Times-Italic@0 SF 1.231(IEEE Standar)3.231 F 3.231(df)
-.296 G 1.231(or Information T)-3.231 F(ec)-.736 E(hnolo)-.12 E 1.231
(gy -- P)-.08 F 1.231(ortable Oper)-.64 F 1.232
(ating System Interface \(POSIX\) P)-.12 F 1.232(art 2:)-.64 F
-(Shell and Utilities)72 725 Q F4 2(,1)C(992.)-2 E EP
+(Shell and Utilities)72 725 Q F4 2(,1)C(992.)-2 E 0 Cg EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
-/F0 10/Times-Roman@0 SF(-2-)282.17 48 Q 21.5<8341>72 84 S
-(suite of \231de)-19 E -.15(ve)-.25 G(lopment\232 utilities such as).15
-E/F1 10/Times-Italic@0 SF(c89)2.5 E F0(\(the POSIX.2 v)2.5 E(ersion of)
--.15 E F1(cc)2.5 E F0(\), and)A F1(yacc.)2.5 E F0 .483
-(Bash is concerned with the aspects of the shell')97 99.6 R 2.983(sb)
+/F0 10/Times-Roman@0 SF(-2-)282.17 48 Q(en)97 84 Q(vironment v)-.4 E
+(ariables \()-.25 E/F1 10/Courier@0 SF(getenv\(\))A F0
+(\), and other services;).833 E 21.5<8341>72 99.6 S(suite of \231de)-19
+E -.15(ve)-.25 G(lopment\232 utilities such as).15 E/F2 10
+/Times-Italic@0 SF(c89)2.5 E F0(\(the POSIX.2 v)2.5 E(ersion of)-.15 E
+F2(cc)2.5 E F0(\), and)A F2(yacc.)2.5 E F0 .483
+(Bash is concerned with the aspects of the shell')97 115.2 R 2.983(sb)
-.55 G(eha)-2.983 E .484(vior de\214ned by POSIX.2.)-.2 F .484
(The shell command)5.484 F 1.439
(language has of course been standardized, including the basic \215o)72
-111.6 R 3.938(wc)-.25 G 1.438(ontrol and program e)-3.938 F -.15(xe)-.15
+127.2 R 3.938(wc)-.25 G 1.438(ontrol and program e)-3.938 F -.15(xe)-.15
G 1.438(cution con-).15 F 1.284
-(structs, I/O redirection and pipelining, ar)72 123.6 R 1.284
+(structs, I/O redirection and pipelining, ar)72 139.2 R 1.284
(gument handling, v)-.18 F 1.284(ariable e)-.25 F 1.284
-(xpansion, and quoting.)-.15 F(The)6.285 E F1(special)3.785 E F0 -.2(bu)
-72 135.6 S .676
+(xpansion, and quoting.)-.15 F(The)6.285 E F2(special)3.785 E F0 -.2(bu)
+72 151.2 S .676
(iltins, which must be implemented as part of the shell to pro).2 F .676
(vide the desired functionality)-.15 F 3.176(,a)-.65 G .676
-(re speci\214ed)-3.176 F .7(as being part of the shell; e)72 147.6 R .7
-(xamples of these are)-.15 F/F2 10/Times-Bold@0 SF -2.3 -.15(ev a)3.201
-H(l).15 E F0(and)3.201 E F2(export)3.201 E F0 5.701(.O)C .701
+(re speci\214ed)-3.176 F .7(as being part of the shell; e)72 163.2 R .7
+(xamples of these are)-.15 F/F3 10/Times-Bold@0 SF -2.3 -.15(ev a)3.201
+H(l).15 E F0(and)3.201 E F3(export)3.201 E F0 5.701(.O)C .701
(ther utilities appear in the sections of)-5.701 F .256(POSIX.2 not de)
-72 159.6 R -.2(vo)-.25 G .256(ted to the shell which are commonly \(and\
+72 175.2 R -.2(vo)-.25 G .256(ted to the shell which are commonly \(and\
in some cases must be\) implemented as b).2 F(uiltin)-.2 E .213
-(commands, such as)72 171.6 R F2 -.18(re)2.713 G(ad).18 E F0(and)2.713 E
-F2(test)2.713 E F0 5.213(.P)C .213
+(commands, such as)72 187.2 R F3 -.18(re)2.713 G(ad).18 E F0(and)2.713 E
+F3(test)2.713 E F0 5.213(.P)C .213
(OSIX.2 also speci\214es aspects of the shell')-5.213 F 2.713(si)-.55 G
(nteracti)-2.713 E .513 -.15(ve b)-.25 H(eha).15 E .214(vior as part)-.2
F .598(of the UPE, including job control and command line editing.)72
-183.6 R .598(Interestingly enough, only)5.598 F F1(vi)3.098 E F0 .598
-(-style line edit-)B(ing commands ha)72 195.6 Q .3 -.15(ve b)-.2 H
-(een standardized;).15 E F1(emacs)2.5 E F0
+199.2 R .598(Interestingly enough, only)5.598 F F2(vi)3.098 E F0 .598
+(-style line edit-)B(ing commands ha)72 211.2 Q .3 -.15(ve b)-.2 H
+(een standardized;).15 E F2(emacs)2.5 E F0
(editing commands were left out due to objections.)2.5 E 1.128
(While POSIX.2 includes much of what the shell has traditionally pro)97
-211.2 R 1.129(vided, some important things)-.15 F(ha)72 223.2 Q .344
+226.8 R 1.129(vided, some important things)-.15 F(ha)72 238.8 Q .344
-.15(ve b)-.2 H .044(een omitted as being \231be).15 F .044
(yond its scope.)-.15 F 5.043<9a54>-.7 G .043
(here is, for instance, no mention of a dif)-5.043 F .043
-(ference between a)-.25 F F1(lo)72 235.2 Q(gin)-.1 E F0 1.445
+(ference between a)-.25 F F2(lo)72 250.8 Q(gin)-.1 E F0 1.445
(shell and an)3.945 F 3.945(yo)-.15 G 1.445(ther interacti)-3.945 F
1.745 -.15(ve s)-.25 H 1.446
(hell \(since POSIX.2 does not specify a login program\).).15 F 1.446
(No \214x)6.446 F(ed)-.15 E(startup \214les are de\214ned, either \255 \
-the standard does not mention)72 247.2 Q F1(.pr)2.5 E(o\214le)-.45 E F0
-(.)A F2 2.5(3. Basic)72 271.2 R(Bash featur)2.5 E(es)-.18 E F0 1.448
-(Since the Bourne shell pro)97 286.8 R 1.448
+the standard does not mention)72 262.8 Q F2(.pr)2.5 E(o\214le)-.45 E F0
+(.)A F3 2.5(3. Basic)72 286.8 R(Bash featur)2.5 E(es)-.18 E F0 1.448
+(Since the Bourne shell pro)97 302.4 R 1.448
(vides Bash with most of its philosophical underpinnings, Bash inherits)
--.15 F .64(most of its features and functionality from sh.)72 298.8 R
+-.15 F .64(most of its features and functionality from sh.)72 314.4 R
.641(Bash implements all of the traditional sh \215o)5.641 F 3.141(wc)
--.25 G .641(ontrol con-)-3.141 F .8(structs \()72 310.8 R F1(for)A F0(,)
-A F1(if)3.3 E F0(,)A F1(while)3.3 E F0 3.3(,e)C 3.3(tc.\). All)-3.3 F
+-.25 G .641(ontrol con-)-3.141 F .8(structs \()72 326.4 R F2(for)A F0(,)
+A F2(if)3.3 E F0(,)A F2(while)3.3 E F0 3.3(,e)C 3.3(tc.\). All)-3.3 F
.799(of the Bourne shell b)3.3 F .799
(uiltins, including those not speci\214ed in the POSIX.2)-.2 F .536
-(standard, appear in Bash.)72 322.8 R(Shell)5.536 E F1(functions)3.036 E
+(standard, appear in Bash.)72 338.4 R(Shell)5.536 E F2(functions)3.036 E
F0 3.036(,i)C .536(ntroduced in the SVR2 v)-3.036 F .537
(ersion of the Bourne shell, are similar)-.15 F .779
-(to shell scripts, b)72 334.8 R .779
+(to shell scripts, b)72 350.4 R .779
(ut are de\214ned using a special syntax and are e)-.2 F -.15(xe)-.15 G
.779(cuted in the same process as the calling).15 F 2.841(shell. Bash)72
-346.8 R .341(has shell functions which beha)2.841 F .641 -.15(ve i)-.2 H
+362.4 R .341(has shell functions which beha)2.841 F .641 -.15(ve i)-.2 H
2.841(naf).15 G .341(ashion upw)-2.941 F .342
(ard-compatible with sh functions.)-.1 F .342(There are)5.342 F 1.447
-(certain shell v)72 358.8 R 1.446
+(certain shell v)72 374.4 R 1.446
(ariables that Bash interprets in the same w)-.25 F 1.446
-(ay as sh, such as)-.1 F F2(PS1)3.946 E F0(,)A F2(IFS)3.946 E F0 3.946
-(,a)C(nd)-3.946 E F2 -.74(PA)3.946 G(TH)-.21 E F0 6.446(.B)C(ash)-6.446
-E 1.423(implements essentially the same grammar)72 370.8 R 3.924(,p)-.4
+(ay as sh, such as)-.1 F F3(PS1)3.946 E F0(,)A F3(IFS)3.946 E F0 3.946
+(,a)C(nd)-3.946 E F3 -.74(PA)3.946 G(TH)-.21 E F0 6.446(.B)C(ash)-6.446
+E 1.423(implements essentially the same grammar)72 386.4 R 3.924(,p)-.4
G 1.424(arameter and v)-3.924 F 1.424(ariable e)-.25 F 1.424
(xpansion semantics, redirection, and)-.15 F 1.06
-(quoting as the Bourne shell.)72 382.8 R 1.06(Where dif)6.06 F 1.06
+(quoting as the Bourne shell.)72 398.4 R 1.06(Where dif)6.06 F 1.06
(ferences appear between the POSIX.2 standard and traditional sh)-.25 F
-(beha)72 394.8 Q(vior)-.2 E 2.5(,B)-.4 G(ash follo)-2.5 E(ws POSIX.)-.25
-E 1.608(The K)97 410.4 R 1.608(orn Shell \()-.35 F F2(ksh)A F0 4.108
-(\)i)C 4.108(sad)-4.108 G 1.608
-(escendent of the Bourne shell written at A)-4.108 F 1.609
-(T&T Bell Laboratories by)-1.11 F(Da)72 422.4 Q 1.059(vid K)-.2 F 3.559
-(orn\207. It)-.35 F(pro)3.559 E 1.059
+(beha)72 410.4 Q(vior)-.2 E 2.5(,B)-.4 G(ash follo)-2.5 E(ws POSIX.)-.25
+E 1.608(The K)97 426 R 1.608(orn Shell \()-.35 F F3(ksh)A F0 4.108(\)i)C
+4.108(sad)-4.108 G 1.608(escendant of the Bourne shell written at A)
+-4.108 F 1.609(T&T Bell Laboratories by)-1.11 F(Da)72 438 Q 1.059(vid K)
+-.2 F 3.559(orn\207. It)-.35 F(pro)3.559 E 1.059
(vides a number of useful features that POSIX and Bash ha)-.15 F 1.359
-.15(ve a)-.2 H 3.558(dopted. Man).15 F 3.558(yo)-.15 G 3.558(ft)-3.558
-G(he)-3.558 E(interacti)72 434.4 Q 1.312 -.15(ve f)-.25 H 1.012
+G(he)-3.558 E(interacti)72 450 Q 1.312 -.15(ve f)-.25 H 1.012
(acilities in POSIX.2 ha).05 F 1.312 -.15(ve t)-.2 H 1.012
(heir roots in the ksh: for e).15 F 1.013
-(xample, the POSIX and ksh job control)-.15 F -.1(fa)72 446.4 S .513
+(xample, the POSIX and ksh job control)-.15 F -.1(fa)72 462 S .513
(cilities are nearly identical. Bash includes features from the K).1 F
.513(orn Shell for both interacti)-.35 F .813 -.15(ve u)-.25 H .513
-(se and shell).15 F 3.905(programming. F)72 458.4 R 1.405
+(se and shell).15 F 3.905(programming. F)72 474 R 1.405
(or programming, Bash pro)-.15 F 1.405(vides v)-.15 F 1.405
-(ariables such as)-.25 F F2(RANDOM)3.905 E F0(and)3.905 E F2(REPL)3.905
-E(Y)-.92 E F0 3.905(,t)C(he)-3.905 E F2(typeset)3.905 E F0 -.2(bu)72
-470.4 S .398(iltin, the ability to remo).2 F .698 -.15(ve s)-.15 H .398
+(ariables such as)-.25 F F3(RANDOM)3.905 E F0(and)3.905 E F3(REPL)3.905
+E(Y)-.92 E F0 3.905(,t)C(he)-3.905 E F3(typeset)3.905 E F0 -.2(bu)72 486
+S .398(iltin, the ability to remo).2 F .698 -.15(ve s)-.15 H .398
(ubstrings from v).15 F .398
-(ariables based on patterns, and shell arithmetic.)-.25 F F2(RANDOM)
-5.397 E F0 -.15(ex)72 482.4 S .489
+(ariables based on patterns, and shell arithmetic.)-.25 F F3(RANDOM)
+5.397 E F0 -.15(ex)72 498 S .489
(pands to a random number each time it is referenced; assigning a v).15
-F .49(alue to)-.25 F F2(RANDOM)2.99 E F0 .49(seeds the random)2.99 F
-.055(number generator)72 494.4 R(.)-.55 E F2(REPL)5.055 E(Y)-.92 E F0
-.054(is the def)2.554 F .054(ault v)-.1 F .054(ariable used by the)-.25
-F F2 -.18(re)2.554 G(ad).18 E F0 -.2(bu)2.554 G .054(iltin when no v).2
-F .054(ariable names are sup-)-.25 F .742(plied as ar)72 506.4 R 3.243
-(guments. The)-.18 F F2(typeset)3.243 E F0 -.2(bu)3.243 G .743
+F .49(alue to)-.25 F F3(RANDOM)2.99 E F0 .49(seeds the random)2.99 F
+.055(number generator)72 510 R(.)-.55 E F3(REPL)5.055 E(Y)-.92 E F0 .054
+(is the def)2.554 F .054(ault v)-.1 F .054(ariable used by the)-.25 F F3
+-.18(re)2.554 G(ad).18 E F0 -.2(bu)2.554 G .054(iltin when no v).2 F
+.054(ariable names are sup-)-.25 F .742(plied as ar)72 522 R 3.243
+(guments. The)-.18 F F3(typeset)3.243 E F0 -.2(bu)3.243 G .743
(iltin is used to de\214ne v).2 F .743(ariables and gi)-.25 F 1.043 -.15
-(ve t)-.25 H .743(hem attrib).15 F .743(utes such as)-.2 F F2 -.18(re)
-3.243 G(ad-).18 E(only)72 518.4 Q F0 5.512(.B)C .512
-(ash arithmetic allo)-5.512 F .512(ws the e)-.25 F -.25(va)-.25 G .511
-(luation of an e).25 F .511
-(xpression and the substitution of the result.)-.15 F .511(Shell v)5.511
-F(ari-)-.25 E .222
-(ables may be used as operands, and the result of an e)72 530.4 R .222
+(ve t)-.25 H .743(hem attrib).15 F .743(utes such as)-.2 F F3 -.18(re)
+3.243 G(ad-).18 E(only)72 534 Q F0 5.512(.B)C .512(ash arithmetic allo)
+-5.512 F .512(ws the e)-.25 F -.25(va)-.25 G .511(luation of an e).25 F
+.511(xpression and the substitution of the result.)-.15 F .511(Shell v)
+5.511 F(ari-)-.25 E .222
+(ables may be used as operands, and the result of an e)72 546 R .222
(xpression may be assigned to a v)-.15 F 2.722(ariable. Nearly)-.25 F
-.222(all of)2.722 F(the operators from the C language are a)72 542.4 Q
--.25(va)-.2 G(ilable, with the same precedence rules:).25 E/F3 10
-/Courier@0 SF 6($e)97 560.4 S(cho $\(\(3 + 5 * 32\)\))-6 E(163)97 572.4
-Q F0 -.15(Fo)72 594 S 3.24(ri).15 G(nteracti)-3.24 E 1.04 -.15(ve u)-.25
-H .74(se, Bash implements ksh-style aliases and b).15 F .74
-(uiltins such as)-.2 F F2(fc)3.24 E F0 .74(\(discussed belo)3.24 F .74
-(w\) and)-.25 F F2(jobs)3.24 E F0(.)A .291(Bash aliases allo)72 606 R
-2.791(was)-.25 G .291(tring to be substituted for a command name.)-2.791
-F(The)5.291 E 2.791(yc)-.15 G .291(an be used to create a mnemonic)
--2.791 F .568(for a)72 618 R/F4 9/Times-Roman@0 SF(UNIX)3.068 E F0 .568
-(command name \()3.068 F F3 .568(alias del=rm)B F0 .568(\), to e)B .567
+.222(all of)2.722 F(the operators from the C language are a)72 558 Q
+-.25(va)-.2 G(ilable, with the same precedence rules:).25 E F1 6($e)97
+576 S(cho $\(\(3 + 5 * 32\)\))-6 E(163)97 588 Q F0 -.15(Fo)72 609.6 S
+3.24(ri).15 G(nteracti)-3.24 E 1.04 -.15(ve u)-.25 H .74
+(se, Bash implements ksh-style aliases and b).15 F .74(uiltins such as)
+-.2 F F3(fc)3.24 E F0 .74(\(discussed belo)3.24 F .74(w\) and)-.25 F F3
+(jobs)3.24 E F0(.)A .291(Bash aliases allo)72 621.6 R 2.791(was)-.25 G
+.291(tring to be substituted for a command name.)-2.791 F(The)5.291 E
+2.791(yc)-.15 G .291(an be used to create a mnemonic)-2.791 F .568
+(for a)72 633.6 R/F4 9/Times-Roman@0 SF(UNIX)3.068 E F0 .568
+(command name \()3.068 F F1 .568(alias del=rm)B F0 .568(\), to e)B .567
(xpand a single w)-.15 F .567(ord to a comple)-.1 F 3.067(xc)-.15 G .567
-(ommand \()-3.067 F F3(alias)A .255
-(news='xterm -g 80x45 -title trn -e trn -e -S1 -N &')72 630 R F0 .255
-(\), or to ensure that a command)B(is in)72 642 Q -.2(vo)-.4 G -.1(ke).2
-G 2.5(dw).1 G(ith a basic set of options \()-2.5 E F3
-(alias ls="/bin/ls -F")A F0(\).)A .293(The C shell \()97 657.6 R F2(csh)
+(ommand \()-3.067 F F1(alias)A .255
+(news='xterm -g 80x45 -title trn -e trn -e -S1 -N &')72 645.6 R F0 .255
+(\), or to ensure that a command)B(is in)72 657.6 Q -.2(vo)-.4 G -.1(ke)
+.2 G 2.5(dw).1 G(ith a basic set of options \()-2.5 E F1
+(alias ls="/bin/ls -F")A F0(\).)A .293(The C shell \()97 673.2 R F3(csh)
A F0 .293(\)\207, originally written by Bill Jo)B 2.792(yw)-.1 G .292
(hile at Berk)-2.792 F(ele)-.1 E 1.592 -.65(y, i)-.15 H 2.792(sw).65 G
.292(idely used and quite popular)-2.792 F 1.499(for its interacti)72
-669.6 R 1.799 -.15(ve f)-.25 H 3.999(acilities. Bash).05 F 1.499
+685.2 R 1.799 -.15(ve f)-.25 H 3.999(acilities. Bash).05 F 1.499
(includes a csh-compatible history e)3.999 F 1.5
-(xpansion mechanism \(\231! history\232\),)-.15 F .019(brace e)72 681.6
-R .018(xpansion, access to a stack of directories via the)-.15 F F2
-(pushd)2.518 E F0(,)A F2(popd)2.518 E F0 2.518(,a)C(nd)-2.518 E F2(dirs)
+(xpansion mechanism \(\231! history\232\),)-.15 F .019(brace e)72 697.2
+R .018(xpansion, access to a stack of directories via the)-.15 F F3
+(pushd)2.518 E F0(,)A F3(popd)2.518 E F0 2.518(,a)C(nd)-2.518 E F3(dirs)
2.518 E F0 -.2(bu)2.518 G .018(iltins, and tilde e).2 F(xpansion,)-.15 E
-1.293(to generate users' home directories.)72 693.6 R -.35(Ti)6.294 G
+1.293(to generate users' home directories.)72 709.2 R -.35(Ti)6.294 G
1.294(lde e).35 F 1.294(xpansion has also been adopted by both the K)
--.15 F 1.294(orn Shell and)-.35 F .32 LW 144 708.2 72 708.2 DL/F5 8
-/Times-Roman@0 SF(\207Morris Bolsk)72 720 Q 2(ya)-.12 G(nd Da)-2 E
+-.15 F 1.294(orn Shell and)-.35 F .32 LW 144 717.2 72 717.2 DL/F5 8
+/Times-Roman@0 SF(\207Morris Bolsk)72 727.2 Q 2(ya)-.12 G(nd Da)-2 E
(vid K)-.16 E(orn,)-.28 E/F6 8/Times-Italic@0 SF(The K)2 E
(ornShell Command and Pr)-.32 E -.08(og)-.36 G -.12(ra).08 G
(mming Langua).12 E -.08(ge)-.08 G F5 2(,P).08 G(rentice Hall, 1989.)-2
-E EP
+E 0 Cg EP
%%Page: 3 3
%%BeginPageSetup
BP
(xpansion, the ability to de\214ne a v)-.15 F(ariable)-.25 E .283
(and a function with the same name, local v)72 398.4 R .282
(ariables in shell functions, the ability to enable and disable indi-)
--.25 F .547(vidual b)72 410.4 R .547
-(uiltins or write a function to replace a b)-.2 F .547
-(uiltin, or a means to e)-.2 F .547
-(xport a shell function to a child pro-)-.15 F(cess.)72 422.4 Q .32
+-.25 F 1.532(vidual b)72 410.4 R 1.532
+(uiltins or write a function to replace a b)-.2 F 1.533
+(uiltin, or a means to e)-.2 F 1.533(xport a shell function to a child)
+-.15 F(process.)72 422.4 Q .32
(Bash has closed a long-standing shell security hole by not using the)97
438 R F1($IFS)2.82 E F0 -.25(va)2.82 G .32(riable to split each w).25 F
(ord)-.1 E 1.254(read by the shell, b)72 450 R 1.254
(on out here.)-.1 F(Interestingly)5.158 E 2.658(,t)-.65 G .158(he ne)
-2.658 F .159(xt release of ksh will change to reading)-.15 F F1($ENV)
2.659 E .32 LW 144 705.2 72 705.2 DL/F4 8/Times-Roman@0 SF .559
-(\207Bill Jo)72 717 R 1.599 -.52(y, A)-.08 H 2.559(nI).52 G .559
+(\207Bill Jo)72 715.2 R 1.599 -.52(y, A)-.08 H 2.559(nI).52 G .559
(ntroduction to the C Shell,)-2.559 F/F5 8/Times-Italic@0 SF .558
(UNIX User')2.558 F 2.558(sS)-.32 G .558(upplementary Documents)-2.558 F
F4 2.558(,U)C(ni)-2.558 E -.12(ve)-.2 G .558(rsity of California at).12
-F(Berk)72 727 Q(ele)-.08 E 1.04 -.52(y, 1)-.12 H(986.).52 E EP
+F(Berk)72 725.2 Q(ele)-.08 E 1.04 -.52(y, 1)-.12 H(986.).52 E 0 Cg EP
%%Page: 4 4
%%BeginPageSetup
BP
-3.031 G -.15(ve)-3.281 G 3.031(nw).15 G .531
(hat happens when readline w)-3.031 F .531(ants to ring the terminal')
-.1 F 3.03(sb)-.55 G 3.03(ell. All)-3.03 F .53(of these v)3.03 F
-(ariables)-.25 E EP
+(ariables)-.25 E 0 Cg EP
%%Page: 5 5
%%BeginPageSetup
BP
249.6 Q($endif)97 261.6 Q F0 .322(There is a readline command to re-rea\
d the \214le, so users can edit the \214le, change some bindings, and b\
e)72 283.2 R(gin)-.15 E(to use them almost immediately)72 295.2 Q(.)-.65
-E .851(Bash implements the)97 310.8 R F1(bind)3.351 E F0 -.2(bu)3.351 G
-.851(iltin for more dyamic control of readline than the startup \214le \
-permits.).2 F F1(Bind)72 322.8 Q F0 .25(is used in se)2.75 F -.15(ve)
+E .518(Bash implements the)97 310.8 R F1(bind)3.018 E F0 -.2(bu)3.018 G
+.518(iltin for more dynamic control of readline than the startup \214le\
+ permits.).2 F F1(Bind)72 322.8 Q F0 .25(is used in se)2.75 F -.15(ve)
-.25 G .25(ral w).15 F 2.75(ays. In)-.1 F/F3 10/Times-Italic@0 SF(list)
2.75 E F0 .25(mode, it can display the current k)2.75 F .55 -.15(ey b)
-.1 H .25(indings, list all the readline edit-).15 F .149(ing directi)72
(and the readline library)72 570 R 5.077(.B)-.65 G .077(ash pro)-5.077 F
.077(vides v)-.15 F .077(ariables \()-.25 F F1($HISTFILE)A F0(,)A F1
($HISTSIZE)2.577 E F0 2.577(,a)C(nd)-2.577 E F1($HISTCONTR)2.577 E(OL)
--.3 E F0 2.577(\)a)C(nd)-2.577 E(the)72 582 Q F1(history)2.89 E F0(and)
-2.89 E F1(fc)2.89 E F0 -.2(bu)2.89 G .39
-(iltins to manipulate the history list.).2 F .391(The v)5.391 F .391
-(alue of)-.25 F F1($HISTFILE)2.891 E F0 .391(specifes the \214le where)
-2.891 F .49(Bash writes the command history on e)72 594 R .489
+-.3 E F0 2.577(\)a)C(nd)-2.577 E(the)72 582 Q F1(history)2.759 E F0(and)
+2.759 E F1(fc)2.759 E F0 -.2(bu)2.759 G .259
+(iltins to manipulate the history list.).2 F .26(The v)5.259 F .26
+(alue of)-.25 F F1($HISTFILE)2.76 E F0 .26(speci\214es the \214le where)
+2.76 F .49(Bash writes the command history on e)72 594 R .489
(xit and reads it on startup.)-.15 F F1($HISTSIZE)5.489 E F0 .489
(is used to limit the number)2.989 F .642(of commands sa)72 606 R -.15
(ve)-.2 G 3.142(di).15 G 3.142(nt)-3.142 G .642(he history)-3.142 F(.)
-.15(xe)-.15 G 1.022(cution of pre).15 F 1.022(vious commands v)-.25 F
1.022(ery similar to csh \(\231bang history\232, so)-.15 F
(called because the e)72 726 Q
-(xclamation point introduces a history substitution\):)-.15 E EP
+(xclamation point introduces a history substitution\):)-.15 E 0 Cg EP
%%Page: 6 6
%%BeginPageSetup
BP
(xpansion. Process)-.15 F .103(substitution can be used to com-)2.603 F
(pare the outputs of tw)72 660 Q 2.5(od)-.1 G(if)-2.5 E(ferent v)-.25 E
(ersions of an application as part of a re)-.15 E(gression test:)-.15 E
-F1 6($c)97 678 S(mp <\(old_prog\) <\(new_prog\))-6 E EP
+F1 6($c)97 678 S(mp <\(old_prog\) <\(new_prog\))-6 E 0 Cg EP
%%Page: 7 7
%%BeginPageSetup
BP
E(/usr/local/bin)97 624 Q 6($/)97 636 S(bin/pwd)-6 E
(/net/share/sun4/local/bin)97 648 Q 6($c)97 660 S 6(d.)-6 G(.)-6 E 6($p)
97 672 S(wd)-6 E(/usr/local)97 684 Q 6($/)97 696 S(bin/pwd)-6 E
-(/net/share/sun4/local)97 708 Q 6($c)97 720 S 6(d.)-6 G(.)-6 E EP
+(/net/share/sun4/local)97 708 Q 6($c)97 720 S 6(d.)-6 G(.)-6 E 0 Cg EP
%%Page: 8 8
%%BeginPageSetup
BP
(nting the use of these sequences in earlier v).15 F .559(ersions, b)
-.15 F .559(ut the readline redisplay algorithm assumed)-.2 F
(each character occupied ph)72 720 Q(ysical screen space and w)-.05 E
-(ould wrap lines prematurely)-.1 E(.)-.65 E EP
+(ould wrap lines prematurely)-.1 E(.)-.65 E 0 Cg EP
%%Page: 9 9
%%BeginPageSetup
BP
(mentation to be printed by the)72 697.2 R F1(help)3.851 E F0 1.351
(command \(possibly present in the shared object as well\).)3.851 F
1.351(It w)6.351 F(ould)-.1 E(manage the details of e)72 709.2 Q
-(xtending the internal table of b)-.15 E(uiltins.)-.2 E EP
+(xtending the internal table of b)-.15 E(uiltins.)-.2 E 0 Cg EP
%%Page: 10 10
%%BeginPageSetup
BP
(command, which prints)3.292 F 1.412(the v)72 96 R 1.412
(alues of system con\214guration v)-.25 F 1.411
(ariables de\214ned by POSIX.2, and a)-.25 F F1(diso)3.911 E(wn)-.1 E F0
--.2(bu)3.911 G 1.411(iltin, which causes a).2 F 1.347
-(shell running with job control acti)72 108 R 1.647 -.15(ve t)-.25 H
-3.847<6f99>.15 G(for)-3.847 E 1.347
-(get about\232 one or more background jobs in its internal jobs)-.18 F
-3.465(table. Using)72 120 R F1(getconf)3.465 E F0 3.465(,f)C .965(or e)
--3.465 F .965(xample, a user could retrie)-.15 F 1.264 -.15(ve a v)-.25
-H .964(alue for)-.1 F F1($P)3.464 E -.95(AT)-.74 G(H).95 E F0 .964
-(guaranteed to \214nd all of the)3.464 F .884
+-.2(bu)3.911 G 1.411(iltin, which causes a).2 F .547
+(shell running with job control acti)72 108 R .847 -.15(ve t)-.25 H
+3.047<6f99>.15 G(for)-3.047 E .547
+(get about\232 one or more background jobs in its internal jobs ta-)-.18
+F 3.866(ble. Using)72 120 R F1(getconf)3.866 E F0 3.866(,f)C 1.366(or e)
+-3.866 F 1.366(xample, a user could retrie)-.15 F 1.666 -.15(ve a v)-.25
+H 1.365(alue for)-.1 F F1($P)3.865 E -.95(AT)-.74 G(H).95 E F0 1.365
+(guaranteed to \214nd all of the)3.865 F .884
(POSIX standard utilities, or \214nd out ho)72 132 R 3.385(wl)-.25 G
.885
(ong \214lenames may be in the \214le system containing a speci\214ed)
-.15(ve)-.25 G .948(ral Linux distrib).15 F .948
(utions \(more about the dif)-.2 F .948
(ference in a moment\), and as contrib)-.25 F(uted)-.2 E .32 LW 144
-676.4 72 676.4 DL/F5 8/Times-Roman@0 SF .781
+678.2 72 678.2 DL/F5 8/Times-Roman@0 SF .781
(\207S. R. Bourne, \231UNIX T)72 688.2 R .781(ime-Sharing System:)-.28 F
.781(The UNIX Shell\232,)4.781 F/F6 8/Times-Italic@0 SF .78
(Bell System T)2.78 F(ec)-.736 E .78(hnical J)-.12 F(ournal)-.2 E F5
(f, \231Rc \255 A Shell for Plan 9 and)-.2 F/F7 7/Times-Roman@0 SF(UNIX)
2.432 E F5(systems\232,)2.432 E F6(Pr)2.432 E .432
(oc. of the Summer 1990 EUUG Confer)-.36 F(ence)-.296 E F5 2.432(,L)C
-(on-)-2.432 E(don, July)72 720 Q 2(,1)-.52 G(990, pp. 21-33.)-2 E EP
+(on-)-2.432 E(don, July)72 720 Q 2(,1)-.52 G(990, pp. 21-33.)-2 E 0 Cg
+EP
%%Page: 11 11
%%BeginPageSetup
BP
(ral thousand re).15 F 1.515(gular users, and their feedback has)-.15 F
(helped to mak)72 235.2 Q 2.5(ei)-.1 G 2.5(ta)-2.5 G 2.5(sg)-2.5 G
(ood as it is today \255 a testament to the bene\214ts of free softw)
--2.5 E(are.)-.1 E .32 LW 144 708.2 72 708.2 DL/F4 8/Times-Roman@0 SF
+-2.5 E(are.)-.1 E .32 LW 144 710 72 710 DL/F4 8/Times-Roman@0 SF
(*BSD/386 is a trademark of Berk)72 720 Q(ele)-.08 E 2(yS)-.12 G(oftw)-2
-E(are Design, Inc.)-.08 E EP
+E(are Design, Inc.)-.08 E 0 Cg EP
%%Trailer
end
%%EOF
_\bt_\bi_\bl_\bd_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn, _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br _\ba_\bn_\bd _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn, _\bc_\bo_\bm_\bm_\ba_\bn_\bd _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\b-
_\bt_\bi_\bo_\bn, _\ba_\br_\bi_\bt_\bh_\bm_\be_\bt_\bi_\bc _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn, _\bw_\bo_\br_\bd _\bs_\bp_\bl_\bi_\bt_\bt_\bi_\bn_\bg, and _\bp_\ba_\bt_\bh_\bn_\ba_\bm_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn.
- The order of expansions is: brace expansion, tilde expansion, parame-
- ter, variable and arithmetic expansion and command substitution (done
- in a left-to-right fashion), word splitting, and pathname expansion.
+ The order of expansions is: brace expansion; tilde expansion, parameter
+ and variable expansion, arithmetic expansion, and command substitution
+ (done in a left-to-right fashion); word splitting; and pathname expan-
+ sion.
On systems that can support it, there is an additional expansion avail-
- able: _\bp_\br_\bo_\bc_\be_\bs_\bs _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn.
+ able: _\bp_\br_\bo_\bc_\be_\bs_\bs _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn. This is performed at the same time as
+ tilde, parameter, variable, and arithmetic expansion and command sub-
+ stitution.
Only brace expansion, word splitting, and pathname expansion can change
- the number of words of the expansion; other expansions expand a single
- word to a single word. The only exceptions to this are the expansions
+ the number of words of the expansion; other expansions expand a single
+ word to a single word. The only exceptions to this are the expansions
of "$\b$@\b@" and "$\b${\b{_\bn_\ba_\bm_\be[\b[@\b@]\b]}\b}" as explained above (see P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS).
B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
_\bB_\br_\ba_\bc_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn is a mechanism by which arbitrary strings may be gener-
- ated. This mechanism is similar to _\bp_\ba_\bt_\bh_\bn_\ba_\bm_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn, but the file-
+ ated. This mechanism is similar to _\bp_\ba_\bt_\bh_\bn_\ba_\bm_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn, but the file-
names generated need not exist. Patterns to be brace expanded take the
form of an optional _\bp_\br_\be_\ba_\bm_\bb_\bl_\be, followed by either a series of comma-sep-
- arated strings or a sequence expression between a pair of braces, fol-
- lowed by an optional _\bp_\bo_\bs_\bt_\bs_\bc_\br_\bi_\bp_\bt. The preamble is prefixed to each
+ arated strings or a sequence expression between a pair of braces, fol-
+ lowed by an optional _\bp_\bo_\bs_\bt_\bs_\bc_\br_\bi_\bp_\bt. The preamble is prefixed to each
string contained within the braces, and the postscript is then appended
to each resulting string, expanding left to right.
- Brace expansions may be nested. The results of each expanded string
- are not sorted; left to right order is preserved. For example,
+ Brace expansions may be nested. The results of each expanded string
+ are not sorted; left to right order is preserved. For example,
a{\b{d,c,b}\b}e expands into `ade ace abe'.
- A sequence expression takes the form {\b{_\bx.\b..\b._\by[\b[.\b..\b._\bi_\bn_\bc_\br]\b]}\b}, where _\bx and _\by are
- either integers or single characters, and _\bi_\bn_\bc_\br, an optional increment,
- is an integer. When integers are supplied, the expression expands to
- each number between _\bx and _\by, inclusive. Supplied integers may be pre-
- fixed with _\b0 to force each term to have the same width. When either _\bx
- or _\by begins with a zero, the shell attempts to force all generated
- terms to contain the same number of digits, zero-padding where neces-
- sary. When characters are supplied, the expression expands to each
- character lexicographically between _\bx and _\by, inclusive, using the
- default C locale. Note that both _\bx and _\by must be of the same type.
- When the increment is supplied, it is used as the difference between
+ A sequence expression takes the form {\b{_\bx.\b..\b._\by[\b[.\b..\b._\bi_\bn_\bc_\br]\b]}\b}, where _\bx and _\by are
+ either integers or single characters, and _\bi_\bn_\bc_\br, an optional increment,
+ is an integer. When integers are supplied, the expression expands to
+ each number between _\bx and _\by, inclusive. Supplied integers may be pre-
+ fixed with _\b0 to force each term to have the same width. When either _\bx
+ or _\by begins with a zero, the shell attempts to force all generated
+ terms to contain the same number of digits, zero-padding where neces-
+ sary. When characters are supplied, the expression expands to each
+ character lexicographically between _\bx and _\by, inclusive, using the
+ default C locale. Note that both _\bx and _\by must be of the same type.
+ When the increment is supplied, it is used as the difference between
each term. The default increment is 1 or -1 as appropriate.
Brace expansion is performed before any other expansions, and any char-
- acters special to other expansions are preserved in the result. It is
- strictly textual. B\bBa\bas\bsh\bh does not apply any syntactic interpretation to
+ acters special to other expansions are preserved in the result. It is
+ strictly textual. B\bBa\bas\bsh\bh does not apply any syntactic interpretation to
the context of the expansion or the text between the braces.
- A correctly-formed brace expansion must contain unquoted opening and
- closing braces, and at least one unquoted comma or a valid sequence
- expression. Any incorrectly formed brace expansion is left unchanged.
+ A correctly-formed brace expansion must contain unquoted opening and
+ closing braces, and at least one unquoted comma or a valid sequence
+ expression. Any incorrectly formed brace expansion is left unchanged.
A {\b{ or ,\b, may be quoted with a backslash to prevent its being considered
- part of a brace expression. To avoid conflicts with parameter expan-
+ part of a brace expression. To avoid conflicts with parameter expan-
sion, the string $\b${\b{ is not considered eligible for brace expansion.
This construct is typically used as shorthand when the common prefix of
or
chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}
- Brace expansion introduces a slight incompatibility with historical
- versions of s\bsh\bh. s\bsh\bh does not treat opening or closing braces specially
- when they appear as part of a word, and preserves them in the output.
- B\bBa\bas\bsh\bh removes braces from words as a consequence of brace expansion.
- For example, a word entered to s\bsh\bh as _\bf_\bi_\bl_\be_\b{_\b1_\b,_\b2_\b} appears identically in
- the output. The same word is output as _\bf_\bi_\bl_\be_\b1 _\bf_\bi_\bl_\be_\b2 after expansion by
- b\bba\bas\bsh\bh. If strict compatibility with s\bsh\bh is desired, start b\bba\bas\bsh\bh with the
+ Brace expansion introduces a slight incompatibility with historical
+ versions of s\bsh\bh. s\bsh\bh does not treat opening or closing braces specially
+ when they appear as part of a word, and preserves them in the output.
+ B\bBa\bas\bsh\bh removes braces from words as a consequence of brace expansion.
+ For example, a word entered to s\bsh\bh as _\bf_\bi_\bl_\be_\b{_\b1_\b,_\b2_\b} appears identically in
+ the output. The same word is output as _\bf_\bi_\bl_\be_\b1 _\bf_\bi_\bl_\be_\b2 after expansion by
+ b\bba\bas\bsh\bh. If strict compatibility with s\bsh\bh is desired, start b\bba\bas\bsh\bh with the
+\b+B\bB option or disable brace expansion with the +\b+B\bB option to the s\bse\bet\bt com-
mand (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
T\bTi\bil\bld\bde\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
- If a word begins with an unquoted tilde character (`~\b~'), all of the
- characters preceding the first unquoted slash (or all characters, if
- there is no unquoted slash) are considered a _\bt_\bi_\bl_\bd_\be_\b-_\bp_\br_\be_\bf_\bi_\bx. If none of
- the characters in the tilde-prefix are quoted, the characters in the
- tilde-prefix following the tilde are treated as a possible _\bl_\bo_\bg_\bi_\bn _\bn_\ba_\bm_\be.
- If this login name is the null string, the tilde is replaced with the
- value of the shell parameter H\bHO\bOM\bME\bE. If H\bHO\bOM\bME\bE is unset, the home direc-
- tory of the user executing the shell is substituted instead. Other-
- wise, the tilde-prefix is replaced with the home directory associated
+ If a word begins with an unquoted tilde character (`~\b~'), all of the
+ characters preceding the first unquoted slash (or all characters, if
+ there is no unquoted slash) are considered a _\bt_\bi_\bl_\bd_\be_\b-_\bp_\br_\be_\bf_\bi_\bx. If none of
+ the characters in the tilde-prefix are quoted, the characters in the
+ tilde-prefix following the tilde are treated as a possible _\bl_\bo_\bg_\bi_\bn _\bn_\ba_\bm_\be.
+ If this login name is the null string, the tilde is replaced with the
+ value of the shell parameter H\bHO\bOM\bME\bE. If H\bHO\bOM\bME\bE is unset, the home direc-
+ tory of the user executing the shell is substituted instead. Other-
+ wise, the tilde-prefix is replaced with the home directory associated
with the specified login name.
- If the tilde-prefix is a `~+', the value of the shell variable P\bPW\bWD\bD
+ If the tilde-prefix is a `~+', the value of the shell variable P\bPW\bWD\bD
replaces the tilde-prefix. If the tilde-prefix is a `~-', the value of
- the shell variable O\bOL\bLD\bDP\bPW\bWD\bD, if it is set, is substituted. If the char-
- acters following the tilde in the tilde-prefix consist of a number _\bN,
- optionally prefixed by a `+' or a `-', the tilde-prefix is replaced
+ the shell variable O\bOL\bLD\bDP\bPW\bWD\bD, if it is set, is substituted. If the char-
+ acters following the tilde in the tilde-prefix consist of a number _\bN,
+ optionally prefixed by a `+' or a `-', the tilde-prefix is replaced
with the corresponding element from the directory stack, as it would be
displayed by the d\bdi\bir\brs\bs builtin invoked with the tilde-prefix as an argu-
- ment. If the characters following the tilde in the tilde-prefix con-
+ ment. If the characters following the tilde in the tilde-prefix con-
sist of a number without a leading `+' or `-', `+' is assumed.
If the login name is invalid, or the tilde expansion fails, the word is
Each variable assignment is checked for unquoted tilde-prefixes immedi-
ately following a :\b: or the first =\b=. In these cases, tilde expansion is
- also performed. Consequently, one may use filenames with tildes in
- assignments to P\bPA\bAT\bTH\bH, M\bMA\bAI\bIL\bLP\bPA\bAT\bTH\bH, and C\bCD\bDP\bPA\bAT\bTH\bH, and the shell assigns the
+ also performed. Consequently, one may use filenames with tildes in
+ assignments to P\bPA\bAT\bTH\bH, M\bMA\bAI\bIL\bLP\bPA\bAT\bTH\bH, and C\bCD\bDP\bPA\bAT\bTH\bH, and the shell assigns the
expanded value.
P\bPa\bar\bra\bam\bme\bet\bte\ber\br E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
The `$\b$' character introduces parameter expansion, command substitution,
- or arithmetic expansion. The parameter name or symbol to be expanded
- may be enclosed in braces, which are optional but serve to protect the
- variable to be expanded from characters immediately following it which
+ or arithmetic expansion. The parameter name or symbol to be expanded
+ may be enclosed in braces, which are optional but serve to protect the
+ variable to be expanded from characters immediately following it which
could be interpreted as part of the name.
- When braces are used, the matching ending brace is the first `}\b}' not
- escaped by a backslash or within a quoted string, and not within an
+ When braces are used, the matching ending brace is the first `}\b}' not
+ escaped by a backslash or within a quoted string, and not within an
embedded arithmetic expansion, command substitution, or parameter
expansion.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}
- The value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is substituted. The braces are required
- when _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a positional parameter with more than one
+ The value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is substituted. The braces are required
+ when _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a positional parameter with more than one
digit, or when _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is followed by a character which is not
to be interpreted as part of its name. The _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a shell
- parameter as described above P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS) or an array reference
+ parameter as described above P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS) or an array reference
(A\bAr\brr\bra\bay\bys\bs).
- If the first character of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an exclamation point (!\b!), it
+ If the first character of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an exclamation point (!\b!), it
introduces a level of variable indirection. B\bBa\bas\bsh\bh uses the value of the
variable formed from the rest of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br as the name of the variable;
- this variable is then expanded and that value is used in the rest of
- the substitution, rather than the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br itself. This is
+ this variable is then expanded and that value is used in the rest of
+ the substitution, rather than the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br itself. This is
known as _\bi_\bn_\bd_\bi_\br_\be_\bc_\bt _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn. The exceptions to this are the expansions
- of ${!\b!_\bp_\br_\be_\bf_\bi_\bx*\b*} and ${!\b!_\bn_\ba_\bm_\be[_\b@]} described below. The exclamation point
- must immediately follow the left brace in order to introduce indirec-
+ of ${!\b!_\bp_\br_\be_\bf_\bi_\bx*\b*} and ${!\b!_\bn_\ba_\bm_\be[_\b@]} described below. The exclamation point
+ must immediately follow the left brace in order to introduce indirec-
tion.
In each of the cases below, _\bw_\bo_\br_\bd is subject to tilde expansion, parame-
ter expansion, command substitution, and arithmetic expansion.
- When not performing substring expansion, using the forms documented
- below (e.g., :\b:-\b-), b\bba\bas\bsh\bh tests for a parameter that is unset or null.
- Omitting the colon results in a test only for a parameter that is
+ When not performing substring expansion, using the forms documented
+ below (e.g., :\b:-\b-), b\bba\bas\bsh\bh tests for a parameter that is unset or null.
+ Omitting the colon results in a test only for a parameter that is
unset.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:-\b-_\bw_\bo_\br_\bd}
- U\bUs\bse\be D\bDe\bef\bfa\bau\bul\blt\bt V\bVa\bal\blu\bue\bes\bs. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is unset or null, the expan-
- sion of _\bw_\bo_\br_\bd is substituted. Otherwise, the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
+ U\bUs\bse\be D\bDe\bef\bfa\bau\bul\blt\bt V\bVa\bal\blu\bue\bes\bs. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is unset or null, the expan-
+ sion of _\bw_\bo_\br_\bd is substituted. Otherwise, the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
is substituted.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:=\b=_\bw_\bo_\br_\bd}
- A\bAs\bss\bsi\big\bgn\bn D\bDe\bef\bfa\bau\bul\blt\bt V\bVa\bal\blu\bue\bes\bs. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is unset or null, the
+ A\bAs\bss\bsi\big\bgn\bn D\bDe\bef\bfa\bau\bul\blt\bt V\bVa\bal\blu\bue\bes\bs. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is unset or null, the
expansion of _\bw_\bo_\br_\bd is assigned to _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. The value of _\bp_\ba_\br_\ba_\bm_\b-
- _\be_\bt_\be_\br is then substituted. Positional parameters and special
+ _\be_\bt_\be_\br is then substituted. Positional parameters and special
parameters may not be assigned to in this way.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:?\b?_\bw_\bo_\br_\bd}
- D\bDi\bis\bsp\bpl\bla\bay\by E\bEr\brr\bro\bor\br i\bif\bf N\bNu\bul\bll\bl o\bor\br U\bUn\bns\bse\bet\bt. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is null or unset,
- the expansion of _\bw_\bo_\br_\bd (or a message to that effect if _\bw_\bo_\br_\bd is
- not present) is written to the standard error and the shell, if
+ D\bDi\bis\bsp\bpl\bla\bay\by E\bEr\brr\bro\bor\br i\bif\bf N\bNu\bul\bll\bl o\bor\br U\bUn\bns\bse\bet\bt. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is null or unset,
+ the expansion of _\bw_\bo_\br_\bd (or a message to that effect if _\bw_\bo_\br_\bd is
+ not present) is written to the standard error and the shell, if
it is not interactive, exits. Otherwise, the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
is substituted.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:+\b+_\bw_\bo_\br_\bd}
- U\bUs\bse\be A\bAl\blt\bte\ber\brn\bna\bat\bte\be V\bVa\bal\blu\bue\be. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is null or unset, nothing is
+ U\bUs\bse\be A\bAl\blt\bte\ber\brn\bna\bat\bte\be V\bVa\bal\blu\bue\be. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is null or unset, nothing is
substituted, otherwise the expansion of _\bw_\bo_\br_\bd is substituted.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:_\bo_\bf_\bf_\bs_\be_\bt}
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:_\bo_\bf_\bf_\bs_\be_\bt:\b:_\bl_\be_\bn_\bg_\bt_\bh}
- S\bSu\bub\bbs\bst\btr\bri\bin\bng\bg E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn. Expands to up to _\bl_\be_\bn_\bg_\bt_\bh characters of the
- value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br starting at the character specified by _\bo_\bf_\bf_\b-
+ S\bSu\bub\bbs\bst\btr\bri\bin\bng\bg E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn. Expands to up to _\bl_\be_\bn_\bg_\bt_\bh characters of the
+ value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br starting at the character specified by _\bo_\bf_\bf_\b-
_\bs_\be_\bt. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@, an indexed array subscripted by @\b@ or *\b*,
- or an associative array name, the results differ as described
- below. If _\bl_\be_\bn_\bg_\bt_\bh is omitted, expands to the substring of the
+ or an associative array name, the results differ as described
+ below. If _\bl_\be_\bn_\bg_\bt_\bh is omitted, expands to the substring of the
value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br starting at the character specified by _\bo_\bf_\bf_\bs_\be_\bt
- and extending to the end of the value. _\bl_\be_\bn_\bg_\bt_\bh and _\bo_\bf_\bf_\bs_\be_\bt are
+ and extending to the end of the value. _\bl_\be_\bn_\bg_\bt_\bh and _\bo_\bf_\bf_\bs_\be_\bt are
arithmetic expressions (see A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN below).
- If _\bo_\bf_\bf_\bs_\be_\bt evaluates to a number less than zero, the value is
- used as an offset in characters from the end of the value of
- _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. If _\bl_\be_\bn_\bg_\bt_\bh evaluates to a number less than zero, it
- is interpreted as an offset in characters from the end of the
- value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br rather than a number of characters, and the
- expansion is the characters between _\bo_\bf_\bf_\bs_\be_\bt and that result.
- Note that a negative offset must be separated from the colon by
- at least one space to avoid being confused with the :\b:-\b- expan-
+ If _\bo_\bf_\bf_\bs_\be_\bt evaluates to a number less than zero, the value is
+ used as an offset in characters from the end of the value of
+ _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. If _\bl_\be_\bn_\bg_\bt_\bh evaluates to a number less than zero, it
+ is interpreted as an offset in characters from the end of the
+ value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br rather than a number of characters, and the
+ expansion is the characters between _\bo_\bf_\bf_\bs_\be_\bt and that result.
+ Note that a negative offset must be separated from the colon by
+ at least one space to avoid being confused with the :\b:-\b- expan-
sion.
- If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@, the result is _\bl_\be_\bn_\bg_\bt_\bh positional parameters
+ If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@, the result is _\bl_\be_\bn_\bg_\bt_\bh positional parameters
beginning at _\bo_\bf_\bf_\bs_\be_\bt. A negative _\bo_\bf_\bf_\bs_\be_\bt is taken relative to one
- greater than the greatest positional parameter, so an offset of
- -1 evaluates to the last positional parameter. It is an expan-
+ greater than the greatest positional parameter, so an offset of
+ -1 evaluates to the last positional parameter. It is an expan-
sion error if _\bl_\be_\bn_\bg_\bt_\bh evaluates to a number less than zero.
If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an indexed array name subscripted by @ or *, the
- result is the _\bl_\be_\bn_\bg_\bt_\bh members of the array beginning with
- ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br[_\bo_\bf_\bf_\bs_\be_\bt]}. A negative _\bo_\bf_\bf_\bs_\be_\bt is taken relative to
- one greater than the maximum index of the specified array. It
- is an expansion error if _\bl_\be_\bn_\bg_\bt_\bh evaluates to a number less than
+ result is the _\bl_\be_\bn_\bg_\bt_\bh members of the array beginning with
+ ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br[_\bo_\bf_\bf_\bs_\be_\bt]}. A negative _\bo_\bf_\bf_\bs_\be_\bt is taken relative to
+ one greater than the maximum index of the specified array. It
+ is an expansion error if _\bl_\be_\bn_\bg_\bt_\bh evaluates to a number less than
zero.
- Substring expansion applied to an associative array produces
+ Substring expansion applied to an associative array produces
undefined results.
- Substring indexing is zero-based unless the positional parame-
- ters are used, in which case the indexing starts at 1 by
- default. If _\bo_\bf_\bf_\bs_\be_\bt is 0, and the positional parameters are
+ Substring indexing is zero-based unless the positional parame-
+ ters are used, in which case the indexing starts at 1 by
+ default. If _\bo_\bf_\bf_\bs_\be_\bt is 0, and the positional parameters are
used, $\b$0\b0 is prefixed to the list.
${!\b!_\bp_\br_\be_\bf_\bi_\bx*\b*}
${!\b!_\bp_\br_\be_\bf_\bi_\bx@\b@}
- N\bNa\bam\bme\bes\bs m\bma\bat\btc\bch\bhi\bin\bng\bg p\bpr\bre\bef\bfi\bix\bx. Expands to the names of variables whose
+ N\bNa\bam\bme\bes\bs m\bma\bat\btc\bch\bhi\bin\bng\bg p\bpr\bre\bef\bfi\bix\bx. Expands to the names of variables whose
names begin with _\bp_\br_\be_\bf_\bi_\bx, separated by the first character of the
- I\bIF\bFS\bS special variable. When _\b@ is used and the expansion appears
- within double quotes, each variable name expands to a separate
+ I\bIF\bFS\bS special variable. When _\b@ is used and the expansion appears
+ within double quotes, each variable name expands to a separate
word.
${!\b!_\bn_\ba_\bm_\be[_\b@]}
${!\b!_\bn_\ba_\bm_\be[_\b*]}
- L\bLi\bis\bst\bt o\bof\bf a\bar\brr\bra\bay\by k\bke\bey\bys\bs. If _\bn_\ba_\bm_\be is an array variable, expands to
- the list of array indices (keys) assigned in _\bn_\ba_\bm_\be. If _\bn_\ba_\bm_\be is
- not an array, expands to 0 if _\bn_\ba_\bm_\be is set and null otherwise.
- When _\b@ is used and the expansion appears within double quotes,
+ L\bLi\bis\bst\bt o\bof\bf a\bar\brr\bra\bay\by k\bke\bey\bys\bs. If _\bn_\ba_\bm_\be is an array variable, expands to
+ the list of array indices (keys) assigned in _\bn_\ba_\bm_\be. If _\bn_\ba_\bm_\be is
+ not an array, expands to 0 if _\bn_\ba_\bm_\be is set and null otherwise.
+ When _\b@ is used and the expansion appears within double quotes,
each key expands to a separate word.
${#\b#_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}
- P\bPa\bar\bra\bam\bme\bet\bte\ber\br l\ble\ben\bng\bgt\bth\bh. The length in characters of the value of
- _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is substituted. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is *\b* or @\b@, the value
- substituted is the number of positional parameters. If _\bp_\ba_\br_\ba_\bm_\be_\b-
- _\bt_\be_\br is an array name subscripted by *\b* or @\b@, the value substi-
- tuted is the number of elements in the array. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is
- an indexed array name subscripted by a negative number, that
- number is interpreted as relative to one greater than the maxi-
- mum index of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, so negative indices count back from the
- end of the array, and an index of -1 references the last ele-
+ P\bPa\bar\bra\bam\bme\bet\bte\ber\br l\ble\ben\bng\bgt\bth\bh. The length in characters of the value of
+ _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is substituted. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is *\b* or @\b@, the value
+ substituted is the number of positional parameters. If _\bp_\ba_\br_\ba_\bm_\be_\b-
+ _\bt_\be_\br is an array name subscripted by *\b* or @\b@, the value substi-
+ tuted is the number of elements in the array. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is
+ an indexed array name subscripted by a negative number, that
+ number is interpreted as relative to one greater than the maxi-
+ mum index of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, so negative indices count back from the
+ end of the array, and an index of -1 references the last ele-
ment.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br#\b#_\bw_\bo_\br_\bd}
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br#\b##\b#_\bw_\bo_\br_\bd}
R\bRe\bem\bmo\bov\bve\be m\bma\bat\btc\bch\bhi\bin\bng\bg p\bpr\bre\bef\bfi\bix\bx p\bpa\bat\btt\bte\ber\brn\bn. The _\bw_\bo_\br_\bd is expanded to produce
a pattern just as in pathname expansion. If the pattern matches
- the beginning of the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, then the result of the
- expansion is the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br with the shortest
- matching pattern (the ``#\b#'' case) or the longest matching pat-
- tern (the ``#\b##\b#'' case) deleted. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the
- pattern removal operation is applied to each positional parame-
+ the beginning of the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, then the result of the
+ expansion is the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br with the shortest
+ matching pattern (the ``#\b#'' case) or the longest matching pat-
+ tern (the ``#\b##\b#'' case) deleted. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the
+ pattern removal operation is applied to each positional parame-
ter in turn, and the expansion is the resultant list. If _\bp_\ba_\br_\ba_\bm_\b-
- _\be_\bt_\be_\br is an array variable subscripted with @\b@ or *\b*, the pattern
- removal operation is applied to each member of the array in
+ _\be_\bt_\be_\br is an array variable subscripted with @\b@ or *\b*, the pattern
+ removal operation is applied to each member of the array in
turn, and the expansion is the resultant list.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br%\b%_\bw_\bo_\br_\bd}
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br%\b%%\b%_\bw_\bo_\br_\bd}
R\bRe\bem\bmo\bov\bve\be m\bma\bat\btc\bch\bhi\bin\bng\bg s\bsu\buf\bff\bfi\bix\bx p\bpa\bat\btt\bte\ber\brn\bn. The _\bw_\bo_\br_\bd is expanded to produce
a pattern just as in pathname expansion. If the pattern matches
- a trailing portion of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, then the
- result of the expansion is the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br with
- the shortest matching pattern (the ``%\b%'' case) or the longest
- matching pattern (the ``%\b%%\b%'' case) deleted. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@
- or *\b*, the pattern removal operation is applied to each posi-
- tional parameter in turn, and the expansion is the resultant
- list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an array variable subscripted with @\b@ or
- *\b*, the pattern removal operation is applied to each member of
+ a trailing portion of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, then the
+ result of the expansion is the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br with
+ the shortest matching pattern (the ``%\b%'' case) or the longest
+ matching pattern (the ``%\b%%\b%'' case) deleted. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@
+ or *\b*, the pattern removal operation is applied to each posi-
+ tional parameter in turn, and the expansion is the resultant
+ list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an array variable subscripted with @\b@ or
+ *\b*, the pattern removal operation is applied to each member of
the array in turn, and the expansion is the resultant list.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br/\b/_\bp_\ba_\bt_\bt_\be_\br_\bn/\b/_\bs_\bt_\br_\bi_\bn_\bg}
P\bPa\bat\btt\bte\ber\brn\bn s\bsu\bub\bbs\bst\bti\bit\btu\but\bti\bio\bon\bn. The _\bp_\ba_\bt_\bt_\be_\br_\bn is expanded to produce a pat-
- tern just as in pathname expansion. _\bP_\ba_\br_\ba_\bm_\be_\bt_\be_\br is expanded and
- the longest match of _\bp_\ba_\bt_\bt_\be_\br_\bn against its value is replaced with
- _\bs_\bt_\br_\bi_\bn_\bg. If _\bp_\ba_\bt_\bt_\be_\br_\bn begins with /\b/, all matches of _\bp_\ba_\bt_\bt_\be_\br_\bn are
- replaced with _\bs_\bt_\br_\bi_\bn_\bg. Normally only the first match is
+ tern just as in pathname expansion. _\bP_\ba_\br_\ba_\bm_\be_\bt_\be_\br is expanded and
+ the longest match of _\bp_\ba_\bt_\bt_\be_\br_\bn against its value is replaced with
+ _\bs_\bt_\br_\bi_\bn_\bg. If _\bp_\ba_\bt_\bt_\be_\br_\bn begins with /\b/, all matches of _\bp_\ba_\bt_\bt_\be_\br_\bn are
+ replaced with _\bs_\bt_\br_\bi_\bn_\bg. Normally only the first match is
replaced. If _\bp_\ba_\bt_\bt_\be_\br_\bn begins with #\b#, it must match at the begin-
ning of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. If _\bp_\ba_\bt_\bt_\be_\br_\bn begins with
- %\b%, it must match at the end of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br.
+ %\b%, it must match at the end of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br.
If _\bs_\bt_\br_\bi_\bn_\bg is null, matches of _\bp_\ba_\bt_\bt_\be_\br_\bn are deleted and the /\b/ fol-
lowing _\bp_\ba_\bt_\bt_\be_\br_\bn may be omitted. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the sub-
- stitution operation is applied to each positional parameter in
- turn, and the expansion is the resultant list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is
- an array variable subscripted with @\b@ or *\b*, the substitution
- operation is applied to each member of the array in turn, and
+ stitution operation is applied to each positional parameter in
+ turn, and the expansion is the resultant list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is
+ an array variable subscripted with @\b@ or *\b*, the substitution
+ operation is applied to each member of the array in turn, and
the expansion is the resultant list.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br^\b^_\bp_\ba_\bt_\bt_\be_\br_\bn}
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br^\b^^\b^_\bp_\ba_\bt_\bt_\be_\br_\bn}
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br,\b,_\bp_\ba_\bt_\bt_\be_\br_\bn}
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br,\b,,\b,_\bp_\ba_\bt_\bt_\be_\br_\bn}
- C\bCa\bas\bse\be m\bmo\bod\bdi\bif\bfi\bic\bca\bat\bti\bio\bon\bn. This expansion modifies the case of alpha-
- betic characters in _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. The _\bp_\ba_\bt_\bt_\be_\br_\bn is expanded to pro-
+ C\bCa\bas\bse\be m\bmo\bod\bdi\bif\bfi\bic\bca\bat\bti\bio\bon\bn. This expansion modifies the case of alpha-
+ betic characters in _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. The _\bp_\ba_\bt_\bt_\be_\br_\bn is expanded to pro-
duce a pattern just as in pathname expansion. Each character in
- the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is tested against _\bp_\ba_\bt_\bt_\be_\br_\bn, and,
- if it matches the pattern, its case is converted. The pattern
- should not attempt to match more than one character. The ^\b^
- operator converts lowercase letters matching _\bp_\ba_\bt_\bt_\be_\br_\bn to upper-
+ the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is tested against _\bp_\ba_\bt_\bt_\be_\br_\bn, and,
+ if it matches the pattern, its case is converted. The pattern
+ should not attempt to match more than one character. The ^\b^
+ operator converts lowercase letters matching _\bp_\ba_\bt_\bt_\be_\br_\bn to upper-
case; the ,\b, operator converts matching uppercase letters to low-
ercase. The ^\b^^\b^ and ,\b,,\b, expansions convert each matched character
- in the expanded value; the ^\b^ and ,\b, expansions match and convert
- only the first character in the expanded value. If _\bp_\ba_\bt_\bt_\be_\br_\bn is
- omitted, it is treated like a ?\b?, which matches every character.
- If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the case modification operation is
- applied to each positional parameter in turn, and the expansion
- is the resultant list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an array variable sub-
+ in the expanded value; the ^\b^ and ,\b, expansions match and convert
+ only the first character in the expanded value. If _\bp_\ba_\bt_\bt_\be_\br_\bn is
+ omitted, it is treated like a ?\b?, which matches every character.
+ If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the case modification operation is
+ applied to each positional parameter in turn, and the expansion
+ is the resultant list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an array variable sub-
scripted with @\b@ or *\b*, the case modification operation is applied
- to each member of the array in turn, and the expansion is the
+ to each member of the array in turn, and the expansion is the
resultant list.
C\bCo\bom\bmm\bma\ban\bnd\bd S\bSu\bub\bbs\bst\bti\bit\btu\but\bti\bio\bon\bn
`\b`_\bc_\bo_\bm_\bm_\ba_\bn_\bd`\b`
B\bBa\bas\bsh\bh performs the expansion by executing _\bc_\bo_\bm_\bm_\ba_\bn_\bd and replacing the com-
- mand substitution with the standard output of the command, with any
+ mand substitution with the standard output of the command, with any
trailing newlines deleted. Embedded newlines are not deleted, but they
- may be removed during word splitting. The command substitution $\b$(\b(c\bca\bat\bt
+ may be removed during word splitting. The command substitution $\b$(\b(c\bca\bat\bt
_\bf_\bi_\bl_\be)\b) can be replaced by the equivalent but faster $\b$(\b(<\b< _\bf_\bi_\bl_\be)\b).
- When the old-style backquote form of substitution is used, backslash
- retains its literal meaning except when followed by $\b$, `\b`, or \\b\. The
+ When the old-style backquote form of substitution is used, backslash
+ retains its literal meaning except when followed by $\b$, `\b`, or \\b\. The
first backquote not preceded by a backslash terminates the command sub-
- stitution. When using the $(_\bc_\bo_\bm_\bm_\ba_\bn_\bd) form, all characters between the
+ stitution. When using the $(_\bc_\bo_\bm_\bm_\ba_\bn_\bd) form, all characters between the
parentheses make up the command; none are treated specially.
Command substitutions may be nested. To nest when using the backquoted
form, escape the inner backquotes with backslashes.
- If the substitution appears within double quotes, word splitting and
+ If the substitution appears within double quotes, word splitting and
pathname expansion are not performed on the results.
A\bAr\bri\bit\bth\bhm\bme\bet\bti\bic\bc E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
- Arithmetic expansion allows the evaluation of an arithmetic expression
- and the substitution of the result. The format for arithmetic expan-
+ Arithmetic expansion allows the evaluation of an arithmetic expression
+ and the substitution of the result. The format for arithmetic expan-
sion is:
$\b$(\b((\b(_\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn)\b))\b)
- The _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn is treated as if it were within double quotes, but a
- double quote inside the parentheses is not treated specially. All
+ The _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn is treated as if it were within double quotes, but a
+ double quote inside the parentheses is not treated specially. All
tokens in the expression undergo parameter and variable expansion, com-
- mand substitution, and quote removal. The result is treated as the
- arithmetic expression to be evaluated. Arithmetic expansions may be
+ mand substitution, and quote removal. The result is treated as the
+ arithmetic expression to be evaluated. Arithmetic expansions may be
nested.
- The evaluation is performed according to the rules listed below under
+ The evaluation is performed according to the rules listed below under
A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN. If _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn is invalid, b\bba\bas\bsh\bh prints a message
indicating failure and no substitution occurs.
P\bPr\bro\boc\bce\bes\bss\bs S\bSu\bub\bbs\bst\bti\bit\btu\but\bti\bio\bon\bn
- _\bP_\br_\bo_\bc_\be_\bs_\bs _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn is supported on systems that support named pipes
- (_\bF_\bI_\bF_\bO_\bs) or the /\b/d\bde\bev\bv/\b/f\bfd\bd method of naming open files. It takes the form
- of <\b<(\b(_\bl_\bi_\bs_\bt)\b) or >\b>(\b(_\bl_\bi_\bs_\bt)\b). The process _\bl_\bi_\bs_\bt is run with its input or out-
+ _\bP_\br_\bo_\bc_\be_\bs_\bs _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn is supported on systems that support named pipes
+ (_\bF_\bI_\bF_\bO_\bs) or the /\b/d\bde\bev\bv/\b/f\bfd\bd method of naming open files. It takes the form
+ of <\b<(\b(_\bl_\bi_\bs_\bt)\b) or >\b>(\b(_\bl_\bi_\bs_\bt)\b). The process _\bl_\bi_\bs_\bt is run with its input or out-
put connected to a _\bF_\bI_\bF_\bO or some file in /\b/d\bde\bev\bv/\b/f\bfd\bd. The name of this file
- is passed as an argument to the current command as the result of the
- expansion. If the >\b>(\b(_\bl_\bi_\bs_\bt)\b) form is used, writing to the file will pro-
- vide input for _\bl_\bi_\bs_\bt. If the <\b<(\b(_\bl_\bi_\bs_\bt)\b) form is used, the file passed as
+ is passed as an argument to the current command as the result of the
+ expansion. If the >\b>(\b(_\bl_\bi_\bs_\bt)\b) form is used, writing to the file will pro-
+ vide input for _\bl_\bi_\bs_\bt. If the <\b<(\b(_\bl_\bi_\bs_\bt)\b) form is used, the file passed as
an argument should be read to obtain the output of _\bl_\bi_\bs_\bt.
- When available, process substitution is performed simultaneously with
- parameter and variable expansion, command substitution, and arithmetic
+ When available, process substitution is performed simultaneously with
+ parameter and variable expansion, command substitution, and arithmetic
expansion.
W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg
- The shell scans the results of parameter expansion, command substitu-
- tion, and arithmetic expansion that did not occur within double quotes
+ The shell scans the results of parameter expansion, command substitu-
+ tion, and arithmetic expansion that did not occur within double quotes
for _\bw_\bo_\br_\bd _\bs_\bp_\bl_\bi_\bt_\bt_\bi_\bn_\bg.
- The shell treats each character of I\bIF\bFS\bS as a delimiter, and splits the
- results of the other expansions into words using these characters as
- field terminators. If I\bIF\bFS\bS is unset, or its value is exactly
- <\b<s\bsp\bpa\bac\bce\be>\b><\b<t\bta\bab\bb>\b><\b<n\bne\bew\bwl\bli\bin\bne\be>\b>, the default, then sequences of <\b<s\bsp\bpa\bac\bce\be>\b>, <\b<t\bta\bab\bb>\b>,
- and <\b<n\bne\bew\bwl\bli\bin\bne\be>\b> at the beginning and end of the results of the previous
- expansions are ignored, and any sequence of I\bIF\bFS\bS characters not at the
- beginning or end serves to delimit words. If I\bIF\bFS\bS has a value other
+ The shell treats each character of I\bIF\bFS\bS as a delimiter, and splits the
+ results of the other expansions into words using these characters as
+ field terminators. If I\bIF\bFS\bS is unset, or its value is exactly
+ <\b<s\bsp\bpa\bac\bce\be>\b><\b<t\bta\bab\bb>\b><\b<n\bne\bew\bwl\bli\bin\bne\be>\b>, the default, then sequences of <\b<s\bsp\bpa\bac\bce\be>\b>, <\b<t\bta\bab\bb>\b>,
+ and <\b<n\bne\bew\bwl\bli\bin\bne\be>\b> at the beginning and end of the results of the previous
+ expansions are ignored, and any sequence of I\bIF\bFS\bS characters not at the
+ beginning or end serves to delimit words. If I\bIF\bFS\bS has a value other
than the default, then sequences of the whitespace characters s\bsp\bpa\bac\bce\be and
- t\bta\bab\bb are ignored at the beginning and end of the word, as long as the
- whitespace character is in the value of I\bIF\bFS\bS (an I\bIF\bFS\bS whitespace charac-
- ter). Any character in I\bIF\bFS\bS that is not I\bIF\bFS\bS whitespace, along with any
- adjacent I\bIF\bFS\bS whitespace characters, delimits a field. A sequence of
+ t\bta\bab\bb are ignored at the beginning and end of the word, as long as the
+ whitespace character is in the value of I\bIF\bFS\bS (an I\bIF\bFS\bS whitespace charac-
+ ter). Any character in I\bIF\bFS\bS that is not I\bIF\bFS\bS whitespace, along with any
+ adjacent I\bIF\bFS\bS whitespace characters, delimits a field. A sequence of
I\bIF\bFS\bS whitespace characters is also treated as a delimiter. If the value
of I\bIF\bFS\bS is null, no word splitting occurs.
- Explicit null arguments ("\b""\b" or '\b''\b') are retained. Unquoted implicit
+ Explicit null arguments ("\b""\b" or '\b''\b') are retained. Unquoted implicit
null arguments, resulting from the expansion of parameters that have no
- values, are removed. If a parameter with no value is expanded within
+ values, are removed. If a parameter with no value is expanded within
double quotes, a null argument results and is retained.
Note that if no expansion occurs, no splitting is performed.
P\bPa\bat\bth\bhn\bna\bam\bme\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
- After word splitting, unless the -\b-f\bf option has been set, b\bba\bas\bsh\bh scans
- each word for the characters *\b*, ?\b?, and [\b[. If one of these characters
- appears, then the word is regarded as a _\bp_\ba_\bt_\bt_\be_\br_\bn, and replaced with an
- alphabetically sorted list of filenames matching the pattern (see P\bPa\bat\bt-\b-
- t\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg below). If no matching filenames are found, and the
- shell option n\bnu\bul\bll\blg\bgl\blo\bob\bb is not enabled, the word is left unchanged. If
- the n\bnu\bul\bll\blg\bgl\blo\bob\bb option is set, and no matches are found, the word is
- removed. If the f\bfa\bai\bil\blg\bgl\blo\bob\bb shell option is set, and no matches are
+ After word splitting, unless the -\b-f\bf option has been set, b\bba\bas\bsh\bh scans
+ each word for the characters *\b*, ?\b?, and [\b[. If one of these characters
+ appears, then the word is regarded as a _\bp_\ba_\bt_\bt_\be_\br_\bn, and replaced with an
+ alphabetically sorted list of filenames matching the pattern (see P\bPa\bat\bt-\b-
+ t\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg below). If no matching filenames are found, and the
+ shell option n\bnu\bul\bll\blg\bgl\blo\bob\bb is not enabled, the word is left unchanged. If
+ the n\bnu\bul\bll\blg\bgl\blo\bob\bb option is set, and no matches are found, the word is
+ removed. If the f\bfa\bai\bil\blg\bgl\blo\bob\bb shell option is set, and no matches are
found, an error message is printed and the command is not executed. If
- the shell option n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb is enabled, the match is performed without
- regard to the case of alphabetic characters. When a pattern is used
- for pathname expansion, the character `\b``\b`.\b.'\b''\b' at the start of a name or
- immediately following a slash must be matched explicitly, unless the
+ the shell option n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb is enabled, the match is performed without
+ regard to the case of alphabetic characters. When a pattern is used
+ for pathname expansion, the character `\b``\b`.\b.'\b''\b' at the start of a name or
+ immediately following a slash must be matched explicitly, unless the
shell option d\bdo\bot\btg\bgl\blo\bob\bb is set. When matching a pathname, the slash char-
- acter must always be matched explicitly. In other cases, the `\b``\b`.\b.'\b''\b'
+ acter must always be matched explicitly. In other cases, the `\b``\b`.\b.'\b''\b'
character is not treated specially. See the description of s\bsh\bho\bop\bpt\bt below
under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS for a description of the n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb, n\bnu\bul\bll\bl-\b-
g\bgl\blo\bob\bb, f\bfa\bai\bil\blg\bgl\blo\bob\bb, and d\bdo\bot\btg\bgl\blo\bob\bb shell options.
- The G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE shell variable may be used to restrict the set of file-
+ The G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE shell variable may be used to restrict the set of file-
names matching a _\bp_\ba_\bt_\bt_\be_\br_\bn. If G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is set, each matching filename
that also matches one of the patterns in G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is removed from the
- list of matches. The filenames `\b``\b`.\b.'\b''\b' and `\b``\b`.\b..\b.'\b''\b' are always ignored
- when G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is set and not null. However, setting G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE to a
- non-null value has the effect of enabling the d\bdo\bot\btg\bgl\blo\bob\bb shell option, so
+ list of matches. The filenames `\b``\b`.\b.'\b''\b' and `\b``\b`.\b..\b.'\b''\b' are always ignored
+ when G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is set and not null. However, setting G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE to a
+ non-null value has the effect of enabling the d\bdo\bot\btg\bgl\blo\bob\bb shell option, so
all other filenames beginning with a `\b``\b`.\b.'\b''\b' will match. To get the old
behavior of ignoring filenames beginning with a `\b``\b`.\b.'\b''\b', make `\b``\b`.\b.*\b*'\b''\b' one
- of the patterns in G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE. The d\bdo\bot\btg\bgl\blo\bob\bb option is disabled when
+ of the patterns in G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE. The d\bdo\bot\btg\bgl\blo\bob\bb option is disabled when
G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is unset.
P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg
Any character that appears in a pattern, other than the special pattern
- characters described below, matches itself. The NUL character may not
- occur in a pattern. A backslash escapes the following character; the
- escaping backslash is discarded when matching. The special pattern
+ characters described below, matches itself. The NUL character may not
+ occur in a pattern. A backslash escapes the following character; the
+ escaping backslash is discarded when matching. The special pattern
characters must be quoted if they are to be matched literally.
The special pattern characters have the following meanings:
- *\b* Matches any string, including the null string. When the
- g\bgl\blo\bob\bbs\bst\bta\bar\br shell option is enabled, and *\b* is used in a
- pathname expansion context, two adjacent *\b*s used as a
- single pattern will match all files and zero or more
- directories and subdirectories. If followed by a /\b/, two
- adjacent *\b*s will match only directories and subdirecto-
+ *\b* Matches any string, including the null string. When the
+ g\bgl\blo\bob\bbs\bst\bta\bar\br shell option is enabled, and *\b* is used in a
+ pathname expansion context, two adjacent *\b*s used as a
+ single pattern will match all files and zero or more
+ directories and subdirectories. If followed by a /\b/, two
+ adjacent *\b*s will match only directories and subdirecto-
ries.
?\b? Matches any single character.
- [\b[.\b..\b..\b.]\b] Matches any one of the enclosed characters. A pair of
- characters separated by a hyphen denotes a _\br_\ba_\bn_\bg_\be _\be_\bx_\bp_\br_\be_\bs_\b-
- _\bs_\bi_\bo_\bn; any character that falls between those two charac-
- ters, inclusive, using the current locale's collating
- sequence and character set, is matched. If the first
+ [\b[.\b..\b..\b.]\b] Matches any one of the enclosed characters. A pair of
+ characters separated by a hyphen denotes a _\br_\ba_\bn_\bg_\be _\be_\bx_\bp_\br_\be_\bs_\b-
+ _\bs_\bi_\bo_\bn; any character that falls between those two charac-
+ ters, inclusive, using the current locale's collating
+ sequence and character set, is matched. If the first
character following the [\b[ is a !\b! or a ^\b^ then any charac-
- ter not enclosed is matched. The sorting order of char-
- acters in range expressions is determined by the current
- locale and the values of the L\bLC\bC_\b_C\bCO\bOL\bLL\bLA\bAT\bTE\bE or L\bLC\bC_\b_A\bAL\bLL\bL shell
+ ter not enclosed is matched. The sorting order of char-
+ acters in range expressions is determined by the current
+ locale and the values of the L\bLC\bC_\b_C\bCO\bOL\bLL\bLA\bAT\bTE\bE or L\bLC\bC_\b_A\bAL\bLL\bL shell
variables, if set. To obtain the traditional interpreta-
- tion of range expressions, where [\b[a\ba-\b-d\bd]\b] is equivalent to
- [\b[a\bab\bbc\bcd\bd]\b], set value of the L\bLC\bC_\b_A\bAL\bLL\bL shell variable to C\bC, or
- enable the g\bgl\blo\bob\bba\bas\bsc\bci\bii\bir\bra\ban\bng\bge\bes\bs shell option. A -\b- may be
+ tion of range expressions, where [\b[a\ba-\b-d\bd]\b] is equivalent to
+ [\b[a\bab\bbc\bcd\bd]\b], set value of the L\bLC\bC_\b_A\bAL\bLL\bL shell variable to C\bC, or
+ enable the g\bgl\blo\bob\bba\bas\bsc\bci\bii\bir\bra\ban\bng\bge\bes\bs shell option. A -\b- may be
matched by including it as the first or last character in
the set. A ]\b] may be matched by including it as the first
character in the set.
- Within [\b[ and ]\b], _\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br _\bc_\bl_\ba_\bs_\bs_\be_\bs can be specified using
+ Within [\b[ and ]\b], _\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br _\bc_\bl_\ba_\bs_\bs_\be_\bs can be specified using
the syntax [\b[:\b:_\bc_\bl_\ba_\bs_\bs:\b:]\b], where _\bc_\bl_\ba_\bs_\bs is one of the following
classes defined in the POSIX standard:
- a\bal\bln\bnu\bum\bm a\bal\blp\bph\bha\ba a\bas\bsc\bci\bii\bi b\bbl\bla\ban\bnk\bk c\bcn\bnt\btr\brl\bl d\bdi\big\bgi\bit\bt g\bgr\bra\bap\bph\bh l\blo\bow\bwe\ber\br p\bpr\bri\bin\bnt\bt
+ a\bal\bln\bnu\bum\bm a\bal\blp\bph\bha\ba a\bas\bsc\bci\bii\bi b\bbl\bla\ban\bnk\bk c\bcn\bnt\btr\brl\bl d\bdi\big\bgi\bit\bt g\bgr\bra\bap\bph\bh l\blo\bow\bwe\ber\br p\bpr\bri\bin\bnt\bt
p\bpu\bun\bnc\bct\bt s\bsp\bpa\bac\bce\be u\bup\bpp\bpe\ber\br w\bwo\bor\brd\bd x\bxd\bdi\big\bgi\bit\bt
A character class matches any character belonging to that
class. The w\bwo\bor\brd\bd character class matches letters, digits,
and the character _.
- Within [\b[ and ]\b], an _\be_\bq_\bu_\bi_\bv_\ba_\bl_\be_\bn_\bc_\be _\bc_\bl_\ba_\bs_\bs can be specified
+ Within [\b[ and ]\b], an _\be_\bq_\bu_\bi_\bv_\ba_\bl_\be_\bn_\bc_\be _\bc_\bl_\ba_\bs_\bs can be specified
using the syntax [\b[=\b=_\bc=\b=]\b], which matches all characters with
- the same collation weight (as defined by the current
+ the same collation weight (as defined by the current
locale) as the character _\bc.
Within [\b[ and ]\b], the syntax [\b[.\b._\bs_\by_\bm_\bb_\bo_\bl.\b.]\b] matches the collat-
ing symbol _\bs_\by_\bm_\bb_\bo_\bl.
If the e\bex\bxt\btg\bgl\blo\bob\bb shell option is enabled using the s\bsh\bho\bop\bpt\bt builtin, several
- extended pattern matching operators are recognized. In the following
+ extended pattern matching operators are recognized. In the following
description, a _\bp_\ba_\bt_\bt_\be_\br_\bn_\b-_\bl_\bi_\bs_\bt is a list of one or more patterns separated
by a |\b|. Composite patterns may be formed using one or more of the fol-
lowing sub-patterns:
Q\bQu\buo\bot\bte\be R\bRe\bem\bmo\bov\bva\bal\bl
After the preceding expansions, all unquoted occurrences of the charac-
- ters \\b\, '\b', and "\b" that did not result from one of the above expansions
+ ters \\b\, '\b', and "\b" that did not result from one of the above expansions
are removed.
R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN
- Before a command is executed, its input and output may be _\br_\be_\bd_\bi_\br_\be_\bc_\bt_\be_\bd
- using a special notation interpreted by the shell. Redirection allows
- commands' file handles to be duplicated, opened, closed, made to refer
+ Before a command is executed, its input and output may be _\br_\be_\bd_\bi_\br_\be_\bc_\bt_\be_\bd
+ using a special notation interpreted by the shell. Redirection allows
+ commands' file handles to be duplicated, opened, closed, made to refer
to different files, and can change the files the command reads from and
- writes to. Redirection may also be used to modify file handles in the
- current shell execution environment. The following redirection opera-
+ writes to. Redirection may also be used to modify file handles in the
+ current shell execution environment. The following redirection opera-
tors may precede or appear anywhere within a _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd or may fol-
- low a _\bc_\bo_\bm_\bm_\ba_\bn_\bd. Redirections are processed in the order they appear,
+ low a _\bc_\bo_\bm_\bm_\ba_\bn_\bd. Redirections are processed in the order they appear,
from left to right.
- Each redirection that may be preceded by a file descriptor number may
+ Each redirection that may be preceded by a file descriptor number may
instead be preceded by a word of the form {_\bv_\ba_\br_\bn_\ba_\bm_\be}. In this case, for
each redirection operator except >&- and <&-, the shell will allocate a
- file descriptor greater than or equal to 10 and assign it to _\bv_\ba_\br_\bn_\ba_\bm_\be.
- If >&- or <&- is preceded by {_\bv_\ba_\br_\bn_\ba_\bm_\be}, the value of _\bv_\ba_\br_\bn_\ba_\bm_\be defines
+ file descriptor greater than or equal to 10 and assign it to _\bv_\ba_\br_\bn_\ba_\bm_\be.
+ If >&- or <&- is preceded by {_\bv_\ba_\br_\bn_\ba_\bm_\be}, the value of _\bv_\ba_\br_\bn_\ba_\bm_\be defines
the file descriptor to close.
- In the following descriptions, if the file descriptor number is omit-
- ted, and the first character of the redirection operator is <\b<, the re-
- direction refers to the standard input (file descriptor 0). If the
- first character of the redirection operator is >\b>, the redirection
+ In the following descriptions, if the file descriptor number is omit-
+ ted, and the first character of the redirection operator is <\b<, the re-
+ direction refers to the standard input (file descriptor 0). If the
+ first character of the redirection operator is >\b>, the redirection
refers to the standard output (file descriptor 1).
- The word following the redirection operator in the following descrip-
- tions, unless otherwise noted, is subjected to brace expansion, tilde
- expansion, parameter and variable expansion, command substitution,
- arithmetic expansion, quote removal, pathname expansion, and word
+ The word following the redirection operator in the following descrip-
+ tions, unless otherwise noted, is subjected to brace expansion, tilde
+ expansion, parameter and variable expansion, command substitution,
+ arithmetic expansion, quote removal, pathname expansion, and word
splitting. If it expands to more than one word, b\bba\bas\bsh\bh reports an error.
- Note that the order of redirections is significant. For example, the
+ Note that the order of redirections is significant. For example, the
command
ls >\b> dirlist 2>\b>&\b&1
- directs both standard output and standard error to the file _\bd_\bi_\br_\bl_\bi_\bs_\bt,
+ directs both standard output and standard error to the file _\bd_\bi_\br_\bl_\bi_\bs_\bt,
while the command
ls 2>\b>&\b&1 >\b> dirlist
- directs only the standard output to file _\bd_\bi_\br_\bl_\bi_\bs_\bt, because the standard
- error was duplicated from the standard output before the standard out-
+ directs only the standard output to file _\bd_\bi_\br_\bl_\bi_\bs_\bt, because the standard
+ error was duplicated from the standard output before the standard out-
put was redirected to _\bd_\bi_\br_\bl_\bi_\bs_\bt.
B\bBa\bas\bsh\bh handles several filenames specially when they are used in redirec-
tions, as described in the following table:
/\b/d\bde\bev\bv/\b/f\bfd\bd/\b/_\bf_\bd
- If _\bf_\bd is a valid integer, file descriptor _\bf_\bd is dupli-
+ If _\bf_\bd is a valid integer, file descriptor _\bf_\bd is dupli-
cated.
/\b/d\bde\bev\bv/\b/s\bst\btd\bdi\bin\bn
File descriptor 0 is duplicated.
File descriptor 2 is duplicated.
/\b/d\bde\bev\bv/\b/t\btc\bcp\bp/\b/_\bh_\bo_\bs_\bt/\b/_\bp_\bo_\br_\bt
If _\bh_\bo_\bs_\bt is a valid hostname or Internet address, and _\bp_\bo_\br_\bt
- is an integer port number or service name, b\bba\bas\bsh\bh attempts
+ is an integer port number or service name, b\bba\bas\bsh\bh attempts
to open the corresponding TCP socket.
/\b/d\bde\bev\bv/\b/u\bud\bdp\bp/\b/_\bh_\bo_\bs_\bt/\b/_\bp_\bo_\br_\bt
If _\bh_\bo_\bs_\bt is a valid hostname or Internet address, and _\bp_\bo_\br_\bt
- is an integer port number or service name, b\bba\bas\bsh\bh attempts
+ is an integer port number or service name, b\bba\bas\bsh\bh attempts
to open the corresponding UDP socket.
A failure to open or create a file causes the redirection to fail.
- Redirections using file descriptors greater than 9 should be used with
- care, as they may conflict with file descriptors the shell uses inter-
+ Redirections using file descriptors greater than 9 should be used with
+ care, as they may conflict with file descriptors the shell uses inter-
nally.
R\bRe\bed\bdi\bir\bre\bec\bct\bti\bin\bng\bg I\bIn\bnp\bpu\but\bt
Redirection of input causes the file whose name results from the expan-
- sion of _\bw_\bo_\br_\bd to be opened for reading on file descriptor _\bn, or the
+ sion of _\bw_\bo_\br_\bd to be opened for reading on file descriptor _\bn, or the
standard input (file descriptor 0) if _\bn is not specified.
The general format for redirecting input is:
[_\bn]<\b<_\bw_\bo_\br_\bd
R\bRe\bed\bdi\bir\bre\bec\bct\bti\bin\bng\bg O\bOu\but\btp\bpu\but\bt
- Redirection of output causes the file whose name results from the
+ Redirection of output causes the file whose name results from the
expansion of _\bw_\bo_\br_\bd to be opened for writing on file descriptor _\bn, or the
standard output (file descriptor 1) if _\bn is not specified. If the file
- does not exist it is created; if it does exist it is truncated to zero
+ does not exist it is created; if it does exist it is truncated to zero
size.
The general format for redirecting output is:
[_\bn]>\b>_\bw_\bo_\br_\bd
- If the redirection operator is >\b>, and the n\bno\boc\bcl\blo\bob\bbb\bbe\ber\br option to the s\bse\bet\bt
- builtin has been enabled, the redirection will fail if the file whose
- name results from the expansion of _\bw_\bo_\br_\bd exists and is a regular file.
+ If the redirection operator is >\b>, and the n\bno\boc\bcl\blo\bob\bbb\bbe\ber\br option to the s\bse\bet\bt
+ builtin has been enabled, the redirection will fail if the file whose
+ name results from the expansion of _\bw_\bo_\br_\bd exists and is a regular file.
If the redirection operator is >\b>|\b|, or the redirection operator is >\b> and
the n\bno\boc\bcl\blo\bob\bbb\bbe\ber\br option to the s\bse\bet\bt builtin command is not enabled, the re-
direction is attempted even if the file named by _\bw_\bo_\br_\bd exists.
A\bAp\bpp\bpe\ben\bnd\bdi\bin\bng\bg R\bRe\bed\bdi\bir\bre\bec\bct\bte\bed\bd O\bOu\but\btp\bpu\but\bt
- Redirection of output in this fashion causes the file whose name
- results from the expansion of _\bw_\bo_\br_\bd to be opened for appending on file
- descriptor _\bn, or the standard output (file descriptor 1) if _\bn is not
+ Redirection of output in this fashion causes the file whose name
+ results from the expansion of _\bw_\bo_\br_\bd to be opened for appending on file
+ descriptor _\bn, or the standard output (file descriptor 1) if _\bn is not
specified. If the file does not exist it is created.
The general format for appending output is:
R\bRe\bed\bdi\bir\bre\bec\bct\bti\bin\bng\bg S\bSt\bta\ban\bnd\bda\bar\brd\bd O\bOu\but\btp\bpu\but\bt a\ban\bnd\bd S\bSt\bta\ban\bnd\bda\bar\brd\bd E\bEr\brr\bro\bor\br
- This construct allows both the standard output (file descriptor 1) and
- the standard error output (file descriptor 2) to be redirected to the
+ This construct allows both the standard output (file descriptor 1) and
+ the standard error output (file descriptor 2) to be redirected to the
file whose name is the expansion of _\bw_\bo_\br_\bd.
- There are two formats for redirecting standard output and standard
+ There are two formats for redirecting standard output and standard
error:
&\b&>\b>_\bw_\bo_\br_\bd
>\b>_\bw_\bo_\br_\bd 2>\b>&\b&1
- When using the second form, _\bw_\bo_\br_\bd may not expand to a number or -\b-. If
- it does, other redirection operators apply (see D\bDu\bup\bpl\bli\bic\bca\bat\bti\bin\bng\bg F\bFi\bil\ble\be
+ When using the second form, _\bw_\bo_\br_\bd may not expand to a number or -\b-. If
+ it does, other redirection operators apply (see D\bDu\bup\bpl\bli\bic\bca\bat\bti\bin\bng\bg F\bFi\bil\ble\be
D\bDe\bes\bsc\bcr\bri\bip\bpt\bto\bor\brs\bs below) for compatibility reasons.
A\bAp\bpp\bpe\ben\bnd\bdi\bin\bng\bg S\bSt\bta\ban\bnd\bda\bar\brd\bd O\bOu\but\btp\bpu\but\bt a\ban\bnd\bd S\bSt\bta\ban\bnd\bda\bar\brd\bd E\bEr\brr\bro\bor\br
- This construct allows both the standard output (file descriptor 1) and
- the standard error output (file descriptor 2) to be appended to the
+ This construct allows both the standard output (file descriptor 1) and
+ the standard error output (file descriptor 2) to be appended to the
file whose name is the expansion of _\bw_\bo_\br_\bd.
The format for appending standard output and standard error is:
(see D\bDu\bup\bpl\bli\bic\bca\bat\bti\bin\bng\bg F\bFi\bil\ble\be D\bDe\bes\bsc\bcr\bri\bip\bpt\bto\bor\brs\bs below).
H\bHe\ber\bre\be D\bDo\boc\bcu\bum\bme\ben\bnt\bts\bs
- This type of redirection instructs the shell to read input from the
+ This type of redirection instructs the shell to read input from the
current source until a line containing only _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br (with no trailing
- blanks) is seen. All of the lines read up to that point are then used
+ blanks) is seen. All of the lines read up to that point are then used
as the standard input for a command.
The format of here-documents is:
_\bh_\be_\br_\be_\b-_\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt
_\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br
- No parameter and variable expansion, command substitution, arithmetic
- expansion, or pathname expansion is performed on _\bw_\bo_\br_\bd. If any charac-
- ters in _\bw_\bo_\br_\bd are quoted, the _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br is the result of quote removal
- on _\bw_\bo_\br_\bd, and the lines in the here-document are not expanded. If _\bw_\bo_\br_\bd
- is unquoted, all lines of the here-document are subjected to parameter
- expansion, command substitution, and arithmetic expansion, the charac-
- ter sequence \\b\<\b<n\bne\bew\bwl\bli\bin\bne\be>\b> is ignored, and \\b\ must be used to quote the
+ No parameter and variable expansion, command substitution, arithmetic
+ expansion, or pathname expansion is performed on _\bw_\bo_\br_\bd. If any charac-
+ ters in _\bw_\bo_\br_\bd are quoted, the _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br is the result of quote removal
+ on _\bw_\bo_\br_\bd, and the lines in the here-document are not expanded. If _\bw_\bo_\br_\bd
+ is unquoted, all lines of the here-document are subjected to parameter
+ expansion, command substitution, and arithmetic expansion, the charac-
+ ter sequence \\b\<\b<n\bne\bew\bwl\bli\bin\bne\be>\b> is ignored, and \\b\ must be used to quote the
characters \\b\, $\b$, and `\b`.
If the redirection operator is <\b<<\b<-\b-, then all leading tab characters are
- stripped from input lines and the line containing _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br. This
- allows here-documents within shell scripts to be indented in a natural
+ stripped from input lines and the line containing _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br. This
+ allows here-documents within shell scripts to be indented in a natural
fashion.
H\bHe\ber\bre\be S\bSt\btr\bri\bin\bng\bgs\bs
<\b<<\b<<\b<_\bw_\bo_\br_\bd
- The _\bw_\bo_\br_\bd undergoes brace expansion, tilde expansion, parameter and
- variable expansion, command substitution, arithmetic expansion, and
- quote removal. Pathname expansion and word splitting are not per-
- formed. The result is supplied as a single string to the command on
+ The _\bw_\bo_\br_\bd undergoes brace expansion, tilde expansion, parameter and
+ variable expansion, command substitution, arithmetic expansion, and
+ quote removal. Pathname expansion and word splitting are not per-
+ formed. The result is supplied as a single string to the command on
its standard input.
D\bDu\bup\bpl\bli\bic\bca\bat\bti\bin\bng\bg F\bFi\bil\ble\be D\bDe\bes\bsc\bcr\bri\bip\bpt\bto\bor\brs\bs
[_\bn]<\b<&\b&_\bw_\bo_\br_\bd
is used to duplicate input file descriptors. If _\bw_\bo_\br_\bd expands to one or
- more digits, the file descriptor denoted by _\bn is made to be a copy of
- that file descriptor. If the digits in _\bw_\bo_\br_\bd do not specify a file
- descriptor open for input, a redirection error occurs. If _\bw_\bo_\br_\bd evalu-
- ates to -\b-, file descriptor _\bn is closed. If _\bn is not specified, the
+ more digits, the file descriptor denoted by _\bn is made to be a copy of
+ that file descriptor. If the digits in _\bw_\bo_\br_\bd do not specify a file
+ descriptor open for input, a redirection error occurs. If _\bw_\bo_\br_\bd evalu-
+ ates to -\b-, file descriptor _\bn is closed. If _\bn is not specified, the
standard input (file descriptor 0) is used.
The operator
[_\bn]>\b>&\b&_\bw_\bo_\br_\bd
- is used similarly to duplicate output file descriptors. If _\bn is not
- specified, the standard output (file descriptor 1) is used. If the
- digits in _\bw_\bo_\br_\bd do not specify a file descriptor open for output, a re-
- direction error occurs. If _\bw_\bo_\br_\bd evaluates to -\b-, file descriptor _\bn is
- closed. As a special case, if _\bn is omitted, and _\bw_\bo_\br_\bd does not expand
- to one or more digits or -\b-, the standard output and standard error are
+ is used similarly to duplicate output file descriptors. If _\bn is not
+ specified, the standard output (file descriptor 1) is used. If the
+ digits in _\bw_\bo_\br_\bd do not specify a file descriptor open for output, a re-
+ direction error occurs. If _\bw_\bo_\br_\bd evaluates to -\b-, file descriptor _\bn is
+ closed. As a special case, if _\bn is omitted, and _\bw_\bo_\br_\bd does not expand
+ to one or more digits or -\b-, the standard output and standard error are
redirected as described previously.
M\bMo\bov\bvi\bin\bng\bg F\bFi\bil\ble\be D\bDe\bes\bsc\bcr\bri\bip\bpt\bto\bor\brs\bs
[_\bn]<\b<&\b&_\bd_\bi_\bg_\bi_\bt-\b-
- moves the file descriptor _\bd_\bi_\bg_\bi_\bt to file descriptor _\bn, or the standard
+ moves the file descriptor _\bd_\bi_\bg_\bi_\bt to file descriptor _\bn, or the standard
input (file descriptor 0) if _\bn is not specified. _\bd_\bi_\bg_\bi_\bt is closed after
being duplicated to _\bn.
[_\bn]>\b>&\b&_\bd_\bi_\bg_\bi_\bt-\b-
- moves the file descriptor _\bd_\bi_\bg_\bi_\bt to file descriptor _\bn, or the standard
+ moves the file descriptor _\bd_\bi_\bg_\bi_\bt to file descriptor _\bn, or the standard
output (file descriptor 1) if _\bn is not specified.
O\bOp\bpe\ben\bni\bin\bng\bg F\bFi\bil\ble\be D\bDe\bes\bsc\bcr\bri\bip\bpt\bto\bor\brs\bs f\bfo\bor\br R\bRe\bea\bad\bdi\bin\bng\bg a\ban\bnd\bd W\bWr\bri\bit\bti\bin\bng\bg
[_\bn]<\b<>\b>_\bw_\bo_\br_\bd
- causes the file whose name is the expansion of _\bw_\bo_\br_\bd to be opened for
- both reading and writing on file descriptor _\bn, or on file descriptor 0
+ causes the file whose name is the expansion of _\bw_\bo_\br_\bd to be opened for
+ both reading and writing on file descriptor _\bn, or on file descriptor 0
if _\bn is not specified. If the file does not exist, it is created.
A\bAL\bLI\bIA\bAS\bSE\bES\bS
- _\bA_\bl_\bi_\ba_\bs_\be_\bs allow a string to be substituted for a word when it is used as
- the first word of a simple command. The shell maintains a list of
- aliases that may be set and unset with the a\bal\bli\bia\bas\bs and u\bun\bna\bal\bli\bia\bas\bs builtin
- commands (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). The first word of each
- simple command, if unquoted, is checked to see if it has an alias. If
- so, that word is replaced by the text of the alias. The characters /\b/,
- $\b$, `\b`, and =\b= and any of the shell _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br_\bs or quoting characters
+ _\bA_\bl_\bi_\ba_\bs_\be_\bs allow a string to be substituted for a word when it is used as
+ the first word of a simple command. The shell maintains a list of
+ aliases that may be set and unset with the a\bal\bli\bia\bas\bs and u\bun\bna\bal\bli\bia\bas\bs builtin
+ commands (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). The first word of each
+ simple command, if unquoted, is checked to see if it has an alias. If
+ so, that word is replaced by the text of the alias. The characters /\b/,
+ $\b$, `\b`, and =\b= and any of the shell _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br_\bs or quoting characters
listed above may not appear in an alias name. The replacement text may
- contain any valid shell input, including shell metacharacters. The
- first word of the replacement text is tested for aliases, but a word
- that is identical to an alias being expanded is not expanded a second
- time. This means that one may alias l\bls\bs to l\bls\bs -\b-F\bF, for instance, and
- b\bba\bas\bsh\bh does not try to recursively expand the replacement text. If the
- last character of the alias value is a _\bb_\bl_\ba_\bn_\bk, then the next command
+ contain any valid shell input, including shell metacharacters. The
+ first word of the replacement text is tested for aliases, but a word
+ that is identical to an alias being expanded is not expanded a second
+ time. This means that one may alias l\bls\bs to l\bls\bs -\b-F\bF, for instance, and
+ b\bba\bas\bsh\bh does not try to recursively expand the replacement text. If the
+ last character of the alias value is a _\bb_\bl_\ba_\bn_\bk, then the next command
word following the alias is also checked for alias expansion.
Aliases are created and listed with the a\bal\bli\bia\bas\bs command, and removed with
the u\bun\bna\bal\bli\bia\bas\bs command.
- There is no mechanism for using arguments in the replacement text. If
- arguments are needed, a shell function should be used (see F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS
+ There is no mechanism for using arguments in the replacement text. If
+ arguments are needed, a shell function should be used (see F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS
below).
- Aliases are not expanded when the shell is not interactive, unless the
- e\bex\bxp\bpa\ban\bnd\bd_\b_a\bal\bli\bia\bas\bse\bes\bs shell option is set using s\bsh\bho\bop\bpt\bt (see the description of
+ Aliases are not expanded when the shell is not interactive, unless the
+ e\bex\bxp\bpa\ban\bnd\bd_\b_a\bal\bli\bia\bas\bse\bes\bs shell option is set using s\bsh\bho\bop\bpt\bt (see the description of
s\bsh\bho\bop\bpt\bt under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
- The rules concerning the definition and use of aliases are somewhat
- confusing. B\bBa\bas\bsh\bh always reads at least one complete line of input
- before executing any of the commands on that line. Aliases are
- expanded when a command is read, not when it is executed. Therefore,
- an alias definition appearing on the same line as another command does
- not take effect until the next line of input is read. The commands
+ The rules concerning the definition and use of aliases are somewhat
+ confusing. B\bBa\bas\bsh\bh always reads at least one complete line of input
+ before executing any of the commands on that line. Aliases are
+ expanded when a command is read, not when it is executed. Therefore,
+ an alias definition appearing on the same line as another command does
+ not take effect until the next line of input is read. The commands
following the alias definition on that line are not affected by the new
- alias. This behavior is also an issue when functions are executed.
- Aliases are expanded when a function definition is read, not when the
- function is executed, because a function definition is itself a com-
+ alias. This behavior is also an issue when functions are executed.
+ Aliases are expanded when a function definition is read, not when the
+ function is executed, because a function definition is itself a com-
pound command. As a consequence, aliases defined in a function are not
- available until after that function is executed. To be safe, always
- put alias definitions on a separate line, and do not use a\bal\bli\bia\bas\bs in com-
+ available until after that function is executed. To be safe, always
+ put alias definitions on a separate line, and do not use a\bal\bli\bia\bas\bs in com-
pound commands.
For almost every purpose, aliases are superseded by shell functions.
F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS
- A shell function, defined as described above under S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR,
- stores a series of commands for later execution. When the name of a
- shell function is used as a simple command name, the list of commands
+ A shell function, defined as described above under S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR,
+ stores a series of commands for later execution. When the name of a
+ shell function is used as a simple command name, the list of commands
associated with that function name is executed. Functions are executed
- in the context of the current shell; no new process is created to
- interpret them (contrast this with the execution of a shell script).
- When a function is executed, the arguments to the function become the
+ in the context of the current shell; no new process is created to
+ interpret them (contrast this with the execution of a shell script).
+ When a function is executed, the arguments to the function become the
positional parameters during its execution. The special parameter #\b# is
- updated to reflect the change. Special parameter 0\b0 is unchanged. The
- first element of the F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE variable is set to the name of the func-
+ updated to reflect the change. Special parameter 0\b0 is unchanged. The
+ first element of the F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE variable is set to the name of the func-
tion while the function is executing.
- All other aspects of the shell execution environment are identical
+ All other aspects of the shell execution environment are identical
between a function and its caller with these exceptions: the D\bDE\bEB\bBU\bUG\bG and
- R\bRE\bET\bTU\bUR\bRN\bN traps (see the description of the t\btr\bra\bap\bp builtin under S\bSH\bHE\bEL\bLL\bL
- B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) are not inherited unless the function has been
- given the t\btr\bra\bac\bce\be attribute (see the description of the d\bde\bec\bcl\bla\bar\bre\be builtin
- below) or the -\b-o\bo f\bfu\bun\bnc\bct\btr\bra\bac\bce\be shell option has been enabled with the s\bse\bet\bt
- builtin (in which case all functions inherit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN
- traps), and the E\bER\bRR\bR trap is not inherited unless the -\b-o\bo e\ber\brr\brt\btr\bra\bac\bce\be shell
+ R\bRE\bET\bTU\bUR\bRN\bN traps (see the description of the t\btr\bra\bap\bp builtin under S\bSH\bHE\bEL\bLL\bL
+ B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) are not inherited unless the function has been
+ given the t\btr\bra\bac\bce\be attribute (see the description of the d\bde\bec\bcl\bla\bar\bre\be builtin
+ below) or the -\b-o\bo f\bfu\bun\bnc\bct\btr\bra\bac\bce\be shell option has been enabled with the s\bse\bet\bt
+ builtin (in which case all functions inherit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN
+ traps), and the E\bER\bRR\bR trap is not inherited unless the -\b-o\bo e\ber\brr\brt\btr\bra\bac\bce\be shell
option has been enabled.
- Variables local to the function may be declared with the l\blo\boc\bca\bal\bl builtin
+ Variables local to the function may be declared with the l\blo\boc\bca\bal\bl builtin
command. Ordinarily, variables and their values are shared between the
function and its caller.
- The F\bFU\bUN\bNC\bCN\bNE\bES\bST\bT variable, if set to a numeric value greater than 0,
- defines a maximum function nesting level. Function invocations that
+ The F\bFU\bUN\bNC\bCN\bNE\bES\bST\bT variable, if set to a numeric value greater than 0,
+ defines a maximum function nesting level. Function invocations that
exceed the limit cause the entire command to abort.
- If the builtin command r\bre\bet\btu\bur\brn\bn is executed in a function, the function
- completes and execution resumes with the next command after the func-
- tion call. Any command associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed
+ If the builtin command r\bre\bet\btu\bur\brn\bn is executed in a function, the function
+ completes and execution resumes with the next command after the func-
+ tion call. Any command associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed
before execution resumes. When a function completes, the values of the
- positional parameters and the special parameter #\b# are restored to the
+ positional parameters and the special parameter #\b# are restored to the
values they had prior to the function's execution.
- Function names and definitions may be listed with the -\b-f\bf option to the
+ Function names and definitions may be listed with the -\b-f\bf option to the
d\bde\bec\bcl\bla\bar\bre\be or t\bty\byp\bpe\bes\bse\bet\bt builtin commands. The -\b-F\bF option to d\bde\bec\bcl\bla\bar\bre\be or t\bty\byp\bpe\be-\b-
- s\bse\bet\bt will list the function names only (and optionally the source file
- and line number, if the e\bex\bxt\btd\bde\beb\bbu\bug\bg shell option is enabled). Functions
- may be exported so that subshells automatically have them defined with
- the -\b-f\bf option to the e\bex\bxp\bpo\bor\brt\bt builtin. A function definition may be
- deleted using the -\b-f\bf option to the u\bun\bns\bse\bet\bt builtin. Note that shell
+ s\bse\bet\bt will list the function names only (and optionally the source file
+ and line number, if the e\bex\bxt\btd\bde\beb\bbu\bug\bg shell option is enabled). Functions
+ may be exported so that subshells automatically have them defined with
+ the -\b-f\bf option to the e\bex\bxp\bpo\bor\brt\bt builtin. A function definition may be
+ deleted using the -\b-f\bf option to the u\bun\bns\bse\bet\bt builtin. Note that shell
functions and variables with the same name may result in multiple iden-
- tically-named entries in the environment passed to the shell's chil-
+ tically-named entries in the environment passed to the shell's chil-
dren. Care should be taken in cases where this may cause a problem.
Functions may be recursive. The F\bFU\bUN\bNC\bCN\bNE\bES\bST\bT variable may be used to limit
- the depth of the function call stack and restrict the number of func-
- tion invocations. By default, no limit is imposed on the number of
+ the depth of the function call stack and restrict the number of func-
+ tion invocations. By default, no limit is imposed on the number of
recursive calls.
A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN
- The shell allows arithmetic expressions to be evaluated, under certain
- circumstances (see the l\ble\bet\bt and d\bde\bec\bcl\bla\bar\bre\be builtin commands and A\bAr\bri\bit\bth\bhm\bme\bet\bti\bic\bc
- E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn). Evaluation is done in fixed-width integers with no check
- for overflow, though division by 0 is trapped and flagged as an error.
- The operators and their precedence, associativity, and values are the
- same as in the C language. The following list of operators is grouped
- into levels of equal-precedence operators. The levels are listed in
+ The shell allows arithmetic expressions to be evaluated, under certain
+ circumstances (see the l\ble\bet\bt and d\bde\bec\bcl\bla\bar\bre\be builtin commands and A\bAr\bri\bit\bth\bhm\bme\bet\bti\bic\bc
+ E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn). Evaluation is done in fixed-width integers with no check
+ for overflow, though division by 0 is trapped and flagged as an error.
+ The operators and their precedence, associativity, and values are the
+ same as in the C language. The following list of operators is grouped
+ into levels of equal-precedence operators. The levels are listed in
order of decreasing precedence.
_\bi_\bd+\b++\b+ _\bi_\bd-\b--\b-
_\be_\bx_\bp_\br_\b1 ,\b, _\be_\bx_\bp_\br_\b2
comma
- Shell variables are allowed as operands; parameter expansion is per-
+ Shell variables are allowed as operands; parameter expansion is per-
formed before the expression is evaluated. Within an expression, shell
- variables may also be referenced by name without using the parameter
- expansion syntax. A shell variable that is null or unset evaluates to
+ variables may also be referenced by name without using the parameter
+ expansion syntax. A shell variable that is null or unset evaluates to
0 when referenced by name without using the parameter expansion syntax.
- The value of a variable is evaluated as an arithmetic expression when
- it is referenced, or when a variable which has been given the _\bi_\bn_\bt_\be_\bg_\be_\br
+ The value of a variable is evaluated as an arithmetic expression when
+ it is referenced, or when a variable which has been given the _\bi_\bn_\bt_\be_\bg_\be_\br
attribute using d\bde\bec\bcl\bla\bar\bre\be -\b-i\bi is assigned a value. A null value evaluates
- to 0. A shell variable need not have its _\bi_\bn_\bt_\be_\bg_\be_\br attribute turned on
+ to 0. A shell variable need not have its _\bi_\bn_\bt_\be_\bg_\be_\br attribute turned on
to be used in an expression.
Constants with a leading 0 are interpreted as octal numbers. A leading
- 0x or 0X denotes hexadecimal. Otherwise, numbers take the form
- [_\bb_\ba_\bs_\be_\b#]n, where the optional _\bb_\ba_\bs_\be is a decimal number between 2 and 64
- representing the arithmetic base, and _\bn is a number in that base. If
- _\bb_\ba_\bs_\be_\b# is omitted, then base 10 is used. When specifying _\bn, the digits
+ 0x or 0X denotes hexadecimal. Otherwise, numbers take the form
+ [_\bb_\ba_\bs_\be_\b#]n, where the optional _\bb_\ba_\bs_\be is a decimal number between 2 and 64
+ representing the arithmetic base, and _\bn is a number in that base. If
+ _\bb_\ba_\bs_\be_\b# is omitted, then base 10 is used. When specifying _\bn, the digits
greater< than 9 are represented by the lowercase letters, the uppercase
letters, @, and _, in that order. If _\bb_\ba_\bs_\be is less than or equal to 36,
- lowercase and uppercase letters may be used interchangeably to repre-
+ lowercase and uppercase letters may be used interchangeably to repre-
sent numbers between 10 and 35.
- Operators are evaluated in order of precedence. Sub-expressions in
- parentheses are evaluated first and may override the precedence rules
+ Operators are evaluated in order of precedence. Sub-expressions in
+ parentheses are evaluated first and may override the precedence rules
above.
C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS
- Conditional expressions are used by the [\b[[\b[ compound command and the
- t\bte\bes\bst\bt and [\b[ builtin commands to test file attributes and perform string
- and arithmetic comparisons. Expressions are formed from the following
- unary or binary primaries. If any _\bf_\bi_\bl_\be argument to one of the pri-
+ Conditional expressions are used by the [\b[[\b[ compound command and the
+ t\bte\bes\bst\bt and [\b[ builtin commands to test file attributes and perform string
+ and arithmetic comparisons. Expressions are formed from the following
+ unary or binary primaries. If any _\bf_\bi_\bl_\be argument to one of the pri-
maries is of the form _\b/_\bd_\be_\bv_\b/_\bf_\bd_\b/_\bn, then file descriptor _\bn is checked. If
- the _\bf_\bi_\bl_\be argument to one of the primaries is one of _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\bi_\bn,
- _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\bo_\bu_\bt, or _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\be_\br_\br, file descriptor 0, 1, or 2, respectively,
+ the _\bf_\bi_\bl_\be argument to one of the primaries is one of _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\bi_\bn,
+ _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\bo_\bu_\bt, or _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\be_\br_\br, file descriptor 0, 1, or 2, respectively,
is checked.
Unless otherwise specified, primaries that operate on files follow sym-
bolic links and operate on the target of the link, rather than the link
itself.
- When used with [\b[[\b[, the <\b< and >\b> operators sort lexicographically using
+ When used with [\b[[\b[, the <\b< and >\b> operators sort lexicographically using
the current locale. The t\bte\bes\bst\bt command sorts using ASCII ordering.
-\b-a\ba _\bf_\bi_\bl_\be
-\b-L\bL _\bf_\bi_\bl_\be
True if _\bf_\bi_\bl_\be exists and is a symbolic link.
-\b-N\bN _\bf_\bi_\bl_\be
- True if _\bf_\bi_\bl_\be exists and has been modified since it was last
+ True if _\bf_\bi_\bl_\be exists and has been modified since it was last
read.
-\b-O\bO _\bf_\bi_\bl_\be
True if _\bf_\bi_\bl_\be exists and is owned by the effective user id.
-\b-S\bS _\bf_\bi_\bl_\be
True if _\bf_\bi_\bl_\be exists and is a socket.
_\bf_\bi_\bl_\be_\b1 -\b-e\bef\bf _\bf_\bi_\bl_\be_\b2
- True if _\bf_\bi_\bl_\be_\b1 and _\bf_\bi_\bl_\be_\b2 refer to the same device and inode num-
+ True if _\bf_\bi_\bl_\be_\b1 and _\bf_\bi_\bl_\be_\b2 refer to the same device and inode num-
bers.
_\bf_\bi_\bl_\be_\b1 -n\bnt\bt _\bf_\bi_\bl_\be_\b2
- True if _\bf_\bi_\bl_\be_\b1 is newer (according to modification date) than
+ True if _\bf_\bi_\bl_\be_\b1 is newer (according to modification date) than
_\bf_\bi_\bl_\be_\b2, or if _\bf_\bi_\bl_\be_\b1 exists and _\bf_\bi_\bl_\be_\b2 does not.
_\bf_\bi_\bl_\be_\b1 -o\bot\bt _\bf_\bi_\bl_\be_\b2
- True if _\bf_\bi_\bl_\be_\b1 is older than _\bf_\bi_\bl_\be_\b2, or if _\bf_\bi_\bl_\be_\b2 exists and _\bf_\bi_\bl_\be_\b1
+ True if _\bf_\bi_\bl_\be_\b1 is older than _\bf_\bi_\bl_\be_\b2, or if _\bf_\bi_\bl_\be_\b2 exists and _\bf_\bi_\bl_\be_\b1
does not.
-\b-o\bo _\bo_\bp_\bt_\bn_\ba_\bm_\be
- True if the shell option _\bo_\bp_\bt_\bn_\ba_\bm_\be is enabled. See the list of
- options under the description of the -\b-o\bo option to the s\bse\bet\bt
+ True if the shell option _\bo_\bp_\bt_\bn_\ba_\bm_\be is enabled. See the list of
+ options under the description of the -\b-o\bo option to the s\bse\bet\bt
builtin below.
-\b-v\bv _\bv_\ba_\br_\bn_\ba_\bm_\be
- True if the shell variable _\bv_\ba_\br_\bn_\ba_\bm_\be is set (has been assigned a
+ True if the shell variable _\bv_\ba_\br_\bn_\ba_\bm_\be is set (has been assigned a
value).
-\b-R\bR _\bv_\ba_\br_\bn_\ba_\bm_\be
- True if the shell variable _\bv_\ba_\br_\bn_\ba_\bm_\be is set and is a name refer-
+ True if the shell variable _\bv_\ba_\br_\bn_\ba_\bm_\be is set and is a name refer-
ence.
-\b-z\bz _\bs_\bt_\br_\bi_\bn_\bg
True if the length of _\bs_\bt_\br_\bi_\bn_\bg is zero.
_\bs_\bt_\br_\bi_\bn_\bg_\b1 =\b==\b= _\bs_\bt_\br_\bi_\bn_\bg_\b2
_\bs_\bt_\br_\bi_\bn_\bg_\b1 =\b= _\bs_\bt_\br_\bi_\bn_\bg_\b2
- True if the strings are equal. =\b= should be used with the t\bte\bes\bst\bt
- command for POSIX conformance. When used with the [\b[[\b[ command,
+ True if the strings are equal. =\b= should be used with the t\bte\bes\bst\bt
+ command for POSIX conformance. When used with the [\b[[\b[ command,
this performs pattern matching as described above (C\bCo\bom\bmp\bpo\bou\bun\bnd\bd C\bCo\bom\bm-\b-
m\bma\ban\bnd\bds\bs).
True if _\bs_\bt_\br_\bi_\bn_\bg_\b1 sorts after _\bs_\bt_\br_\bi_\bn_\bg_\b2 lexicographically.
_\ba_\br_\bg_\b1 O\bOP\bP _\ba_\br_\bg_\b2
- O\bOP\bP is one of -\b-e\beq\bq, -\b-n\bne\be, -\b-l\blt\bt, -\b-l\ble\be, -\b-g\bgt\bt, or -\b-g\bge\be. These arithmetic
- binary operators return true if _\ba_\br_\bg_\b1 is equal to, not equal to,
- less than, less than or equal to, greater than, or greater than
- or equal to _\ba_\br_\bg_\b2, respectively. _\bA_\br_\bg_\b1 and _\ba_\br_\bg_\b2 may be positive
+ O\bOP\bP is one of -\b-e\beq\bq, -\b-n\bne\be, -\b-l\blt\bt, -\b-l\ble\be, -\b-g\bgt\bt, or -\b-g\bge\be. These arithmetic
+ binary operators return true if _\ba_\br_\bg_\b1 is equal to, not equal to,
+ less than, less than or equal to, greater than, or greater than
+ or equal to _\ba_\br_\bg_\b2, respectively. _\bA_\br_\bg_\b1 and _\ba_\br_\bg_\b2 may be positive
or negative integers.
S\bSI\bIM\bMP\bPL\bLE\bE C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN
- When a simple command is executed, the shell performs the following
+ When a simple command is executed, the shell performs the following
expansions, assignments, and redirections, from left to right.
- 1. The words that the parser has marked as variable assignments
- (those preceding the command name) and redirections are saved
+ 1. The words that the parser has marked as variable assignments
+ (those preceding the command name) and redirections are saved
for later processing.
- 2. The words that are not variable assignments or redirections are
- expanded. If any words remain after expansion, the first word
- is taken to be the name of the command and the remaining words
+ 2. The words that are not variable assignments or redirections are
+ expanded. If any words remain after expansion, the first word
+ is taken to be the name of the command and the remaining words
are the arguments.
3. Redirections are performed as described above under R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN.
4. The text after the =\b= in each variable assignment undergoes tilde
expansion, parameter expansion, command substitution, arithmetic
- expansion, and quote removal before being assigned to the vari-
+ expansion, and quote removal before being assigned to the vari-
able.
If no command name results, the variable assignments affect the current
- shell environment. Otherwise, the variables are added to the environ-
- ment of the executed command and do not affect the current shell envi-
- ronment. If any of the assignments attempts to assign a value to a
- readonly variable, an error occurs, and the command exits with a non-
+ shell environment. Otherwise, the variables are added to the environ-
+ ment of the executed command and do not affect the current shell envi-
+ ronment. If any of the assignments attempts to assign a value to a
+ readonly variable, an error occurs, and the command exits with a non-
zero status.
- If no command name results, redirections are performed, but do not
- affect the current shell environment. A redirection error causes the
+ If no command name results, redirections are performed, but do not
+ affect the current shell environment. A redirection error causes the
command to exit with a non-zero status.
- If there is a command name left after expansion, execution proceeds as
- described below. Otherwise, the command exits. If one of the expan-
- sions contained a command substitution, the exit status of the command
- is the exit status of the last command substitution performed. If
+ If there is a command name left after expansion, execution proceeds as
+ described below. Otherwise, the command exits. If one of the expan-
+ sions contained a command substitution, the exit status of the command
+ is the exit status of the last command substitution performed. If
there were no command substitutions, the command exits with a status of
zero.
C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN
- After a command has been split into words, if it results in a simple
- command and an optional list of arguments, the following actions are
+ After a command has been split into words, if it results in a simple
+ command and an optional list of arguments, the following actions are
taken.
- If the command name contains no slashes, the shell attempts to locate
- it. If there exists a shell function by that name, that function is
- invoked as described above in F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS. If the name does not match a
- function, the shell searches for it in the list of shell builtins. If
+ If the command name contains no slashes, the shell attempts to locate
+ it. If there exists a shell function by that name, that function is
+ invoked as described above in F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS. If the name does not match a
+ function, the shell searches for it in the list of shell builtins. If
a match is found, that builtin is invoked.
- If the name is neither a shell function nor a builtin, and contains no
- slashes, b\bba\bas\bsh\bh searches each element of the P\bPA\bAT\bTH\bH for a directory con-
- taining an executable file by that name. B\bBa\bas\bsh\bh uses a hash table to
- remember the full pathnames of executable files (see h\bha\bas\bsh\bh under S\bSH\bHE\bEL\bLL\bL
- B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). A full search of the directories in P\bPA\bAT\bTH\bH is
- performed only if the command is not found in the hash table. If the
+ If the name is neither a shell function nor a builtin, and contains no
+ slashes, b\bba\bas\bsh\bh searches each element of the P\bPA\bAT\bTH\bH for a directory con-
+ taining an executable file by that name. B\bBa\bas\bsh\bh uses a hash table to
+ remember the full pathnames of executable files (see h\bha\bas\bsh\bh under S\bSH\bHE\bEL\bLL\bL
+ B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). A full search of the directories in P\bPA\bAT\bTH\bH is
+ performed only if the command is not found in the hash table. If the
search is unsuccessful, the shell searches for a defined shell function
named c\bco\bom\bmm\bma\ban\bnd\bd_\b_n\bno\bot\bt_\b_f\bfo\bou\bun\bnd\bd_\b_h\bha\ban\bnd\bdl\ble\be. If that function exists, it is invoked
- with the original command and the original command's arguments as its
- arguments, and the function's exit status becomes the exit status of
- the shell. If that function is not defined, the shell prints an error
+ with the original command and the original command's arguments as its
+ arguments, and the function's exit status becomes the exit status of
+ the shell. If that function is not defined, the shell prints an error
message and returns an exit status of 127.
- If the search is successful, or if the command name contains one or
+ If the search is successful, or if the command name contains one or
more slashes, the shell executes the named program in a separate execu-
tion environment. Argument 0 is set to the name given, and the remain-
ing arguments to the command are set to the arguments given, if any.
- If this execution fails because the file is not in executable format,
- and the file is not a directory, it is assumed to be a _\bs_\bh_\be_\bl_\bl _\bs_\bc_\br_\bi_\bp_\bt, a
- file containing shell commands. A subshell is spawned to execute it.
- This subshell reinitializes itself, so that the effect is as if a new
- shell had been invoked to handle the script, with the exception that
- the locations of commands remembered by the parent (see h\bha\bas\bsh\bh below
+ If this execution fails because the file is not in executable format,
+ and the file is not a directory, it is assumed to be a _\bs_\bh_\be_\bl_\bl _\bs_\bc_\br_\bi_\bp_\bt, a
+ file containing shell commands. A subshell is spawned to execute it.
+ This subshell reinitializes itself, so that the effect is as if a new
+ shell had been invoked to handle the script, with the exception that
+ the locations of commands remembered by the parent (see h\bha\bas\bsh\bh below
under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS) are retained by the child.
- If the program is a file beginning with #\b#!\b!, the remainder of the first
- line specifies an interpreter for the program. The shell executes the
+ If the program is a file beginning with #\b#!\b!, the remainder of the first
+ line specifies an interpreter for the program. The shell executes the
specified interpreter on operating systems that do not handle this exe-
cutable format themselves. The arguments to the interpreter consist of
- a single optional argument following the interpreter name on the first
- line of the program, followed by the name of the program, followed by
+ a single optional argument following the interpreter name on the first
+ line of the program, followed by the name of the program, followed by
the command arguments, if any.
C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
- The shell has an _\be_\bx_\be_\bc_\bu_\bt_\bi_\bo_\bn _\be_\bn_\bv_\bi_\br_\bo_\bn_\bm_\be_\bn_\bt, which consists of the follow-
+ The shell has an _\be_\bx_\be_\bc_\bu_\bt_\bi_\bo_\bn _\be_\bn_\bv_\bi_\br_\bo_\bn_\bm_\be_\bn_\bt, which consists of the follow-
ing:
- +\bo open files inherited by the shell at invocation, as modified by
+ +\bo open files inherited by the shell at invocation, as modified by
redirections supplied to the e\bex\bxe\bec\bc builtin
- +\bo the current working directory as set by c\bcd\bd, p\bpu\bus\bsh\bhd\bd, or p\bpo\bop\bpd\bd, or
+ +\bo the current working directory as set by c\bcd\bd, p\bpu\bus\bsh\bhd\bd, or p\bpo\bop\bpd\bd, or
inherited by the shell at invocation
- +\bo the file creation mode mask as set by u\bum\bma\bas\bsk\bk or inherited from
+ +\bo the file creation mode mask as set by u\bum\bma\bas\bsk\bk or inherited from
the shell's parent
+\bo current traps set by t\btr\bra\bap\bp
+\bo shell parameters that are set by variable assignment or with s\bse\bet\bt
or inherited from the shell's parent in the environment
- +\bo shell functions defined during execution or inherited from the
+ +\bo shell functions defined during execution or inherited from the
shell's parent in the environment
- +\bo options enabled at invocation (either by default or with com-
+ +\bo options enabled at invocation (either by default or with com-
mand-line arguments) or by s\bse\bet\bt
+\bo options enabled by s\bsh\bho\bop\bpt\bt
+\bo shell aliases defined with a\bal\bli\bia\bas\bs
- +\bo various process IDs, including those of background jobs, the
+ +\bo various process IDs, including those of background jobs, the
value of $\b$$\b$, and the value of P\bPP\bPI\bID\bD
- When a simple command other than a builtin or shell function is to be
- executed, it is invoked in a separate execution environment that con-
- sists of the following. Unless otherwise noted, the values are inher-
+ When a simple command other than a builtin or shell function is to be
+ executed, it is invoked in a separate execution environment that con-
+ sists of the following. Unless otherwise noted, the values are inher-
ited from the shell.
- +\bo the shell's open files, plus any modifications and additions
+ +\bo the shell's open files, plus any modifications and additions
specified by redirections to the command
+\bo the current working directory
+\bo the file creation mode mask
- +\bo shell variables and functions marked for export, along with
+ +\bo shell variables and functions marked for export, along with
variables exported for the command, passed in the environment
+\bo traps caught by the shell are reset to the values inherited from
the shell's parent, and traps ignored by the shell are ignored
- A command invoked in this separate environment cannot affect the
+ A command invoked in this separate environment cannot affect the
shell's execution environment.
- Command substitution, commands grouped with parentheses, and asynchro-
+ Command substitution, commands grouped with parentheses, and asynchro-
nous commands are invoked in a subshell environment that is a duplicate
- of the shell environment, except that traps caught by the shell are
+ of the shell environment, except that traps caught by the shell are
reset to the values that the shell inherited from its parent at invoca-
tion. Builtin commands that are invoked as part of a pipeline are also
executed in a subshell environment. Changes made to the subshell envi-
ronment cannot affect the shell's execution environment.
Subshells spawned to execute command substitutions inherit the value of
- the -\b-e\be option from the parent shell. When not in _\bp_\bo_\bs_\bi_\bx mode, b\bba\bas\bsh\bh
+ the -\b-e\be option from the parent shell. When not in _\bp_\bo_\bs_\bi_\bx mode, b\bba\bas\bsh\bh
clears the -\b-e\be option in such subshells.
- If a command is followed by a &\b& and job control is not active, the
- default standard input for the command is the empty file _\b/_\bd_\be_\bv_\b/_\bn_\bu_\bl_\bl.
- Otherwise, the invoked command inherits the file descriptors of the
+ If a command is followed by a &\b& and job control is not active, the
+ default standard input for the command is the empty file _\b/_\bd_\be_\bv_\b/_\bn_\bu_\bl_\bl.
+ Otherwise, the invoked command inherits the file descriptors of the
calling shell as modified by redirections.
E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
- When a program is invoked it is given an array of strings called the
+ When a program is invoked it is given an array of strings called the
_\be_\bn_\bv_\bi_\br_\bo_\bn_\bm_\be_\bn_\bt. This is a list of _\bn_\ba_\bm_\be-_\bv_\ba_\bl_\bu_\be pairs, of the form
_\bn_\ba_\bm_\be=_\bv_\ba_\bl_\bu_\be.
- The shell provides several ways to manipulate the environment. On
+ The shell provides several ways to manipulate the environment. On
invocation, the shell scans its own environment and creates a parameter
- for each name found, automatically marking it for _\be_\bx_\bp_\bo_\br_\bt to child pro-
- cesses. Executed commands inherit the environment. The e\bex\bxp\bpo\bor\brt\bt and
- d\bde\bec\bcl\bla\bar\bre\be -\b-x\bx commands allow parameters and functions to be added to and
+ for each name found, automatically marking it for _\be_\bx_\bp_\bo_\br_\bt to child pro-
+ cesses. Executed commands inherit the environment. The e\bex\bxp\bpo\bor\brt\bt and
+ d\bde\bec\bcl\bla\bar\bre\be -\b-x\bx commands allow parameters and functions to be added to and
deleted from the environment. If the value of a parameter in the envi-
- ronment is modified, the new value becomes part of the environment,
- replacing the old. The environment inherited by any executed command
- consists of the shell's initial environment, whose values may be modi-
- fied in the shell, less any pairs removed by the u\bun\bns\bse\bet\bt command, plus
+ ronment is modified, the new value becomes part of the environment,
+ replacing the old. The environment inherited by any executed command
+ consists of the shell's initial environment, whose values may be modi-
+ fied in the shell, less any pairs removed by the u\bun\bns\bse\bet\bt command, plus
any additions via the e\bex\bxp\bpo\bor\brt\bt and d\bde\bec\bcl\bla\bar\bre\be -\b-x\bx commands.
- The environment for any _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd or function may be augmented
- temporarily by prefixing it with parameter assignments, as described
+ The environment for any _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd or function may be augmented
+ temporarily by prefixing it with parameter assignments, as described
above in P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS. These assignment statements affect only the envi-
ronment seen by that command.
- If the -\b-k\bk option is set (see the s\bse\bet\bt builtin command below), then _\ba_\bl_\bl
- parameter assignments are placed in the environment for a command, not
+ If the -\b-k\bk option is set (see the s\bse\bet\bt builtin command below), then _\ba_\bl_\bl
+ parameter assignments are placed in the environment for a command, not
just those that precede the command name.
- When b\bba\bas\bsh\bh invokes an external command, the variable _\b_ is set to the
+ When b\bba\bas\bsh\bh invokes an external command, the variable _\b_ is set to the
full filename of the command and passed to that command in its environ-
ment.
E\bEX\bXI\bIT\bT S\bST\bTA\bAT\bTU\bUS\bS
- The exit status of an executed command is the value returned by the
+ The exit status of an executed command is the value returned by the
_\bw_\ba_\bi_\bt_\bp_\bi_\bd system call or equivalent function. Exit statuses fall between
- 0 and 255, though, as explained below, the shell may use values above
+ 0 and 255, though, as explained below, the shell may use values above
125 specially. Exit statuses from shell builtins and compound commands
- are also limited to this range. Under certain circumstances, the shell
+ are also limited to this range. Under certain circumstances, the shell
will use special values to indicate specific failure modes.
For the shell's purposes, a command which exits with a zero exit status
- has succeeded. An exit status of zero indicates success. A non-zero
- exit status indicates failure. When a command terminates on a fatal
+ has succeeded. An exit status of zero indicates success. A non-zero
+ exit status indicates failure. When a command terminates on a fatal
signal _\bN, b\bba\bas\bsh\bh uses the value of 128+_\bN as the exit status.
- If a command is not found, the child process created to execute it
- returns a status of 127. If a command is found but is not executable,
+ If a command is not found, the child process created to execute it
+ returns a status of 127. If a command is found but is not executable,
the return status is 126.
If a command fails because of an error during expansion or redirection,
the exit status is greater than zero.
- Shell builtin commands return a status of 0 (_\bt_\br_\bu_\be) if successful, and
- non-zero (_\bf_\ba_\bl_\bs_\be) if an error occurs while they execute. All builtins
+ Shell builtin commands return a status of 0 (_\bt_\br_\bu_\be) if successful, and
+ non-zero (_\bf_\ba_\bl_\bs_\be) if an error occurs while they execute. All builtins
return an exit status of 2 to indicate incorrect usage.
- B\bBa\bas\bsh\bh itself returns the exit status of the last command executed,
- unless a syntax error occurs, in which case it exits with a non-zero
+ B\bBa\bas\bsh\bh itself returns the exit status of the last command executed,
+ unless a syntax error occurs, in which case it exits with a non-zero
value. See also the e\bex\bxi\bit\bt builtin command below.
S\bSI\bIG\bGN\bNA\bAL\bLS\bS
- When b\bba\bas\bsh\bh is interactive, in the absence of any traps, it ignores
+ When b\bba\bas\bsh\bh is interactive, in the absence of any traps, it ignores
S\bSI\bIG\bGT\bTE\bER\bRM\bM (so that k\bki\bil\bll\bl 0\b0 does not kill an interactive shell), and S\bSI\bIG\bGI\bIN\bNT\bT
- is caught and handled (so that the w\bwa\bai\bit\bt builtin is interruptible). In
- all cases, b\bba\bas\bsh\bh ignores S\bSI\bIG\bGQ\bQU\bUI\bIT\bT. If job control is in effect, b\bba\bas\bsh\bh
+ is caught and handled (so that the w\bwa\bai\bit\bt builtin is interruptible). In
+ all cases, b\bba\bas\bsh\bh ignores S\bSI\bIG\bGQ\bQU\bUI\bIT\bT. If job control is in effect, b\bba\bas\bsh\bh
ignores S\bSI\bIG\bGT\bTT\bTI\bIN\bN, S\bSI\bIG\bGT\bTT\bTO\bOU\bU, and S\bSI\bIG\bGT\bTS\bST\bTP\bP.
Non-builtin commands run by b\bba\bas\bsh\bh have signal handlers set to the values
- inherited by the shell from its parent. When job control is not in
- effect, asynchronous commands ignore S\bSI\bIG\bGI\bIN\bNT\bT and S\bSI\bIG\bGQ\bQU\bUI\bIT\bT in addition to
- these inherited handlers. Commands run as a result of command substi-
+ inherited by the shell from its parent. When job control is not in
+ effect, asynchronous commands ignore S\bSI\bIG\bGI\bIN\bNT\bT and S\bSI\bIG\bGQ\bQU\bUI\bIT\bT in addition to
+ these inherited handlers. Commands run as a result of command substi-
tution ignore the keyboard-generated job control signals S\bSI\bIG\bGT\bTT\bTI\bIN\bN, S\bSI\bIG\bGT\bT-\b-
T\bTO\bOU\bU, and S\bSI\bIG\bGT\bTS\bST\bTP\bP.
- The shell exits by default upon receipt of a S\bSI\bIG\bGH\bHU\bUP\bP. Before exiting,
- an interactive shell resends the S\bSI\bIG\bGH\bHU\bUP\bP to all jobs, running or
+ The shell exits by default upon receipt of a S\bSI\bIG\bGH\bHU\bUP\bP. Before exiting,
+ an interactive shell resends the S\bSI\bIG\bGH\bHU\bUP\bP to all jobs, running or
stopped. Stopped jobs are sent S\bSI\bIG\bGC\bCO\bON\bNT\bT to ensure that they receive the
- S\bSI\bIG\bGH\bHU\bUP\bP. To prevent the shell from sending the signal to a particular
- job, it should be removed from the jobs table with the d\bdi\bis\bso\bow\bwn\bn builtin
- (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) or marked to not receive S\bSI\bIG\bGH\bHU\bUP\bP
+ S\bSI\bIG\bGH\bHU\bUP\bP. To prevent the shell from sending the signal to a particular
+ job, it should be removed from the jobs table with the d\bdi\bis\bso\bow\bwn\bn builtin
+ (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) or marked to not receive S\bSI\bIG\bGH\bHU\bUP\bP
using d\bdi\bis\bso\bow\bwn\bn -\b-h\bh.
- If the h\bhu\bup\bpo\bon\bne\bex\bxi\bit\bt shell option has been set with s\bsh\bho\bop\bpt\bt, b\bba\bas\bsh\bh sends a
+ If the h\bhu\bup\bpo\bon\bne\bex\bxi\bit\bt shell option has been set with s\bsh\bho\bop\bpt\bt, b\bba\bas\bsh\bh sends a
S\bSI\bIG\bGH\bHU\bUP\bP to all jobs when an interactive login shell exits.
- If b\bba\bas\bsh\bh is waiting for a command to complete and receives a signal for
+ If b\bba\bas\bsh\bh is waiting for a command to complete and receives a signal for
which a trap has been set, the trap will not be executed until the com-
- mand completes. When b\bba\bas\bsh\bh is waiting for an asynchronous command via
- the w\bwa\bai\bit\bt builtin, the reception of a signal for which a trap has been
+ mand completes. When b\bba\bas\bsh\bh is waiting for an asynchronous command via
+ the w\bwa\bai\bit\bt builtin, the reception of a signal for which a trap has been
set will cause the w\bwa\bai\bit\bt builtin to return immediately with an exit sta-
tus greater than 128, immediately after which the trap is executed.
J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL
- _\bJ_\bo_\bb _\bc_\bo_\bn_\bt_\br_\bo_\bl refers to the ability to selectively stop (_\bs_\bu_\bs_\bp_\be_\bn_\bd) the
+ _\bJ_\bo_\bb _\bc_\bo_\bn_\bt_\br_\bo_\bl refers to the ability to selectively stop (_\bs_\bu_\bs_\bp_\be_\bn_\bd) the
execution of processes and continue (_\br_\be_\bs_\bu_\bm_\be) their execution at a later
- point. A user typically employs this facility via an interactive
- interface supplied jointly by the operating system kernel's terminal
+ point. A user typically employs this facility via an interactive
+ interface supplied jointly by the operating system kernel's terminal
driver and b\bba\bas\bsh\bh.
- The shell associates a _\bj_\bo_\bb with each pipeline. It keeps a table of
- currently executing jobs, which may be listed with the j\bjo\bob\bbs\bs command.
- When b\bba\bas\bsh\bh starts a job asynchronously (in the _\bb_\ba_\bc_\bk_\bg_\br_\bo_\bu_\bn_\bd), it prints a
+ The shell associates a _\bj_\bo_\bb with each pipeline. It keeps a table of
+ currently executing jobs, which may be listed with the j\bjo\bob\bbs\bs command.
+ When b\bba\bas\bsh\bh starts a job asynchronously (in the _\bb_\ba_\bc_\bk_\bg_\br_\bo_\bu_\bn_\bd), it prints a
line that looks like:
[1] 25647
indicating that this job is job number 1 and that the process ID of the
last process in the pipeline associated with this job is 25647. All of
- the processes in a single pipeline are members of the same job. B\bBa\bas\bsh\bh
+ the processes in a single pipeline are members of the same job. B\bBa\bas\bsh\bh
uses the _\bj_\bo_\bb abstraction as the basis for job control.
- To facilitate the implementation of the user interface to job control,
+ To facilitate the implementation of the user interface to job control,
the operating system maintains the notion of a _\bc_\bu_\br_\br_\be_\bn_\bt _\bt_\be_\br_\bm_\bi_\bn_\ba_\bl _\bp_\br_\bo_\bc_\be_\bs_\bs
_\bg_\br_\bo_\bu_\bp _\bI_\bD. Members of this process group (processes whose process group
ID is equal to the current terminal process group ID) receive keyboard-
- generated signals such as S\bSI\bIG\bGI\bIN\bNT\bT. These processes are said to be in
- the _\bf_\bo_\br_\be_\bg_\br_\bo_\bu_\bn_\bd. _\bB_\ba_\bc_\bk_\bg_\br_\bo_\bu_\bn_\bd processes are those whose process group ID
+ generated signals such as S\bSI\bIG\bGI\bIN\bNT\bT. These processes are said to be in
+ the _\bf_\bo_\br_\be_\bg_\br_\bo_\bu_\bn_\bd. _\bB_\ba_\bc_\bk_\bg_\br_\bo_\bu_\bn_\bd processes are those whose process group ID
differs from the terminal's; such processes are immune to keyboard-gen-
erated signals. Only foreground processes are allowed to read from or,
- if the user so specifies with stty tostop, write to the terminal.
- Background processes which attempt to read from (write to when stty
- tostop is in effect) the terminal are sent a S\bSI\bIG\bGT\bTT\bTI\bIN\bN (\b(S\bSI\bIG\bGT\bTT\bTO\bOU\bU)\b) signal
- by the kernel's terminal driver, which, unless caught, suspends the
+ if the user so specifies with stty tostop, write to the terminal.
+ Background processes which attempt to read from (write to when stty
+ tostop is in effect) the terminal are sent a S\bSI\bIG\bGT\bTT\bTI\bIN\bN (\b(S\bSI\bIG\bGT\bTT\bTO\bOU\bU)\b) signal
+ by the kernel's terminal driver, which, unless caught, suspends the
process.
- If the operating system on which b\bba\bas\bsh\bh is running supports job control,
+ If the operating system on which b\bba\bas\bsh\bh is running supports job control,
b\bba\bas\bsh\bh contains facilities to use it. Typing the _\bs_\bu_\bs_\bp_\be_\bn_\bd character (typ-
ically ^\b^Z\bZ, Control-Z) while a process is running causes that process to
- be stopped and returns control to b\bba\bas\bsh\bh. Typing the _\bd_\be_\bl_\ba_\by_\be_\bd _\bs_\bu_\bs_\bp_\be_\bn_\bd
- character (typically ^\b^Y\bY, Control-Y) causes the process to be stopped
- when it attempts to read input from the terminal, and control to be
- returned to b\bba\bas\bsh\bh. The user may then manipulate the state of this job,
- using the b\bbg\bg command to continue it in the background, the f\bfg\bg command
+ be stopped and returns control to b\bba\bas\bsh\bh. Typing the _\bd_\be_\bl_\ba_\by_\be_\bd _\bs_\bu_\bs_\bp_\be_\bn_\bd
+ character (typically ^\b^Y\bY, Control-Y) causes the process to be stopped
+ when it attempts to read input from the terminal, and control to be
+ returned to b\bba\bas\bsh\bh. The user may then manipulate the state of this job,
+ using the b\bbg\bg command to continue it in the background, the f\bfg\bg command
to continue it in the foreground, or the k\bki\bil\bll\bl command to kill it. A ^\b^Z\bZ
takes effect immediately, and has the additional side effect of causing
pending output and typeahead to be discarded.
There are a number of ways to refer to a job in the shell. The charac-
- ter %\b% introduces a job specification (_\bj_\bo_\bb_\bs_\bp_\be_\bc). Job number _\bn may be
+ ter %\b% introduces a job specification (_\bj_\bo_\bb_\bs_\bp_\be_\bc). Job number _\bn may be
referred to as %\b%n\bn. A job may also be referred to using a prefix of the
name used to start it, or using a substring that appears in its command
- line. For example, %\b%c\bce\be refers to a stopped c\bce\be job. If a prefix
- matches more than one job, b\bba\bas\bsh\bh reports an error. Using %\b%?\b?c\bce\be, on the
- other hand, refers to any job containing the string c\bce\be in its command
- line. If the substring matches more than one job, b\bba\bas\bsh\bh reports an
- error. The symbols %\b%%\b% and %\b%+\b+ refer to the shell's notion of the _\bc_\bu_\br_\b-
- _\br_\be_\bn_\bt _\bj_\bo_\bb, which is the last job stopped while it was in the foreground
+ line. For example, %\b%c\bce\be refers to a stopped c\bce\be job. If a prefix
+ matches more than one job, b\bba\bas\bsh\bh reports an error. Using %\b%?\b?c\bce\be, on the
+ other hand, refers to any job containing the string c\bce\be in its command
+ line. If the substring matches more than one job, b\bba\bas\bsh\bh reports an
+ error. The symbols %\b%%\b% and %\b%+\b+ refer to the shell's notion of the _\bc_\bu_\br_\b-
+ _\br_\be_\bn_\bt _\bj_\bo_\bb, which is the last job stopped while it was in the foreground
or started in the background. The _\bp_\br_\be_\bv_\bi_\bo_\bu_\bs _\bj_\bo_\bb may be referenced using
%\b%-\b-. If there is only a single job, %\b%+\b+ and %\b%-\b- can both be used to refer
- to that job. In output pertaining to jobs (e.g., the output of the
+ to that job. In output pertaining to jobs (e.g., the output of the
j\bjo\bob\bbs\bs command), the current job is always flagged with a +\b+, and the pre-
- vious job with a -\b-. A single % (with no accompanying job specifica-
+ vious job with a -\b-. A single % (with no accompanying job specifica-
tion) also refers to the current job.
- Simply naming a job can be used to bring it into the foreground: %\b%1\b1 is
- a synonym for `\b``\b`f\bfg\bg %\b%1\b1'\b''\b', bringing job 1 from the background into the
- foreground. Similarly, `\b``\b`%\b%1\b1 &\b&'\b''\b' resumes job 1 in the background,
+ Simply naming a job can be used to bring it into the foreground: %\b%1\b1 is
+ a synonym for `\b``\b`f\bfg\bg %\b%1\b1'\b''\b', bringing job 1 from the background into the
+ foreground. Similarly, `\b``\b`%\b%1\b1 &\b&'\b''\b' resumes job 1 in the background,
equivalent to `\b``\b`b\bbg\bg %\b%1\b1'\b''\b'.
- The shell learns immediately whenever a job changes state. Normally,
+ The shell learns immediately whenever a job changes state. Normally,
b\bba\bas\bsh\bh waits until it is about to print a prompt before reporting changes
- in a job's status so as to not interrupt any other output. If the -\b-b\bb
+ in a job's status so as to not interrupt any other output. If the -\b-b\bb
option to the s\bse\bet\bt builtin command is enabled, b\bba\bas\bsh\bh reports such changes
- immediately. Any trap on S\bSI\bIG\bGC\bCH\bHL\bLD\bD is executed for each child that
+ immediately. Any trap on S\bSI\bIG\bGC\bCH\bHL\bLD\bD is executed for each child that
exits.
- If an attempt to exit b\bba\bas\bsh\bh is made while jobs are stopped (or, if the
- c\bch\bhe\bec\bck\bkj\bjo\bob\bbs\bs shell option has been enabled using the s\bsh\bho\bop\bpt\bt builtin, run-
+ If an attempt to exit b\bba\bas\bsh\bh is made while jobs are stopped (or, if the
+ c\bch\bhe\bec\bck\bkj\bjo\bob\bbs\bs shell option has been enabled using the s\bsh\bho\bop\bpt\bt builtin, run-
ning), the shell prints a warning message, and, if the c\bch\bhe\bec\bck\bkj\bjo\bob\bbs\bs option
- is enabled, lists the jobs and their statuses. The j\bjo\bob\bbs\bs command may
- then be used to inspect their status. If a second attempt to exit is
- made without an intervening command, the shell does not print another
+ is enabled, lists the jobs and their statuses. The j\bjo\bob\bbs\bs command may
+ then be used to inspect their status. If a second attempt to exit is
+ made without an intervening command, the shell does not print another
warning, and any stopped jobs are terminated.
P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG
When executing interactively, b\bba\bas\bsh\bh displays the primary prompt P\bPS\bS1\b1 when
- it is ready to read a command, and the secondary prompt P\bPS\bS2\b2 when it
- needs more input to complete a command. B\bBa\bas\bsh\bh allows these prompt
- strings to be customized by inserting a number of backslash-escaped
+ it is ready to read a command, and the secondary prompt P\bPS\bS2\b2 when it
+ needs more input to complete a command. B\bBa\bas\bsh\bh allows these prompt
+ strings to be customized by inserting a number of backslash-escaped
special characters that are decoded as follows:
\\b\a\ba an ASCII bell character (07)
- \\b\d\bd the date in "Weekday Month Date" format (e.g., "Tue May
+ \\b\d\bd the date in "Weekday Month Date" format (e.g., "Tue May
26")
\\b\D\bD{\b{_\bf_\bo_\br_\bm_\ba_\bt}\b}
- the _\bf_\bo_\br_\bm_\ba_\bt is passed to _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) and the result is
- inserted into the prompt string; an empty _\bf_\bo_\br_\bm_\ba_\bt results
+ the _\bf_\bo_\br_\bm_\ba_\bt is passed to _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) and the result is
+ inserted into the prompt string; an empty _\bf_\bo_\br_\bm_\ba_\bt results
in a locale-specific time representation. The braces are
required
\\b\e\be an ASCII escape character (033)
\\b\l\bl the basename of the shell's terminal device name
\\b\n\bn newline
\\b\r\br carriage return
- \\b\s\bs the name of the shell, the basename of $\b$0\b0 (the portion
+ \\b\s\bs the name of the shell, the basename of $\b$0\b0 (the portion
following the final slash)
\\b\t\bt the current time in 24-hour HH:MM:SS format
\\b\T\bT the current time in 12-hour HH:MM:SS format
\\b\u\bu the username of the current user
\\b\v\bv the version of b\bba\bas\bsh\bh (e.g., 2.00)
\\b\V\bV the release of b\bba\bas\bsh\bh, version + patch level (e.g., 2.00.0)
- \\b\w\bw the current working directory, with $\b$H\bHO\bOM\bME\bE abbreviated
- with a tilde (uses the value of the P\bPR\bRO\bOM\bMP\bPT\bT_\b_D\bDI\bIR\bRT\bTR\bRI\bIM\bM vari-
+ \\b\w\bw the current working directory, with $\b$H\bHO\bOM\bME\bE abbreviated
+ with a tilde (uses the value of the P\bPR\bRO\bOM\bMP\bPT\bT_\b_D\bDI\bIR\bRT\bTR\bRI\bIM\bM vari-
able)
\\b\W\bW the basename of the current working directory, with $\b$H\bHO\bOM\bME\bE
abbreviated with a tilde
\\b\$\b$ if the effective UID is 0, a #\b#, otherwise a $\b$
\\b\_\bn_\bn_\bn the character corresponding to the octal number _\bn_\bn_\bn
\\b\\\b\ a backslash
- \\b\[\b[ begin a sequence of non-printing characters, which could
- be used to embed a terminal control sequence into the
+ \\b\[\b[ begin a sequence of non-printing characters, which could
+ be used to embed a terminal control sequence into the
prompt
\\b\]\b] end a sequence of non-printing characters
- The command number and the history number are usually different: the
- history number of a command is its position in the history list, which
- may include commands restored from the history file (see H\bHI\bIS\bST\bTO\bOR\bRY\bY
- below), while the command number is the position in the sequence of
- commands executed during the current shell session. After the string
- is decoded, it is expanded via parameter expansion, command substitu-
- tion, arithmetic expansion, and quote removal, subject to the value of
- the p\bpr\bro\bom\bmp\bpt\btv\bva\bar\brs\bs shell option (see the description of the s\bsh\bho\bop\bpt\bt command
+ The command number and the history number are usually different: the
+ history number of a command is its position in the history list, which
+ may include commands restored from the history file (see H\bHI\bIS\bST\bTO\bOR\bRY\bY
+ below), while the command number is the position in the sequence of
+ commands executed during the current shell session. After the string
+ is decoded, it is expanded via parameter expansion, command substitu-
+ tion, arithmetic expansion, and quote removal, subject to the value of
+ the p\bpr\bro\bom\bmp\bpt\btv\bva\bar\brs\bs shell option (see the description of the s\bsh\bho\bop\bpt\bt command
under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE
- This is the library that handles reading input when using an interac-
+ This is the library that handles reading input when using an interac-
tive shell, unless the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option is given at shell invocation.
Line editing is also used when using the -\b-e\be option to the r\bre\bea\bad\bd builtin.
By default, the line editing commands are similar to those of Emacs. A
vi-style line editing interface is also available. Line editing can be
- enabled at any time using the -\b-o\bo e\bem\bma\bac\bcs\bs or -\b-o\bo v\bvi\bi options to the s\bse\bet\bt
- builtin (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). To turn off line editing
- after the shell is running, use the +\b+o\bo e\bem\bma\bac\bcs\bs or +\b+o\bo v\bvi\bi options to the
+ enabled at any time using the -\b-o\bo e\bem\bma\bac\bcs\bs or -\b-o\bo v\bvi\bi options to the s\bse\bet\bt
+ builtin (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). To turn off line editing
+ after the shell is running, use the +\b+o\bo e\bem\bma\bac\bcs\bs or +\b+o\bo v\bvi\bi options to the
s\bse\bet\bt builtin.
R\bRe\bea\bad\bdl\bli\bin\bne\be N\bNo\bot\bta\bat\bti\bio\bon\bn
In this section, the Emacs-style notation is used to denote keystrokes.
- Control keys are denoted by C-_\bk_\be_\by, e.g., C-n means Control-N. Simi-
- larly, _\bm_\be_\bt_\ba keys are denoted by M-_\bk_\be_\by, so M-x means Meta-X. (On key-
- boards without a _\bm_\be_\bt_\ba key, M-_\bx means ESC _\bx, i.e., press the Escape key
+ Control keys are denoted by C-_\bk_\be_\by, e.g., C-n means Control-N. Simi-
+ larly, _\bm_\be_\bt_\ba keys are denoted by M-_\bk_\be_\by, so M-x means Meta-X. (On key-
+ boards without a _\bm_\be_\bt_\ba key, M-_\bx means ESC _\bx, i.e., press the Escape key
then the _\bx key. This makes ESC the _\bm_\be_\bt_\ba _\bp_\br_\be_\bf_\bi_\bx. The combination M-C-_\bx
- means ESC-Control-_\bx, or press the Escape key then hold the Control key
+ means ESC-Control-_\bx, or press the Escape key then hold the Control key
while pressing the _\bx key.)
Readline commands may be given numeric _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs, which normally act as
- a repeat count. Sometimes, however, it is the sign of the argument
- that is significant. Passing a negative argument to a command that
- acts in the forward direction (e.g., k\bki\bil\bll\bl-\b-l\bli\bin\bne\be) causes that command to
- act in a backward direction. Commands whose behavior with arguments
+ a repeat count. Sometimes, however, it is the sign of the argument
+ that is significant. Passing a negative argument to a command that
+ acts in the forward direction (e.g., k\bki\bil\bll\bl-\b-l\bli\bin\bne\be) causes that command to
+ act in a backward direction. Commands whose behavior with arguments
deviates from this are noted below.
- When a command is described as _\bk_\bi_\bl_\bl_\bi_\bn_\bg text, the text deleted is saved
+ When a command is described as _\bk_\bi_\bl_\bl_\bi_\bn_\bg text, the text deleted is saved
for possible future retrieval (_\by_\ba_\bn_\bk_\bi_\bn_\bg). The killed text is saved in a
_\bk_\bi_\bl_\bl _\br_\bi_\bn_\bg. Consecutive kills cause the text to be accumulated into one
unit, which can be yanked all at once. Commands which do not kill text
separate the chunks of text on the kill ring.
R\bRe\bea\bad\bdl\bli\bin\bne\be I\bIn\bni\bit\bti\bia\bal\bli\biz\bza\bat\bti\bio\bon\bn
- Readline is customized by putting commands in an initialization file
- (the _\bi_\bn_\bp_\bu_\bt_\br_\bc file). The name of this file is taken from the value of
- the I\bIN\bNP\bPU\bUT\bTR\bRC\bC variable. If that variable is unset, the default is
- _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc. When a program which uses the readline library starts up,
+ Readline is customized by putting commands in an initialization file
+ (the _\bi_\bn_\bp_\bu_\bt_\br_\bc file). The name of this file is taken from the value of
+ the I\bIN\bNP\bPU\bUT\bTR\bRC\bC variable. If that variable is unset, the default is
+ _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc. When a program which uses the readline library starts up,
the initialization file is read, and the key bindings and variables are
- set. There are only a few basic constructs allowed in the readline
- initialization file. Blank lines are ignored. Lines beginning with a
- #\b# are comments. Lines beginning with a $\b$ indicate conditional con-
+ set. There are only a few basic constructs allowed in the readline
+ initialization file. Blank lines are ignored. Lines beginning with a
+ #\b# are comments. Lines beginning with a $\b$ indicate conditional con-
structs. Other lines denote key bindings and variable settings.
- The default key-bindings may be changed with an _\bi_\bn_\bp_\bu_\bt_\br_\bc file. Other
+ The default key-bindings may be changed with an _\bi_\bn_\bp_\bu_\bt_\br_\bc file. Other
programs that use this library may add their own commands and bindings.
For example, placing
M-Control-u: universal-argument
or
C-Meta-u: universal-argument
- into the _\bi_\bn_\bp_\bu_\bt_\br_\bc would make M-C-u execute the readline command _\bu_\bn_\bi_\bv_\be_\br_\b-
+ into the _\bi_\bn_\bp_\bu_\bt_\br_\bc would make M-C-u execute the readline command _\bu_\bn_\bi_\bv_\be_\br_\b-
_\bs_\ba_\bl_\b-_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt.
- The following symbolic character names are recognized: _\bR_\bU_\bB_\bO_\bU_\bT, _\bD_\bE_\bL,
+ The following symbolic character names are recognized: _\bR_\bU_\bB_\bO_\bU_\bT, _\bD_\bE_\bL,
_\bE_\bS_\bC, _\bL_\bF_\bD, _\bN_\bE_\bW_\bL_\bI_\bN_\bE, _\bR_\bE_\bT, _\bR_\bE_\bT_\bU_\bR_\bN, _\bS_\bP_\bC, _\bS_\bP_\bA_\bC_\bE, and _\bT_\bA_\bB.
- In addition to command names, readline allows keys to be bound to a
+ In addition to command names, readline allows keys to be bound to a
string that is inserted when the key is pressed (a _\bm_\ba_\bc_\br_\bo).
R\bRe\bea\bad\bdl\bli\bin\bne\be K\bKe\bey\by B\bBi\bin\bnd\bdi\bin\bng\bgs\bs
- The syntax for controlling key bindings in the _\bi_\bn_\bp_\bu_\bt_\br_\bc file is simple.
- All that is required is the name of the command or the text of a macro
- and a key sequence to which it should be bound. The name may be speci-
+ The syntax for controlling key bindings in the _\bi_\bn_\bp_\bu_\bt_\br_\bc file is simple.
+ All that is required is the name of the command or the text of a macro
+ and a key sequence to which it should be bound. The name may be speci-
fied in one of two ways: as a symbolic key name, possibly with _\bM_\be_\bt_\ba_\b- or
_\bC_\bo_\bn_\bt_\br_\bo_\bl_\b- prefixes, or as a key sequence.
Meta-Rubout: backward-kill-word
Control-o: "> output"
- In the above example, _\bC_\b-_\bu is bound to the function u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt,
- _\bM_\b-_\bD_\bE_\bL is bound to the function b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd, and _\bC_\b-_\bo is bound to
- run the macro expressed on the right hand side (that is, to insert the
+ In the above example, _\bC_\b-_\bu is bound to the function u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt,
+ _\bM_\b-_\bD_\bE_\bL is bound to the function b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd, and _\bC_\b-_\bo is bound to
+ run the macro expressed on the right hand side (that is, to insert the
text ``> output'' into the line).
- In the second form, "\b"k\bke\bey\bys\bse\beq\bq"\b":_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be or _\bm_\ba_\bc_\br_\bo, k\bke\bey\bys\bse\beq\bq differs
- from k\bke\bey\byn\bna\bam\bme\be above in that strings denoting an entire key sequence may
- be specified by placing the sequence within double quotes. Some GNU
- Emacs style key escapes can be used, as in the following example, but
+ In the second form, "\b"k\bke\bey\bys\bse\beq\bq"\b":_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be or _\bm_\ba_\bc_\br_\bo, k\bke\bey\bys\bse\beq\bq differs
+ from k\bke\bey\byn\bna\bam\bme\be above in that strings denoting an entire key sequence may
+ be specified by placing the sequence within double quotes. Some GNU
+ Emacs style key escapes can be used, as in the following example, but
the symbolic character names are not recognized.
"\C-u": universal-argument
"\e[11~": "Function Key 1"
In this example, _\bC_\b-_\bu is again bound to the function u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt.
- _\bC_\b-_\bx _\bC_\b-_\br is bound to the function r\bre\be-\b-r\bre\bea\bad\bd-\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be, and _\bE_\bS_\bC _\b[ _\b1 _\b1 _\b~ is
+ _\bC_\b-_\bx _\bC_\b-_\br is bound to the function r\bre\be-\b-r\bre\bea\bad\bd-\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be, and _\bE_\bS_\bC _\b[ _\b1 _\b1 _\b~ is
bound to insert the text ``Function Key 1''.
The full set of GNU Emacs style escape sequences is
\\b\"\b" literal "
\\b\'\b' literal '
- In addition to the GNU Emacs style escape sequences, a second set of
+ In addition to the GNU Emacs style escape sequences, a second set of
backslash escapes is available:
\\b\a\ba alert (bell)
\\b\b\bb backspace
\\b\r\br carriage return
\\b\t\bt horizontal tab
\\b\v\bv vertical tab
- \\b\_\bn_\bn_\bn the eight-bit character whose value is the octal value
+ \\b\_\bn_\bn_\bn the eight-bit character whose value is the octal value
_\bn_\bn_\bn (one to three digits)
- \\b\x\bx_\bH_\bH the eight-bit character whose value is the hexadecimal
+ \\b\x\bx_\bH_\bH the eight-bit character whose value is the hexadecimal
value _\bH_\bH (one or two hex digits)
When entering the text of a macro, single or double quotes must be used
to indicate a macro definition. Unquoted text is assumed to be a func-
- tion name. In the macro body, the backslash escapes described above
- are expanded. Backslash will quote any other character in the macro
+ tion name. In the macro body, the backslash escapes described above
+ are expanded. Backslash will quote any other character in the macro
text, including " and '.
- B\bBa\bas\bsh\bh allows the current readline key bindings to be displayed or modi-
- fied with the b\bbi\bin\bnd\bd builtin command. The editing mode may be switched
- during interactive use by using the -\b-o\bo option to the s\bse\bet\bt builtin com-
+ B\bBa\bas\bsh\bh allows the current readline key bindings to be displayed or modi-
+ fied with the b\bbi\bin\bnd\bd builtin command. The editing mode may be switched
+ during interactive use by using the -\b-o\bo option to the s\bse\bet\bt builtin com-
mand (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
R\bRe\bea\bad\bdl\bli\bin\bne\be V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs
s\bse\bet\bt _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be_\b-_\bn_\ba_\bm_\be _\bv_\ba_\bl_\bu_\be
- Except where noted, readline variables can take the values O\bOn\bn or O\bOf\bff\bf
- (without regard to case). Unrecognized variable names are ignored.
- When a variable value is read, empty or null values, "on" (case-insen-
+ Except where noted, readline variables can take the values O\bOn\bn or O\bOf\bff\bf
+ (without regard to case). Unrecognized variable names are ignored.
+ When a variable value is read, empty or null values, "on" (case-insen-
sitive), and "1" are equivalent to O\bOn\bn. All other values are equivalent
to O\bOf\bff\bf. The variables and their default values are:
b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be (\b(a\bau\bud\bdi\bib\bbl\ble\be)\b)
- Controls what happens when readline wants to ring the terminal
+ Controls what happens when readline wants to ring the terminal
bell. If set to n\bno\bon\bne\be, readline never rings the bell. If set to
- v\bvi\bis\bsi\bib\bbl\ble\be, readline uses a visible bell if one is available. If
+ v\bvi\bis\bsi\bib\bbl\ble\be, readline uses a visible bell if one is available. If
set to a\bau\bud\bdi\bib\bbl\ble\be, readline attempts to ring the terminal's bell.
b\bbi\bin\bnd\bd-\b-t\btt\bty\by-\b-s\bsp\bpe\bec\bci\bia\bal\bl-\b-c\bch\bha\bar\brs\bs (\b(O\bOn\bn)\b)
- If set to O\bOn\bn, readline attempts to bind the control characters
+ If set to O\bOn\bn, readline attempts to bind the control characters
treated specially by the kernel's terminal driver to their read-
line equivalents.
c\bco\bol\blo\bor\bre\bed\bd-\b-s\bst\bta\bat\bts\bs (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, readline displays possible completions using dif-
- ferent colors to indicate their file type. The color defini-
- tions are taken from the value of the L\bLS\bS_\b_C\bCO\bOL\bLO\bOR\bRS\bS environment
+ If set to O\bOn\bn, readline displays possible completions using dif-
+ ferent colors to indicate their file type. The color defini-
+ tions are taken from the value of the L\bLS\bS_\b_C\bCO\bOL\bLO\bOR\bRS\bS environment
variable.
c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn (\b(`\b``\b`#\b#'\b''\b')\b)
- The string that is inserted when the readline i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt
+ The string that is inserted when the readline i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt
command is executed. This command is bound to M\bM-\b-#\b# in emacs mode
and to #\b# in vi command mode.
c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-i\big\bgn\bno\bor\bre\be-\b-c\bca\bas\bse\be (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, readline performs filename matching and completion
in a case-insensitive fashion.
c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-p\bpr\bre\bef\bfi\bix\bx-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-l\ble\ben\bng\bgt\bth\bh (\b(0\b0)\b)
- The length in characters of the common prefix of a list of pos-
- sible completions that is displayed without modification. When
- set to a value greater than zero, common prefixes longer than
- this value are replaced with an ellipsis when displaying possi-
+ The length in characters of the common prefix of a list of pos-
+ sible completions that is displayed without modification. When
+ set to a value greater than zero, common prefixes longer than
+ this value are replaced with an ellipsis when displaying possi-
ble completions.
c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-q\bqu\bue\ber\bry\by-\b-i\bit\bte\bem\bms\bs (\b(1\b10\b00\b0)\b)
- This determines when the user is queried about viewing the num-
- ber of possible completions generated by the p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\be-\b-
- t\bti\bio\bon\bns\bs command. It may be set to any integer value greater than
- or equal to zero. If the number of possible completions is
+ This determines when the user is queried about viewing the num-
+ ber of possible completions generated by the p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\be-\b-
+ t\bti\bio\bon\bns\bs command. It may be set to any integer value greater than
+ or equal to zero. If the number of possible completions is
greater than or equal to the value of this variable, the user is
- asked whether or not he wishes to view them; otherwise they are
+ asked whether or not he wishes to view them; otherwise they are
simply listed on the terminal.
c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba (\b(O\bOn\bn)\b)
- If set to O\bOn\bn, readline will convert characters with the eighth
+ If set to O\bOn\bn, readline will convert characters with the eighth
bit set to an ASCII key sequence by stripping the eighth bit and
- prefixing an escape character (in effect, using escape as the
+ prefixing an escape character (in effect, using escape as the
_\bm_\be_\bt_\ba _\bp_\br_\be_\bf_\bi_\bx).
d\bdi\bis\bsa\bab\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, readline will inhibit word completion. Completion
- characters will be inserted into the line as if they had been
+ characters will be inserted into the line as if they had been
mapped to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt.
e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be (\b(e\bem\bma\bac\bcs\bs)\b)
Controls whether readline begins with a set of key bindings sim-
ilar to _\bE_\bm_\ba_\bc_\bs or _\bv_\bi. e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be can be set to either e\bem\bma\bac\bcs\bs or
v\bvi\bi.
e\bec\bch\bho\bo-\b-c\bco\bon\bnt\btr\bro\bol\bl-\b-c\bch\bha\bar\bra\bac\bct\bte\ber\brs\bs (\b(O\bOn\bn)\b)
- When set to O\bOn\bn, on operating systems that indicate they support
+ When set to O\bOn\bn, on operating systems that indicate they support
it, readline echoes a character corresponding to a signal gener-
ated from the keyboard.
e\ben\bna\bab\bbl\ble\be-\b-k\bke\bey\byp\bpa\bad\bd (\b(O\bOf\bff\bf)\b)
When set to O\bOn\bn, readline will try to enable the application key-
- pad when it is called. Some systems need this to enable the
+ pad when it is called. Some systems need this to enable the
arrow keys.
e\ben\bna\bab\bbl\ble\be-\b-m\bme\bet\bta\ba-\b-k\bke\bey\by (\b(O\bOn\bn)\b)
- When set to O\bOn\bn, readline will try to enable any meta modifier
- key the terminal claims to support when it is called. On many
+ When set to O\bOn\bn, readline will try to enable any meta modifier
+ key the terminal claims to support when it is called. On many
terminals, the meta key is used to send eight-bit characters.
e\bex\bxp\bpa\ban\bnd\bd-\b-t\bti\bil\bld\bde\be (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, tilde expansion is performed when readline
+ If set to O\bOn\bn, tilde expansion is performed when readline
attempts word completion.
h\bhi\bis\bst\bto\bor\bry\by-\b-p\bpr\bre\bes\bse\ber\brv\bve\be-\b-p\bpo\boi\bin\bnt\bt (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, the history code attempts to place point at the
- same location on each history line retrieved with p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bs-\b-
+ If set to O\bOn\bn, the history code attempts to place point at the
+ same location on each history line retrieved with p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bs-\b-
t\bto\bor\bry\by or n\bne\bex\bxt\bt-\b-h\bhi\bis\bst\bto\bor\bry\by.
h\bhi\bis\bst\bto\bor\bry\by-\b-s\bsi\biz\bze\be (\b(0\b0)\b)
- Set the maximum number of history entries saved in the history
- list. If set to zero, any existing history entries are deleted
+ Set the maximum number of history entries saved in the history
+ list. If set to zero, any existing history entries are deleted
and no new entries are saved. If set to a value less than zero,
- the number of history entries is not limited. By default, the
+ the number of history entries is not limited. By default, the
number of history entries is not limited.
h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bl-\b-s\bsc\bcr\bro\bol\bll\bl-\b-m\bmo\bod\bde\be (\b(O\bOf\bff\bf)\b)
- When set to O\bOn\bn, makes readline use a single line for display,
+ When set to O\bOn\bn, makes readline use a single line for display,
scrolling the input horizontally on a single screen line when it
- becomes longer than the screen width rather than wrapping to a
+ becomes longer than the screen width rather than wrapping to a
new line.
i\bin\bnp\bpu\but\bt-\b-m\bme\bet\bta\ba (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, readline will enable eight-bit input (that is, it
- will not strip the high bit from the characters it reads),
+ If set to O\bOn\bn, readline will enable eight-bit input (that is, it
+ will not strip the high bit from the characters it reads),
regardless of what the terminal claims it can support. The name
m\bme\bet\bta\ba-\b-f\bfl\bla\bag\bg is a synonym for this variable.
i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs (\b(`\b``\b`C\bC-\b-[\b[C\bC-\b-J\bJ'\b''\b')\b)
- The string of characters that should terminate an incremental
- search without subsequently executing the character as a com-
- mand. If this variable has not been given a value, the charac-
+ The string of characters that should terminate an incremental
+ search without subsequently executing the character as a com-
+ mand. If this variable has not been given a value, the charac-
ters _\bE_\bS_\bC and _\bC_\b-_\bJ will terminate an incremental search.
k\bke\bey\bym\bma\bap\bp (\b(e\bem\bma\bac\bcs\bs)\b)
- Set the current readline keymap. The set of valid keymap names
- is _\be_\bm_\ba_\bc_\bs_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b, _\bv_\bi_\b, _\bv_\bi_\b-_\bc_\bo_\bm_\b-
- _\bm_\ba_\bn_\bd, and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt. _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd; _\be_\bm_\ba_\bc_\bs is
- equivalent to _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd. The default value is _\be_\bm_\ba_\bc_\bs; the
+ Set the current readline keymap. The set of valid keymap names
+ is _\be_\bm_\ba_\bc_\bs_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b, _\bv_\bi_\b, _\bv_\bi_\b-_\bc_\bo_\bm_\b-
+ _\bm_\ba_\bn_\bd, and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt. _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd; _\be_\bm_\ba_\bc_\bs is
+ equivalent to _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd. The default value is _\be_\bm_\ba_\bc_\bs; the
value of e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be also affects the default keymap.
k\bke\bey\bys\bse\beq\bq-\b-t\bti\bim\bme\beo\bou\but\bt (\b(5\b50\b00\b0)\b)
- Specifies the duration _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will wait for a character when
- reading an ambiguous key sequence (one that can form a complete
+ Specifies the duration _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will wait for a character when
+ reading an ambiguous key sequence (one that can form a complete
key sequence using the input read so far, or can take additional
- input to complete a longer key sequence). If no input is
- received within the timeout, _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will use the shorter but
- complete key sequence. The value is specified in milliseconds,
- so a value of 1000 means that _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will wait one second for
- additional input. If this variable is set to a value less than
- or equal to zero, or to a non-numeric value, _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will wait
- until another key is pressed to decide which key sequence to
+ input to complete a longer key sequence). If no input is
+ received within the timeout, _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will use the shorter but
+ complete key sequence. The value is specified in milliseconds,
+ so a value of 1000 means that _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will wait one second for
+ additional input. If this variable is set to a value less than
+ or equal to zero, or to a non-numeric value, _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will wait
+ until another key is pressed to decide which key sequence to
complete.
m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs (\b(O\bOn\bn)\b)
If set to O\bOn\bn, completed directory names have a slash appended.
m\bma\bar\brk\bk-\b-m\bmo\bod\bdi\bif\bfi\bie\bed\bd-\b-l\bli\bin\bne\bes\bs (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, history lines that have been modified are dis-
+ If set to O\bOn\bn, history lines that have been modified are dis-
played with a preceding asterisk (*\b*).
m\bma\bar\brk\bk-\b-s\bsy\bym\bml\bli\bin\bnk\bke\bed\bd-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, completed names which are symbolic links to direc-
- tories have a slash appended (subject to the value of
+ tories have a slash appended (subject to the value of
m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs).
m\bma\bat\btc\bch\bh-\b-h\bhi\bid\bdd\bde\ben\bn-\b-f\bfi\bil\ble\bes\bs (\b(O\bOn\bn)\b)
- This variable, when set to O\bOn\bn, causes readline to match files
- whose names begin with a `.' (hidden files) when performing
- filename completion. If set to O\bOf\bff\bf, the leading `.' must be
+ This variable, when set to O\bOn\bn, causes readline to match files
+ whose names begin with a `.' (hidden files) when performing
+ filename completion. If set to O\bOf\bff\bf, the leading `.' must be
supplied by the user in the filename to be completed.
m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-p\bpr\bre\bef\bfi\bix\bx (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, menu completion displays the common prefix of the
+ If set to O\bOn\bn, menu completion displays the common prefix of the
list of possible completions (which may be empty) before cycling
through the list.
o\bou\but\btp\bpu\but\bt-\b-m\bme\bet\bta\ba (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, readline will display characters with the eighth
+ If set to O\bOn\bn, readline will display characters with the eighth
bit set directly rather than as a meta-prefixed escape sequence.
p\bpa\bag\bge\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(O\bOn\bn)\b)
- If set to O\bOn\bn, readline uses an internal _\bm_\bo_\br_\be-like pager to dis-
+ If set to O\bOn\bn, readline uses an internal _\bm_\bo_\br_\be-like pager to dis-
play a screenful of possible completions at a time.
p\bpr\bri\bin\bnt\bt-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs-\b-h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bll\bly\by (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, readline will display completions with matches
- sorted horizontally in alphabetical order, rather than down the
+ If set to O\bOn\bn, readline will display completions with matches
+ sorted horizontally in alphabetical order, rather than down the
screen.
r\bre\bev\bve\ber\brt\bt-\b-a\bal\bll\bl-\b-a\bat\bt-\b-n\bne\bew\bwl\bli\bin\bne\be (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, readline will undo all changes to history lines
+ If set to O\bOn\bn, readline will undo all changes to history lines
before returning when a\bac\bcc\bce\bep\bpt\bt-\b-l\bli\bin\bne\be is executed. By default, his-
- tory lines may be modified and retain individual undo lists
+ tory lines may be modified and retain individual undo lists
across calls to r\bre\bea\bad\bdl\bli\bin\bne\be.
s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-a\bam\bmb\bbi\big\bgu\buo\bou\bus\bs (\b(O\bOf\bff\bf)\b)
- This alters the default behavior of the completion functions.
+ This alters the default behavior of the completion functions.
If set to O\bOn\bn, words which have more than one possible completion
- cause the matches to be listed immediately instead of ringing
+ cause the matches to be listed immediately instead of ringing
the bell.
s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-u\bun\bnm\bmo\bod\bdi\bif\bfi\bie\bed\bd (\b(O\bOf\bff\bf)\b)
- This alters the default behavior of the completion functions in
+ This alters the default behavior of the completion functions in
a fashion similar to s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-a\bam\bmb\bbi\big\bgu\buo\bou\bus\bs. If set to O\bOn\bn, words
- which have more than one possible completion without any possi-
- ble partial completion (the possible completions don't share a
- common prefix) cause the matches to be listed immediately
+ which have more than one possible completion without any possi-
+ ble partial completion (the possible completions don't share a
+ common prefix) cause the matches to be listed immediately
instead of ringing the bell.
s\bsh\bho\bow\bw-\b-m\bmo\bod\bde\be-\b-i\bin\bn-\b-p\bpr\bro\bom\bmp\bpt\bt (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, add a character to the beginning of the prompt
- indicating the editing mode: emacs (@), vi command (:) or vi
+ If set to O\bOn\bn, add a character to the beginning of the prompt
+ indicating the editing mode: emacs (@), vi command (:) or vi
insertion (+).
s\bsk\bki\bip\bp-\b-c\bco\bom\bmp\bpl\ble\bet\bte\bed\bd-\b-t\bte\bex\bxt\bt (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, this alters the default completion behavior when
- inserting a single match into the line. It's only active when
- performing completion in the middle of a word. If enabled,
- readline does not insert characters from the completion that
- match characters after point in the word being completed, so
+ If set to O\bOn\bn, this alters the default completion behavior when
+ inserting a single match into the line. It's only active when
+ performing completion in the middle of a word. If enabled,
+ readline does not insert characters from the completion that
+ match characters after point in the word being completed, so
portions of the word following the cursor are not duplicated.
v\bvi\bis\bsi\bib\bbl\ble\be-\b-s\bst\bta\bat\bts\bs (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, a character denoting a file's type as reported by
- _\bs_\bt_\ba_\bt(2) is appended to the filename when listing possible com-
+ If set to O\bOn\bn, a character denoting a file's type as reported by
+ _\bs_\bt_\ba_\bt(2) is appended to the filename when listing possible com-
pletions.
R\bRe\bea\bad\bdl\bli\bin\bne\be C\bCo\bon\bnd\bdi\bit\bti\bio\bon\bna\bal\bl C\bCo\bon\bns\bst\btr\bru\buc\bct\bts\bs
- Readline implements a facility similar in spirit to the conditional
- compilation features of the C preprocessor which allows key bindings
- and variable settings to be performed as the result of tests. There
+ Readline implements a facility similar in spirit to the conditional
+ compilation features of the C preprocessor which allows key bindings
+ and variable settings to be performed as the result of tests. There
are four parser directives used.
- $\b$i\bif\bf The $\b$i\bif\bf construct allows bindings to be made based on the edit-
- ing mode, the terminal being used, or the application using
- readline. The text of the test extends to the end of the line;
+ $\b$i\bif\bf The $\b$i\bif\bf construct allows bindings to be made based on the edit-
+ ing mode, the terminal being used, or the application using
+ readline. The text of the test extends to the end of the line;
no characters are required to isolate it.
- m\bmo\bod\bde\be The m\bmo\bod\bde\be=\b= form of the $\b$i\bif\bf directive is used to test
- whether readline is in emacs or vi mode. This may be
- used in conjunction with the s\bse\bet\bt k\bke\bey\bym\bma\bap\bp command, for
- instance, to set bindings in the _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd and
- _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx keymaps only if readline is starting out in
+ m\bmo\bod\bde\be The m\bmo\bod\bde\be=\b= form of the $\b$i\bif\bf directive is used to test
+ whether readline is in emacs or vi mode. This may be
+ used in conjunction with the s\bse\bet\bt k\bke\bey\bym\bma\bap\bp command, for
+ instance, to set bindings in the _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd and
+ _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx keymaps only if readline is starting out in
emacs mode.
- t\bte\ber\brm\bm The t\bte\ber\brm\bm=\b= form may be used to include terminal-specific
+ t\bte\ber\brm\bm The t\bte\ber\brm\bm=\b= form may be used to include terminal-specific
key bindings, perhaps to bind the key sequences output by
the terminal's function keys. The word on the right side
of the =\b= is tested against the both full name of the ter-
- minal and the portion of the terminal name before the
- first -\b-. This allows _\bs_\bu_\bn to match both _\bs_\bu_\bn and _\bs_\bu_\bn_\b-_\bc_\bm_\bd,
+ minal and the portion of the terminal name before the
+ first -\b-. This allows _\bs_\bu_\bn to match both _\bs_\bu_\bn and _\bs_\bu_\bn_\b-_\bc_\bm_\bd,
for instance.
a\bap\bpp\bpl\bli\bic\bca\bat\bti\bio\bon\bn
The a\bap\bpp\bpl\bli\bic\bca\bat\bti\bio\bon\bn construct is used to include application-
specific settings. Each program using the readline
- library sets the _\ba_\bp_\bp_\bl_\bi_\bc_\ba_\bt_\bi_\bo_\bn _\bn_\ba_\bm_\be, and an initialization
+ library sets the _\ba_\bp_\bp_\bl_\bi_\bc_\ba_\bt_\bi_\bo_\bn _\bn_\ba_\bm_\be, and an initialization
file can test for a particular value. This could be used
- to bind key sequences to functions useful for a specific
- program. For instance, the following command adds a key
- sequence that quotes the current or previous word in
+ to bind key sequences to functions useful for a specific
+ program. For instance, the following command adds a key
+ sequence that quotes the current or previous word in
b\bba\bas\bsh\bh:
$\b$i\bif\bf Bash
test fails.
$\b$i\bin\bnc\bcl\blu\bud\bde\be
- This directive takes a single filename as an argument and reads
- commands and bindings from that file. For example, the follow-
+ This directive takes a single filename as an argument and reads
+ commands and bindings from that file. For example, the follow-
ing directive would read _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc:
$\b$i\bin\bnc\bcl\blu\bud\bde\be _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc
S\bSe\bea\bar\brc\bch\bhi\bin\bng\bg
- Readline provides commands for searching through the command history
+ Readline provides commands for searching through the command history
(see H\bHI\bIS\bST\bTO\bOR\bRY\bY below) for lines containing a specified string. There are
two search modes: _\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt_\ba_\bl and _\bn_\bo_\bn_\b-_\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt_\ba_\bl.
- Incremental searches begin before the user has finished typing the
- search string. As each character of the search string is typed, read-
+ Incremental searches begin before the user has finished typing the
+ search string. As each character of the search string is typed, read-
line displays the next entry from the history matching the string typed
- so far. An incremental search requires only as many characters as
- needed to find the desired history entry. The characters present in
- the value of the i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs variable are used to terminate an
+ so far. An incremental search requires only as many characters as
+ needed to find the desired history entry. The characters present in
+ the value of the i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs variable are used to terminate an
incremental search. If that variable has not been assigned a value the
- Escape and Control-J characters will terminate an incremental search.
- Control-G will abort an incremental search and restore the original
- line. When the search is terminated, the history entry containing the
+ Escape and Control-J characters will terminate an incremental search.
+ Control-G will abort an incremental search and restore the original
+ line. When the search is terminated, the history entry containing the
search string becomes the current line.
- To find other matching entries in the history list, type Control-S or
- Control-R as appropriate. This will search backward or forward in the
- history for the next entry matching the search string typed so far.
- Any other key sequence bound to a readline command will terminate the
- search and execute that command. For instance, a _\bn_\be_\bw_\bl_\bi_\bn_\be will termi-
+ To find other matching entries in the history list, type Control-S or
+ Control-R as appropriate. This will search backward or forward in the
+ history for the next entry matching the search string typed so far.
+ Any other key sequence bound to a readline command will terminate the
+ search and execute that command. For instance, a _\bn_\be_\bw_\bl_\bi_\bn_\be will termi-
nate the search and accept the line, thereby executing the command from
the history list.
Readline remembers the last incremental search string. If two Control-
- Rs are typed without any intervening characters defining a new search
+ Rs are typed without any intervening characters defining a new search
string, any remembered search string is used.
- Non-incremental searches read the entire search string before starting
- to search for matching history lines. The search string may be typed
+ Non-incremental searches read the entire search string before starting
+ to search for matching history lines. The search string may be typed
by the user or be part of the contents of the current line.
R\bRe\bea\bad\bdl\bli\bin\bne\be C\bCo\bom\bmm\bma\ban\bnd\bd N\bNa\bam\bme\bes\bs
- The following is a list of the names of the commands and the default
+ The following is a list of the names of the commands and the default
key sequences to which they are bound. Command names without an accom-
panying key sequence are unbound by default. In the following descrip-
- tions, _\bp_\bo_\bi_\bn_\bt refers to the current cursor position, and _\bm_\ba_\br_\bk refers to
- a cursor position saved by the s\bse\bet\bt-\b-m\bma\bar\brk\bk command. The text between the
+ tions, _\bp_\bo_\bi_\bn_\bt refers to the current cursor position, and _\bm_\ba_\br_\bk refers to
+ a cursor position saved by the s\bse\bet\bt-\b-m\bma\bar\brk\bk command. The text between the
point and mark is referred to as the _\br_\be_\bg_\bi_\bo_\bn.
C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br M\bMo\bov\bvi\bin\bng\bg
Move forward to the end of the next word. Words are composed of
alphanumeric characters (letters and digits).
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-b\bb)\b)
- Move back to the start of the current or previous word. Words
+ Move back to the start of the current or previous word. Words
are composed of alphanumeric characters (letters and digits).
s\bsh\bhe\bel\bll\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
- Move forward to the end of the next word. Words are delimited
+ Move forward to the end of the next word. Words are delimited
by non-quoted shell metacharacters.
s\bsh\bhe\bel\bll\bl-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
- Move back to the start of the current or previous word. Words
+ Move back to the start of the current or previous word. Words
are delimited by non-quoted shell metacharacters.
c\bcl\ble\bea\bar\br-\b-s\bsc\bcr\bre\bee\ben\bn (\b(C\bC-\b-l\bl)\b)
- Clear the screen leaving the current line at the top of the
- screen. With an argument, refresh the current line without
+ Clear the screen leaving the current line at the top of the
+ screen. With an argument, refresh the current line without
clearing the screen.
r\bre\bed\bdr\bra\baw\bw-\b-c\bcu\bur\brr\bre\ben\bnt\bt-\b-l\bli\bin\bne\be
Refresh the current line.
C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br M\bMa\ban\bni\bip\bpu\bul\bla\bat\bti\bin\bng\bg t\bth\bhe\be H\bHi\bis\bst\bto\bor\bry\by
a\bac\bcc\bce\bep\bpt\bt-\b-l\bli\bin\bne\be (\b(N\bNe\bew\bwl\bli\bin\bne\be,\b, R\bRe\bet\btu\bur\brn\bn)\b)
Accept the line regardless of where the cursor is. If this line
- is non-empty, add it to the history list according to the state
- of the H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL variable. If the line is a modified history
+ is non-empty, add it to the history list according to the state
+ of the H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL variable. If the line is a modified history
line, then restore the history line to its original state.
p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-p\bp)\b)
Fetch the previous command from the history list, moving back in
the list.
n\bne\bex\bxt\bt-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-n\bn)\b)
- Fetch the next command from the history list, moving forward in
+ Fetch the next command from the history list, moving forward in
the list.
b\bbe\beg\bgi\bin\bnn\bni\bin\bng\bg-\b-o\bof\bf-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-<\b<)\b)
Move to the first line in the history.
e\ben\bnd\bd-\b-o\bof\bf-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b->\b>)\b)
- Move to the end of the input history, i.e., the line currently
+ Move to the end of the input history, i.e., the line currently
being entered.
r\bre\bev\bve\ber\brs\bse\be-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-r\br)\b)
- Search backward starting at the current line and moving `up'
- through the history as necessary. This is an incremental
+ Search backward starting at the current line and moving `up'
+ through the history as necessary. This is an incremental
search.
f\bfo\bor\brw\bwa\bar\brd\bd-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-s\bs)\b)
- Search forward starting at the current line and moving `down'
- through the history as necessary. This is an incremental
+ Search forward starting at the current line and moving `down'
+ through the history as necessary. This is an incremental
search.
n\bno\bon\bn-\b-i\bin\bnc\bcr\bre\bem\bme\ben\bnt\bta\bal\bl-\b-r\bre\bev\bve\ber\brs\bse\be-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-p\bp)\b)
Search backward through the history starting at the current line
- using a non-incremental search for a string supplied by the
+ using a non-incremental search for a string supplied by the
user.
n\bno\bon\bn-\b-i\bin\bnc\bcr\bre\bem\bme\ben\bnt\bta\bal\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-n\bn)\b)
- Search forward through the history using a non-incremental
+ Search forward through the history using a non-incremental
search for a string supplied by the user.
h\bhi\bis\bst\bto\bor\bry\by-\b-s\bse\bea\bar\brc\bch\bh-\b-f\bfo\bor\brw\bwa\bar\brd\bd
- Search forward through the history for the string of characters
- between the start of the current line and the point. This is a
+ Search forward through the history for the string of characters
+ between the start of the current line and the point. This is a
non-incremental search.
h\bhi\bis\bst\bto\bor\bry\by-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd
Search backward through the history for the string of characters
- between the start of the current line and the point. This is a
+ between the start of the current line and the point. This is a
non-incremental search.
y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg (\b(M\bM-\b-C\bC-\b-y\by)\b)
- Insert the first argument to the previous command (usually the
+ Insert the first argument to the previous command (usually the
second word on the previous line) at point. With an argument _\bn,
- insert the _\bnth word from the previous command (the words in the
- previous command begin with word 0). A negative argument
+ insert the _\bnth word from the previous command (the words in the
+ previous command begin with word 0). A negative argument
inserts the _\bnth word from the end of the previous command. Once
- the argument _\bn is computed, the argument is extracted as if the
+ the argument _\bn is computed, the argument is extracted as if the
"!_\bn" history expansion had been specified.
y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg (\b(M\bM-\b-.\b.,\b, M\bM-\b-_\b_)\b)
- Insert the last argument to the previous command (the last word
+ Insert the last argument to the previous command (the last word
of the previous history entry). With a numeric argument, behave
- exactly like y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg. Successive calls to y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg
- move back through the history list, inserting the last word (or
- the word specified by the argument to the first call) of each
+ exactly like y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg. Successive calls to y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg
+ move back through the history list, inserting the last word (or
+ the word specified by the argument to the first call) of each
line in turn. Any numeric argument supplied to these successive
- calls determines the direction to move through the history. A
- negative argument switches the direction through the history
+ calls determines the direction to move through the history. A
+ negative argument switches the direction through the history
(back or forward). The history expansion facilities are used to
extract the last word, as if the "!$" history expansion had been
specified.
s\bsh\bhe\bel\bll\bl-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be (\b(M\bM-\b-C\bC-\b-e\be)\b)
Expand the line as the shell does. This performs alias and his-
tory expansion as well as all of the shell word expansions. See
- H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below for a description of history expansion.
+ H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below for a description of history expansion.
h\bhi\bis\bst\bto\bor\bry\by-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be (\b(M\bM-\b-^\b^)\b)
- Perform history expansion on the current line. See H\bHI\bIS\bST\bTO\bOR\bRY\bY
+ Perform history expansion on the current line. See H\bHI\bIS\bST\bTO\bOR\bRY\bY
E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below for a description of history expansion.
m\bma\bag\bgi\bic\bc-\b-s\bsp\bpa\bac\bce\be
- Perform history expansion on the current line and insert a
+ Perform history expansion on the current line and insert a
space. See H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below for a description of history
expansion.
a\bal\bli\bia\bas\bs-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be
- Perform alias expansion on the current line. See A\bAL\bLI\bIA\bAS\bSE\bES\bS above
+ Perform alias expansion on the current line. See A\bAL\bLI\bIA\bAS\bSE\bES\bS above
for a description of alias expansion.
h\bhi\bis\bst\bto\bor\bry\by-\b-a\ban\bnd\bd-\b-a\bal\bli\bia\bas\bs-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be
Perform history and alias expansion on the current line.
i\bin\bns\bse\ber\brt\bt-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt (\b(M\bM-\b-.\b.,\b, M\bM-\b-_\b_)\b)
A synonym for y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg.
o\bop\bpe\ber\bra\bat\bte\be-\b-a\ban\bnd\bd-\b-g\bge\bet\bt-\b-n\bne\bex\bxt\bt (\b(C\bC-\b-o\bo)\b)
- Accept the current line for execution and fetch the next line
- relative to the current line from the history for editing. Any
+ Accept the current line for execution and fetch the next line
+ relative to the current line from the history for editing. Any
argument is ignored.
e\bed\bdi\bit\bt-\b-a\ban\bnd\bd-\b-e\bex\bxe\bec\bcu\but\bte\be-\b-c\bco\bom\bmm\bma\ban\bnd\bd (\b(C\bC-\b-x\bxC\bC-\b-e\be)\b)
- Invoke an editor on the current command line, and execute the
- result as shell commands. B\bBa\bas\bsh\bh attempts to invoke $\b$V\bVI\bIS\bSU\bUA\bAL\bL,
+ Invoke an editor on the current command line, and execute the
+ result as shell commands. B\bBa\bas\bsh\bh attempts to invoke $\b$V\bVI\bIS\bSU\bUA\bAL\bL,
$\b$E\bED\bDI\bIT\bTO\bOR\bR, and _\be_\bm_\ba_\bc_\bs as the editor, in that order.
C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br C\bCh\bha\ban\bng\bgi\bin\bng\bg T\bTe\bex\bxt\bt
d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br (\b(C\bC-\b-d\bd)\b)
- Delete the character at point. If point is at the beginning of
- the line, there are no characters in the line, and the last
+ Delete the character at point. If point is at the beginning of
+ the line, there are no characters in the line, and the last
character typed was not bound to d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br, then return E\bEO\bOF\bF.
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br (\b(R\bRu\bub\bbo\bou\but\bt)\b)
- Delete the character behind the cursor. When given a numeric
+ Delete the character behind the cursor. When given a numeric
argument, save the deleted text on the kill ring.
f\bfo\bor\brw\bwa\bar\brd\bd-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br
- Delete the character under the cursor, unless the cursor is at
+ Delete the character under the cursor, unless the cursor is at
the end of the line, in which case the character behind the cur-
sor is deleted.
q\bqu\buo\bot\bte\bed\bd-\b-i\bin\bns\bse\ber\brt\bt (\b(C\bC-\b-q\bq,\b, C\bC-\b-v\bv)\b)
- Add the next character typed to the line verbatim. This is how
+ Add the next character typed to the line verbatim. This is how
to insert characters like C\bC-\b-q\bq, for example.
t\bta\bab\bb-\b-i\bin\bns\bse\ber\brt\bt (\b(C\bC-\b-v\bv T\bTA\bAB\bB)\b)
Insert a tab character.
s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt (\b(a\ba,\b, b\bb,\b, A\bA,\b, 1\b1,\b, !\b!,\b, .\b..\b..\b.)\b)
Insert the character typed.
t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-c\bch\bha\bar\brs\bs (\b(C\bC-\b-t\bt)\b)
- Drag the character before point forward over the character at
- point, moving point forward as well. If point is at the end of
- the line, then this transposes the two characters before point.
+ Drag the character before point forward over the character at
+ point, moving point forward as well. If point is at the end of
+ the line, then this transposes the two characters before point.
Negative arguments have no effect.
t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-w\bwo\bor\brd\bds\bs (\b(M\bM-\b-t\bt)\b)
- Drag the word before point past the word after point, moving
- point over that word as well. If point is at the end of the
+ Drag the word before point past the word after point, moving
+ point over that word as well. If point is at the end of the
line, this transposes the last two words on the line.
u\bup\bpc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-u\bu)\b)
- Uppercase the current (or following) word. With a negative
+ Uppercase the current (or following) word. With a negative
argument, uppercase the previous word, but do not move point.
d\bdo\bow\bwn\bnc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-l\bl)\b)
- Lowercase the current (or following) word. With a negative
+ Lowercase the current (or following) word. With a negative
argument, lowercase the previous word, but do not move point.
c\bca\bap\bpi\bit\bta\bal\bli\biz\bze\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-c\bc)\b)
- Capitalize the current (or following) word. With a negative
+ Capitalize the current (or following) word. With a negative
argument, capitalize the previous word, but do not move point.
o\bov\bve\ber\brw\bwr\bri\bit\bte\be-\b-m\bmo\bod\bde\be
- Toggle overwrite mode. With an explicit positive numeric argu-
+ Toggle overwrite mode. With an explicit positive numeric argu-
ment, switches to overwrite mode. With an explicit non-positive
numeric argument, switches to insert mode. This command affects
- only e\bem\bma\bac\bcs\bs mode; v\bvi\bi mode does overwrite differently. Each call
+ only e\bem\bma\bac\bcs\bs mode; v\bvi\bi mode does overwrite differently. Each call
to _\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b(_\b) starts in insert mode. In overwrite mode, charac-
- ters bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt replace the text at point rather than
- pushing the text to the right. Characters bound to b\bba\bac\bck\bk-\b-
- w\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br replace the character before point with a
+ ters bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt replace the text at point rather than
+ pushing the text to the right. Characters bound to b\bba\bac\bck\bk-\b-
+ w\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br replace the character before point with a
space. By default, this command is unbound.
K\bKi\bil\bll\bli\bin\bng\bg a\ban\bnd\bd Y\bYa\ban\bnk\bki\bin\bng\bg
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-l\bli\bin\bne\be (\b(C\bC-\b-x\bx R\bRu\bub\bbo\bou\but\bt)\b)
Kill backward to the beginning of the line.
u\bun\bni\bix\bx-\b-l\bli\bin\bne\be-\b-d\bdi\bis\bsc\bca\bar\brd\bd (\b(C\bC-\b-u\bu)\b)
- Kill backward from point to the beginning of the line. The
+ Kill backward from point to the beginning of the line. The
killed text is saved on the kill-ring.
k\bki\bil\bll\bl-\b-w\bwh\bho\bol\ble\be-\b-l\bli\bin\bne\be
- Kill all characters on the current line, no matter where point
+ Kill all characters on the current line, no matter where point
is.
k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-d\bd)\b)
- Kill from point to the end of the current word, or if between
- words, to the end of the next word. Word boundaries are the
+ Kill from point to the end of the current word, or if between
+ words, to the end of the next word. Word boundaries are the
same as those used by f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-R\bRu\bub\bbo\bou\but\bt)\b)
- Kill the word behind point. Word boundaries are the same as
+ Kill the word behind point. Word boundaries are the same as
those used by b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
s\bsh\bhe\bel\bll\bl-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-d\bd)\b)
- Kill from point to the end of the current word, or if between
- words, to the end of the next word. Word boundaries are the
+ Kill from point to the end of the current word, or if between
+ words, to the end of the next word. Word boundaries are the
same as those used by s\bsh\bhe\bel\bll\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
s\bsh\bhe\bel\bll\bl-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-R\bRu\bub\bbo\bou\but\bt)\b)
- Kill the word behind point. Word boundaries are the same as
+ Kill the word behind point. Word boundaries are the same as
those used by s\bsh\bhe\bel\bll\bl-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
u\bun\bni\bix\bx-\b-w\bwo\bor\brd\bd-\b-r\bru\bub\bbo\bou\but\bt (\b(C\bC-\b-w\bw)\b)
- Kill the word behind point, using white space as a word bound-
+ Kill the word behind point, using white space as a word bound-
ary. The killed text is saved on the kill-ring.
u\bun\bni\bix\bx-\b-f\bfi\bil\ble\ben\bna\bam\bme\be-\b-r\bru\bub\bbo\bou\but\bt
- Kill the word behind point, using white space and the slash
- character as the word boundaries. The killed text is saved on
+ Kill the word behind point, using white space and the slash
+ character as the word boundaries. The killed text is saved on
the kill-ring.
d\bde\bel\ble\bet\bte\be-\b-h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bl-\b-s\bsp\bpa\bac\bce\be (\b(M\bM-\b-\\b\)\b)
Delete all spaces and tabs around point.
c\bco\bop\bpy\by-\b-r\bre\beg\bgi\bio\bon\bn-\b-a\bas\bs-\b-k\bki\bil\bll\bl
Copy the text in the region to the kill buffer.
c\bco\bop\bpy\by-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
- Copy the word before point to the kill buffer. The word bound-
+ Copy the word before point to the kill buffer. The word bound-
aries are the same as b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
c\bco\bop\bpy\by-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
- Copy the word following point to the kill buffer. The word
+ Copy the word following point to the kill buffer. The word
boundaries are the same as f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
y\bya\ban\bnk\bk (\b(C\bC-\b-y\by)\b)
Yank the top of the kill ring into the buffer at point.
y\bya\ban\bnk\bk-\b-p\bpo\bop\bp (\b(M\bM-\b-y\by)\b)
- Rotate the kill ring, and yank the new top. Only works follow-
+ Rotate the kill ring, and yank the new top. Only works follow-
ing y\bya\ban\bnk\bk or y\bya\ban\bnk\bk-\b-p\bpo\bop\bp.
N\bNu\bum\bme\ber\bri\bic\bc A\bAr\brg\bgu\bum\bme\ben\bnt\bts\bs
d\bdi\big\bgi\bit\bt-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt (\b(M\bM-\b-0\b0,\b, M\bM-\b-1\b1,\b, .\b..\b..\b.,\b, M\bM-\b--\b-)\b)
- Add this digit to the argument already accumulating, or start a
+ Add this digit to the argument already accumulating, or start a
new argument. M-- starts a negative argument.
u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt
- This is another way to specify an argument. If this command is
- followed by one or more digits, optionally with a leading minus
- sign, those digits define the argument. If the command is fol-
- lowed by digits, executing u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt again ends the
- numeric argument, but is otherwise ignored. As a special case,
- if this command is immediately followed by a character that is
- neither a digit or minus sign, the argument count for the next
- command is multiplied by four. The argument count is initially
- one, so executing this function the first time makes the argu-
+ This is another way to specify an argument. If this command is
+ followed by one or more digits, optionally with a leading minus
+ sign, those digits define the argument. If the command is fol-
+ lowed by digits, executing u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt again ends the
+ numeric argument, but is otherwise ignored. As a special case,
+ if this command is immediately followed by a character that is
+ neither a digit or minus sign, the argument count for the next
+ command is multiplied by four. The argument count is initially
+ one, so executing this function the first time makes the argu-
ment count four, a second time makes the argument count sixteen,
and so on.
C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg
c\bco\bom\bmp\bpl\ble\bet\bte\be (\b(T\bTA\bAB\bB)\b)
- Attempt to perform completion on the text before point. B\bBa\bas\bsh\bh
+ Attempt to perform completion on the text before point. B\bBa\bas\bsh\bh
attempts completion treating the text as a variable (if the text
- begins with $\b$), username (if the text begins with ~\b~), hostname
- (if the text begins with @\b@), or command (including aliases and
+ begins with $\b$), username (if the text begins with ~\b~), hostname
+ (if the text begins with @\b@), or command (including aliases and
functions) in turn. If none of these produces a match, filename
completion is attempted.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(M\bM-\b-?\b?)\b)
List the possible completions of the text before point.
i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(M\bM-\b-*\b*)\b)
- Insert all completions of the text before point that would have
+ Insert all completions of the text before point that would have
been generated by p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs.
m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be
- Similar to c\bco\bom\bmp\bpl\ble\bet\bte\be, but replaces the word to be completed with
- a single match from the list of possible completions. Repeated
- execution of m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be steps through the list of possible
- completions, inserting each match in turn. At the end of the
+ Similar to c\bco\bom\bmp\bpl\ble\bet\bte\be, but replaces the word to be completed with
+ a single match from the list of possible completions. Repeated
+ execution of m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be steps through the list of possible
+ completions, inserting each match in turn. At the end of the
list of completions, the bell is rung (subject to the setting of
b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be) and the original text is restored. An argument of _\bn
- moves _\bn positions forward in the list of matches; a negative
- argument may be used to move backward through the list. This
- command is intended to be bound to T\bTA\bAB\bB, but is unbound by
+ moves _\bn positions forward in the list of matches; a negative
+ argument may be used to move backward through the list. This
+ command is intended to be bound to T\bTA\bAB\bB, but is unbound by
default.
m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd
- Identical to m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be, but moves backward through the list
- of possible completions, as if m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be had been given a
+ Identical to m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be, but moves backward through the list
+ of possible completions, as if m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be had been given a
negative argument. This command is unbound by default.
d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br-\b-o\bor\br-\b-l\bli\bis\bst\bt
- Deletes the character under the cursor if not at the beginning
- or end of the line (like d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br). If at the end of the
+ Deletes the character under the cursor if not at the beginning
+ or end of the line (like d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br). If at the end of the
line, behaves identically to p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs. This command
is unbound by default.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-f\bfi\bil\ble\ben\bna\bam\bme\be (\b(M\bM-\b-/\b/)\b)
List the possible completions of the text before point, treating
it as a filename.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-u\bus\bse\ber\brn\bna\bam\bme\be (\b(M\bM-\b-~\b~)\b)
- Attempt completion on the text before point, treating it as a
+ Attempt completion on the text before point, treating it as a
username.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-u\bus\bse\ber\brn\bna\bam\bme\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx ~\b~)\b)
List the possible completions of the text before point, treating
it as a username.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-v\bva\bar\bri\bia\bab\bbl\ble\be (\b(M\bM-\b-$\b$)\b)
- Attempt completion on the text before point, treating it as a
+ Attempt completion on the text before point, treating it as a
shell variable.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-v\bva\bar\bri\bia\bab\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx $\b$)\b)
List the possible completions of the text before point, treating
it as a shell variable.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-h\bho\bos\bst\btn\bna\bam\bme\be (\b(M\bM-\b-@\b@)\b)
- Attempt completion on the text before point, treating it as a
+ Attempt completion on the text before point, treating it as a
hostname.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-h\bho\bos\bst\btn\bna\bam\bme\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx @\b@)\b)
List the possible completions of the text before point, treating
it as a hostname.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-c\bco\bom\bmm\bma\ban\bnd\bd (\b(M\bM-\b-!\b!)\b)
- Attempt completion on the text before point, treating it as a
- command name. Command completion attempts to match the text
- against aliases, reserved words, shell functions, shell
+ Attempt completion on the text before point, treating it as a
+ command name. Command completion attempts to match the text
+ against aliases, reserved words, shell functions, shell
builtins, and finally executable filenames, in that order.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmm\bma\ban\bnd\bd-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx !\b!)\b)
List the possible completions of the text before point, treating
it as a command name.
d\bdy\byn\bna\bam\bmi\bic\bc-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-T\bTA\bAB\bB)\b)
- Attempt completion on the text before point, comparing the text
- against lines from the history list for possible completion
+ Attempt completion on the text before point, comparing the text
+ against lines from the history list for possible completion
matches.
d\bda\bab\bbb\bbr\bre\bev\bv-\b-e\bex\bxp\bpa\ban\bnd\bd
- Attempt menu completion on the text before point, comparing the
+ Attempt menu completion on the text before point, comparing the
text against lines from the history list for possible completion
matches.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-i\bin\bnt\bto\bo-\b-b\bbr\bra\bac\bce\bes\bs (\b(M\bM-\b-{\b{)\b)
Perform filename completion and insert the list of possible com-
- pletions enclosed within braces so the list is available to the
+ pletions enclosed within braces so the list is available to the
shell (see B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn above).
K\bKe\bey\byb\bbo\boa\bar\brd\bd M\bMa\bac\bcr\bro\bos\bs
s\bst\bta\bar\brt\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx (\b()\b)
- Begin saving the characters typed into the current keyboard
+ Begin saving the characters typed into the current keyboard
macro.
e\ben\bnd\bd-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx )\b))\b)
Stop saving the characters typed into the current keyboard macro
and store the definition.
c\bca\bal\bll\bl-\b-l\bla\bas\bst\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx e\be)\b)
- Re-execute the last keyboard macro defined, by making the char-
- acters in the macro appear as if typed at the keyboard.
+ Re-execute the last keyboard macro defined, by making the char-
+ acters in the macro appear as if typed at the keyboard.
p\bpr\bri\bin\bnt\bt-\b-l\bla\bas\bst\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b()\b) Print the last keyboard macro defined in
a format suitable for the _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
M\bMi\bis\bsc\bce\bel\bll\bla\ban\bne\beo\bou\bus\bs
r\bre\be-\b-r\bre\bea\bad\bd-\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be (\b(C\bC-\b-x\bx C\bC-\b-r\br)\b)
- Read in the contents of the _\bi_\bn_\bp_\bu_\bt_\br_\bc file, and incorporate any
+ Read in the contents of the _\bi_\bn_\bp_\bu_\bt_\br_\bc file, and incorporate any
bindings or variable assignments found there.
a\bab\bbo\bor\brt\bt (\b(C\bC-\b-g\bg)\b)
- Abort the current editing command and ring the terminal's bell
+ Abort the current editing command and ring the terminal's bell
(subject to the setting of b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be).
d\bdo\bo-\b-u\bup\bpp\bpe\ber\brc\bca\bas\bse\be-\b-v\bve\ber\brs\bsi\bio\bon\bn (\b(M\bM-\b-a\ba,\b, M\bM-\b-b\bb,\b, M\bM-\b-_\bx,\b, .\b..\b..\b.)\b)
- If the metafied character _\bx is lowercase, run the command that
+ If the metafied character _\bx is lowercase, run the command that
is bound to the corresponding uppercase character.
p\bpr\bre\bef\bfi\bix\bx-\b-m\bme\bet\bta\ba (\b(E\bES\bSC\bC)\b)
Metafy the next character typed. E\bES\bSC\bC f\bf is equivalent to M\bMe\bet\bta\ba-\b-f\bf.
u\bun\bnd\bdo\bo (\b(C\bC-\b-_\b_,\b, C\bC-\b-x\bx C\bC-\b-u\bu)\b)
Incremental undo, separately remembered for each line.
r\bre\bev\bve\ber\brt\bt-\b-l\bli\bin\bne\be (\b(M\bM-\b-r\br)\b)
- Undo all changes made to this line. This is like executing the
- u\bun\bnd\bdo\bo command enough times to return the line to its initial
+ Undo all changes made to this line. This is like executing the
+ u\bun\bnd\bdo\bo command enough times to return the line to its initial
state.
t\bti\bil\bld\bde\be-\b-e\bex\bxp\bpa\ban\bnd\bd (\b(M\bM-\b-&\b&)\b)
Perform tilde expansion on the current word.
s\bse\bet\bt-\b-m\bma\bar\brk\bk (\b(C\bC-\b-@\b@,\b, M\bM-\b-<\b<s\bsp\bpa\bac\bce\be>\b>)\b)
- Set the mark to the point. If a numeric argument is supplied,
+ Set the mark to the point. If a numeric argument is supplied,
the mark is set to that position.
e\bex\bxc\bch\bha\ban\bng\bge\be-\b-p\bpo\boi\bin\bnt\bt-\b-a\ban\bnd\bd-\b-m\bma\bar\brk\bk (\b(C\bC-\b-x\bx C\bC-\b-x\bx)\b)
- Swap the point with the mark. The current cursor position is
- set to the saved position, and the old cursor position is saved
+ Swap the point with the mark. The current cursor position is
+ set to the saved position, and the old cursor position is saved
as the mark.
c\bch\bha\bar\bra\bac\bct\bte\ber\br-\b-s\bse\bea\bar\brc\bch\bh (\b(C\bC-\b-]\b])\b)
A character is read and point is moved to the next occurrence of
- that character. A negative count searches for previous occur-
+ that character. A negative count searches for previous occur-
rences.
c\bch\bha\bar\bra\bac\bct\bte\ber\br-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd (\b(M\bM-\b-C\bC-\b-]\b])\b)
- A character is read and point is moved to the previous occur-
- rence of that character. A negative count searches for subse-
+ A character is read and point is moved to the previous occur-
+ rence of that character. A negative count searches for subse-
quent occurrences.
s\bsk\bki\bip\bp-\b-c\bcs\bsi\bi-\b-s\bse\beq\bqu\bue\ben\bnc\bce\be
- Read enough characters to consume a multi-key sequence such as
- those defined for keys like Home and End. Such sequences begin
+ Read enough characters to consume a multi-key sequence such as
+ those defined for keys like Home and End. Such sequences begin
with a Control Sequence Indicator (CSI), usually ESC-[. If this
- sequence is bound to "\[", keys producing such sequences will
- have no effect unless explicitly bound to a readline command,
- instead of inserting stray characters into the editing buffer.
+ sequence is bound to "\[", keys producing such sequences will
+ have no effect unless explicitly bound to a readline command,
+ instead of inserting stray characters into the editing buffer.
This is unbound by default, but usually bound to ESC-[.
i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt (\b(M\bM-\b-#\b#)\b)
- Without a numeric argument, the value of the readline c\bco\bom\bm-\b-
- m\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn variable is inserted at the beginning of the current
+ Without a numeric argument, the value of the readline c\bco\bom\bm-\b-
+ m\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn variable is inserted at the beginning of the current
line. If a numeric argument is supplied, this command acts as a
- toggle: if the characters at the beginning of the line do not
- match the value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn, the value is inserted, other-
+ toggle: if the characters at the beginning of the line do not
+ match the value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn, the value is inserted, other-
wise the characters in c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn are deleted from the begin-
- ning of the line. In either case, the line is accepted as if a
- newline had been typed. The default value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn
- causes this command to make the current line a shell comment.
- If a numeric argument causes the comment character to be
+ ning of the line. In either case, the line is accepted as if a
+ newline had been typed. The default value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn
+ causes this command to make the current line a shell comment.
+ If a numeric argument causes the comment character to be
removed, the line will be executed by the shell.
g\bgl\blo\bob\bb-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-g\bg)\b)
- The word before point is treated as a pattern for pathname
- expansion, with an asterisk implicitly appended. This pattern
- is used to generate a list of matching filenames for possible
+ The word before point is treated as a pattern for pathname
+ expansion, with an asterisk implicitly appended. This pattern
+ is used to generate a list of matching filenames for possible
completions.
g\bgl\blo\bob\bb-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-w\bwo\bor\brd\bd (\b(C\bC-\b-x\bx *\b*)\b)
- The word before point is treated as a pattern for pathname
- expansion, and the list of matching filenames is inserted,
- replacing the word. If a numeric argument is supplied, an
+ The word before point is treated as a pattern for pathname
+ expansion, and the list of matching filenames is inserted,
+ replacing the word. If a numeric argument is supplied, an
asterisk is appended before pathname expansion.
g\bgl\blo\bob\bb-\b-l\bli\bis\bst\bt-\b-e\bex\bxp\bpa\ban\bns\bsi\bio\bon\bns\bs (\b(C\bC-\b-x\bx g\bg)\b)
- The list of expansions that would have been generated by
- g\bgl\blo\bob\bb-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-w\bwo\bor\brd\bd is displayed, and the line is redrawn. If a
- numeric argument is supplied, an asterisk is appended before
+ The list of expansions that would have been generated by
+ g\bgl\blo\bob\bb-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-w\bwo\bor\brd\bd is displayed, and the line is redrawn. If a
+ numeric argument is supplied, an asterisk is appended before
pathname expansion.
d\bdu\bum\bmp\bp-\b-f\bfu\bun\bnc\bct\bti\bio\bon\bns\bs
- Print all of the functions and their key bindings to the read-
+ Print all of the functions and their key bindings to the read-
line output stream. If a numeric argument is supplied, the out-
- put is formatted in such a way that it can be made part of an
+ put is formatted in such a way that it can be made part of an
_\bi_\bn_\bp_\bu_\bt_\br_\bc file.
d\bdu\bum\bmp\bp-\b-v\bva\bar\bri\bia\bab\bbl\ble\bes\bs
Print all of the settable readline variables and their values to
- the readline output stream. If a numeric argument is supplied,
- the output is formatted in such a way that it can be made part
+ the readline output stream. If a numeric argument is supplied,
+ the output is formatted in such a way that it can be made part
of an _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
d\bdu\bum\bmp\bp-\b-m\bma\bac\bcr\bro\bos\bs
- Print all of the readline key sequences bound to macros and the
- strings they output. If a numeric argument is supplied, the
+ Print all of the readline key sequences bound to macros and the
+ strings they output. If a numeric argument is supplied, the
output is formatted in such a way that it can be made part of an
_\bi_\bn_\bp_\bu_\bt_\br_\bc file.
d\bdi\bis\bsp\bpl\bla\bay\by-\b-s\bsh\bhe\bel\bll\bl-\b-v\bve\ber\brs\bsi\bio\bon\bn (\b(C\bC-\b-x\bx C\bC-\b-v\bv)\b)
- Display version information about the current instance of b\bba\bas\bsh\bh.
+ Display version information about the current instance of b\bba\bas\bsh\bh.
P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn
- When word completion is attempted for an argument to a command for
- which a completion specification (a _\bc_\bo_\bm_\bp_\bs_\bp_\be_\bc) has been defined using
- the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below), the pro-
+ When word completion is attempted for an argument to a command for
+ which a completion specification (a _\bc_\bo_\bm_\bp_\bs_\bp_\be_\bc) has been defined using
+ the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below), the pro-
grammable completion facilities are invoked.
- First, the command name is identified. If the command word is the
- empty string (completion attempted at the beginning of an empty line),
- any compspec defined with the -\b-E\bE option to c\bco\bom\bmp\bpl\ble\bet\bte\be is used. If a
- compspec has been defined for that command, the compspec is used to
+ First, the command name is identified. If the command word is the
+ empty string (completion attempted at the beginning of an empty line),
+ any compspec defined with the -\b-E\bE option to c\bco\bom\bmp\bpl\ble\bet\bte\be is used. If a
+ compspec has been defined for that command, the compspec is used to
generate the list of possible completions for the word. If the command
- word is a full pathname, a compspec for the full pathname is searched
- for first. If no compspec is found for the full pathname, an attempt
- is made to find a compspec for the portion following the final slash.
- If those searches do not result in a compspec, any compspec defined
+ word is a full pathname, a compspec for the full pathname is searched
+ for first. If no compspec is found for the full pathname, an attempt
+ is made to find a compspec for the portion following the final slash.
+ If those searches do not result in a compspec, any compspec defined
with the -\b-D\bD option to c\bco\bom\bmp\bpl\ble\bet\bte\be is used as the default.
- Once a compspec has been found, it is used to generate the list of
- matching words. If a compspec is not found, the default b\bba\bas\bsh\bh comple-
+ Once a compspec has been found, it is used to generate the list of
+ matching words. If a compspec is not found, the default b\bba\bas\bsh\bh comple-
tion as described above under C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg is performed.
- First, the actions specified by the compspec are used. Only matches
- which are prefixed by the word being completed are returned. When the
- -\b-f\bf or -\b-d\bd option is used for filename or directory name completion, the
+ First, the actions specified by the compspec are used. Only matches
+ which are prefixed by the word being completed are returned. When the
+ -\b-f\bf or -\b-d\bd option is used for filename or directory name completion, the
shell variable F\bFI\bIG\bGN\bNO\bOR\bRE\bE is used to filter the matches.
- Any completions specified by a pathname expansion pattern to the -\b-G\bG
+ Any completions specified by a pathname expansion pattern to the -\b-G\bG
option are generated next. The words generated by the pattern need not
- match the word being completed. The G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE shell variable is not
+ match the word being completed. The G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE shell variable is not
used to filter the matches, but the F\bFI\bIG\bGN\bNO\bOR\bRE\bE variable is used.
- Next, the string specified as the argument to the -\b-W\bW option is consid-
- ered. The string is first split using the characters in the I\bIF\bFS\bS spe-
- cial variable as delimiters. Shell quoting is honored. Each word is
- then expanded using brace expansion, tilde expansion, parameter and
- variable expansion, command substitution, and arithmetic expansion, as
+ Next, the string specified as the argument to the -\b-W\bW option is consid-
+ ered. The string is first split using the characters in the I\bIF\bFS\bS spe-
+ cial variable as delimiters. Shell quoting is honored. Each word is
+ then expanded using brace expansion, tilde expansion, parameter and
+ variable expansion, command substitution, and arithmetic expansion, as
described above under E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN. The results are split using the rules
described above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg. The results of the expansion are
prefix-matched against the word being completed, and the matching words
become the possible completions.
- After these matches have been generated, any shell function or command
- specified with the -\b-F\bF and -\b-C\bC options is invoked. When the command or
+ After these matches have been generated, any shell function or command
+ specified with the -\b-F\bF and -\b-C\bC options is invoked. When the command or
function is invoked, the C\bCO\bOM\bMP\bP_\b_L\bLI\bIN\bNE\bE, C\bCO\bOM\bMP\bP_\b_P\bPO\bOI\bIN\bNT\bT, C\bCO\bOM\bMP\bP_\b_K\bKE\bEY\bY, and C\bCO\bOM\bMP\bP_\b_T\bTY\bYP\bPE\bE
variables are assigned values as described above under S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs.
- If a shell function is being invoked, the C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDS\bS and C\bCO\bOM\bMP\bP_\b_C\bCW\bWO\bOR\bRD\bD
- variables are also set. When the function or command is invoked, the
- first argument ($\b$1\b1) is the name of the command whose arguments are
- being completed, the second argument ($\b$2\b2) is the word being completed,
- and the third argument ($\b$3\b3) is the word preceding the word being com-
+ If a shell function is being invoked, the C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDS\bS and C\bCO\bOM\bMP\bP_\b_C\bCW\bWO\bOR\bRD\bD
+ variables are also set. When the function or command is invoked, the
+ first argument ($\b$1\b1) is the name of the command whose arguments are
+ being completed, the second argument ($\b$2\b2) is the word being completed,
+ and the third argument ($\b$3\b3) is the word preceding the word being com-
pleted on the current command line. No filtering of the generated com-
pletions against the word being completed is performed; the function or
command has complete freedom in generating the matches.
- Any function specified with -\b-F\bF is invoked first. The function may use
- any of the shell facilities, including the c\bco\bom\bmp\bpg\bge\ben\bn builtin described
- below, to generate the matches. It must put the possible completions
+ Any function specified with -\b-F\bF is invoked first. The function may use
+ any of the shell facilities, including the c\bco\bom\bmp\bpg\bge\ben\bn builtin described
+ below, to generate the matches. It must put the possible completions
in the C\bCO\bOM\bMP\bPR\bRE\bEP\bPL\bLY\bY array variable, one per array element.
- Next, any command specified with the -\b-C\bC option is invoked in an envi-
- ronment equivalent to command substitution. It should print a list of
- completions, one per line, to the standard output. Backslash may be
+ Next, any command specified with the -\b-C\bC option is invoked in an envi-
+ ronment equivalent to command substitution. It should print a list of
+ completions, one per line, to the standard output. Backslash may be
used to escape a newline, if necessary.
- After all of the possible completions are generated, any filter speci-
- fied with the -\b-X\bX option is applied to the list. The filter is a pat-
- tern as used for pathname expansion; a &\b& in the pattern is replaced
- with the text of the word being completed. A literal &\b& may be escaped
- with a backslash; the backslash is removed before attempting a match.
- Any completion that matches the pattern will be removed from the list.
+ After all of the possible completions are generated, any filter speci-
+ fied with the -\b-X\bX option is applied to the list. The filter is a pat-
+ tern as used for pathname expansion; a &\b& in the pattern is replaced
+ with the text of the word being completed. A literal &\b& may be escaped
+ with a backslash; the backslash is removed before attempting a match.
+ Any completion that matches the pattern will be removed from the list.
A leading !\b! negates the pattern; in this case any completion not match-
ing the pattern will be removed.
added to each member of the completion list, and the result is returned
to the readline completion code as the list of possible completions.
- If the previously-applied actions do not generate any matches, and the
- -\b-o\bo d\bdi\bir\brn\bna\bam\bme\bes\bs option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was
+ If the previously-applied actions do not generate any matches, and the
+ -\b-o\bo d\bdi\bir\brn\bna\bam\bme\bes\bs option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was
defined, directory name completion is attempted.
- If the -\b-o\bo p\bpl\blu\bus\bsd\bdi\bir\brs\bs option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec
+ If the -\b-o\bo p\bpl\blu\bus\bsd\bdi\bir\brs\bs option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec
was defined, directory name completion is attempted and any matches are
added to the results of the other actions.
- By default, if a compspec is found, whatever it generates is returned
- to the completion code as the full set of possible completions. The
+ By default, if a compspec is found, whatever it generates is returned
+ to the completion code as the full set of possible completions. The
default b\bba\bas\bsh\bh completions are not attempted, and the readline default of
filename completion is disabled. If the -\b-o\bo b\bba\bas\bsh\bhd\bde\bef\bfa\bau\bul\blt\bt option was sup-
- plied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was defined, the b\bba\bas\bsh\bh default com-
+ plied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was defined, the b\bba\bas\bsh\bh default com-
pletions are attempted if the compspec generates no matches. If the -\b-o\bo
- d\bde\bef\bfa\bau\bul\blt\bt option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was defined,
- readline's default completion will be performed if the compspec (and,
+ d\bde\bef\bfa\bau\bul\blt\bt option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was defined,
+ readline's default completion will be performed if the compspec (and,
if attempted, the default b\bba\bas\bsh\bh completions) generate no matches.
- When a compspec indicates that directory name completion is desired,
- the programmable completion functions force readline to append a slash
- to completed names which are symbolic links to directories, subject to
- the value of the m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs readline variable, regardless of the
+ When a compspec indicates that directory name completion is desired,
+ the programmable completion functions force readline to append a slash
+ to completed names which are symbolic links to directories, subject to
+ the value of the m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs readline variable, regardless of the
setting of the m\bma\bar\brk\bk-\b-s\bsy\bym\bml\bli\bin\bnk\bke\bed\bd-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs readline variable.
- There is some support for dynamically modifying completions. This is
- most useful when used in combination with a default completion speci-
- fied with c\bco\bom\bmp\bpl\ble\bet\bte\be -\b-D\bD. It's possible for shell functions executed as
- completion handlers to indicate that completion should be retried by
- returning an exit status of 124. If a shell function returns 124, and
+ There is some support for dynamically modifying completions. This is
+ most useful when used in combination with a default completion speci-
+ fied with c\bco\bom\bmp\bpl\ble\bet\bte\be -\b-D\bD. It's possible for shell functions executed as
+ completion handlers to indicate that completion should be retried by
+ returning an exit status of 124. If a shell function returns 124, and
changes the compspec associated with the command on which completion is
- being attempted (supplied as the first argument when the function is
+ being attempted (supplied as the first argument when the function is
executed), programmable completion restarts from the beginning, with an
- attempt to find a new compspec for that command. This allows a set of
- completions to be built dynamically as completion is attempted, rather
+ attempt to find a new compspec for that command. This allows a set of
+ completions to be built dynamically as completion is attempted, rather
than being loaded all at once.
- For instance, assuming that there is a library of compspecs, each kept
- in a file corresponding to the name of the command, the following
+ For instance, assuming that there is a library of compspecs, each kept
+ in a file corresponding to the name of the command, the following
default completion function would load completions dynamically:
_completion_loader()
H\bHI\bIS\bST\bTO\bOR\bRY\bY
- When the -\b-o\bo h\bhi\bis\bst\bto\bor\bry\by option to the s\bse\bet\bt builtin is enabled, the shell
+ When the -\b-o\bo h\bhi\bis\bst\bto\bor\bry\by option to the s\bse\bet\bt builtin is enabled, the shell
provides access to the _\bc_\bo_\bm_\bm_\ba_\bn_\bd _\bh_\bi_\bs_\bt_\bo_\br_\by, the list of commands previously
- typed. The value of the H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE variable is used as the number of
+ typed. The value of the H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE variable is used as the number of
commands to save in a history list. The text of the last H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE com-
- mands (default 500) is saved. The shell stores each command in the
- history list prior to parameter and variable expansion (see E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN
- above) but after history expansion is performed, subject to the values
+ mands (default 500) is saved. The shell stores each command in the
+ history list prior to parameter and variable expansion (see E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN
+ above) but after history expansion is performed, subject to the values
of the shell variables H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE and H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL.
On startup, the history is initialized from the file named by the vari-
- able H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE (default _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by). The file named by the value
- of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is truncated, if necessary, to contain no more than the
- number of lines specified by the value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE. If H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE-\b-
- S\bSI\bIZ\bZE\bE is unset, or set to null, a non-numeric value, or a numeric value
- less than zero, the history file is not truncated. When the history
- file is read, lines beginning with the history comment character fol-
+ able H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE (default _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by). The file named by the value
+ of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is truncated, if necessary, to contain no more than the
+ number of lines specified by the value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE. If H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE-\b-
+ S\bSI\bIZ\bZE\bE is unset, or set to null, a non-numeric value, or a numeric value
+ less than zero, the history file is not truncated. When the history
+ file is read, lines beginning with the history comment character fol-
lowed immediately by a digit are interpreted as timestamps for the pre-
ceding history line. These timestamps are optionally displayed depend-
- ing on the value of the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable. When a shell with
- history enabled exits, the last $\b$H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE lines are copied from the
- history list to $\b$H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE. If the h\bhi\bis\bst\bta\bap\bpp\bpe\ben\bnd\bd shell option is enabled
- (see the description of s\bsh\bho\bop\bpt\bt under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below), the
- lines are appended to the history file, otherwise the history file is
+ ing on the value of the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable. When a shell with
+ history enabled exits, the last $\b$H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE lines are copied from the
+ history list to $\b$H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE. If the h\bhi\bis\bst\bta\bap\bpp\bpe\ben\bnd\bd shell option is enabled
+ (see the description of s\bsh\bho\bop\bpt\bt under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below), the
+ lines are appended to the history file, otherwise the history file is
overwritten. If H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset, or if the history file is
- unwritable, the history is not saved. If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable
- is set, time stamps are written to the history file, marked with the
- history comment character, so they may be preserved across shell ses-
- sions. This uses the history comment character to distinguish time-
+ unwritable, the history is not saved. If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable
+ is set, time stamps are written to the history file, marked with the
+ history comment character, so they may be preserved across shell ses-
+ sions. This uses the history comment character to distinguish time-
stamps from other history lines. After saving the history, the history
file is truncated to contain no more than H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE lines. If H\bHI\bIS\bST\bT-\b-
- F\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE is unset, or set to null, a non-numeric value, or a numeric
+ F\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE is unset, or set to null, a non-numeric value, or a numeric
value less than zero, the history file is not truncated.
- The builtin command f\bfc\bc (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) may be used
+ The builtin command f\bfc\bc (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) may be used
to list or edit and re-execute a portion of the history list. The h\bhi\bis\bs-\b-
- t\bto\bor\bry\by builtin may be used to display or modify the history list and
- manipulate the history file. When using command-line editing, search
- commands are available in each editing mode that provide access to the
+ t\bto\bor\bry\by builtin may be used to display or modify the history list and
+ manipulate the history file. When using command-line editing, search
+ commands are available in each editing mode that provide access to the
history list.
- The shell allows control over which commands are saved on the history
+ The shell allows control over which commands are saved on the history
list. The H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL and H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE variables may be set to cause the
shell to save only a subset of the commands entered. The c\bcm\bmd\bdh\bhi\bis\bst\bt shell
- option, if enabled, causes the shell to attempt to save each line of a
- multi-line command in the same history entry, adding semicolons where
- necessary to preserve syntactic correctness. The l\bli\bit\bth\bhi\bis\bst\bt shell option
- causes the shell to save the command with embedded newlines instead of
+ option, if enabled, causes the shell to attempt to save each line of a
+ multi-line command in the same history entry, adding semicolons where
+ necessary to preserve syntactic correctness. The l\bli\bit\bth\bhi\bis\bst\bt shell option
+ causes the shell to save the command with embedded newlines instead of
semicolons. See the description of the s\bsh\bho\bop\bpt\bt builtin below under S\bSH\bHE\bEL\bLL\bL
B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS for information on setting and unsetting shell
options.
H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN
- The shell supports a history expansion feature that is similar to the
- history expansion in c\bcs\bsh\bh.\b. This section describes what syntax features
- are available. This feature is enabled by default for interactive
+ The shell supports a history expansion feature that is similar to the
+ history expansion in c\bcs\bsh\bh.\b. This section describes what syntax features
+ are available. This feature is enabled by default for interactive
shells, and can be disabled using the +\b+H\bH option to the s\bse\bet\bt builtin com-
mand (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). Non-interactive shells do not
perform history expansion by default.
History expansions introduce words from the history list into the input
- stream, making it easy to repeat commands, insert the arguments to a
+ stream, making it easy to repeat commands, insert the arguments to a
previous command into the current input line, or fix errors in previous
commands quickly.
- History expansion is performed immediately after a complete line is
- read, before the shell breaks it into words. It takes place in two
- parts. The first is to determine which line from the history list to
+ History expansion is performed immediately after a complete line is
+ read, before the shell breaks it into words. It takes place in two
+ parts. The first is to determine which line from the history list to
use during substitution. The second is to select portions of that line
for inclusion into the current one. The line selected from the history
- is the _\be_\bv_\be_\bn_\bt, and the portions of that line that are acted upon are
- _\bw_\bo_\br_\bd_\bs. Various _\bm_\bo_\bd_\bi_\bf_\bi_\be_\br_\bs are available to manipulate the selected
+ is the _\be_\bv_\be_\bn_\bt, and the portions of that line that are acted upon are
+ _\bw_\bo_\br_\bd_\bs. Various _\bm_\bo_\bd_\bi_\bf_\bi_\be_\br_\bs are available to manipulate the selected
words. The line is broken into words in the same fashion as when read-
- ing input, so that several _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br-separated words surrounded by
- quotes are considered one word. History expansions are introduced by
- the appearance of the history expansion character, which is !\b! by
- default. Only backslash (\\b\) and single quotes can quote the history
+ ing input, so that several _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br-separated words surrounded by
+ quotes are considered one word. History expansions are introduced by
+ the appearance of the history expansion character, which is !\b! by
+ default. Only backslash (\\b\) and single quotes can quote the history
expansion character.
- Several characters inhibit history expansion if found immediately fol-
- lowing the history expansion character, even if it is unquoted: space,
- tab, newline, carriage return, and =\b=. If the e\bex\bxt\btg\bgl\blo\bob\bb shell option is
+ Several characters inhibit history expansion if found immediately fol-
+ lowing the history expansion character, even if it is unquoted: space,
+ tab, newline, carriage return, and =\b=. If the e\bex\bxt\btg\bgl\blo\bob\bb shell option is
enabled, (\b( will also inhibit expansion.
- Several shell options settable with the s\bsh\bho\bop\bpt\bt builtin may be used to
- tailor the behavior of history expansion. If the h\bhi\bis\bst\btv\bve\ber\bri\bif\bfy\by shell
+ Several shell options settable with the s\bsh\bho\bop\bpt\bt builtin may be used to
+ tailor the behavior of history expansion. If the h\bhi\bis\bst\btv\bve\ber\bri\bif\bfy\by shell
option is enabled (see the description of the s\bsh\bho\bop\bpt\bt builtin below), and
- r\bre\bea\bad\bdl\bli\bin\bne\be is being used, history substitutions are not immediately
- passed to the shell parser. Instead, the expanded line is reloaded
+ r\bre\bea\bad\bdl\bli\bin\bne\be is being used, history substitutions are not immediately
+ passed to the shell parser. Instead, the expanded line is reloaded
into the r\bre\bea\bad\bdl\bli\bin\bne\be editing buffer for further modification. If r\bre\bea\bad\bdl\bli\bin\bne\be
- is being used, and the h\bhi\bis\bst\btr\bre\bee\bed\bdi\bit\bt shell option is enabled, a failed
- history substitution will be reloaded into the r\bre\bea\bad\bdl\bli\bin\bne\be editing buffer
- for correction. The -\b-p\bp option to the h\bhi\bis\bst\bto\bor\bry\by builtin command may be
- used to see what a history expansion will do before using it. The -\b-s\bs
+ is being used, and the h\bhi\bis\bst\btr\bre\bee\bed\bdi\bit\bt shell option is enabled, a failed
+ history substitution will be reloaded into the r\bre\bea\bad\bdl\bli\bin\bne\be editing buffer
+ for correction. The -\b-p\bp option to the h\bhi\bis\bst\bto\bor\bry\by builtin command may be
+ used to see what a history expansion will do before using it. The -\b-s\bs
option to the h\bhi\bis\bst\bto\bor\bry\by builtin may be used to add commands to the end of
- the history list without actually executing them, so that they are
+ the history list without actually executing them, so that they are
available for subsequent recall.
- The shell allows control of the various characters used by the history
+ The shell allows control of the various characters used by the history
expansion mechanism (see the description of h\bhi\bis\bst\btc\bch\bha\bar\brs\bs above under S\bSh\bhe\bel\bll\bl
- V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs). The shell uses the history comment character to mark his-
+ V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs). The shell uses the history comment character to mark his-
tory timestamps when writing the history file.
E\bEv\bve\ben\bnt\bt D\bDe\bes\bsi\big\bgn\bna\bat\bto\bor\brs\bs
- An event designator is a reference to a command line entry in the his-
- tory list. Unless the reference is absolute, events are relative to
+ An event designator is a reference to a command line entry in the his-
+ tory list. Unless the reference is absolute, events are relative to
the current position in the history list.
- !\b! Start a history substitution, except when followed by a b\bbl\bla\ban\bnk\bk,
- newline, carriage return, = or ( (when the e\bex\bxt\btg\bgl\blo\bob\bb shell option
+ !\b! Start a history substitution, except when followed by a b\bbl\bla\ban\bnk\bk,
+ newline, carriage return, = or ( (when the e\bex\bxt\btg\bgl\blo\bob\bb shell option
is enabled using the s\bsh\bho\bop\bpt\bt builtin).
!\b!_\bn Refer to command line _\bn.
!\b!-\b-_\bn Refer to the current command minus _\bn.
!\b!!\b! Refer to the previous command. This is a synonym for `!-1'.
!\b!_\bs_\bt_\br_\bi_\bn_\bg
- Refer to the most recent command preceding the current position
+ Refer to the most recent command preceding the current position
in the history list starting with _\bs_\bt_\br_\bi_\bn_\bg.
!\b!?\b?_\bs_\bt_\br_\bi_\bn_\bg[\b[?\b?]\b]
- Refer to the most recent command preceding the current position
- in the history list containing _\bs_\bt_\br_\bi_\bn_\bg. The trailing ?\b? may be
+ Refer to the most recent command preceding the current position
+ in the history list containing _\bs_\bt_\br_\bi_\bn_\bg. The trailing ?\b? may be
omitted if _\bs_\bt_\br_\bi_\bn_\bg is followed immediately by a newline.
^\b^_\bs_\bt_\br_\bi_\bn_\bg_\b1^\b^_\bs_\bt_\br_\bi_\bn_\bg_\b2^\b^
- Quick substitution. Repeat the previous command, replacing
- _\bs_\bt_\br_\bi_\bn_\bg_\b1 with _\bs_\bt_\br_\bi_\bn_\bg_\b2. Equivalent to ``!!:s/_\bs_\bt_\br_\bi_\bn_\bg_\b1/_\bs_\bt_\br_\bi_\bn_\bg_\b2/''
+ Quick substitution. Repeat the previous command, replacing
+ _\bs_\bt_\br_\bi_\bn_\bg_\b1 with _\bs_\bt_\br_\bi_\bn_\bg_\b2. Equivalent to ``!!:s/_\bs_\bt_\br_\bi_\bn_\bg_\b1/_\bs_\bt_\br_\bi_\bn_\bg_\b2/''
(see M\bMo\bod\bdi\bif\bfi\bie\ber\brs\bs below).
!\b!#\b# The entire command line typed so far.
W\bWo\bor\brd\bd D\bDe\bes\bsi\big\bgn\bna\bat\bto\bor\brs\bs
- Word designators are used to select desired words from the event. A :\b:
- separates the event specification from the word designator. It may be
- omitted if the word designator begins with a ^\b^, $\b$, *\b*, -\b-, or %\b%. Words
- are numbered from the beginning of the line, with the first word being
- denoted by 0 (zero). Words are inserted into the current line sepa-
+ Word designators are used to select desired words from the event. A :\b:
+ separates the event specification from the word designator. It may be
+ omitted if the word designator begins with a ^\b^, $\b$, *\b*, -\b-, or %\b%. Words
+ are numbered from the beginning of the line, with the first word being
+ denoted by 0 (zero). Words are inserted into the current line sepa-
rated by single spaces.
0\b0 (\b(z\bze\ber\bro\bo)\b)
The zeroth word. For the shell, this is the command word.
_\bn The _\bnth word.
^\b^ The first argument. That is, word 1.
- $\b$ The last word. This is usually the last argument, but will
+ $\b$ The last word. This is usually the last argument, but will
expand to the zeroth word if there is only one word in the line.
%\b% The word matched by the most recent `?_\bs_\bt_\br_\bi_\bn_\bg?' search.
_\bx-\b-_\by A range of words; `-_\by' abbreviates `0-_\by'.
- *\b* All of the words but the zeroth. This is a synonym for `_\b1_\b-_\b$'.
- It is not an error to use *\b* if there is just one word in the
+ *\b* All of the words but the zeroth. This is a synonym for `_\b1_\b-_\b$'.
+ It is not an error to use *\b* if there is just one word in the
event; the empty string is returned in that case.
x\bx*\b* Abbreviates _\bx_\b-_\b$.
x\bx-\b- Abbreviates _\bx_\b-_\b$ like x\bx*\b*, but omits the last word.
- If a word designator is supplied without an event specification, the
+ If a word designator is supplied without an event specification, the
previous command is used as the event.
M\bMo\bod\bdi\bif\bfi\bie\ber\brs\bs
- After the optional word designator, there may appear a sequence of one
+ After the optional word designator, there may appear a sequence of one
or more of the following modifiers, each preceded by a `:'.
h\bh Remove a trailing filename component, leaving only the head.
e\be Remove all but the trailing suffix.
p\bp Print the new command but do not execute it.
q\bq Quote the substituted words, escaping further substitutions.
- x\bx Quote the substituted words as with q\bq, but break into words at
+ x\bx Quote the substituted words as with q\bq, but break into words at
b\bbl\bla\ban\bnk\bks\bs and newlines.
s\bs/\b/_\bo_\bl_\bd/\b/_\bn_\be_\bw/\b/
- Substitute _\bn_\be_\bw for the first occurrence of _\bo_\bl_\bd in the event
- line. Any delimiter can be used in place of /. The final
- delimiter is optional if it is the last character of the event
- line. The delimiter may be quoted in _\bo_\bl_\bd and _\bn_\be_\bw with a single
- backslash. If & appears in _\bn_\be_\bw, it is replaced by _\bo_\bl_\bd. A sin-
- gle backslash will quote the &. If _\bo_\bl_\bd is null, it is set to
- the last _\bo_\bl_\bd substituted, or, if no previous history substitu-
+ Substitute _\bn_\be_\bw for the first occurrence of _\bo_\bl_\bd in the event
+ line. Any delimiter can be used in place of /. The final
+ delimiter is optional if it is the last character of the event
+ line. The delimiter may be quoted in _\bo_\bl_\bd and _\bn_\be_\bw with a single
+ backslash. If & appears in _\bn_\be_\bw, it is replaced by _\bo_\bl_\bd. A sin-
+ gle backslash will quote the &. If _\bo_\bl_\bd is null, it is set to
+ the last _\bo_\bl_\bd substituted, or, if no previous history substitu-
tions took place, the last _\bs_\bt_\br_\bi_\bn_\bg in a !\b!?\b?_\bs_\bt_\br_\bi_\bn_\bg[\b[?\b?]\b] search.
&\b& Repeat the previous substitution.
g\bg Cause changes to be applied over the entire event line. This is
- used in conjunction with `:\b:s\bs' (e.g., `:\b:g\bgs\bs/\b/_\bo_\bl_\bd/\b/_\bn_\be_\bw/\b/') or `:\b:&\b&'.
- If used with `:\b:s\bs', any delimiter can be used in place of /, and
- the final delimiter is optional if it is the last character of
+ used in conjunction with `:\b:s\bs' (e.g., `:\b:g\bgs\bs/\b/_\bo_\bl_\bd/\b/_\bn_\be_\bw/\b/') or `:\b:&\b&'.
+ If used with `:\b:s\bs', any delimiter can be used in place of /, and
+ the final delimiter is optional if it is the last character of
the event line. An a\ba may be used as a synonym for g\bg.
- G\bG Apply the following `s\bs' modifier once to each word in the event
+ G\bG Apply the following `s\bs' modifier once to each word in the event
line.
S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
Unless otherwise noted, each builtin command documented in this section
as accepting options preceded by -\b- accepts -\b--\b- to signify the end of the
- options. The :\b:, t\btr\bru\bue\be, f\bfa\bal\bls\bse\be, and t\bte\bes\bst\bt builtins do not accept options
+ options. The :\b:, t\btr\bru\bue\be, f\bfa\bal\bls\bse\be, and t\bte\bes\bst\bt builtins do not accept options
and do not treat -\b--\b- specially. The e\bex\bxi\bit\bt, l\blo\bog\bgo\bou\but\bt, b\bbr\bre\bea\bak\bk, c\bco\bon\bnt\bti\bin\bnu\bue\be, l\ble\bet\bt,
- and s\bsh\bhi\bif\bft\bt builtins accept and process arguments beginning with -\b- with-
- out requiring -\b--\b-. Other builtins that accept arguments but are not
- specified as accepting options interpret arguments beginning with -\b- as
+ and s\bsh\bhi\bif\bft\bt builtins accept and process arguments beginning with -\b- with-
+ out requiring -\b--\b-. Other builtins that accept arguments but are not
+ specified as accepting options interpret arguments beginning with -\b- as
invalid options and require -\b--\b- to prevent this interpretation.
:\b: [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- No effect; the command does nothing beyond expanding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs
- and performing any specified redirections. A zero exit code is
+ No effect; the command does nothing beyond expanding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs
+ and performing any specified redirections. A zero exit code is
returned.
.\b. _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
s\bso\bou\bur\brc\bce\be _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- Read and execute commands from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be in the current shell
- environment and return the exit status of the last command exe-
- cuted from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be does not contain a slash,
- filenames in P\bPA\bAT\bTH\bH are used to find the directory containing
+ Read and execute commands from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be in the current shell
+ environment and return the exit status of the last command exe-
+ cuted from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be does not contain a slash,
+ filenames in P\bPA\bAT\bTH\bH are used to find the directory containing
_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be. The file searched for in P\bPA\bAT\bTH\bH need not be executable.
- When b\bba\bas\bsh\bh is not in _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, the current directory is
- searched if no file is found in P\bPA\bAT\bTH\bH. If the s\bso\bou\bur\brc\bce\bep\bpa\bat\bth\bh option
- to the s\bsh\bho\bop\bpt\bt builtin command is turned off, the P\bPA\bAT\bTH\bH is not
- searched. If any _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs are supplied, they become the posi-
- tional parameters when _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is executed. Otherwise the
- positional parameters are unchanged. The return status is the
- status of the last command exited within the script (0 if no
- commands are executed), and false if _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is not found or
+ When b\bba\bas\bsh\bh is not in _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, the current directory is
+ searched if no file is found in P\bPA\bAT\bTH\bH. If the s\bso\bou\bur\brc\bce\bep\bpa\bat\bth\bh option
+ to the s\bsh\bho\bop\bpt\bt builtin command is turned off, the P\bPA\bAT\bTH\bH is not
+ searched. If any _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs are supplied, they become the posi-
+ tional parameters when _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is executed. Otherwise the
+ positional parameters are unchanged. The return status is the
+ status of the last command exited within the script (0 if no
+ commands are executed), and false if _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is not found or
cannot be read.
a\bal\bli\bia\bas\bs [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
A\bAl\bli\bia\bas\bs with no arguments or with the -\b-p\bp option prints the list of
- aliases in the form a\bal\bli\bia\bas\bs _\bn_\ba_\bm_\be=_\bv_\ba_\bl_\bu_\be on standard output. When
- arguments are supplied, an alias is defined for each _\bn_\ba_\bm_\be whose
+ aliases in the form a\bal\bli\bia\bas\bs _\bn_\ba_\bm_\be=_\bv_\ba_\bl_\bu_\be on standard output. When
+ arguments are supplied, an alias is defined for each _\bn_\ba_\bm_\be whose
_\bv_\ba_\bl_\bu_\be is given. A trailing space in _\bv_\ba_\bl_\bu_\be causes the next word
to be checked for alias substitution when the alias is expanded.
- For each _\bn_\ba_\bm_\be in the argument list for which no _\bv_\ba_\bl_\bu_\be is sup-
- plied, the name and value of the alias is printed. A\bAl\bli\bia\bas\bs
- returns true unless a _\bn_\ba_\bm_\be is given for which no alias has been
+ For each _\bn_\ba_\bm_\be in the argument list for which no _\bv_\ba_\bl_\bu_\be is sup-
+ plied, the name and value of the alias is printed. A\bAl\bli\bia\bas\bs
+ returns true unless a _\bn_\ba_\bm_\be is given for which no alias has been
defined.
b\bbg\bg [_\bj_\bo_\bb_\bs_\bp_\be_\bc ...]
- Resume each suspended job _\bj_\bo_\bb_\bs_\bp_\be_\bc in the background, as if it
+ Resume each suspended job _\bj_\bo_\bb_\bs_\bp_\be_\bc in the background, as if it
had been started with &\b&. If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, the shell's
- notion of the _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb is used. b\bbg\bg _\bj_\bo_\bb_\bs_\bp_\be_\bc returns 0 unless
- run when job control is disabled or, when run with job control
- enabled, any specified _\bj_\bo_\bb_\bs_\bp_\be_\bc was not found or was started
+ notion of the _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb is used. b\bbg\bg _\bj_\bo_\bb_\bs_\bp_\be_\bc returns 0 unless
+ run when job control is disabled or, when run with job control
+ enabled, any specified _\bj_\bo_\bb_\bs_\bp_\be_\bc was not found or was started
without job control.
b\bbi\bin\bnd\bd [-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp] [-\b-l\blp\bps\bsv\bvP\bPS\bSV\bVX\bX]
b\bbi\bin\bnd\bd [-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp] -\b-x\bx _\bk_\be_\by_\bs_\be_\bq:_\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd
b\bbi\bin\bnd\bd [-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp] _\bk_\be_\by_\bs_\be_\bq:_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be
b\bbi\bin\bnd\bd _\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd
- Display current r\bre\bea\bad\bdl\bli\bin\bne\be key and function bindings, bind a key
- sequence to a r\bre\bea\bad\bdl\bli\bin\bne\be function or macro, or set a r\bre\bea\bad\bdl\bli\bin\bne\be
- variable. Each non-option argument is a command as it would
- appear in _\b._\bi_\bn_\bp_\bu_\bt_\br_\bc, but each binding or command must be passed
- as a separate argument; e.g., '"\C-x\C-r": re-read-init-file'.
+ Display current r\bre\bea\bad\bdl\bli\bin\bne\be key and function bindings, bind a key
+ sequence to a r\bre\bea\bad\bdl\bli\bin\bne\be function or macro, or set a r\bre\bea\bad\bdl\bli\bin\bne\be
+ variable. Each non-option argument is a command as it would
+ appear in _\b._\bi_\bn_\bp_\bu_\bt_\br_\bc, but each binding or command must be passed
+ as a separate argument; e.g., '"\C-x\C-r": re-read-init-file'.
Options, if supplied, have the following meanings:
-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp
Use _\bk_\be_\by_\bm_\ba_\bp as the keymap to be affected by the subsequent
bindings. Acceptable _\bk_\be_\by_\bm_\ba_\bp names are _\be_\bm_\ba_\bc_\bs_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\b-
- _\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b, _\bv_\bi_\b, _\bv_\bi_\b-_\bm_\bo_\bv_\be_\b, _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd,
- and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt. _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd; _\be_\bm_\ba_\bc_\bs is
+ _\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b, _\bv_\bi_\b, _\bv_\bi_\b-_\bm_\bo_\bv_\be_\b, _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd,
+ and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt. _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd; _\be_\bm_\ba_\bc_\bs is
equivalent to _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd.
-\b-l\bl List the names of all r\bre\bea\bad\bdl\bli\bin\bne\be functions.
- -\b-p\bp Display r\bre\bea\bad\bdl\bli\bin\bne\be function names and bindings in such a
+ -\b-p\bp Display r\bre\bea\bad\bdl\bli\bin\bne\be function names and bindings in such a
way that they can be re-read.
-\b-P\bP List current r\bre\bea\bad\bdl\bli\bin\bne\be function names and bindings.
- -\b-s\bs Display r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
- strings they output in such a way that they can be re-
+ -\b-s\bs Display r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
+ strings they output in such a way that they can be re-
read.
- -\b-S\bS Display r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
+ -\b-S\bS Display r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
strings they output.
- -\b-v\bv Display r\bre\bea\bad\bdl\bli\bin\bne\be variable names and values in such a way
+ -\b-v\bv Display r\bre\bea\bad\bdl\bli\bin\bne\be variable names and values in such a way
that they can be re-read.
-\b-V\bV List current r\bre\bea\bad\bdl\bli\bin\bne\be variable names and values.
-\b-f\bf _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
-\b-r\br _\bk_\be_\by_\bs_\be_\bq
Remove any current binding for _\bk_\be_\by_\bs_\be_\bq.
-\b-x\bx _\bk_\be_\by_\bs_\be_\bq:\b:_\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd
- Cause _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd to be executed whenever _\bk_\be_\by_\bs_\be_\bq is
- entered. When _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed, the shell sets
- the R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE variable to the contents of the r\bre\bea\bad\bd-\b-
- l\bli\bin\bne\be line buffer and the R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_P\bPO\bOI\bIN\bNT\bT variable to the
+ Cause _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd to be executed whenever _\bk_\be_\by_\bs_\be_\bq is
+ entered. When _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed, the shell sets
+ the R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE variable to the contents of the r\bre\bea\bad\bd-\b-
+ l\bli\bin\bne\be line buffer and the R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_P\bPO\bOI\bIN\bNT\bT variable to the
current location of the insertion point. If the executed
- command changes the value of R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE or R\bRE\bEA\bAD\bD-\b-
- L\bLI\bIN\bNE\bE_\b_P\bPO\bOI\bIN\bNT\bT, those new values will be reflected in the
+ command changes the value of R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE or R\bRE\bEA\bAD\bD-\b-
+ L\bLI\bIN\bNE\bE_\b_P\bPO\bOI\bIN\bNT\bT, those new values will be reflected in the
editing state.
- -\b-X\bX List all key sequences bound to shell commands and the
- associated commands in a format that can be reused as
+ -\b-X\bX List all key sequences bound to shell commands and the
+ associated commands in a format that can be reused as
input.
- The return value is 0 unless an unrecognized option is given or
+ The return value is 0 unless an unrecognized option is given or
an error occurred.
b\bbr\bre\bea\bak\bk [_\bn]
- Exit from within a f\bfo\bor\br, w\bwh\bhi\bil\ble\be, u\bun\bnt\bti\bil\bl, or s\bse\bel\ble\bec\bct\bt loop. If _\bn is
- specified, break _\bn levels. _\bn must be >= 1. If _\bn is greater
- than the number of enclosing loops, all enclosing loops are
- exited. The return value is 0 unless _\bn is not greater than or
+ Exit from within a f\bfo\bor\br, w\bwh\bhi\bil\ble\be, u\bun\bnt\bti\bil\bl, or s\bse\bel\ble\bec\bct\bt loop. If _\bn is
+ specified, break _\bn levels. _\bn must be >= 1. If _\bn is greater
+ than the number of enclosing loops, all enclosing loops are
+ exited. The return value is 0 unless _\bn is not greater than or
equal to 1.
b\bbu\bui\bil\blt\bti\bin\bn _\bs_\bh_\be_\bl_\bl_\b-_\bb_\bu_\bi_\bl_\bt_\bi_\bn [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- Execute the specified shell builtin, passing it _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs, and
+ Execute the specified shell builtin, passing it _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs, and
return its exit status. This is useful when defining a function
- whose name is the same as a shell builtin, retaining the func-
+ whose name is the same as a shell builtin, retaining the func-
tionality of the builtin within the function. The c\bcd\bd builtin is
- commonly redefined this way. The return status is false if
+ commonly redefined this way. The return status is false if
_\bs_\bh_\be_\bl_\bl_\b-_\bb_\bu_\bi_\bl_\bt_\bi_\bn is not a shell builtin command.
c\bca\bal\bll\ble\ber\br [_\be_\bx_\bp_\br]
Returns the context of any active subroutine call (a shell func-
tion or a script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins). With-
out _\be_\bx_\bp_\br, c\bca\bal\bll\ble\ber\br displays the line number and source filename of
- the current subroutine call. If a non-negative integer is sup-
+ the current subroutine call. If a non-negative integer is sup-
plied as _\be_\bx_\bp_\br, c\bca\bal\bll\ble\ber\br displays the line number, subroutine name,
- and source file corresponding to that position in the current
- execution call stack. This extra information may be used, for
- example, to print a stack trace. The current frame is frame 0.
- The return value is 0 unless the shell is not executing a sub-
- routine call or _\be_\bx_\bp_\br does not correspond to a valid position in
+ and source file corresponding to that position in the current
+ execution call stack. This extra information may be used, for
+ example, to print a stack trace. The current frame is frame 0.
+ The return value is 0 unless the shell is not executing a sub-
+ routine call or _\be_\bx_\bp_\br does not correspond to a valid position in
the call stack.
- c\bcd\bd [-\b-L\bL|[-\b-P\bP [-\b-e\be]]] [_\bd_\bi_\br]
- Change the current directory to _\bd_\bi_\br. if _\bd_\bi_\br is not supplied,
- the value of the H\bHO\bOM\bME\bE shell variable is the default. Any addi-
+ c\bcd\bd [-\b-L\bL|[-\b-P\bP [-\b-e\be]] [-@]] [_\bd_\bi_\br]
+ Change the current directory to _\bd_\bi_\br. if _\bd_\bi_\br is not supplied,
+ the value of the H\bHO\bOM\bME\bE shell variable is the default. Any addi-
tional arguments following _\bd_\bi_\br are ignored. The variable C\bCD\bDP\bPA\bAT\bTH\bH
- defines the search path for the directory containing _\bd_\bi_\br: each
- directory name in C\bCD\bDP\bPA\bAT\bTH\bH is searched for _\bd_\bi_\br. Alternative
- directory names in C\bCD\bDP\bPA\bAT\bTH\bH are separated by a colon (:). A null
- directory name in C\bCD\bDP\bPA\bAT\bTH\bH is the same as the current directory,
+ defines the search path for the directory containing _\bd_\bi_\br: each
+ directory name in C\bCD\bDP\bPA\bAT\bTH\bH is searched for _\bd_\bi_\br. Alternative
+ directory names in C\bCD\bDP\bPA\bAT\bTH\bH are separated by a colon (:). A null
+ directory name in C\bCD\bDP\bPA\bAT\bTH\bH is the same as the current directory,
i.e., ``.\b.''. If _\bd_\bi_\br begins with a slash (/), then C\bCD\bDP\bPA\bAT\bTH\bH is not
- used. The -\b-P\bP option causes c\bcd\bd to use the physical directory
- structure by resolving symbolic links while traversing _\bd_\bi_\br and
+ used. The -\b-P\bP option causes c\bcd\bd to use the physical directory
+ structure by resolving symbolic links while traversing _\bd_\bi_\br and
before processing instances of _\b._\b. in _\bd_\bi_\br (see also the -\b-P\bP option
to the s\bse\bet\bt builtin command); the -\b-L\bL option forces symbolic links
- to be followed by resolving the link after processing instances
+ to be followed by resolving the link after processing instances
of _\b._\b. in _\bd_\bi_\br. If _\b._\b. appears in _\bd_\bi_\br, it is processed by removing
- the immediately previous pathname component from _\bd_\bi_\br, back to a
- slash or the beginning of _\bd_\bi_\br. If the -\b-e\be option is supplied
- with -\b-P\bP, and the current working directory cannot be success-
- fully determined after a successful directory change, c\bcd\bd will
- return an unsuccessful status. An argument of -\b- is converted to
- $\b$O\bOL\bLD\bDP\bPW\bWD\bD before the directory change is attempted. If a non-
- empty directory name from C\bCD\bDP\bPA\bAT\bTH\bH is used, or if -\b- is the first
- argument, and the directory change is successful, the absolute
- pathname of the new working directory is written to the standard
- output. The return value is true if the directory was success-
- fully changed; false otherwise.
+ the immediately previous pathname component from _\bd_\bi_\br, back to a
+ slash or the beginning of _\bd_\bi_\br. If the -\b-e\be option is supplied
+ with -\b-P\bP, and the current working directory cannot be success-
+ fully determined after a successful directory change, c\bcd\bd will
+ return an unsuccessful status. On systems that support it, the
+ -\b-@\b@ option presents the extended attributes associated with a
+ file as a directory. An argument of -\b- is converted to $\b$O\bOL\bLD\bDP\bPW\bWD\bD
+ before the directory change is attempted. If a non-empty direc-
+ tory name from C\bCD\bDP\bPA\bAT\bTH\bH is used, or if -\b- is the first argument,
+ and the directory change is successful, the absolute pathname of
+ the new working directory is written to the standard output.
+ The return value is true if the directory was successfully
+ changed; false otherwise.
c\bco\bom\bmm\bma\ban\bnd\bd [-\b-p\bpV\bVv\bv] _\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\ba_\br_\bg ...]
- Run _\bc_\bo_\bm_\bm_\ba_\bn_\bd with _\ba_\br_\bg_\bs suppressing the normal shell function
- lookup. Only builtin commands or commands found in the P\bPA\bAT\bTH\bH are
- executed. If the -\b-p\bp option is given, the search for _\bc_\bo_\bm_\bm_\ba_\bn_\bd is
- performed using a default value for P\bPA\bAT\bTH\bH that is guaranteed to
- find all of the standard utilities. If either the -\b-V\bV or -\b-v\bv
+ Run _\bc_\bo_\bm_\bm_\ba_\bn_\bd with _\ba_\br_\bg_\bs suppressing the normal shell function
+ lookup. Only builtin commands or commands found in the P\bPA\bAT\bTH\bH are
+ executed. If the -\b-p\bp option is given, the search for _\bc_\bo_\bm_\bm_\ba_\bn_\bd is
+ performed using a default value for P\bPA\bAT\bTH\bH that is guaranteed to
+ find all of the standard utilities. If either the -\b-V\bV or -\b-v\bv
option is supplied, a description of _\bc_\bo_\bm_\bm_\ba_\bn_\bd is printed. The -\b-v\bv
- option causes a single word indicating the command or filename
+ option causes a single word indicating the command or filename
used to invoke _\bc_\bo_\bm_\bm_\ba_\bn_\bd to be displayed; the -\b-V\bV option produces a
- more verbose description. If the -\b-V\bV or -\b-v\bv option is supplied,
- the exit status is 0 if _\bc_\bo_\bm_\bm_\ba_\bn_\bd was found, and 1 if not. If
+ more verbose description. If the -\b-V\bV or -\b-v\bv option is supplied,
+ the exit status is 0 if _\bc_\bo_\bm_\bm_\ba_\bn_\bd was found, and 1 if not. If
neither option is supplied and an error occurred or _\bc_\bo_\bm_\bm_\ba_\bn_\bd can-
- not be found, the exit status is 127. Otherwise, the exit sta-
+ not be found, the exit status is 127. Otherwise, the exit sta-
tus of the c\bco\bom\bmm\bma\ban\bnd\bd builtin is the exit status of _\bc_\bo_\bm_\bm_\ba_\bn_\bd.
c\bco\bom\bmp\bpg\bge\ben\bn [_\bo_\bp_\bt_\bi_\bo_\bn] [_\bw_\bo_\br_\bd]
- Generate possible completion matches for _\bw_\bo_\br_\bd according to the
- _\bo_\bp_\bt_\bi_\bo_\bns, which may be any option accepted by the c\bco\bom\bmp\bpl\ble\bet\bte\be
- builtin with the exception of -\b-p\bp and -\b-r\br, and write the matches
- to the standard output. When using the -\b-F\bF or -\b-C\bC options, the
- various shell variables set by the programmable completion
+ Generate possible completion matches for _\bw_\bo_\br_\bd according to the
+ _\bo_\bp_\bt_\bi_\bo_\bns, which may be any option accepted by the c\bco\bom\bmp\bpl\ble\bet\bte\be
+ builtin with the exception of -\b-p\bp and -\b-r\br, and write the matches
+ to the standard output. When using the -\b-F\bF or -\b-C\bC options, the
+ various shell variables set by the programmable completion
facilities, while available, will not have useful values.
- The matches will be generated in the same way as if the pro-
- grammable completion code had generated them directly from a
+ The matches will be generated in the same way as if the pro-
+ grammable completion code had generated them directly from a
completion specification with the same flags. If _\bw_\bo_\br_\bd is speci-
fied, only those completions matching _\bw_\bo_\br_\bd will be displayed.
- The return value is true unless an invalid option is supplied,
+ The return value is true unless an invalid option is supplied,
or no matches were generated.
- c\bco\bom\bmp\bpl\ble\bet\bte\be [-\b-a\bab\bbc\bcd\bde\bef\bfg\bgj\bjk\bks\bsu\buv\bv] [-\b-o\bo _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn] [-\b-D\bDE\bE] [-\b-A\bA _\ba_\bc_\bt_\bi_\bo_\bn] [-\b-G\bG _\bg_\bl_\bo_\bb_\b-
+ c\bco\bom\bmp\bpl\ble\bet\bte\be [-\b-a\bab\bbc\bcd\bde\bef\bfg\bgj\bjk\bks\bsu\buv\bv] [-\b-o\bo _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn] [-\b-D\bDE\bE] [-\b-A\bA _\ba_\bc_\bt_\bi_\bo_\bn] [-\b-G\bG _\bg_\bl_\bo_\bb_\b-
_\bp_\ba_\bt] [-\b-W\bW _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt] [-\b-F\bF _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn] [-\b-C\bC _\bc_\bo_\bm_\bm_\ba_\bn_\bd]
[-\b-X\bX _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt] [-\b-P\bP _\bp_\br_\be_\bf_\bi_\bx] [-\b-S\bS _\bs_\bu_\bf_\bf_\bi_\bx] _\bn_\ba_\bm_\be [_\bn_\ba_\bm_\be _\b._\b._\b.]
c\bco\bom\bmp\bpl\ble\bet\bte\be -\b-p\bpr\br [-\b-D\bDE\bE] [_\bn_\ba_\bm_\be ...]
- Specify how arguments to each _\bn_\ba_\bm_\be should be completed. If the
- -\b-p\bp option is supplied, or if no options are supplied, existing
- completion specifications are printed in a way that allows them
+ Specify how arguments to each _\bn_\ba_\bm_\be should be completed. If the
+ -\b-p\bp option is supplied, or if no options are supplied, existing
+ completion specifications are printed in a way that allows them
to be reused as input. The -\b-r\br option removes a completion spec-
- ification for each _\bn_\ba_\bm_\be, or, if no _\bn_\ba_\bm_\bes are supplied, all com-
+ ification for each _\bn_\ba_\bm_\be, or, if no _\bn_\ba_\bm_\bes are supplied, all com-
pletion specifications. The -\b-D\bD option indicates that the
- remaining options and actions should apply to the ``default''
- command completion; that is, completion attempted on a command
- for which no completion has previously been defined. The -\b-E\bE
- option indicates that the remaining options and actions should
- apply to ``empty'' command completion; that is, completion
+ remaining options and actions should apply to the ``default''
+ command completion; that is, completion attempted on a command
+ for which no completion has previously been defined. The -\b-E\bE
+ option indicates that the remaining options and actions should
+ apply to ``empty'' command completion; that is, completion
attempted on a blank line.
- The process of applying these completion specifications when
- word completion is attempted is described above under P\bPr\bro\bo-\b-
+ The process of applying these completion specifications when
+ word completion is attempted is described above under P\bPr\bro\bo-\b-
g\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn.
- Other options, if specified, have the following meanings. The
- arguments to the -\b-G\bG, -\b-W\bW, and -\b-X\bX options (and, if necessary, the
- -\b-P\bP and -\b-S\bS options) should be quoted to protect them from expan-
+ Other options, if specified, have the following meanings. The
+ arguments to the -\b-G\bG, -\b-W\bW, and -\b-X\bX options (and, if necessary, the
+ -\b-P\bP and -\b-S\bS options) should be quoted to protect them from expan-
sion before the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin is invoked.
-\b-o\bo _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn
- The _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn controls several aspects of the comp-
- spec's behavior beyond the simple generation of comple-
+ The _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn controls several aspects of the comp-
+ spec's behavior beyond the simple generation of comple-
tions. _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn may be one of:
b\bba\bas\bsh\bhd\bde\bef\bfa\bau\bul\blt\bt
Perform the rest of the default b\bba\bas\bsh\bh completions
if the compspec generates no matches.
- d\bde\bef\bfa\bau\bul\blt\bt Use readline's default filename completion if
+ d\bde\bef\bfa\bau\bul\blt\bt Use readline's default filename completion if
the compspec generates no matches.
d\bdi\bir\brn\bna\bam\bme\bes\bs
- Perform directory name completion if the comp-
+ Perform directory name completion if the comp-
spec generates no matches.
f\bfi\bil\ble\ben\bna\bam\bme\bes\bs
- Tell readline that the compspec generates file-
- names, so it can perform any filename-specific
- processing (like adding a slash to directory
- names, quoting special characters, or suppress-
- ing trailing spaces). Intended to be used with
+ Tell readline that the compspec generates file-
+ names, so it can perform any filename-specific
+ processing (like adding a slash to directory
+ names, quoting special characters, or suppress-
+ ing trailing spaces). Intended to be used with
shell functions.
- n\bno\boq\bqu\buo\bot\bte\be Tell readline not to quote the completed words
- if they are filenames (quoting filenames is the
+ n\bno\boq\bqu\buo\bot\bte\be Tell readline not to quote the completed words
+ if they are filenames (quoting filenames is the
default).
- n\bno\bos\bsp\bpa\bac\bce\be Tell readline not to append a space (the
- default) to words completed at the end of the
+ n\bno\bos\bsp\bpa\bac\bce\be Tell readline not to append a space (the
+ default) to words completed at the end of the
line.
p\bpl\blu\bus\bsd\bdi\bir\brs\bs
- After any matches defined by the compspec are
- generated, directory name completion is
- attempted and any matches are added to the
+ After any matches defined by the compspec are
+ generated, directory name completion is
+ attempted and any matches are added to the
results of the other actions.
-\b-A\bA _\ba_\bc_\bt_\bi_\bo_\bn
- The _\ba_\bc_\bt_\bi_\bo_\bn may be one of the following to generate a
+ The _\ba_\bc_\bt_\bi_\bo_\bn may be one of the following to generate a
list of possible completions:
a\bal\bli\bia\bas\bs Alias names. May also be specified as -\b-a\ba.
a\bar\brr\bra\bay\byv\bva\bar\br
Array variable names.
b\bbi\bin\bnd\bdi\bin\bng\bg R\bRe\bea\bad\bdl\bli\bin\bne\be key binding names.
- b\bbu\bui\bil\blt\bti\bin\bn Names of shell builtin commands. May also be
+ b\bbu\bui\bil\blt\bti\bin\bn Names of shell builtin commands. May also be
specified as -\b-b\bb.
c\bco\bom\bmm\bma\ban\bnd\bd Command names. May also be specified as -\b-c\bc.
d\bdi\bir\bre\bec\bct\bto\bor\bry\by
d\bdi\bis\bsa\bab\bbl\ble\bed\bd
Names of disabled shell builtins.
e\ben\bna\bab\bbl\ble\bed\bd Names of enabled shell builtins.
- e\bex\bxp\bpo\bor\brt\bt Names of exported shell variables. May also be
+ e\bex\bxp\bpo\bor\brt\bt Names of exported shell variables. May also be
specified as -\b-e\be.
f\bfi\bil\ble\be File names. May also be specified as -\b-f\bf.
f\bfu\bun\bnc\bct\bti\bio\bon\bn
h\bhe\bel\blp\bpt\bto\bop\bpi\bic\bc
Help topics as accepted by the h\bhe\bel\blp\bp builtin.
h\bho\bos\bst\btn\bna\bam\bme\be
- Hostnames, as taken from the file specified by
+ Hostnames, as taken from the file specified by
the H\bHO\bOS\bST\bTF\bFI\bIL\bLE\bE shell variable.
- j\bjo\bob\bb Job names, if job control is active. May also
+ j\bjo\bob\bb Job names, if job control is active. May also
be specified as -\b-j\bj.
- k\bke\bey\byw\bwo\bor\brd\bd Shell reserved words. May also be specified as
+ k\bke\bey\byw\bwo\bor\brd\bd Shell reserved words. May also be specified as
-\b-k\bk.
r\bru\bun\bnn\bni\bin\bng\bg Names of running jobs, if job control is active.
s\bse\ber\brv\bvi\bic\bce\be Service names. May also be specified as -\b-s\bs.
- s\bse\bet\bto\bop\bpt\bt Valid arguments for the -\b-o\bo option to the s\bse\bet\bt
+ s\bse\bet\bto\bop\bpt\bt Valid arguments for the -\b-o\bo option to the s\bse\bet\bt
builtin.
- s\bsh\bho\bop\bpt\bt Shell option names as accepted by the s\bsh\bho\bop\bpt\bt
+ s\bsh\bho\bop\bpt\bt Shell option names as accepted by the s\bsh\bho\bop\bpt\bt
builtin.
s\bsi\big\bgn\bna\bal\bl Signal names.
s\bst\bto\bop\bpp\bpe\bed\bd Names of stopped jobs, if job control is active.
Names of all shell variables. May also be spec-
ified as -\b-v\bv.
-\b-C\bC _\bc_\bo_\bm_\bm_\ba_\bn_\bd
- _\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed in a subshell environment, and its
+ _\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed in a subshell environment, and its
output is used as the possible completions.
-\b-F\bF _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn
- The shell function _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn is executed in the current
- shell environment. When the function is executed, the
- first argument ($\b$1\b1) is the name of the command whose
- arguments are being completed, the second argument ($\b$2\b2)
+ The shell function _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn is executed in the current
+ shell environment. When the function is executed, the
+ first argument ($\b$1\b1) is the name of the command whose
+ arguments are being completed, the second argument ($\b$2\b2)
is the word being completed, and the third argument ($\b$3\b3)
- is the word preceding the word being completed on the
- current command line. When it finishes, the possible
- completions are retrieved from the value of the C\bCO\bOM\bMP\bPR\bRE\bE-\b-
+ is the word preceding the word being completed on the
+ current command line. When it finishes, the possible
+ completions are retrieved from the value of the C\bCO\bOM\bMP\bPR\bRE\bE-\b-
P\bPL\bLY\bY array variable.
-\b-G\bG _\bg_\bl_\bo_\bb_\bp_\ba_\bt
- The pathname expansion pattern _\bg_\bl_\bo_\bb_\bp_\ba_\bt is expanded to
+ The pathname expansion pattern _\bg_\bl_\bo_\bb_\bp_\ba_\bt is expanded to
generate the possible completions.
-\b-P\bP _\bp_\br_\be_\bf_\bi_\bx
- _\bp_\br_\be_\bf_\bi_\bx is added at the beginning of each possible com-
+ _\bp_\br_\be_\bf_\bi_\bx is added at the beginning of each possible com-
pletion after all other options have been applied.
-\b-S\bS _\bs_\bu_\bf_\bf_\bi_\bx
_\bs_\bu_\bf_\bf_\bi_\bx is appended to each possible completion after all
other options have been applied.
-\b-W\bW _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt
- The _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt is split using the characters in the I\bIF\bFS\bS
- special variable as delimiters, and each resultant word
- is expanded. The possible completions are the members
- of the resultant list which match the word being com-
+ The _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt is split using the characters in the I\bIF\bFS\bS
+ special variable as delimiters, and each resultant word
+ is expanded. The possible completions are the members
+ of the resultant list which match the word being com-
pleted.
-\b-X\bX _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt
- _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is a pattern as used for pathname expansion.
+ _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is a pattern as used for pathname expansion.
It is applied to the list of possible completions gener-
- ated by the preceding options and arguments, and each
- completion matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed from the list.
- A leading !\b! in _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt negates the pattern; in this
- case, any completion not matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed.
+ ated by the preceding options and arguments, and each
+ completion matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed from the list.
+ A leading !\b! in _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt negates the pattern; in this
+ case, any completion not matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed.
- The return value is true unless an invalid option is supplied,
- an option other than -\b-p\bp or -\b-r\br is supplied without a _\bn_\ba_\bm_\be argu-
- ment, an attempt is made to remove a completion specification
+ The return value is true unless an invalid option is supplied,
+ an option other than -\b-p\bp or -\b-r\br is supplied without a _\bn_\ba_\bm_\be argu-
+ ment, an attempt is made to remove a completion specification
for a _\bn_\ba_\bm_\be for which no specification exists, or an error occurs
adding a completion specification.
c\bco\bom\bmp\bpo\bop\bpt\bt [-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn] [-\b-D\bDE\bE] [+\b+o\bo _\bo_\bp_\bt_\bi_\bo_\bn] [_\bn_\ba_\bm_\be]
Modify completion options for each _\bn_\ba_\bm_\be according to the
- _\bo_\bp_\bt_\bi_\bo_\bns, or for the currently-executing completion if no _\bn_\ba_\bm_\bes
- are supplied. If no _\bo_\bp_\bt_\bi_\bo_\bns are given, display the completion
- options for each _\bn_\ba_\bm_\be or the current completion. The possible
- values of _\bo_\bp_\bt_\bi_\bo_\bn are those valid for the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin
- described above. The -\b-D\bD option indicates that the remaining
+ _\bo_\bp_\bt_\bi_\bo_\bns, or for the currently-executing completion if no _\bn_\ba_\bm_\bes
+ are supplied. If no _\bo_\bp_\bt_\bi_\bo_\bns are given, display the completion
+ options for each _\bn_\ba_\bm_\be or the current completion. The possible
+ values of _\bo_\bp_\bt_\bi_\bo_\bn are those valid for the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin
+ described above. The -\b-D\bD option indicates that the remaining
options should apply to the ``default'' command completion; that
- is, completion attempted on a command for which no completion
- has previously been defined. The -\b-E\bE option indicates that the
- remaining options should apply to ``empty'' command completion;
+ is, completion attempted on a command for which no completion
+ has previously been defined. The -\b-E\bE option indicates that the
+ remaining options should apply to ``empty'' command completion;
that is, completion attempted on a blank line.
- The return value is true unless an invalid option is supplied,
+ The return value is true unless an invalid option is supplied,
an attempt is made to modify the options for a _\bn_\ba_\bm_\be for which no
completion specification exists, or an output error occurs.
c\bco\bon\bnt\bti\bin\bnu\bue\be [_\bn]
Resume the next iteration of the enclosing f\bfo\bor\br, w\bwh\bhi\bil\ble\be, u\bun\bnt\bti\bil\bl, or
- s\bse\bel\ble\bec\bct\bt loop. If _\bn is specified, resume at the _\bnth enclosing
- loop. _\bn must be >= 1. If _\bn is greater than the number of
- enclosing loops, the last enclosing loop (the ``top-level''
+ s\bse\bel\ble\bec\bct\bt loop. If _\bn is specified, resume at the _\bnth enclosing
+ loop. _\bn must be >= 1. If _\bn is greater than the number of
+ enclosing loops, the last enclosing loop (the ``top-level''
loop) is resumed. The return value is 0 unless _\bn is not greater
than or equal to 1.
d\bde\bec\bcl\bla\bar\bre\be [-\b-a\baA\bAf\bfF\bFg\bgi\bil\bln\bnr\brt\btu\bux\bx] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
t\bty\byp\bpe\bes\bse\bet\bt [-\b-a\baA\bAf\bfF\bFg\bgi\bil\bln\bnr\brt\btu\bux\bx] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
- Declare variables and/or give them attributes. If no _\bn_\ba_\bm_\bes are
- given then display the values of variables. The -\b-p\bp option will
+ Declare variables and/or give them attributes. If no _\bn_\ba_\bm_\bes are
+ given then display the values of variables. The -\b-p\bp option will
display the attributes and values of each _\bn_\ba_\bm_\be. When -\b-p\bp is used
- with _\bn_\ba_\bm_\be arguments, additional options, other than -\b-f\bf and -\b-F\bF,
- are ignored. When -\b-p\bp is supplied without _\bn_\ba_\bm_\be arguments, it
- will display the attributes and values of all variables having
+ with _\bn_\ba_\bm_\be arguments, additional options, other than -\b-f\bf and -\b-F\bF,
+ are ignored. When -\b-p\bp is supplied without _\bn_\ba_\bm_\be arguments, it
+ will display the attributes and values of all variables having
the attributes specified by the additional options. If no other
- options are supplied with -\b-p\bp, d\bde\bec\bcl\bla\bar\bre\be will display the
- attributes and values of all shell variables. The -\b-f\bf option
- will restrict the display to shell functions. The -\b-F\bF option
- inhibits the display of function definitions; only the function
- name and attributes are printed. If the e\bex\bxt\btd\bde\beb\bbu\bug\bg shell option
- is enabled using s\bsh\bho\bop\bpt\bt, the source file name and line number
- where the function is defined are displayed as well. The -\b-F\bF
+ options are supplied with -\b-p\bp, d\bde\bec\bcl\bla\bar\bre\be will display the
+ attributes and values of all shell variables. The -\b-f\bf option
+ will restrict the display to shell functions. The -\b-F\bF option
+ inhibits the display of function definitions; only the function
+ name and attributes are printed. If the e\bex\bxt\btd\bde\beb\bbu\bug\bg shell option
+ is enabled using s\bsh\bho\bop\bpt\bt, the source file name and line number
+ where the function is defined are displayed as well. The -\b-F\bF
option implies -\b-f\bf. The -\b-g\bg option forces variables to be created
- or modified at the global scope, even when d\bde\bec\bcl\bla\bar\bre\be is executed
- in a shell function. It is ignored in all other cases. The
- following options can be used to restrict output to variables
+ or modified at the global scope, even when d\bde\bec\bcl\bla\bar\bre\be is executed
+ in a shell function. It is ignored in all other cases. The
+ following options can be used to restrict output to variables
with the specified attribute or to give variables attributes:
- -\b-a\ba Each _\bn_\ba_\bm_\be is an indexed array variable (see A\bAr\brr\bra\bay\bys\bs
+ -\b-a\ba Each _\bn_\ba_\bm_\be is an indexed array variable (see A\bAr\brr\bra\bay\bys\bs
above).
- -\b-A\bA Each _\bn_\ba_\bm_\be is an associative array variable (see A\bAr\brr\bra\bay\bys\bs
+ -\b-A\bA Each _\bn_\ba_\bm_\be is an associative array variable (see A\bAr\brr\bra\bay\bys\bs
above).
-\b-f\bf Use function names only.
-\b-i\bi The variable is treated as an integer; arithmetic evalua-
- tion (see A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above) is performed when
+ tion (see A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above) is performed when
the variable is assigned a value.
- -\b-l\bl When the variable is assigned a value, all upper-case
- characters are converted to lower-case. The upper-case
+ -\b-l\bl When the variable is assigned a value, all upper-case
+ characters are converted to lower-case. The upper-case
attribute is disabled.
- -\b-n\bn Give each _\bn_\ba_\bm_\be the _\bn_\ba_\bm_\be_\br_\be_\bf attribute, making it a name
- reference to another variable. That other variable is
+ -\b-n\bn Give each _\bn_\ba_\bm_\be the _\bn_\ba_\bm_\be_\br_\be_\bf attribute, making it a name
+ reference to another variable. That other variable is
defined by the value of _\bn_\ba_\bm_\be. All references and assign-
- ments to _\bn_\ba_\bm_\be, except for changing the -\b-n\bn attribute
- itself, are performed on the variable referenced by
- _\bn_\ba_\bm_\be's value. The -\b-n\bn attribute cannot be applied to
+ ments to _\bn_\ba_\bm_\be, except for changing the -\b-n\bn attribute
+ itself, are performed on the variable referenced by
+ _\bn_\ba_\bm_\be's value. The -\b-n\bn attribute cannot be applied to
array variables.
-\b-r\br Make _\bn_\ba_\bm_\bes readonly. These names cannot then be assigned
values by subsequent assignment statements or unset.
- -\b-t\bt Give each _\bn_\ba_\bm_\be the _\bt_\br_\ba_\bc_\be attribute. Traced functions
- inherit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN traps from the calling
- shell. The trace attribute has no special meaning for
+ -\b-t\bt Give each _\bn_\ba_\bm_\be the _\bt_\br_\ba_\bc_\be attribute. Traced functions
+ inherit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN traps from the calling
+ shell. The trace attribute has no special meaning for
variables.
- -\b-u\bu When the variable is assigned a value, all lower-case
- characters are converted to upper-case. The lower-case
+ -\b-u\bu When the variable is assigned a value, all lower-case
+ characters are converted to upper-case. The lower-case
attribute is disabled.
- -\b-x\bx Mark _\bn_\ba_\bm_\bes for export to subsequent commands via the
+ -\b-x\bx Mark _\bn_\ba_\bm_\bes for export to subsequent commands via the
environment.
- Using `+' instead of `-' turns off the attribute instead, with
+ Using `+' instead of `-' turns off the attribute instead, with
the exceptions that +\b+a\ba may not be used to destroy an array vari-
- able and +\b+r\br will not remove the readonly attribute. When used
+ able and +\b+r\br will not remove the readonly attribute. When used
in a function, d\bde\bec\bcl\bla\bar\bre\be and t\bty\byp\bpe\bes\bse\bet\bt make each _\bn_\ba_\bm_\be local, as with
the l\blo\boc\bca\bal\bl command, unless the -\b-g\bg option is supplied. If a vari-
- able name is followed by =_\bv_\ba_\bl_\bu_\be, the value of the variable is
+ able name is followed by =_\bv_\ba_\bl_\bu_\be, the value of the variable is
set to _\bv_\ba_\bl_\bu_\be. The return value is 0 unless an invalid option is
- encountered, an attempt is made to define a function using ``-f
- foo=bar'', an attempt is made to assign a value to a readonly
+ encountered, an attempt is made to define a function using ``-f
+ foo=bar'', an attempt is made to assign a value to a readonly
variable, an attempt is made to assign a value to an array vari-
- able without using the compound assignment syntax (see A\bAr\brr\bra\bay\bys\bs
- above), one of the _\bn_\ba_\bm_\be_\bs is not a valid shell variable name, an
+ able without using the compound assignment syntax (see A\bAr\brr\bra\bay\bys\bs
+ above), one of the _\bn_\ba_\bm_\be_\bs is not a valid shell variable name, an
attempt is made to turn off readonly status for a readonly vari-
- able, an attempt is made to turn off array status for an array
- variable, or an attempt is made to display a non-existent func-
+ able, an attempt is made to turn off array status for an array
+ variable, or an attempt is made to display a non-existent func-
tion with -\b-f\bf.
d\bdi\bir\brs\bs [\b[-\b-c\bcl\blp\bpv\bv]\b] [\b[+\b+_\bn]\b] [\b[-\b-_\bn]\b]
- Without options, displays the list of currently remembered
- directories. The default display is on a single line with
- directory names separated by spaces. Directories are added to
- the list with the p\bpu\bus\bsh\bhd\bd command; the p\bpo\bop\bpd\bd command removes
+ Without options, displays the list of currently remembered
+ directories. The default display is on a single line with
+ directory names separated by spaces. Directories are added to
+ the list with the p\bpu\bus\bsh\bhd\bd command; the p\bpo\bop\bpd\bd command removes
entries from the list.
-\b-c\bc Clears the directory stack by deleting all of the
entries.
- -\b-l\bl Produces a listing using full pathnames; the default
+ -\b-l\bl Produces a listing using full pathnames; the default
listing format uses a tilde to denote the home directory.
-\b-p\bp Print the directory stack with one entry per line.
- -\b-v\bv Print the directory stack with one entry per line, pre-
+ -\b-v\bv Print the directory stack with one entry per line, pre-
fixing each entry with its index in the stack.
+\b+_\bn Displays the _\bnth entry counting from the left of the list
shown by d\bdi\bir\brs\bs when invoked without options, starting with
zero.
- -\b-_\bn Displays the _\bnth entry counting from the right of the
+ -\b-_\bn Displays the _\bnth entry counting from the right of the
list shown by d\bdi\bir\brs\bs when invoked without options, starting
with zero.
- The return value is 0 unless an invalid option is supplied or _\bn
+ The return value is 0 unless an invalid option is supplied or _\bn
indexes beyond the end of the directory stack.
d\bdi\bis\bso\bow\bwn\bn [-\b-a\bar\br] [-\b-h\bh] [_\bj_\bo_\bb_\bs_\bp_\be_\bc ...]
- Without options, remove each _\bj_\bo_\bb_\bs_\bp_\be_\bc from the table of active
- jobs. If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, and neither the -\b-a\ba nor the -\b-r\br
- option is supplied, the _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb is used. If the -\b-h\bh option
- is given, each _\bj_\bo_\bb_\bs_\bp_\be_\bc is not removed from the table, but is
- marked so that S\bSI\bIG\bGH\bHU\bUP\bP is not sent to the job if the shell
- receives a S\bSI\bIG\bGH\bHU\bUP\bP. If no _\bj_\bo_\bb_\bs_\bp_\be_\bc is supplied, the -\b-a\ba option
- means to remove or mark all jobs; the -\b-r\br option without a _\bj_\bo_\bb_\b-
- _\bs_\bp_\be_\bc argument restricts operation to running jobs. The return
+ Without options, remove each _\bj_\bo_\bb_\bs_\bp_\be_\bc from the table of active
+ jobs. If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, and neither the -\b-a\ba nor the -\b-r\br
+ option is supplied, the _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb is used. If the -\b-h\bh option
+ is given, each _\bj_\bo_\bb_\bs_\bp_\be_\bc is not removed from the table, but is
+ marked so that S\bSI\bIG\bGH\bHU\bUP\bP is not sent to the job if the shell
+ receives a S\bSI\bIG\bGH\bHU\bUP\bP. If no _\bj_\bo_\bb_\bs_\bp_\be_\bc is supplied, the -\b-a\ba option
+ means to remove or mark all jobs; the -\b-r\br option without a _\bj_\bo_\bb_\b-
+ _\bs_\bp_\be_\bc argument restricts operation to running jobs. The return
value is 0 unless a _\bj_\bo_\bb_\bs_\bp_\be_\bc does not specify a valid job.
e\bec\bch\bho\bo [-\b-n\bne\beE\bE] [_\ba_\br_\bg ...]
- Output the _\ba_\br_\bgs, separated by spaces, followed by a newline.
- The return status is 0 unless a write error occurs. If -\b-n\bn is
+ Output the _\ba_\br_\bgs, separated by spaces, followed by a newline.
+ The return status is 0 unless a write error occurs. If -\b-n\bn is
specified, the trailing newline is suppressed. If the -\b-e\be option
- is given, interpretation of the following backslash-escaped
- characters is enabled. The -\b-E\bE option disables the interpreta-
- tion of these escape characters, even on systems where they are
- interpreted by default. The x\bxp\bpg\bg_\b_e\bec\bch\bho\bo shell option may be used
- to dynamically determine whether or not e\bec\bch\bho\bo expands these
- escape characters by default. e\bec\bch\bho\bo does not interpret -\b--\b- to
- mean the end of options. e\bec\bch\bho\bo interprets the following escape
+ is given, interpretation of the following backslash-escaped
+ characters is enabled. The -\b-E\bE option disables the interpreta-
+ tion of these escape characters, even on systems where they are
+ interpreted by default. The x\bxp\bpg\bg_\b_e\bec\bch\bho\bo shell option may be used
+ to dynamically determine whether or not e\bec\bch\bho\bo expands these
+ escape characters by default. e\bec\bch\bho\bo does not interpret -\b--\b- to
+ mean the end of options. e\bec\bch\bho\bo interprets the following escape
sequences:
\\b\a\ba alert (bell)
\\b\b\bb backspace
\\b\t\bt horizontal tab
\\b\v\bv vertical tab
\\b\\\b\ backslash
- \\b\0\b0_\bn_\bn_\bn the eight-bit character whose value is the octal value
+ \\b\0\b0_\bn_\bn_\bn the eight-bit character whose value is the octal value
_\bn_\bn_\bn (zero to three octal digits)
- \\b\x\bx_\bH_\bH the eight-bit character whose value is the hexadecimal
+ \\b\x\bx_\bH_\bH the eight-bit character whose value is the hexadecimal
value _\bH_\bH (one or two hex digits)
- \\b\u\bu_\bH_\bH_\bH_\bH the Unicode (ISO/IEC 10646) character whose value is the
+ \\b\u\bu_\bH_\bH_\bH_\bH the Unicode (ISO/IEC 10646) character whose value is the
hexadecimal value _\bH_\bH_\bH_\bH (one to four hex digits)
\\b\U\bU_\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH
- the Unicode (ISO/IEC 10646) character whose value is the
+ the Unicode (ISO/IEC 10646) character whose value is the
hexadecimal value _\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH (one to eight hex digits)
e\ben\bna\bab\bbl\ble\be [-\b-a\ba] [-\b-d\bdn\bnp\bps\bs] [-\b-f\bf _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be] [_\bn_\ba_\bm_\be ...]
- Enable and disable builtin shell commands. Disabling a builtin
+ Enable and disable builtin shell commands. Disabling a builtin
allows a disk command which has the same name as a shell builtin
- to be executed without specifying a full pathname, even though
- the shell normally searches for builtins before disk commands.
- If -\b-n\bn is used, each _\bn_\ba_\bm_\be is disabled; otherwise, _\bn_\ba_\bm_\be_\bs are
+ to be executed without specifying a full pathname, even though
+ the shell normally searches for builtins before disk commands.
+ If -\b-n\bn is used, each _\bn_\ba_\bm_\be is disabled; otherwise, _\bn_\ba_\bm_\be_\bs are
enabled. For example, to use the t\bte\bes\bst\bt binary found via the P\bPA\bAT\bTH\bH
- instead of the shell builtin version, run ``enable -n test''.
- The -\b-f\bf option means to load the new builtin command _\bn_\ba_\bm_\be from
+ instead of the shell builtin version, run ``enable -n test''.
+ The -\b-f\bf option means to load the new builtin command _\bn_\ba_\bm_\be from
shared object _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be, on systems that support dynamic loading.
- The -\b-d\bd option will delete a builtin previously loaded with -\b-f\bf.
+ The -\b-d\bd option will delete a builtin previously loaded with -\b-f\bf.
If no _\bn_\ba_\bm_\be arguments are given, or if the -\b-p\bp option is supplied,
a list of shell builtins is printed. With no other option argu-
- ments, the list consists of all enabled shell builtins. If -\b-n\bn
- is supplied, only disabled builtins are printed. If -\b-a\ba is sup-
- plied, the list printed includes all builtins, with an indica-
- tion of whether or not each is enabled. If -\b-s\bs is supplied, the
- output is restricted to the POSIX _\bs_\bp_\be_\bc_\bi_\ba_\bl builtins. The return
- value is 0 unless a _\bn_\ba_\bm_\be is not a shell builtin or there is an
+ ments, the list consists of all enabled shell builtins. If -\b-n\bn
+ is supplied, only disabled builtins are printed. If -\b-a\ba is sup-
+ plied, the list printed includes all builtins, with an indica-
+ tion of whether or not each is enabled. If -\b-s\bs is supplied, the
+ output is restricted to the POSIX _\bs_\bp_\be_\bc_\bi_\ba_\bl builtins. The return
+ value is 0 unless a _\bn_\ba_\bm_\be is not a shell builtin or there is an
error loading a new builtin from a shared object.
e\bev\bva\bal\bl [_\ba_\br_\bg ...]
- The _\ba_\br_\bgs are read and concatenated together into a single com-
- mand. This command is then read and executed by the shell, and
- its exit status is returned as the value of e\bev\bva\bal\bl. If there are
+ The _\ba_\br_\bgs are read and concatenated together into a single com-
+ mand. This command is then read and executed by the shell, and
+ its exit status is returned as the value of e\bev\bva\bal\bl. If there are
no _\ba_\br_\bg_\bs, or only null arguments, e\bev\bva\bal\bl returns 0.
e\bex\bxe\bec\bc [-\b-c\bcl\bl] [-\b-a\ba _\bn_\ba_\bm_\be] [_\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]]
- If _\bc_\bo_\bm_\bm_\ba_\bn_\bd is specified, it replaces the shell. No new process
- is created. The _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs become the arguments to _\bc_\bo_\bm_\bm_\ba_\bn_\bd. If
+ If _\bc_\bo_\bm_\bm_\ba_\bn_\bd is specified, it replaces the shell. No new process
+ is created. The _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs become the arguments to _\bc_\bo_\bm_\bm_\ba_\bn_\bd. If
the -\b-l\bl option is supplied, the shell places a dash at the begin-
- ning of the zeroth argument passed to _\bc_\bo_\bm_\bm_\ba_\bn_\bd. This is what
+ ning of the zeroth argument passed to _\bc_\bo_\bm_\bm_\ba_\bn_\bd. This is what
_\bl_\bo_\bg_\bi_\bn(1) does. The -\b-c\bc option causes _\bc_\bo_\bm_\bm_\ba_\bn_\bd to be executed with
- an empty environment. If -\b-a\ba is supplied, the shell passes _\bn_\ba_\bm_\be
+ an empty environment. If -\b-a\ba is supplied, the shell passes _\bn_\ba_\bm_\be
as the zeroth argument to the executed command. If _\bc_\bo_\bm_\bm_\ba_\bn_\bd can-
- not be executed for some reason, a non-interactive shell exits,
- unless the e\bex\bxe\bec\bcf\bfa\bai\bil\bl shell option is enabled. In that case, it
- returns failure. An interactive shell returns failure if the
+ not be executed for some reason, a non-interactive shell exits,
+ unless the e\bex\bxe\bec\bcf\bfa\bai\bil\bl shell option is enabled. In that case, it
+ returns failure. An interactive shell returns failure if the
file cannot be executed. If _\bc_\bo_\bm_\bm_\ba_\bn_\bd is not specified, any redi-
rections take effect in the current shell, and the return status
- is 0. If there is a redirection error, the return status is 1.
+ is 0. If there is a redirection error, the return status is 1.
e\bex\bxi\bit\bt [_\bn]
- Cause the shell to exit with a status of _\bn. If _\bn is omitted,
+ Cause the shell to exit with a status of _\bn. If _\bn is omitted,
the exit status is that of the last command executed. A trap on
E\bEX\bXI\bIT\bT is executed before the shell terminates.
e\bex\bxp\bpo\bor\brt\bt [-\b-f\bfn\bn] [_\bn_\ba_\bm_\be[=_\bw_\bo_\br_\bd]] ...
e\bex\bxp\bpo\bor\brt\bt -\b-p\bp
- The supplied _\bn_\ba_\bm_\be_\bs are marked for automatic export to the envi-
- ronment of subsequently executed commands. If the -\b-f\bf option is
- given, the _\bn_\ba_\bm_\be_\bs refer to functions. If no _\bn_\ba_\bm_\be_\bs are given, or
- if the -\b-p\bp option is supplied, a list of names of all exported
- variables is printed. The -\b-n\bn option causes the export property
+ The supplied _\bn_\ba_\bm_\be_\bs are marked for automatic export to the envi-
+ ronment of subsequently executed commands. If the -\b-f\bf option is
+ given, the _\bn_\ba_\bm_\be_\bs refer to functions. If no _\bn_\ba_\bm_\be_\bs are given, or
+ if the -\b-p\bp option is supplied, a list of names of all exported
+ variables is printed. The -\b-n\bn option causes the export property
to be removed from each _\bn_\ba_\bm_\be. If a variable name is followed by
=_\bw_\bo_\br_\bd, the value of the variable is set to _\bw_\bo_\br_\bd. e\bex\bxp\bpo\bor\brt\bt returns
an exit status of 0 unless an invalid option is encountered, one
- of the _\bn_\ba_\bm_\be_\bs is not a valid shell variable name, or -\b-f\bf is sup-
+ of the _\bn_\ba_\bm_\be_\bs is not a valid shell variable name, or -\b-f\bf is sup-
plied with a _\bn_\ba_\bm_\be that is not a function.
f\bfc\bc [-\b-e\be _\be_\bn_\ba_\bm_\be] [-\b-l\bln\bnr\br] [_\bf_\bi_\br_\bs_\bt] [_\bl_\ba_\bs_\bt]
f\bfc\bc -\b-s\bs [_\bp_\ba_\bt=_\br_\be_\bp] [_\bc_\bm_\bd]
- The first form selects a range of commands from _\bf_\bi_\br_\bs_\bt to _\bl_\ba_\bs_\bt
- from the history list and displays or edits and re-executes
- them. _\bF_\bi_\br_\bs_\bt and _\bl_\ba_\bs_\bt may be specified as a string (to locate
- the last command beginning with that string) or as a number (an
- index into the history list, where a negative number is used as
- an offset from the current command number). If _\bl_\ba_\bs_\bt is not
- specified it is set to the current command for listing (so that
- ``fc -l -10'' prints the last 10 commands) and to _\bf_\bi_\br_\bs_\bt other-
- wise. If _\bf_\bi_\br_\bs_\bt is not specified it is set to the previous com-
+ The first form selects a range of commands from _\bf_\bi_\br_\bs_\bt to _\bl_\ba_\bs_\bt
+ from the history list and displays or edits and re-executes
+ them. _\bF_\bi_\br_\bs_\bt and _\bl_\ba_\bs_\bt may be specified as a string (to locate
+ the last command beginning with that string) or as a number (an
+ index into the history list, where a negative number is used as
+ an offset from the current command number). If _\bl_\ba_\bs_\bt is not
+ specified it is set to the current command for listing (so that
+ ``fc -l -10'' prints the last 10 commands) and to _\bf_\bi_\br_\bs_\bt other-
+ wise. If _\bf_\bi_\br_\bs_\bt is not specified it is set to the previous com-
mand for editing and -16 for listing.
- The -\b-n\bn option suppresses the command numbers when listing. The
- -\b-r\br option reverses the order of the commands. If the -\b-l\bl option
- is given, the commands are listed on standard output. Other-
- wise, the editor given by _\be_\bn_\ba_\bm_\be is invoked on a file containing
- those commands. If _\be_\bn_\ba_\bm_\be is not given, the value of the F\bFC\bCE\bED\bDI\bIT\bT
- variable is used, and the value of E\bED\bDI\bIT\bTO\bOR\bR if F\bFC\bCE\bED\bDI\bIT\bT is not set.
- If neither variable is set, _\bv_\bi is used. When editing is com-
+ The -\b-n\bn option suppresses the command numbers when listing. The
+ -\b-r\br option reverses the order of the commands. If the -\b-l\bl option
+ is given, the commands are listed on standard output. Other-
+ wise, the editor given by _\be_\bn_\ba_\bm_\be is invoked on a file containing
+ those commands. If _\be_\bn_\ba_\bm_\be is not given, the value of the F\bFC\bCE\bED\bDI\bIT\bT
+ variable is used, and the value of E\bED\bDI\bIT\bTO\bOR\bR if F\bFC\bCE\bED\bDI\bIT\bT is not set.
+ If neither variable is set, _\bv_\bi is used. When editing is com-
plete, the edited commands are echoed and executed.
- In the second form, _\bc_\bo_\bm_\bm_\ba_\bn_\bd is re-executed after each instance
- of _\bp_\ba_\bt is replaced by _\br_\be_\bp. _\bC_\bo_\bm_\bm_\ba_\bn_\bd is intepreted the same as
- _\bf_\bi_\br_\bs_\bt above. A useful alias to use with this is ``r="fc -s"'',
- so that typing ``r cc'' runs the last command beginning with
+ In the second form, _\bc_\bo_\bm_\bm_\ba_\bn_\bd is re-executed after each instance
+ of _\bp_\ba_\bt is replaced by _\br_\be_\bp. _\bC_\bo_\bm_\bm_\ba_\bn_\bd is intepreted the same as
+ _\bf_\bi_\br_\bs_\bt above. A useful alias to use with this is ``r="fc -s"'',
+ so that typing ``r cc'' runs the last command beginning with
``cc'' and typing ``r'' re-executes the last command.
- If the first form is used, the return value is 0 unless an
- invalid option is encountered or _\bf_\bi_\br_\bs_\bt or _\bl_\ba_\bs_\bt specify history
- lines out of range. If the -\b-e\be option is supplied, the return
+ If the first form is used, the return value is 0 unless an
+ invalid option is encountered or _\bf_\bi_\br_\bs_\bt or _\bl_\ba_\bs_\bt specify history
+ lines out of range. If the -\b-e\be option is supplied, the return
value is the value of the last command executed or failure if an
error occurs with the temporary file of commands. If the second
- form is used, the return status is that of the command re-exe-
- cuted, unless _\bc_\bm_\bd does not specify a valid history line, in
+ form is used, the return status is that of the command re-exe-
+ cuted, unless _\bc_\bm_\bd does not specify a valid history line, in
which case f\bfc\bc returns failure.
f\bfg\bg [_\bj_\bo_\bb_\bs_\bp_\be_\bc]
- Resume _\bj_\bo_\bb_\bs_\bp_\be_\bc in the foreground, and make it the current job.
+ Resume _\bj_\bo_\bb_\bs_\bp_\be_\bc in the foreground, and make it the current job.
If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, the shell's notion of the _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb
- is used. The return value is that of the command placed into
- the foreground, or failure if run when job control is disabled
+ is used. The return value is that of the command placed into
+ the foreground, or failure if run when job control is disabled
or, when run with job control enabled, if _\bj_\bo_\bb_\bs_\bp_\be_\bc does not spec-
- ify a valid job or _\bj_\bo_\bb_\bs_\bp_\be_\bc specifies a job that was started
+ ify a valid job or _\bj_\bo_\bb_\bs_\bp_\be_\bc specifies a job that was started
without job control.
g\bge\bet\bto\bop\bpt\bts\bs _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg _\bn_\ba_\bm_\be [_\ba_\br_\bg_\bs]
- g\bge\bet\bto\bop\bpt\bts\bs is used by shell procedures to parse positional parame-
- ters. _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg contains the option characters to be recog-
- nized; if a character is followed by a colon, the option is
- expected to have an argument, which should be separated from it
- by white space. The colon and question mark characters may not
- be used as option characters. Each time it is invoked, g\bge\bet\bto\bop\bpt\bts\bs
- places the next option in the shell variable _\bn_\ba_\bm_\be, initializing
+ g\bge\bet\bto\bop\bpt\bts\bs is used by shell procedures to parse positional parame-
+ ters. _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg contains the option characters to be recog-
+ nized; if a character is followed by a colon, the option is
+ expected to have an argument, which should be separated from it
+ by white space. The colon and question mark characters may not
+ be used as option characters. Each time it is invoked, g\bge\bet\bto\bop\bpt\bts\bs
+ places the next option in the shell variable _\bn_\ba_\bm_\be, initializing
_\bn_\ba_\bm_\be if it does not exist, and the index of the next argument to
be processed into the variable O\bOP\bPT\bTI\bIN\bND\bD. O\bOP\bPT\bTI\bIN\bND\bD is initialized to
- 1 each time the shell or a shell script is invoked. When an
- option requires an argument, g\bge\bet\bto\bop\bpt\bts\bs places that argument into
- the variable O\bOP\bPT\bTA\bAR\bRG\bG. The shell does not reset O\bOP\bPT\bTI\bIN\bND\bD automati-
- cally; it must be manually reset between multiple calls to
+ 1 each time the shell or a shell script is invoked. When an
+ option requires an argument, g\bge\bet\bto\bop\bpt\bts\bs places that argument into
+ the variable O\bOP\bPT\bTA\bAR\bRG\bG. The shell does not reset O\bOP\bPT\bTI\bIN\bND\bD automati-
+ cally; it must be manually reset between multiple calls to
g\bge\bet\bto\bop\bpt\bts\bs within the same shell invocation if a new set of parame-
ters is to be used.
- When the end of options is encountered, g\bge\bet\bto\bop\bpt\bts\bs exits with a
- return value greater than zero. O\bOP\bPT\bTI\bIN\bND\bD is set to the index of
+ When the end of options is encountered, g\bge\bet\bto\bop\bpt\bts\bs exits with a
+ return value greater than zero. O\bOP\bPT\bTI\bIN\bND\bD is set to the index of
the first non-option argument, and _\bn_\ba_\bm_\be is set to ?.
- g\bge\bet\bto\bop\bpt\bts\bs normally parses the positional parameters, but if more
+ g\bge\bet\bto\bop\bpt\bts\bs normally parses the positional parameters, but if more
arguments are given in _\ba_\br_\bg_\bs, g\bge\bet\bto\bop\bpt\bts\bs parses those instead.
- g\bge\bet\bto\bop\bpt\bts\bs can report errors in two ways. If the first character
- of _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg is a colon, _\bs_\bi_\bl_\be_\bn_\bt error reporting is used. In
- normal operation, diagnostic messages are printed when invalid
- options or missing option arguments are encountered. If the
- variable O\bOP\bPT\bTE\bER\bRR\bR is set to 0, no error messages will be dis-
+ g\bge\bet\bto\bop\bpt\bts\bs can report errors in two ways. If the first character
+ of _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg is a colon, _\bs_\bi_\bl_\be_\bn_\bt error reporting is used. In
+ normal operation, diagnostic messages are printed when invalid
+ options or missing option arguments are encountered. If the
+ variable O\bOP\bPT\bTE\bER\bRR\bR is set to 0, no error messages will be dis-
played, even if the first character of _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg is not a colon.
If an invalid option is seen, g\bge\bet\bto\bop\bpt\bts\bs places ? into _\bn_\ba_\bm_\be and, if
- not silent, prints an error message and unsets O\bOP\bPT\bTA\bAR\bRG\bG. If
- g\bge\bet\bto\bop\bpt\bts\bs is silent, the option character found is placed in
+ not silent, prints an error message and unsets O\bOP\bPT\bTA\bAR\bRG\bG. If
+ g\bge\bet\bto\bop\bpt\bts\bs is silent, the option character found is placed in
O\bOP\bPT\bTA\bAR\bRG\bG and no diagnostic message is printed.
- If a required argument is not found, and g\bge\bet\bto\bop\bpt\bts\bs is not silent,
- a question mark (?\b?) is placed in _\bn_\ba_\bm_\be, O\bOP\bPT\bTA\bAR\bRG\bG is unset, and a
- diagnostic message is printed. If g\bge\bet\bto\bop\bpt\bts\bs is silent, then a
- colon (:\b:) is placed in _\bn_\ba_\bm_\be and O\bOP\bPT\bTA\bAR\bRG\bG is set to the option
+ If a required argument is not found, and g\bge\bet\bto\bop\bpt\bts\bs is not silent,
+ a question mark (?\b?) is placed in _\bn_\ba_\bm_\be, O\bOP\bPT\bTA\bAR\bRG\bG is unset, and a
+ diagnostic message is printed. If g\bge\bet\bto\bop\bpt\bts\bs is silent, then a
+ colon (:\b:) is placed in _\bn_\ba_\bm_\be and O\bOP\bPT\bTA\bAR\bRG\bG is set to the option
character found.
- g\bge\bet\bto\bop\bpt\bts\bs returns true if an option, specified or unspecified, is
+ g\bge\bet\bto\bop\bpt\bts\bs returns true if an option, specified or unspecified, is
found. It returns false if the end of options is encountered or
an error occurs.
h\bha\bas\bsh\bh [-\b-l\blr\br] [-\b-p\bp _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be] [-\b-d\bdt\bt] [_\bn_\ba_\bm_\be]
Each time h\bha\bas\bsh\bh is invoked, the full pathname of the command _\bn_\ba_\bm_\be
- is determined by searching the directories in $\b$P\bPA\bAT\bTH\bH and remem-
+ is determined by searching the directories in $\b$P\bPA\bAT\bTH\bH and remem-
bered. Any previously-remembered pathname is discarded. If the
-\b-p\bp option is supplied, no path search is performed, and _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
- is used as the full filename of the command. The -\b-r\br option
- causes the shell to forget all remembered locations. The -\b-d\bd
- option causes the shell to forget the remembered location of
- each _\bn_\ba_\bm_\be. If the -\b-t\bt option is supplied, the full pathname to
- which each _\bn_\ba_\bm_\be corresponds is printed. If multiple _\bn_\ba_\bm_\be argu-
- ments are supplied with -\b-t\bt, the _\bn_\ba_\bm_\be is printed before the
- hashed full pathname. The -\b-l\bl option causes output to be dis-
+ is used as the full filename of the command. The -\b-r\br option
+ causes the shell to forget all remembered locations. The -\b-d\bd
+ option causes the shell to forget the remembered location of
+ each _\bn_\ba_\bm_\be. If the -\b-t\bt option is supplied, the full pathname to
+ which each _\bn_\ba_\bm_\be corresponds is printed. If multiple _\bn_\ba_\bm_\be argu-
+ ments are supplied with -\b-t\bt, the _\bn_\ba_\bm_\be is printed before the
+ hashed full pathname. The -\b-l\bl option causes output to be dis-
played in a format that may be reused as input. If no arguments
- are given, or if only -\b-l\bl is supplied, information about remem-
- bered commands is printed. The return status is true unless a
+ are given, or if only -\b-l\bl is supplied, information about remem-
+ bered commands is printed. The return status is true unless a
_\bn_\ba_\bm_\be is not found or an invalid option is supplied.
h\bhe\bel\blp\bp [-\b-d\bdm\bms\bs] [_\bp_\ba_\bt_\bt_\be_\br_\bn]
- Display helpful information about builtin commands. If _\bp_\ba_\bt_\bt_\be_\br_\bn
- is specified, h\bhe\bel\blp\bp gives detailed help on all commands matching
- _\bp_\ba_\bt_\bt_\be_\br_\bn; otherwise help for all the builtins and shell control
+ Display helpful information about builtin commands. If _\bp_\ba_\bt_\bt_\be_\br_\bn
+ is specified, h\bhe\bel\blp\bp gives detailed help on all commands matching
+ _\bp_\ba_\bt_\bt_\be_\br_\bn; otherwise help for all the builtins and shell control
structures is printed.
-\b-d\bd Display a short description of each _\bp_\ba_\bt_\bt_\be_\br_\bn
-\b-m\bm Display the description of each _\bp_\ba_\bt_\bt_\be_\br_\bn in a manpage-like
h\bhi\bis\bst\bto\bor\bry\by -\b-s\bs _\ba_\br_\bg [_\ba_\br_\bg _\b._\b._\b.]
With no options, display the command history list with line num-
bers. Lines listed with a *\b* have been modified. An argument of
- _\bn lists only the last _\bn lines. If the shell variable H\bHI\bIS\bST\bTT\bTI\bIM\bME\bE-\b-
- F\bFO\bOR\bRM\bMA\bAT\bT is set and not null, it is used as a format string for
- _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) to display the time stamp associated with each dis-
- played history entry. No intervening blank is printed between
- the formatted time stamp and the history line. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is
- supplied, it is used as the name of the history file; if not,
- the value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is used. Options, if supplied, have the
+ _\bn lists only the last _\bn lines. If the shell variable H\bHI\bIS\bST\bTT\bTI\bIM\bME\bE-\b-
+ F\bFO\bOR\bRM\bMA\bAT\bT is set and not null, it is used as a format string for
+ _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) to display the time stamp associated with each dis-
+ played history entry. No intervening blank is printed between
+ the formatted time stamp and the history line. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is
+ supplied, it is used as the name of the history file; if not,
+ the value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is used. Options, if supplied, have the
following meanings:
-\b-c\bc Clear the history list by deleting all the entries.
-\b-d\bd _\bo_\bf_\bf_\bs_\be_\bt
Delete the history entry at position _\bo_\bf_\bf_\bs_\be_\bt.
- -\b-a\ba Append the ``new'' history lines (history lines entered
- since the beginning of the current b\bba\bas\bsh\bh session) to the
+ -\b-a\ba Append the ``new'' history lines (history lines entered
+ since the beginning of the current b\bba\bas\bsh\bh session) to the
history file.
- -\b-n\bn Read the history lines not already read from the history
- file into the current history list. These are lines
- appended to the history file since the beginning of the
+ -\b-n\bn Read the history lines not already read from the history
+ file into the current history list. These are lines
+ appended to the history file since the beginning of the
current b\bba\bas\bsh\bh session.
- -\b-r\br Read the contents of the history file and append them to
+ -\b-r\br Read the contents of the history file and append them to
the current history list.
-\b-w\bw Write the current history list to the history file, over-
writing the history file's contents.
- -\b-p\bp Perform history substitution on the following _\ba_\br_\bg_\bs and
- display the result on the standard output. Does not
- store the results in the history list. Each _\ba_\br_\bg must be
+ -\b-p\bp Perform history substitution on the following _\ba_\br_\bg_\bs and
+ display the result on the standard output. Does not
+ store the results in the history list. Each _\ba_\br_\bg must be
quoted to disable normal history expansion.
- -\b-s\bs Store the _\ba_\br_\bg_\bs in the history list as a single entry.
- The last command in the history list is removed before
+ -\b-s\bs Store the _\ba_\br_\bg_\bs in the history list as a single entry.
+ The last command in the history list is removed before
the _\ba_\br_\bg_\bs are added.
- If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, the time stamp informa-
- tion associated with each history entry is written to the his-
- tory file, marked with the history comment character. When the
- history file is read, lines beginning with the history comment
- character followed immediately by a digit are interpreted as
+ If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, the time stamp informa-
+ tion associated with each history entry is written to the his-
+ tory file, marked with the history comment character. When the
+ history file is read, lines beginning with the history comment
+ character followed immediately by a digit are interpreted as
timestamps for the previous history line. The return value is 0
- unless an invalid option is encountered, an error occurs while
- reading or writing the history file, an invalid _\bo_\bf_\bf_\bs_\be_\bt is sup-
+ unless an invalid option is encountered, an error occurs while
+ reading or writing the history file, an invalid _\bo_\bf_\bf_\bs_\be_\bt is sup-
plied as an argument to -\b-d\bd, or the history expansion supplied as
an argument to -\b-p\bp fails.
The first form lists the active jobs. The options have the fol-
lowing meanings:
-\b-l\bl List process IDs in addition to the normal information.
- -\b-n\bn Display information only about jobs that have changed
- status since the user was last notified of their status.
- -\b-p\bp List only the process ID of the job's process group
+ -\b-n\bn Display information only about jobs that have changed
+ status since the user was last notified of their status.
+ -\b-p\bp List only the process ID of the job's process group
leader.
-\b-r\br Display only running jobs.
-\b-s\bs Display only stopped jobs.
- If _\bj_\bo_\bb_\bs_\bp_\be_\bc is given, output is restricted to information about
- that job. The return status is 0 unless an invalid option is
+ If _\bj_\bo_\bb_\bs_\bp_\be_\bc is given, output is restricted to information about
+ that job. The return status is 0 unless an invalid option is
encountered or an invalid _\bj_\bo_\bb_\bs_\bp_\be_\bc is supplied.
If the -\b-x\bx option is supplied, j\bjo\bob\bbs\bs replaces any _\bj_\bo_\bb_\bs_\bp_\be_\bc found in
- _\bc_\bo_\bm_\bm_\ba_\bn_\bd or _\ba_\br_\bg_\bs with the corresponding process group ID, and
+ _\bc_\bo_\bm_\bm_\ba_\bn_\bd or _\ba_\br_\bg_\bs with the corresponding process group ID, and
executes _\bc_\bo_\bm_\bm_\ba_\bn_\bd passing it _\ba_\br_\bg_\bs, returning its exit status.
k\bki\bil\bll\bl [-\b-s\bs _\bs_\bi_\bg_\bs_\bp_\be_\bc | -\b-n\bn _\bs_\bi_\bg_\bn_\bu_\bm | -\b-_\bs_\bi_\bg_\bs_\bp_\be_\bc] [_\bp_\bi_\bd | _\bj_\bo_\bb_\bs_\bp_\be_\bc] ...
k\bki\bil\bll\bl -\b-l\bl [_\bs_\bi_\bg_\bs_\bp_\be_\bc | _\be_\bx_\bi_\bt_\b__\bs_\bt_\ba_\bt_\bu_\bs]
- Send the signal named by _\bs_\bi_\bg_\bs_\bp_\be_\bc or _\bs_\bi_\bg_\bn_\bu_\bm to the processes
- named by _\bp_\bi_\bd or _\bj_\bo_\bb_\bs_\bp_\be_\bc. _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a case-insensitive
- signal name such as S\bSI\bIG\bGK\bKI\bIL\bLL\bL (with or without the S\bSI\bIG\bG prefix) or
- a signal number; _\bs_\bi_\bg_\bn_\bu_\bm is a signal number. If _\bs_\bi_\bg_\bs_\bp_\be_\bc is not
- present, then S\bSI\bIG\bGT\bTE\bER\bRM\bM is assumed. An argument of -\b-l\bl lists the
- signal names. If any arguments are supplied when -\b-l\bl is given,
- the names of the signals corresponding to the arguments are
+ Send the signal named by _\bs_\bi_\bg_\bs_\bp_\be_\bc or _\bs_\bi_\bg_\bn_\bu_\bm to the processes
+ named by _\bp_\bi_\bd or _\bj_\bo_\bb_\bs_\bp_\be_\bc. _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a case-insensitive
+ signal name such as S\bSI\bIG\bGK\bKI\bIL\bLL\bL (with or without the S\bSI\bIG\bG prefix) or
+ a signal number; _\bs_\bi_\bg_\bn_\bu_\bm is a signal number. If _\bs_\bi_\bg_\bs_\bp_\be_\bc is not
+ present, then S\bSI\bIG\bGT\bTE\bER\bRM\bM is assumed. An argument of -\b-l\bl lists the
+ signal names. If any arguments are supplied when -\b-l\bl is given,
+ the names of the signals corresponding to the arguments are
listed, and the return status is 0. The _\be_\bx_\bi_\bt_\b__\bs_\bt_\ba_\bt_\bu_\bs argument to
- -\b-l\bl is a number specifying either a signal number or the exit
- status of a process terminated by a signal. k\bki\bil\bll\bl returns true
- if at least one signal was successfully sent, or false if an
+ -\b-l\bl is a number specifying either a signal number or the exit
+ status of a process terminated by a signal. k\bki\bil\bll\bl returns true
+ if at least one signal was successfully sent, or false if an
error occurs or an invalid option is encountered.
l\ble\bet\bt _\ba_\br_\bg [_\ba_\br_\bg ...]
Each _\ba_\br_\bg is an arithmetic expression to be evaluated (see A\bAR\bRI\bIT\bTH\bH-\b-
- M\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above). If the last _\ba_\br_\bg evaluates to 0, l\ble\bet\bt
+ M\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above). If the last _\ba_\br_\bg evaluates to 0, l\ble\bet\bt
returns 1; 0 is returned otherwise.
l\blo\boc\bca\bal\bl [_\bo_\bp_\bt_\bi_\bo_\bn] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
- For each argument, a local variable named _\bn_\ba_\bm_\be is created, and
- assigned _\bv_\ba_\bl_\bu_\be. The _\bo_\bp_\bt_\bi_\bo_\bn can be any of the options accepted
+ For each argument, a local variable named _\bn_\ba_\bm_\be is created, and
+ assigned _\bv_\ba_\bl_\bu_\be. The _\bo_\bp_\bt_\bi_\bo_\bn can be any of the options accepted
by d\bde\bec\bcl\bla\bar\bre\be. When l\blo\boc\bca\bal\bl is used within a function, it causes the
- variable _\bn_\ba_\bm_\be to have a visible scope restricted to that func-
+ variable _\bn_\ba_\bm_\be to have a visible scope restricted to that func-
tion and its children. With no operands, l\blo\boc\bca\bal\bl writes a list of
- local variables to the standard output. It is an error to use
+ local variables to the standard output. It is an error to use
l\blo\boc\bca\bal\bl when not within a function. The return status is 0 unless
- l\blo\boc\bca\bal\bl is used outside a function, an invalid _\bn_\ba_\bm_\be is supplied,
+ l\blo\boc\bca\bal\bl is used outside a function, an invalid _\bn_\ba_\bm_\be is supplied,
or _\bn_\ba_\bm_\be is a readonly variable.
l\blo\bog\bgo\bou\but\bt Exit a login shell.
- m\bma\bap\bpf\bfi\bil\ble\be [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk]
+ m\bma\bap\bpf\bfi\bil\ble\be [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk]
[-\b-c\bc _\bq_\bu_\ba_\bn_\bt_\bu_\bm] [_\ba_\br_\br_\ba_\by]
- r\bre\bea\bad\bda\bar\brr\bra\bay\by [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk]
+ r\bre\bea\bad\bda\bar\brr\bra\bay\by [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk]
[-\b-c\bc _\bq_\bu_\ba_\bn_\bt_\bu_\bm] [_\ba_\br_\br_\ba_\by]
- Read lines from the standard input into the indexed array vari-
- able _\ba_\br_\br_\ba_\by, or from file descriptor _\bf_\bd if the -\b-u\bu option is sup-
- plied. The variable M\bMA\bAP\bPF\bFI\bIL\bLE\bE is the default _\ba_\br_\br_\ba_\by. Options, if
+ Read lines from the standard input into the indexed array vari-
+ able _\ba_\br_\br_\ba_\by, or from file descriptor _\bf_\bd if the -\b-u\bu option is sup-
+ plied. The variable M\bMA\bAP\bPF\bFI\bIL\bLE\bE is the default _\ba_\br_\br_\ba_\by. Options, if
supplied, have the following meanings:
- -\b-n\bn Copy at most _\bc_\bo_\bu_\bn_\bt lines. If _\bc_\bo_\bu_\bn_\bt is 0, all lines are
+ -\b-n\bn Copy at most _\bc_\bo_\bu_\bn_\bt lines. If _\bc_\bo_\bu_\bn_\bt is 0, all lines are
copied.
- -\b-O\bO Begin assigning to _\ba_\br_\br_\ba_\by at index _\bo_\br_\bi_\bg_\bi_\bn. The default
+ -\b-O\bO Begin assigning to _\ba_\br_\br_\ba_\by at index _\bo_\br_\bi_\bg_\bi_\bn. The default
index is 0.
-\b-s\bs Discard the first _\bc_\bo_\bu_\bn_\bt lines read.
-\b-t\bt Remove a trailing newline from each line read.
- -\b-u\bu Read lines from file descriptor _\bf_\bd instead of the stan-
+ -\b-u\bu Read lines from file descriptor _\bf_\bd instead of the stan-
dard input.
- -\b-C\bC Evaluate _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk each time _\bq_\bu_\ba_\bn_\bt_\bu_\bm lines are read. The
+ -\b-C\bC Evaluate _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk each time _\bq_\bu_\ba_\bn_\bt_\bu_\bm lines are read. The
-\b-c\bc option specifies _\bq_\bu_\ba_\bn_\bt_\bu_\bm.
- -\b-c\bc Specify the number of lines read between each call to
+ -\b-c\bc Specify the number of lines read between each call to
_\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk.
- If -\b-C\bC is specified without -\b-c\bc, the default quantum is 5000.
+ If -\b-C\bC is specified without -\b-c\bc, the default quantum is 5000.
When _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated, it is supplied the index of the next
array element to be assigned and the line to be assigned to that
- element as additional arguments. _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated after
+ element as additional arguments. _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated after
the line is read but before the array element is assigned.
- If not supplied with an explicit origin, m\bma\bap\bpf\bfi\bil\ble\be will clear
+ If not supplied with an explicit origin, m\bma\bap\bpf\bfi\bil\ble\be will clear
_\ba_\br_\br_\ba_\by before assigning to it.
- m\bma\bap\bpf\bfi\bil\ble\be returns successfully unless an invalid option or option
- argument is supplied, _\ba_\br_\br_\ba_\by is invalid or unassignable, or if
+ m\bma\bap\bpf\bfi\bil\ble\be returns successfully unless an invalid option or option
+ argument is supplied, _\ba_\br_\br_\ba_\by is invalid or unassignable, or if
_\ba_\br_\br_\ba_\by is not an indexed array.
p\bpo\bop\bpd\bd [-n\bn] [+_\bn] [-_\bn]
- Removes entries from the directory stack. With no arguments,
- removes the top directory from the stack, and performs a c\bcd\bd to
+ Removes entries from the directory stack. With no arguments,
+ removes the top directory from the stack, and performs a c\bcd\bd to
the new top directory. Arguments, if supplied, have the follow-
ing meanings:
- -\b-n\bn Suppresses the normal change of directory when removing
- directories from the stack, so that only the stack is
+ -\b-n\bn Suppresses the normal change of directory when removing
+ directories from the stack, so that only the stack is
manipulated.
- +\b+_\bn Removes the _\bnth entry counting from the left of the list
- shown by d\bdi\bir\brs\bs, starting with zero. For example: ``popd
+ +\b+_\bn Removes the _\bnth entry counting from the left of the list
+ shown by d\bdi\bir\brs\bs, starting with zero. For example: ``popd
+0'' removes the first directory, ``popd +1'' the second.
-\b-_\bn Removes the _\bnth entry counting from the right of the list
- shown by d\bdi\bir\brs\bs, starting with zero. For example: ``popd
- -0'' removes the last directory, ``popd -1'' the next to
+ shown by d\bdi\bir\brs\bs, starting with zero. For example: ``popd
+ -0'' removes the last directory, ``popd -1'' the next to
last.
- If the p\bpo\bop\bpd\bd command is successful, a d\bdi\bir\brs\bs is performed as well,
- and the return status is 0. p\bpo\bop\bpd\bd returns false if an invalid
+ If the p\bpo\bop\bpd\bd command is successful, a d\bdi\bir\brs\bs is performed as well,
+ and the return status is 0. p\bpo\bop\bpd\bd returns false if an invalid
option is encountered, the directory stack is empty, a non-exis-
tent directory stack entry is specified, or the directory change
fails.
p\bpr\bri\bin\bnt\btf\bf [-\b-v\bv _\bv_\ba_\br] _\bf_\bo_\br_\bm_\ba_\bt [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- Write the formatted _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs to the standard output under the
- control of the _\bf_\bo_\br_\bm_\ba_\bt. The -\b-v\bv option causes the output to be
- assigned to the variable _\bv_\ba_\br rather than being printed to the
+ Write the formatted _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs to the standard output under the
+ control of the _\bf_\bo_\br_\bm_\ba_\bt. The -\b-v\bv option causes the output to be
+ assigned to the variable _\bv_\ba_\br rather than being printed to the
standard output.
- The _\bf_\bo_\br_\bm_\ba_\bt is a character string which contains three types of
- objects: plain characters, which are simply copied to standard
- output, character escape sequences, which are converted and
- copied to the standard output, and format specifications, each
- of which causes printing of the next successive _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt. In
+ The _\bf_\bo_\br_\bm_\ba_\bt is a character string which contains three types of
+ objects: plain characters, which are simply copied to standard
+ output, character escape sequences, which are converted and
+ copied to the standard output, and format specifications, each
+ of which causes printing of the next successive _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt. In
addition to the standard _\bp_\br_\bi_\bn_\bt_\bf(1) format specifications, p\bpr\bri\bin\bnt\btf\bf
interprets the following extensions:
%\b%b\bb causes p\bpr\bri\bin\bnt\btf\bf to expand backslash escape sequences in the
corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt (except that \\b\c\bc terminates output,
- backslashes in \\b\'\b', \\b\"\b", and \\b\?\b? are not removed, and octal
+ backslashes in \\b\'\b', \\b\"\b", and \\b\?\b? are not removed, and octal
escapes beginning with \\b\0\b0 may contain up to four digits).
- %\b%q\bq causes p\bpr\bri\bin\bnt\btf\bf to output the corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in a
+ %\b%q\bq causes p\bpr\bri\bin\bnt\btf\bf to output the corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in a
format that can be reused as shell input.
%\b%(\b(_\bd_\ba_\bt_\be_\bf_\bm_\bt)\b)T\bT
- causes p\bpr\bri\bin\bnt\btf\bf to output the date-time string resulting
- from using _\bd_\ba_\bt_\be_\bf_\bm_\bt as a format string for _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3).
+ causes p\bpr\bri\bin\bnt\btf\bf to output the date-time string resulting
+ from using _\bd_\ba_\bt_\be_\bf_\bm_\bt as a format string for _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3).
The corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt is an integer representing the
- number of seconds since the epoch. Two special argument
- values may be used: -1 represents the current time, and
- -2 represents the time the shell was invoked. If no
- argument is specified, conversion behaves as if -1 had
- been given. This is an exception to the usual p\bpr\bri\bin\bnt\btf\bf
+ number of seconds since the epoch. Two special argument
+ values may be used: -1 represents the current time, and
+ -2 represents the time the shell was invoked. If no
+ argument is specified, conversion behaves as if -1 had
+ been given. This is an exception to the usual p\bpr\bri\bin\bnt\btf\bf
behavior.
- Arguments to non-string format specifiers are treated as C con-
+ Arguments to non-string format specifiers are treated as C con-
stants, except that a leading plus or minus sign is allowed, and
- if the leading character is a single or double quote, the value
+ if the leading character is a single or double quote, the value
is the ASCII value of the following character.
- The _\bf_\bo_\br_\bm_\ba_\bt is reused as necessary to consume all of the _\ba_\br_\bg_\bu_\b-
+ The _\bf_\bo_\br_\bm_\ba_\bt is reused as necessary to consume all of the _\ba_\br_\bg_\bu_\b-
_\bm_\be_\bn_\bt_\bs. If the _\bf_\bo_\br_\bm_\ba_\bt requires more _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs than are supplied,
- the extra format specifications behave as if a zero value or
- null string, as appropriate, had been supplied. The return
+ the extra format specifications behave as if a zero value or
+ null string, as appropriate, had been supplied. The return
value is zero on success, non-zero on failure.
p\bpu\bus\bsh\bhd\bd [-\b-n\bn] [+_\bn] [-_\bn]
p\bpu\bus\bsh\bhd\bd [-\b-n\bn] [_\bd_\bi_\br]
- Adds a directory to the top of the directory stack, or rotates
- the stack, making the new top of the stack the current working
+ Adds a directory to the top of the directory stack, or rotates
+ the stack, making the new top of the stack the current working
directory. With no arguments, exchanges the top two directories
- and returns 0, unless the directory stack is empty. Arguments,
+ and returns 0, unless the directory stack is empty. Arguments,
if supplied, have the following meanings:
- -\b-n\bn Suppresses the normal change of directory when adding
- directories to the stack, so that only the stack is
+ -\b-n\bn Suppresses the normal change of directory when adding
+ directories to the stack, so that only the stack is
manipulated.
- +\b+_\bn Rotates the stack so that the _\bnth directory (counting
- from the left of the list shown by d\bdi\bir\brs\bs, starting with
+ +\b+_\bn Rotates the stack so that the _\bnth directory (counting
+ from the left of the list shown by d\bdi\bir\brs\bs, starting with
zero) is at the top.
- -\b-_\bn Rotates the stack so that the _\bnth directory (counting
- from the right of the list shown by d\bdi\bir\brs\bs, starting with
+ -\b-_\bn Rotates the stack so that the _\bnth directory (counting
+ from the right of the list shown by d\bdi\bir\brs\bs, starting with
zero) is at the top.
_\bd_\bi_\br Adds _\bd_\bi_\br to the directory stack at the top, making it the
- new current working directory as if it had been supplied
+ new current working directory as if it had been supplied
as the argument to the c\bcd\bd builtin.
If the p\bpu\bus\bsh\bhd\bd command is successful, a d\bdi\bir\brs\bs is performed as well.
- If the first form is used, p\bpu\bus\bsh\bhd\bd returns 0 unless the cd to _\bd_\bi_\br
- fails. With the second form, p\bpu\bus\bsh\bhd\bd returns 0 unless the direc-
- tory stack is empty, a non-existent directory stack element is
- specified, or the directory change to the specified new current
+ If the first form is used, p\bpu\bus\bsh\bhd\bd returns 0 unless the cd to _\bd_\bi_\br
+ fails. With the second form, p\bpu\bus\bsh\bhd\bd returns 0 unless the direc-
+ tory stack is empty, a non-existent directory stack element is
+ specified, or the directory change to the specified new current
directory fails.
p\bpw\bwd\bd [-\b-L\bLP\bP]
- Print the absolute pathname of the current working directory.
+ Print the absolute pathname of the current working directory.
The pathname printed contains no symbolic links if the -\b-P\bP option
is supplied or the -\b-o\bo p\bph\bhy\bys\bsi\bic\bca\bal\bl option to the s\bse\bet\bt builtin command
- is enabled. If the -\b-L\bL option is used, the pathname printed may
- contain symbolic links. The return status is 0 unless an error
- occurs while reading the name of the current directory or an
+ is enabled. If the -\b-L\bL option is used, the pathname printed may
+ contain symbolic links. The return status is 0 unless an error
+ occurs while reading the name of the current directory or an
invalid option is supplied.
r\bre\bea\bad\bd [-\b-e\ber\brs\bs] [-\b-a\ba _\ba_\bn_\ba_\bm_\be] [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-i\bi _\bt_\be_\bx_\bt] [-\b-n\bn _\bn_\bc_\bh_\ba_\br_\bs] [-\b-N\bN _\bn_\bc_\bh_\ba_\br_\bs] [-\b-p\bp
_\bp_\br_\bo_\bm_\bp_\bt] [-\b-t\bt _\bt_\bi_\bm_\be_\bo_\bu_\bt] [-\b-u\bu _\bf_\bd] [_\bn_\ba_\bm_\be ...]
- One line is read from the standard input, or from the file
- descriptor _\bf_\bd supplied as an argument to the -\b-u\bu option, and the
+ One line is read from the standard input, or from the file
+ descriptor _\bf_\bd supplied as an argument to the -\b-u\bu option, and the
first word is assigned to the first _\bn_\ba_\bm_\be, the second word to the
- second _\bn_\ba_\bm_\be, and so on, with leftover words and their interven-
- ing separators assigned to the last _\bn_\ba_\bm_\be. If there are fewer
+ second _\bn_\ba_\bm_\be, and so on, with leftover words and their interven-
+ ing separators assigned to the last _\bn_\ba_\bm_\be. If there are fewer
words read from the input stream than names, the remaining names
- are assigned empty values. The characters in I\bIF\bFS\bS are used to
- split the line into words using the same rules the shell uses
+ are assigned empty values. The characters in I\bIF\bFS\bS are used to
+ split the line into words using the same rules the shell uses
for expansion (described above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg). The back-
- slash character (\\b\) may be used to remove any special meaning
+ slash character (\\b\) may be used to remove any special meaning
for the next character read and for line continuation. Options,
if supplied, have the following meanings:
-\b-a\ba _\ba_\bn_\ba_\bm_\be
new values are assigned. Other _\bn_\ba_\bm_\be arguments are
ignored.
-\b-d\bd _\bd_\be_\bl_\bi_\bm
- The first character of _\bd_\be_\bl_\bi_\bm is used to terminate the
+ The first character of _\bd_\be_\bl_\bi_\bm is used to terminate the
input line, rather than newline.
-\b-e\be If the standard input is coming from a terminal, r\bre\bea\bad\bdl\bli\bin\bne\be
- (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE above) is used to obtain the line. Read-
- line uses the current (or default, if line editing was
+ (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE above) is used to obtain the line. Read-
+ line uses the current (or default, if line editing was
not previously active) editing settings.
-\b-i\bi _\bt_\be_\bx_\bt
- If r\bre\bea\bad\bdl\bli\bin\bne\be is being used to read the line, _\bt_\be_\bx_\bt is
+ If r\bre\bea\bad\bdl\bli\bin\bne\be is being used to read the line, _\bt_\be_\bx_\bt is
placed into the editing buffer before editing begins.
-\b-n\bn _\bn_\bc_\bh_\ba_\br_\bs
- r\bre\bea\bad\bd returns after reading _\bn_\bc_\bh_\ba_\br_\bs characters rather than
- waiting for a complete line of input, but honor a delim-
- iter if fewer than _\bn_\bc_\bh_\ba_\br_\bs characters are read before the
+ r\bre\bea\bad\bd returns after reading _\bn_\bc_\bh_\ba_\br_\bs characters rather than
+ waiting for a complete line of input, but honor a delim-
+ iter if fewer than _\bn_\bc_\bh_\ba_\br_\bs characters are read before the
delimiter.
-\b-N\bN _\bn_\bc_\bh_\ba_\br_\bs
- r\bre\bea\bad\bd returns after reading exactly _\bn_\bc_\bh_\ba_\br_\bs characters
- rather than waiting for a complete line of input, unless
- EOF is encountered or r\bre\bea\bad\bd times out. Delimiter charac-
- ters encountered in the input are not treated specially
- and do not cause r\bre\bea\bad\bd to return until _\bn_\bc_\bh_\ba_\br_\bs characters
+ r\bre\bea\bad\bd returns after reading exactly _\bn_\bc_\bh_\ba_\br_\bs characters
+ rather than waiting for a complete line of input, unless
+ EOF is encountered or r\bre\bea\bad\bd times out. Delimiter charac-
+ ters encountered in the input are not treated specially
+ and do not cause r\bre\bea\bad\bd to return until _\bn_\bc_\bh_\ba_\br_\bs characters
are read.
-\b-p\bp _\bp_\br_\bo_\bm_\bp_\bt
Display _\bp_\br_\bo_\bm_\bp_\bt on standard error, without a trailing new-
line, before attempting to read any input. The prompt is
displayed only if input is coming from a terminal.
-\b-r\br Backslash does not act as an escape character. The back-
- slash is considered to be part of the line. In particu-
- lar, a backslash-newline pair may not be used as a line
+ slash is considered to be part of the line. In particu-
+ lar, a backslash-newline pair may not be used as a line
continuation.
-\b-s\bs Silent mode. If input is coming from a terminal, charac-
ters are not echoed.
-\b-t\bt _\bt_\bi_\bm_\be_\bo_\bu_\bt
- Cause r\bre\bea\bad\bd to time out and return failure if a complete
- line of input (or a specified number of characters) is
- not read within _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds. _\bt_\bi_\bm_\be_\bo_\bu_\bt may be a deci-
- mal number with a fractional portion following the deci-
- mal point. This option is only effective if r\bre\bea\bad\bd is
- reading input from a terminal, pipe, or other special
- file; it has no effect when reading from regular files.
+ Cause r\bre\bea\bad\bd to time out and return failure if a complete
+ line of input (or a specified number of characters) is
+ not read within _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds. _\bt_\bi_\bm_\be_\bo_\bu_\bt may be a deci-
+ mal number with a fractional portion following the deci-
+ mal point. This option is only effective if r\bre\bea\bad\bd is
+ reading input from a terminal, pipe, or other special
+ file; it has no effect when reading from regular files.
If r\bre\bea\bad\bd times out, r\bre\bea\bad\bd saves any partial input read into
- the specified variable _\bn_\ba_\bm_\be. If _\bt_\bi_\bm_\be_\bo_\bu_\bt is 0, r\bre\bea\bad\bd
- returns immediately, without trying to read any data.
- The exit status is 0 if input is available on the speci-
- fied file descriptor, non-zero otherwise. The exit sta-
+ the specified variable _\bn_\ba_\bm_\be. If _\bt_\bi_\bm_\be_\bo_\bu_\bt is 0, r\bre\bea\bad\bd
+ returns immediately, without trying to read any data.
+ The exit status is 0 if input is available on the speci-
+ fied file descriptor, non-zero otherwise. The exit sta-
tus is greater than 128 if the timeout is exceeded.
-\b-u\bu _\bf_\bd Read input from file descriptor _\bf_\bd.
If no _\bn_\ba_\bm_\be_\bs are supplied, the line read is assigned to the vari-
- able R\bRE\bEP\bPL\bLY\bY. The return code is zero, unless end-of-file is
- encountered, r\bre\bea\bad\bd times out (in which case the return code is
- greater than 128), a variable assignment error (such as assign-
- ing to a readonly variable) occurs, or an invalid file descrip-
+ able R\bRE\bEP\bPL\bLY\bY. The return code is zero, unless end-of-file is
+ encountered, r\bre\bea\bad\bd times out (in which case the return code is
+ greater than 128), a variable assignment error (such as assign-
+ ing to a readonly variable) occurs, or an invalid file descrip-
tor is supplied as the argument to -\b-u\bu.
r\bre\bea\bad\bdo\bon\bnl\bly\by [-\b-a\baA\bAf\bf] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bw_\bo_\br_\bd] ...]
- The given _\bn_\ba_\bm_\be_\bs are marked readonly; the values of these _\bn_\ba_\bm_\be_\bs
- may not be changed by subsequent assignment. If the -\b-f\bf option
- is supplied, the functions corresponding to the _\bn_\ba_\bm_\be_\bs are so
- marked. The -\b-a\ba option restricts the variables to indexed
- arrays; the -\b-A\bA option restricts the variables to associative
- arrays. If both options are supplied, -\b-A\bA takes precedence. If
- no _\bn_\ba_\bm_\be arguments are given, or if the -\b-p\bp option is supplied, a
+ The given _\bn_\ba_\bm_\be_\bs are marked readonly; the values of these _\bn_\ba_\bm_\be_\bs
+ may not be changed by subsequent assignment. If the -\b-f\bf option
+ is supplied, the functions corresponding to the _\bn_\ba_\bm_\be_\bs are so
+ marked. The -\b-a\ba option restricts the variables to indexed
+ arrays; the -\b-A\bA option restricts the variables to associative
+ arrays. If both options are supplied, -\b-A\bA takes precedence. If
+ no _\bn_\ba_\bm_\be arguments are given, or if the -\b-p\bp option is supplied, a
list of all readonly names is printed. The other options may be
- used to restrict the output to a subset of the set of readonly
- names. The -\b-p\bp option causes output to be displayed in a format
- that may be reused as input. If a variable name is followed by
- =_\bw_\bo_\br_\bd, the value of the variable is set to _\bw_\bo_\br_\bd. The return
- status is 0 unless an invalid option is encountered, one of the
+ used to restrict the output to a subset of the set of readonly
+ names. The -\b-p\bp option causes output to be displayed in a format
+ that may be reused as input. If a variable name is followed by
+ =_\bw_\bo_\br_\bd, the value of the variable is set to _\bw_\bo_\br_\bd. The return
+ status is 0 unless an invalid option is encountered, one of the
_\bn_\ba_\bm_\be_\bs is not a valid shell variable name, or -\b-f\bf is supplied with
a _\bn_\ba_\bm_\be that is not a function.
r\bre\bet\btu\bur\brn\bn [_\bn]
- Causes a function to stop executing and return the value speci-
- fied by _\bn to its caller. If _\bn is omitted, the return status is
- that of the last command executed in the function body. If
- r\bre\bet\btu\bur\brn\bn is used outside a function, but during execution of a
- script by the .\b. (s\bso\bou\bur\brc\bce\be) command, it causes the shell to stop
- executing that script and return either _\bn or the exit status of
- the last command executed within the script as the exit status
- of the script. If _\bn is supplied, the return value is its least
- significant 8 bits. The return status is non-zero if r\bre\bet\btu\bur\brn\bn is
- supplied a non-numeric argument, or is used outside a function
- and not during execution of a script by .\b. or s\bso\bou\bur\brc\bce\be. Any com-
- mand associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed before execu-
+ Causes a function to stop executing and return the value speci-
+ fied by _\bn to its caller. If _\bn is omitted, the return status is
+ that of the last command executed in the function body. If
+ r\bre\bet\btu\bur\brn\bn is used outside a function, but during execution of a
+ script by the .\b. (s\bso\bou\bur\brc\bce\be) command, it causes the shell to stop
+ executing that script and return either _\bn or the exit status of
+ the last command executed within the script as the exit status
+ of the script. If _\bn is supplied, the return value is its least
+ significant 8 bits. The return status is non-zero if r\bre\bet\btu\bur\brn\bn is
+ supplied a non-numeric argument, or is used outside a function
+ and not during execution of a script by .\b. or s\bso\bou\bur\brc\bce\be. Any com-
+ mand associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed before execu-
tion resumes after the function or script.
s\bse\bet\bt [-\b--\b-a\bab\bbe\bef\bfh\bhk\bkm\bmn\bnp\bpt\btu\buv\bvx\bxB\bBC\bCE\bEH\bHP\bPT\bT] [-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be] [_\ba_\br_\bg ...]
s\bse\bet\bt [+\b+a\bab\bbe\bef\bfh\bhk\bkm\bmn\bnp\bpt\btu\buv\bvx\bxB\bBC\bCE\bEH\bHP\bPT\bT] [+\b+o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be] [_\ba_\br_\bg ...]
- Without options, the name and value of each shell variable are
+ Without options, the name and value of each shell variable are
displayed in a format that can be reused as input for setting or
resetting the currently-set variables. Read-only variables can-
- not be reset. In _\bp_\bo_\bs_\bi_\bx mode, only shell variables are listed.
- The output is sorted according to the current locale. When
- options are specified, they set or unset shell attributes. Any
- arguments remaining after option processing are treated as val-
+ not be reset. In _\bp_\bo_\bs_\bi_\bx mode, only shell variables are listed.
+ The output is sorted according to the current locale. When
+ options are specified, they set or unset shell attributes. Any
+ arguments remaining after option processing are treated as val-
ues for the positional parameters and are assigned, in order, to
- $\b$1\b1, $\b$2\b2, .\b..\b..\b. $\b$_\bn. Options, if specified, have the following
+ $\b$1\b1, $\b$2\b2, .\b..\b..\b. $\b$_\bn. Options, if specified, have the following
meanings:
- -\b-a\ba Automatically mark variables and functions which are
- modified or created for export to the environment of
+ -\b-a\ba Automatically mark variables and functions which are
+ modified or created for export to the environment of
subsequent commands.
- -\b-b\bb Report the status of terminated background jobs immedi-
+ -\b-b\bb Report the status of terminated background jobs immedi-
ately, rather than before the next primary prompt. This
is effective only when job control is enabled.
- -\b-e\be Exit immediately if a _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be (which may consist of a
- single _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd), a _\bl_\bi_\bs_\bt, or a _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd _\bc_\bo_\bm_\bm_\ba_\bn_\bd
- (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR above), exits with a non-zero sta-
- tus. The shell does not exit if the command that fails
- is part of the command list immediately following a
- w\bwh\bhi\bil\ble\be or u\bun\bnt\bti\bil\bl keyword, part of the test following the
- i\bif\bf or e\bel\bli\bif\bf reserved words, part of any command executed
- in a &\b&&\b& or |\b||\b| list except the command following the
- final &\b&&\b& or |\b||\b|, any command in a pipeline but the last,
- or if the command's return value is being inverted with
- !\b!. If a compound command other than a subshell returns
- a non-zero status because a command failed while -\b-e\be was
- being ignored, the shell does not exit. A trap on E\bER\bRR\bR,
+ -\b-e\be Exit immediately if a _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be (which may consist of a
+ single _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd), a _\bl_\bi_\bs_\bt, or a _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd _\bc_\bo_\bm_\bm_\ba_\bn_\bd
+ (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR above), exits with a non-zero sta-
+ tus. The shell does not exit if the command that fails
+ is part of the command list immediately following a
+ w\bwh\bhi\bil\ble\be or u\bun\bnt\bti\bil\bl keyword, part of the test following the
+ i\bif\bf or e\bel\bli\bif\bf reserved words, part of any command executed
+ in a &\b&&\b& or |\b||\b| list except the command following the
+ final &\b&&\b& or |\b||\b|, any command in a pipeline but the last,
+ or if the command's return value is being inverted with
+ !\b!. If a compound command other than a subshell returns
+ a non-zero status because a command failed while -\b-e\be was
+ being ignored, the shell does not exit. A trap on E\bER\bRR\bR,
if set, is executed before the shell exits. This option
applies to the shell environment and each subshell envi-
- ronment separately (see C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
+ ronment separately (see C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
above), and may cause subshells to exit before executing
all the commands in the subshell.
- If a compound command or shell function executes in a
- context where -\b-e\be is being ignored, none of the commands
- executed within the compound command or function body
- will be affected by the -\b-e\be setting, even if -\b-e\be is set
- and a command returns a failure status. If a compound
- command or shell function sets -\b-e\be while executing in a
- context where -\b-e\be is ignored, that setting will not have
- any effect until the compound command or the command
+ If a compound command or shell function executes in a
+ context where -\b-e\be is being ignored, none of the commands
+ executed within the compound command or function body
+ will be affected by the -\b-e\be setting, even if -\b-e\be is set
+ and a command returns a failure status. If a compound
+ command or shell function sets -\b-e\be while executing in a
+ context where -\b-e\be is ignored, that setting will not have
+ any effect until the compound command or the command
containing the function call completes.
-\b-f\bf Disable pathname expansion.
- -\b-h\bh Remember the location of commands as they are looked up
+ -\b-h\bh Remember the location of commands as they are looked up
for execution. This is enabled by default.
- -\b-k\bk All arguments in the form of assignment statements are
- placed in the environment for a command, not just those
+ -\b-k\bk All arguments in the form of assignment statements are
+ placed in the environment for a command, not just those
that precede the command name.
- -\b-m\bm Monitor mode. Job control is enabled. This option is
- on by default for interactive shells on systems that
- support it (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL above). All processes run
+ -\b-m\bm Monitor mode. Job control is enabled. This option is
+ on by default for interactive shells on systems that
+ support it (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL above). All processes run
in a separate process group. When a background job com-
pletes, the shell prints a line containing its exit sta-
tus.
-\b-n\bn Read commands but do not execute them. This may be used
- to check a shell script for syntax errors. This is
+ to check a shell script for syntax errors. This is
ignored by interactive shells.
-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be
The _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be can be one of the following:
Same as -\b-a\ba.
b\bbr\bra\bac\bce\bee\bex\bxp\bpa\ban\bnd\bd
Same as -\b-B\bB.
- e\bem\bma\bac\bcs\bs Use an emacs-style command line editing inter-
+ e\bem\bma\bac\bcs\bs Use an emacs-style command line editing inter-
face. This is enabled by default when the shell
is interactive, unless the shell is started with
- the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option. This also affects the
+ the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option. This also affects the
editing interface used for r\bre\bea\bad\bd -\b-e\be.
e\ber\brr\bre\bex\bxi\bit\bt Same as -\b-e\be.
e\ber\brr\brt\btr\bra\bac\bce\be
H\bHI\bIS\bST\bTO\bOR\bRY\bY. This option is on by default in inter-
active shells.
i\big\bgn\bno\bor\bre\bee\beo\bof\bf
- The effect is as if the shell command
- ``IGNOREEOF=10'' had been executed (see S\bSh\bhe\bel\bll\bl
+ The effect is as if the shell command
+ ``IGNOREEOF=10'' had been executed (see S\bSh\bhe\bel\bll\bl
V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs above).
k\bke\bey\byw\bwo\bor\brd\bd Same as -\b-k\bk.
m\bmo\bon\bni\bit\bto\bor\br Same as -\b-m\bm.
p\bph\bhy\bys\bsi\bic\bca\bal\bl
Same as -\b-P\bP.
p\bpi\bip\bpe\bef\bfa\bai\bil\bl
- If set, the return value of a pipeline is the
- value of the last (rightmost) command to exit
- with a non-zero status, or zero if all commands
- in the pipeline exit successfully. This option
+ If set, the return value of a pipeline is the
+ value of the last (rightmost) command to exit
+ with a non-zero status, or zero if all commands
+ in the pipeline exit successfully. This option
is disabled by default.
- p\bpo\bos\bsi\bix\bx Change the behavior of b\bba\bas\bsh\bh where the default
- operation differs from the POSIX standard to
- match the standard (_\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be). See S\bSE\bEE\bE A\bAL\bLS\bSO\bO
+ p\bpo\bos\bsi\bix\bx Change the behavior of b\bba\bas\bsh\bh where the default
+ operation differs from the POSIX standard to
+ match the standard (_\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be). See S\bSE\bEE\bE A\bAL\bLS\bSO\bO
below for a reference to a document that details
how posix mode affects bash's behavior.
p\bpr\bri\biv\bvi\bil\ble\beg\bge\bed\bd
Same as -\b-p\bp.
v\bve\ber\brb\bbo\bos\bse\be Same as -\b-v\bv.
- v\bvi\bi Use a vi-style command line editing interface.
+ v\bvi\bi Use a vi-style command line editing interface.
This also affects the editing interface used for
r\bre\bea\bad\bd -\b-e\be.
x\bxt\btr\bra\bac\bce\be Same as -\b-x\bx.
If -\b-o\bo is supplied with no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, the values of the
- current options are printed. If +\b+o\bo is supplied with no
- _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, a series of s\bse\bet\bt commands to recreate the
- current option settings is displayed on the standard
+ current options are printed. If +\b+o\bo is supplied with no
+ _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, a series of s\bse\bet\bt commands to recreate the
+ current option settings is displayed on the standard
output.
- -\b-p\bp Turn on _\bp_\br_\bi_\bv_\bi_\bl_\be_\bg_\be_\bd mode. In this mode, the $\b$E\bEN\bNV\bV and
- $\b$B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV files are not processed, shell functions are
- not inherited from the environment, and the S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS,
- B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS, C\bCD\bDP\bPA\bAT\bTH\bH, and G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE variables, if they
+ -\b-p\bp Turn on _\bp_\br_\bi_\bv_\bi_\bl_\be_\bg_\be_\bd mode. In this mode, the $\b$E\bEN\bNV\bV and
+ $\b$B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV files are not processed, shell functions are
+ not inherited from the environment, and the S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS,
+ B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS, C\bCD\bDP\bPA\bAT\bTH\bH, and G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE variables, if they
appear in the environment, are ignored. If the shell is
- started with the effective user (group) id not equal to
- the real user (group) id, and the -\b-p\bp option is not sup-
+ started with the effective user (group) id not equal to
+ the real user (group) id, and the -\b-p\bp option is not sup-
plied, these actions are taken and the effective user id
- is set to the real user id. If the -\b-p\bp option is sup-
- plied at startup, the effective user id is not reset.
- Turning this option off causes the effective user and
+ is set to the real user id. If the -\b-p\bp option is sup-
+ plied at startup, the effective user id is not reset.
+ Turning this option off causes the effective user and
group ids to be set to the real user and group ids.
-\b-t\bt Exit after reading and executing one command.
-\b-u\bu Treat unset variables and parameters other than the spe-
- cial parameters "@" and "*" as an error when performing
- parameter expansion. If expansion is attempted on an
- unset variable or parameter, the shell prints an error
- message, and, if not interactive, exits with a non-zero
+ cial parameters "@" and "*" as an error when performing
+ parameter expansion. If expansion is attempted on an
+ unset variable or parameter, the shell prints an error
+ message, and, if not interactive, exits with a non-zero
status.
-\b-v\bv Print shell input lines as they are read.
- -\b-x\bx After expanding each _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, f\bfo\bor\br command, c\bca\bas\bse\be
+ -\b-x\bx After expanding each _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, f\bfo\bor\br command, c\bca\bas\bse\be
command, s\bse\bel\ble\bec\bct\bt command, or arithmetic f\bfo\bor\br command, dis-
- play the expanded value of P\bPS\bS4\b4, followed by the command
+ play the expanded value of P\bPS\bS4\b4, followed by the command
and its expanded arguments or associated word list.
- -\b-B\bB The shell performs brace expansion (see B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
+ -\b-B\bB The shell performs brace expansion (see B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
above). This is on by default.
- -\b-C\bC If set, b\bba\bas\bsh\bh does not overwrite an existing file with
- the >\b>, >\b>&\b&, and <\b<>\b> redirection operators. This may be
+ -\b-C\bC If set, b\bba\bas\bsh\bh does not overwrite an existing file with
+ the >\b>, >\b>&\b&, and <\b<>\b> redirection operators. This may be
overridden when creating output files by using the redi-
rection operator >\b>|\b| instead of >\b>.
-\b-E\bE If set, any trap on E\bER\bRR\bR is inherited by shell functions,
- command substitutions, and commands executed in a sub-
- shell environment. The E\bER\bRR\bR trap is normally not inher-
+ command substitutions, and commands executed in a sub-
+ shell environment. The E\bER\bRR\bR trap is normally not inher-
ited in such cases.
-\b-H\bH Enable !\b! style history substitution. This option is on
by default when the shell is interactive.
- -\b-P\bP If set, the shell does not resolve symbolic links when
- executing commands such as c\bcd\bd that change the current
+ -\b-P\bP If set, the shell does not resolve symbolic links when
+ executing commands such as c\bcd\bd that change the current
working directory. It uses the physical directory
structure instead. By default, b\bba\bas\bsh\bh follows the logical
- chain of directories when performing commands which
+ chain of directories when performing commands which
change the current directory.
- -\b-T\bT If set, any traps on D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN are inherited by
- shell functions, command substitutions, and commands
- executed in a subshell environment. The D\bDE\bEB\bBU\bUG\bG and
+ -\b-T\bT If set, any traps on D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN are inherited by
+ shell functions, command substitutions, and commands
+ executed in a subshell environment. The D\bDE\bEB\bBU\bUG\bG and
R\bRE\bET\bTU\bUR\bRN\bN traps are normally not inherited in such cases.
- -\b--\b- If no arguments follow this option, then the positional
+ -\b--\b- If no arguments follow this option, then the positional
parameters are unset. Otherwise, the positional parame-
- ters are set to the _\ba_\br_\bgs, even if some of them begin
+ ters are set to the _\ba_\br_\bgs, even if some of them begin
with a -\b-.
- -\b- Signal the end of options, cause all remaining _\ba_\br_\bgs to
+ -\b- Signal the end of options, cause all remaining _\ba_\br_\bgs to
be assigned to the positional parameters. The -\b-x\bx and -\b-v\bv
options are turned off. If there are no _\ba_\br_\bgs, the posi-
tional parameters remain unchanged.
- The options are off by default unless otherwise noted. Using +
- rather than - causes these options to be turned off. The
- options can also be specified as arguments to an invocation of
- the shell. The current set of options may be found in $\b$-\b-. The
+ The options are off by default unless otherwise noted. Using +
+ rather than - causes these options to be turned off. The
+ options can also be specified as arguments to an invocation of
+ the shell. The current set of options may be found in $\b$-\b-. The
return status is always true unless an invalid option is encoun-
tered.
s\bsh\bhi\bif\bft\bt [_\bn]
- The positional parameters from _\bn+1 ... are renamed to $\b$1\b1 .\b..\b..\b..\b.
- Parameters represented by the numbers $\b$#\b# down to $\b$#\b#-_\bn+1 are
- unset. _\bn must be a non-negative number less than or equal to
- $\b$#\b#. If _\bn is 0, no parameters are changed. If _\bn is not given,
- it is assumed to be 1. If _\bn is greater than $\b$#\b#, the positional
- parameters are not changed. The return status is greater than
+ The positional parameters from _\bn+1 ... are renamed to $\b$1\b1 .\b..\b..\b..\b.
+ Parameters represented by the numbers $\b$#\b# down to $\b$#\b#-_\bn+1 are
+ unset. _\bn must be a non-negative number less than or equal to
+ $\b$#\b#. If _\bn is 0, no parameters are changed. If _\bn is not given,
+ it is assumed to be 1. If _\bn is greater than $\b$#\b#, the positional
+ parameters are not changed. The return status is greater than
zero if _\bn is greater than $\b$#\b# or less than zero; otherwise 0.
s\bsh\bho\bop\bpt\bt [-\b-p\bpq\bqs\bsu\bu] [-\b-o\bo] [_\bo_\bp_\bt_\bn_\ba_\bm_\be ...]
- Toggle the values of settings controlling optional shell behav-
- ior. The settings can be either those listed below, or, if the
+ Toggle the values of settings controlling optional shell behav-
+ ior. The settings can be either those listed below, or, if the
-\b-o\bo option is used, those available with the -\b-o\bo option to the s\bse\bet\bt
builtin command. With no options, or with the -\b-p\bp option, a list
- of all settable options is displayed, with an indication of
- whether or not each is set. The -\b-p\bp option causes output to be
- displayed in a form that may be reused as input. Other options
+ of all settable options is displayed, with an indication of
+ whether or not each is set. The -\b-p\bp option causes output to be
+ displayed in a form that may be reused as input. Other options
have the following meanings:
-\b-s\bs Enable (set) each _\bo_\bp_\bt_\bn_\ba_\bm_\be.
-\b-u\bu Disable (unset) each _\bo_\bp_\bt_\bn_\ba_\bm_\be.
- -\b-q\bq Suppresses normal output (quiet mode); the return status
+ -\b-q\bq Suppresses normal output (quiet mode); the return status
indicates whether the _\bo_\bp_\bt_\bn_\ba_\bm_\be is set or unset. If multi-
- ple _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments are given with -\b-q\bq, the return sta-
- tus is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are enabled; non-zero other-
+ ple _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments are given with -\b-q\bq, the return sta-
+ tus is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are enabled; non-zero other-
wise.
- -\b-o\bo Restricts the values of _\bo_\bp_\bt_\bn_\ba_\bm_\be to be those defined for
+ -\b-o\bo Restricts the values of _\bo_\bp_\bt_\bn_\ba_\bm_\be to be those defined for
the -\b-o\bo option to the s\bse\bet\bt builtin.
- If either -\b-s\bs or -\b-u\bu is used with no _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments, s\bsh\bho\bop\bpt\bt
- shows only those options which are set or unset, respectively.
- Unless otherwise noted, the s\bsh\bho\bop\bpt\bt options are disabled (unset)
+ If either -\b-s\bs or -\b-u\bu is used with no _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments, s\bsh\bho\bop\bpt\bt
+ shows only those options which are set or unset, respectively.
+ Unless otherwise noted, the s\bsh\bho\bop\bpt\bt options are disabled (unset)
by default.
- The return status when listing options is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs
- are enabled, non-zero otherwise. When setting or unsetting
- options, the return status is zero unless an _\bo_\bp_\bt_\bn_\ba_\bm_\be is not a
+ The return status when listing options is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs
+ are enabled, non-zero otherwise. When setting or unsetting
+ options, the return status is zero unless an _\bo_\bp_\bt_\bn_\ba_\bm_\be is not a
valid shell option.
The list of s\bsh\bho\bop\bpt\bt options is:
- a\bau\but\bto\boc\bcd\bd If set, a command name that is the name of a directory
- is executed as if it were the argument to the c\bcd\bd com-
+ a\bau\but\bto\boc\bcd\bd If set, a command name that is the name of a directory
+ is executed as if it were the argument to the c\bcd\bd com-
mand. This option is only used by interactive shells.
c\bcd\bda\bab\bbl\ble\be_\b_v\bva\bar\brs\bs
- If set, an argument to the c\bcd\bd builtin command that is
- not a directory is assumed to be the name of a variable
+ If set, an argument to the c\bcd\bd builtin command that is
+ not a directory is assumed to be the name of a variable
whose value is the directory to change to.
c\bcd\bds\bsp\bpe\bel\bll\bl If set, minor errors in the spelling of a directory com-
- ponent in a c\bcd\bd command will be corrected. The errors
+ ponent in a c\bcd\bd command will be corrected. The errors
checked for are transposed characters, a missing charac-
- ter, and one character too many. If a correction is
- found, the corrected filename is printed, and the com-
- mand proceeds. This option is only used by interactive
+ ter, and one character too many. If a correction is
+ found, the corrected filename is printed, and the com-
+ mand proceeds. This option is only used by interactive
shells.
c\bch\bhe\bec\bck\bkh\bha\bas\bsh\bh
If set, b\bba\bas\bsh\bh checks that a command found in the hash ta-
- ble exists before trying to execute it. If a hashed
- command no longer exists, a normal path search is per-
+ ble exists before trying to execute it. If a hashed
+ command no longer exists, a normal path search is per-
formed.
c\bch\bhe\bec\bck\bkj\bjo\bob\bbs\bs
If set, b\bba\bas\bsh\bh lists the status of any stopped and running
- jobs before exiting an interactive shell. If any jobs
+ jobs before exiting an interactive shell. If any jobs
are running, this causes the exit to be deferred until a
- second exit is attempted without an intervening command
- (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL above). The shell always postpones
+ second exit is attempted without an intervening command
+ (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL above). The shell always postpones
exiting if any jobs are stopped.
c\bch\bhe\bec\bck\bkw\bwi\bin\bns\bsi\biz\bze\be
- If set, b\bba\bas\bsh\bh checks the window size after each command
- and, if necessary, updates the values of L\bLI\bIN\bNE\bES\bS and C\bCO\bOL\bL-\b-
+ If set, b\bba\bas\bsh\bh checks the window size after each command
+ and, if necessary, updates the values of L\bLI\bIN\bNE\bES\bS and C\bCO\bOL\bL-\b-
U\bUM\bMN\bNS\bS.
- c\bcm\bmd\bdh\bhi\bis\bst\bt If set, b\bba\bas\bsh\bh attempts to save all lines of a multiple-
- line command in the same history entry. This allows
+ c\bcm\bmd\bdh\bhi\bis\bst\bt If set, b\bba\bas\bsh\bh attempts to save all lines of a multiple-
+ line command in the same history entry. This allows
easy re-editing of multi-line commands.
c\bco\bom\bmp\bpa\bat\bt3\b31\b1
If set, b\bba\bas\bsh\bh changes its behavior to that of version 3.1
- with respect to quoted arguments to the [\b[[\b[ conditional
+ with respect to quoted arguments to the [\b[[\b[ conditional
command's =\b=~\b~ operator and locale-specific string compar-
- ison when using the [\b[[\b[ conditional command's <\b< and >\b>
- operators. Bash versions prior to bash-4.1 use ASCII
+ ison when using the [\b[[\b[ conditional command's <\b< and >\b>
+ operators. Bash versions prior to bash-4.1 use ASCII
collation and _\bs_\bt_\br_\bc_\bm_\bp(3); bash-4.1 and later use the cur-
rent locale's collation sequence and _\bs_\bt_\br_\bc_\bo_\bl_\bl(3).
c\bco\bom\bmp\bpa\bat\bt3\b32\b2
If set, b\bba\bas\bsh\bh changes its behavior to that of version 3.2
- with respect to locale-specific string comparison when
- using the [\b[[\b[ conditional command's <\b< and >\b> operators
+ with respect to locale-specific string comparison when
+ using the [\b[[\b[ conditional command's <\b< and >\b> operators
(see previous item).
c\bco\bom\bmp\bpa\bat\bt4\b40\b0
If set, b\bba\bas\bsh\bh changes its behavior to that of version 4.0
- with respect to locale-specific string comparison when
- using the [\b[[\b[ conditional command's <\b< and >\b> operators
- (see description of c\bco\bom\bmp\bpa\bat\bt3\b31\b1) and the effect of inter-
- rupting a command list. Bash versions 4.0 and later
- interrupt the list as if the shell received the inter-
- rupt; previous versions continue with the next command
+ with respect to locale-specific string comparison when
+ using the [\b[[\b[ conditional command's <\b< and >\b> operators
+ (see description of c\bco\bom\bmp\bpa\bat\bt3\b31\b1) and the effect of inter-
+ rupting a command list. Bash versions 4.0 and later
+ interrupt the list as if the shell received the inter-
+ rupt; previous versions continue with the next command
in the list.
c\bco\bom\bmp\bpa\bat\bt4\b41\b1
- If set, b\bba\bas\bsh\bh, when in _\bp_\bo_\bs_\bi_\bx mode, treats a single quote
- in a double-quoted parameter expansion as a special
- character. The single quotes must match (an even num-
- ber) and the characters between the single quotes are
- considered quoted. This is the behavior of posix mode
- through version 4.1. The default bash behavior remains
+ If set, b\bba\bas\bsh\bh, when in _\bp_\bo_\bs_\bi_\bx mode, treats a single quote
+ in a double-quoted parameter expansion as a special
+ character. The single quotes must match (an even num-
+ ber) and the characters between the single quotes are
+ considered quoted. This is the behavior of posix mode
+ through version 4.1. The default bash behavior remains
as in previous versions.
c\bco\bom\bmp\bpa\bat\bt4\b42\b2
- If set, b\bba\bas\bsh\bh does not process the replacement string in
- the pattern substitution word expansion using quote
+ If set, b\bba\bas\bsh\bh does not process the replacement string in
+ the pattern substitution word expansion using quote
removal.
c\bco\bom\bmp\bpl\ble\bet\bte\be_\b_f\bfu\bul\bll\blq\bqu\buo\bot\bte\be
- If set, b\bba\bas\bsh\bh quotes all shell metacharacters in file-
- names and directory names when performing completion.
+ If set, b\bba\bas\bsh\bh quotes all shell metacharacters in file-
+ names and directory names when performing completion.
If not set, b\bba\bas\bsh\bh removes metacharacters such as the dol-
- lar sign from the set of characters that will be quoted
- in completed filenames when these metacharacters appear
- in shell variable references in words to be completed.
- This means that dollar signs in variable names that
- expand to directories will not be quoted; however, any
- dollar signs appearing in filenames will not be quoted,
- either. This is active only when bash is using back-
- slashes to quote completed filenames. This variable is
- set by default, which is the default bash behavior in
+ lar sign from the set of characters that will be quoted
+ in completed filenames when these metacharacters appear
+ in shell variable references in words to be completed.
+ This means that dollar signs in variable names that
+ expand to directories will not be quoted; however, any
+ dollar signs appearing in filenames will not be quoted,
+ either. This is active only when bash is using back-
+ slashes to quote completed filenames. This variable is
+ set by default, which is the default bash behavior in
versions through 4.2.
d\bdi\bir\bre\bex\bxp\bpa\ban\bnd\bd
- If set, b\bba\bas\bsh\bh replaces directory names with the results
- of word expansion when performing filename completion.
+ If set, b\bba\bas\bsh\bh replaces directory names with the results
+ of word expansion when performing filename completion.
This changes the contents of the readline editing
- buffer. If not set, b\bba\bas\bsh\bh attempts to preserve what the
+ buffer. If not set, b\bba\bas\bsh\bh attempts to preserve what the
user typed.
d\bdi\bir\brs\bsp\bpe\bel\bll\bl
- If set, b\bba\bas\bsh\bh attempts spelling correction on directory
- names during word completion if the directory name ini-
+ If set, b\bba\bas\bsh\bh attempts spelling correction on directory
+ names during word completion if the directory name ini-
tially supplied does not exist.
- d\bdo\bot\btg\bgl\blo\bob\bb If set, b\bba\bas\bsh\bh includes filenames beginning with a `.' in
+ d\bdo\bot\btg\bgl\blo\bob\bb If set, b\bba\bas\bsh\bh includes filenames beginning with a `.' in
the results of pathname expansion.
e\bex\bxe\bec\bcf\bfa\bai\bil\bl
If set, a non-interactive shell will not exit if it can-
- not execute the file specified as an argument to the
- e\bex\bxe\bec\bc builtin command. An interactive shell does not
+ not execute the file specified as an argument to the
+ e\bex\bxe\bec\bc builtin command. An interactive shell does not
exit if e\bex\bxe\bec\bc fails.
e\bex\bxp\bpa\ban\bnd\bd_\b_a\bal\bli\bia\bas\bse\bes\bs
- If set, aliases are expanded as described above under
+ If set, aliases are expanded as described above under
A\bAL\bLI\bIA\bAS\bSE\bES\bS. This option is enabled by default for interac-
tive shells.
e\bex\bxt\btd\bde\beb\bbu\bug\bg
- If set, behavior intended for use by debuggers is
+ If set, behavior intended for use by debuggers is
enabled:
1\b1.\b. The -\b-F\bF option to the d\bde\bec\bcl\bla\bar\bre\be builtin displays the
source file name and line number corresponding to
each function name supplied as an argument.
- 2\b2.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
- non-zero value, the next command is skipped and
+ 2\b2.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
+ non-zero value, the next command is skipped and
not executed.
- 3\b3.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
- value of 2, and the shell is executing in a sub-
- routine (a shell function or a shell script exe-
- cuted by the .\b. or s\bso\bou\bur\brc\bce\be builtins), a call to
+ 3\b3.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
+ value of 2, and the shell is executing in a sub-
+ routine (a shell function or a shell script exe-
+ cuted by the .\b. or s\bso\bou\bur\brc\bce\be builtins), a call to
r\bre\bet\btu\bur\brn\bn is simulated.
- 4\b4.\b. B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC and B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV are updated as described
+ 4\b4.\b. B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC and B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV are updated as described
in their descriptions above.
- 5\b5.\b. Function tracing is enabled: command substitu-
+ 5\b5.\b. Function tracing is enabled: command substitu-
tion, shell functions, and subshells invoked with
(\b( _\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN traps.
- 6\b6.\b. Error tracing is enabled: command substitution,
- shell functions, and subshells invoked with (\b(
+ 6\b6.\b. Error tracing is enabled: command substitution,
+ shell functions, and subshells invoked with (\b(
_\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the E\bER\bRR\bR trap.
e\bex\bxt\btg\bgl\blo\bob\bb If set, the extended pattern matching features described
above under P\bPa\bat\bth\bhn\bna\bam\bme\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn are enabled.
e\bex\bxt\btq\bqu\buo\bot\bte\be
- If set, $\b$'_\bs_\bt_\br_\bi_\bn_\bg' and $\b$"_\bs_\bt_\br_\bi_\bn_\bg" quoting is performed
- within $\b${\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}\b} expansions enclosed in double
+ If set, $\b$'_\bs_\bt_\br_\bi_\bn_\bg' and $\b$"_\bs_\bt_\br_\bi_\bn_\bg" quoting is performed
+ within $\b${\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}\b} expansions enclosed in double
quotes. This option is enabled by default.
f\bfa\bai\bil\blg\bgl\blo\bob\bb
- If set, patterns which fail to match filenames during
+ If set, patterns which fail to match filenames during
pathname expansion result in an expansion error.
f\bfo\bor\brc\bce\be_\b_f\bfi\big\bgn\bno\bor\bre\be
- If set, the suffixes specified by the F\bFI\bIG\bGN\bNO\bOR\bRE\bE shell
- variable cause words to be ignored when performing word
+ If set, the suffixes specified by the F\bFI\bIG\bGN\bNO\bOR\bRE\bE shell
+ variable cause words to be ignored when performing word
completion even if the ignored words are the only possi-
ble completions. See S\bSH\bHE\bEL\bLL\bL V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS above for a
- description of F\bFI\bIG\bGN\bNO\bOR\bRE\bE. This option is enabled by
+ description of F\bFI\bIG\bGN\bNO\bOR\bRE\bE. This option is enabled by
default.
g\bgl\blo\bob\bba\bas\bsc\bci\bii\bir\bra\ban\bng\bge\bes\bs
- If set, range expressions used in pattern matching
- bracket expressions (see P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg above) behave
- as if in the traditional C locale when performing com-
+ If set, range expressions used in pattern matching
+ bracket expressions (see P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg above) behave
+ as if in the traditional C locale when performing com-
parisons. That is, the current locale's collating
- sequence is not taken into account, so b\bb will not col-
- late between A\bA and B\bB, and upper-case and lower-case
+ sequence is not taken into account, so b\bb will not col-
+ late between A\bA and B\bB, and upper-case and lower-case
ASCII characters will collate together.
g\bgl\blo\bob\bbs\bst\bta\bar\br
If set, the pattern *\b**\b* used in a pathname expansion con-
- text will match all files and zero or more directories
- and subdirectories. If the pattern is followed by a /\b/,
+ text will match all files and zero or more directories
+ and subdirectories. If the pattern is followed by a /\b/,
only directories and subdirectories match.
g\bgn\bnu\bu_\b_e\ber\brr\brf\bfm\bmt\bt
If set, shell error messages are written in the standard
GNU error message format.
h\bhi\bis\bst\bta\bap\bpp\bpe\ben\bnd\bd
- If set, the history list is appended to the file named
- by the value of the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE variable when the shell
+ If set, the history list is appended to the file named
+ by the value of the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE variable when the shell
exits, rather than overwriting the file.
h\bhi\bis\bst\btr\bre\bee\bed\bdi\bit\bt
- If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, a user is given the
+ If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, a user is given the
opportunity to re-edit a failed history substitution.
h\bhi\bis\bst\btv\bve\ber\bri\bif\bfy\by
- If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the results of his-
- tory substitution are not immediately passed to the
- shell parser. Instead, the resulting line is loaded
+ If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the results of his-
+ tory substitution are not immediately passed to the
+ shell parser. Instead, the resulting line is loaded
into the r\bre\bea\bad\bdl\bli\bin\bne\be editing buffer, allowing further modi-
fication.
h\bho\bos\bst\btc\bco\bom\bmp\bpl\ble\bet\bte\be
If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, b\bba\bas\bsh\bh will attempt to
- perform hostname completion when a word containing a @\b@
- is being completed (see C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg under R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE
+ perform hostname completion when a word containing a @\b@
+ is being completed (see C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg under R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE
above). This is enabled by default.
h\bhu\bup\bpo\bon\bne\bex\bxi\bit\bt
If set, b\bba\bas\bsh\bh will send S\bSI\bIG\bGH\bHU\bUP\bP to all jobs when an inter-
active login shell exits.
i\bin\bnt\bte\ber\bra\bac\bct\bti\biv\bve\be_\b_c\bco\bom\bmm\bme\ben\bnt\bts\bs
If set, allow a word beginning with #\b# to cause that word
- and all remaining characters on that line to be ignored
- in an interactive shell (see C\bCO\bOM\bMM\bME\bEN\bNT\bTS\bS above). This
+ and all remaining characters on that line to be ignored
+ in an interactive shell (see C\bCO\bOM\bMM\bME\bEN\bNT\bTS\bS above). This
option is enabled by default.
l\bla\bas\bst\btp\bpi\bip\bpe\be
- If set, and job control is not active, the shell runs
+ If set, and job control is not active, the shell runs
the last command of a pipeline not executed in the back-
ground in the current shell environment.
- l\bli\bit\bth\bhi\bis\bst\bt If set, and the c\bcm\bmd\bdh\bhi\bis\bst\bt option is enabled, multi-line
+ l\bli\bit\bth\bhi\bis\bst\bt If set, and the c\bcm\bmd\bdh\bhi\bis\bst\bt option is enabled, multi-line
commands are saved to the history with embedded newlines
rather than using semicolon separators where possible.
l\blo\bog\bgi\bin\bn_\b_s\bsh\bhe\bel\bll\bl
- The shell sets this option if it is started as a login
- shell (see I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN above). The value may not be
+ The shell sets this option if it is started as a login
+ shell (see I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN above). The value may not be
changed.
m\bma\bai\bil\blw\bwa\bar\brn\bn
- If set, and a file that b\bba\bas\bsh\bh is checking for mail has
- been accessed since the last time it was checked, the
- message ``The mail in _\bm_\ba_\bi_\bl_\bf_\bi_\bl_\be has been read'' is dis-
+ If set, and a file that b\bba\bas\bsh\bh is checking for mail has
+ been accessed since the last time it was checked, the
+ message ``The mail in _\bm_\ba_\bi_\bl_\bf_\bi_\bl_\be has been read'' is dis-
played.
n\bno\bo_\b_e\bem\bmp\bpt\bty\by_\b_c\bcm\bmd\bd_\b_c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn
- If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, b\bba\bas\bsh\bh will not
+ If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, b\bba\bas\bsh\bh will not
attempt to search the P\bPA\bAT\bTH\bH for possible completions when
completion is attempted on an empty line.
n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb
- If set, b\bba\bas\bsh\bh matches filenames in a case-insensitive
+ If set, b\bba\bas\bsh\bh matches filenames in a case-insensitive
fashion when performing pathname expansion (see P\bPa\bat\bth\bhn\bna\bam\bme\be
E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn above).
n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh
- If set, b\bba\bas\bsh\bh matches patterns in a case-insensitive
+ If set, b\bba\bas\bsh\bh matches patterns in a case-insensitive
fashion when performing matching while executing c\bca\bas\bse\be or
[\b[[\b[ conditional commands.
n\bnu\bul\bll\blg\bgl\blo\bob\bb
- If set, b\bba\bas\bsh\bh allows patterns which match no files (see
- P\bPa\bat\bth\bhn\bna\bam\bme\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn above) to expand to a null string,
+ If set, b\bba\bas\bsh\bh allows patterns which match no files (see
+ P\bPa\bat\bth\bhn\bna\bam\bme\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn above) to expand to a null string,
rather than themselves.
p\bpr\bro\bog\bgc\bco\bom\bmp\bp
If set, the programmable completion facilities (see P\bPr\bro\bo-\b-
enabled by default.
p\bpr\bro\bom\bmp\bpt\btv\bva\bar\brs\bs
If set, prompt strings undergo parameter expansion, com-
- mand substitution, arithmetic expansion, and quote
- removal after being expanded as described in P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG
+ mand substitution, arithmetic expansion, and quote
+ removal after being expanded as described in P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG
above. This option is enabled by default.
r\bre\bes\bst\btr\bri\bic\bct\bte\bed\bd_\b_s\bsh\bhe\bel\bll\bl
- The shell sets this option if it is started in
+ The shell sets this option if it is started in
restricted mode (see R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL below). The value
- may not be changed. This is not reset when the startup
- files are executed, allowing the startup files to dis-
+ may not be changed. This is not reset when the startup
+ files are executed, allowing the startup files to dis-
cover whether or not a shell is restricted.
s\bsh\bhi\bif\bft\bt_\b_v\bve\ber\brb\bbo\bos\bse\be
- If set, the s\bsh\bhi\bif\bft\bt builtin prints an error message when
+ If set, the s\bsh\bhi\bif\bft\bt builtin prints an error message when
the shift count exceeds the number of positional parame-
ters.
s\bso\bou\bur\brc\bce\bep\bpa\bat\bth\bh
If set, the s\bso\bou\bur\brc\bce\be (.\b.) builtin uses the value of P\bPA\bAT\bTH\bH to
- find the directory containing the file supplied as an
+ find the directory containing the file supplied as an
argument. This option is enabled by default.
x\bxp\bpg\bg_\b_e\bec\bch\bho\bo
- If set, the e\bec\bch\bho\bo builtin expands backslash-escape
+ If set, the e\bec\bch\bho\bo builtin expands backslash-escape
sequences by default.
s\bsu\bus\bsp\bpe\ben\bnd\bd [-\b-f\bf]
- Suspend the execution of this shell until it receives a S\bSI\bIG\bGC\bCO\bON\bNT\bT
+ Suspend the execution of this shell until it receives a S\bSI\bIG\bGC\bCO\bON\bNT\bT
signal. A login shell cannot be suspended; the -\b-f\bf option can be
used to override this and force the suspension. The return sta-
- tus is 0 unless the shell is a login shell and -\b-f\bf is not sup-
+ tus is 0 unless the shell is a login shell and -\b-f\bf is not sup-
plied, or if job control is not enabled.
t\bte\bes\bst\bt _\be_\bx_\bp_\br
[\b[ _\be_\bx_\bp_\br ]\b]
Return a status of 0 (true) or 1 (false) depending on the evalu-
ation of the conditional expression _\be_\bx_\bp_\br. Each operator and op-
- erand must be a separate argument. Expressions are composed of
- the primaries described above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS.
- t\bte\bes\bst\bt does not accept any options, nor does it accept and ignore
+ erand must be a separate argument. Expressions are composed of
+ the primaries described above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS.
+ t\bte\bes\bst\bt does not accept any options, nor does it accept and ignore
an argument of -\b--\b- as signifying the end of options.
- Expressions may be combined using the following operators,
+ Expressions may be combined using the following operators,
listed in decreasing order of precedence. The evaluation
- depends on the number of arguments; see below. Operator prece-
+ depends on the number of arguments; see below. Operator prece-
dence is used when there are five or more arguments.
!\b! _\be_\bx_\bp_\br True if _\be_\bx_\bp_\br is false.
(\b( _\be_\bx_\bp_\br )\b)
- Returns the value of _\be_\bx_\bp_\br. This may be used to override
+ Returns the value of _\be_\bx_\bp_\br. This may be used to override
the normal precedence of operators.
_\be_\bx_\bp_\br_\b1 -a\ba _\be_\bx_\bp_\br_\b2
True if both _\be_\bx_\bp_\br_\b1 and _\be_\bx_\bp_\br_\b2 are true.
null.
2 arguments
If the first argument is !\b!, the expression is true if and
- only if the second argument is null. If the first argu-
- ment is one of the unary conditional operators listed
- above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS, the expression is
+ only if the second argument is null. If the first argu-
+ ment is one of the unary conditional operators listed
+ above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS, the expression is
true if the unary test is true. If the first argument is
not a valid unary conditional operator, the expression is
false.
3 arguments
The following conditions are applied in the order listed.
- If the second argument is one of the binary conditional
+ If the second argument is one of the binary conditional
operators listed above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS, the
result of the expression is the result of the binary test
- using the first and third arguments as operands. The -\b-a\ba
- and -\b-o\bo operators are considered binary operators when
- there are three arguments. If the first argument is !\b!,
- the value is the negation of the two-argument test using
+ using the first and third arguments as operands. The -\b-a\ba
+ and -\b-o\bo operators are considered binary operators when
+ there are three arguments. If the first argument is !\b!,
+ the value is the negation of the two-argument test using
the second and third arguments. If the first argument is
exactly (\b( and the third argument is exactly )\b), the result
- is the one-argument test of the second argument. Other-
+ is the one-argument test of the second argument. Other-
wise, the expression is false.
4 arguments
If the first argument is !\b!, the result is the negation of
- the three-argument expression composed of the remaining
+ the three-argument expression composed of the remaining
arguments. Otherwise, the expression is parsed and eval-
- uated according to precedence using the rules listed
+ uated according to precedence using the rules listed
above.
5 or more arguments
- The expression is parsed and evaluated according to
+ The expression is parsed and evaluated according to
precedence using the rules listed above.
- When used with t\bte\bes\bst\bt or [\b[, the <\b< and >\b> operators sort lexico-
+ When used with t\bte\bes\bst\bt or [\b[, the <\b< and >\b> operators sort lexico-
graphically using ASCII ordering.
- t\bti\bim\bme\bes\bs Print the accumulated user and system times for the shell and
+ t\bti\bim\bme\bes\bs Print the accumulated user and system times for the shell and
for processes run from the shell. The return status is 0.
t\btr\bra\bap\bp [-\b-l\blp\bp] [[_\ba_\br_\bg] _\bs_\bi_\bg_\bs_\bp_\be_\bc ...]
- The command _\ba_\br_\bg is to be read and executed when the shell
- receives signal(s) _\bs_\bi_\bg_\bs_\bp_\be_\bc. If _\ba_\br_\bg is absent (and there is a
- single _\bs_\bi_\bg_\bs_\bp_\be_\bc) or -\b-, each specified signal is reset to its
- original disposition (the value it had upon entrance to the
- shell). If _\ba_\br_\bg is the null string the signal specified by each
- _\bs_\bi_\bg_\bs_\bp_\be_\bc is ignored by the shell and by the commands it invokes.
- If _\ba_\br_\bg is not present and -\b-p\bp has been supplied, then the trap
- commands associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc are displayed. If no
- arguments are supplied or if only -\b-p\bp is given, t\btr\bra\bap\bp prints the
- list of commands associated with each signal. The -\b-l\bl option
- causes the shell to print a list of signal names and their cor-
- responding numbers. Each _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a signal name
- defined in <_\bs_\bi_\bg_\bn_\ba_\bl_\b._\bh>, or a signal number. Signal names are
+ The command _\ba_\br_\bg is to be read and executed when the shell
+ receives signal(s) _\bs_\bi_\bg_\bs_\bp_\be_\bc. If _\ba_\br_\bg is absent (and there is a
+ single _\bs_\bi_\bg_\bs_\bp_\be_\bc) or -\b-, each specified signal is reset to its
+ original disposition (the value it had upon entrance to the
+ shell). If _\ba_\br_\bg is the null string the signal specified by each
+ _\bs_\bi_\bg_\bs_\bp_\be_\bc is ignored by the shell and by the commands it invokes.
+ If _\ba_\br_\bg is not present and -\b-p\bp has been supplied, then the trap
+ commands associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc are displayed. If no
+ arguments are supplied or if only -\b-p\bp is given, t\btr\bra\bap\bp prints the
+ list of commands associated with each signal. The -\b-l\bl option
+ causes the shell to print a list of signal names and their cor-
+ responding numbers. Each _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a signal name
+ defined in <_\bs_\bi_\bg_\bn_\ba_\bl_\b._\bh>, or a signal number. Signal names are
case insensitive and the S\bSI\bIG\bG prefix is optional.
- If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bEX\bXI\bIT\bT (0) the command _\ba_\br_\bg is executed on exit
- from the shell. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is D\bDE\bEB\bBU\bUG\bG, the command _\ba_\br_\bg is exe-
- cuted before every _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, _\bf_\bo_\br command, _\bc_\ba_\bs_\be command,
- _\bs_\be_\bl_\be_\bc_\bt command, every arithmetic _\bf_\bo_\br command, and before the
- first command executes in a shell function (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR
- above). Refer to the description of the e\bex\bxt\btd\bde\beb\bbu\bug\bg option to the
+ If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bEX\bXI\bIT\bT (0) the command _\ba_\br_\bg is executed on exit
+ from the shell. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is D\bDE\bEB\bBU\bUG\bG, the command _\ba_\br_\bg is exe-
+ cuted before every _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, _\bf_\bo_\br command, _\bc_\ba_\bs_\be command,
+ _\bs_\be_\bl_\be_\bc_\bt command, every arithmetic _\bf_\bo_\br command, and before the
+ first command executes in a shell function (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR
+ above). Refer to the description of the e\bex\bxt\btd\bde\beb\bbu\bug\bg option to the
s\bsh\bho\bop\bpt\bt builtin for details of its effect on the D\bDE\bEB\bBU\bUG\bG trap. If a
_\bs_\bi_\bg_\bs_\bp_\be_\bc is R\bRE\bET\bTU\bUR\bRN\bN, the command _\ba_\br_\bg is executed each time a shell
function or a script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins fin-
ishes executing.
- If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bER\bRR\bR, the command _\ba_\br_\bg is executed whenever a a
+ If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bER\bRR\bR, the command _\ba_\br_\bg is executed whenever a a
pipeline (which may consist of a single simple command), a list,
or a compound command returns a non-zero exit status, subject to
- the following conditions. The E\bER\bRR\bR trap is not executed if the
+ the following conditions. The E\bER\bRR\bR trap is not executed if the
failed command is part of the command list immediately following
- a w\bwh\bhi\bil\ble\be or u\bun\bnt\bti\bil\bl keyword, part of the test in an _\bi_\bf statement,
+ a w\bwh\bhi\bil\ble\be or u\bun\bnt\bti\bil\bl keyword, part of the test in an _\bi_\bf statement,
part of a command executed in a &\b&&\b& or |\b||\b| list except the command
- following the final &\b&&\b& or |\b||\b|, any command in a pipeline but the
- last, or if the command's return value is being inverted using
- !\b!. These are the same conditions obeyed by the e\ber\brr\bre\bex\bxi\bit\bt (-\b-e\be)
+ following the final &\b&&\b& or |\b||\b|, any command in a pipeline but the
+ last, or if the command's return value is being inverted using
+ !\b!. These are the same conditions obeyed by the e\ber\brr\bre\bex\bxi\bit\bt (-\b-e\be)
option.
- Signals ignored upon entry to the shell cannot be trapped or
- reset. Trapped signals that are not being ignored are reset to
+ Signals ignored upon entry to the shell cannot be trapped or
+ reset. Trapped signals that are not being ignored are reset to
their original values in a subshell or subshell environment when
- one is created. The return status is false if any _\bs_\bi_\bg_\bs_\bp_\be_\bc is
+ one is created. The return status is false if any _\bs_\bi_\bg_\bs_\bp_\be_\bc is
invalid; otherwise t\btr\bra\bap\bp returns true.
t\bty\byp\bpe\be [-\b-a\baf\bft\btp\bpP\bP] _\bn_\ba_\bm_\be [_\bn_\ba_\bm_\be ...]
- With no options, indicate how each _\bn_\ba_\bm_\be would be interpreted if
+ With no options, indicate how each _\bn_\ba_\bm_\be would be interpreted if
used as a command name. If the -\b-t\bt option is used, t\bty\byp\bpe\be prints a
- string which is one of _\ba_\bl_\bi_\ba_\bs, _\bk_\be_\by_\bw_\bo_\br_\bd, _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn, _\bb_\bu_\bi_\bl_\bt_\bi_\bn, or
- _\bf_\bi_\bl_\be if _\bn_\ba_\bm_\be is an alias, shell reserved word, function,
- builtin, or disk file, respectively. If the _\bn_\ba_\bm_\be is not found,
- then nothing is printed, and an exit status of false is
- returned. If the -\b-p\bp option is used, t\bty\byp\bpe\be either returns the
+ string which is one of _\ba_\bl_\bi_\ba_\bs, _\bk_\be_\by_\bw_\bo_\br_\bd, _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn, _\bb_\bu_\bi_\bl_\bt_\bi_\bn, or
+ _\bf_\bi_\bl_\be if _\bn_\ba_\bm_\be is an alias, shell reserved word, function,
+ builtin, or disk file, respectively. If the _\bn_\ba_\bm_\be is not found,
+ then nothing is printed, and an exit status of false is
+ returned. If the -\b-p\bp option is used, t\bty\byp\bpe\be either returns the
name of the disk file that would be executed if _\bn_\ba_\bm_\be were speci-
fied as a command name, or nothing if ``type -t name'' would not
- return _\bf_\bi_\bl_\be. The -\b-P\bP option forces a P\bPA\bAT\bTH\bH search for each _\bn_\ba_\bm_\be,
+ return _\bf_\bi_\bl_\be. The -\b-P\bP option forces a P\bPA\bAT\bTH\bH search for each _\bn_\ba_\bm_\be,
even if ``type -t name'' would not return _\bf_\bi_\bl_\be. If a command is
hashed, -\b-p\bp and -\b-P\bP print the hashed value, which is not necessar-
- ily the file that appears first in P\bPA\bAT\bTH\bH. If the -\b-a\ba option is
- used, t\bty\byp\bpe\be prints all of the places that contain an executable
+ ily the file that appears first in P\bPA\bAT\bTH\bH. If the -\b-a\ba option is
+ used, t\bty\byp\bpe\be prints all of the places that contain an executable
named _\bn_\ba_\bm_\be. This includes aliases and functions, if and only if
the -\b-p\bp option is not also used. The table of hashed commands is
- not consulted when using -\b-a\ba. The -\b-f\bf option suppresses shell
+ not consulted when using -\b-a\ba. The -\b-f\bf option suppresses shell
function lookup, as with the c\bco\bom\bmm\bma\ban\bnd\bd builtin. t\bty\byp\bpe\be returns true
if all of the arguments are found, false if any are not found.
u\bul\bli\bim\bmi\bit\bt [-\b-H\bHS\bST\bTa\bab\bbc\bcd\bde\bef\bfi\bil\blm\bmn\bnp\bpq\bqr\brs\bst\btu\buv\bvx\bx [_\bl_\bi_\bm_\bi_\bt]]
- Provides control over the resources available to the shell and
- to processes started by it, on systems that allow such control.
+ Provides control over the resources available to the shell and
+ to processes started by it, on systems that allow such control.
The -\b-H\bH and -\b-S\bS options specify that the hard or soft limit is set
- for the given resource. A hard limit cannot be increased by a
- non-root user once it is set; a soft limit may be increased up
- to the value of the hard limit. If neither -\b-H\bH nor -\b-S\bS is speci-
+ for the given resource. A hard limit cannot be increased by a
+ non-root user once it is set; a soft limit may be increased up
+ to the value of the hard limit. If neither -\b-H\bH nor -\b-S\bS is speci-
fied, both the soft and hard limits are set. The value of _\bl_\bi_\bm_\bi_\bt
can be a number in the unit specified for the resource or one of
the special values h\bha\bar\brd\bd, s\bso\bof\bft\bt, or u\bun\bnl\bli\bim\bmi\bit\bte\bed\bd, which stand for the
- current hard limit, the current soft limit, and no limit,
- respectively. If _\bl_\bi_\bm_\bi_\bt is omitted, the current value of the
- soft limit of the resource is printed, unless the -\b-H\bH option is
+ current hard limit, the current soft limit, and no limit,
+ respectively. If _\bl_\bi_\bm_\bi_\bt is omitted, the current value of the
+ soft limit of the resource is printed, unless the -\b-H\bH option is
given. When more than one resource is specified, the limit name
and unit are printed before the value. Other options are inter-
preted as follows:
-\b-c\bc The maximum size of core files created
-\b-d\bd The maximum size of a process's data segment
-\b-e\be The maximum scheduling priority ("nice")
- -\b-f\bf The maximum size of files written by the shell and its
+ -\b-f\bf The maximum size of files written by the shell and its
children
-\b-i\bi The maximum number of pending signals
-\b-l\bl The maximum size that may be locked into memory
- -\b-m\bm The maximum resident set size (many systems do not honor
+ -\b-m\bm The maximum resident set size (many systems do not honor
this limit)
-\b-n\bn The maximum number of open file descriptors (most systems
do not allow this value to be set)
-\b-r\br The maximum real-time scheduling priority
-\b-s\bs The maximum stack size
-\b-t\bt The maximum amount of cpu time in seconds
- -\b-u\bu The maximum number of processes available to a single
+ -\b-u\bu The maximum number of processes available to a single
user
- -\b-v\bv The maximum amount of virtual memory available to the
+ -\b-v\bv The maximum amount of virtual memory available to the
shell and, on some systems, to its children
-\b-x\bx The maximum number of file locks
-\b-T\bT The maximum number of threads
- If _\bl_\bi_\bm_\bi_\bt is given, and the -\b-a\ba option is not used, _\bl_\bi_\bm_\bi_\bt is the
- new value of the specified resource. If no option is given,
- then -\b-f\bf is assumed. Values are in 1024-byte increments, except
- for -\b-t\bt, which is in seconds; -\b-p\bp, which is in units of 512-byte
- blocks; and -\b-T\bT, -\b-b\bb, -\b-n\bn, and -\b-u\bu, which are unscaled values. The
- return status is 0 unless an invalid option or argument is sup-
+ If _\bl_\bi_\bm_\bi_\bt is given, and the -\b-a\ba option is not used, _\bl_\bi_\bm_\bi_\bt is the
+ new value of the specified resource. If no option is given,
+ then -\b-f\bf is assumed. Values are in 1024-byte increments, except
+ for -\b-t\bt, which is in seconds; -\b-p\bp, which is in units of 512-byte
+ blocks; and -\b-T\bT, -\b-b\bb, -\b-n\bn, and -\b-u\bu, which are unscaled values. The
+ return status is 0 unless an invalid option or argument is sup-
plied, or an error occurs while setting a new limit.
u\bum\bma\bas\bsk\bk [-\b-p\bp] [-\b-S\bS] [_\bm_\bo_\bd_\be]
The user file-creation mask is set to _\bm_\bo_\bd_\be. If _\bm_\bo_\bd_\be begins with
- a digit, it is interpreted as an octal number; otherwise it is
- interpreted as a symbolic mode mask similar to that accepted by
- _\bc_\bh_\bm_\bo_\bd(1). If _\bm_\bo_\bd_\be is omitted, the current value of the mask is
- printed. The -\b-S\bS option causes the mask to be printed in sym-
- bolic form; the default output is an octal number. If the -\b-p\bp
+ a digit, it is interpreted as an octal number; otherwise it is
+ interpreted as a symbolic mode mask similar to that accepted by
+ _\bc_\bh_\bm_\bo_\bd(1). If _\bm_\bo_\bd_\be is omitted, the current value of the mask is
+ printed. The -\b-S\bS option causes the mask to be printed in sym-
+ bolic form; the default output is an octal number. If the -\b-p\bp
option is supplied, and _\bm_\bo_\bd_\be is omitted, the output is in a form
that may be reused as input. The return status is 0 if the mode
- was successfully changed or if no _\bm_\bo_\bd_\be argument was supplied,
+ was successfully changed or if no _\bm_\bo_\bd_\be argument was supplied,
and false otherwise.
u\bun\bna\bal\bli\bia\bas\bs [-a\ba] [_\bn_\ba_\bm_\be ...]
- Remove each _\bn_\ba_\bm_\be from the list of defined aliases. If -\b-a\ba is
- supplied, all alias definitions are removed. The return value
+ Remove each _\bn_\ba_\bm_\be from the list of defined aliases. If -\b-a\ba is
+ supplied, all alias definitions are removed. The return value
is true unless a supplied _\bn_\ba_\bm_\be is not a defined alias.
u\bun\bns\bse\bet\bt [-f\bfv\bv] [-n\bn] [_\bn_\ba_\bm_\be ...]
- For each _\bn_\ba_\bm_\be, remove the corresponding variable or function.
+ For each _\bn_\ba_\bm_\be, remove the corresponding variable or function.
If the -\b-v\bv option is given, each _\bn_\ba_\bm_\be refers to a shell variable,
- and that variable is removed. Read-only variables may not be
- unset. If -\b-f\bf is specified, each _\bn_\ba_\bm_\be refers to a shell func-
- tion, and the function definition is removed. If the -\b-n\bn option
- is supplied, and _\bn_\ba_\bm_\be is a variable with the _\bn_\ba_\bm_\be_\br_\be_\bf attribute,
- _\bn_\ba_\bm_\be will be unset rather than the variable it references. -\b-n\bn
- has no effect if the -\b-f\bf option is supplied. If no options are
- supplied, each _\bn_\ba_\bm_\be refers to a variable; if there is no vari-
- able by that name, any function with that name is unset. Each
- unset variable or function is removed from the environment
- passed to subsequent commands. If any of C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, R\bRA\bAN\bN-\b-
+ and that variable is removed. Read-only variables may not be
+ unset. If -\b-f\bf is specified, each _\bn_\ba_\bm_\be refers to a shell func-
+ tion, and the function definition is removed. If the -\b-n\bn option
+ is supplied, and _\bn_\ba_\bm_\be is a variable with the _\bn_\ba_\bm_\be_\br_\be_\bf attribute,
+ _\bn_\ba_\bm_\be will be unset rather than the variable it references. -\b-n\bn
+ has no effect if the -\b-f\bf option is supplied. If no options are
+ supplied, each _\bn_\ba_\bm_\be refers to a variable; if there is no vari-
+ able by that name, any function with that name is unset. Each
+ unset variable or function is removed from the environment
+ passed to subsequent commands. If any of C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, R\bRA\bAN\bN-\b-
D\bDO\bOM\bM, S\bSE\bEC\bCO\bON\bND\bDS\bS, L\bLI\bIN\bNE\bEN\bNO\bO, H\bHI\bIS\bST\bTC\bCM\bMD\bD, F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE, G\bGR\bRO\bOU\bUP\bPS\bS, or D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK are
unset, they lose their special properties, even if they are sub-
sequently reset. The exit status is true unless a _\bn_\ba_\bm_\be is read-
w\bwa\bai\bit\bt [-\b-n\bn] [_\bn _\b._\b._\b.]
Wait for each specified child process and return its termination
status. Each _\bn may be a process ID or a job specification; if a
- job spec is given, all processes in that job's pipeline are
- waited for. If _\bn is not given, all currently active child pro-
+ job spec is given, all processes in that job's pipeline are
+ waited for. If _\bn is not given, all currently active child pro-
cesses are waited for, and the return status is zero. If the -\b-n\bn
- option is supplied, w\bwa\bai\bit\bt waits for any job to terminate and
- returns its exit status. If _\bn specifies a non-existent process
- or job, the return status is 127. Otherwise, the return status
+ option is supplied, w\bwa\bai\bit\bt waits for any job to terminate and
+ returns its exit status. If _\bn specifies a non-existent process
+ or job, the return status is 127. Otherwise, the return status
is the exit status of the last process or job waited for.
R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL
If b\bba\bas\bsh\bh is started with the name r\brb\bba\bas\bsh\bh, or the -\b-r\br option is supplied at
- invocation, the shell becomes restricted. A restricted shell is used
- to set up an environment more controlled than the standard shell. It
- behaves identically to b\bba\bas\bsh\bh with the exception that the following are
+ invocation, the shell becomes restricted. A restricted shell is used
+ to set up an environment more controlled than the standard shell. It
+ behaves identically to b\bba\bas\bsh\bh with the exception that the following are
disallowed or not performed:
+\bo changing directories with c\bcd\bd
+\bo specifying command names containing /\b/
- +\bo specifying a filename containing a /\b/ as an argument to the .\b.
+ +\bo specifying a filename containing a /\b/ as an argument to the .\b.
builtin command
- +\bo specifying a filename containing a slash as an argument to the
+ +\bo specifying a filename containing a slash as an argument to the
-\b-p\bp option to the h\bha\bas\bsh\bh builtin command
- +\bo importing function definitions from the shell environment at
+ +\bo importing function definitions from the shell environment at
startup
- +\bo parsing the value of S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS from the shell environment at
+ +\bo parsing the value of S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS from the shell environment at
startup
+\bo redirecting output using the >, >|, <>, >&, &>, and >> redirect-
+\bo using the e\bex\bxe\bec\bc builtin command to replace the shell with another
command
- +\bo adding or deleting builtin commands with the -\b-f\bf and -\b-d\bd options
+ +\bo adding or deleting builtin commands with the -\b-f\bf and -\b-d\bd options
to the e\ben\bna\bab\bbl\ble\be builtin command
- +\bo using the e\ben\bna\bab\bbl\ble\be builtin command to enable disabled shell
+ +\bo using the e\ben\bna\bab\bbl\ble\be builtin command to enable disabled shell
builtins
+\bo specifying the -\b-p\bp option to the c\bco\bom\bmm\bma\ban\bnd\bd builtin command
These restrictions are enforced after any startup files are read.
When a command that is found to be a shell script is executed (see C\bCO\bOM\bM-\b-
- M\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN above), r\brb\bba\bas\bsh\bh turns off any restrictions in the shell
+ M\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN above), r\brb\bba\bas\bsh\bh turns off any restrictions in the shell
spawned to execute the script.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
_\bB_\ba_\bs_\bh _\bR_\be_\bf_\be_\br_\be_\bn_\bc_\be _\bM_\ba_\bn_\bu_\ba_\bl, Brian Fox and Chet Ramey
_\bT_\bh_\be _\bG_\bn_\bu _\bR_\be_\ba_\bd_\bl_\bi_\bn_\be _\bL_\bi_\bb_\br_\ba_\br_\by, Brian Fox and Chet Ramey
_\bT_\bh_\be _\bG_\bn_\bu _\bH_\bi_\bs_\bt_\bo_\br_\by _\bL_\bi_\bb_\br_\ba_\br_\by, Brian Fox and Chet Ramey
- _\bP_\bo_\br_\bt_\ba_\bb_\bl_\be _\bO_\bp_\be_\br_\ba_\bt_\bi_\bn_\bg _\bS_\by_\bs_\bt_\be_\bm _\bI_\bn_\bt_\be_\br_\bf_\ba_\bc_\be _\b(_\bP_\bO_\bS_\bI_\bX_\b) _\bP_\ba_\br_\bt _\b2_\b: _\bS_\bh_\be_\bl_\bl _\ba_\bn_\bd _\bU_\bt_\bi_\bl_\bi_\b-
+ _\bP_\bo_\br_\bt_\ba_\bb_\bl_\be _\bO_\bp_\be_\br_\ba_\bt_\bi_\bn_\bg _\bS_\by_\bs_\bt_\be_\bm _\bI_\bn_\bt_\be_\br_\bf_\ba_\bc_\be _\b(_\bP_\bO_\bS_\bI_\bX_\b) _\bP_\ba_\br_\bt _\b2_\b: _\bS_\bh_\be_\bl_\bl _\ba_\bn_\bd _\bU_\bt_\bi_\bl_\bi_\b-
_\bt_\bi_\be_\bs, IEEE --
http://pubs.opengroup.org/onlinepubs/9699919799/
http://tiswww.case.edu/~chet/bash/POSIX -- a description of posix mode
_\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc
The individual per-interactive-shell startup file
_\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bl_\bo_\bg_\bo_\bu_\bt
- The individual login shell cleanup file, executed when a login
+ The individual login shell cleanup file, executed when a login
shell exits
_\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc
Individual _\br_\be_\ba_\bd_\bl_\bi_\bn_\be initialization file
B\bBU\bUG\bG R\bRE\bEP\bPO\bOR\bRT\bTS\bS
If you find a bug in b\bba\bas\bsh\bh,\b, you should report it. But first, you should
- make sure that it really is a bug, and that it appears in the latest
- version of b\bba\bas\bsh\bh. The latest version is always available from
+ make sure that it really is a bug, and that it appears in the latest
+ version of b\bba\bas\bsh\bh. The latest version is always available from
_\bf_\bt_\bp_\b:_\b/_\b/_\bf_\bt_\bp_\b._\bg_\bn_\bu_\b._\bo_\br_\bg_\b/_\bp_\bu_\bb_\b/_\bg_\bn_\bu_\b/_\bb_\ba_\bs_\bh_\b/.
- Once you have determined that a bug actually exists, use the _\bb_\ba_\bs_\bh_\bb_\bu_\bg
- command to submit a bug report. If you have a fix, you are encouraged
- to mail that as well! Suggestions and `philosophical' bug reports may
- be mailed to _\bb_\bu_\bg_\b-_\bb_\ba_\bs_\bh_\b@_\bg_\bn_\bu_\b._\bo_\br_\bg or posted to the Usenet newsgroup
+ Once you have determined that a bug actually exists, use the _\bb_\ba_\bs_\bh_\bb_\bu_\bg
+ command to submit a bug report. If you have a fix, you are encouraged
+ to mail that as well! Suggestions and `philosophical' bug reports may
+ be mailed to _\bb_\bu_\bg_\b-_\bb_\ba_\bs_\bh_\b@_\bg_\bn_\bu_\b._\bo_\br_\bg or posted to the Usenet newsgroup
g\bgn\bnu\bu.\b.b\bba\bas\bsh\bh.\b.b\bbu\bug\bg.
ALL bug reports should include:
A description of the bug behaviour
A short script or `recipe' which exercises the bug
- _\bb_\ba_\bs_\bh_\bb_\bu_\bg inserts the first three items automatically into the template
+ _\bb_\ba_\bs_\bh_\bb_\bu_\bg inserts the first three items automatically into the template
it provides for filing a bug report.
Comments and bug reports concerning this manual page should be directed
Shell builtin commands and functions are not stoppable/restartable.
Compound commands and command sequences of the form `a ; b ; c' are not
- handled gracefully when process suspension is attempted. When a
- process is stopped, the shell immediately executes the next command in
- the sequence. It suffices to place the sequence of commands between
- parentheses to force it into a subshell, which may be stopped as a
+ handled gracefully when process suspension is attempted. When a
+ process is stopped, the shell immediately executes the next command in
+ the sequence. It suffices to place the sequence of commands between
+ parentheses to force it into a subshell, which may be stopped as a
unit.
Array variables may not (yet) be exported.
-GNU Bash 4.3 2013 September 2 BASH(1)
+GNU Bash 4.3 2013 October 20 BASH(1)
included.
.IP
If this variable is not set, \fBbash\fP acts as if it had the
-value \fB$\(aq\enreal\et%3lR\enuser\et%3lU\ensys\ett%3lS\(aq\fP.
+value \fB$\(aq\enreal\et%3lR\enuser\et%3lU\ensys\et%3lS\(aq\fP.
If the value is null, no timing information is displayed.
A trailing newline is added when the format string is displayed.
.PD 0
.\" Case Western Reserve University
.\" chet@po.cwru.edu
.\"
-.\" Last Change: Mon Oct 14 11:51:13 EDT 2013
+.\" Last Change: Sun Oct 20 22:13:29 EDT 2013
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
-.TH BASH 1 "2013 October 14" "GNU Bash 4.3"
+.TH BASH 1 "2013 October 20" "GNU Bash 4.3"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
</HEAD>
<BODY><TABLE WIDTH=100%>
<TR>
-<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2013 September 2<TH ALIGN=RIGHT width=33%>BASH(1)
+<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2013 October 20<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<BR><A HREF="#index">Index</A>
<P>
-The order of expansions is: brace expansion, tilde expansion,
-parameter, variable and arithmetic expansion and
-command substitution
-(done in a left-to-right fashion), word splitting, and pathname
-expansion.
+The order of expansions is:
+brace expansion;
+tilde expansion, parameter and variable expansion, arithmetic expansion,
+and command substitution (done in a left-to-right fashion);
+word splitting;
+and pathname expansion.
<P>
On systems that can support it, there is an additional expansion
available: <I>process substitution</I>.
+This is performed at the
+same time as tilde, parameter, variable, and arithmetic expansion and
+command substitution.
<P>
Only brace expansion, word splitting, and pathname expansion
The return value is 0 unless the shell is not executing a subroutine
call or <I>expr</I> does not correspond to a valid position in the
call stack.
-<DT><B>cd</B> [<B>-L</B>|[<B>-P</B> [<B>-e</B>]]] [<I>dir</I>]<DD>
+<DT><B>cd</B> [<B>-L</B>|[<B>-P</B> [<B>-e</B>]] [-@]] [<I>dir</I>]<DD>
Change the current directory to <I>dir</I>.
if <I>dir</I> is not supplied, the value of the
<FONT SIZE=-1><B>HOME</B>
and the current working directory cannot be successfully determined
after a successful directory change, <B>cd</B> will return an unsuccessful
status.
+On systems that support it, the <B>-@</B> option presents the extended
+attributes associated with a file as a directory.
An argument of
<B>-</B>
<HR>
<TABLE WIDTH=100%>
<TR>
-<TH ALIGN=LEFT width=33%>GNU Bash 4.3<TH ALIGN=CENTER width=33%>2013 September 2<TH ALIGN=RIGHT width=33%>BASH(1)
+<TH ALIGN=LEFT width=33%>GNU Bash 4.3<TH ALIGN=CENTER width=33%>2013 October 20<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<HR>
</DL>
<HR>
This document was created by man2html from bash.1.<BR>
-Time: 11 September 2013 09:17:53 EDT
+Time: 22 October 2013 11:07:59 EDT
</BODY>
</HTML>
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
-%%CreationDate: Wed Sep 11 09:17:46 2013
+%%CreationDate: Tue Oct 22 11:07:52 2013
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
(~/.bashr)3.599 E(c)-.37 E F0 1.599(if the)4.409 F(shell is interacti)
144 698.4 Q .3 -.15(ve \()-.25 H(see).15 E F4(INV)2.5 E(OCA)-.405 E
(TION)-.855 E F0(belo)2.25 E(w\).)-.25 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(1)192.615 E 0 Cg EP
+(2013 October 20)141.235 E(1)195.395 E 0 Cg EP
%%Page: 2 2
%%BeginPageSetup
BP
F(ariable)-.25 E F3 -.27(BA)108 720 S(SH_ENV).27 E F0 1.01(in the en)
3.26 F 1.01(vironment, e)-.4 F 1.01(xpands its v)-.15 F 1.01
(alue if it appears there, and uses the e)-.25 F 1.011(xpanded v)-.15 F
-1.011(alue as the)-.25 F(GNU Bash 4.3)72 768 Q(2013 September 2)138.455
-E(2)192.615 E 0 Cg EP
+1.011(alue as the)-.25 F(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E
+(2)195.395 E 0 Cg EP
%%Page: 3 3
%%BeginPageSetup
BP
(simple command)2.675 F F0 .175(is its e)2.675 F .175
(xit status, or 128+)-.15 F F4(n)A F0 .176
(if the command is terminated by signal)3.508 F F4(n)2.676 E F0(.).24 E
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(3)192.615 E 0 Cg EP
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(3)195.395 E 0 Cg EP
%%Page: 4 4
%%BeginPageSetup
BP
-3.554 F 1.027(separated from the rest of the command by one or more ne)
108 698.4 R 1.026(wlines, and may be follo)-.25 F 1.026(wed by a ne)-.25
F 1.026(wline in)-.25 F(place of a semicolon.)108 710.4 Q(GNU Bash 4.3)
-72 768 Q(2013 September 2)138.455 E(4)192.615 E 0 Cg EP
+72 768 Q(2013 October 20)141.235 E(4)195.395 E 0 Cg EP
%%Page: 5 5
%%BeginPageSetup
BP
(ex)2.5 G(pr).2 E(ession2)-.37 E F0 -.35(Tr)180 716.4 S(ue if either).35
E F1 -.2(ex)2.5 G(pr).2 E(ession1)-.37 E F0(or)2.5 E F1 -.2(ex)2.5 G(pr)
.2 E(ession2)-.37 E F0(is true.)2.52 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(5)192.615 E 0 Cg EP
+(2013 October 20)141.235 E(5)195.395 E 0 Cg EP
%%Page: 6 6
%%BeginPageSetup
BP
(and)2.705 E F1(until)2.704 E F0 .204(commands is the e)2.704 F .204
(xit status of the last command)-.15 F -.15(exe)144 700.8 S(cuted in).15
E F2(list-2)2.5 E F0 2.5(,o)C 2.5(rz)-2.5 G(ero if none w)-2.5 E(as e)
--.1 E -.15(xe)-.15 G(cuted.).15 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(6)192.615 E 0 Cg EP
+-.1 E -.15(xe)-.15 G(cuted.).15 E(GNU Bash 4.3)72 768 Q(2013 October 20)
+141.235 E(6)195.395 E 0 Cg EP
%%Page: 7 7
%%BeginPageSetup
BP
(There are three quoting mechanisms: the)108 724.8 Q F2(escape c)2.5 E
(har)-.15 E(acter)-.15 E F0 2.5(,s).73 G
(ingle quotes, and double quotes.)-2.5 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(7)192.615 E 0 Cg EP
+(2013 October 20)141.235 E(7)195.395 E 0 Cg EP
%%Page: 8 8
%%BeginPageSetup
BP
2.5 G(iltin command \(see).2 E F3(SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS)
-.828 E F0(belo)2.25 E(w\).)-.25 E(A)108 703.2 Q F2(variable)2.79 E F0
(may be assigned to by a statement of the form)2.68 E F2(name)144 720 Q
-F0(=[)A F2(value)A F0(])A(GNU Bash 4.3)72 768 Q(2013 September 2)138.455
-E(8)192.615 E 0 Cg EP
+F0(=[)A F2(value)A F0(])A(GNU Bash 4.3)72 768 Q(2013 October 20)141.235
+E(8)195.395 E 0 Cg EP
%%Page: 9 9
%%BeginPageSetup
BP
-.15 F .151(with the be)144 720 R .151(ginning part of the original w)
-.15 F .151(ord, and the e)-.1 F .15
(xpansion of the last parameter is joined with)-.15 F(GNU Bash 4.3)72
-768 Q(2013 September 2)138.455 E(9)192.615 E 0 Cg EP
+768 Q(2013 October 20)141.235 E(9)195.395 E 0 Cg EP
%%Page: 10 10
%%BeginPageSetup
BP
(cuted, unless the shell is e).15 F -.15(xe)-.15 G 1.243(cuting a).15 F
(command as the result of a trap, in which case it is the command e)144
729.6 Q -.15(xe)-.15 G(cuting at the time of the trap.).15 E
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(10)187.615 E 0 Cg EP
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(10)190.395 E 0 Cg EP
%%Page: 11 11
%%BeginPageSetup
BP
(ternal commands in).15 F -.2(vo)-.4 G -.1(ke).2 G 5.429(db).1 G 5.429
(yt)-5.429 G 2.929(he programmable completion f)-5.429 F 2.929
(acilities \(see)-.1 F F1(Pr)5.428 E(ogrammable)-.18 E(Completion)144
-714 Q F0(belo)2.5 E(w\).)-.25 E(GNU Bash 4.3)72 768 Q(2013 September 2)
-138.455 E(11)187.615 E 0 Cg EP
+714 Q F0(belo)2.5 E(w\).)-.25 E(GNU Bash 4.3)72 768 Q(2013 October 20)
+141.235 E(11)190.395 E 0 Cg EP
%%Page: 12 12
%%BeginPageSetup
BP
es the system type on which)144 690 R F1(bash)3.398 E F0 .898(is e)3.398
F -.15(xe)-.15 G .898(cuting, in).15 F(the standard GNU)144 702 Q F4
(cpu-company-system)2.5 E F0 2.5(format. The)2.5 F(def)2.5 E
-(ault is system-dependent.)-.1 E(GNU Bash 4.3)72 768 Q(2013 September 2)
-138.455 E(12)187.615 E 0 Cg EP
+(ault is system-dependent.)-.1 E(GNU Bash 4.3)72 768 Q(2013 October 20)
+141.235 E(12)190.395 E 0 Cg EP
%%Page: 13 13
%%BeginPageSetup
BP
4.028 E .248(set to a v)144 729.6 R .248(alue that is not one of the v)
-.25 F .248(alid compatibility le)-.25 F -.15(ve)-.25 G .249
(ls, the shell prints an error message and).15 F(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(13)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(13)190.395 E 0 Cg EP
%%Page: 14 14
%%BeginPageSetup
BP
(all pre)144 720 R .698
(vious lines matching the current line to be remo)-.25 F -.15(ve)-.15 G
3.198(df).15 G .698(rom the history list before that line is)-3.198 F
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(14)187.615 E 0 Cg EP
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(14)190.395 E 0 Cg EP
%%Page: 15 15
%%BeginPageSetup
BP
1.239(gory for an)-.15 F 3.739(yc)-.15 G(ate)-3.739 E 1.24
(gory not speci\214cally selected with a v)-.15 F(ariable)-.25 E
(starting with)144 720 Q F3(LC_)2.5 E F0(.)A(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(15)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(15)190.395 E 0 Cg EP
%%Page: 16 16
%%BeginPageSetup
BP
(alue of this parameter is e)-.25 F .117(xpanded as with)-.15 F F2(PS1)
2.617 E F0 .118(and used as the secondary prompt string.)2.368 F(The)
5.118 E(def)144 720 Q(ault is `)-.1 E(`)-.74 E F1(>)A F0 -.74('')2.5 G
-(.).74 E(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(16)187.615 E 0
+(.).74 E(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(16)190.395 E 0
Cg EP
%%Page: 17 17
%%BeginPageSetup
(ing one string for another in the command.)144 728.4 R .575(The def)
5.575 F .575(ault is `)-.1 F F1(^)A F0 3.075('. The)B .576
(optional third character is the)3.076 F(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(17)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(17)190.395 E 0 Cg EP
%%Page: 18 18
%%BeginPageSetup
BP
(name)108 724.8 Q F0([)A F2(subscript)A F0(], where)A F2(subscript)2.5 E
F0(is)2.5 E F1(*)2.5 E F0(or)2.5 E F1(@)2.5 E F0 2.5(,r)C(emo)-2.5 E
-.15(ve)-.15 G 2.5(st).15 G(he entire array)-2.5 E(.)-.65 E
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(18)187.615 E 0 Cg EP
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(18)190.395 E 0 Cg EP
%%Page: 19 19
%%BeginPageSetup
BP
(command sub-)2.869 F(stitution)108 172.8 Q F0(,).24 E F3(arithmetic e)
2.5 E(xpansion)-.2 E F0(,).24 E F3(wor)2.5 E 2.5(ds)-.37 G(plitting)-2.5
E F0 2.5(,a).22 G(nd)-2.5 E F3(pathname e)2.5 E(xpansion)-.2 E F0(.).24
-E .471(The order of e)108 189.6 R .471(xpansions is: brace e)-.15 F .471
-(xpansion, tilde e)-.15 F .471(xpansion, parameter)-.15 F 2.971(,v)-.4 G
-.47(ariable and arithmetic e)-3.221 F(xpansion)-.15 E
-(and command substitution \(done in a left-to-right f)108 201.6 Q
-(ashion\), w)-.1 E(ord splitting, and pathname e)-.1 E(xpansion.)-.15 E
-(On systems that can support it, there is an additional e)108 218.4 Q
-(xpansion a)-.15 E -.25(va)-.2 G(ilable:).25 E F3(pr)2.5 E
-(ocess substitution)-.45 E F0(.)A 1.486(Only brace e)108 235.2 R 1.486
-(xpansion, w)-.15 F 1.486(ord splitting, and pathname e)-.1 F 1.487
+E .419(The order of e)108 189.6 R .419(xpansions is: brace e)-.15 F .418
+(xpansion; tilde e)-.15 F .418(xpansion, parameter and v)-.15 F .418
+(ariable e)-.25 F .418(xpansion, arithmetic)-.15 F -.15(ex)108 201.6 S
+.195(pansion, and command substitution \(done in a left-to-right f).15 F
+.196(ashion\); w)-.1 F .196(ord splitting; and pathname e)-.1 F(xpan-)
+-.15 E(sion.)108 213.6 Q .257
+(On systems that can support it, there is an additional e)108 230.4 R
+.257(xpansion a)-.15 F -.25(va)-.2 G(ilable:).25 E F3(pr)2.757 E .257
+(ocess substitution)-.45 F F0 5.257(.T)C .256(his is per)-5.257 F(-)-.2
+E(formed at the same time as tilde, parameter)108 242.4 Q 2.5(,v)-.4 G
+(ariable, and arithmetic e)-2.75 E(xpansion and command substitution.)
+-.15 E 1.486(Only brace e)108 259.2 R 1.486(xpansion, w)-.15 F 1.486
+(ord splitting, and pathname e)-.1 F 1.487
(xpansion can change the number of w)-.15 F 1.487(ords of the)-.1 F -.15
-(ex)108 247.2 S 1.165(pansion; other e).15 F 1.165(xpansions e)-.15 F
+(ex)108 271.2 S 1.165(pansion; other e).15 F 1.165(xpansions e)-.15 F
1.165(xpand a single w)-.15 F 1.165(ord to a single w)-.1 F 3.665
(ord. The)-.1 F 1.164(only e)3.665 F 1.164(xceptions to this are the)
--.15 F -.15(ex)108 259.2 S(pansions of ").15 E F1($@)A F0 2.5("a)C(nd ")
+-.15 F -.15(ex)108 283.2 S(pansions of ").15 E F1($@)A F0 2.5("a)C(nd ")
-2.5 E F1(${)A F3(name)A F1([@]})A F0 2.5("a)C 2.5(se)-2.5 G
(xplained abo)-2.65 E .3 -.15(ve \()-.15 H(see).15 E/F4 9/Times-Bold@0
SF -.666(PA)2.5 G(RAMETERS).666 E/F5 9/Times-Roman@0 SF(\).)A F1
-(Brace Expansion)87 276 Q F3(Br)108.58 288 Q .606(ace e)-.15 F(xpansion)
+(Brace Expansion)87 300 Q F3(Br)108.58 312 Q .606(ace e)-.15 F(xpansion)
-.2 E F0 .606
(is a mechanism by which arbitrary strings may be generated.)3.346 F
-.606(This mechanism is similar)5.606 F(to)108 300 Q F3 .415(pathname e)
+.606(This mechanism is similar)5.606 F(to)108 324 Q F3 .415(pathname e)
2.915 F(xpansion)-.2 E F0 2.915(,b)C .415
(ut the \214lenames generated need not e)-3.115 F 2.915(xist. P)-.15 F
.415(atterns to be brace e)-.15 F .415(xpanded tak)-.15 F 2.915(et)-.1 G
-(he)-2.915 E .151(form of an optional)108 312 R F3(pr)2.651 E(eamble)
+(he)-2.915 E .151(form of an optional)108 336 R F3(pr)2.651 E(eamble)
-.37 E F0 2.651(,f).18 G(ollo)-2.651 E .151
(wed by either a series of comma-separated strings or a sequence e)-.25
-F(xpres-)-.15 E .563(sion between a pair of braces, follo)108 324 R .563
+F(xpres-)-.15 E .563(sion between a pair of braces, follo)108 348 R .563
(wed by an optional)-.25 F F3(postscript)3.063 E F0 5.563(.T).68 G .563
(he preamble is pre\214x)-5.563 F .563(ed to each string)-.15 F .659(co\
ntained within the braces, and the postscript is then appended to each \
-resulting string, e)108 336 R .659(xpanding left to)-.15 F(right.)108
-348 Q .719(Brace e)108 364.8 R .719(xpansions may be nested.)-.15 F .719
+resulting string, e)108 360 R .659(xpanding left to)-.15 F(right.)108
+372 Q .719(Brace e)108 388.8 R .719(xpansions may be nested.)-.15 F .719
(The results of each e)5.719 F .719
(xpanded string are not sorted; left to right order is)-.15 F(preserv)
-108 376.8 Q 2.5(ed. F)-.15 F(or e)-.15 E(xample, a)-.15 E F1({)A F0
+108 400.8 Q 2.5(ed. F)-.15 F(or e)-.15 E(xample, a)-.15 E F1({)A F0
(d,c,b)A F1(})A F0 2.5(ee)C(xpands into `ade ace abe'.)-2.65 E 3.242(As)
-108 393.6 S .742(equence e)-3.242 F .742(xpression tak)-.15 F .742
+108 417.6 S .742(equence e)-3.242 F .742(xpression tak)-.15 F .742
(es the form)-.1 F F1({)3.242 E F3(x)A F1(..)A F3(y)A F1([..)A F3(incr)A
F1(]})A F0 3.242(,w)C(here)-3.242 E F3(x)3.242 E F0(and)3.243 E F3(y)
3.243 E F0 .743(are either inte)3.243 F .743(gers or single characters,)
--.15 F(and)108 405.6 Q F3(incr)3.032 E F0 3.032(,a)C 3.032(no)-3.032 G
+-.15 F(and)108 429.6 Q F3(incr)3.032 E F0 3.032(,a)C 3.032(no)-3.032 G
.532(ptional increment, is an inte)-3.032 F(ger)-.15 E 5.532(.W)-.55 G
.532(hen inte)-5.532 F .532(gers are supplied, the e)-.15 F .532
(xpression e)-.15 F .531(xpands to each)-.15 F .077(number between)108
-417.6 R F3(x)2.577 E F0(and)2.577 E F3(y)2.577 E F0 2.577(,i)C(nclusi)
+441.6 R F3(x)2.577 E F0(and)2.577 E F3(y)2.577 E F0 2.577(,i)C(nclusi)
-2.577 E -.15(ve)-.25 G 5.077(.S).15 G .077(upplied inte)-5.077 F .077
(gers may be pre\214x)-.15 F .077(ed with)-.15 F F3(0)2.577 E F0 .078
(to force each term to ha)2.578 F .378 -.15(ve t)-.2 H(he).15 E .015
-(same width.)108 429.6 R .015(When either)5.015 F F3(x)2.515 E F0(or)
+(same width.)108 453.6 R .015(When either)5.015 F F3(x)2.515 E F0(or)
2.515 E F3(y)2.515 E F0(be)2.515 E .014(gins with a zero, the shell att\
empts to force all generated terms to contain)-.15 F 1.143
-(the same number of digits, zero-padding where necessary)108 441.6 R
+(the same number of digits, zero-padding where necessary)108 465.6 R
6.143(.W)-.65 G 1.143(hen characters are supplied, the e)-6.143 F
-(xpression)-.15 E -.15(ex)108 453.6 S 1.064(pands to each character le)
+(xpression)-.15 E -.15(ex)108 477.6 S 1.064(pands to each character le)
.15 F 1.064(xicographically between)-.15 F F3(x)3.564 E F0(and)3.564 E
F3(y)3.564 E F0 3.564(,i)C(nclusi)-3.564 E -.15(ve)-.25 G 3.564(,u).15 G
1.064(sing the def)-3.564 F 1.064(ault C locale.)-.1 F(Note)6.064 E .983
-(that both)108 465.6 R F3(x)3.483 E F0(and)3.483 E F3(y)3.483 E F0 .983
+(that both)108 489.6 R F3(x)3.483 E F0(and)3.483 E F3(y)3.483 E F0 .983
(must be of the same type.)3.483 F .984
(When the increment is supplied, it is used as the dif)5.983 F(ference)
--.25 E(between each term.)108 477.6 Q(The def)5 E
-(ault increment is 1 or -1 as appropriate.)-.1 E .582(Brace e)108 494.4
+-.25 E(between each term.)108 501.6 Q(The def)5 E
+(ault increment is 1 or -1 as appropriate.)-.1 E .582(Brace e)108 518.4
R .582(xpansion is performed before an)-.15 F 3.082(yo)-.15 G .581
(ther e)-3.082 F .581(xpansions, and an)-.15 F 3.081(yc)-.15 G .581
(haracters special to other e)-3.081 F(xpansions)-.15 E .015
-(are preserv)108 506.4 R .015(ed in the result.)-.15 F .015
+(are preserv)108 530.4 R .015(ed in the result.)-.15 F .015
(It is strictly te)5.015 F(xtual.)-.15 E F1(Bash)5.016 E F0 .016
(does not apply an)2.516 F 2.516(ys)-.15 G .016
-(yntactic interpretation to the con-)-2.516 F(te)108 518.4 Q
+(yntactic interpretation to the con-)-2.516 F(te)108 542.4 Q
(xt of the e)-.15 E(xpansion or the te)-.15 E(xt between the braces.)
--.15 E 3.633(Ac)108 535.2 S 1.133(orrectly-formed brace e)-3.633 F 1.132
+-.15 E 3.633(Ac)108 559.2 S 1.133(orrectly-formed brace e)-3.633 F 1.132
(xpansion must contain unquoted opening and closing braces, and at leas\
-t one)-.15 F 3.44(unquoted comma or a v)108 547.2 R 3.441
+t one)-.15 F 3.44(unquoted comma or a v)108 571.2 R 3.441
(alid sequence e)-.25 F 5.941(xpression. An)-.15 F 5.941(yi)-.15 G 3.441
(ncorrectly formed brace e)-5.941 F 3.441(xpansion is left)-.15 F 2.755
-(unchanged. A)108 559.2 R F1({)2.755 E F0(or)2.755 E F1(,)2.755 E F0
+(unchanged. A)108 583.2 R F1({)2.755 E F0(or)2.755 E F1(,)2.755 E F0
.255(may be quoted with a backslash to pre)2.755 F -.15(ve)-.25 G .255
(nt its being considered part of a brace e).15 F(xpres-)-.15 E 2.91
-(sion. T)108 571.2 R 2.91(oa)-.8 G -.2(vo)-3.11 G .41
+(sion. T)108 595.2 R 2.91(oa)-.8 G -.2(vo)-3.11 G .41
(id con\215icts with parameter e).2 F .411(xpansion, the string)-.15 F
F1(${)2.911 E F0 .411(is not considered eligible for brace e)2.911 F
-(xpan-)-.15 E(sion.)108 583.2 Q 1.476(This construct is typically used \
+(xpan-)-.15 E(sion.)108 607.2 Q 1.476(This construct is typically used \
as shorthand when the common pre\214x of the strings to be generated is)
-108 600 R(longer than in the abo)108 612 Q .3 -.15(ve ex)-.15 H(ample:)
-.15 E(mkdir /usr/local/src/bash/{old,ne)144 628.8 Q -.65(w,)-.25 G
-(dist,b).65 E(ugs})-.2 E(or)108 640.8 Q(cho)144 652.8 Q
+108 624 R(longer than in the abo)108 636 Q .3 -.15(ve ex)-.15 H(ample:)
+.15 E(mkdir /usr/local/src/bash/{old,ne)144 652.8 Q -.65(w,)-.25 G
+(dist,b).65 E(ugs})-.2 E(or)108 664.8 Q(cho)144 676.8 Q
(wn root /usr/{ucb/{e)-.25 E(x,edit},lib/{e)-.15 E(x?.?*,ho)-.15 E(w_e)
--.25 E(x}})-.15 E .618(Brace e)108 669.6 R .618
+-.25 E(x}})-.15 E .618(Brace e)108 693.6 R .618
(xpansion introduces a slight incompatibility with historical v)-.15 F
.618(ersions of)-.15 F F1(sh)3.118 E F0(.)A F1(sh)5.618 E F0 .618
(does not treat open-)3.118 F .248
-(ing or closing braces specially when the)108 681.6 R 2.748(ya)-.15 G
+(ing or closing braces specially when the)108 705.6 R 2.748(ya)-.15 G
.247(ppear as part of a w)-2.748 F .247(ord, and preserv)-.1 F .247
-(es them in the output.)-.15 F F1(Bash)5.247 E F0(remo)108 693.6 Q -.15
+(es them in the output.)-.15 F F1(Bash)5.247 E F0(remo)108 717.6 Q -.15
(ve)-.15 G 3.53(sb).15 G 1.03(races from w)-3.53 F 1.03
(ords as a consequence of brace e)-.1 F 3.53(xpansion. F)-.15 F 1.03
(or e)-.15 F 1.03(xample, a w)-.15 F 1.03(ord entered to)-.1 F F1(sh)
-3.53 E F0(as)3.53 E F3(\214le{1,2})108 705.6 Q F0 .515
+3.53 E F0(as)3.53 E F3(\214le{1,2})108 729.6 Q F0 .515
(appears identically in the output.)3.015 F .515(The same w)5.515 F .515
(ord is output as)-.1 F F3 .514(\214le1 \214le2)4.925 F F0 .514(after e)
-3.034 F .514(xpansion by)-.15 F F1(bash)3.014 E F0(.)A .436
-(If strict compatibility with)108 717.6 R F1(sh)2.936 E F0 .436
-(is desired, start)2.936 F F1(bash)2.936 E F0 .436(with the)2.936 F F1
-(+B)2.936 E F0 .436(option or disable brace e)2.936 F .437
-(xpansion with the)-.15 F F1(+B)108 729.6 Q F0(option to the)2.5 E F1
-(set)2.5 E F0(command \(see)2.5 E F4(SHELL B)2.5 E(UIL)-.09 E
-(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(19)187.615 E 0 Cg EP
+3.034 F .514(xpansion by)-.15 F F1(bash)3.014 E F0(.)A(GNU Bash 4.3)72
+768 Q(2013 October 20)141.235 E(19)190.395 E 0 Cg EP
%%Page: 20 20
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
--.35 E/F1 10/Times-Bold@0 SF -.18(Ti)87 84 S(lde Expansion).18 E F0
-1.087(If a w)108 96 R 1.087(ord be)-.1 F 1.087
-(gins with an unquoted tilde character \(`)-.15 F F1(~)A F0 1.086
-('\), all of the characters preceding the \214rst unquoted)B .185(slash\
- \(or all characters, if there is no unquoted slash\) are considered a)
-108 108 R/F2 10/Times-Italic@0 SF(tilde-pr)2.685 E(e\214x)-.37 E F0
-5.185(.I)C 2.685(fn)-5.185 G .185(one of the characters)-2.685 F .726(i\
-n the tilde-pre\214x are quoted, the characters in the tilde-pre\214x f\
-ollo)108 120 R .725(wing the tilde are treated as a possible)-.25 F F2
-(lo)108 132 Q .522(gin name)-.1 F F0 5.522(.I)C 3.022(ft)-5.522 G .522
+-.35 E .436(If strict compatibility with)108 84 R/F1 10/Times-Bold@0 SF
+(sh)2.936 E F0 .436(is desired, start)2.936 F F1(bash)2.936 E F0 .436
+(with the)2.936 F F1(+B)2.936 E F0 .436(option or disable brace e)2.936
+F .437(xpansion with the)-.15 F F1(+B)108 96 Q F0(option to the)2.5 E F1
+(set)2.5 E F0(command \(see)2.5 E/F2 9/Times-Bold@0 SF(SHELL B)2.5 E
+(UIL)-.09 E(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 E F1 -.18(Ti)
+87 112.8 S(lde Expansion).18 E F0 1.087(If a w)108 124.8 R 1.087(ord be)
+-.1 F 1.087(gins with an unquoted tilde character \(`)-.15 F F1(~)A F0
+1.086('\), all of the characters preceding the \214rst unquoted)B .185(\
+slash \(or all characters, if there is no unquoted slash\) are consider\
+ed a)108 136.8 R/F3 10/Times-Italic@0 SF(tilde-pr)2.685 E(e\214x)-.37 E
+F0 5.185(.I)C 2.685(fn)-5.185 G .185(one of the characters)-2.685 F .726
+(in the tilde-pre\214x are quoted, the characters in the tilde-pre\214x\
+ follo)108 148.8 R .725(wing the tilde are treated as a possible)-.25 F
+F3(lo)108 160.8 Q .522(gin name)-.1 F F0 5.522(.I)C 3.022(ft)-5.522 G
+.522
(his login name is the null string, the tilde is replaced with the v)
--3.022 F .523(alue of the shell parameter)-.25 F/F3 9/Times-Bold@0 SF
-(HOME)108 144 Q/F4 9/Times-Roman@0 SF(.)A F0(If)4.787 E F3(HOME)2.787 E
-F0 .287(is unset, the home directory of the user e)2.537 F -.15(xe)-.15
-G .286(cuting the shell is substituted instead.).15 F(Other)5.286 E(-)
--.2 E(wise, the tilde-pre\214x is replaced with the home directory asso\
-ciated with the speci\214ed login name.)108 156 Q .092
-(If the tilde-pre\214x is a `~+', the v)108 172.8 R .092
-(alue of the shell v)-.25 F(ariable)-.25 E F3(PWD)2.592 E F0 .092
+-3.022 F .523(alue of the shell parameter)-.25 F F2(HOME)108 172.8 Q/F4
+9/Times-Roman@0 SF(.)A F0(If)4.787 E F2(HOME)2.787 E F0 .287
+(is unset, the home directory of the user e)2.537 F -.15(xe)-.15 G .286
+(cuting the shell is substituted instead.).15 F(Other)5.286 E(-)-.2 E(w\
+ise, the tilde-pre\214x is replaced with the home directory associated \
+with the speci\214ed login name.)108 184.8 Q .092
+(If the tilde-pre\214x is a `~+', the v)108 201.6 R .092
+(alue of the shell v)-.25 F(ariable)-.25 E F2(PWD)2.592 E F0 .092
(replaces the tilde-pre\214x.)2.342 F .093(If the tilde-pre\214x is)
-5.093 F 3.404(a`)108 184.8 S .904(~\255', the v)-3.404 F .904
-(alue of the shell v)-.25 F(ariable)-.25 E F3(OLDPWD)3.404 E F4(,)A F0
+5.093 F 3.404(a`)108 213.6 S .904(~\255', the v)-3.404 F .904
+(alue of the shell v)-.25 F(ariable)-.25 E F2(OLDPWD)3.404 E F4(,)A F0
.904(if it is set, is substituted.)3.154 F .903(If the characters follo)
5.903 F .903(wing the)-.25 F 1.641
-(tilde in the tilde-pre\214x consist of a number)108 196.8 R F2(N)4.141
+(tilde in the tilde-pre\214x consist of a number)108 225.6 R F3(N)4.141
E F0 4.142(,o)C 1.642(ptionally pre\214x)-4.142 F 1.642
(ed by a `+' or a `\255', the tilde-pre\214x is)-.15 F 1.438(replaced w\
ith the corresponding element from the directory stack, as it w)108
-208.8 R 1.437(ould be displayed by the)-.1 F F1(dirs)3.937 E F0 -.2(bu)
-108 220.8 S .454(iltin in).2 F -.2(vo)-.4 G -.1(ke).2 G 2.954(dw).1 G
+237.6 R 1.437(ould be displayed by the)-.1 F F1(dirs)3.937 E F0 -.2(bu)
+108 249.6 S .454(iltin in).2 F -.2(vo)-.4 G -.1(ke).2 G 2.954(dw).1 G
.454(ith the tilde-pre\214x as an ar)-2.954 F 2.954(gument. If)-.18 F
.454(the characters follo)2.954 F .455
(wing the tilde in the tilde-pre\214x)-.25 F
(consist of a number without a leading `+' or `\255', `+' is assumed.)
-108 232.8 Q(If the login name is in)108 249.6 Q -.25(va)-.4 G
+108 261.6 Q(If the login name is in)108 278.4 Q -.25(va)-.4 G
(lid, or the tilde e).25 E(xpansion f)-.15 E(ails, the w)-.1 E
-(ord is unchanged.)-.1 E .167(Each v)108 266.4 R .167
+(ord is unchanged.)-.1 E .167(Each v)108 295.2 R .167
(ariable assignment is check)-.25 F .167(ed for unquoted tilde-pre\214x)
-.1 F .167(es immediately follo)-.15 F .167(wing a)-.25 F F1(:)2.667 E
F0 .167(or the \214rst)2.667 F F1(=)2.666 E F0 5.166(.I)C(n)-5.166 E
-.467(these cases, tilde e)108 278.4 R .467(xpansion is also performed.)
+.467(these cases, tilde e)108 307.2 R .467(xpansion is also performed.)
-.15 F(Consequently)5.467 E 2.967(,o)-.65 G .468
(ne may use \214lenames with tildes in assign-)-2.967 F(ments to)108
-290.4 Q F3 -.666(PA)2.5 G(TH)-.189 E F4(,)A F3(MAILP)2.25 E -.855(AT)
--.666 G(H).855 E F4(,)A F0(and)2.25 E F3(CDP)2.5 E -.855(AT)-.666 G(H)
+319.2 Q F2 -.666(PA)2.5 G(TH)-.189 E F4(,)A F2(MAILP)2.25 E -.855(AT)
+-.666 G(H).855 E F4(,)A F0(and)2.25 E F2(CDP)2.5 E -.855(AT)-.666 G(H)
.855 E F4(,)A F0(and the shell assigns the e)2.25 E(xpanded v)-.15 E
-(alue.)-.25 E F1 -.1(Pa)87 307.2 S(rameter Expansion).1 E F0 1.606
-(The `)108 319.2 R F1($)A F0 4.106('c)C 1.606
-(haracter introduces parameter e)-4.106 F 1.605
-(xpansion, command substitution, or arithmetic e)-.15 F 4.105
-(xpansion. The)-.15 F .406(parameter name or symbol to be e)108 331.2 R
-.407(xpanded may be enclosed in braces, which are optional b)-.15 F .407
-(ut serv)-.2 F 2.907(et)-.15 G 2.907(op)-2.907 G(ro-)-2.907 E .033
-(tect the v)108 343.2 R .033(ariable to be e)-.25 F .033
+(alue.)-.25 E F1 -.1(Pa)87 336 S(rameter Expansion).1 E F0 1.606(The `)
+108 348 R F1($)A F0 4.106('c)C 1.606(haracter introduces parameter e)
+-4.106 F 1.605(xpansion, command substitution, or arithmetic e)-.15 F
+4.105(xpansion. The)-.15 F .406(parameter name or symbol to be e)108 360
+R .407(xpanded may be enclosed in braces, which are optional b)-.15 F
+.407(ut serv)-.2 F 2.907(et)-.15 G 2.907(op)-2.907 G(ro-)-2.907 E .033
+(tect the v)108 372 R .033(ariable to be e)-.25 F .033
(xpanded from characters immediately follo)-.15 F .032
-(wing it which could be interpreted as part)-.25 F(of the name.)108
-355.2 Q 1.189
+(wing it which could be interpreted as part)-.25 F(of the name.)108 384
+Q 1.189
(When braces are used, the matching ending brace is the \214rst `)108
-372 R F1(})A F0 3.69('n)C 1.19(ot escaped by a backslash or within a)
+400.8 R F1(})A F0 3.69('n)C 1.19(ot escaped by a backslash or within a)
-3.69 F 2.15(quoted string, and not within an embedded arithmetic e)108
-384 R 2.15(xpansion, command substitution, or parameter)-.15 F -.15(ex)
-108 396 S(pansion.).15 E(${)108 412.8 Q F2(par)A(ameter)-.15 E F0(})A
-1.204(The v)144 424.8 R 1.204(alue of)-.25 F F2(par)3.704 E(ameter)-.15
-E F0 1.204(is substituted.)3.704 F 1.204(The braces are required when)
-6.204 F F2(par)4.955 E(ameter)-.15 E F0 1.205(is a positional)4.435 F
-.264(parameter with more than one digit, or when)144 436.8 R F2(par)
-4.014 E(ameter)-.15 E F0 .264(is follo)3.494 F .264
+412.8 R 2.15(xpansion, command substitution, or parameter)-.15 F -.15
+(ex)108 424.8 S(pansion.).15 E(${)108 441.6 Q F3(par)A(ameter)-.15 E F0
+(})A 1.204(The v)144 453.6 R 1.204(alue of)-.25 F F3(par)3.704 E(ameter)
+-.15 E F0 1.204(is substituted.)3.704 F 1.204
+(The braces are required when)6.204 F F3(par)4.955 E(ameter)-.15 E F0
+1.205(is a positional)4.435 F .264
+(parameter with more than one digit, or when)144 465.6 R F3(par)4.014 E
+(ameter)-.15 E F0 .264(is follo)3.494 F .264
(wed by a character which is not to)-.25 F 2.676
-(be interpreted as part of its name.)144 448.8 R(The)7.677 E F2(par)
+(be interpreted as part of its name.)144 477.6 R(The)7.677 E F3(par)
5.177 E(ameter)-.15 E F0 2.677(is a shell parameter as described abo)
-5.177 F -.15(ve)-.15 G F1 -.74(PA)144 460.8 S(RAMETERS).74 E F0 2.5(\)o)
+5.177 F -.15(ve)-.15 G F1 -.74(PA)144 489.6 S(RAMETERS).74 E F0 2.5(\)o)
C 2.5(ra)-2.5 G 2.5(na)-2.5 G(rray reference \()-2.5 E F1(Arrays)A F0
-(\).)A .816(If the \214rst character of)108 477.6 R F2(par)3.316 E
+(\).)A .816(If the \214rst character of)108 506.4 R F3(par)3.316 E
(ameter)-.15 E F0 .816(is an e)3.316 F .816(xclamation point \()-.15 F
F1(!)A F0 .816(\), it introduces a le)B -.15(ve)-.25 G 3.316(lo).15 G
-3.315(fv)-3.316 G .815(ariable indirection.)-3.565 F F1(Bash)108 489.6 Q
+3.315(fv)-3.316 G .815(ariable indirection.)-3.565 F F1(Bash)108 518.4 Q
F0 .106(uses the v)2.606 F .106(alue of the v)-.25 F .106
-(ariable formed from the rest of)-.25 F F2(par)2.606 E(ameter)-.15 E F0
+(ariable formed from the rest of)-.25 F F3(par)2.606 E(ameter)-.15 E F0
.106(as the name of the v)2.606 F .106(ariable; this v)-.25 F(ari-)-.25
-E .352(able is then e)108 501.6 R .352(xpanded and that v)-.15 F .351
+E .352(able is then e)108 530.4 R .352(xpanded and that v)-.15 F .351
(alue is used in the rest of the substitution, rather than the v)-.25 F
-.351(alue of)-.25 F F2(par)2.851 E(ame-)-.15 E(ter)108 513.6 Q F0 2.519
-(itself. This)2.519 F .019(is kno)2.519 F .019(wn as)-.25 F F2(indir)
+.351(alue of)-.25 F F3(par)2.851 E(ame-)-.15 E(ter)108 542.4 Q F0 2.519
+(itself. This)2.519 F .019(is kno)2.519 F .019(wn as)-.25 F F3(indir)
2.519 E .019(ect e)-.37 F(xpansion)-.2 E F0 5.019(.T)C .019(he e)-5.019
F .02(xceptions to this are the e)-.15 F .02(xpansions of ${)-.15 F F1
-(!)A F2(pr)A(e\214x)-.37 E F1(*)A F0 2.52(}a)C(nd)-2.52 E(${)108 525.6 Q
-F1(!)A F2(name)A F0([)A F2(@)A F0 .763(]} described belo)B 4.563 -.65
+(!)A F3(pr)A(e\214x)-.37 E F1(*)A F0 2.52(}a)C(nd)-2.52 E(${)108 554.4 Q
+F1(!)A F3(name)A F0([)A F3(@)A F0 .763(]} described belo)B 4.563 -.65
(w. T)-.25 H .763(he e).65 F .763
(xclamation point must immediately follo)-.15 F 3.263(wt)-.25 G .763
-(he left brace in order to)-3.263 F(introduce indirection.)108 537.6 Q
-.334(In each of the cases belo)108 554.4 R -.65(w,)-.25 G F2(wor)3.484 E
+(he left brace in order to)-3.263 F(introduce indirection.)108 566.4 Q
+.334(In each of the cases belo)108 583.2 R -.65(w,)-.25 G F3(wor)3.484 E
(d)-.37 E F0 .334(is subject to tilde e)2.834 F .334
(xpansion, parameter e)-.15 F .334(xpansion, command substitution,)-.15
-F(and arithmetic e)108 566.4 Q(xpansion.)-.15 E 1.09
-(When not performing substring e)108 583.2 R 1.089
+F(and arithmetic e)108 595.2 Q(xpansion.)-.15 E 1.09
+(When not performing substring e)108 612 R 1.089
(xpansion, using the forms documented belo)-.15 F 3.589(w\()-.25 G
(e.g.,)-3.589 E F1(:-)3.589 E F0(\),)A F1(bash)3.589 E F0 1.089
-(tests for a)3.589 F(parameter that is unset or null.)108 595.2 Q(Omitt\
-ing the colon results in a test only for a parameter that is unset.)5 E
-(${)108 612 Q F2(par)A(ameter)-.15 E F1<3aad>A F2(wor)A(d)-.37 E F0(})A
-F1 .722(Use Default V)144 624 R(alues)-.92 E F0 5.722(.I)C(f)-5.722 E F2
-(par)4.472 E(ameter)-.15 E F0 .723(is unset or null, the e)3.952 F .723
-(xpansion of)-.15 F F2(wor)3.563 E(d)-.37 E F0 .723(is substituted.)
-3.993 F(Other)5.723 E(-)-.2 E(wise, the v)144 636 Q(alue of)-.25 E F2
-(par)3.75 E(ameter)-.15 E F0(is substituted.)3.23 E(${)108 648 Q F2(par)
-A(ameter)-.15 E F1(:=)A F2(wor)A(d)-.37 E F0(})A F1 2.005
-(Assign Default V)144 660 R(alues)-.92 E F0 7.005(.I)C(f)-7.005 E F2
+(tests for a)3.589 F(parameter that is unset or null.)108 624 Q(Omittin\
+g the colon results in a test only for a parameter that is unset.)5 E
+(${)108 640.8 Q F3(par)A(ameter)-.15 E F1<3aad>A F3(wor)A(d)-.37 E F0(})
+A F1 .722(Use Default V)144 652.8 R(alues)-.92 E F0 5.722(.I)C(f)-5.722
+E F3(par)4.472 E(ameter)-.15 E F0 .723(is unset or null, the e)3.952 F
+.723(xpansion of)-.15 F F3(wor)3.563 E(d)-.37 E F0 .723(is substituted.)
+3.993 F(Other)5.723 E(-)-.2 E(wise, the v)144 664.8 Q(alue of)-.25 E F3
+(par)3.75 E(ameter)-.15 E F0(is substituted.)3.23 E(${)108 676.8 Q F3
+(par)A(ameter)-.15 E F1(:=)A F3(wor)A(d)-.37 E F0(})A F1 2.005
+(Assign Default V)144 688.8 R(alues)-.92 E F0 7.005(.I)C(f)-7.005 E F3
(par)5.755 E(ameter)-.15 E F0 2.005(is unset or null, the e)5.235 F
-2.004(xpansion of)-.15 F F2(wor)4.844 E(d)-.37 E F0 2.004
-(is assigned to)5.274 F F2(par)144 672 Q(ameter)-.15 E F0 5.278(.T).73 G
-.278(he v)-5.278 F .278(alue of)-.25 F F2(par)4.028 E(ameter)-.15 E F0
+2.004(xpansion of)-.15 F F3(wor)4.844 E(d)-.37 E F0 2.004
+(is assigned to)5.274 F F3(par)144 700.8 Q(ameter)-.15 E F0 5.278(.T).73
+G .278(he v)-5.278 F .278(alue of)-.25 F F3(par)4.028 E(ameter)-.15 E F0
.278(is then substituted.)3.508 F .279
(Positional parameters and special param-)5.278 F
-(eters may not be assigned to in this w)144 684 Q(ay)-.1 E(.)-.65 E(${)
-108 696 Q F2(par)A(ameter)-.15 E F1(:?)A F2(wor)A(d)-.37 E F0(})A F1
-.535(Display Err)144 708 R .535(or if Null or Unset)-.18 F F0 5.535(.I)C
-(f)-5.535 E F2(par)4.285 E(ameter)-.15 E F0 .535
-(is null or unset, the e)3.765 F .535(xpansion of)-.15 F F2(wor)3.035 E
-(d)-.37 E F0 .535(\(or a mes-)3.035 F .661(sage to that ef)144 720 R
-.661(fect if)-.25 F F2(wor)3.501 E(d)-.37 E F0 .662(is not present\) is\
- written to the standard error and the shell, if it is not)3.931 F
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(20)187.615 E 0 Cg EP
+(eters may not be assigned to in this w)144 712.8 Q(ay)-.1 E(.)-.65 E
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(20)190.395 E 0 Cg EP
%%Page: 21 21
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
--.35 E(interacti)144 84 Q -.15(ve)-.25 G 2.5(,e).15 G 2.5
-(xits. Otherwise,)-2.65 F(the v)2.5 E(alue of)-.25 E/F1 10
-/Times-Italic@0 SF(par)2.5 E(ameter)-.15 E F0(is substituted.)2.5 E(${)
-108 96 Q F1(par)A(ameter)-.15 E/F2 10/Times-Bold@0 SF(:+)A F1(wor)A(d)
--.37 E F0(})A F2 .745(Use Alter)144 108 R .745(nate V)-.15 F(alue)-.92 E
-F0 5.745(.I)C(f)-5.745 E F1(par)4.495 E(ameter)-.15 E F0 .745
+-.35 E(${)108 84 Q/F1 10/Times-Italic@0 SF(par)A(ameter)-.15 E/F2 10
+/Times-Bold@0 SF(:?)A F1(wor)A(d)-.37 E F0(})A F2 .535(Display Err)144
+96 R .535(or if Null or Unset)-.18 F F0 5.535(.I)C(f)-5.535 E F1(par)
+4.285 E(ameter)-.15 E F0 .535(is null or unset, the e)3.765 F .535
+(xpansion of)-.15 F F1(wor)3.035 E(d)-.37 E F0 .535(\(or a mes-)3.035 F
+.661(sage to that ef)144 108 R .661(fect if)-.25 F F1(wor)3.501 E(d)-.37
+E F0 .662(is not present\) is written to the standard error and the she\
+ll, if it is not)3.931 F(interacti)144 120 Q -.15(ve)-.25 G 2.5(,e).15 G
+2.5(xits. Otherwise,)-2.65 F(the v)2.5 E(alue of)-.25 E F1(par)2.5 E
+(ameter)-.15 E F0(is substituted.)2.5 E(${)108 132 Q F1(par)A(ameter)
+-.15 E F2(:+)A F1(wor)A(d)-.37 E F0(})A F2 .745(Use Alter)144 144 R .745
+(nate V)-.15 F(alue)-.92 E F0 5.745(.I)C(f)-5.745 E F1(par)4.495 E
+(ameter)-.15 E F0 .745
(is null or unset, nothing is substituted, otherwise the e)3.975 F
-(xpan-)-.15 E(sion of)144 120 Q F1(wor)2.84 E(d)-.37 E F0
-(is substituted.)3.27 E(${)108 132 Q F1(par)A(ameter)-.15 E F2(:)A F1
-(of)A(fset)-.18 E F0(})A(${)108 144 Q F1(par)A(ameter)-.15 E F2(:)A F1
+(xpan-)-.15 E(sion of)144 156 Q F1(wor)2.84 E(d)-.37 E F0
+(is substituted.)3.27 E(${)108 168 Q F1(par)A(ameter)-.15 E F2(:)A F1
+(of)A(fset)-.18 E F0(})A(${)108 180 Q F1(par)A(ameter)-.15 E F2(:)A F1
(of)A(fset)-.18 E F2(:)A F1(length)A F0(})A F2 .002(Substring Expansion)
-144 156 R F0 5.002(.E)C .002(xpands to up to)-5.002 F F1(length)2.502 E
+144 192 R F0 5.002(.E)C .002(xpands to up to)-5.002 F F1(length)2.502 E
F0 .002(characters of the v)2.502 F .002(alue of)-.25 F F1(par)2.502 E
(ameter)-.15 E F0 .002(starting at the)2.502 F 1.082
-(character speci\214ed by)144 168 R F1(of)3.582 E(fset)-.18 E F0 6.082
+(character speci\214ed by)144 204 R F1(of)3.582 E(fset)-.18 E F0 6.082
(.I)C(f)-6.082 E F1(par)3.582 E(ameter)-.15 E F0(is)3.582 E F2(@)3.582 E
F0 3.582(,a)C 3.582(ni)-3.582 G(nde)-3.582 E -.15(xe)-.15 G 3.582(da).15
G 1.082(rray subscripted by)-3.582 F F2(@)3.582 E F0(or)3.581 E F2(*)
-3.581 E F0 3.581(,o)C 3.581(ra)-3.581 G(n)-3.581 E(associati)144 180 Q
+3.581 E F0 3.581(,o)C 3.581(ra)-3.581 G(n)-3.581 E(associati)144 216 Q
1.022 -.15(ve a)-.25 H .722(rray name, the results dif).15 F .722
(fer as described belo)-.25 F 4.522 -.65(w. I)-.25 H(f).65 E F1(length)
3.222 E F0 .722(is omitted, e)3.222 F .722(xpands to the)-.15 F .043
-(substring of the v)144 192 R .043(alue of)-.25 F F1(par)2.543 E(ameter)
+(substring of the v)144 228 R .043(alue of)-.25 F F1(par)2.543 E(ameter)
-.15 E F0 .042(starting at the character speci\214ed by)2.543 F F1(of)
2.542 E(fset)-.18 E F0 .042(and e)2.542 F .042(xtending to the)-.15 F
-.846(end of the v)144 204 R(alue.)-.25 E F1(length)5.846 E F0(and)3.346
+.846(end of the v)144 240 R(alue.)-.25 E F1(length)5.846 E F0(and)3.346
E F1(of)3.346 E(fset)-.18 E F0 .846(are arithmetic e)3.346 F .847
(xpressions \(see)-.15 F/F3 9/Times-Bold@0 SF .847(ARITHMETIC EV)3.347 F
-(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E F0(belo)144 216 Q(w\).)-.25 E
-(If)144 240 Q F1(of)3.029 E(fset)-.18 E F0 -.25(eva)3.029 G .529
+(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E F0(belo)144 252 Q(w\).)-.25 E
+(If)144 276 Q F1(of)3.029 E(fset)-.18 E F0 -.25(eva)3.029 G .529
(luates to a number less than zero, the v).25 F .529
(alue is used as an of)-.25 F .529(fset in characters from the)-.25 F
-.045(end of the v)144 252 R .045(alue of)-.25 F F1(par)2.546 E(ameter)
+.045(end of the v)144 288 R .045(alue of)-.25 F F1(par)2.546 E(ameter)
-.15 E F0 5.046(.I)C(f)-5.046 E F1(length)2.546 E F0 -.25(eva)2.546 G
.046(luates to a number less than zero, it is interpreted as an).25 F
-(of)144 264 Q .203(fset in characters from the end of the v)-.25 F .202
+(of)144 300 Q .203(fset in characters from the end of the v)-.25 F .202
(alue of)-.25 F F1(par)2.702 E(ameter)-.15 E F0 .202
-(rather than a number of characters, and)2.702 F .557(the e)144 276 R
+(rather than a number of characters, and)2.702 F .557(the e)144 312 R
.557(xpansion is the characters between)-.15 F F1(of)3.057 E(fset)-.18 E
F0 .557(and that result.)3.057 F .558(Note that a ne)5.558 F -.05(ga)
-.15 G(ti).05 E .858 -.15(ve o)-.25 H -.25(ff).15 G .558(set must be).25
-F(separated from the colon by at least one space to a)144 288 Q -.2(vo)
+F(separated from the colon by at least one space to a)144 324 Q -.2(vo)
-.2 G(id being confused with the).2 E F2(:-)2.5 E F0 -.15(ex)2.5 G
-(pansion.).15 E(If)144 312 Q F1(par)2.959 E(ameter)-.15 E F0(is)2.959 E
+(pansion.).15 E(If)144 348 Q F1(par)2.959 E(ameter)-.15 E F0(is)2.959 E
F2(@)2.959 E F0 2.959(,t)C .459(he result is)-2.959 F F1(length)2.959 E
F0 .459(positional parameters be)2.959 F .458(ginning at)-.15 F F1(of)
2.958 E(fset)-.18 E F0 5.458(.A)C(ne)-2.5 E -.05(ga)-.15 G(ti).05 E -.15
-(ve)-.25 G F1(of)3.108 E(fset)-.18 E F0 .095(is tak)144 324 R .095
+(ve)-.25 G F1(of)3.108 E(fset)-.18 E F0 .095(is tak)144 360 R .095
(en relati)-.1 F .396 -.15(ve t)-.25 H 2.596(oo).15 G .096
(ne greater than the greatest positional parameter)-2.596 F 2.596(,s)-.4
G 2.596(oa)-2.596 G 2.596(no)-2.596 G -.25(ff)-2.596 G .096(set of -1 e)
.25 F -.25(va)-.25 G .096(luates to).25 F 1.322
-(the last positional parameter)144 336 R 6.322(.I)-.55 G 3.822(ti)-6.322
+(the last positional parameter)144 372 R 6.322(.I)-.55 G 3.822(ti)-6.322
G 3.822(sa)-3.822 G 3.822(ne)-3.822 G 1.322(xpansion error if)-3.972 F
F1(length)3.822 E F0 -.25(eva)3.822 G 1.322
-(luates to a number less than).25 F(zero.)144 348 Q(If)144 372 Q F1(par)
+(luates to a number less than).25 F(zero.)144 384 Q(If)144 408 Q F1(par)
3.013 E(ameter)-.15 E F0 .514(is an inde)3.013 F -.15(xe)-.15 G 3.014
(da).15 G .514(rray name subscripted by @ or *, the result is the)-3.014
F F1(length)3.014 E F0 .514(members of)3.014 F 1.082(the array be)144
-384 R 1.082(ginning with ${)-.15 F F1(par)A(ameter)-.15 E F0([)A F1(of)A
+420 R 1.082(ginning with ${)-.15 F F1(par)A(ameter)-.15 E F0([)A F1(of)A
(fset)-.18 E F0 3.582(]}. A)B(ne)3.582 E -.05(ga)-.15 G(ti).05 E -.15
(ve)-.25 G F1(of)3.732 E(fset)-.18 E F0 1.081(is tak)3.581 F 1.081
(en relati)-.1 F 1.381 -.15(ve t)-.25 H 3.581(oo).15 G 1.081(ne greater)
--3.581 F 1.079(than the maximum inde)144 396 R 3.579(xo)-.15 G 3.579(ft)
+-3.581 F 1.079(than the maximum inde)144 432 R 3.579(xo)-.15 G 3.579(ft)
-3.579 G 1.079(he speci\214ed array)-3.579 F 6.079(.I)-.65 G 3.579(ti)
-6.079 G 3.579(sa)-3.579 G 3.58(ne)-3.579 G 1.08(xpansion error if)-3.73
F F1(length)3.58 E F0 -.25(eva)3.58 G 1.08(luates to a).25 F
-(number less than zero.)144 408 Q(Substring e)144 432 Q
+(number less than zero.)144 444 Q(Substring e)144 468 Q
(xpansion applied to an associati)-.15 E .3 -.15(ve a)-.25 H
-(rray produces unde\214ned results.).15 E 1.931(Substring inde)144 456 R
+(rray produces unde\214ned results.).15 E 1.931(Substring inde)144 492 R
1.931(xing is zero-based unless the positional parameters are used, in \
-which case the)-.15 F(inde)144 468 Q .306(xing starts at 1 by def)-.15 F
+which case the)-.15 F(inde)144 504 Q .306(xing starts at 1 by def)-.15 F
2.806(ault. If)-.1 F F1(of)2.807 E(fset)-.18 E F0 .307
(is 0, and the positional parameters are used,)2.807 F F2($0)2.807 E F0
-.307(is pre\214x)2.807 F(ed)-.15 E(to the list.)144 480 Q(${)108 496.8 Q
-F2(!)A F1(pr)A(e\214x)-.37 E F2(*)A F0(})A(${)108 508.8 Q F2(!)A F1(pr)A
-(e\214x)-.37 E F2(@)A F0(})A F2 .085(Names matching pr)144 520.8 R
+.307(is pre\214x)2.807 F(ed)-.15 E(to the list.)144 516 Q(${)108 532.8 Q
+F2(!)A F1(pr)A(e\214x)-.37 E F2(*)A F0(})A(${)108 544.8 Q F2(!)A F1(pr)A
+(e\214x)-.37 E F2(@)A F0(})A F2 .085(Names matching pr)144 556.8 R
(e\214x)-.18 E F0 5.085(.E)C .084(xpands to the names of v)-5.085 F .084
(ariables whose names be)-.25 F .084(gin with)-.15 F F1(pr)2.584 E
(e\214x)-.37 E F0 2.584(,s)C(epa-)-2.584 E .257
-(rated by the \214rst character of the)144 532.8 R F3(IFS)2.757 E F0
+(rated by the \214rst character of the)144 568.8 R F3(IFS)2.757 E F0
.257(special v)2.507 F 2.757(ariable. When)-.25 F F1(@)2.758 E F0 .258
(is used and the e)2.758 F .258(xpansion appears)-.15 F
-(within double quotes, each v)144 544.8 Q(ariable name e)-.25 E
-(xpands to a separate w)-.15 E(ord.)-.1 E(${)108 561.6 Q F2(!)A F1(name)
-A F0([)A F1(@)A F0(]})A(${)108 573.6 Q F2(!)A F1(name)A F0([)A F1(*)A F0
-(]})A F2 2.036(List of array k)144 585.6 R(eys)-.1 E F0 7.036(.I)C(f)
+(within double quotes, each v)144 580.8 Q(ariable name e)-.25 E
+(xpands to a separate w)-.15 E(ord.)-.1 E(${)108 597.6 Q F2(!)A F1(name)
+A F0([)A F1(@)A F0(]})A(${)108 609.6 Q F2(!)A F1(name)A F0([)A F1(*)A F0
+(]})A F2 2.036(List of array k)144 621.6 R(eys)-.1 E F0 7.036(.I)C(f)
-7.036 E F1(name)4.536 E F0 2.036(is an array v)4.536 F 2.036
(ariable, e)-.25 F 2.036(xpands to the list of array indices \(k)-.15 F
--.15(ey)-.1 G(s\)).15 E .595(assigned in)144 597.6 R F1(name)3.095 E F0
+-.15(ey)-.1 G(s\)).15 E .595(assigned in)144 633.6 R F1(name)3.095 E F0
5.595(.I)C(f)-5.595 E F1(name)3.095 E F0 .595(is not an array)3.095 F
3.095(,e)-.65 G .595(xpands to 0 if)-3.245 F F1(name)3.095 E F0 .596
-(is set and null otherwise.)3.095 F(When)5.596 E F1(@)144 609.6 Q F0
+(is set and null otherwise.)3.095 F(When)5.596 E F1(@)144 645.6 Q F0
(is used and the e)2.5 E(xpansion appears within double quotes, each k)
-.15 E .3 -.15(ey ex)-.1 H(pands to a separate w).15 E(ord.)-.1 E(${)108
-626.4 Q F2(#)A F1(par)A(ameter)-.15 E F0(})A F2 -.1(Pa)144 638.4 S .471
+662.4 Q F2(#)A F1(par)A(ameter)-.15 E F0(})A F2 -.1(Pa)144 674.4 S .471
(rameter length).1 F F0 5.471(.T)C .471
(he length in characters of the v)-5.471 F .471(alue of)-.25 F F1(par)
2.971 E(ameter)-.15 E F0 .47(is substituted.)2.97 F(If)5.47 E F1(par)
-4.22 E(ame-)-.15 E(ter)144 650.4 Q F0(is)4.438 E F2(*)3.708 E F0(or)
+4.22 E(ame-)-.15 E(ter)144 686.4 Q F0(is)4.438 E F2(*)3.708 E F0(or)
3.708 E F2(@)3.708 E F0 3.708(,t)C 1.208(he v)-3.708 F 1.208
(alue substituted is the number of positional parameters.)-.25 F(If)
6.209 E F1(par)4.959 E(ameter)-.15 E F0 1.209(is an)4.439 F .349
-(array name subscripted by)144 662.4 R F2(*)2.849 E F0(or)2.849 E F2(@)
+(array name subscripted by)144 698.4 R F2(*)2.849 E F0(or)2.849 E F2(@)
2.849 E F0 2.849(,t)C .349(he v)-2.849 F .349
(alue substituted is the number of elements in the array)-.25 F 5.348
-(.I)-.65 G(f)-5.348 E F1(par)145.25 674.4 Q(ameter)-.15 E F0 .455
+(.I)-.65 G(f)-5.348 E F1(par)145.25 710.4 Q(ameter)-.15 E F0 .455
(is an inde)3.685 F -.15(xe)-.15 G 2.955(da).15 G .456
(rray name subscripted by a ne)-2.955 F -.05(ga)-.15 G(ti).05 E .756
-.15(ve n)-.25 H(umber).15 E 2.956(,t)-.4 G .456
-(hat number is interpreted)-2.956 F .973(as relati)144 686.4 R 1.273
+(hat number is interpreted)-2.956 F .973(as relati)144 722.4 R 1.273
-.15(ve t)-.25 H 3.473(oo).15 G .973(ne greater than the maximum inde)
-3.473 F 3.473(xo)-.15 G(f)-3.473 E F1(par)3.473 E(ameter)-.15 E F0
3.472(,s)C 3.472(on)-3.472 G -2.25 -.15(eg a)-3.472 H(ti).15 E 1.272
--.15(ve i)-.25 H .972(ndices count back).15 F(from the end of the array)
-144 698.4 Q 2.5(,a)-.65 G(nd an inde)-2.5 E 2.5(xo)-.15 G 2.5<66ad>-2.5
-G 2.5(1r)-2.5 G(eferences the last element.)-2.5 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(21)187.615 E 0 Cg EP
+-.15(ve i)-.25 H .972(ndices count back).15 F(GNU Bash 4.3)72 768 Q
+(2013 October 20)141.235 E(21)190.395 E 0 Cg EP
%%Page: 22 22
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
--.35 E(${)108 84 Q/F1 10/Times-Italic@0 SF(par)A(ameter)-.15 E/F2 10
-/Times-Bold@0 SF(#)A F1(wor)A(d)-.37 E F0(})A(${)108 96 Q F1(par)A
-(ameter)-.15 E F2(##)A F1(wor)A(d)-.37 E F0(})A F2(Remo)144 108 Q 1.396
--.1(ve m)-.1 H 1.196(atching pr).1 F 1.196(e\214x patter)-.18 F(n)-.15 E
-F0 6.196(.T)C(he)-6.196 E F1(wor)4.036 E(d)-.37 E F0 1.196(is e)4.466 F
-1.196(xpanded to produce a pattern just as in path-)-.15 F .152(name e)
-144 120 R 2.652(xpansion. If)-.15 F .152(the pattern matches the be)
-2.652 F .152(ginning of the v)-.15 F .152(alue of)-.25 F F1(par)2.652 E
+-.35 E(from the end of the array)144 84 Q 2.5(,a)-.65 G(nd an inde)-2.5
+E 2.5(xo)-.15 G 2.5<66ad>-2.5 G 2.5(1r)-2.5 G
+(eferences the last element.)-2.5 E(${)108 100.8 Q/F1 10/Times-Italic@0
+SF(par)A(ameter)-.15 E/F2 10/Times-Bold@0 SF(#)A F1(wor)A(d)-.37 E F0(})
+A(${)108 112.8 Q F1(par)A(ameter)-.15 E F2(##)A F1(wor)A(d)-.37 E F0(})A
+F2(Remo)144 124.8 Q 1.396 -.1(ve m)-.1 H 1.196(atching pr).1 F 1.196
+(e\214x patter)-.18 F(n)-.15 E F0 6.196(.T)C(he)-6.196 E F1(wor)4.036 E
+(d)-.37 E F0 1.196(is e)4.466 F 1.196
+(xpanded to produce a pattern just as in path-)-.15 F .152(name e)144
+136.8 R 2.652(xpansion. If)-.15 F .152(the pattern matches the be)2.652
+F .152(ginning of the v)-.15 F .152(alue of)-.25 F F1(par)2.652 E
(ameter)-.15 E F0 2.652(,t).73 G .151(hen the result of)-2.652 F 1.4
-(the e)144 132 R 1.4(xpansion is the e)-.15 F 1.4(xpanded v)-.15 F 1.4
+(the e)144 148.8 R 1.4(xpansion is the e)-.15 F 1.4(xpanded v)-.15 F 1.4
(alue of)-.25 F F1(par)5.15 E(ameter)-.15 E F0 1.4
(with the shortest matching pattern \(the `)4.63 F(`)-.74 E F2(#)A F0
--.74('')C .281(case\) or the longest matching pattern \(the `)144 144 R
-(`)-.74 E F2(##)A F0 1.761 -.74('' c)D .281(ase\) deleted.).74 F(If)
+-.74('')C .281(case\) or the longest matching pattern \(the `)144 160.8
+R(`)-.74 E F2(##)A F0 1.761 -.74('' c)D .281(ase\) deleted.).74 F(If)
5.281 E F1(par)4.031 E(ameter)-.15 E F0(is)3.511 E F2(@)2.781 E F0(or)
-2.781 E F2(*)2.781 E F0 2.781(,t)C .281(he pattern)-2.781 F(remo)144 156
-Q -.25(va)-.15 G 3.274(lo).25 G .774
+2.781 E F2(*)2.781 E F0 2.781(,t)C .281(he pattern)-2.781 F(remo)144
+172.8 Q -.25(va)-.15 G 3.274(lo).25 G .774
(peration is applied to each positional parameter in turn, and the e)
--3.274 F .774(xpansion is the resul-)-.15 F .402(tant list.)144 168 R
+-3.274 F .774(xpansion is the resul-)-.15 F .402(tant list.)144 184.8 R
(If)5.402 E F1(par)4.152 E(ameter)-.15 E F0 .401(is an array v)3.632 F
.401(ariable subscripted with)-.25 F F2(@)2.901 E F0(or)2.901 E F2(*)
2.901 E F0 2.901(,t)C .401(he pattern remo)-2.901 F -.25(va)-.15 G 2.901
(lo).25 G(peration)-2.901 E
-(is applied to each member of the array in turn, and the e)144 180 Q
-(xpansion is the resultant list.)-.15 E(${)108 196.8 Q F1(par)A(ameter)
--.15 E F2(%)A F1(wor)A(d)-.37 E F0(})A(${)108 208.8 Q F1(par)A(ameter)
--.15 E F2(%%)A F1(wor)A(d)-.37 E F0(})A F2(Remo)144 220.8 Q .346 -.1
+(is applied to each member of the array in turn, and the e)144 196.8 Q
+(xpansion is the resultant list.)-.15 E(${)108 213.6 Q F1(par)A(ameter)
+-.15 E F2(%)A F1(wor)A(d)-.37 E F0(})A(${)108 225.6 Q F1(par)A(ameter)
+-.15 E F2(%%)A F1(wor)A(d)-.37 E F0(})A F2(Remo)144 237.6 Q .346 -.1
(ve m)-.1 H .146(atching suf\214x patter).1 F(n)-.15 E F0 5.146(.T)C(he)
-5.146 E F1(wor)2.646 E(d)-.37 E F0 .147(is e)2.647 F .147
(xpanded to produce a pattern just as in pathname)-.15 F -.15(ex)144
-232.8 S 3.088(pansion. If).15 F .588
+249.6 S 3.088(pansion. If).15 F .588
(the pattern matches a trailing portion of the e)3.088 F .588(xpanded v)
-.15 F .588(alue of)-.25 F F1(par)3.088 E(ameter)-.15 E F0 3.088(,t).73
-G .588(hen the)-3.088 F .226(result of the e)144 244.8 R .226
+G .588(hen the)-3.088 F .226(result of the e)144 261.6 R .226
(xpansion is the e)-.15 F .226(xpanded v)-.15 F .226(alue of)-.25 F F1
(par)3.976 E(ameter)-.15 E F0 .226
-(with the shortest matching pattern \(the)3.456 F -.74(``)144 256.8 S F2
+(with the shortest matching pattern \(the)3.456 F -.74(``)144 273.6 S F2
(%).74 E F0 1.522 -.74('' c)D .042
(ase\) or the longest matching pattern \(the `).74 F(`)-.74 E F2(%%)A F0
1.522 -.74('' c)D .042(ase\) deleted.).74 F(If)5.042 E F1(par)3.792 E
(ameter)-.15 E F0(is)3.272 E F2(@)2.541 E F0(or)2.541 E F2(*)2.541 E F0
-2.541(,t)C(he)-2.541 E .44(pattern remo)144 268.8 R -.25(va)-.15 G 2.94
+2.541(,t)C(he)-2.541 E .44(pattern remo)144 285.6 R -.25(va)-.15 G 2.94
(lo).25 G .441
(peration is applied to each positional parameter in turn, and the e)
--2.94 F .441(xpansion is the)-.15 F .241(resultant list.)144 280.8 R(If)
+-2.94 F .441(xpansion is the)-.15 F .241(resultant list.)144 297.6 R(If)
5.241 E F1(par)3.991 E(ameter)-.15 E F0 .241(is an array v)3.471 F .241
(ariable subscripted with)-.25 F F2(@)2.741 E F0(or)2.74 E F2(*)2.74 E
F0 2.74(,t)C .24(he pattern remo)-2.74 F -.25(va)-.15 G 2.74(lo).25 G
(per)-2.74 E(-)-.2 E
(ation is applied to each member of the array in turn, and the e)144
-292.8 Q(xpansion is the resultant list.)-.15 E(${)108 309.6 Q F1(par)A
+309.6 Q(xpansion is the resultant list.)-.15 E(${)108 326.4 Q F1(par)A
(ameter)-.15 E F2(/)A F1(pattern)A F2(/)A F1(string)A F0(})A F2 -.1(Pa)
-144 321.6 S(tter).1 E 3.606(ns)-.15 G(ubstitution)-3.606 E F0 6.106(.T)C
+144 338.4 S(tter).1 E 3.606(ns)-.15 G(ubstitution)-3.606 E F0 6.106(.T)C
(he)-6.106 E F1(pattern)3.606 E F0 1.106(is e)3.606 F 1.107
(xpanded to produce a pattern just as in pathname e)-.15 F(xpan-)-.15 E
-(sion.)144 333.6 Q F1 -.8(Pa)6.034 G -.15(ra).8 G(meter).15 E F0 1.034
+(sion.)144 350.4 Q F1 -.8(Pa)6.034 G -.15(ra).8 G(meter).15 E F0 1.034
(is e)3.534 F 1.033(xpanded and the longest match of)-.15 F F1(pattern)
3.533 E F0(ag)3.533 E 1.033(ainst its v)-.05 F 1.033
-(alue is replaced with)-.25 F F1(string)144 345.6 Q F0 5.16(.I)C(f)-5.16
+(alue is replaced with)-.25 F F1(string)144 362.4 Q F0 5.16(.I)C(f)-5.16
E F1(pattern)2.66 E F0(be)2.66 E .16(gins with)-.15 F F2(/)2.66 E F0
2.66(,a)C .161(ll matches of)-2.66 F F1(pattern)2.661 E F0 .161
(are replaced with)2.661 F F1(string)2.661 E F0 5.161(.N)C .161
-(ormally only the)-5.161 F .807(\214rst match is replaced.)144 357.6 R
+(ormally only the)-5.161 F .807(\214rst match is replaced.)144 374.4 R
(If)5.807 E F1(pattern)3.307 E F0(be)3.307 E .807(gins with)-.15 F F2(#)
3.307 E F0 3.306(,i)C 3.306(tm)-3.306 G .806(ust match at the be)-3.306
-F .806(ginning of the e)-.15 F(xpanded)-.15 E -.25(va)144 369.6 S .62
+F .806(ginning of the e)-.15 F(xpanded)-.15 E -.25(va)144 386.4 S .62
(lue of).25 F F1(par)3.12 E(ameter)-.15 E F0 5.62(.I)C(f)-5.62 E F1
(pattern)3.12 E F0(be)3.12 E .62(gins with)-.15 F F2(%)3.12 E F0 3.12
(,i)C 3.121(tm)-3.12 G .621(ust match at the end of the e)-3.121 F .621
-(xpanded v)-.15 F .621(alue of)-.25 F F1(par)144 381.6 Q(ameter)-.15 E
+(xpanded v)-.15 F .621(alue of)-.25 F F1(par)144 398.4 Q(ameter)-.15 E
F0 6.254(.I)C(f)-6.254 E F1(string)3.754 E F0 1.253(is null, matches of)
3.753 F F1(pattern)3.753 E F0 1.253(are deleted and the)3.753 F F2(/)
3.753 E F0(follo)3.753 E(wing)-.25 E F1(pattern)3.753 E F0 1.253(may be)
-3.753 F 2.678(omitted. If)144 393.6 R F1(par)3.928 E(ameter)-.15 E F0
+3.753 F 2.678(omitted. If)144 410.4 R F1(par)3.928 E(ameter)-.15 E F0
(is)3.408 E F2(@)2.678 E F0(or)2.678 E F2(*)2.679 E F0 2.679(,t)C .179
(he substitution operation is applied to each positional parameter)
--2.679 F .619(in turn, and the e)144 405.6 R .619
+-2.679 F .619(in turn, and the e)144 422.4 R .619
(xpansion is the resultant list.)-.15 F(If)5.619 E F1(par)4.369 E
(ameter)-.15 E F0 .618(is an array v)3.849 F .618
-(ariable subscripted with)-.25 F F2(@)144 417.6 Q F0(or)3.223 E F2(*)
+(ariable subscripted with)-.25 F F2(@)144 434.4 Q F0(or)3.223 E F2(*)
3.223 E F0 3.223(,t)C .723(he substitution operation is applied to each\
member of the array in turn, and the e)-3.223 F(xpan-)-.15 E
-(sion is the resultant list.)144 429.6 Q(${)108 446.4 Q F1(par)A(ameter)
--.15 E F2(^)A F1(pattern)A F0(})A(${)108 458.4 Q F1(par)A(ameter)-.15 E
-F2(^^)A F1(pattern)A F0(})A(${)108 470.4 Q F1(par)A(ameter)-.15 E F2(,)A
-F1(pattern)A F0(})A(${)108 482.4 Q F1(par)A(ameter)-.15 E F2(,,)A F1
-(pattern)A F0(})A F2 .438(Case modi\214cation)144 494.4 R F0 5.438(.T)C
+(sion is the resultant list.)144 446.4 Q(${)108 463.2 Q F1(par)A(ameter)
+-.15 E F2(^)A F1(pattern)A F0(})A(${)108 475.2 Q F1(par)A(ameter)-.15 E
+F2(^^)A F1(pattern)A F0(})A(${)108 487.2 Q F1(par)A(ameter)-.15 E F2(,)A
+F1(pattern)A F0(})A(${)108 499.2 Q F1(par)A(ameter)-.15 E F2(,,)A F1
+(pattern)A F0(})A F2 .438(Case modi\214cation)144 511.2 R F0 5.438(.T)C
.438(his e)-5.438 F .437
(xpansion modi\214es the case of alphabetic characters in)-.15 F F1(par)
-2.937 E(ameter)-.15 E F0 5.437(.T)C(he)-5.437 E F1(pattern)144 506.4 Q
+2.937 E(ameter)-.15 E F0 5.437(.T)C(he)-5.437 E F1(pattern)144 523.2 Q
F0 1.406(is e)3.906 F 1.407
(xpanded to produce a pattern just as in pathname e)-.15 F 3.907
-(xpansion. Each)-.15 F 1.407(character in the)3.907 F -.15(ex)144 518.4
+(xpansion. Each)-.15 F 1.407(character in the)3.907 F -.15(ex)144 535.2
S 1.232(panded v).15 F 1.232(alue of)-.25 F F1(par)3.732 E(ameter)-.15 E
F0 1.232(is tested ag)3.732 F(ainst)-.05 E F1(pattern)3.732 E F0 3.732
(,a)C 1.232(nd, if it matches the pattern, its case is)-3.732 F(con)144
-530.4 Q -.15(ve)-.4 G 2.924(rted. The).15 F .424
+547.2 Q -.15(ve)-.4 G 2.924(rted. The).15 F .424
(pattern should not attempt to match more than one character)2.924 F
5.424(.T)-.55 G(he)-5.424 E F2(^)2.924 E F0 .424(operator con-)2.924 F
--.15(ve)144 542.4 S .61(rts lo).15 F .61(wercase letters matching)-.25 F
+-.15(ve)144 559.2 S .61(rts lo).15 F .61(wercase letters matching)-.25 F
F1(pattern)3.11 E F0 .61(to uppercase; the)3.11 F F2(,)3.11 E F0 .61
(operator con)3.11 F -.15(ve)-.4 G .61(rts matching uppercase).15 F
-1.547(letters to lo)144 554.4 R 4.047(wercase. The)-.25 F F2(^^)4.047 E
+1.547(letters to lo)144 571.2 R 4.047(wercase. The)-.25 F F2(^^)4.047 E
F0(and)4.047 E F2(,,)4.047 E F0 -.15(ex)4.047 G 1.547(pansions con).15 F
-.15(ve)-.4 G 1.547(rt each matched character in the e).15 F(xpanded)
--.15 E -.25(va)144 566.4 S .634(lue; the).25 F F2(^)3.134 E F0(and)3.134
+-.15 E -.25(va)144 583.2 S .634(lue; the).25 F F2(^)3.134 E F0(and)3.134
E F2(,)3.134 E F0 -.15(ex)3.134 G .634(pansions match and con).15 F -.15
(ve)-.4 G .633(rt only the \214rst character in the e).15 F .633
-(xpanded v)-.15 F 3.133(alue. If)-.25 F F1(pattern)144 578.4 Q F0 .78
+(xpanded v)-.15 F 3.133(alue. If)-.25 F F1(pattern)144 595.2 Q F0 .78
(is omitted, it is treated lik)3.28 F 3.28(ea)-.1 G F2(?)A F0 3.28(,w)C
.78(hich matches e)-3.28 F -.15(ve)-.25 G .78(ry character).15 F 5.78
(.I)-.55 G(f)-5.78 E F1(par)4.53 E(ameter)-.15 E F0(is)4.01 E F2(@)3.28
E F0(or)3.28 E F2(*)3.28 E F0(,)A .582(the case modi\214cation operatio\
-n is applied to each positional parameter in turn, and the e)144 590.4 R
-(xpansion)-.15 E .468(is the resultant list.)144 602.4 R(If)5.468 E F1
+n is applied to each positional parameter in turn, and the e)144 607.2 R
+(xpansion)-.15 E .468(is the resultant list.)144 619.2 R(If)5.468 E F1
(par)4.218 E(ameter)-.15 E F0 .468(is an array v)3.698 F .468
(ariable subscripted with)-.25 F F2(@)2.968 E F0(or)2.968 E F2(*)2.969 E
F0 2.969(,t)C .469(he case modi\214ca-)-2.969 F .005(tion operation is \
-applied to each member of the array in turn, and the e)144 614.4 R .005
-(xpansion is the resultant list.)-.15 F F2(Command Substitution)87 631.2
-Q F1 1.697(Command substitution)108 643.2 R F0(allo)4.197 E 1.697
+applied to each member of the array in turn, and the e)144 631.2 R .005
+(xpansion is the resultant list.)-.15 F F2(Command Substitution)87 648 Q
+F1 1.697(Command substitution)108 660 R F0(allo)4.197 E 1.697
(ws the output of a command to replace the command name.)-.25 F 1.698
-(There are tw)6.698 F(o)-.1 E(forms:)108 655.2 Q F2($\()144 672 Q F1
-(command)A F2(\))1.666 E F0(or)108 684 Q F2<92>144 696 Q F1(command)A F2
-<92>A(Bash)108 712.8 Q F0 .02(performs the e)2.52 F .02(xpansion by e)
--.15 F -.15(xe)-.15 G(cuting).15 E F1(command)2.519 E F0 .019
-(and replacing the command substitution with the stan-)2.519 F .768
-(dard output of the command, with an)108 724.8 R 3.268(yt)-.15 G .768
-(railing ne)-3.268 F .768(wlines deleted.)-.25 F .768(Embedded ne)5.768
-F .768(wlines are not deleted, b)-.25 F(ut)-.2 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(22)187.615 E 0 Cg EP
+(There are tw)6.698 F(o)-.1 E(forms:)108 672 Q F2($\()144 688.8 Q F1
+(command)A F2(\))1.666 E F0(or)108 700.8 Q F2<92>144 712.8 Q F1(command)
+A F2<92>A(Bash)108 729.6 Q F0 1.709(performs the e)4.209 F 1.709
+(xpansion by e)-.15 F -.15(xe)-.15 G(cuting).15 E F1(command)4.209 E F0
+1.708(and replacing the command substitution with the)4.208 F
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(22)190.395 E 0 Cg EP
%%Page: 23 23
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
--.35 E(the)108 84 Q 3.219(ym)-.15 G .719(ay be remo)-3.219 F -.15(ve)
--.15 G 3.219(dd).15 G .719(uring w)-3.219 F .719(ord splitting.)-.1 F
-.719(The command substitution)5.719 F/F1 10/Times-Bold@0 SF($\(cat)3.219
-E/F2 10/Times-Italic@0 SF(\214le)3.219 E F1(\))A F0 .718
-(can be replaced by the)3.219 F(equi)108 96 Q -.25(va)-.25 G(lent b).25
+-.35 E .749(standard output of the command, with an)108 84 R 3.249(yt)
+-.15 G .749(railing ne)-3.249 F .749(wlines deleted.)-.25 F .75
+(Embedded ne)5.749 F .75(wlines are not deleted,)-.25 F -.2(bu)108 96 S
+3.197(tt).2 G(he)-3.197 E 3.197(ym)-.15 G .697(ay be remo)-3.197 F -.15
+(ve)-.15 G 3.196(dd).15 G .696(uring w)-3.196 F .696(ord splitting.)-.1
+F .696(The command substitution)5.696 F/F1 10/Times-Bold@0 SF($\(cat)
+3.196 E/F2 10/Times-Italic@0 SF(\214le)3.196 E F1(\))A F0 .696
+(can be replaced by)3.196 F(the equi)108 108 Q -.25(va)-.25 G(lent b).25
E(ut f)-.2 E(aster)-.1 E F1($\(<)2.5 E F2(\214le)2.5 E F1(\))A F0(.)A
1.724(When the old-style backquote form of substitution is used, backsl\
-ash retains its literal meaning e)108 112.8 R(xcept)-.15 E .315
-(when follo)108 124.8 R .315(wed by)-.25 F F1($)2.815 E F0(,)A F1<92>
+ash retains its literal meaning e)108 124.8 R(xcept)-.15 E .315
+(when follo)108 136.8 R .315(wed by)-.25 F F1($)2.815 E F0(,)A F1<92>
2.815 E F0 2.815(,o)C(r)-2.815 E F1(\\)2.815 E F0 5.315(.T)C .314(he \
\214rst backquote not preceded by a backslash terminates the command su\
-b-)-5.315 F 3.886(stitution. When)108 136.8 R 1.386(using the $\()3.886
+b-)-5.315 F 3.886(stitution. When)108 148.8 R 1.386(using the $\()3.886
F F2(command).833 E F0 3.886(\)f)1.666 G 1.387
(orm, all characters between the parentheses mak)-3.886 F 3.887(eu)-.1 G
3.887(pt)-3.887 G 1.387(he com-)-3.887 F
-(mand; none are treated specially)108 148.8 Q(.)-.65 E .894
-(Command substitutions may be nested.)108 165.6 R 2.494 -.8(To n)5.894 H
+(mand; none are treated specially)108 160.8 Q(.)-.65 E .894
+(Command substitutions may be nested.)108 177.6 R 2.494 -.8(To n)5.894 H
.894(est when using the backquoted form, escape the inner back-).8 F
-(quotes with backslashes.)108 177.6 Q .422
-(If the substitution appears within double quotes, w)108 194.4 R .422
+(quotes with backslashes.)108 189.6 Q .422
+(If the substitution appears within double quotes, w)108 206.4 R .422
(ord splitting and pathname e)-.1 F .423(xpansion are not performed)-.15
-F(on the results.)108 206.4 Q F1(Arithmetic Expansion)87 223.2 Q F0
-1.035(Arithmetic e)108 235.2 R 1.035(xpansion allo)-.15 F 1.035
+F(on the results.)108 218.4 Q F1(Arithmetic Expansion)87 235.2 Q F0
+1.035(Arithmetic e)108 247.2 R 1.035(xpansion allo)-.15 F 1.035
(ws the e)-.25 F -.25(va)-.25 G 1.034(luation of an arithmetic e).25 F
1.034(xpression and the substitution of the result.)-.15 F
-(The format for arithmetic e)108 247.2 Q(xpansion is:)-.15 E F1($\(\()
-144 264 Q F2 -.2(ex)C(pr).2 E(ession)-.37 E F1(\)\))A F0(The)108 280.8 Q
+(The format for arithmetic e)108 259.2 Q(xpansion is:)-.15 E F1($\(\()
+144 276 Q F2 -.2(ex)C(pr).2 E(ession)-.37 E F1(\)\))A F0(The)108 292.8 Q
F2 -.2(ex)2.665 G(pr).2 E(ession)-.37 E F0 .165
(is treated as if it were within double quotes, b)2.905 F .166
(ut a double quote inside the parentheses is not)-.2 F .231
-(treated specially)108 292.8 R 5.231(.A)-.65 G .231(ll tok)-5.231 F .231
+(treated specially)108 304.8 R 5.231(.A)-.65 G .231(ll tok)-5.231 F .231
(ens in the e)-.1 F .231(xpression under)-.15 F .231(go parameter and v)
-.18 F .23(ariable e)-.25 F .23(xpansion, command substi-)-.15 F 1.059
-(tution, and quote remo)108 304.8 R -.25(va)-.15 G 3.559(l. The).25 F
+(tution, and quote remo)108 316.8 R -.25(va)-.15 G 3.559(l. The).25 F
1.059(result is treated as the arithmetic e)3.559 F 1.06
(xpression to be e)-.15 F -.25(va)-.25 G 3.56(luated. Arithmetic).25 F
--.15(ex)108 316.8 S(pansions may be nested.).15 E 1.379(The e)108 333.6
+-.15(ex)108 328.8 S(pansions may be nested.).15 E 1.379(The e)108 345.6
R -.25(va)-.25 G 1.378
(luation is performed according to the rules listed belo).25 F 3.878(wu)
-.25 G(nder)-3.878 E/F3 9/Times-Bold@0 SF 1.378(ARITHMETIC EV)3.878 F
(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E/F4 9/Times-Roman@0 SF(.)A F0
-(If)5.878 E F2 -.2(ex)108 345.6 S(pr).2 E(ession)-.37 E F0(is in)2.74 E
+(If)5.878 E F2 -.2(ex)108 357.6 S(pr).2 E(ession)-.37 E F0(is in)2.74 E
-.25(va)-.4 G(lid,).25 E F1(bash)2.5 E F0(prints a message indicating f)
-2.5 E(ailure and no substitution occurs.)-.1 E F1(Pr)87 362.4 Q
-(ocess Substitution)-.18 E F2(Pr)108 374.4 Q .97(ocess substitution)-.45
+2.5 E(ailure and no substitution occurs.)-.1 E F1(Pr)87 374.4 Q
+(ocess Substitution)-.18 E F2(Pr)108 386.4 Q .97(ocess substitution)-.45
F F0 .971(is supported on systems that support named pipes \()3.47 F F2
(FIFOs)A F0 3.471(\)o)C 3.471(rt)-3.471 G(he)-3.471 E F1(/de)3.471 E
(v/fd)-.15 E F0 .971(method of)3.471 F .022(naming open \214les.)108
-386.4 R .021(It tak)5.022 F .021(es the form of)-.1 F F1(<\()2.521 E F2
+398.4 R .021(It tak)5.022 F .021(es the form of)-.1 F F1(<\()2.521 E F2
(list)A F1(\)).833 E F0(or)2.521 E F1(>\()2.521 E F2(list)A F1(\)).833 E
F0 5.021(.T)C .021(he process)-5.021 F F2(list)2.521 E F0 .021
-(is run with its input or output con-)2.521 F .058(nected to a)108 398.4
+(is run with its input or output con-)2.521 F .058(nected to a)108 410.4
R F2(FIFO)2.558 E F0 .058(or some \214le in)2.558 F F1(/de)2.558 E(v/fd)
-.15 E F0 5.058(.T)C .058(he name of this \214le is passed as an ar)
-5.058 F .059(gument to the current com-)-.18 F .131
-(mand as the result of the e)108 410.4 R 2.631(xpansion. If)-.15 F(the)
+(mand as the result of the e)108 422.4 R 2.631(xpansion. If)-.15 F(the)
2.63 E F1(>\()2.63 E F2(list)A F1(\)).833 E F0 .13
(form is used, writing to the \214le will pro)2.63 F .13(vide input for)
--.15 F F2(list)2.63 E F0(.)A(If the)108 422.4 Q F1(<\()2.5 E F2(list)A
+-.15 F F2(list)2.63 E F0(.)A(If the)108 434.4 Q F1(<\()2.5 E F2(list)A
F1(\)).833 E F0(form is used, the \214le passed as an ar)2.5 E
(gument should be read to obtain the output of)-.18 E F2(list)2.5 E F0
-(.)A .896(When a)108 439.2 R -.25(va)-.2 G .896(ilable, process substit\
+(.)A .896(When a)108 451.2 R -.25(va)-.2 G .896(ilable, process substit\
ution is performed simultaneously with parameter and v).25 F .897
(ariable e)-.25 F(xpansion,)-.15 E
-(command substitution, and arithmetic e)108 451.2 Q(xpansion.)-.15 E F1
--.75(Wo)87 468 S(rd Splitting).75 E F0 1.143
-(The shell scans the results of parameter e)108 480 R 1.142
+(command substitution, and arithmetic e)108 463.2 Q(xpansion.)-.15 E F1
+-.75(Wo)87 480 S(rd Splitting).75 E F0 1.143
+(The shell scans the results of parameter e)108 492 R 1.142
(xpansion, command substitution, and arithmetic e)-.15 F 1.142
-(xpansion that)-.15 F(did not occur within double quotes for)108 492 Q
+(xpansion that)-.15 F(did not occur within double quotes for)108 504 Q
F2(wor)2.5 E 2.5(ds)-.37 G(plitting)-2.5 E F0(.).22 E .063
-(The shell treats each character of)108 508.8 R F3(IFS)2.563 E F0 .063
+(The shell treats each character of)108 520.8 R F3(IFS)2.563 E F0 .063
(as a delimiter)2.313 F 2.563(,a)-.4 G .063
(nd splits the results of the other e)-2.563 F .063(xpansions into w)
-.15 F(ords)-.1 E .207(using these characters as \214eld terminators.)
-108 520.8 R(If)5.207 E F3(IFS)2.707 E F0 .207(is unset, or its v)2.457 F
+108 532.8 R(If)5.207 E F3(IFS)2.707 E F0 .207(is unset, or its v)2.457 F
.207(alue is e)-.25 F(xactly)-.15 E F1(<space><tab><newline>)2.707 E F0
-(,)A .836(the def)108 532.8 R .836(ault, then sequences of)-.1 F F1
+(,)A .836(the def)108 544.8 R .836(ault, then sequences of)-.1 F F1
(<space>)3.336 E F0(,)A F1(<tab>)3.336 E F0 3.336(,a)C(nd)-3.336 E F1
(<newline>)3.336 E F0 .837(at the be)3.336 F .837
-(ginning and end of the results of)-.15 F .346(the pre)108 544.8 R .345
+(ginning and end of the results of)-.15 F .346(the pre)108 556.8 R .345
(vious e)-.25 F .345(xpansions are ignored, and an)-.15 F 2.845(ys)-.15
G .345(equence of)-2.845 F F3(IFS)2.845 E F0 .345
(characters not at the be)2.595 F .345(ginning or end serv)-.15 F(es)
--.15 E 1.236(to delimit w)108 556.8 R 3.736(ords. If)-.1 F F3(IFS)3.736
+-.15 E 1.236(to delimit w)108 568.8 R 3.736(ords. If)-.1 F F3(IFS)3.736
E F0 1.236(has a v)3.486 F 1.236(alue other than the def)-.25 F 1.237
(ault, then sequences of the whitespace characters)-.1 F F1(space)108
-568.8 Q F0(and)3.187 E F1(tab)3.187 E F0 .687(are ignored at the be)
+580.8 Q F0(and)3.187 E F1(tab)3.187 E F0 .687(are ignored at the be)
3.187 F .687(ginning and end of the w)-.15 F .686
(ord, as long as the whitespace character is in)-.1 F .276(the v)108
-580.8 R .276(alue of)-.25 F F3(IFS)2.777 E F0(\(an)2.527 E F3(IFS)2.777
+592.8 R .276(alue of)-.25 F F3(IFS)2.777 E F0(\(an)2.527 E F3(IFS)2.777
E F0 .277(whitespace character\).)2.527 F(An)5.277 E 2.777(yc)-.15 G
.277(haracter in)-2.777 F F3(IFS)2.777 E F0 .277(that is not)2.527 F F3
-(IFS)2.777 E F0 .277(whitespace, along with)2.527 F(an)108 592.8 Q 3.336
+(IFS)2.777 E F0 .277(whitespace, along with)2.527 F(an)108 604.8 Q 3.336
(ya)-.15 G(djacent)-3.336 E F3(IFS)3.336 E F0 .836
(whitespace characters, delimits a \214eld.)3.086 F 3.335(As)5.835 G
.835(equence of)-3.335 F F3(IFS)3.335 E F0 .835
-(whitespace characters is also)3.085 F(treated as a delimiter)108 604.8
+(whitespace characters is also)3.085 F(treated as a delimiter)108 616.8
Q 5(.I)-.55 G 2.5(ft)-5 G(he v)-2.5 E(alue of)-.25 E F3(IFS)2.5 E F0
(is null, no w)2.25 E(ord splitting occurs.)-.1 E 1.878
-(Explicit null ar)108 621.6 R 1.878(guments \()-.18 F F1 .833("").833 G
+(Explicit null ar)108 633.6 R 1.878(guments \()-.18 F F1 .833("").833 G
F0(or)3.545 E F1 .833<0808>5.211 G F0 4.378(\)a)C 1.878(re retained.)
-4.378 F 1.878(Unquoted implicit null ar)6.878 F 1.879
-(guments, resulting from the)-.18 F -.15(ex)108 633.6 S .177
+(guments, resulting from the)-.18 F -.15(ex)108 645.6 S .177
(pansion of parameters that ha).15 F .477 -.15(ve n)-.2 H 2.677(ov).15 G
.177(alues, are remo)-2.927 F -.15(ve)-.15 G 2.676(d. If).15 F 2.676(ap)
2.676 G .176(arameter with no v)-2.676 F .176(alue is e)-.25 F .176
-(xpanded within)-.15 F(double quotes, a null ar)108 645.6 Q
-(gument results and is retained.)-.18 E(Note that if no e)108 662.4 Q
-(xpansion occurs, no splitting is performed.)-.15 E F1 -.1(Pa)87 679.2 S
-(thname Expansion).1 E F0 .37(After w)108 691.2 R .37
+(xpanded within)-.15 F(double quotes, a null ar)108 657.6 Q
+(gument results and is retained.)-.18 E(Note that if no e)108 674.4 Q
+(xpansion occurs, no splitting is performed.)-.15 E F1 -.1(Pa)87 691.2 S
+(thname Expansion).1 E F0 .37(After w)108 703.2 R .37
(ord splitting, unless the)-.1 F F1<ad66>2.87 E F0 .37
(option has been set,)2.87 F F1(bash)2.87 E F0 .371(scans each w)2.871 F
.371(ord for the characters)-.1 F F1(*)2.871 E F0(,)A F1(?)2.871 E F0
2.871(,a)C(nd)-2.871 E F1([)2.871 E F0(.)A .678
-(If one of these characters appears, then the w)108 703.2 R .677
+(If one of these characters appears, then the w)108 715.2 R .677
(ord is re)-.1 F -.05(ga)-.15 G .677(rded as a).05 F F2(pattern)3.177 E
F0 3.177(,a).24 G .677(nd replaced with an alphabeti-)-3.177 F .562
-(cally sorted list of \214lenames matching the pattern \(see)108 715.2 R
+(cally sorted list of \214lenames matching the pattern \(see)108 727.2 R
F3 -.09(Pa)3.062 G(tter).09 E 2.812(nM)-.135 G(atching)-2.812 E F0(belo)
-2.812 E 3.062(w\). If)-.25 F .562(no matching \214lenames)3.062 F .009
-(are found, and the shell option)108 727.2 R F1(nullglob)2.509 E F0 .008
-(is not enabled, the w)2.509 F .008(ord is left unchanged.)-.1 F .008
-(If the)5.008 F F1(nullglob)2.508 E F0 .008(option is)2.508 F
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(23)187.615 E 0 Cg EP
+2.812 E 3.062(w\). If)-.25 F .562(no matching \214lenames)3.062 F
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(23)190.395 E 0 Cg EP
%%Page: 24 24
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
--.35 E .442(set, and no matches are found, the w)108 84 R .442
-(ord is remo)-.1 F -.15(ve)-.15 G 2.942(d. If).15 F(the)2.943 E/F1 10
-/Times-Bold@0 SF(failglob)2.943 E F0 .443
-(shell option is set, and no matches are)2.943 F 1.38
-(found, an error message is printed and the command is not e)108 96 R
--.15(xe)-.15 G 3.88(cuted. If).15 F 1.38(the shell option)3.88 F F1
-(nocaseglob)3.88 E F0(is)3.88 E .103
-(enabled, the match is performed without re)108 108 R -.05(ga)-.15 G
+-.35 E .009(are found, and the shell option)108 84 R/F1 10/Times-Bold@0
+SF(nullglob)2.509 E F0 .008(is not enabled, the w)2.509 F .008
+(ord is left unchanged.)-.1 F .008(If the)5.008 F F1(nullglob)2.508 E F0
+.008(option is)2.508 F .442(set, and no matches are found, the w)108 96
+R .442(ord is remo)-.1 F -.15(ve)-.15 G 2.942(d. If).15 F(the)2.943 E F1
+(failglob)2.943 E F0 .443(shell option is set, and no matches are)2.943
+F 1.38(found, an error message is printed and the command is not e)108
+108 R -.15(xe)-.15 G 3.88(cuted. If).15 F 1.38(the shell option)3.88 F
+F1(nocaseglob)3.88 E F0(is)3.88 E .103
+(enabled, the match is performed without re)108 120 R -.05(ga)-.15 G
.104(rd to the case of alphabetic characters.).05 F .104
-(When a pattern is used)5.104 F .378(for pathname e)108 120 R .378
+(When a pattern is used)5.104 F .378(for pathname e)108 132 R .378
(xpansion, the character)-.15 F F1 -.63(``)2.878 G -.55(.').63 G(')-.08
E F0 .378(at the start of a name or immediately follo)5.378 F .377
-(wing a slash must be)-.25 F .578(matched e)108 132 R(xplicitly)-.15 E
+(wing a slash must be)-.25 F .578(matched e)108 144 R(xplicitly)-.15 E
3.078(,u)-.65 G .578(nless the shell option)-3.078 F F1(dotglob)3.079 E
F0 .579(is set.)3.079 F .579
(When matching a pathname, the slash character)5.579 F 1.789(must al)108
-144 R -.1(wa)-.1 G 1.788(ys be matched e).1 F(xplicitly)-.15 E 6.788(.I)
+156 R -.1(wa)-.1 G 1.788(ys be matched e).1 F(xplicitly)-.15 E 6.788(.I)
-.65 G 4.288(no)-6.788 G 1.788(ther cases, the)-4.288 F F1 -.63(``)4.288
G -.55(.').63 G(')-.08 E F0 1.788(character is not treated specially)
6.788 F 6.788(.S)-.65 G 1.788(ee the)-6.788 F .165(description of)108
-156 R F1(shopt)2.665 E F0(belo)2.665 E 2.665(wu)-.25 G(nder)-2.665 E/F2
+168 R F1(shopt)2.665 E F0(belo)2.665 E 2.665(wu)-.25 G(nder)-2.665 E/F2
9/Times-Bold@0 SF .165(SHELL B)2.665 F(UIL)-.09 E .165(TIN COMMANDS)
-.828 F F0 .166(for a description of the)2.415 F F1(nocaseglob)2.666 E
-F0(,)A F1(null-)2.666 E(glob)108 168 Q F0(,)A F1(failglob)2.5 E F0 2.5
-(,a)C(nd)-2.5 E F1(dotglob)2.5 E F0(shell options.)2.5 E(The)108 184.8 Q
+F0(,)A F1(null-)2.666 E(glob)108 180 Q F0(,)A F1(failglob)2.5 E F0 2.5
+(,a)C(nd)-2.5 E F1(dotglob)2.5 E F0(shell options.)2.5 E(The)108 196.8 Q
F2(GLOBIGNORE)2.786 E F0 .286(shell v)2.536 F .285
(ariable may be used to restrict the set of \214lenames matching a)-.25
F/F3 10/Times-Italic@0 SF(pattern)2.785 E F0 5.285(.I).24 G(f)-5.285 E
-F2(GLO-)2.785 E(BIGNORE)108 196.8 Q F0 2.316(is set, each matching \214\
+F2(GLO-)2.785 E(BIGNORE)108 208.8 Q F0 2.316(is set, each matching \214\
lename that also matches one of the patterns in)4.565 F F2(GLOBIGNORE)
-4.816 E F0(is)4.566 E(remo)108 208.8 Q -.15(ve)-.15 G 2.66(df).15 G .16
+4.816 E F0(is)4.566 E(remo)108 220.8 Q -.15(ve)-.15 G 2.66(df).15 G .16
(rom the list of matches.)-2.66 F .16(The \214lenames)5.16 F F1 -.63(``)
2.66 G -.55(.').63 G(')-.08 E F0(and)5.16 E F1 -.63(``)2.66 G(..).63 E
-.63('')-.55 G F0 .16(are al)5.79 F -.1(wa)-.1 G .159(ys ignored when).1
-F F2(GLOBIGNORE)2.659 E F0(is)2.409 E .045(set and not null.)108 220.8 R
+F F2(GLOBIGNORE)2.659 E F0(is)2.409 E .045(set and not null.)108 232.8 R
(Ho)5.045 E(we)-.25 E -.15(ve)-.25 G .845 -.4(r, s).15 H(etting).4 E F2
(GLOBIGNORE)2.545 E F0 .046(to a non-null v)2.296 F .046
(alue has the ef)-.25 F .046(fect of enabling the)-.25 F F1(dotglob)
-2.546 E F0 .787(shell option, so all other \214lenames be)108 232.8 R
+2.546 E F0 .787(shell option, so all other \214lenames be)108 244.8 R
.787(ginning with a)-.15 F F1 -.63(``)3.287 G -.55(.').63 G(')-.08 E F0
.787(will match.)5.787 F 2.386 -.8(To g)5.787 H .786(et the old beha).8
-F .786(vior of ignoring)-.2 F .641(\214lenames be)108 244.8 R .641
+F .786(vior of ignoring)-.2 F .641(\214lenames be)108 256.8 R .641
(ginning with a)-.15 F F1 -.63(``)3.141 G -.55(.').63 G(')-.08 E F0
3.141(,m)C(ak)-3.141 E(e)-.1 E F1 -.63(``)3.141 G(.*').63 E(')-.63 E F0
.642(one of the patterns in)5.642 F F2(GLOBIGNORE)3.142 E/F4 9
/Times-Roman@0 SF(.)A F0(The)5.142 E F1(dotglob)3.142 E F0 .642
-(option is)3.142 F(disabled when)108 256.8 Q F2(GLOBIGNORE)2.5 E F0
-(is unset.)2.25 E F1 -.1(Pa)108 273.6 S(tter).1 E 2.5(nM)-.15 G(atching)
--2.5 E F0(An)108 290.4 Q 3.138(yc)-.15 G .638(haracter that appears in \
+(option is)3.142 F(disabled when)108 268.8 Q F2(GLOBIGNORE)2.5 E F0
+(is unset.)2.25 E F1 -.1(Pa)108 285.6 S(tter).1 E 2.5(nM)-.15 G(atching)
+-2.5 E F0(An)108 302.4 Q 3.138(yc)-.15 G .638(haracter that appears in \
a pattern, other than the special pattern characters described belo)
--3.138 F 1.938 -.65(w, m)-.25 H(atches).65 E 3.62(itself. The)108 302.4
+-3.138 F 1.938 -.65(w, m)-.25 H(atches).65 E 3.62(itself. The)108 314.4
R 1.12(NUL character may not occur in a pattern.)3.62 F 3.62(Ab)6.12 G
1.12(ackslash escapes the follo)-3.62 F 1.12(wing character; the)-.25 F
-.576(escaping backslash is discarded when matching.)108 314.4 R .576
+.576(escaping backslash is discarded when matching.)108 326.4 R .576
(The special pattern characters must be quoted if the)5.576 F 3.076(ya)
--.15 G(re)-3.076 E(to be matched literally)108 326.4 Q(.)-.65 E
-(The special pattern characters ha)108 343.2 Q .3 -.15(ve t)-.2 H
-(he follo).15 E(wing meanings:)-.25 E F1(*)144 360 Q F0 .376(Matches an)
+-.15 G(re)-3.076 E(to be matched literally)108 338.4 Q(.)-.65 E
+(The special pattern characters ha)108 355.2 Q .3 -.15(ve t)-.2 H
+(he follo).15 E(wing meanings:)-.25 E F1(*)144 372 Q F0 .376(Matches an)
31 F 2.876(ys)-.15 G .376(tring, including the null string.)-2.876 F
.376(When the)5.376 F F1(globstar)2.876 E F0 .377
-(shell option is enabled,)2.876 F(and)180 372 Q F1(*)3.275 E F0 .775
+(shell option is enabled,)2.876 F(and)180 384 Q F1(*)3.275 E F0 .775
(is used in a pathname e)3.275 F .775(xpansion conte)-.15 F .775(xt, tw)
-.15 F 3.275(oa)-.1 G(djacent)-3.275 E F1(*)3.275 E F0 3.275(su)C .775
(sed as a single pattern)-3.275 F 1.058(will match all \214les and zero\
- or more directories and subdirectories.)180 384 R 1.058(If follo)6.058
-F 1.058(wed by a)-.25 F F1(/)3.558 E F0(,)A(tw)180 396 Q 2.5(oa)-.1 G
+ or more directories and subdirectories.)180 396 R 1.058(If follo)6.058
+F 1.058(wed by a)-.25 F F1(/)3.558 E F0(,)A(tw)180 408 Q 2.5(oa)-.1 G
(djacent)-2.5 E F1(*)2.5 E F0 2.5(sw)C
-(ill match only directories and subdirectories.)-2.5 E F1(?)144 408 Q F0
+(ill match only directories and subdirectories.)-2.5 E F1(?)144 420 Q F0
(Matches an)31 E 2.5(ys)-.15 G(ingle character)-2.5 E(.)-.55 E F1([...])
-144 420 Q F0 .579(Matches an)21.84 F 3.079(yo)-.15 G .579
+144 432 Q F0 .579(Matches an)21.84 F 3.079(yo)-.15 G .579
(ne of the enclosed characters.)-3.079 F 3.079(Ap)5.579 G .578
(air of characters separated by a h)-3.079 F(yphen)-.05 E .684
-(denotes a)180 432 R F3 -.15(ra)3.184 G(ng).15 E 3.184(ee)-.1 G(xpr)
+(denotes a)180 444 R F3 -.15(ra)3.184 G(ng).15 E 3.184(ee)-.1 G(xpr)
-3.384 E(ession)-.37 E F0 3.184(;a)C .984 -.15(ny c)-3.184 H .684
(haracter that f).15 F .684(alls between those tw)-.1 F 3.185(oc)-.1 G
-.685(haracters, inclu-)-3.185 F(si)180 444 Q -.15(ve)-.25 G 3.713(,u).15
+.685(haracters, inclu-)-3.185 F(si)180 456 Q -.15(ve)-.25 G 3.713(,u).15
G 1.213(sing the current locale')-3.713 F 3.712(sc)-.55 G 1.212
(ollating sequence and character set, is matched.)-3.712 F 1.212(If the)
-6.212 F 1.123(\214rst character follo)180 456 R 1.123(wing the)-.25 F F1
+6.212 F 1.123(\214rst character follo)180 468 R 1.123(wing the)-.25 F F1
([)3.623 E F0 1.123(is a)3.623 F F1(!)3.623 E F0 1.124(or a)6.123 F F1
(^)3.624 E F0 1.124(then an)3.624 F 3.624(yc)-.15 G 1.124
(haracter not enclosed is matched.)-3.624 F .895
-(The sorting order of characters in range e)180 468 R .894
+(The sorting order of characters in range e)180 480 R .894
(xpressions is determined by the current locale)-.15 F .375(and the v)
-180 480 R .375(alues of the)-.25 F F2(LC_COLLA)2.875 E(TE)-.855 E F0(or)
+180 492 R .375(alues of the)-.25 F F2(LC_COLLA)2.875 E(TE)-.855 E F0(or)
2.625 E F2(LC_ALL)2.875 E F0 .375(shell v)2.625 F .375
(ariables, if set.)-.25 F 1.976 -.8(To o)5.376 H .376(btain the tra-).8
-F .068(ditional interpretation of range e)180 492 R .068
+F .068(ditional interpretation of range e)180 504 R .068
(xpressions, where)-.15 F F1([a\255d])2.568 E F0 .067(is equi)2.567 F
-.25(va)-.25 G .067(lent to).25 F F1([abcd])2.567 E F0 2.567(,s)C .067
-(et v)-2.567 F(alue)-.25 E .156(of the)180 504 R F1(LC_ALL)2.656 E F0
+(et v)-2.567 F(alue)-.25 E .156(of the)180 516 R F1(LC_ALL)2.656 E F0
.156(shell v)2.656 F .156(ariable to)-.25 F F1(C)2.657 E F0 2.657(,o)C
2.657(re)-2.657 G .157(nable the)-2.657 F F1(globasciiranges)2.657 E F0
.157(shell option.)2.657 F(A)5.157 E F1<ad>2.657 E F0(may)2.657 E .193(\
be matched by including it as the \214rst or last character in the set.)
-180 516 R(A)5.193 E F1(])2.693 E F0 .193(may be matched by)2.693 F
-(including it as the \214rst character in the set.)180 528 Q -.4(Wi)180
-546 S(thin).4 E F1([)3.07 E F0(and)3.07 E F1(])3.07 E F0(,)A F3 -.15(ch)
+180 528 R(A)5.193 E F1(])2.693 E F0 .193(may be matched by)2.693 F
+(including it as the \214rst character in the set.)180 540 Q -.4(Wi)180
+558 S(thin).4 E F1([)3.07 E F0(and)3.07 E F1(])3.07 E F0(,)A F3 -.15(ch)
3.07 G(ar).15 E .571(acter classes)-.15 F F0 .571
(can be speci\214ed using the syntax)3.071 F F1([:)3.071 E F3(class)A F1
(:])A F0 3.071(,w)C(here)-3.071 E F3(class)3.071 E F0
-(is one of the follo)180 558 Q
+(is one of the follo)180 570 Q
(wing classes de\214ned in the POSIX standard:)-.25 E F1 8.173
-(alnum alpha ascii blank cntrl digit graph lo)180 570 R 8.173
-(wer print punct space)-.1 F 5(upper w)180 582 R 5(ord xdigit)-.1 F F0
-4.289(Ac)180 594 S 1.789(haracter class matches an)-4.289 F 4.289(yc)
+(alnum alpha ascii blank cntrl digit graph lo)180 582 R 8.173
+(wer print punct space)-.1 F 5(upper w)180 594 R 5(ord xdigit)-.1 F F0
+4.289(Ac)180 606 S 1.789(haracter class matches an)-4.289 F 4.289(yc)
-.15 G 1.789(haracter belonging to that class.)-4.289 F(The)6.789 E F1
-.1(wo)4.29 G(rd).1 E F0(character)4.29 E
-(class matches letters, digits, and the character _.)180 606 Q -.4(Wi)
-180 624 S(thin).4 E F1([)4.537 E F0(and)4.537 E F1(])4.537 E F0 4.537
+(class matches letters, digits, and the character _.)180 618 Q -.4(Wi)
+180 636 S(thin).4 E F1([)4.537 E F0(and)4.537 E F1(])4.537 E F0 4.537
(,a)C(n)-4.537 E F3 2.037(equivalence class)4.537 F F0 2.036
(can be speci\214ed using the syntax)4.536 F F1([=)4.536 E F3(c)A F1(=])
A F0 4.536(,w)C(hich)-4.536 E .125(matches all characters with the same\
- collation weight \(as de\214ned by the current locale\) as)180 636 R
-(the character)180 648 Q F3(c)2.5 E F0(.)A -.4(Wi)180 666 S(thin).4 E F1
+ collation weight \(as de\214ned by the current locale\) as)180 648 R
+(the character)180 660 Q F3(c)2.5 E F0(.)A -.4(Wi)180 678 S(thin).4 E F1
([)2.5 E F0(and)2.5 E F1(])2.5 E F0 2.5(,t)C(he syntax)-2.5 E F1([.)2.5
E F3(symbol)A F1(.])A F0(matches the collating symbol)2.5 E F3(symbol)
-2.5 E F0(.)A .705(If the)108 682.8 R F1(extglob)3.205 E F0 .705
+2.5 E F0(.)A .705(If the)108 694.8 R F1(extglob)3.205 E F0 .705
(shell option is enabled using the)3.205 F F1(shopt)3.205 E F0 -.2(bu)
3.205 G .704(iltin, se).2 F -.15(ve)-.25 G .704(ral e).15 F .704
(xtended pattern matching operators)-.15 F .255(are recognized.)108
-694.8 R .255(In the follo)5.255 F .255(wing description, a)-.25 F F3
+706.8 R .255(In the follo)5.255 F .255(wing description, a)-.25 F F3
(pattern-list)2.755 E F0 .255
(is a list of one or more patterns separated by a)2.755 F F1(|)2.756 E
F0(.)A(Composite patterns may be formed using one or more of the follo)
-108 706.8 Q(wing sub-patterns:)-.25 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(24)187.615 E 0 Cg EP
+108 718.8 Q(wing sub-patterns:)-.25 E(GNU Bash 4.3)72 768 Q
+(2013 October 20)141.235 E(24)190.395 E 0 Cg EP
%%Page: 25 25
%%BeginPageSetup
BP
(is an inte)2.996 F .496(ger port number or ser)-.15 F(-)-.2 E
(vice name,)180 729.6 Q F1(bash)2.5 E F0
(attempts to open the corresponding TCP sock)2.5 E(et.)-.1 E
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(25)187.615 E 0 Cg EP
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(25)190.395 E 0 Cg EP
%%Page: 26 26
%%BeginPageSetup
BP
676.8 Q F1(&>>)144 693.6 Q F2(wor)A(d)-.37 E F0
(This is semantically equi)108 710.4 Q -.25(va)-.25 G(lent to).25 E F1
(>>)144 727.2 Q F2(wor)A(d)-.37 E F0(2)2.5 E F1(>&)A F0(1)A
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(26)187.615 E 0 Cg EP
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(26)190.395 E 0 Cg EP
%%Page: 27 27
%%BeginPageSetup
BP
.285(to \214le descriptor)2.785 F F2(n)2.785 E F0 2.785(,o).24 G 2.785
(rt)-2.785 G .286(he standard output \(\214le descriptor 1\) if)-2.785 F
F2(n)2.786 E F0 .286(is not speci-)2.786 F(\214ed.)108 708 Q
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(27)187.615 E 0 Cg EP
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(27)190.395 E 0 Cg EP
%%Page: 28 28
%%BeginPageSetup
BP
(alue greater than 0, de\214nes a maximum function nesting)-.25 F(le)108
717.6 Q -.15(ve)-.25 G 2.5(l. Function).15 F(in)2.5 E -.2(vo)-.4 G
(cations that e).2 E(xceed the limit cause the entire command to abort.)
--.15 E(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(28)187.615 E 0
-Cg EP
+-.15 E(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(28)190.395 E 0 Cg
+EP
%%Page: 29 29
%%BeginPageSetup
BP
(xpression.)-.15 E 1.406
(Constants with a leading 0 are interpreted as octal numbers.)108 724.8
R 3.906(Al)6.406 G 1.406(eading 0x or 0X denotes he)-3.906 F(xadecimal.)
--.15 E(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(29)187.615 E 0
-Cg EP
+-.15 E(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(29)190.395 E 0 Cg
+EP
%%Page: 30 30
%%BeginPageSetup
BP
F3<ad52>108 704.4 Q F1(varname)2.5 E F0 -.35(Tr)144 716.4 S
(ue if the shell v).35 E(ariable)-.25 E F1(varname)2.79 E F0
(is set and is a name reference.)2.68 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(30)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(30)190.395 E 0 Cg EP
%%Page: 31 31
%%BeginPageSetup
BP
(tion, the shell searches for it in the list of shell b)108 720 Q 2.5
(uiltins. If)-.2 F 2.5(am)2.5 G(atch is found, that b)-2.5 E
(uiltin is in)-.2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E(GNU Bash 4.3)72 768
-Q(2013 September 2)138.455 E(31)187.615 E 0 Cg EP
+Q(2013 October 20)141.235 E(31)190.395 E 0 Cg EP
%%Page: 32 32
%%BeginPageSetup
BP
(raps caught by the shell are reset to the v)-32.5 F .307
(alues inherited from the shell')-.25 F 2.807(sp)-.55 G .307
(arent, and traps ignored)-2.807 F(by the shell are ignored)144 720 Q
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(32)187.615 E 0 Cg EP
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(32)190.395 E 0 Cg EP
%%Page: 33 33
%%BeginPageSetup
BP
F1(bash)108 720 Q F0(ignores)2.5 E F4(SIGQ)2.5 E(UIT)-.09 E F5(.)A F0
(If job control is in ef)4.5 E(fect,)-.25 E F1(bash)2.5 E F0(ignores)2.5
E F4(SIGTTIN)2.5 E F5(,)A F4(SIGTT)2.25 E(OU)-.162 E F5(,)A F0(and)2.25
-E F4(SIGTSTP)2.5 E F5(.)A F0(GNU Bash 4.3)72 768 Q(2013 September 2)
-138.455 E(33)187.615 E 0 Cg EP
+E F4(SIGTSTP)2.5 E F5(.)A F0(GNU Bash 4.3)72 768 Q(2013 October 20)
+141.235 E(33)190.395 E 0 Cg EP
%%Page: 34 34
%%BeginPageSetup
BP
-2.518 F .494(the last job stopped while it w)108 720 R .495
(as in the fore)-.1 F .495(ground or started in the background.)-.15 F
(The)5.495 E F5(pr)4.245 E -.15(ev)-.37 G .495(ious job).15 F F0 .495
-(may be)3.225 F(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(34)
-187.615 E 0 Cg EP
+(may be)3.225 F(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(34)
+190.395 E 0 Cg EP
%%Page: 35 35
%%BeginPageSetup
BP
uld be used to embed a terminal)-.15 F(control sequence into the prompt)
180 703.2 Q F1(\\])144 715.2 Q F0
(end a sequence of non-printing characters)29.89 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(35)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(35)190.395 E 0 Cg EP
%%Page: 36 36
%%BeginPageSetup
BP
(ays: as a symbolic k)-3.453 F 1.153 -.15(ey n)-.1 H .853
(ame, possibly with).15 F F4(Meta\255)3.353 E F0(or)3.353 E F4(Contr)
3.353 E(ol\255)-.45 E F0(pre\214x)3.353 E .853(es, or as a k)-.15 F -.15
-(ey)-.1 G(sequence.)108 724.8 Q(GNU Bash 4.3)72 768 Q(2013 September 2)
-138.455 E(36)187.615 E 0 Cg EP
+(ey)-.1 G(sequence.)108 724.8 Q(GNU Bash 4.3)72 768 Q(2013 October 20)
+141.235 E(36)190.395 E 0 Cg EP
%%Page: 37 37
%%BeginPageSetup
BP
2.968 E F0 5.468(.A)C .468(ll other v)-5.468 F .468(alues are equi)-.25
F -.25(va)-.25 G .468(lent to).25 F F1(Off)2.968 E F0 5.468(.T)C .468
(he v)-5.468 F .468(ariables and their def)-.25 F(ault)-.1 E
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(37)187.615 E 0 Cg EP
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(37)190.395 E 0 Cg EP
%%Page: 38 38
%%BeginPageSetup
BP
(set to a v)2.983 F .482(alue less than zero, the num-)-.25 F
(ber of history entries is not limited.)144 724.8 Q(By def)5 E
(ault, the number of history entries is not limited.)-.1 E(GNU Bash 4.3)
-72 768 Q(2013 September 2)138.455 E(38)187.615 E 0 Cg EP
+72 768 Q(2013 October 20)141.235 E(38)190.395 E 0 Cg EP
%%Page: 39 39
%%BeginPageSetup
BP
2.686(cuted. By).15 F(def)2.686 E .186
(ault, history lines may be modi\214ed and retain indi)-.1 F .186
(vidual undo lists across calls to)-.25 F F1 -.18(re)144 696 S(adline)
-.18 E F0(.)A(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(39)187.615
+.18 E F0(.)A(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(39)190.395
E 0 Cg EP
%%Page: 40 40
%%BeginPageSetup
(gument and reads commands and bindings from that)-.18 F 2.5(\214le. F)
144 722.4 R(or e)-.15 E(xample, the follo)-.15 E(wing directi)-.25 E .3
-.15(ve w)-.25 H(ould read).05 E F2(/etc/inputr)2.5 E(c)-.37 E F0(:)A
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(40)187.615 E 0 Cg EP
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(40)190.395 E 0 Cg EP
%%Page: 41 41
%%BeginPageSetup
BP
(current line without clearing the screen.)144 693.6 Q F1 -.18(re)108
705.6 S(draw\255curr).18 E(ent\255line)-.18 E F0
(Refresh the current line.)144 717.6 Q(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(41)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(41)190.395 E 0 Cg EP
%%Page: 42 42
%%BeginPageSetup
BP
(xpansion on the current line and insert a space.)-.15 F(See)6.627 E F2
(HIST)4.127 E(OR)-.162 E 3.877(YE)-.315 G(XP)-3.877 E(ANSION)-.666 E F0
(belo)144 720 Q 2.5(wf)-.25 G(or a description of history e)-2.5 E
-(xpansion.)-.15 E(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(42)
-187.615 E 0 Cg EP
+(xpansion.)-.15 E(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(42)
+190.395 E 0 Cg EP
%%Page: 43 43
%%BeginPageSetup
BP
(Characters bound to)5.957 F F1(backward\255delete\255char)3.458 E F0
.958(replace the character)3.458 F(before point with a space.)144 712.8
Q(By def)5 E(ault, this command is unbound.)-.1 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(43)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(43)190.395 E 0 Cg EP
%%Page: 44 44
%%BeginPageSetup
BP
(cuting this function the \214rst time mak).15 F .378(es the ar)-.1 F
.378(gument count)-.18 F(four)144 724.8 Q 2.5(,as)-.4 G(econd time mak)
-2.5 E(es the ar)-.1 E(gument count sixteen, and so on.)-.18 E
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(44)187.615 E 0 Cg EP
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(44)190.395 E 0 Cg EP
%%Page: 45 45
%%BeginPageSetup
BP
(xt before point, comparing the te)-.15 F .611(xt ag)-.15 F .611
(ainst lines from the his-)-.05 F
(tory list for possible completion matches.)144 708 Q(GNU Bash 4.3)72
-768 Q(2013 September 2)138.455 E(45)187.615 E 0 Cg EP
+768 Q(2013 October 20)141.235 E(45)190.395 E 0 Cg EP
%%Page: 46 46
%%BeginPageSetup
BP
(ginning of the line.)-.15 F 2.943
(In either case, the line is accepted as if a ne)144 729.6 R 2.943
(wline had been typed.)-.25 F 2.943(The def)7.943 F 2.943(ault v)-.1 F
-2.942(alue of)-.25 F(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E
-(46)187.615 E 0 Cg EP
+2.942(alue of)-.25 F(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(46)
+190.395 E 0 Cg EP
%%Page: 47 47
%%BeginPageSetup
BP
(After these matches ha)108 729.6 R 1.538 -.15(ve b)-.2 H 1.238
(een generated, an).15 F 3.738(ys)-.15 G 1.237
(hell function or command speci\214ed with the)-3.738 F F1<ad46>3.737 E
-F0(and)3.737 E F1<ad43>3.737 E F0(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(47)187.615 E 0 Cg EP
+F0(and)3.737 E F1<ad43>3.737 E F0(GNU Bash 4.3)72 768 Q(2013 October 20)
+141.235 E(47)190.395 E 0 Cg EP
%%Page: 48 48
%%BeginPageSetup
BP
(.")144 688.8 S
(/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124)-6 E(})108
700.8 Q(complete -D -F _completion_loader -o bashdefault -o default)108
-712.8 Q F0(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(48)187.615 E
+712.8 Q F0(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(48)190.395 E
0 Cg EP
%%Page: 49 49
%%BeginPageSetup
-.25 F F2(=)3.162 E F0 5.662(.I)C 3.162(ft)-5.662 G(he)-3.162 E F2
(extglob)3.162 E F0 .662(shell option is enabled,)3.162 F F2(\()3.163 E
F0(will also inhibit e)108 729.6 Q(xpansion.)-.15 E(GNU Bash 4.3)72 768
-Q(2013 September 2)138.455 E(49)187.615 E 0 Cg EP
+Q(2013 October 20)141.235 E(49)190.395 E 0 Cg EP
%%Page: 50 50
%%BeginPageSetup
BP
.184(wing modi\214ers,)-.25 F(each preceded by a `:'.)108 693.6 Q F1(h)
108 710.4 Q F0(Remo)30.44 E .3 -.15(ve a t)-.15 H
(railing \214lename component, lea).15 E(ving only the head.)-.2 E
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(50)187.615 E 0 Cg EP
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(50)190.395 E 0 Cg EP
%%Page: 51 51
%%BeginPageSetup
BP
(hen run with job control enabled, an)-2.919 F 2.918(ys)-.15 G
(peci\214ed)-2.918 E F2(jobspec)2.918 E F0 -.1(wa)2.918 G 2.918(sn).1 G
(ot)-2.918 E(found or w)144 709.2 Q(as started without job control.)-.1
-E(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(51)187.615 E 0 Cg EP
+E(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(51)190.395 E 0 Cg EP
%%Page: 52 52
%%BeginPageSetup
BP
(ti).05 E 1.98 -.15(ve i)-.25 H(nte).15 E 1.68(ger is supplied as)-.15 F
F2 -.2(ex)4.18 G(pr).2 E F0(,)A F1(caller)4.18 E F0 1.68
(displays the line number)4.18 F(,)-.4 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(52)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(52)190.395 E 0 Cg EP
%%Page: 53 53
%%BeginPageSetup
BP
3.02 G(pr).2 E F0 .52(does not corre-)3.02 F(spond to a v)144 120 Q
(alid position in the call stack.)-.25 E/F2 10/Times-Bold@0 SF(cd)108
136.8 Q F0([)2.5 E F2<ad4c>A F0(|[)A F2<ad50>A F0([)2.5 E F2<ad65>A F0
-(]]] [)A F1(dir)A F0(])A .322(Change the current directory to)144 148.8
-R F1(dir)2.822 E F0 5.322(.i)C(f)-5.322 E F1(dir)2.822 E F0 .321
-(is not supplied, the v)2.822 F .321(alue of the)-.25 F/F3 9
+(]] [\255@]] [)A F1(dir)A F0(])A .322(Change the current directory to)
+144 148.8 R F1(dir)2.822 E F0 5.322(.i)C(f)-5.322 E F1(dir)2.822 E F0
+.321(is not supplied, the v)2.822 F .321(alue of the)-.25 F/F3 9
/Times-Bold@0 SF(HOME)2.821 E F0 .321(shell v)2.571 F .321(ariable is)
-.25 F 1.035(the def)144 160.8 R 3.535(ault. An)-.1 F 3.535(ya)-.15 G
1.035(dditional ar)-3.535 F 1.035(guments follo)-.18 F(wing)-.25 E F1
F0(.)A 1.466(If the)144 268.8 R F2<ad65>3.966 E F0 1.466
(option is supplied with)3.966 F F2<ad50>3.965 E F0 3.965(,a)C 1.465
(nd the current w)-3.965 F 1.465
-(orking directory cannot be successfully)-.1 F .012
-(determined after a successful directory change,)144 280.8 R F2(cd)2.512
-E F0 .012(will return an unsuccessful status.)2.512 F .013(An ar)5.013 F
-(gument)-.18 E(of)144 292.8 Q F2<ad>2.672 E F0 .172(is con)2.672 F -.15
-(ve)-.4 G .172(rted to).15 F F3($OLDPWD)2.672 E F0 .171
-(before the directory change is attempted.)2.421 F .171
-(If a non-empty directory)5.171 F .743(name from)144 304.8 R F3(CDP)
-3.243 E -.855(AT)-.666 G(H).855 E F0 .743(is used, or if)2.993 F F2<ad>
-3.244 E F0 .744(is the \214rst ar)3.244 F .744
-(gument, and the directory change is successful,)-.18 F .594
-(the absolute pathname of the ne)144 316.8 R 3.094(ww)-.25 G .594
-(orking directory is written to the standard output.)-3.194 F .594
-(The return)5.594 F -.25(va)144 328.8 S(lue is true if the directory w)
-.25 E(as successfully changed; f)-.1 E(alse otherwise.)-.1 E F2(command)
-108 345.6 Q F0([)2.5 E F2(\255pVv)A F0(])A F1(command)2.5 E F0([)2.5 E
-F1(ar)A(g)-.37 E F0(...])2.5 E(Run)144 357.6 Q F1(command)2.956 E F0
-(with)3.527 E F1(ar)3.087 E(gs)-.37 E F0 .257
+(orking directory cannot be successfully)-.1 F .467
+(determined after a successful directory change,)144 280.8 R F2(cd)2.968
+E F0 .468(will return an unsuccessful status.)2.968 F .468(On systems)
+5.468 F .337(that support it, the)144 292.8 R F2<ad40>2.837 E F0 .336
+(option presents the e)2.836 F .336(xtended attrib)-.15 F .336
+(utes associated with a \214le as a directory)-.2 F(.)-.65 E .71(An ar)
+144 304.8 R .71(gument of)-.18 F F2<ad>3.21 E F0 .71(is con)3.21 F -.15
+(ve)-.4 G .71(rted to).15 F F3($OLDPWD)3.21 E F0 .71
+(before the directory change is attempted.)2.96 F .71(If a non-)5.71 F
+.107(empty directory name from)144 316.8 R F3(CDP)2.607 E -.855(AT)-.666
+G(H).855 E F0 .107(is used, or if)2.357 F F2<ad>2.607 E F0 .106
+(is the \214rst ar)2.607 F .106(gument, and the directory change)-.18 F
+.038(is successful, the absolute pathname of the ne)144 328.8 R 2.538
+(ww)-.25 G .038(orking directory is written to the standard output.)
+-2.638 F(The return v)144 340.8 Q(alue is true if the directory w)-.25 E
+(as successfully changed; f)-.1 E(alse otherwise.)-.1 E F2(command)108
+357.6 Q F0([)2.5 E F2(\255pVv)A F0(])A F1(command)2.5 E F0([)2.5 E F1
+(ar)A(g)-.37 E F0(...])2.5 E(Run)144 369.6 Q F1(command)2.957 E F0(with)
+3.527 E F1(ar)3.087 E(gs)-.37 E F0 .257
(suppressing the normal shell function lookup. Only b)3.027 F .257
-(uiltin commands or)-.2 F .502(commands found in the)144 369.6 R F3
--.666(PA)3.002 G(TH)-.189 E F0 .502(are e)2.752 F -.15(xe)-.15 G 3.002
+(uiltin commands or)-.2 F .501(commands found in the)144 381.6 R F3
+-.666(PA)3.001 G(TH)-.189 E F0 .502(are e)2.751 F -.15(xe)-.15 G 3.002
(cuted. If).15 F(the)3.002 E F2<ad70>3.002 E F0 .502(option is gi)3.002
-F -.15(ve)-.25 G .501(n, the search for).15 F F1(command)3.201 E F0(is)
-3.771 E .399(performed using a def)144 381.6 R .399(ault v)-.1 F .399
-(alue for)-.25 F F3 -.666(PA)2.899 G(TH)-.189 E F0 .4
+F -.15(ve)-.25 G .502(n, the search for).15 F F1(command)3.202 E F0(is)
+3.772 E .4(performed using a def)144 393.6 R .4(ault v)-.1 F .4
+(alue for)-.25 F F3 -.666(PA)2.9 G(TH)-.189 E F0 .399
(that is guaranteed to \214nd all of the standard utilities.)2.649 F(If)
-5.4 E .175(either the)144 393.6 R F2<ad56>2.675 E F0(or)2.675 E F2<ad76>
-2.675 E F0 .175(option is supplied, a description of)2.675 F F1(command)
-2.875 E F0 .174(is printed.)3.445 F(The)5.174 E F2<ad76>2.674 E F0 .174
-(option causes)2.674 F 3.317(as)144 405.6 S .817(ingle w)-3.317 F .817
-(ord indicating the command or \214lename used to in)-.1 F -.2(vo)-.4 G
--.1(ke).2 G F1(command)3.618 E F0 .818(to be displayed; the)4.088 F F2
-<ad56>144 417.6 Q F0 .25(option produces a more v)2.75 F .25
-(erbose description.)-.15 F .249(If the)5.25 F F2<ad56>2.749 E F0(or)
-2.749 E F2<ad76>2.749 E F0 .249(option is supplied, the e)2.749 F .249
-(xit status)-.15 F 1.004(is 0 if)144 429.6 R F1(command)3.704 E F0 -.1
-(wa)4.274 G 3.504(sf).1 G 1.005(ound, and 1 if not.)-3.504 F 1.005
+5.399 E .174(either the)144 405.6 R F2<ad56>2.674 E F0(or)2.674 E F2
+<ad76>2.674 E F0 .175(option is supplied, a description of)2.674 F F1
+(command)2.875 E F0 .175(is printed.)3.445 F(The)5.175 E F2<ad76>2.675 E
+F0 .175(option causes)2.675 F 3.318(as)144 417.6 S .818(ingle w)-3.318 F
+.817(ord indicating the command or \214lename used to in)-.1 F -.2(vo)
+-.4 G -.1(ke).2 G F1(command)3.617 E F0 .817(to be displayed; the)4.087
+F F2<ad56>144 429.6 Q F0 .249(option produces a more v)2.749 F .249
+(erbose description.)-.15 F .249(If the)5.249 F F2<ad56>2.749 E F0(or)
+2.749 E F2<ad76>2.75 E F0 .25(option is supplied, the e)2.75 F .25
+(xit status)-.15 F 1.005(is 0 if)144 441.6 R F1(command)3.705 E F0 -.1
+(wa)4.275 G 3.505(sf).1 G 1.005(ound, and 1 if not.)-3.505 F 1.004
(If neither option is supplied and an error occurred or)6.005 F F1
-(command)144.2 441.6 Q F0 1.599(cannot be found, the e)4.869 F 1.599
-(xit status is 127.)-.15 F 1.599(Otherwise, the e)6.599 F 1.598
-(xit status of the)-.15 F F2(command)4.098 E F0 -.2(bu)144 453.6 S
+(command)144.2 453.6 Q F0 1.598(cannot be found, the e)4.868 F 1.599
+(xit status is 127.)-.15 F 1.599(Otherwise, the e)6.599 F 1.599
+(xit status of the)-.15 F F2(command)4.099 E F0 -.2(bu)144 465.6 S
(iltin is the e).2 E(xit status of)-.15 E F1(command)2.5 E F0(.).77 E F2
-(compgen)108 470.4 Q F0([)2.5 E F1(option)A F0 2.5(][)C F1(wor)-2.5 E(d)
--.37 E F0(])A .012(Generate possible completion matches for)144 482.4 R
+(compgen)108 482.4 Q F0([)2.5 E F1(option)A F0 2.5(][)C F1(wor)-2.5 E(d)
+-.37 E F0(])A .013(Generate possible completion matches for)144 494.4 R
F1(wor)2.513 E(d)-.37 E F0 .013(according to the)2.513 F F1(option)2.513
-E F0 .013(s, which may be an)B 2.513(yo)-.15 G(ption)-2.513 E .982
-(accepted by the)144 494.4 R F2(complete)3.482 E F0 -.2(bu)3.481 G .981
+E F0 .013(s, which may be an)B 2.512(yo)-.15 G(ption)-2.512 E .981
+(accepted by the)144 506.4 R F2(complete)3.481 E F0 -.2(bu)3.481 G .981
(iltin with the e).2 F .981(xception of)-.15 F F2<ad70>3.481 E F0(and)
-3.481 E F2<ad72>3.481 E F0 3.481(,a)C .981(nd write the matches to the)
--3.481 F 1.415(standard output.)144 506.4 R 1.415(When using the)6.415 F
+3.481 E F2<ad72>3.481 E F0 3.481(,a)C .982(nd write the matches to the)
+-3.481 F 1.415(standard output.)144 518.4 R 1.415(When using the)6.415 F
F2<ad46>3.915 E F0(or)3.915 E F2<ad43>3.915 E F0 1.415(options, the v)
3.915 F 1.415(arious shell v)-.25 F 1.415(ariables set by the pro-)-.25
-F(grammable completion f)144 518.4 Q(acilities, while a)-.1 E -.25(va)
+F(grammable completion f)144 530.4 Q(acilities, while a)-.1 E -.25(va)
-.2 G(ilable, will not ha).25 E .3 -.15(ve u)-.2 H(seful v).15 E(alues.)
--.25 E .352(The matches will be generated in the same w)144 542.4 R .352
+-.25 E .352(The matches will be generated in the same w)144 554.4 R .352
(ay as if the programmable completion code had gen-)-.1 F .02(erated th\
em directly from a completion speci\214cation with the same \215ags.)144
-554.4 R(If)5.02 E F1(wor)2.52 E(d)-.37 E F0 .02(is speci\214ed, only)
-2.52 F(those completions matching)144 566.4 Q F1(wor)2.5 E(d)-.37 E F0
-(will be displayed.)2.5 E(The return v)144 590.4 Q
+566.4 R(If)5.02 E F1(wor)2.52 E(d)-.37 E F0 .02(is speci\214ed, only)
+2.52 F(those completions matching)144 578.4 Q F1(wor)2.5 E(d)-.37 E F0
+(will be displayed.)2.5 E(The return v)144 602.4 Q
(alue is true unless an in)-.25 E -.25(va)-.4 G
(lid option is supplied, or no matches were generated.).25 E F2
-(complete)108 607.2 Q F0([)3.729 E F2(\255abcdefgjksuv)A F0 3.729(][)C
-F2<ad6f>-3.729 E F1(comp-option)3.729 E F0 3.729(][)C F2(\255DE)-3.729 E
+(complete)108 619.2 Q F0([)3.728 E F2(\255abcdefgjksuv)A F0 3.728(][)C
+F2<ad6f>-3.728 E F1(comp-option)3.728 E F0 3.728(][)C F2(\255DE)-3.728 E
F0 3.728(][)C F2<ad41>-3.728 E F1(action)3.728 E F0 3.728(][)C F2<ad47>
--3.728 E F1(globpat)3.728 E F0 3.728(][)C F2<ad57>-3.728 E F1(wor)3.728
-E(dlist)-.37 E F0 3.728(][)C F2<ad46>-3.728 E F1(func-)3.728 E(tion)108
-619.2 Q F0 2.5(][)C F2<ad43>-2.5 E F1(command)2.5 E F0(])A([)144 631.2 Q
+-3.728 E F1(globpat)3.728 E F0 3.729(][)C F2<ad57>-3.729 E F1(wor)3.729
+E(dlist)-.37 E F0 3.729(][)C F2<ad46>-3.729 E F1(func-)3.729 E(tion)108
+631.2 Q F0 2.5(][)C F2<ad43>-2.5 E F1(command)2.5 E F0(])A([)144 643.2 Q
F2<ad58>A F1(\214lterpat)2.5 E F0 2.5(][)C F2<ad50>-2.5 E F1(pr)2.5 E
(e\214x)-.37 E F0 2.5(][)C F2<ad53>-2.5 E F1(suf)2.5 E<8c78>-.18 E F0(])
A F1(name)2.5 E F0([)2.5 E F1(name ...)A F0(])A F2(complete \255pr)108
-643.2 Q F0([)2.5 E F2(\255DE)A F0 2.5(][)C F1(name)-2.5 E F0(...])2.5 E
-.634(Specify ho)144 655.2 R 3.134(wa)-.25 G -.18(rg)-3.134 G .634
-(uments to each).18 F F1(name)3.134 E F0 .634(should be completed.)3.134
-F .633(If the)5.634 F F2<ad70>3.133 E F0 .633
-(option is supplied, or if no)3.133 F .139(options are supplied, e)144
-667.2 R .139(xisting completion speci\214cations are printed in a w)-.15
-F .14(ay that allo)-.1 F .14(ws them to be)-.25 F .31(reused as input.)
-144 679.2 R(The)5.31 E F2<ad72>2.81 E F0 .31(option remo)2.81 F -.15(ve)
--.15 G 2.81(sac).15 G .31(ompletion speci\214cation for each)-2.81 F F1
-(name)2.81 E F0 2.81(,o)C 1.11 -.4(r, i)-2.81 H 2.81(fn).4 G(o)-2.81 E
-F1(name)2.81 E F0(s)A 1.346
-(are supplied, all completion speci\214cations.)144 691.2 R(The)6.347 E
-F2<ad44>3.847 E F0 1.347(option indicates that the remaining options)
-3.847 F .5(and actions should apply to the `)144 703.2 R(`def)-.74 E
+655.2 Q F0([)2.5 E F2(\255DE)A F0 2.5(][)C F1(name)-2.5 E F0(...])2.5 E
+.633(Specify ho)144 667.2 R 3.133(wa)-.25 G -.18(rg)-3.133 G .633
+(uments to each).18 F F1(name)3.133 E F0 .633(should be completed.)3.133
+F .634(If the)5.634 F F2<ad70>3.134 E F0 .634
+(option is supplied, or if no)3.134 F .14(options are supplied, e)144
+679.2 R .139(xisting completion speci\214cations are printed in a w)-.15
+F .139(ay that allo)-.1 F .139(ws them to be)-.25 F .31
+(reused as input.)144 691.2 R(The)5.31 E F2<ad72>2.81 E F0 .31
+(option remo)2.81 F -.15(ve)-.15 G 2.81(sac).15 G .31
+(ompletion speci\214cation for each)-2.81 F F1(name)2.81 E F0 2.81(,o)C
+1.11 -.4(r, i)-2.81 H 2.81(fn).4 G(o)-2.81 E F1(name)2.81 E F0(s)A 1.347
+(are supplied, all completion speci\214cations.)144 703.2 R(The)6.347 E
+F2<ad44>3.847 E F0 1.346(option indicates that the remaining options)
+3.847 F .5(and actions should apply to the `)144 715.2 R(`def)-.74 E
(ault')-.1 E 3('c)-.74 G .5
(ommand completion; that is, completion attempted on)-3 F 3.455(ac)144
-715.2 S .955(ommand for which no completion has pre)-3.455 F .955
+727.2 S .955(ommand for which no completion has pre)-3.455 F .955
(viously been de\214ned.)-.25 F(The)5.955 E F2<ad45>3.455 E F0 .955
-(option indicates that)3.455 F 3.009
-(the remaining options and actions should apply to `)144 727.2 R
-(`empty')-.74 E 5.509('c)-.74 G 3.009(ommand completion; that is,)-5.509
-F(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(53)187.615 E 0 Cg EP
+(option indicates that)3.455 F(GNU Bash 4.3)72 768 Q(2013 October 20)
+141.235 E(53)190.395 E 0 Cg EP
%%Page: 54 54
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
--.35 E(completion attempted on a blank line.)144 84 Q 1.437
+-.35 E .064(the remaining options and actions should apply to `)144 84 R
+(`empty')-.74 E 2.565('c)-.74 G .065
+(ommand completion; that is, comple-)-2.565 F
+(tion attempted on a blank line.)144 96 Q 1.438
(The process of applying these completion speci\214cations when w)144
-108 R 1.438(ord completion is attempted is)-.1 F(described abo)144 120 Q
+120 R 1.437(ord completion is attempted is)-.1 F(described abo)144 132 Q
.3 -.15(ve u)-.15 H(nder).15 E/F1 10/Times-Bold@0 SF(Pr)2.5 E
-(ogrammable Completion)-.18 E F0(.)A .556
-(Other options, if speci\214ed, ha)144 144 R .856 -.15(ve t)-.2 H .555
+(ogrammable Completion)-.18 E F0(.)A .555
+(Other options, if speci\214ed, ha)144 156 R .855 -.15(ve t)-.2 H .555
(he follo).15 F .555(wing meanings.)-.25 F .555(The ar)5.555 F .555
-(guments to the)-.18 F F1<ad47>3.055 E F0(,)A F1<ad57>3.055 E F0 3.055
-(,a)C(nd)-3.055 E F1<ad58>3.055 E F0 .722(options \(and, if necessary)
-144 156 R 3.222(,t)-.65 G(he)-3.222 E F1<ad50>3.222 E F0(and)3.222 E F1
-<ad53>3.222 E F0 .723(options\) should be quoted to protect them from e)
-3.222 F(xpan-)-.15 E(sion before the)144 168 Q F1(complete)2.5 E F0 -.2
+(guments to the)-.18 F F1<ad47>3.056 E F0(,)A F1<ad57>3.056 E F0 3.056
+(,a)C(nd)-3.056 E F1<ad58>3.056 E F0 .723(options \(and, if necessary)
+144 168 R 3.223(,t)-.65 G(he)-3.223 E F1<ad50>3.223 E F0(and)3.223 E F1
+<ad53>3.223 E F0 .722(options\) should be quoted to protect them from e)
+3.223 F(xpan-)-.15 E(sion before the)144 180 Q F1(complete)2.5 E F0 -.2
(bu)2.5 G(iltin is in).2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E F1<ad6f>144
-180 Q/F2 10/Times-Italic@0 SF(comp-option)2.5 E F0(The)184 192 Q F2
-(comp-option)2.791 E F0 .291(controls se)2.791 F -.15(ve)-.25 G .291
+192 Q/F2 10/Times-Italic@0 SF(comp-option)2.5 E F0(The)184 204 Q F2
+(comp-option)2.79 E F0 .291(controls se)2.791 F -.15(ve)-.25 G .291
(ral aspects of the compspec').15 F 2.791(sb)-.55 G(eha)-2.791 E .291
(vior be)-.2 F .291(yond the simple)-.15 F(generation of completions.)
-184 204 Q F2(comp-option)5 E F0(may be one of:)2.5 E F1(bashdefault)184
-216 Q F0 .281(Perform the rest of the def)224 228 R(ault)-.1 E F1(bash)
+184 216 Q F2(comp-option)5 E F0(may be one of:)2.5 E F1(bashdefault)184
+228 Q F0 .281(Perform the rest of the def)224 240 R(ault)-.1 E F1(bash)
2.781 E F0 .281(completions if the compspec generates no)2.781 F
-(matches.)224 240 Q F1(default)184 252 Q F0 2.876(Use readline')10 F
-5.376(sd)-.55 G(ef)-5.376 E 2.875
+(matches.)224 252 Q F1(default)184 264 Q F0 2.875(Use readline')10 F
+5.375(sd)-.55 G(ef)-5.375 E 2.876
(ault \214lename completion if the compspec generates no)-.1 F(matches.)
-224 264 Q F1(dir)184 276 Q(names)-.15 E F0(Perform directory name compl\
-etion if the compspec generates no matches.)224 288 Q F1(\214lenames)184
-300 Q F0 -.7(Te)224 312 S .137(ll readline that the compspec generates \
-\214lenames, so it can perform an).7 F 2.637<798c>-.15 G(le-)-2.637 E
-.134(name\255speci\214c processing \(lik)224 324 R 2.634(ea)-.1 G .134
+224 276 Q F1(dir)184 288 Q(names)-.15 E F0(Perform directory name compl\
+etion if the compspec generates no matches.)224 300 Q F1(\214lenames)184
+312 Q F0 -.7(Te)224 324 S .137(ll readline that the compspec generates \
+\214lenames, so it can perform an).7 F 2.636<798c>-.15 G(le-)-2.636 E
+.134(name\255speci\214c processing \(lik)224 336 R 2.634(ea)-.1 G .134
(dding a slash to directory names, quoting spe-)-2.634 F .45
-(cial characters, or suppressing trailing spaces\).)224 336 R .45
-(Intended to be used with shell)5.45 F(functions.)224 348 Q F1(noquote)
-184 360 Q F0 -.7(Te)5.55 G .814
+(cial characters, or suppressing trailing spaces\).)224 348 R .45
+(Intended to be used with shell)5.45 F(functions.)224 360 Q F1(noquote)
+184 372 Q F0 -.7(Te)5.55 G .814
(ll readline not to quote the completed w).7 F .814(ords if the)-.1 F
-3.314(ya)-.15 G .814(re \214lenames \(quoting)-3.314 F
-(\214lenames is the def)224 372 Q(ault\).)-.1 E F1(nospace)184 384 Q F0
+3.314(ya)-.15 G .815(re \214lenames \(quoting)-3.314 F
+(\214lenames is the def)224 384 Q(ault\).)-.1 E F1(nospace)184 396 Q F0
-.7(Te)6.11 G .22(ll readline not to append a space \(the def).7 F .22
(ault\) to w)-.1 F .22(ords completed at the end)-.1 F(of the line.)224
-396 Q F1(plusdirs)184 408 Q F0 1.985(After an)5.54 F 4.485(ym)-.15 G
+408 Q F1(plusdirs)184 420 Q F0 1.985(After an)5.54 F 4.485(ym)-.15 G
1.985(atches de\214ned by the compspec are generated, directory name)
--4.485 F .583(completion is attempted and an)224 420 R 3.084(ym)-.15 G
+-4.485 F .584(completion is attempted and an)224 432 R 3.084(ym)-.15 G
.584(atches are added to the results of the other)-3.084 F(actions.)224
-432 Q F1<ad41>144 444 Q F2(action)2.5 E F0(The)184 456 Q F2(action)2.5 E
+444 Q F1<ad41>144 456 Q F2(action)2.5 E F0(The)184 468 Q F2(action)2.5 E
F0(may be one of the follo)2.5 E
(wing to generate a list of possible completions:)-.25 E F1(alias)184
-468 Q F0(Alias names.)20.55 E(May also be speci\214ed as)5 E F1<ad61>2.5
-E F0(.)A F1(arrayv)184 480 Q(ar)-.1 E F0(Array v)224 492 Q
-(ariable names.)-.25 E F1 4.7(binding Readline)184 504 R F0 -.1(ke)2.5 G
-2.5(yb)-.05 G(inding names.)-2.5 E F1 -.2(bu)184 516 S(iltin).2 E F0
+480 Q F0(Alias names.)20.55 E(May also be speci\214ed as)5 E F1<ad61>2.5
+E F0(.)A F1(arrayv)184 492 Q(ar)-.1 E F0(Array v)224 504 Q
+(ariable names.)-.25 E F1 4.7(binding Readline)184 516 R F0 -.1(ke)2.5 G
+2.5(yb)-.05 G(inding names.)-2.5 E F1 -.2(bu)184 528 S(iltin).2 E F0
(Names of shell b)11.85 E(uiltin commands.)-.2 E
-(May also be speci\214ed as)5 E F1<ad62>2.5 E F0(.)A F1(command)184 528
-Q F0(Command names.)224 540 Q(May also be speci\214ed as)5 E F1<ad63>2.5
-E F0(.)A F1(dir)184 552 Q(ectory)-.18 E F0(Directory names.)224 564 Q
-(May also be speci\214ed as)5 E F1<ad64>2.5 E F0(.)A F1(disabled)184 576
-Q F0(Names of disabled shell b)224 588 Q(uiltins.)-.2 E F1(enabled)184
-600 Q F0(Names of enabled shell b)6.66 E(uiltins.)-.2 E F1(export)184
-612 Q F0(Names of e)12.23 E(xported shell v)-.15 E 2.5(ariables. May)
+(May also be speci\214ed as)5 E F1<ad62>2.5 E F0(.)A F1(command)184 540
+Q F0(Command names.)224 552 Q(May also be speci\214ed as)5 E F1<ad63>2.5
+E F0(.)A F1(dir)184 564 Q(ectory)-.18 E F0(Directory names.)224 576 Q
+(May also be speci\214ed as)5 E F1<ad64>2.5 E F0(.)A F1(disabled)184 588
+Q F0(Names of disabled shell b)224 600 Q(uiltins.)-.2 E F1(enabled)184
+612 Q F0(Names of enabled shell b)6.66 E(uiltins.)-.2 E F1(export)184
+624 Q F0(Names of e)12.23 E(xported shell v)-.15 E 2.5(ariables. May)
-.25 F(also be speci\214ed as)2.5 E F1<ad65>2.5 E F0(.)A F1(\214le)184
-624 Q F0(File names.)27.22 E(May also be speci\214ed as)5 E F1<ad66>2.5
-E F0(.)A F1(function)184 636 Q F0(Names of shell functions.)224 648 Q F1
-(gr)184 660 Q(oup)-.18 E F0(Group names.)14.62 E
+636 Q F0(File names.)27.22 E(May also be speci\214ed as)5 E F1<ad66>2.5
+E F0(.)A F1(function)184 648 Q F0(Names of shell functions.)224 660 Q F1
+(gr)184 672 Q(oup)-.18 E F0(Group names.)14.62 E
(May also be speci\214ed as)5 E F1<ad67>2.5 E F0(.)A F1(helptopic)184
-672 Q F0(Help topics as accepted by the)224 684 Q F1(help)2.5 E F0 -.2
-(bu)2.5 G(iltin.).2 E F1(hostname)184 696 Q F0(Hostnames, as tak)224 708
-Q(en from the \214le speci\214ed by the)-.1 E/F3 9/Times-Bold@0 SF
-(HOSTFILE)2.5 E F0(shell v)2.25 E(ariable.)-.25 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(54)187.615 E 0 Cg EP
+684 Q F0(Help topics as accepted by the)224 696 Q F1(help)2.5 E F0 -.2
+(bu)2.5 G(iltin.).2 E(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E
+(54)190.395 E 0 Cg EP
%%Page: 55 55
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
--.35 E/F1 10/Times-Bold@0 SF(job)184 84 Q F0
+-.35 E/F1 10/Times-Bold@0 SF(hostname)184 84 Q F0(Hostnames, as tak)224
+96 Q(en from the \214le speci\214ed by the)-.1 E/F2 9/Times-Bold@0 SF
+(HOSTFILE)2.5 E F0(shell v)2.25 E(ariable.)-.25 E F1(job)184 108 Q F0
(Job names, if job control is acti)26.11 E -.15(ve)-.25 G 5(.M).15 G
-(ay also be speci\214ed as)-5 E F1<ad6a>2.5 E F0(.)A F1 -.1(ke)184 96 S
-(yw).1 E(ord)-.1 E F0(Shell reserv)224 108 Q(ed w)-.15 E 2.5(ords. May)
+(ay also be speci\214ed as)-5 E F1<ad6a>2.5 E F0(.)A F1 -.1(ke)184 120 S
+(yw).1 E(ord)-.1 E F0(Shell reserv)224 132 Q(ed w)-.15 E 2.5(ords. May)
-.1 F(also be speci\214ed as)2.5 E F1<ad6b>2.5 E F0(.)A F1(running)184
-120 Q F0(Names of running jobs, if job control is acti)5.54 E -.15(ve)
--.25 G(.).15 E F1(ser)184 132 Q(vice)-.1 E F0(Service names.)10.67 E
-(May also be speci\214ed as)5 E F1<ad73>2.5 E F0(.)A F1(setopt)184 144 Q
+144 Q F0(Names of running jobs, if job control is acti)5.54 E -.15(ve)
+-.25 G(.).15 E F1(ser)184 156 Q(vice)-.1 E F0(Service names.)10.67 E
+(May also be speci\214ed as)5 E F1<ad73>2.5 E F0(.)A F1(setopt)184 168 Q
F0 -1.11(Va)14.45 G(lid ar)1.11 E(guments for the)-.18 E F1<ad6f>2.5 E
F0(option to the)2.5 E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1
-(shopt)184 156 Q F0(Shell option names as accepted by the)16.66 E F1
-(shopt)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1(signal)184 168 Q F0
-(Signal names.)14.99 E F1(stopped)184 180 Q F0
+(shopt)184 180 Q F0(Shell option names as accepted by the)16.66 E F1
+(shopt)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1(signal)184 192 Q F0
+(Signal names.)14.99 E F1(stopped)184 204 Q F0
(Names of stopped jobs, if job control is acti)6.66 E -.15(ve)-.25 G(.)
-.15 E F1(user)184 192 Q F0(User names.)21.67 E
-(May also be speci\214ed as)5 E F1<ad75>2.5 E F0(.)A F1 -.1(va)184 204 S
+.15 E F1(user)184 216 Q F0(User names.)21.67 E
+(May also be speci\214ed as)5 E F1<ad75>2.5 E F0(.)A F1 -.1(va)184 228 S
(riable).1 E F0(Names of all shell v)5.1 E 2.5(ariables. May)-.25 F
-(also be speci\214ed as)2.5 E F1<ad76>2.5 E F0(.)A F1<ad43>144 216 Q/F2
-10/Times-Italic@0 SF(command)2.5 E(command)184 228 Q F0 1.056(is e)3.556
-F -.15(xe)-.15 G 1.056(cuted in a subshell en).15 F 1.056
+(also be speci\214ed as)2.5 E F1<ad76>2.5 E F0(.)A F1<ad43>144 240 Q/F3
+10/Times-Italic@0 SF(command)2.5 E(command)184 252 Q F0 1.055(is e)3.555
+F -.15(xe)-.15 G 1.055(cuted in a subshell en).15 F 1.056
(vironment, and its output is used as the possible)-.4 F(completions.)
-184 240 Q F1<ad46>144 252 Q F2(function)2.5 E F0 .113
-(The shell function)184 264 R F2(function)2.614 E F0 .114(is e)2.614 F
+184 264 Q F1<ad46>144 276 Q F3(function)2.5 E F0 .114
+(The shell function)184 288 R F3(function)2.614 E F0 .114(is e)2.614 F
-.15(xe)-.15 G .114(cuted in the current shell en).15 F 2.614
-(vironment. When)-.4 F .114(the func-)2.614 F .817(tion is e)184 276 R
--.15(xe)-.15 G .817(cuted, the \214rst ar).15 F .817(gument \()-.18 F F1
-($1)A F0 3.316(\)i)C 3.316(st)-3.316 G .816
+(vironment. When)-.4 F .113(the func-)2.613 F .816(tion is e)184 300 R
+-.15(xe)-.15 G .816(cuted, the \214rst ar).15 F .816(gument \()-.18 F F1
+($1)A F0 3.316(\)i)C 3.316(st)-3.316 G .817
(he name of the command whose ar)-3.316 F(guments)-.18 E 1.407
-(are being completed, the second ar)184 288 R 1.407(gument \()-.18 F F1
+(are being completed, the second ar)184 312 R 1.407(gument \()-.18 F F1
($2)A F0 3.907(\)i)C 3.907(st)-3.907 G 1.407(he w)-3.907 F 1.407
-(ord being completed, and the)-.1 F .104(third ar)184 300 R .104
-(gument \()-.18 F F1($3)A F0 2.604(\)i)C 2.604(st)-2.604 G .104(he w)
--2.604 F .104(ord preceding the w)-.1 F .103
-(ord being completed on the current com-)-.1 F .101(mand line.)184 312 R
-.101(When it \214nishes, the possible completions are retrie)5.101 F
--.15(ve)-.25 G 2.602(df).15 G .102(rom the v)-2.602 F .102(alue of the)
--.25 F/F3 9/Times-Bold@0 SF(COMPREPL)184 324 Q(Y)-.828 E F0(array v)2.25
-E(ariable.)-.25 E F1<ad47>144 336 Q F2(globpat)2.5 E F0 1.008
-(The pathname e)184 348 R 1.008(xpansion pattern)-.15 F F2(globpat)3.507
-E F0 1.007(is e)3.507 F 1.007(xpanded to generate the possible comple-)
--.15 F(tions.)184 360 Q F1<ad50>144 372 Q F2(pr)2.5 E(e\214x)-.37 E(pr)
-184 384 Q(e\214x)-.37 E F0 .534(is added at the be)3.034 F .534
+(ord being completed, and the)-.1 F .103(third ar)184 324 R .103
+(gument \()-.18 F F1($3)A F0 2.603(\)i)C 2.603(st)-2.603 G .103(he w)
+-2.603 F .104(ord preceding the w)-.1 F .104
+(ord being completed on the current com-)-.1 F .102(mand line.)184 336 R
+.102(When it \214nishes, the possible completions are retrie)5.102 F
+-.15(ve)-.25 G 2.601(df).15 G .101(rom the v)-2.601 F .101(alue of the)
+-.25 F F2(COMPREPL)184 348 Q(Y)-.828 E F0(array v)2.25 E(ariable.)-.25 E
+F1<ad47>144 360 Q F3(globpat)2.5 E F0 1.007(The pathname e)184 372 R
+1.007(xpansion pattern)-.15 F F3(globpat)3.507 E F0 1.007(is e)3.507 F
+1.008(xpanded to generate the possible comple-)-.15 F(tions.)184 384 Q
+F1<ad50>144 396 Q F3(pr)2.5 E(e\214x)-.37 E(pr)184 408 Q(e\214x)-.37 E
+F0 .535(is added at the be)3.035 F .534
(ginning of each possible completion after all other options ha)-.15 F
--.15(ve)-.2 G(been applied.)184 396 Q F1<ad53>144 408 Q F2(suf)2.5 E
+-.15(ve)-.2 G(been applied.)184 420 Q F1<ad53>144 432 Q F3(suf)2.5 E
2.81(\214x suf)-.18 F<8c78>-.18 E F0
(is appended to each possible completion after all other options ha)2.5
-E .3 -.15(ve b)-.2 H(een applied.).15 E F1<ad57>144 420 Q F2(wor)2.5 E
-(dlist)-.37 E F0(The)184 432 Q F2(wor)3.64 E(dlist)-.37 E F0 1.14
-(is split using the characters in the)3.64 F F3(IFS)3.64 E F0 1.139
-(special v)3.39 F 1.139(ariable as delimiters, and)-.25 F 2.007
-(each resultant w)184 444 R 2.007(ord is e)-.1 F 4.507(xpanded. The)-.15
-F 2.008(possible completions are the members of the)4.507 F
-(resultant list which match the w)184 456 Q(ord being completed.)-.1 E
-F1<ad58>144 468 Q F2(\214lterpat)2.5 E(\214lterpat)184 480 Q F0 .456
-(is a pattern as used for pathname e)2.956 F 2.956(xpansion. It)-.15 F
-.455(is applied to the list of possible)2.956 F 1.596
-(completions generated by the preceding options and ar)184 492 R 1.596
-(guments, and each completion)-.18 F(matching)184 504 Q F2(\214lterpat)
-3.205 E F0 .705(is remo)3.205 F -.15(ve)-.15 G 3.205(df).15 G .704
-(rom the list.)-3.205 F 3.204(Al)5.704 G(eading)-3.204 E F1(!)3.204 E F0
-(in)3.204 E F2(\214lterpat)3.204 E F0(ne)3.204 E -.05(ga)-.15 G .704
-(tes the pattern;).05 F(in this case, an)184 516 Q 2.5(yc)-.15 G
-(ompletion not matching)-2.5 E F2(\214lterpat)2.5 E F0(is remo)2.5 E
--.15(ve)-.15 G(d.).15 E .466(The return v)144 532.8 R .466
+E .3 -.15(ve b)-.2 H(een applied.).15 E F1<ad57>144 444 Q F3(wor)2.5 E
+(dlist)-.37 E F0(The)184 456 Q F3(wor)3.639 E(dlist)-.37 E F0 1.14
+(is split using the characters in the)3.639 F F2(IFS)3.64 E F0 1.14
+(special v)3.39 F 1.14(ariable as delimiters, and)-.25 F 2.008
+(each resultant w)184 468 R 2.008(ord is e)-.1 F 4.508(xpanded. The)-.15
+F 2.007(possible completions are the members of the)4.508 F
+(resultant list which match the w)184 480 Q(ord being completed.)-.1 E
+F1<ad58>144 492 Q F3(\214lterpat)2.5 E(\214lterpat)184 504 Q F0 .455
+(is a pattern as used for pathname e)2.955 F 2.956(xpansion. It)-.15 F
+.456(is applied to the list of possible)2.956 F 1.596
+(completions generated by the preceding options and ar)184 516 R 1.596
+(guments, and each completion)-.18 F(matching)184 528 Q F3(\214lterpat)
+3.204 E F0 .704(is remo)3.204 F -.15(ve)-.15 G 3.204(df).15 G .704
+(rom the list.)-3.204 F 3.204(Al)5.704 G(eading)-3.204 E F1(!)3.204 E F0
+(in)3.204 E F3(\214lterpat)3.205 E F0(ne)3.205 E -.05(ga)-.15 G .705
+(tes the pattern;).05 F(in this case, an)184 540 Q 2.5(yc)-.15 G
+(ompletion not matching)-2.5 E F3(\214lterpat)2.5 E F0(is remo)2.5 E
+-.15(ve)-.15 G(d.).15 E .467(The return v)144 556.8 R .467
(alue is true unless an in)-.25 F -.25(va)-.4 G .466
-(lid option is supplied, an option other than).25 F F1<ad70>2.967 E F0
-(or)2.967 E F1<ad72>2.967 E F0 .467(is sup-)2.967 F 1.362
-(plied without a)144 544.8 R F2(name)3.862 E F0(ar)3.862 E 1.361
-(gument, an attempt is made to remo)-.18 F 1.661 -.15(ve a c)-.15 H
-1.361(ompletion speci\214cation for a).15 F F2(name)144 556.8 Q F0
+(lid option is supplied, an option other than).25 F F1<ad70>2.966 E F0
+(or)2.966 E F1<ad72>2.966 E F0 .466(is sup-)2.966 F 1.361
+(plied without a)144 568.8 R F3(name)3.861 E F0(ar)3.861 E 1.361
+(gument, an attempt is made to remo)-.18 F 1.662 -.15(ve a c)-.15 H
+1.362(ompletion speci\214cation for a).15 F F3(name)144 580.8 Q F0
(for which no speci\214cation e)2.5 E
(xists, or an error occurs adding a completion speci\214cation.)-.15 E
-F1(compopt)108 573.6 Q F0([)2.5 E F1<ad6f>A F2(option)2.5 E F0 2.5(][)C
-F1(\255DE)-2.5 E F0 2.5(][)C F1(+o)-2.5 E F2(option)2.5 E F0 2.5(][)C F2
-(name)-2.5 E F0(])A .447(Modify completion options for each)144 585.6 R
-F2(name)2.947 E F0 .447(according to the)2.947 F F2(option)2.947 E F0
-.447(s, or for the currently-e)B -.15(xe)-.15 G(cuting).15 E .726
-(completion if no)144 597.6 R F2(name)3.226 E F0 3.226(sa)C .726
-(re supplied.)-3.226 F .725(If no)5.725 F F2(option)3.225 E F0 3.225(sa)
-C .725(re gi)-3.225 F -.15(ve)-.25 G .725
-(n, display the completion options for).15 F(each)144 609.6 Q F2(name)
-3.223 E F0 .723(or the current completion.)3.223 F .724(The possible v)
-5.724 F .724(alues of)-.25 F F2(option)3.224 E F0 .724(are those v)3.224
-F .724(alid for the)-.25 F F1(com-)3.224 E(plete)144 621.6 Q F0 -.2(bu)
-2.798 G .298(iltin described abo).2 F -.15(ve)-.15 G 5.297(.T).15 G(he)
+F1(compopt)108 597.6 Q F0([)2.5 E F1<ad6f>A F3(option)2.5 E F0 2.5(][)C
+F1(\255DE)-2.5 E F0 2.5(][)C F1(+o)-2.5 E F3(option)2.5 E F0 2.5(][)C F3
+(name)-2.5 E F0(])A .447(Modify completion options for each)144 609.6 R
+F3(name)2.947 E F0 .447(according to the)2.947 F F3(option)2.947 E F0
+.447(s, or for the currently-e)B -.15(xe)-.15 G(cuting).15 E .725
+(completion if no)144 621.6 R F3(name)3.225 E F0 3.225(sa)C .725
+(re supplied.)-3.225 F .725(If no)5.725 F F3(option)3.225 E F0 3.225(sa)
+C .725(re gi)-3.225 F -.15(ve)-.25 G .726
+(n, display the completion options for).15 F(each)144 633.6 Q F3(name)
+3.224 E F0 .724(or the current completion.)3.224 F .724(The possible v)
+5.724 F .724(alues of)-.25 F F3(option)3.224 E F0 .724(are those v)3.224
+F .723(alid for the)-.25 F F1(com-)3.223 E(plete)144 645.6 Q F0 -.2(bu)
+2.797 G .297(iltin described abo).2 F -.15(ve)-.15 G 5.297(.T).15 G(he)
-5.297 E F1<ad44>2.797 E F0 .297
(option indicates that the remaining options should apply to)2.797 F
-1.227(the `)144 633.6 R(`def)-.74 E(ault')-.1 E 3.727('c)-.74 G 1.228(o\
+1.228(the `)144 657.6 R(`def)-.74 E(ault')-.1 E 3.728('c)-.74 G 1.228(o\
mmand completion; that is, completion attempted on a command for which \
-no)-3.727 F 2.178(completion has pre)144 645.6 R 2.178
-(viously been de\214ned.)-.25 F(The)7.178 E F1<ad45>4.678 E F0 2.177
-(option indicates that the remaining options)4.677 F(should apply to `)
-144 657.6 Q(`empty')-.74 E 2.5('c)-.74 G
+no)-3.728 F 2.177(completion has pre)144 669.6 R 2.177
+(viously been de\214ned.)-.25 F(The)7.177 E F1<ad45>4.677 E F0 2.178
+(option indicates that the remaining options)4.678 F(should apply to `)
+144 681.6 Q(`empty')-.74 E 2.5('c)-.74 G
(ommand completion; that is, completion attempted on a blank line.)-2.5
-E 1.387(The return v)144 681.6 R 1.387(alue is true unless an in)-.25 F
--.25(va)-.4 G 1.388
+E 1.388(The return v)144 705.6 R 1.388(alue is true unless an in)-.25 F
+-.25(va)-.4 G 1.387
(lid option is supplied, an attempt is made to modify the).25 F
-(options for a)144 693.6 Q F2(name)2.5 E F0
+(options for a)144 717.6 Q F3(name)2.5 E F0
(for which no completion speci\214cation e)2.5 E
(xists, or an output error occurs.)-.15 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(55)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(55)190.395 E 0 Cg EP
%%Page: 56 56
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
-.35 E/F1 10/Times-Bold@0 SF(continue)108 84 Q F0([)2.5 E/F2 10
-/Times-Italic@0 SF(n)A F0(])A 1.754(Resume the ne)144 96 R 1.754
+/Times-Italic@0 SF(n)A F0(])A 1.753(Resume the ne)144 96 R 1.753
(xt iteration of the enclosing)-.15 F F1 -.25(fo)4.254 G(r).25 E F0(,)A
F1(while)4.254 E F0(,)A F1(until)4.254 E F0 4.254(,o)C(r)-4.254 E F1
-(select)4.254 E F0 4.253(loop. If)4.254 F F2(n)4.613 E F0 1.753
-(is speci\214ed,)4.493 F 1.208(resume at the)144 108 R F2(n)3.709 E F0
+(select)4.254 E F0 4.254(loop. If)4.254 F F2(n)4.614 E F0 1.754
+(is speci\214ed,)4.494 F 1.209(resume at the)144 108 R F2(n)3.709 E F0
1.209(th enclosing loop.)B F2(n)6.569 E F0 1.209(must be)3.949 F/F3 10
/Symbol SF<b3>3.709 E F0 3.709(1. If)3.709 F F2(n)4.069 E F0 1.209
-(is greater than the number of enclosing)3.949 F .514
+(is greater than the number of enclosing)3.949 F .513
(loops, the last enclosing loop \(the `)144 120 R(`top-le)-.74 E -.15
-(ve)-.25 G(l').15 E 3.014('l)-.74 G .514(oop\) is resumed.)-3.014 F .513
-(The return v)5.513 F .513(alue is 0 unless)-.25 F F2(n)3.013 E F0(is)
-3.013 E(not greater than or equal to 1.)144 132 Q F1(declar)108 148.8 Q
+(ve)-.25 G(l').15 E 3.013('l)-.74 G .513(oop\) is resumed.)-3.013 F .514
+(The return v)5.514 F .514(alue is 0 unless)-.25 F F2(n)3.014 E F0(is)
+3.014 E(not greater than or equal to 1.)144 132 Q F1(declar)108 148.8 Q
(e)-.18 E F0([)2.5 E F1(\255aAfFgilnrtux)A F0 2.5(][)C F1<ad70>-2.5 E F0
2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0 2.5(].)C(..])-2.5 E F1
(typeset)108 160.8 Q F0([)2.5 E F1(\255aAfFgilnrtux)A F0 2.5(][)C F1
<ad70>-2.5 E F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0 2.5(].)C
-(..])-2.5 E 1.264(Declare v)144 172.8 R 1.264(ariables and/or gi)-.25 F
-1.564 -.15(ve t)-.25 H 1.264(hem attrib).15 F 3.765(utes. If)-.2 F(no)
+(..])-2.5 E 1.265(Declare v)144 172.8 R 1.265(ariables and/or gi)-.25 F
+1.565 -.15(ve t)-.25 H 1.265(hem attrib).15 F 3.765(utes. If)-.2 F(no)
3.765 E F2(name)3.765 E F0 3.765(sa)C 1.265(re gi)-3.765 F -.15(ve)-.25
-G 3.765(nt).15 G 1.265(hen display the v)-3.765 F 1.265(alues of)-.25 F
--.25(va)144 184.8 S 3.483(riables. The).25 F F1<ad70>3.483 E F0 .983
-(option will display the attrib)3.483 F .983(utes and v)-.2 F .982
-(alues of each)-.25 F F2(name)3.482 E F0 5.982(.W).18 G(hen)-5.982 E F1
-<ad70>3.482 E F0 .982(is used)3.482 F(with)144 196.8 Q F2(name)2.774 E
-F0(ar)2.774 E .274(guments, additional options, other than)-.18 F F1
-<ad66>2.775 E F0(and)2.775 E F1<ad46>2.775 E F0 2.775(,a)C .275
-(re ignored.)-2.775 F(When)5.275 E F1<ad70>2.775 E F0 .275(is supplied)
-2.775 F(without)144 208.8 Q F2(name)4.814 E F0(ar)4.814 E 2.314
-(guments, it will display the attrib)-.18 F 2.314(utes and v)-.2 F 2.313
-(alues of all v)-.25 F 2.313(ariables ha)-.25 F 2.313(ving the)-.2 F
-(attrib)144 220.8 Q 1.181(utes speci\214ed by the additional options.)
--.2 F 1.182(If no other options are supplied with)6.181 F F1<ad70>3.682
-E F0(,)A F1(declar)3.682 E(e)-.18 E F0 .62(will display the attrib)144
+G 3.764(nt).15 G 1.264(hen display the v)-3.764 F 1.264(alues of)-.25 F
+-.25(va)144 184.8 S 3.482(riables. The).25 F F1<ad70>3.482 E F0 .982
+(option will display the attrib)3.482 F .982(utes and v)-.2 F .983
+(alues of each)-.25 F F2(name)3.483 E F0 5.983(.W).18 G(hen)-5.983 E F1
+<ad70>3.483 E F0 .983(is used)3.483 F(with)144 196.8 Q F2(name)2.775 E
+F0(ar)2.775 E .275(guments, additional options, other than)-.18 F F1
+<ad66>2.775 E F0(and)2.775 E F1<ad46>2.775 E F0 2.775(,a)C .274
+(re ignored.)-2.775 F(When)5.274 E F1<ad70>2.774 E F0 .274(is supplied)
+2.774 F(without)144 208.8 Q F2(name)4.813 E F0(ar)4.813 E 2.313
+(guments, it will display the attrib)-.18 F 2.314(utes and v)-.2 F 2.314
+(alues of all v)-.25 F 2.314(ariables ha)-.25 F 2.314(ving the)-.2 F
+(attrib)144 220.8 Q 1.182(utes speci\214ed by the additional options.)
+-.2 F 1.181(If no other options are supplied with)6.182 F F1<ad70>3.681
+E F0(,)A F1(declar)3.681 E(e)-.18 E F0 .62(will display the attrib)144
232.8 R .62(utes and v)-.2 F .62(alues of all shell v)-.25 F 3.12
(ariables. The)-.25 F F1<ad66>3.12 E F0 .62
-(option will restrict the display)3.12 F 1.29(to shell functions.)144
-244.8 R(The)6.29 E F1<ad46>3.79 E F0 1.291(option inhibits the display \
-of function de\214nitions; only the function)3.791 F .948
+(option will restrict the display)3.12 F 1.291(to shell functions.)144
+244.8 R(The)6.291 E F1<ad46>3.791 E F0 1.291(option inhibits the displa\
+y of function de\214nitions; only the function)3.791 F .948
(name and attrib)144 256.8 R .948(utes are printed.)-.2 F .948(If the)
5.948 F F1(extdeb)3.448 E(ug)-.2 E F0 .948
(shell option is enabled using)3.448 F F1(shopt)3.448 E F0 3.448(,t)C
.948(he source)-3.448 F 1.342(\214le name and line number where the fun\
ction is de\214ned are displayed as well.)144 268.8 R(The)6.342 E F1
-<ad46>3.842 E F0(option)3.842 E(implies)144 280.8 Q F1<ad66>3.892 E F0
-6.392(.T)C(he)-6.392 E F1<ad67>3.892 E F0 1.391(option forces v)3.892 F
+<ad46>3.841 E F0(option)3.841 E(implies)144 280.8 Q F1<ad66>3.891 E F0
+6.391(.T)C(he)-6.391 E F1<ad67>3.891 E F0 1.391(option forces v)3.891 F
1.391(ariables to be created or modi\214ed at the global scope, e)-.25 F
--.15(ve)-.25 G(n).15 E(when)144 292.8 Q F1(declar)4.382 E(e)-.18 E F0
-1.882(is e)4.382 F -.15(xe)-.15 G 1.882(cuted in a shell function.).15 F
-1.883(It is ignored in all other cases.)6.882 F 1.883(The follo)6.883 F
-(wing)-.25 E .794(options can be used to restrict output to v)144 304.8
-R .794(ariables with the speci\214ed attrib)-.25 F .793(ute or to gi)-.2
-F 1.093 -.15(ve v)-.25 H(ariables)-.1 E(attrib)144 316.8 Q(utes:)-.2 E
+-.15(ve)-.25 G(n).15 E(when)144 292.8 Q F1(declar)4.383 E(e)-.18 E F0
+1.883(is e)4.383 F -.15(xe)-.15 G 1.883(cuted in a shell function.).15 F
+1.882(It is ignored in all other cases.)6.883 F 1.882(The follo)6.882 F
+(wing)-.25 E .793(options can be used to restrict output to v)144 304.8
+R .794(ariables with the speci\214ed attrib)-.25 F .794(ute or to gi)-.2
+F 1.094 -.15(ve v)-.25 H(ariables)-.1 E(attrib)144 316.8 Q(utes:)-.2 E
F1<ad61>144 328.8 Q F0(Each)25.3 E F2(name)2.5 E F0(is an inde)2.5 E
-.15(xe)-.15 G 2.5(da).15 G(rray v)-2.5 E(ariable \(see)-.25 E F1
(Arrays)2.5 E F0(abo)2.5 E -.15(ve)-.15 G(\).).15 E F1<ad41>144 340.8 Q
F0(Each)23.08 E F2(name)2.5 E F0(is an associati)2.5 E .3 -.15(ve a)-.25
H(rray v).15 E(ariable \(see)-.25 E F1(Arrays)2.5 E F0(abo)2.5 E -.15
(ve)-.15 G(\).).15 E F1<ad66>144 352.8 Q F0(Use function names only)
-26.97 E(.)-.65 E F1<ad69>144 364.8 Q F0 .557(The v)27.52 F .558
+26.97 E(.)-.65 E F1<ad69>144 364.8 Q F0 .558(The v)27.52 F .558
(ariable is treated as an inte)-.25 F .558(ger; arithmetic e)-.15 F -.25
-(va)-.25 G .558(luation \(see).25 F/F4 9/Times-Bold@0 SF .558
+(va)-.25 G .558(luation \(see).25 F/F4 9/Times-Bold@0 SF .557
(ARITHMETIC EV)3.058 F(ALU)-1.215 E(A-)-.54 E(TION)180 376.8 Q F0(abo)
2.25 E -.15(ve)-.15 G 2.5(\)i).15 G 2.5(sp)-2.5 G(erformed when the v)
-2.5 E(ariable is assigned a v)-.25 E(alue.)-.25 E F1<ad6c>144 388.8 Q
-F0 .91(When the v)27.52 F .909(ariable is assigned a v)-.25 F .909
+F0 .909(When the v)27.52 F .909(ariable is assigned a v)-.25 F .909
(alue, all upper)-.25 F .909(-case characters are con)-.2 F -.15(ve)-.4
-G .909(rted to lo).15 F(wer)-.25 E(-)-.2 E 2.5(case. The)180 400.8 R
+G .91(rted to lo).15 F(wer)-.25 E(-)-.2 E 2.5(case. The)180 400.8 R
(upper)2.5 E(-case attrib)-.2 E(ute is disabled.)-.2 E F1<ad6e>144 412.8
-Q F0(Gi)24.74 E 1.619 -.15(ve e)-.25 H(ach).15 E F2(name)3.819 E F0(the)
-3.819 E F2(namer)3.819 E(ef)-.37 E F0(attrib)3.819 E 1.319
+Q F0(Gi)24.74 E 1.62 -.15(ve e)-.25 H(ach).15 E F2(name)3.82 E F0(the)
+3.82 E F2(namer)3.819 E(ef)-.37 E F0(attrib)3.819 E 1.319
(ute, making it a name reference to another v)-.2 F(ariable.)-.25 E
-1.033(That other v)180 424.8 R 1.033(ariable is de\214ned by the v)-.25
+1.032(That other v)180 424.8 R 1.033(ariable is de\214ned by the v)-.25
F 1.033(alue of)-.25 F F2(name)3.533 E F0 6.033(.A)C 1.033
-(ll references and assignments to)-6.033 F F2(name)180 436.8 Q F0 4.032
-(,e)C 1.532(xcept for changing the)-4.182 F F1<ad6e>4.032 E F0(attrib)
-4.032 E 1.532(ute itself, are performed on the v)-.2 F 1.533
+(ll references and assignments to)-6.033 F F2(name)180 436.8 Q F0 4.033
+(,e)C 1.533(xcept for changing the)-4.183 F F1<ad6e>4.032 E F0(attrib)
+4.032 E 1.532(ute itself, are performed on the v)-.2 F 1.532
(ariable refer)-.25 F(-)-.2 E(enced by)180 448.8 Q F2(name)2.5 E F0 1.1
-.55('s v)D 2.5(alue. The).3 F F1<ad6e>2.5 E F0(attrib)2.5 E
(ute cannot be applied to array v)-.2 E(ariables.)-.25 E F1<ad72>144
-460.8 Q F0(Mak)25.86 E(e)-.1 E F2(name)5.047 E F0 5.047(sr)C(eadonly)
--5.047 E 7.547(.T)-.65 G 2.546(hese names cannot then be assigned v)
--7.547 F 2.546(alues by subsequent)-.25 F
+460.8 Q F0(Mak)25.86 E(e)-.1 E F2(name)5.046 E F0 5.046(sr)C(eadonly)
+-5.046 E 7.546(.T)-.65 G 2.546(hese names cannot then be assigned v)
+-7.546 F 2.547(alues by subsequent)-.25 F
(assignment statements or unset.)180 472.8 Q F1<ad74>144 484.8 Q F0(Gi)
-26.97 E .729 -.15(ve e)-.25 H(ach).15 E F2(name)2.929 E F0(the)2.929 E
-F2(tr)2.929 E(ace)-.15 E F0(attrib)2.929 E 2.929(ute. T)-.2 F .429
-(raced functions inherit the)-.35 F F1(DEB)2.929 E(UG)-.1 E F0(and)2.93
-E F1(RETURN)2.93 E F0(traps from the calling shell.)180 496.8 Q
+26.97 E .73 -.15(ve e)-.25 H(ach).15 E F2(name)2.93 E F0(the)2.929 E F2
+(tr)2.929 E(ace)-.15 E F0(attrib)2.929 E 2.929(ute. T)-.2 F .429
+(raced functions inherit the)-.35 F F1(DEB)2.929 E(UG)-.1 E F0(and)2.929
+E F1(RETURN)2.929 E F0(traps from the calling shell.)180 496.8 Q
(The trace attrib)5 E(ute has no special meaning for v)-.2 E(ariables.)
--.25 E F1<ad75>144 508.8 Q F0 .91(When the v)24.74 F .909
+-.25 E F1<ad75>144 508.8 Q F0 .909(When the v)24.74 F .909
(ariable is assigned a v)-.25 F .909(alue, all lo)-.25 F(wer)-.25 E .909
-(-case characters are con)-.2 F -.15(ve)-.4 G .909(rted to upper).15 F
-(-)-.2 E 2.5(case. The)180 520.8 R(lo)2.5 E(wer)-.25 E(-case attrib)-.2
-E(ute is disabled.)-.2 E F1<ad78>144 532.8 Q F0(Mark)25.3 E F2(name)2.5
-E F0 2.5(sf)C(or e)-2.5 E(xport to subsequent commands via the en)-.15 E
-(vironment.)-.4 E .12(Using `+' instead of `\255' turns of)144 549.6 R
-2.62(ft)-.25 G .12(he attrib)-2.62 F .121(ute instead, with the e)-.2 F
-.121(xceptions that)-.15 F F1(+a)2.621 E F0 .121(may not be used)2.621 F
-.645(to destro)144 561.6 R 3.145(ya)-.1 G 3.145(na)-3.145 G .645(rray v)
--3.145 F .645(ariable and)-.25 F F1(+r)3.145 E F0 .645(will not remo)
-3.145 F .945 -.15(ve t)-.15 H .645(he readonly attrib).15 F 3.144
-(ute. When)-.2 F .644(used in a func-)3.144 F(tion,)144 573.6 Q F1
+(-case characters are con)-.2 F -.15(ve)-.4 G .91(rted to upper).15 F(-)
+-.2 E 2.5(case. The)180 520.8 R(lo)2.5 E(wer)-.25 E(-case attrib)-.2 E
+(ute is disabled.)-.2 E F1<ad78>144 532.8 Q F0(Mark)25.3 E F2(name)2.5 E
+F0 2.5(sf)C(or e)-2.5 E(xport to subsequent commands via the en)-.15 E
+(vironment.)-.4 E .121(Using `+' instead of `\255' turns of)144 549.6 R
+2.621(ft)-.25 G .121(he attrib)-2.621 F .121(ute instead, with the e)-.2
+F .12(xceptions that)-.15 F F1(+a)2.62 E F0 .12(may not be used)2.62 F
+.644(to destro)144 561.6 R 3.144(ya)-.1 G 3.144(na)-3.144 G .644(rray v)
+-3.144 F .644(ariable and)-.25 F F1(+r)3.145 E F0 .645(will not remo)
+3.145 F .945 -.15(ve t)-.15 H .645(he readonly attrib).15 F 3.145
+(ute. When)-.2 F .645(used in a func-)3.145 F(tion,)144 573.6 Q F1
(declar)2.835 E(e)-.18 E F0(and)2.835 E F1(typeset)2.835 E F0(mak)2.835
E 2.835(ee)-.1 G(ach)-2.835 E F2(name)2.835 E F0 .335
(local, as with the)2.835 F F1(local)2.835 E F0 .335
-(command, unless the)2.835 F F1<ad67>2.835 E F0(option)2.835 E .134
-(is supplied.)144 585.6 R .134(If a v)5.134 F .134
+(command, unless the)2.835 F F1<ad67>2.835 E F0(option)2.835 E .133
+(is supplied.)144 585.6 R .133(If a v)5.133 F .133
(ariable name is follo)-.25 F .134(wed by =)-.25 F F2(value)A F0 2.634
-(,t)C .134(he v)-2.634 F .134(alue of the v)-.25 F .133
-(ariable is set to)-.25 F F2(value)2.633 E F0 5.133(.T)C(he)-5.133 E .8
-(return v)144 597.6 R .8(alue is 0 unless an in)-.25 F -.25(va)-.4 G
-.801
+(,t)C .134(he v)-2.634 F .134(alue of the v)-.25 F .134
+(ariable is set to)-.25 F F2(value)2.634 E F0 5.134(.T)C(he)-5.134 E
+.801(return v)144 597.6 R .801(alue is 0 unless an in)-.25 F -.25(va)-.4
+G .8
(lid option is encountered, an attempt is made to de\214ne a function)
-.25 F(using)144 609.6 Q/F5 10/Courier@0 SF 1.039(\255f foo=bar)3.539 F
-F0 3.539(,a)C 3.539(na)-3.539 G 1.038(ttempt is made to assign a v)
--3.539 F 1.038(alue to a readonly v)-.25 F 1.038(ariable, an attempt is)
+.25 F(using)144 609.6 Q/F5 10/Courier@0 SF 1.038(\255f foo=bar)3.538 F
+F0 3.538(,a)C 3.538(na)-3.538 G 1.038(ttempt is made to assign a v)
+-3.538 F 1.038(alue to a readonly v)-.25 F 1.039(ariable, an attempt is)
-.25 F .974(made to assign a v)144 621.6 R .974(alue to an array v)-.25
F .974(ariable without using the compound assignment syntax \(see)-.25 F
F1(Arrays)144 633.6 Q F0(abo)2.86 E -.15(ve)-.15 G .36(\), one of the)
.15 F F2(names)2.86 E F0 .36(is not a v)2.86 F .36(alid shell v)-.25 F
-.36(ariable name, an attempt is made to turn of)-.25 F(f)-.25 E .056
+.36(ariable name, an attempt is made to turn of)-.25 F(f)-.25 E .057
(readonly status for a readonly v)144 645.6 R .057
-(ariable, an attempt is made to turn of)-.25 F 2.557(fa)-.25 G .057
-(rray status for an array v)-2.557 F(ari-)-.25 E
+(ariable, an attempt is made to turn of)-.25 F 2.556(fa)-.25 G .056
+(rray status for an array v)-2.556 F(ari-)-.25 E
(able, or an attempt is made to display a non-e)144 657.6 Q
(xistent function with)-.15 E F1<ad66>2.5 E F0(.)A F1
(dirs [\255clpv] [+)108 674.4 Q F2(n)A F1 2.5(][)C<ad>-2.5 E F2(n)A F1
-(])A F0 -.4(Wi)144 686.4 S .329
+(])A F0 -.4(Wi)144 686.4 S .328
(thout options, displays the list of currently remembered directories.)
-.4 F .328(The def)5.328 F .328(ault display is on a)-.1 F 1.238
+.4 F .329(The def)5.329 F .329(ault display is on a)-.1 F 1.238
(single line with directory names separated by spaces.)144 698.4 R 1.238
(Directories are added to the list with the)6.238 F F1(pushd)144 710.4 Q
F0(command; the)2.5 E F1(popd)2.5 E F0(command remo)2.5 E -.15(ve)-.15 G
2.5(se).15 G(ntries from the list.)-2.5 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(56)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(56)190.395 E 0 Cg EP
%%Page: 57 57
%%BeginPageSetup
BP
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
-.35 E/F1 10/Times-Bold@0 SF<ad63>144 84 Q F0
(Clears the directory stack by deleting all of the entries.)25.86 E F1
-<ad6c>144 96 Q F0 .882(Produces a listing using full pathnames; the def)
-27.52 F .881(ault listing format uses a tilde to denote)-.1 F
+<ad6c>144 96 Q F0 .881(Produces a listing using full pathnames; the def)
+27.52 F .882(ault listing format uses a tilde to denote)-.1 F
(the home directory)180 108 Q(.)-.65 E F1<ad70>144 120 Q F0
(Print the directory stack with one entry per line.)24.74 E F1<ad76>144
-132 Q F0 .272(Print the directory stack with one entry per line, pre\
-\214xing each entry with its inde)25.3 F 2.773(xi)-.15 G 2.773(nt)-2.773
-G(he)-2.773 E(stack.)180 144 Q F1(+)144 156 Q/F2 10/Times-Italic@0 SF(n)
-A F0 1.565(Displays the)25.3 F F2(n)4.065 E F0 1.565
-(th entry counting from the left of the list sho)B 1.564(wn by)-.25 F F1
-(dirs)4.064 E F0 1.564(when in)4.064 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E
+132 Q F0 .273(Print the directory stack with one entry per line, pre\
+\214xing each entry with its inde)25.3 F 2.772(xi)-.15 G 2.772(nt)-2.772
+G(he)-2.772 E(stack.)180 144 Q F1(+)144 156 Q/F2 10/Times-Italic@0 SF(n)
+A F0 1.564(Displays the)25.3 F F2(n)4.064 E F0 1.565
+(th entry counting from the left of the list sho)B 1.565(wn by)-.25 F F1
+(dirs)4.065 E F0 1.565(when in)4.065 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E
(without options, starting with zero.)180 168 Q F1<ad>144 180 Q F2(n)A
F0 1.194(Displays the)25.3 F F2(n)3.694 E F0 1.194
(th entry counting from the right of the list sho)B 1.194(wn by)-.25 F
F1(dirs)3.694 E F0 1.194(when in)3.694 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E
-(without options, starting with zero.)180 192 Q .258(The return v)144
+(without options, starting with zero.)180 192 Q .257(The return v)144
208.8 R .258(alue is 0 unless an in)-.25 F -.25(va)-.4 G .258
(lid option is supplied or).25 F F2(n)2.758 E F0(inde)2.758 E -.15(xe)
-.15 G 2.758(sb).15 G -.15(ey)-2.758 G .258(ond the end of the direc-)
.15 F(tory stack.)144 220.8 Q F1(diso)108 237.6 Q(wn)-.1 E F0([)2.5 E F1
(\255ar)A F0 2.5(][)C F1<ad68>-2.5 E F0 2.5(][)C F2(jobspec)-2.5 E F0
-(...])2.5 E -.4(Wi)144 249.6 S .121(thout options, remo).4 F .422 -.15
+(...])2.5 E -.4(Wi)144 249.6 S .122(thout options, remo).4 F .422 -.15
(ve e)-.15 H(ach).15 E F2(jobspec)4.362 E F0 .122
(from the table of acti)2.932 F .422 -.15(ve j)-.25 H 2.622(obs. If).15
-F F2(jobspec)4.362 E F0 .122(is not present, and)2.932 F .096
+F F2(jobspec)4.362 E F0 .121(is not present, and)2.932 F .096
(neither the)144 261.6 R F1<ad61>2.596 E F0 .096(nor the)2.596 F F1
<ad72>2.596 E F0 .096(option is supplied, the)2.596 F F2(curr)2.596 E
.096(ent job)-.37 F F0 .096(is used.)2.596 F .096(If the)5.096 F F1
<ad68>2.596 E F0 .096(option is gi)2.596 F -.15(ve)-.25 G .096(n, each)
-.15 F F2(jobspec)144 273.6 Q F0 .672(is not remo)3.482 F -.15(ve)-.15 G
-3.172(df).15 G .672(rom the table, b)-3.172 F .672(ut is mark)-.2 F .672
-(ed so that)-.1 F/F3 9/Times-Bold@0 SF(SIGHUP)3.172 E F0 .673
+.15 F F2(jobspec)144 273.6 Q F0 .673(is not remo)3.483 F -.15(ve)-.15 G
+3.173(df).15 G .672(rom the table, b)-3.173 F .672(ut is mark)-.2 F .672
+(ed so that)-.1 F/F3 9/Times-Bold@0 SF(SIGHUP)3.172 E F0 .672
(is not sent to the job if the)2.922 F .962(shell recei)144 285.6 R -.15
(ve)-.25 G 3.462(sa).15 G F3(SIGHUP)A/F4 9/Times-Roman@0 SF(.)A F0 .962
(If no)5.462 F F2(jobspec)5.202 E F0 .962(is supplied, the)3.772 F F1
<ad61>3.462 E F0 .962(option means to remo)3.462 F 1.262 -.15(ve o)-.15
-H 3.462(rm).15 G .962(ark all)-3.462 F 1.358(jobs; the)144 297.6 R F1
-<ad72>3.858 E F0 1.358(option without a)3.858 F F2(jobspec)5.598 E F0
-(ar)4.169 E 1.359(gument restricts operation to running jobs.)-.18 F
-1.359(The return)6.359 F -.25(va)144 309.6 S(lue is 0 unless a).25 E F2
+H 3.462(rm).15 G .962(ark all)-3.462 F 1.359(jobs; the)144 297.6 R F1
+<ad72>3.859 E F0 1.359(option without a)3.859 F F2(jobspec)5.599 E F0
+(ar)4.169 E 1.358(gument restricts operation to running jobs.)-.18 F
+1.358(The return)6.358 F -.25(va)144 309.6 S(lue is 0 unless a).25 E F2
(jobspec)4.24 E F0(does not specify a v)2.81 E(alid job)-.25 E(.)-.4 E
F1(echo)108 326.4 Q F0([)2.5 E F1(\255neE)A F0 2.5(][)C F2(ar)-2.5 E(g)
--.37 E F0(...])2.5 E .425(Output the)144 338.4 R F2(ar)2.925 E(g)-.37 E
+-.37 E F0(...])2.5 E .424(Output the)144 338.4 R F2(ar)2.924 E(g)-.37 E
F0 .424(s, separated by spaces, follo)B .424(wed by a ne)-.25 F 2.924
-(wline. The)-.25 F .424(return status is 0 unless a write)2.924 F .307
-(error occurs.)144 350.4 R(If)5.307 E F1<ad6e>2.807 E F0 .307
-(is speci\214ed, the trailing ne)2.807 F .308(wline is suppressed.)-.25
-F .308(If the)5.308 F F1<ad65>2.808 E F0 .308(option is gi)2.808 F -.15
-(ve)-.25 G .308(n, inter).15 F(-)-.2 E 1.349(pretation of the follo)144
+(wline. The)-.25 F .424(return status is 0 unless a write)2.924 F .308
+(error occurs.)144 350.4 R(If)5.308 E F1<ad6e>2.808 E F0 .308
+(is speci\214ed, the trailing ne)2.808 F .308(wline is suppressed.)-.25
+F .307(If the)5.308 F F1<ad65>2.807 E F0 .307(option is gi)2.807 F -.15
+(ve)-.25 G .307(n, inter).15 F(-)-.2 E 1.348(pretation of the follo)144
362.4 R 1.348(wing backslash-escaped characters is enabled.)-.25 F(The)
-6.348 E F1<ad45>3.848 E F0 1.348(option disables the)3.848 F 1.054
+6.348 E F1<ad45>3.849 E F0 1.349(option disables the)3.849 F 1.055
(interpretation of these escape characters, e)144 374.4 R -.15(ve)-.25 G
-3.555(no).15 G 3.555(ns)-3.555 G 1.055(ystems where the)-3.555 F 3.555
-(ya)-.15 G 1.055(re interpreted by def)-3.555 F(ault.)-.1 E(The)144
-386.4 Q F1(xpg_echo)3.459 E F0 .959
-(shell option may be used to dynamically determine whether or not)3.459
-F F1(echo)3.458 E F0 -.15(ex)3.458 G(pands).15 E .715
-(these escape characters by def)144 398.4 R(ault.)-.1 E F1(echo)5.715 E
-F0 .716(does not interpret)3.215 F F1<adad>3.216 E F0 .716
-(to mean the end of options.)3.216 F F1(echo)5.716 E F0
+3.555(no).15 G 3.555(ns)-3.555 G 1.055(ystems where the)-3.555 F 3.554
+(ya)-.15 G 1.054(re interpreted by def)-3.554 F(ault.)-.1 E(The)144
+386.4 Q F1(xpg_echo)3.458 E F0 .959
+(shell option may be used to dynamically determine whether or not)3.458
+F F1(echo)3.459 E F0 -.15(ex)3.459 G(pands).15 E .716
+(these escape characters by def)144 398.4 R(ault.)-.1 E F1(echo)5.716 E
+F0 .716(does not interpret)3.216 F F1<adad>3.216 E F0 .715
+(to mean the end of options.)3.216 F F1(echo)5.715 E F0
(interprets the follo)144 410.4 Q(wing escape sequences:)-.25 E F1(\\a)
144 422.4 Q F0(alert \(bell\))28.22 E F1(\\b)144 434.4 Q F0(backspace)
27.66 E F1(\\c)144 446.4 Q F0(suppress further output)28.78 E F1(\\e)144
(the eight-bit character whose v)13.78 E(alue is the he)-.25 E
(xadecimal v)-.15 E(alue)-.25 E F2(HH)2.5 E F0(\(one or tw)2.5 E 2.5(oh)
-.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E F1(\\u)144 578.4 Q F2(HHHH)A F0
-1.507(the Unicode \(ISO/IEC 10646\) character whose v)180 590.4 R 1.506
-(alue is the he)-.25 F 1.506(xadecimal v)-.15 F(alue)-.25 E F2(HHHH)
-4.006 E F0(\(one to four he)180 602.4 Q 2.5(xd)-.15 G(igits\))-2.5 E F1
-(\\U)144 614.4 Q F2(HHHHHHHH)A F0 .547
+1.506(the Unicode \(ISO/IEC 10646\) character whose v)180 590.4 R 1.507
+(alue is the he)-.25 F 1.507(xadecimal v)-.15 F(alue)-.25 E F2(HHHH)
+4.007 E F0(\(one to four he)180 602.4 Q 2.5(xd)-.15 G(igits\))-2.5 E F1
+(\\U)144 614.4 Q F2(HHHHHHHH)A F0 .548
(the Unicode \(ISO/IEC 10646\) character whose v)180 626.4 R .547
-(alue is the he)-.25 F .548(xadecimal v)-.15 F(alue)-.25 E F2(HHHHH-)
-3.048 E(HHH)180 638.4 Q F0(\(one to eight he)2.5 E 2.5(xd)-.15 G
+(alue is the he)-.25 F .547(xadecimal v)-.15 F(alue)-.25 E F2(HHHHH-)
+3.047 E(HHH)180 638.4 Q F0(\(one to eight he)2.5 E 2.5(xd)-.15 G
(igits\))-2.5 E F1(enable)108 655.2 Q F0([)2.5 E F1<ad61>A F0 2.5(][)C
F1(\255dnps)-2.5 E F0 2.5(][)C F1<ad66>-2.5 E F2(\214lename)2.5 E F0 2.5
-(][)C F2(name)-2.5 E F0(...])2.5 E .278(Enable and disable b)144 667.2 R
+(][)C F2(name)-2.5 E F0(...])2.5 E .277(Enable and disable b)144 667.2 R
.278(uiltin shell commands.)-.2 F .278(Disabling a b)5.278 F .278
-(uiltin allo)-.2 F .278(ws a disk command which has)-.25 F .833
+(uiltin allo)-.2 F .278(ws a disk command which has)-.25 F .834
(the same name as a shell b)144 679.2 R .834(uiltin to be e)-.2 F -.15
(xe)-.15 G .834(cuted without specifying a full pathname, e).15 F -.15
-(ve)-.25 G 3.334(nt).15 G(hough)-3.334 E .99
+(ve)-.25 G 3.333(nt).15 G(hough)-3.333 E .989
(the shell normally searches for b)144 691.2 R .989
-(uiltins before disk commands.)-.2 F(If)5.989 E F1<ad6e>3.489 E F0 .989
-(is used, each)3.489 F F2(name)3.489 E F0 .989(is dis-)3.489 F 1.581
+(uiltins before disk commands.)-.2 F(If)5.989 E F1<ad6e>3.489 E F0 .99
+(is used, each)3.49 F F2(name)3.49 E F0 .99(is dis-)3.49 F 1.582
(abled; otherwise,)144 703.2 R F2(names)4.082 E F0 1.582(are enabled.)
4.082 F -.15(Fo)6.582 G 4.082(re).15 G 1.582(xample, to use the)-4.232 F
-F1(test)4.082 E F0 1.582(binary found via the)4.082 F F3 -.666(PA)4.082
-G(TH)-.189 E F0 .081(instead of the shell b)144 715.2 R .081(uiltin v)
--.2 F .081(ersion, run)-.15 F/F5 10/Courier@0 SF .081(enable -n test)
-2.581 F F0 5.081(.T)C(he)-5.081 E F1<ad66>2.58 E F0 .08
-(option means to load the ne)2.58 F(w)-.25 E -.2(bu)144 727.2 S 1.524
-(iltin command).2 F F2(name)4.384 E F0 1.524(from shared object)4.204 F
+F1(test)4.082 E F0 1.582(binary found via the)4.082 F F3 -.666(PA)4.081
+G(TH)-.189 E F0 .08(instead of the shell b)144 715.2 R .08(uiltin v)-.2
+F .08(ersion, run)-.15 F/F5 10/Courier@0 SF .081(enable -n test)2.58 F
+F0 5.081(.T)C(he)-5.081 E F1<ad66>2.581 E F0 .081
+(option means to load the ne)2.581 F(w)-.25 E -.2(bu)144 727.2 S 1.525
+(iltin command).2 F F2(name)4.385 E F0 1.524(from shared object)4.204 F
F2(\214lename)4.024 E F0 4.024(,o).18 G 4.024(ns)-4.024 G 1.524
(ystems that support dynamic loading.)-4.024 F(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(57)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(57)190.395 E 0 Cg EP
%%Page: 58 58
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
--.35 E(The)144 84 Q/F1 10/Times-Bold@0 SF<ad64>2.867 E F0 .367
-(option will delete a b)2.867 F .367(uiltin pre)-.2 F .367
-(viously loaded with)-.25 F F1<ad66>2.866 E F0 5.366(.I)C 2.866(fn)
--5.366 G(o)-2.866 E/F2 10/Times-Italic@0 SF(name)2.866 E F0(ar)2.866 E
-.366(guments are gi)-.18 F -.15(ve)-.25 G .366(n, or).15 F .398(if the)
-144 96 R F1<ad70>2.898 E F0 .399(option is supplied, a list of shell b)
+-.35 E(The)144 84 Q/F1 10/Times-Bold@0 SF<ad64>2.866 E F0 .366
+(option will delete a b)2.866 F .366(uiltin pre)-.2 F .366
+(viously loaded with)-.25 F F1<ad66>2.867 E F0 5.367(.I)C 2.867(fn)
+-5.367 G(o)-2.867 E/F2 10/Times-Italic@0 SF(name)2.867 E F0(ar)2.867 E
+.367(guments are gi)-.18 F -.15(ve)-.25 G .367(n, or).15 F .399(if the)
+144 96 R F1<ad70>2.899 E F0 .399(option is supplied, a list of shell b)
2.899 F .399(uiltins is printed.)-.2 F -.4(Wi)5.399 G .399
-(th no other option ar).4 F .399(guments, the)-.18 F .099
+(th no other option ar).4 F .398(guments, the)-.18 F .098
(list consists of all enabled shell b)144 108 R 2.598(uiltins. If)-.2 F
-F1<ad6e>2.598 E F0 .098(is supplied, only disabled b)2.598 F .098
-(uiltins are printed.)-.2 F(If)5.098 E F1<ad61>2.598 E F0 1.916
+F1<ad6e>2.598 E F0 .098(is supplied, only disabled b)2.598 F .099
+(uiltins are printed.)-.2 F(If)5.099 E F1<ad61>2.599 E F0 1.917
(is supplied, the list printed includes all b)144 120 R 1.916
-(uiltins, with an indication of whether or not each is)-.2 F 2.879
-(enabled. If)144 132 R F1<ad73>2.879 E F0 .379
-(is supplied, the output is restricted to the POSIX)2.879 F F2(special)
-2.879 E F0 -.2(bu)2.878 G 2.878(iltins. The).2 F .378(return v)2.878 F
-(alue)-.25 E .994(is 0 unless a)144 144 R F2(name)3.854 E F0 .994
-(is not a shell b)3.674 F .994(uiltin or there is an error loading a ne)
--.2 F 3.495(wb)-.25 G .995(uiltin from a shared)-3.695 F(object.)144 156
+(uiltins, with an indication of whether or not each is)-.2 F 2.878
+(enabled. If)144 132 R F1<ad73>2.878 E F0 .379
+(is supplied, the output is restricted to the POSIX)2.878 F F2(special)
+2.879 E F0 -.2(bu)2.879 G 2.879(iltins. The).2 F .379(return v)2.879 F
+(alue)-.25 E .995(is 0 unless a)144 144 R F2(name)3.855 E F0 .994
+(is not a shell b)3.675 F .994(uiltin or there is an error loading a ne)
+-.2 F 3.494(wb)-.25 G .994(uiltin from a shared)-3.694 F(object.)144 156
Q F1 -2.3 -.15(ev a)108 172.8 T(l).15 E F0([)2.5 E F2(ar)A(g)-.37 E F0
-(...])2.5 E(The)144 184.8 Q F2(ar)3.171 E(g)-.37 E F0 3.171(sa)C .671
-(re read and concatenated together into a single command.)-3.171 F .67
-(This command is then read)5.67 F .495(and e)144 196.8 R -.15(xe)-.15 G
+(...])2.5 E(The)144 184.8 Q F2(ar)3.17 E(g)-.37 E F0 3.17(sa)C .671
+(re read and concatenated together into a single command.)-3.17 F .671
+(This command is then read)5.671 F .495(and e)144 196.8 R -.15(xe)-.15 G
.495(cuted by the shell, and its e).15 F .495
(xit status is returned as the v)-.15 F .495(alue of)-.25 F F1 -2.3 -.15
(ev a)2.995 H(l).15 E F0 5.495(.I)C 2.995(ft)-5.495 G .495(here are no)
(guments,)-.18 E F1 -2.3 -.15(ev a)2.5 H(l).15 E F0(returns 0.)2.5 E F1
(exec)108 225.6 Q F0([)2.5 E F1(\255cl)A F0 2.5(][)C F1<ad61>-2.5 E F2
(name)2.5 E F0 2.5(][)C F2(command)-2.5 E F0([)2.5 E F2(ar)A(guments)
--.37 E F0(]])A(If)144 237.6 Q F2(command)3.006 E F0 .306
-(is speci\214ed, it replaces the shell.)3.576 F .305(No ne)5.305 F 2.805
-(wp)-.25 G .305(rocess is created.)-2.805 F(The)5.305 E F2(ar)3.135 E
-(guments)-.37 E F0(become)3.075 E .176(the ar)144 249.6 R .176
+-.37 E F0(]])A(If)144 237.6 Q F2(command)3.005 E F0 .305
+(is speci\214ed, it replaces the shell.)3.575 F .305(No ne)5.305 F 2.805
+(wp)-.25 G .306(rocess is created.)-2.805 F(The)5.306 E F2(ar)3.136 E
+(guments)-.37 E F0(become)3.076 E .177(the ar)144 249.6 R .177
(guments to)-.18 F F2(command)2.676 E F0 5.176(.I)C 2.676(ft)-5.176 G
(he)-2.676 E F1<ad6c>2.676 E F0 .176
-(option is supplied, the shell places a dash at the be)2.676 F .177
-(ginning of)-.15 F .5(the zeroth ar)144 261.6 R .5(gument passed to)-.18
-F F2(command)3 E F0 5.499(.T).77 G .499(his is what)-5.499 F F2(lo)2.999
-E(gin)-.1 E F0 .499(\(1\) does.).24 F(The)5.499 E F1<ad63>2.999 E F0
-.499(option causes)2.999 F F2(com-)3.199 E(mand)144 273.6 Q F0 .638
-(to be e)3.908 F -.15(xe)-.15 G .638(cuted with an empty en).15 F 3.138
+(option is supplied, the shell places a dash at the be)2.676 F .176
+(ginning of)-.15 F .499(the zeroth ar)144 261.6 R .499(gument passed to)
+-.18 F F2(command)2.999 E F0 5.499(.T).77 G .499(his is what)-5.499 F F2
+(lo)2.999 E(gin)-.1 E F0 .499(\(1\) does.).24 F(The)5.5 E F1<ad63>3 E F0
+.5(option causes)3 F F2(com-)3.2 E(mand)144 273.6 Q F0 .639(to be e)
+3.909 F -.15(xe)-.15 G .638(cuted with an empty en).15 F 3.138
(vironment. If)-.4 F F1<ad61>3.138 E F0 .638
-(is supplied, the shell passes)3.138 F F2(name)3.499 E F0 .639(as the)
-3.319 F 1.078(zeroth ar)144 285.6 R 1.077(gument to the e)-.18 F -.15
+(is supplied, the shell passes)3.138 F F2(name)3.498 E F0 .638(as the)
+3.318 F 1.077(zeroth ar)144 285.6 R 1.077(gument to the e)-.18 F -.15
(xe)-.15 G 1.077(cuted command.).15 F(If)6.077 E F2(command)3.777 E F0
1.077(cannot be e)4.347 F -.15(xe)-.15 G 1.077(cuted for some reason, a)
-.15 F(non-interacti)144 297.6 Q .876 -.15(ve s)-.25 H .576(hell e).15 F
-.576(xits, unless the)-.15 F F1(execfail)3.076 E F0 .577
-(shell option is enabled.)3.077 F .577(In that case, it returns f)5.577
+.15 F(non-interacti)144 297.6 Q .877 -.15(ve s)-.25 H .577(hell e).15 F
+.577(xits, unless the)-.15 F F1(execfail)3.077 E F0 .577
+(shell option is enabled.)3.077 F .576(In that case, it returns f)5.577
F(ail-)-.1 E 2.505(ure. An)144 309.6 R(interacti)2.505 E .305 -.15(ve s)
-.25 H .005(hell returns f).15 F .005(ailure if the \214le cannot be e)
-.1 F -.15(xe)-.15 G 2.505(cuted. If).15 F F2(command)2.705 E F0 .005
-(is not speci\214ed,)3.275 F(an)144 321.6 Q 3.036(yr)-.15 G .536
-(edirections tak)-3.036 F 3.036(ee)-.1 G -.25(ff)-3.036 G .536
+(is not speci\214ed,)3.275 F(an)144 321.6 Q 3.037(yr)-.15 G .537
+(edirections tak)-3.037 F 3.036(ee)-.1 G -.25(ff)-3.036 G .536
(ect in the current shell, and the return status is 0.).25 F .536
(If there is a redirection)5.536 F(error)144 333.6 Q 2.5(,t)-.4 G
(he return status is 1.)-2.5 E F1(exit)108 350.4 Q F0([)2.5 E F2(n)A F0
-6.29(]C)C .096(ause the shell to e)-6.29 F .096(xit with a status of)
--.15 F F2(n)2.596 E F0 5.096(.I)C(f)-5.096 E F2(n)2.955 E F0 .095
-(is omitted, the e)2.835 F .095(xit status is that of the last command)
+6.29(]C)C .095(ause the shell to e)-6.29 F .095(xit with a status of)
+-.15 F F2(n)2.595 E F0 5.095(.I)C(f)-5.095 E F2(n)2.955 E F0 .096
+(is omitted, the e)2.835 F .096(xit status is that of the last command)
-.15 F -.15(exe)144 362.4 S 2.5(cuted. A).15 F(trap on)2.5 E/F3 9
/Times-Bold@0 SF(EXIT)2.5 E F0(is e)2.25 E -.15(xe)-.15 G
(cuted before the shell terminates.).15 E F1(export)108 379.2 Q F0([)2.5
E F1(\255fn)A F0 2.5(][).833 G F2(name)-2.5 E F0([=)A F2(wor)A(d)-.37 E
-F0(]] ...)A F1(export \255p)108 391.2 Q F0 .256(The supplied)144 403.2 R
+F0(]] ...)A F1(export \255p)108 391.2 Q F0 .257(The supplied)144 403.2 R
F2(names)3.117 E F0 .257(are mark)3.027 F .257(ed for automatic e)-.1 F
.257(xport to the en)-.15 F .257(vironment of subsequently e)-.4 F -.15
-(xe)-.15 G(cuted).15 E 2.627(commands. If)144 415.2 R(the)2.627 E F1
-<ad66>2.627 E F0 .127(option is gi)2.627 F -.15(ve)-.25 G .127(n, the)
+(xe)-.15 G(cuted).15 E 2.626(commands. If)144 415.2 R(the)2.626 E F1
+<ad66>2.626 E F0 .127(option is gi)2.627 F -.15(ve)-.25 G .127(n, the)
.15 F F2(names)2.987 E F0 .127(refer to functions.)2.897 F .127(If no)
-5.127 F F2(names)2.987 E F0 .127(are gi)2.897 F -.15(ve)-.25 G .126
+5.127 F F2(names)2.987 E F0 .127(are gi)2.897 F -.15(ve)-.25 G .127
(n, or if the).15 F F1<ad70>144 427.2 Q F0 .048
-(option is supplied, a list of names of all e)2.547 F .048(xported v)
--.15 F .048(ariables is printed.)-.25 F(The)5.048 E F1<ad6e>2.548 E F0
-.048(option causes the)2.548 F -.15(ex)144 439.2 S 1.447
+(option is supplied, a list of names of all e)2.548 F .048(xported v)
+-.15 F .048(ariables is printed.)-.25 F(The)5.048 E F1<ad6e>2.547 E F0
+.047(option causes the)2.547 F -.15(ex)144 439.2 S 1.446
(port property to be remo).15 F -.15(ve)-.15 G 3.947(df).15 G 1.447
(rom each)-3.947 F F2(name)3.947 E F0 6.447(.I)C 3.947(fav)-6.447 G
1.447(ariable name is follo)-4.197 F 1.447(wed by =)-.25 F F2(wor)A(d)
--.37 E F0 3.946(,t)C(he)-3.946 E -.25(va)144 451.2 S .741(lue of the v)
-.25 F .741(ariable is set to)-.25 F F2(wor)3.241 E(d)-.37 E F0(.)A F1
-(export)5.741 E F0 .742(returns an e)3.242 F .742
-(xit status of 0 unless an in)-.15 F -.25(va)-.4 G .742(lid option is)
-.25 F .032(encountered, one of the)144 463.2 R F2(names)2.532 E F0 .032
-(is not a v)2.532 F .032(alid shell v)-.25 F .032(ariable name, or)-.25
-F F1<ad66>2.531 E F0 .031(is supplied with a)2.531 F F2(name)2.891 E F0
-(that)2.711 E(is not a function.)144 475.2 Q F1(fc)108 492 Q F0([)2.5 E
+-.37 E F0 3.947(,t)C(he)-3.947 E -.25(va)144 451.2 S .742(lue of the v)
+.25 F .742(ariable is set to)-.25 F F2(wor)3.242 E(d)-.37 E F0(.)A F1
+(export)5.742 E F0 .742(returns an e)3.242 F .741
+(xit status of 0 unless an in)-.15 F -.25(va)-.4 G .741(lid option is)
+.25 F .031(encountered, one of the)144 463.2 R F2(names)2.531 E F0 .031
+(is not a v)2.531 F .032(alid shell v)-.25 F .032(ariable name, or)-.25
+F F1<ad66>2.532 E F0 .032(is supplied with a)2.532 F F2(name)2.892 E F0
+(that)2.712 E(is not a function.)144 475.2 Q F1(fc)108 492 Q F0([)2.5 E
F1<ad65>A F2(ename)2.5 E F0 2.5(][)C F1(\255lnr)-2.5 E F0 2.5(][)C F2
<8c72>-2.5 E(st)-.1 E F0 2.5(][)C F2(last)-2.5 E F0(])A F1(fc \255s)108
504 Q F0([)2.5 E F2(pat)A F0(=)A F2 -.37(re)C(p).37 E F0 2.5(][)C F2
-(cmd)-2.5 E F0(])A .431
+(cmd)-2.5 E F0(])A .432
(The \214rst form selects a range of commands from)144 516 R F2<8c72>
-4.842 E(st)-.1 E F0(to)3.612 E F2(last)3.022 E F0 .432
-(from the history list and displays or)3.612 F .142(edits and re-e)144
-528 R -.15(xe)-.15 G .142(cutes them.).15 F F2 -.45(Fi)5.141 G -.1(rs)
+4.842 E(st)-.1 E F0(to)3.612 E F2(last)3.022 E F0 .431
+(from the history list and displays or)3.612 F .141(edits and re-e)144
+528 R -.15(xe)-.15 G .141(cutes them.).15 F F2 -.45(Fi)5.141 G -.1(rs)
.45 G(t).1 E F0(and)3.321 E F2(last)2.731 E F0 .141
(may be speci\214ed as a string \(to locate the last command)3.321 F(be)
-144 540 Q .31(ginning with that string\) or as a number \(an inde)-.15 F
-2.811(xi)-.15 G .311(nto the history list, where a ne)-2.811 F -.05(ga)
--.15 G(ti).05 E .611 -.15(ve n)-.25 H(umber).15 E .315(is used as an of)
-144 552 R .315(fset from the current command number\).)-.25 F(If)5.315 E
-F2(last)2.904 E F0 .314(is not speci\214ed it is set to the cur)3.494 F
-(-)-.2 E .948(rent command for listing \(so that)144 564 R/F4 10
+144 540 Q .311(ginning with that string\) or as a number \(an inde)-.15
+F 2.811(xi)-.15 G .31(nto the history list, where a ne)-2.811 F -.05(ga)
+-.15 G(ti).05 E .61 -.15(ve n)-.25 H(umber).15 E .314(is used as an of)
+144 552 R .314(fset from the current command number\).)-.25 F(If)5.314 E
+F2(last)2.905 E F0 .315(is not speci\214ed it is set to the cur)3.495 F
+(-)-.2 E .949(rent command for listing \(so that)144 564 R/F4 10
/Courier@0 SF .948(fc \255l \25510)3.448 F F0 .948
-(prints the last 10 commands\) and to)3.448 F F2<8c72>5.359 E(st)-.1 E
-F0(other)4.129 E(-)-.2 E 2.5(wise. If)144 576 R F2<8c72>4.41 E(st)-.1 E
+(prints the last 10 commands\) and to)3.448 F F2<8c72>5.358 E(st)-.1 E
+F0(other)4.128 E(-)-.2 E 2.5(wise. If)144 576 R F2<8c72>4.41 E(st)-.1 E
F0(is not speci\214ed it is set to the pre)3.18 E
(vious command for editing and \25516 for listing.)-.25 E(The)144 600 Q
F1<ad6e>2.522 E F0 .022
(rses the order of).15 F .438(the commands.)144 612 R .438(If the)5.438
F F1<ad6c>2.938 E F0 .438(option is gi)2.938 F -.15(ve)-.25 G .438
(n, the commands are listed on standard output.).15 F(Otherwise,)5.438 E
-.335(the editor gi)144 624 R -.15(ve)-.25 G 2.835(nb).15 G(y)-2.835 E F2
-(ename)3.025 E F0 .335(is in)3.015 F -.2(vo)-.4 G -.1(ke).2 G 2.835(do)
+.334(the editor gi)144 624 R -.15(ve)-.25 G 2.834(nb).15 G(y)-2.834 E F2
+(ename)3.024 E F0 .335(is in)3.014 F -.2(vo)-.4 G -.1(ke).2 G 2.835(do)
.1 G 2.835(na\214)-2.835 G .335(le containing those commands.)-2.835 F
-(If)5.334 E F2(ename)3.024 E F0 .334(is not gi)3.014 F -.15(ve)-.25 G
-(n,).15 E .63(the v)144 636 R .63(alue of the)-.25 F F3(FCEDIT)3.13 E F0
--.25(va)2.88 G .631(riable is used, and the v).25 F .631(alue of)-.25 F
-F3(EDIT)3.131 E(OR)-.162 E F0(if)2.881 E F3(FCEDIT)3.131 E F0 .631
-(is not set.)2.881 F .631(If nei-)5.631 F .951(ther v)144 648 R .951
-(ariable is set,)-.25 F F2(vi)5.117 E F0 .951(is used.)5.117 F .95
-(When editing is complete, the edited commands are echoed and)5.951 F
--.15(exe)144 660 S(cuted.).15 E .788(In the second form,)144 684 R F2
+(If)5.335 E F2(ename)3.025 E F0 .335(is not gi)3.015 F -.15(ve)-.25 G
+(n,).15 E .631(the v)144 636 R .631(alue of the)-.25 F F3(FCEDIT)3.131 E
+F0 -.25(va)2.881 G .631(riable is used, and the v).25 F .631(alue of)
+-.25 F F3(EDIT)3.131 E(OR)-.162 E F0(if)2.881 E F3(FCEDIT)3.13 E F0 .63
+(is not set.)2.88 F .63(If nei-)5.63 F .95(ther v)144 648 R .95
+(ariable is set,)-.25 F F2(vi)5.116 E F0 .95(is used.)5.116 F .951
+(When editing is complete, the edited commands are echoed and)5.95 F
+-.15(exe)144 660 S(cuted.).15 E .789(In the second form,)144 684 R F2
(command)3.288 E F0 .788(is re-e)3.288 F -.15(xe)-.15 G .788
(cuted after each instance of).15 F F2(pat)3.288 E F0 .788
-(is replaced by)3.288 F F2 -.37(re)3.289 G(p).37 E F0(.)A F2(Com-)5.789
-E(mand)144 696 Q F0 .347(is intepreted the same as)2.847 F F2<8c72>2.847
+(is replaced by)3.288 F F2 -.37(re)3.288 G(p).37 E F0(.)A F2(Com-)5.788
+E(mand)144 696 Q F0 .346(is intepreted the same as)2.846 F F2<8c72>2.847
E(st)-.1 E F0(abo)2.847 E -.15(ve)-.15 G 5.347(.A).15 G .347
-(useful alias to use with this is)-2.5 F F4 .346(r='fc \255s')2.847 F F0
-2.846(,s)C 2.846(ot)-2.846 G(hat)-2.846 E(typing)144 708 Q F4 7.165(rc)
-3.665 G(c)-7.165 E F0 1.165(runs the last command be)3.665 F 1.166
-(ginning with)-.15 F F4(cc)3.666 E F0 1.166(and typing)3.666 F F4(r)
-3.666 E F0(re-e)3.666 E -.15(xe)-.15 G 1.166(cutes the last com-).15 F
-(mand.)144 720 Q(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(58)
-187.615 E 0 Cg EP
+(useful alias to use with this is)-2.5 F F4 .347(r='fc \255s')2.847 F F0
+2.847(,s)C 2.847(ot)-2.847 G(hat)-2.847 E(typing)144 708 Q F4 7.166(rc)
+3.666 G(c)-7.166 E F0 1.166(runs the last command be)3.666 F 1.166
+(ginning with)-.15 F F4(cc)3.666 E F0 1.165(and typing)3.666 F F4(r)
+3.665 E F0(re-e)3.665 E -.15(xe)-.15 G 1.165(cutes the last com-).15 F
+(mand.)144 720 Q(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(58)
+190.395 E 0 Cg EP
%%Page: 59 59
%%BeginPageSetup
BP
-.35 E .142(If the \214rst form is used, the return v)144 84 R .142
(alue is 0 unless an in)-.25 F -.25(va)-.4 G .142
(lid option is encountered or).25 F/F1 10/Times-Italic@0 SF<8c72>4.552 E
-(st)-.1 E F0(or)3.322 E F1(last)2.732 E F0 .454
+(st)-.1 E F0(or)3.322 E F1(last)2.732 E F0 .455
(specify history lines out of range.)144 96 R .454(If the)5.454 F/F2 10
/Times-Bold@0 SF<ad65>2.954 E F0 .454(option is supplied, the return v)
-2.954 F .455(alue is the v)-.25 F .455(alue of the)-.25 F .788
-(last command e)144 108 R -.15(xe)-.15 G .788(cuted or f).15 F .787
+2.954 F .454(alue is the v)-.25 F .454(alue of the)-.25 F .787
+(last command e)144 108 R -.15(xe)-.15 G .787(cuted or f).15 F .788
(ailure if an error occurs with the temporary \214le of commands.)-.1 F
-.787(If the)5.787 F 1.135
+.788(If the)5.788 F 1.136
(second form is used, the return status is that of the command re-e)144
-120 R -.15(xe)-.15 G 1.136(cuted, unless).15 F F1(cmd)3.836 E F0 1.136
-(does not)4.406 F(specify a v)144 132 Q
+120 R -.15(xe)-.15 G 1.135(cuted, unless).15 F F1(cmd)3.835 E F0 1.135
+(does not)4.405 F(specify a v)144 132 Q
(alid history line, in which case)-.25 E F2(fc)2.5 E F0(returns f)2.5 E
(ailure.)-.1 E F2(fg)108 148.8 Q F0([)2.5 E F1(jobspec)A F0(])A(Resume)
-144 160.8 Q F1(jobspec)5.654 E F0 1.413(in the fore)4.224 F 1.413
+144 160.8 Q F1(jobspec)5.653 E F0 1.413(in the fore)4.223 F 1.413
(ground, and mak)-.15 F 3.913(ei)-.1 G 3.913(tt)-3.913 G 1.413
(he current job)-3.913 F 6.413(.I)-.4 G(f)-6.413 E F1(jobspec)5.653 E F0
-1.413(is not present, the)4.223 F(shell')144 172.8 Q 3.116(sn)-.55 G
-.616(otion of the)-3.116 F F1(curr)3.116 E .616(ent job)-.37 F F0 .617
-(is used.)3.116 F .617(The return v)5.617 F .617
+1.414(is not present, the)4.223 F(shell')144 172.8 Q 3.117(sn)-.55 G
+.617(otion of the)-3.117 F F1(curr)3.117 E .617(ent job)-.37 F F0 .617
+(is used.)3.117 F .617(The return v)5.617 F .616
(alue is that of the command placed into the)-.25 F(fore)144 184.8 Q
-.363(ground, or f)-.15 F .363
-(ailure if run when job control is disabled or)-.1 F 2.862(,w)-.4 G .362
+.362(ground, or f)-.15 F .362
+(ailure if run when job control is disabled or)-.1 F 2.862(,w)-.4 G .363
(hen run with job control enabled, if)-2.862 F F1(jobspec)145.74 196.8 Q
-F0 .004(does not specify a v)2.814 F .004(alid job or)-.25 F F1(jobspec)
+F0 .004(does not specify a v)2.815 F .004(alid job or)-.25 F F1(jobspec)
4.244 E F0 .004(speci\214es a job that w)2.814 F .004
(as started without job control.)-.1 F F2(getopts)108 213.6 Q F1
(optstring name)2.5 E F0([)2.5 E F1(ar)A(gs)-.37 E F0(])A F2(getopts)144
225.6 Q F0 .793
-(is used by shell procedures to parse positional parameters.)3.294 F F1
-(optstring)6.023 E F0 .793(contains the option)3.513 F .149
-(characters to be recognized; if a character is follo)144 237.6 R .15
-(wed by a colon, the option is e)-.25 F .15(xpected to ha)-.15 F .45
--.15(ve a)-.2 H(n).15 E(ar)144 249.6 Q .579
-(gument, which should be separated from it by white space.)-.18 F .578
+(is used by shell procedures to parse positional parameters.)3.293 F F1
+(optstring)6.023 E F0 .793(contains the option)3.513 F .15
+(characters to be recognized; if a character is follo)144 237.6 R .149
+(wed by a colon, the option is e)-.25 F .149(xpected to ha)-.15 F .449
+-.15(ve a)-.2 H(n).15 E(ar)144 249.6 Q .578
+(gument, which should be separated from it by white space.)-.18 F .579
(The colon and question mark char)5.579 F(-)-.2 E 1.665
(acters may not be used as option characters.)144 261.6 R 1.665
(Each time it is in)6.665 F -.2(vo)-.4 G -.1(ke).2 G(d,).1 E F2(getopts)
-4.165 E F0 1.665(places the ne)4.165 F(xt)-.15 E .797
-(option in the shell v)144 273.6 R(ariable)-.25 E F1(name)3.297 E F0
-3.297(,i).18 G(nitializing)-3.297 E F1(name)3.657 E F0 .797
-(if it does not e)3.477 F .796(xist, and the inde)-.15 F 3.296(xo)-.15 G
-3.296(ft)-3.296 G .796(he ne)-3.296 F(xt)-.15 E(ar)144 285.6 Q .085
+4.165 E F0 1.665(places the ne)4.165 F(xt)-.15 E .796
+(option in the shell v)144 273.6 R(ariable)-.25 E F1(name)3.296 E F0
+3.296(,i).18 G(nitializing)-3.296 E F1(name)3.657 E F0 .797
+(if it does not e)3.477 F .797(xist, and the inde)-.15 F 3.297(xo)-.15 G
+3.297(ft)-3.297 G .797(he ne)-3.297 F(xt)-.15 E(ar)144 285.6 Q .085
(gument to be processed into the v)-.18 F(ariable)-.25 E/F3 9
/Times-Bold@0 SF(OPTIND)2.585 E/F4 9/Times-Roman@0 SF(.)A F3(OPTIND)
-4.585 E F0 .085(is initialized to 1 each time the shell)2.335 F .846
+4.585 E F0 .085(is initialized to 1 each time the shell)2.335 F .845
(or a shell script is in)144 297.6 R -.2(vo)-.4 G -.1(ke).2 G 3.345
(d. When).1 F .845(an option requires an ar)3.345 F(gument,)-.18 E F2
-(getopts)3.345 E F0 .845(places that ar)3.345 F(gument)-.18 E .803
-(into the v)144 309.6 R(ariable)-.25 E F3(OPT)3.303 E(ARG)-.81 E F4(.)A
-F0 .803(The shell does not reset)5.303 F F3(OPTIND)3.303 E F0 .804
-(automatically; it must be manually)3.054 F .294
+(getopts)3.346 E F0 .846(places that ar)3.346 F(gument)-.18 E .804
+(into the v)144 309.6 R(ariable)-.25 E F3(OPT)3.304 E(ARG)-.81 E F4(.)A
+F0 .803(The shell does not reset)5.304 F F3(OPTIND)3.303 E F0 .803
+(automatically; it must be manually)3.053 F .293
(reset between multiple calls to)144 321.6 R F2(getopts)2.793 E F0 .293
(within the same shell in)2.793 F -.2(vo)-.4 G .293(cation if a ne).2 F
-2.793(ws)-.25 G .293(et of parameters)-2.793 F(is to be used.)144 333.6
-Q 2.043(When the end of options is encountered,)144 357.6 R F2(getopts)
-4.543 E F0 -.15(ex)4.543 G 2.043(its with a return v).15 F 2.044
+2.793(ws)-.25 G .294(et of parameters)-2.793 F(is to be used.)144 333.6
+Q 2.044(When the end of options is encountered,)144 357.6 R F2(getopts)
+4.543 E F0 -.15(ex)4.543 G 2.043(its with a return v).15 F 2.043
(alue greater than zero.)-.25 F F3(OPTIND)144 369.6 Q F0
(is set to the inde)2.25 E 2.5(xo)-.15 G 2.5(ft)-2.5 G
(he \214rst non-option ar)-2.5 E(gument, and)-.18 E F1(name)2.5 E F0
-(is set to ?.)2.5 E F2(getopts)144 393.6 Q F0 2.393
-(normally parses the positional parameters, b)4.893 F 2.392
-(ut if more ar)-.2 F 2.392(guments are gi)-.18 F -.15(ve)-.25 G 4.892
-(ni).15 G(n)-4.892 E F1(ar)4.892 E(gs)-.37 E F0(,).27 E F2(getopts)144
-405.6 Q F0(parses those instead.)2.5 E F2(getopts)144 429.6 Q F0 1.165
-(can report errors in tw)3.665 F 3.665(ow)-.1 G 3.665(ays. If)-3.765 F
-1.165(the \214rst character of)3.665 F F1(optstring)3.895 E F0 1.166
-(is a colon,)3.886 F F1(silent)4.006 E F0(error)4.346 E 1.071
+(is set to ?.)2.5 E F2(getopts)144 393.6 Q F0 2.392
+(normally parses the positional parameters, b)4.892 F 2.392
+(ut if more ar)-.2 F 2.393(guments are gi)-.18 F -.15(ve)-.25 G 4.893
+(ni).15 G(n)-4.893 E F1(ar)4.893 E(gs)-.37 E F0(,).27 E F2(getopts)144
+405.6 Q F0(parses those instead.)2.5 E F2(getopts)144 429.6 Q F0 1.166
+(can report errors in tw)3.666 F 3.665(ow)-.1 G 3.665(ays. If)-3.765 F
+1.165(the \214rst character of)3.665 F F1(optstring)3.895 E F0 1.165
+(is a colon,)3.885 F F1(silent)4.005 E F0(error)4.345 E 1.07
(reporting is used.)144 441.6 R 1.071
-(In normal operation, diagnostic messages are printed when in)6.071 F
--.25(va)-.4 G 1.07(lid options or).25 F .393(missing option ar)144 453.6
-R .393(guments are encountered.)-.18 F .394(If the v)5.394 F(ariable)
--.25 E F3(OPTERR)2.894 E F0 .394(is set to 0, no error messages)2.644 F
-(will be displayed, e)144 465.6 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(ft)
--2.5 G(he \214rst character of)-2.5 E F1(optstring)2.73 E F0
-(is not a colon.)2.72 E .667(If an in)144 489.6 R -.25(va)-.4 G .667
-(lid option is seen,).25 F F2(getopts)3.167 E F0 .667(places ? into)
-3.167 F F1(name)3.527 E F0 .666
-(and, if not silent, prints an error message)3.347 F .399(and unsets)144
-501.6 R F3(OPT)2.899 E(ARG)-.81 E F4(.)A F0(If)4.899 E F2(getopts)2.899
-E F0 .399(is silent, the option character found is placed in)2.899 F F3
-(OPT)2.899 E(ARG)-.81 E F0 .4(and no)2.65 F
-(diagnostic message is printed.)144 513.6 Q 1.242(If a required ar)144
-537.6 R 1.242(gument is not found, and)-.18 F F2(getopts)3.741 E F0
-1.241(is not silent, a question mark \()3.741 F F2(?).833 E F0 3.741
-(\)i).833 G 3.741(sp)-3.741 G 1.241(laced in)-3.741 F F1(name)144 549.6
-Q F0(,).18 E F3(OPT)2.734 E(ARG)-.81 E F0 .234
-(is unset, and a diagnostic message is printed.)2.484 F(If)5.234 E F2
-(getopts)2.734 E F0 .235(is silent, then a colon \()2.734 F F2(:).833 E
+(In normal operation, diagnostic messages are printed when in)6.07 F
+-.25(va)-.4 G 1.071(lid options or).25 F .394(missing option ar)144
+453.6 R .394(guments are encountered.)-.18 F .394(If the v)5.394 F
+(ariable)-.25 E F3(OPTERR)2.894 E F0 .394
+(is set to 0, no error messages)2.644 F(will be displayed, e)144 465.6 Q
+-.15(ve)-.25 G 2.5(ni).15 G 2.5(ft)-2.5 G(he \214rst character of)-2.5 E
+F1(optstring)2.73 E F0(is not a colon.)2.72 E .666(If an in)144 489.6 R
+-.25(va)-.4 G .666(lid option is seen,).25 F F2(getopts)3.166 E F0 .667
+(places ? into)3.167 F F1(name)3.527 E F0 .667
+(and, if not silent, prints an error message)3.347 F .4(and unsets)144
+501.6 R F3(OPT)2.9 E(ARG)-.81 E F4(.)A F0(If)4.899 E F2(getopts)2.899 E
+F0 .399(is silent, the option character found is placed in)2.899 F F3
+(OPT)2.899 E(ARG)-.81 E F0 .399(and no)2.649 F
+(diagnostic message is printed.)144 513.6 Q 1.241(If a required ar)144
+537.6 R 1.241(gument is not found, and)-.18 F F2(getopts)3.741 E F0
+1.241(is not silent, a question mark \()3.741 F F2(?).833 E F0 3.742
+(\)i).833 G 3.742(sp)-3.742 G 1.242(laced in)-3.742 F F1(name)144 549.6
+Q F0(,).18 E F3(OPT)2.735 E(ARG)-.81 E F0 .234
+(is unset, and a diagnostic message is printed.)2.485 F(If)5.234 E F2
+(getopts)2.734 E F0 .234(is silent, then a colon \()2.734 F F2(:).833 E
F0(\)).833 E(is placed in)144 561.6 Q F1(name)2.86 E F0(and)2.68 E F3
(OPT)2.5 E(ARG)-.81 E F0(is set to the option character found.)2.25 E F2
(getopts)144 585.6 Q F0 .902
(returns true if an option, speci\214ed or unspeci\214ed, is found.)
-3.402 F .902(It returns f)5.902 F .901(alse if the end of)-.1 F
+3.401 F .902(It returns f)5.902 F .902(alse if the end of)-.1 F
(options is encountered or an error occurs.)144 597.6 Q F2(hash)108
614.4 Q F0([)2.5 E F2(\255lr)A F0 2.5(][)C F2<ad70>-2.5 E F1(\214lename)
2.5 E F0 2.5(][)C F2(\255dt)-2.5 E F0 2.5(][)C F1(name)-2.5 E F0(])A
3.718 E F0 .858(is determined by searching)3.538 F .956
(the directories in)144 638.4 R F2($P)3.456 E -.95(AT)-.74 G(H).95 E F0
.956(and remembered.)3.456 F(An)5.956 E 3.456(yp)-.15 G(re)-3.456 E .956
-(viously-remembered pathname is discarded.)-.25 F .242(If the)144 650.4
-R F2<ad70>2.742 E F0 .243
-(option is supplied, no path search is performed, and)2.742 F F1
-(\214lename)4.653 E F0 .243(is used as the full \214lename)2.923 F 1.712
-(of the command.)144 662.4 R(The)6.712 E F2<ad72>4.212 E F0 1.711
-(option causes the shell to for)4.212 F 1.711
-(get all remembered locations.)-.18 F(The)6.711 E F2<ad64>4.211 E F0
+(viously-remembered pathname is discarded.)-.25 F .243(If the)144 650.4
+R F2<ad70>2.743 E F0 .243
+(option is supplied, no path search is performed, and)2.743 F F1
+(\214lename)4.653 E F0 .242(is used as the full \214lename)2.923 F 1.711
+(of the command.)144 662.4 R(The)6.711 E F2<ad72>4.211 E F0 1.711
+(option causes the shell to for)4.211 F 1.712
+(get all remembered locations.)-.18 F(The)6.712 E F2<ad64>4.212 E F0
.833(option causes the shell to for)144 674.4 R .833
(get the remembered location of each)-.18 F F1(name)3.333 E F0 5.833(.I)
C 3.333(ft)-5.833 G(he)-3.333 E F2<ad74>3.333 E F0 .833(option is sup-)
-3.333 F .704(plied, the full pathname to which each)144 686.4 R F1(name)
-3.204 E F0 .703(corresponds is printed.)3.204 F .703(If multiple)5.703 F
-F1(name)3.203 E F0(ar)3.203 E(guments)-.18 E .795(are supplied with)144
+3.333 F .703(plied, the full pathname to which each)144 686.4 R F1(name)
+3.204 E F0 .704(corresponds is printed.)3.204 F .704(If multiple)5.704 F
+F1(name)3.204 E F0(ar)3.204 E(guments)-.18 E .795(are supplied with)144
698.4 R F2<ad74>3.295 E F0 3.295(,t)C(he)-3.295 E F1(name)3.295 E F0
.795(is printed before the hashed full pathname.)3.295 F(The)5.795 E F2
<ad6c>3.295 E F0 .795(option causes)3.295 F .934
(output to be displayed in a format that may be reused as input.)144
-710.4 R .934(If no ar)5.934 F .934(guments are gi)-.18 F -.15(ve)-.25 G
-.934(n, or if).15 F(only)144 722.4 Q F2<ad6c>2.821 E F0 .321
-(is supplied, information about remembered commands is printed.)2.821 F
-.322(The return status is true)5.322 F(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(59)187.615 E 0 Cg EP
+710.4 R .934(If no ar)5.934 F .935(guments are gi)-.18 F -.15(ve)-.25 G
+.935(n, or if).15 F(only)144 722.4 Q F2<ad6c>2.822 E F0 .322
+(is supplied, information about remembered commands is printed.)2.822 F
+.321(The return status is true)5.321 F(GNU Bash 4.3)72 768 Q
+(2013 October 20)141.235 E(59)190.395 E 0 Cg EP
%%Page: 60 60
%%BeginPageSetup
BP
-.35 E(unless a)144 84 Q/F1 10/Times-Italic@0 SF(name)2.86 E F0
(is not found or an in)2.68 E -.25(va)-.4 G(lid option is supplied.).25
E/F2 10/Times-Bold@0 SF(help)108 100.8 Q F0([)2.5 E F2(\255dms)A F0 2.5
-(][)C F1(pattern)-2.5 E F0(])A .867(Display helpful information about b)
+(][)C F1(pattern)-2.5 E F0(])A .866(Display helpful information about b)
144 112.8 R .867(uiltin commands.)-.2 F(If)5.867 E F1(pattern)4.617 E F0
-.866(is speci\214ed,)3.607 F F2(help)3.366 E F0(gi)3.366 E -.15(ve)-.25
-G 3.366(sd).15 G(etailed)-3.366 E .306(help on all commands matching)144
-124.8 R F1(pattern)2.806 E F0 2.807(;o).24 G .307
-(therwise help for all the b)-2.807 F .307
+.867(is speci\214ed,)3.607 F F2(help)3.367 E F0(gi)3.367 E -.15(ve)-.25
+G 3.367(sd).15 G(etailed)-3.367 E .307(help on all commands matching)144
+124.8 R F1(pattern)2.807 E F0 2.807(;o).24 G .307
+(therwise help for all the b)-2.807 F .306
(uiltins and shell control struc-)-.2 F(tures is printed.)144 136.8 Q F2
<ad64>144 148.8 Q F0(Display a short description of each)24.74 E F1
(pattern)2.5 E F2<ad6d>144 160.8 Q F0(Display the description of each)
-.37 E F0([)2.5 E F1(ar)A 2.5(g.)-.37 G(..)-2.5 E F0(])A -.4(Wi)144
278.4 S .752
(th no options, display the command history list with line numbers.).4 F
-.752(Lines listed with a)5.752 F F2(*)3.251 E F0(ha)3.251 E -.15(ve)-.2
-G .38(been modi\214ed.)144 290.4 R .38(An ar)5.38 F .38(gument of)-.18 F
-F1(n)3.24 E F0 .38(lists only the last)3.12 F F1(n)3.24 E F0 2.88
+.752(Lines listed with a)5.752 F F2(*)3.252 E F0(ha)3.252 E -.15(ve)-.2
+G .381(been modi\214ed.)144 290.4 R .38(An ar)5.38 F .38(gument of)-.18
+F F1(n)3.24 E F0 .38(lists only the last)3.12 F F1(n)3.24 E F0 2.88
(lines. If)3.12 F .38(the shell v)2.88 F(ariable)-.25 E/F3 9
-/Times-Bold@0 SF(HISTTIMEFOR-)2.881 E(MA)144 302.4 Q(T)-.855 E F0 .265
-(is set and not null, it is used as a format string for)2.515 F F1
-(strftime)2.764 E F0 .264(\(3\) to display the time stamp asso-)B 1.019
+/Times-Bold@0 SF(HISTTIMEFOR-)2.88 E(MA)144 302.4 Q(T)-.855 E F0 .264
+(is set and not null, it is used as a format string for)2.514 F F1
+(strftime)2.765 E F0 .265(\(3\) to display the time stamp asso-)B 1.02
(ciated with each displayed history entry)144 314.4 R 6.019(.N)-.65 G
3.519(oi)-6.019 G(nterv)-3.519 E 1.019
(ening blank is printed between the formatted)-.15 F .176
(wing meanings:)-.25 E F2<ad63>144 350.4 Q F0
(Clear the history list by deleting all the entries.)25.86 E F2<ad64>144
362.4 Q F1(of)2.5 E(fset)-.18 E F0(Delete the history entry at position)
-180 374.4 Q F1(of)2.5 E(fset)-.18 E F0(.)A F2<ad61>144 386.4 Q F0 .598
-(Append the `)25.3 F(`ne)-.74 E(w')-.25 E 3.098('h)-.74 G .598
-(istory lines \(history lines entered since the be)-3.098 F .599
+180 374.4 Q F1(of)2.5 E(fset)-.18 E F0(.)A F2<ad61>144 386.4 Q F0 .599
+(Append the `)25.3 F(`ne)-.74 E(w')-.25 E 3.099('h)-.74 G .598
+(istory lines \(history lines entered since the be)-3.099 F .598
(ginning of the current)-.15 F F2(bash)180 398.4 Q F0
(session\) to the history \214le.)2.5 E F2<ad6e>144 410.4 Q F0 .854(Rea\
d the history lines not already read from the history \214le into the c\
-urrent history list.)24.74 F .772
+urrent history list.)24.74 F .773
(These are lines appended to the history \214le since the be)180 422.4 R
-.773(ginning of the current)-.15 F F2(bash)3.273 E F0(ses-)3.273 E
+.772(ginning of the current)-.15 F F2(bash)3.272 E F0(ses-)3.272 E
(sion.)180 434.4 Q F2<ad72>144 446.4 Q F0(Read the contents of the hist\
ory \214le and append them to the current history list.)25.86 E F2<ad77>
144 458.4 Q F0(Write the current history list to the history \214le, o)
23.08 E -.15(ve)-.15 G(rwriting the history \214le').15 E 2.5(sc)-.55 G
-(ontents.)-2.5 E F2<ad70>144 470.4 Q F0 .626
+(ontents.)-2.5 E F2<ad70>144 470.4 Q F0 .625
(Perform history substitution on the follo)24.74 F(wing)-.25 E F1(ar)
-3.125 E(gs)-.37 E F0 .625(and display the result on the standard)3.125 F
+3.125 E(gs)-.37 E F0 .626(and display the result on the standard)3.125 F
2.975(output. Does)180 482.4 R .475
(not store the results in the history list.)2.975 F(Each)5.475 E F1(ar)
2.975 E(g)-.37 E F0 .475(must be quoted to disable)2.975 F
(normal history e)180 494.4 Q(xpansion.)-.15 E F2<ad73>144 506.4 Q F0
-.363(Store the)26.41 F F1(ar)3.193 E(gs)-.37 E F0 .363
-(in the history list as a single entry)3.133 F 5.363(.T)-.65 G .362
+.362(Store the)26.41 F F1(ar)3.192 E(gs)-.37 E F0 .363
+(in the history list as a single entry)3.132 F 5.363(.T)-.65 G .363
(he last command in the history list is)-5.363 F(remo)180 518.4 Q -.15
(ve)-.15 G 2.5(db).15 G(efore the)-2.5 E F1(ar)2.83 E(gs)-.37 E F0
-(are added.)2.77 E .145(If the)144 535.2 R F3(HISTTIMEFORMA)2.645 E(T)
+(are added.)2.77 E .146(If the)144 535.2 R F3(HISTTIMEFORMA)2.645 E(T)
-.855 E F0 -.25(va)2.395 G .145
(riable is set, the time stamp information associated with each history)
-.25 F .669(entry is written to the history \214le, mark)144 547.2 R .669
-(ed with the history comment character)-.1 F 5.668(.W)-.55 G .668
-(hen the history)-5.668 F .955(\214le is read, lines be)144 559.2 R .956
-(ginning with the history comment character follo)-.15 F .956
-(wed immediately by a digit)-.25 F .416
+.25 F .668(entry is written to the history \214le, mark)144 547.2 R .669
+(ed with the history comment character)-.1 F 5.669(.W)-.55 G .669
+(hen the history)-5.669 F .956(\214le is read, lines be)144 559.2 R .956
+(ginning with the history comment character follo)-.15 F .955
+(wed immediately by a digit)-.25 F .415
(are interpreted as timestamps for the pre)144 571.2 R .416
-(vious history line.)-.25 F .416(The return v)5.416 F .415
+(vious history line.)-.25 F .416(The return v)5.416 F .416
(alue is 0 unless an in)-.25 F -.25(va)-.4 G(lid).25 E .499(option is e\
ncountered, an error occurs while reading or writing the history \214le\
-, an in)144 583.2 R -.25(va)-.4 G(lid).25 E F1(of)3 E(fset)-.18 E F0(is)
-3 E(supplied as an ar)144 595.2 Q(gument to)-.18 E F2<ad64>2.5 E F0 2.5
-(,o)C 2.5(rt)-2.5 G(he history e)-2.5 E(xpansion supplied as an ar)-.15
-E(gument to)-.18 E F2<ad70>2.5 E F0 -.1(fa)2.5 G(ils.).1 E F2(jobs)108
-612 Q F0([)2.5 E F2(\255lnprs)A F0 2.5(][)C F1(jobspec)A F0(... ])2.5 E
-F2(jobs \255x)108 624 Q F1(command)2.5 E F0([)2.5 E F1(ar)2.5 E(gs)-.37
-E F0(... ])2.5 E(The \214rst form lists the acti)144 636 Q .3 -.15(ve j)
--.25 H 2.5(obs. The).15 F(options ha)2.5 E .3 -.15(ve t)-.2 H(he follo)
-.15 E(wing meanings:)-.25 E F2<ad6c>144 648 Q F0
+, an in)144 583.2 R -.25(va)-.4 G(lid).25 E F1(of)2.999 E(fset)-.18 E F0
+(is)2.999 E(supplied as an ar)144 595.2 Q(gument to)-.18 E F2<ad64>2.5 E
+F0 2.5(,o)C 2.5(rt)-2.5 G(he history e)-2.5 E
+(xpansion supplied as an ar)-.15 E(gument to)-.18 E F2<ad70>2.5 E F0 -.1
+(fa)2.5 G(ils.).1 E F2(jobs)108 612 Q F0([)2.5 E F2(\255lnprs)A F0 2.5
+(][)C F1(jobspec)A F0(... ])2.5 E F2(jobs \255x)108 624 Q F1(command)2.5
+E F0([)2.5 E F1(ar)2.5 E(gs)-.37 E F0(... ])2.5 E
+(The \214rst form lists the acti)144 636 Q .3 -.15(ve j)-.25 H 2.5
+(obs. The).15 F(options ha)2.5 E .3 -.15(ve t)-.2 H(he follo).15 E
+(wing meanings:)-.25 E F2<ad6c>144 648 Q F0
(List process IDs in addition to the normal information.)27.52 E F2
-<ad6e>144 660 Q F0 .194(Display information only about jobs that ha)
-24.74 F .494 -.15(ve c)-.2 H .193(hanged status since the user w).15 F
-.193(as last noti-)-.1 F(\214ed of their status.)180 672 Q F2<ad70>144
+<ad6e>144 660 Q F0 .193(Display information only about jobs that ha)
+24.74 F .494 -.15(ve c)-.2 H .194(hanged status since the user w).15 F
+.194(as last noti-)-.1 F(\214ed of their status.)180 672 Q F2<ad70>144
684 Q F0(List only the process ID of the job')24.74 E 2.5(sp)-.55 G
(rocess group leader)-2.5 E(.)-.55 E F2<ad72>144 696 Q F0
(Display only running jobs.)25.86 E F2<ad73>144 708 Q F0
-(Display only stopped jobs.)26.41 E(If)144 724.8 Q F1(jobspec)4.553 E F0
-.313(is gi)3.123 F -.15(ve)-.25 G .313
-(n, output is restricted to information about that job).15 F 5.314(.T)
--.4 G .314(he return status is 0 unless)-5.314 F(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(60)187.615 E 0 Cg EP
+(Display only stopped jobs.)26.41 E(If)144 724.8 Q F1(jobspec)4.554 E F0
+.314(is gi)3.124 F -.15(ve)-.25 G .314
+(n, output is restricted to information about that job).15 F 5.313(.T)
+-.4 G .313(he return status is 0 unless)-5.313 F(GNU Bash 4.3)72 768 Q
+(2013 October 20)141.235 E(60)190.395 E 0 Cg EP
%%Page: 61 61
%%BeginPageSetup
BP
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
-.35 E(an in)144 84 Q -.25(va)-.4 G(lid option is encountered or an in)
.25 E -.25(va)-.4 G(lid).25 E/F1 10/Times-Italic@0 SF(jobspec)4.24 E F0
-(is supplied.)2.81 E .395(If the)144 100.8 R/F2 10/Times-Bold@0 SF<ad78>
-2.895 E F0 .394(option is supplied,)2.894 F F2(jobs)2.894 E F0 .394
+(is supplied.)2.81 E .394(If the)144 100.8 R/F2 10/Times-Bold@0 SF<ad78>
+2.894 E F0 .394(option is supplied,)2.894 F F2(jobs)2.894 E F0 .394
(replaces an)2.894 F(y)-.15 E F1(jobspec)4.634 E F0 .394(found in)3.204
-F F1(command)3.094 E F0(or)3.664 E F1(ar)3.224 E(gs)-.37 E F0 .394
+F F1(command)3.094 E F0(or)3.664 E F1(ar)3.224 E(gs)-.37 E F0 .395
(with the corre-)3.164 F(sponding process group ID, and e)144 112.8 Q
-.15(xe)-.15 G(cutes).15 E F1(command)2.7 E F0(passing it)3.27 E F1(ar)
2.5 E(gs)-.37 E F0 2.5(,r).27 G(eturning its e)-2.5 E(xit status.)-.15 E
<ad6e>2.5 E F1(signum)2.5 E F0(|)2.5 E F2<ad>2.5 E F1(sigspec)A F0 2.5
(][)C F1(pid)-2.5 E F0(|)2.5 E F1(jobspec)2.5 E F0 2.5(].)C(..)-2.5 E F2
(kill \255l)108 141.6 Q F0([)2.5 E F1(sigspec)A F0(|)2.5 E F1 -.2(ex)2.5
-G(it_status).2 E F0(])A .119(Send the signal named by)144 153.6 R F1
-(sigspec)2.959 E F0(or)2.929 E F1(signum)2.959 E F0 .119
-(to the processes named by)2.939 F F1(pid)3.87 E F0(or)3.39 E F1
-(jobspec)2.62 E F0(.).31 E F1(sigspec)5.46 E F0(is)2.93 E .319
-(either a case-insensiti)144 165.6 R .619 -.15(ve s)-.25 H .319
-(ignal name such as).15 F/F3 9/Times-Bold@0 SF(SIGKILL)2.819 E F0 .318
-(\(with or without the)2.569 F F3(SIG)2.818 E F0 .318
-(pre\214x\) or a signal)2.568 F(number;)144 177.6 Q F1(signum)4.188 E F0
-1.349(is a signal number)4.168 F 6.349(.I)-.55 G(f)-6.349 E F1(sigspec)
+G(it_status).2 E F0(])A .12(Send the signal named by)144 153.6 R F1
+(sigspec)2.96 E F0(or)2.93 E F1(signum)2.96 E F0 .119
+(to the processes named by)2.939 F F1(pid)3.869 E F0(or)3.389 E F1
+(jobspec)2.619 E F0(.).31 E F1(sigspec)5.459 E F0(is)2.929 E .318
+(either a case-insensiti)144 165.6 R .618 -.15(ve s)-.25 H .318
+(ignal name such as).15 F/F3 9/Times-Bold@0 SF(SIGKILL)2.818 E F0 .319
+(\(with or without the)2.569 F F3(SIG)2.819 E F0 .319
+(pre\214x\) or a signal)2.569 F(number;)144 177.6 Q F1(signum)4.189 E F0
+1.349(is a signal number)4.169 F 6.349(.I)-.55 G(f)-6.349 E F1(sigspec)
4.189 E F0 1.349(is not present, then)4.159 F F3(SIGTERM)3.849 E F0
-1.349(is assumed.)3.599 F(An)6.349 E(ar)144 189.6 Q .523(gument of)-.18
+1.348(is assumed.)3.599 F(An)6.348 E(ar)144 189.6 Q .522(gument of)-.18
F F2<ad6c>3.023 E F0 .523(lists the signal names.)3.023 F .523(If an)
5.523 F 3.023(ya)-.15 G -.18(rg)-3.023 G .523(uments are supplied when)
.18 F F2<ad6c>3.023 E F0 .523(is gi)3.023 F -.15(ve)-.25 G .523
(n, the names).15 F .28(of the signals corresponding to the ar)144 201.6
R .28(guments are listed, and the return status is 0.)-.18 F(The)5.28 E
-F1 -.2(ex)2.78 G(it_status).2 E F0(ar)144 213.6 Q .378(gument to)-.18 F
-F2<ad6c>2.878 E F0 .378
-(is a number specifying either a signal number or the e)2.878 F .377
-(xit status of a process termi-)-.15 F .593(nated by a signal.)144 225.6
+F1 -.2(ex)2.78 G(it_status).2 E F0(ar)144 213.6 Q .377(gument to)-.18 F
+F2<ad6c>2.877 E F0 .378
+(is a number specifying either a signal number or the e)2.877 F .378
+(xit status of a process termi-)-.15 F .594(nated by a signal.)144 225.6
R F2(kill)5.593 E F0 .593(returns true if at least one signal w)3.093 F
-.593(as successfully sent, or f)-.1 F .594(alse if an error)-.1 F
+.593(as successfully sent, or f)-.1 F .593(alse if an error)-.1 F
(occurs or an in)144 237.6 Q -.25(va)-.4 G(lid option is encountered.)
.25 E F2(let)108 254.4 Q F1(ar)2.5 E(g)-.37 E F0([)2.5 E F1(ar)A(g)-.37
-E F0(...])2.5 E(Each)144 266.4 Q F1(ar)3.027 E(g)-.37 E F0 .197
-(is an arithmetic e)2.917 F .197(xpression to be e)-.15 F -.25(va)-.25 G
-.196(luated \(see).25 F F3 .196(ARITHMETIC EV)2.696 F(ALU)-1.215 E -.855
-(AT)-.54 G(ION).855 E F0(abo)2.446 E -.15(ve)-.15 G 2.696(\). If).15 F
+E F0(...])2.5 E(Each)144 266.4 Q F1(ar)3.026 E(g)-.37 E F0 .196
+(is an arithmetic e)2.916 F .197(xpression to be e)-.15 F -.25(va)-.25 G
+.197(luated \(see).25 F F3 .197(ARITHMETIC EV)2.697 F(ALU)-1.215 E -.855
+(AT)-.54 G(ION).855 E F0(abo)2.447 E -.15(ve)-.15 G 2.697(\). If).15 F
(the last)144 278.4 Q F1(ar)2.83 E(g)-.37 E F0 -.25(eva)2.72 G
(luates to 0,).25 E F2(let)2.5 E F0(returns 1; 0 is returned otherwise.)
2.5 E F2(local)108 295.2 Q F0([)2.5 E F1(option)A F0 2.5(][)C F1(name)
2.56(re).15 G .06(ach ar)-2.56 F .06(gument, a local v)-.18 F .06
(ariable named)-.25 F F1(name)2.92 E F0 .06(is created, and assigned)
2.74 F F1(value)2.56 E F0 5.06(.T).18 G(he)-5.06 E F1(option)2.56 E F0
-.06(can be)2.56 F(an)144 319.2 Q 3.153(yo)-.15 G 3.153(ft)-3.153 G .653
-(he options accepted by)-3.153 F F2(declar)3.153 E(e)-.18 E F0 5.652(.W)
-C(hen)-5.652 E F2(local)3.152 E F0 .652
+.06(can be)2.56 F(an)144 319.2 Q 3.152(yo)-.15 G 3.152(ft)-3.152 G .652
+(he options accepted by)-3.152 F F2(declar)3.152 E(e)-.18 E F0 5.652(.W)
+C(hen)-5.652 E F2(local)3.152 E F0 .653
(is used within a function, it causes the v)3.152 F(ari-)-.25 E(able)144
-331.2 Q F1(name)3.72 E F0 .86(to ha)3.54 F 1.16 -.15(ve a v)-.2 H .861
-(isible scope restricted to that function and its children.).15 F -.4
-(Wi)5.861 G .861(th no operands,).4 F F2(local)144 343.2 Q F0 1.165
-(writes a list of local v)3.665 F 1.165
+331.2 Q F1(name)3.721 E F0 .861(to ha)3.541 F 1.161 -.15(ve a v)-.2 H
+.861(isible scope restricted to that function and its children.).15 F
+-.4(Wi)5.86 G .86(th no operands,).4 F F2(local)144 343.2 Q F0 1.164
+(writes a list of local v)3.664 F 1.165
(ariables to the standard output.)-.25 F 1.165(It is an error to use)
-6.165 F F2(local)3.664 E F0 1.164(when not)3.664 F .232
-(within a function.)144 355.2 R .233(The return status is 0 unless)5.232
+6.165 F F2(local)3.665 E F0 1.165(when not)3.665 F .233
+(within a function.)144 355.2 R .233(The return status is 0 unless)5.233
F F2(local)2.733 E F0 .233(is used outside a function, an in)2.733 F
--.25(va)-.4 G(lid).25 E F1(name)3.093 E F0(is)2.913 E(supplied, or)144
+-.25(va)-.4 G(lid).25 E F1(name)3.092 E F0(is)2.912 E(supplied, or)144
367.2 Q F1(name)2.5 E F0(is a readonly v)2.5 E(ariable.)-.25 E F2
(logout)108 384 Q F0(Exit a login shell.)9.33 E F2(map\214le)108 400.8 Q
F0([)2.5 E F2<ad6e>A F1(count)2.5 E F0 2.5(][)C F2<ad4f>-2.5 E F1
-2.5 E F1(origin)2.5 E F0 2.5(][)C F2<ad73>-2.5 E F1(count)2.5 E F0 2.5
(][)C F2<ad74>-2.5 E F0 2.5(][)C F2<ad75>-2.5 E F1(fd)2.5 E F0 2.5(][)C
F2<ad43>-2.5 E F1(callbac)2.5 E(k)-.2 E F0 2.5(][)C F2<ad63>-2.5 E F1
-(quantum)2.5 E F0 2.5(][)C F1(arr)-2.5 E(ay)-.15 E F0(])A .351
+(quantum)2.5 E F0 2.5(][)C F1(arr)-2.5 E(ay)-.15 E F0(])A .35
(Read lines from the standard input into the inde)144 424.8 R -.15(xe)
--.15 G 2.851(da).15 G .351(rray v)-2.851 F(ariable)-.25 E F1(arr)2.85 E
-(ay)-.15 E F0 2.85(,o).32 G 2.85(rf)-2.85 G .35(rom \214le descriptor)
--2.85 F F1(fd)2.85 E F0 1.248(if the)144 436.8 R F2<ad75>3.748 E F0
-1.248(option is supplied.)3.748 F 1.249(The v)6.249 F(ariable)-.25 E F3
-(MAPFILE)3.749 E F0 1.249(is the def)3.499 F(ault)-.1 E F1(arr)3.749 E
-(ay)-.15 E F0 6.249(.O)C 1.249(ptions, if supplied,)-6.249 F(ha)144
-448.8 Q .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F2<ad6e>
-144 460.8 Q F0(Cop)24.74 E 2.5(ya)-.1 G 2.5(tm)-2.5 G(ost)-2.5 E F1
-(count)2.7 E F0 2.5(lines. If)3.18 F F1(count)2.5 E F0
-(is 0, all lines are copied.)2.5 E F2<ad4f>144 472.8 Q F0(Be)22.52 E
-(gin assigning to)-.15 E F1(arr)2.83 E(ay)-.15 E F0(at inde)2.82 E(x)
--.15 E F1(origin)2.5 E F0 5(.T).24 G(he def)-5 E(ault inde)-.1 E 2.5(xi)
--.15 G 2.5(s0)-2.5 G(.)-2.5 E F2<ad73>144 484.8 Q F0
+-.15 G 2.851(da).15 G .351(rray v)-2.851 F(ariable)-.25 E F1(arr)2.851 E
+(ay)-.15 E F0 2.851(,o).32 G 2.851(rf)-2.851 G .351
+(rom \214le descriptor)-2.851 F F1(fd)2.851 E F0 1.249(if the)144 436.8
+R F2<ad75>3.749 E F0 1.249(option is supplied.)3.749 F 1.249(The v)6.249
+F(ariable)-.25 E F3(MAPFILE)3.749 E F0 1.249(is the def)3.499 F(ault)-.1
+E F1(arr)3.748 E(ay)-.15 E F0 6.248(.O)C 1.248(ptions, if supplied,)
+-6.248 F(ha)144 448.8 Q .3 -.15(ve t)-.2 H(he follo).15 E
+(wing meanings:)-.25 E F2<ad6e>144 460.8 Q F0(Cop)24.74 E 2.5(ya)-.1 G
+2.5(tm)-2.5 G(ost)-2.5 E F1(count)2.7 E F0 2.5(lines. If)3.18 F F1
+(count)2.5 E F0(is 0, all lines are copied.)2.5 E F2<ad4f>144 472.8 Q F0
+(Be)22.52 E(gin assigning to)-.15 E F1(arr)2.83 E(ay)-.15 E F0(at inde)
+2.82 E(x)-.15 E F1(origin)2.5 E F0 5(.T).24 G(he def)-5 E(ault inde)-.1
+E 2.5(xi)-.15 G 2.5(s0)-2.5 G(.)-2.5 E F2<ad73>144 484.8 Q F0
(Discard the \214rst)26.41 E F1(count)2.5 E F0(lines read.)2.5 E F2
<ad74>144 496.8 Q F0(Remo)26.97 E .3 -.15(ve a t)-.15 H(railing ne).15 E
(wline from each line read.)-.25 E F2<ad75>144 508.8 Q F0
2.5 E F0(lines are read.)2.5 E(The)5 E F2<ad63>2.5 E F0
(option speci\214es)2.5 E F1(quantum)2.5 E F0(.).32 E F2<ad63>144 532.8
Q F0(Specify the number of lines read between each call to)25.86 E F1
-(callbac)2.5 E(k)-.2 E F0(.).67 E(If)144 549.6 Q F2<ad43>2.968 E F0 .467
+(callbac)2.5 E(k)-.2 E F0(.).67 E(If)144 549.6 Q F2<ad43>2.967 E F0 .467
(is speci\214ed without)2.967 F F2<ad63>2.967 E F0 2.967(,t)C .467
(he def)-2.967 F .467(ault quantum is 5000.)-.1 F(When)5.467 E F1
(callbac)2.967 E(k)-.2 E F0 .467(is e)2.967 F -.25(va)-.25 G .467
-(luated, it is sup-).25 F .261(plied the inde)144 561.6 R 2.761(xo)-.15
-G 2.761(ft)-2.761 G .261(he ne)-2.761 F .262(xt array element to be ass\
-igned and the line to be assigned to that element)-.15 F .275
-(as additional ar)144 573.6 R(guments.)-.18 E F1(callbac)5.275 E(k)-.2 E
-F0 .275(is e)2.775 F -.25(va)-.25 G .274
-(luated after the line is read b).25 F .274
+(luated, it is sup-).25 F .262(plied the inde)144 561.6 R 2.762(xo)-.15
+G 2.762(ft)-2.762 G .262(he ne)-2.762 F .261(xt array element to be ass\
+igned and the line to be assigned to that element)-.15 F .274
+(as additional ar)144 573.6 R(guments.)-.18 E F1(callbac)5.274 E(k)-.2 E
+F0 .274(is e)2.774 F -.25(va)-.25 G .274
+(luated after the line is read b).25 F .275
(ut before the array element is)-.2 F(assigned.)144 585.6 Q
(If not supplied with an e)144 602.4 Q(xplicit origin,)-.15 E F2
(map\214le)2.5 E F0(will clear)2.5 E F1(arr)2.5 E(ay)-.15 E F0
-(before assigning to it.)2.5 E F2(map\214le)144 619.2 Q F0 1.905
-(returns successfully unless an in)4.405 F -.25(va)-.4 G 1.905
-(lid option or option ar).25 F 1.906(gument is supplied,)-.18 F F1(arr)
-4.406 E(ay)-.15 E F0(is)4.406 E(in)144 631.2 Q -.25(va)-.4 G
+(before assigning to it.)2.5 E F2(map\214le)144 619.2 Q F0 1.906
+(returns successfully unless an in)4.406 F -.25(va)-.4 G 1.905
+(lid option or option ar).25 F 1.905(gument is supplied,)-.18 F F1(arr)
+4.405 E(ay)-.15 E F0(is)4.405 E(in)144 631.2 Q -.25(va)-.4 G
(lid or unassignable, or if).25 E F1(arr)2.5 E(ay)-.15 E F0
(is not an inde)2.5 E -.15(xe)-.15 G 2.5(da).15 G(rray)-2.5 E(.)-.65 E
F2(popd)108 648 Q F0<5bad>2.5 E F2(n)A F0 2.5(][)C(+)-2.5 E F1(n)A F0
-2.5(][)C<ad>-2.5 E F1(n)A F0(])A(Remo)144 660 Q -.15(ve)-.15 G 2.8(se)
-.15 G .3(ntries from the directory stack.)-2.8 F -.4(Wi)5.299 G .299
+2.5(][)C<ad>-2.5 E F1(n)A F0(])A(Remo)144 660 Q -.15(ve)-.15 G 2.799(se)
+.15 G .299(ntries from the directory stack.)-2.799 F -.4(Wi)5.299 G .299
(th no ar).4 F .299(guments, remo)-.18 F -.15(ve)-.15 G 2.799(st).15 G
-.299(he top directory from the)-2.799 F 1.478(stack, and performs a)144
-672 R F2(cd)3.978 E F0 1.479(to the ne)3.978 F 3.979(wt)-.25 G 1.479
-(op directory)-3.979 F 6.479(.A)-.65 G -.18(rg)-6.479 G 1.479
-(uments, if supplied, ha).18 F 1.779 -.15(ve t)-.2 H 1.479(he follo).15
+.3(he top directory from the)-2.799 F 1.479(stack, and performs a)144
+672 R F2(cd)3.979 E F0 1.479(to the ne)3.979 F 3.979(wt)-.25 G 1.479
+(op directory)-3.979 F 6.479(.A)-.65 G -.18(rg)-6.479 G 1.478
+(uments, if supplied, ha).18 F 1.778 -.15(ve t)-.2 H 1.478(he follo).15
F(wing)-.25 E(meanings:)144 684 Q F2<ad6e>144 696 Q F0 .551
(Suppresses the normal change of directory when remo)24.74 F .551
(ving directories from the stack, so)-.15 F
(that only the stack is manipulated.)180 708 Q(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(61)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(61)190.395 E 0 Cg EP
%%Page: 62 62
%%BeginPageSetup
BP
S 2.5(re).15 G(xample:)-2.65 E/F3 10/Courier@0 SF(popd +0)2.5 E F0(remo)
2.5 E -.15(ve)-.15 G 2.5(st).15 G(he \214rst directory)-2.5 E(,)-.65 E
F3(popd +1)2.5 E F0(the second.)2.5 E F1<ad>144 108 Q F2(n)A F0(Remo)
-25.3 E -.15(ve)-.15 G 3.76(st).15 G(he)-3.76 E F2(n)3.76 E F0 1.259
-(th entry counting from the right of the list sho)B 1.259(wn by)-.25 F
-F1(dirs)3.759 E F0 3.759(,s)C 1.259(tarting with)-3.759 F 2.5(zero. F)
-180 120 R(or e)-.15 E(xample:)-.15 E F3(popd -0)2.5 E F0(remo)2.5 E -.15
-(ve)-.15 G 2.5(st).15 G(he last directory)-2.5 E(,)-.65 E F3(popd -1)2.5
-E F0(the ne)2.5 E(xt to last.)-.15 E .643(If the)144 136.8 R F1(popd)
-3.143 E F0 .643(command is successful, a)3.143 F F1(dirs)3.143 E F0 .644
-(is performed as well, and the return status is 0.)3.143 F F1(popd)5.644
-E F0 .416(returns f)144 148.8 R .416(alse if an in)-.1 F -.25(va)-.4 G
-.415(lid option is encountered, the directory stack is empty).25 F 2.915
-(,an)-.65 G(on-e)-2.915 E .415(xistent direc-)-.15 F
+25.3 E -.15(ve)-.15 G 3.759(st).15 G(he)-3.759 E F2(n)3.759 E F0 1.259
+(th entry counting from the right of the list sho)B 1.26(wn by)-.25 F F1
+(dirs)3.76 E F0 3.76(,s)C 1.26(tarting with)-3.76 F 2.5(zero. F)180 120
+R(or e)-.15 E(xample:)-.15 E F3(popd -0)2.5 E F0(remo)2.5 E -.15(ve)-.15
+G 2.5(st).15 G(he last directory)-2.5 E(,)-.65 E F3(popd -1)2.5 E F0
+(the ne)2.5 E(xt to last.)-.15 E .644(If the)144 136.8 R F1(popd)3.144 E
+F0 .644(command is successful, a)3.144 F F1(dirs)3.143 E F0 .643
+(is performed as well, and the return status is 0.)3.143 F F1(popd)5.643
+E F0 .415(returns f)144 148.8 R .415(alse if an in)-.1 F -.25(va)-.4 G
+.415(lid option is encountered, the directory stack is empty).25 F 2.916
+(,an)-.65 G(on-e)-2.916 E .416(xistent direc-)-.15 F
(tory stack entry is speci\214ed, or the directory change f)144 160.8 Q
(ails.)-.1 E F1(printf)108 177.6 Q F0([)2.5 E F1<ad76>A F2(var)2.5 E F0
-(])A F2(format)2.5 E F0([)2.5 E F2(ar)A(guments)-.37 E F0(])A 1.436
-(Write the formatted)144 189.6 R F2(ar)3.936 E(guments)-.37 E F0 1.437
-(to the standard output under the control of the)3.936 F F2(format)3.937
-E F0 6.437(.T)C(he)-6.437 E F1<ad76>3.937 E F0 .126
+(])A F2(format)2.5 E F0([)2.5 E F2(ar)A(guments)-.37 E F0(])A 1.437
+(Write the formatted)144 189.6 R F2(ar)3.937 E(guments)-.37 E F0 1.437
+(to the standard output under the control of the)3.937 F F2(format)3.936
+E F0 6.436(.T)C(he)-6.436 E F1<ad76>3.936 E F0 .126
(option causes the output to be assigned to the v)144 201.6 R(ariable)
-.25 E F2(var)2.626 E F0 .126(rather than being printed to the standard)
-2.626 F(output.)144 213.6 Q(The)144 237.6 Q F2(format)3.017 E F0 .517(i\
+2.626 F(output.)144 213.6 Q(The)144 237.6 Q F2(format)3.018 E F0 .517(i\
s a character string which contains three types of objects: plain chara\
-cters, which are)3.017 F .704(simply copied to standard output, charact\
-er escape sequences, which are con)144 249.6 R -.15(ve)-.4 G .703
+cters, which are)3.018 F .704(simply copied to standard output, charact\
+er escape sequences, which are con)144 249.6 R -.15(ve)-.4 G .704
(rted and copied to).15 F .036(the standard output, and format speci\
-\214cations, each of which causes printing of the ne)144 261.6 R .037
+\214cations, each of which causes printing of the ne)144 261.6 R .036
(xt successi)-.15 F -.15(ve)-.25 G F2(ar)144 273.6 Q(gument)-.37 E F0
-5.532(.I)C 3.032(na)-5.532 G .532(ddition to the standard)-3.032 F F2
-(printf)3.032 E F0 .532(\(1\) format speci\214cations,)B F1(printf)3.031
-E F0 .531(interprets the follo)3.031 F(w-)-.25 E(ing e)144 285.6 Q
+5.531(.I)C 3.031(na)-5.531 G .531(ddition to the standard)-3.031 F F2
+(printf)3.032 E F0 .532(\(1\) format speci\214cations,)B F1(printf)3.032
+E F0 .532(interprets the follo)3.032 F(w-)-.25 E(ing e)144 285.6 Q
(xtensions:)-.15 E F1(%b)144 297.6 Q F0(causes)20.44 E F1(printf)5.115 E
F0 2.615(to e)5.115 F 2.615
(xpand backslash escape sequences in the corresponding)-.15 F F2(ar)
20.44 E F1(printf)2.51 E F0 .01(to output the corresponding)2.51 F F2
(ar)2.51 E(gument)-.37 E F0 .01(in a format that can be reused as shell)
2.51 F(input.)180 345.6 Q F1(%\()144 357.6 Q F2(datefmt)A F1(\)T)A F0
-(causes)180 369.6 Q F1(printf)4.404 E F0 1.904
-(to output the date-time string resulting from using)4.404 F F2(datefmt)
-4.404 E F0 1.903(as a format)4.404 F .38(string for)180 381.6 R F2
+(causes)180 369.6 Q F1(printf)4.403 E F0 1.904
+(to output the date-time string resulting from using)4.403 F F2(datefmt)
+4.404 E F0 1.904(as a format)4.404 F .381(string for)180 381.6 R F2
(strftime)2.881 E F0 2.881(\(3\). The)B(corresponding)2.881 E F2(ar)
2.881 E(gument)-.37 E F0 .381(is an inte)2.881 F .381
-(ger representing the number)-.15 F .458(of seconds since the epoch.)180
+(ger representing the number)-.15 F .457(of seconds since the epoch.)180
393.6 R -1 -.8(Tw o)5.458 H .458(special ar)3.758 F .458(gument v)-.18 F
-.458(alues may be used: -1 represents the)-.25 F .847
+.458(alues may be used: -1 represents the)-.25 F .848
(current time, and -2 represents the time the shell w)180 405.6 R .847
-(as in)-.1 F -.2(vo)-.4 G -.1(ke).2 G 3.348(d. If).1 F .848(no ar)3.348
-F .848(gument is speci-)-.18 F .355(\214ed, con)180 417.6 R -.15(ve)-.4
-G .355(rsion beha).15 F -.15(ve)-.2 G 2.855(sa).15 G 2.855(si)-2.855 G
-2.855(f-)-2.855 G 2.855(1h)-2.855 G .354(ad been gi)-2.855 F -.15(ve)
--.25 G 2.854(n. This).15 F .354(is an e)2.854 F .354
-(xception to the usual)-.15 F F1(printf)2.854 E F0(beha)180 429.6 Q
-(vior)-.2 E(.)-.55 E(Ar)144 446.4 Q .463(guments to non-string format s\
-peci\214ers are treated as C constants, e)-.18 F .464
-(xcept that a leading plus or)-.15 F 1.259(minus sign is allo)144 458.4
+(as in)-.1 F -.2(vo)-.4 G -.1(ke).2 G 3.347(d. If).1 F .847(no ar)3.347
+F .847(gument is speci-)-.18 F .354(\214ed, con)180 417.6 R -.15(ve)-.4
+G .354(rsion beha).15 F -.15(ve)-.2 G 2.854(sa).15 G 2.854(si)-2.854 G
+2.854(f-)-2.854 G 2.854(1h)-2.854 G .354(ad been gi)-2.854 F -.15(ve)
+-.25 G 2.854(n. This).15 F .355(is an e)2.854 F .355
+(xception to the usual)-.15 F F1(printf)2.855 E F0(beha)180 429.6 Q
+(vior)-.2 E(.)-.55 E(Ar)144 446.4 Q .464(guments to non-string format s\
+peci\214ers are treated as C constants, e)-.18 F .463
+(xcept that a leading plus or)-.15 F 1.258(minus sign is allo)144 458.4
R 1.259
(wed, and if the leading character is a single or double quote, the v)
--.25 F 1.258(alue is the)-.25 F(ASCII v)144 470.4 Q(alue of the follo)
--.25 E(wing character)-.25 E(.)-.55 E(The)144 487.2 Q F2(format)3.423 E
-F0 .923(is reused as necessary to consume all of the)3.423 F F2(ar)3.423
+-.25 F 1.259(alue is the)-.25 F(ASCII v)144 470.4 Q(alue of the follo)
+-.25 E(wing character)-.25 E(.)-.55 E(The)144 487.2 Q F2(format)3.424 E
+F0 .923(is reused as necessary to consume all of the)3.424 F F2(ar)3.423
E(guments)-.37 E F0 5.923(.I)C 3.423(ft)-5.923 G(he)-3.423 E F2(format)
-3.423 E F0 .924(requires more)3.424 F F2(ar)144 499.2 Q(guments)-.37 E
-F0 .033(than are supplied, the e)2.534 F .033
+3.423 E F0 .923(requires more)3.423 F F2(ar)144 499.2 Q(guments)-.37 E
+F0 .033(than are supplied, the e)2.533 F .033
(xtra format speci\214cations beha)-.15 F .333 -.15(ve a)-.2 H 2.533(si)
-.15 G 2.533(faz)-2.533 G .033(ero v)-2.533 F .033(alue or null string,)
+.15 G 2.533(faz)-2.533 G .033(ero v)-2.533 F .034(alue or null string,)
-.25 F(as appropriate, had been supplied.)144 511.2 Q(The return v)5 E
(alue is zero on success, non-zero on f)-.25 E(ailure.)-.1 E F1(pushd)
108 528 Q F0([)2.5 E F1<ad6e>A F0 2.5(][)C(+)-2.5 E F2(n)A F0 2.5(][)C
<ad>-2.5 E F2(n)A F0(])A F1(pushd)108 540 Q F0([)2.5 E F1<ad6e>A F0 2.5
-(][)C F2(dir)-2.5 E F0(])A .639(Adds a directory to the top of the dire\
-ctory stack, or rotates the stack, making the ne)144 552 R 3.14(wt)-.25
-G .64(op of the)-3.14 F 1.316(stack the current w)144 564 R 1.316
-(orking directory)-.1 F 6.316(.W)-.65 G 1.315(ith no ar)-6.716 F 1.315
-(guments, e)-.18 F 1.315(xchanges the top tw)-.15 F 3.815(od)-.1 G 1.315
-(irectories and)-3.815 F .871
+(][)C F2(dir)-2.5 E F0(])A .64(Adds a directory to the top of the direc\
+tory stack, or rotates the stack, making the ne)144 552 R 3.139(wt)-.25
+G .639(op of the)-3.139 F 1.315(stack the current w)144 564 R 1.315
+(orking directory)-.1 F 6.315(.W)-.65 G 1.315(ith no ar)-6.715 F 1.315
+(guments, e)-.18 F 1.316(xchanges the top tw)-.15 F 3.816(od)-.1 G 1.316
+(irectories and)-3.816 F .872
(returns 0, unless the directory stack is empty)144 576 R 5.871(.A)-.65
-G -.18(rg)-5.871 G .872(uments, if supplied, ha).18 F 1.172 -.15(ve t)
--.2 H .872(he follo).15 F .872(wing mean-)-.25 F(ings:)144 588 Q F1
+G -.18(rg)-5.871 G .871(uments, if supplied, ha).18 F 1.171 -.15(ve t)
+-.2 H .871(he follo).15 F .871(wing mean-)-.25 F(ings:)144 588 Q F1
<ad6e>144 600 Q F0 .902(Suppresses the normal change of directory when \
adding directories to the stack, so that)24.74 F
-(only the stack is manipulated.)180 612 Q F1(+)144 624 Q F2(n)A F0 1.267
-(Rotates the stack so that the)25.3 F F2(n)3.767 E F0 1.268
-(th directory \(counting from the left of the list sho)B 1.268(wn by)
+(only the stack is manipulated.)180 612 Q F1(+)144 624 Q F2(n)A F0 1.268
+(Rotates the stack so that the)25.3 F F2(n)3.768 E F0 1.267
+(th directory \(counting from the left of the list sho)B 1.267(wn by)
-.25 F F1(dirs)180 636 Q F0 2.5(,s)C(tarting with zero\) is at the top.)
-2.5 E F1<ad>144 648 Q F2(n)A F0 .92(Rotates the stack so that the)25.3
F F2(n)3.42 E F0 .92
(th directory \(counting from the right of the list sho)B .92(wn by)-.25
F F1(dirs)180 660 Q F0 2.5(,s)C(tarting with zero\) is at the top.)-2.5
-E F2(dir)144.35 672 Q F0(Adds)23.98 E F2(dir)3.137 E F0 .287
-(to the directory stack at the top, making it the ne)3.517 F 2.788(wc)
--.25 G .288(urrent w)-2.788 F .288(orking directory as)-.1 F
+E F2(dir)144.35 672 Q F0(Adds)23.98 E F2(dir)3.138 E F0 .288
+(to the directory stack at the top, making it the ne)3.518 F 2.787(wc)
+-.25 G .287(urrent w)-2.787 F .287(orking directory as)-.1 F
(if it had been supplied as the ar)180 684 Q(gument to the)-.18 E F1(cd)
-2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .489(If the)144 700.8 R F1(pushd)2.989
-E F0 .489(command is successful, a)2.989 F F1(dirs)2.988 E F0 .488
-(is performed as well.)2.988 F .488(If the \214rst form is used,)5.488 F
-F1(pushd)2.988 E F0 1.039(returns 0 unless the cd to)144 712.8 R F2(dir)
-3.889 E F0 -.1(fa)4.269 G 3.539(ils. W).1 F 1.039(ith the second form,)
--.4 F F1(pushd)3.54 E F0 1.04(returns 0 unless the directory)3.54 F .847
-(stack is empty)144 724.8 R 3.347(,an)-.65 G(on-e)-3.347 E .847(xistent\
+2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .488(If the)144 700.8 R F1(pushd)2.988
+E F0 .488(command is successful, a)2.988 F F1(dirs)2.988 E F0 .488
+(is performed as well.)2.988 F .489(If the \214rst form is used,)5.488 F
+F1(pushd)2.989 E F0 1.04(returns 0 unless the cd to)144 712.8 R F2(dir)
+3.89 E F0 -.1(fa)4.27 G 3.539(ils. W).1 F 1.039(ith the second form,)-.4
+F F1(pushd)3.539 E F0 1.039(returns 0 unless the directory)3.539 F .846
+(stack is empty)144 724.8 R 3.346(,an)-.65 G(on-e)-3.346 E .847(xistent\
directory stack element is speci\214ed, or the directory change to the)
--.15 F(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(62)187.615 E 0
-Cg EP
+-.15 F(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(62)190.395 E 0 Cg
+EP
%%Page: 63 63
%%BeginPageSetup
BP
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
-.35 E(speci\214ed ne)144 84 Q 2.5(wc)-.25 G(urrent directory f)-2.5 E
(ails.)-.1 E/F1 10/Times-Bold@0 SF(pwd)108 100.8 Q F0([)2.5 E F1(\255LP)
-A F0(])A .844(Print the absolute pathname of the current w)144 112.8 R
-.845(orking directory)-.1 F 5.845(.T)-.65 G .845
-(he pathname printed contains no)-5.845 F .182(symbolic links if the)144
+A F0(])A .845(Print the absolute pathname of the current w)144 112.8 R
+.845(orking directory)-.1 F 5.844(.T)-.65 G .844
+(he pathname printed contains no)-5.844 F .181(symbolic links if the)144
124.8 R F1<ad50>2.681 E F0 .181(option is supplied or the)2.681 F F1
.181(\255o ph)2.681 F(ysical)-.15 E F0 .181(option to the)2.681 F F1
-(set)2.681 E F0 -.2(bu)2.681 G .181(iltin command is).2 F 3.263
-(enabled. If)144 136.8 R(the)3.263 E F1<ad4c>3.263 E F0 .763
-(option is used, the pathname printed may contain symbolic links.)3.263
-F .764(The return)5.764 F 1.36(status is 0 unless an error occurs while\
+(set)2.681 E F0 -.2(bu)2.681 G .182(iltin command is).2 F 3.264
+(enabled. If)144 136.8 R(the)3.264 E F1<ad4c>3.264 E F0 .763
+(option is used, the pathname printed may contain symbolic links.)3.264
+F .763(The return)5.763 F 1.36(status is 0 unless an error occurs while\
reading the name of the current directory or an in)144 148.8 R -.25(va)
-.4 G(lid).25 E(option is supplied.)144 160.8 Q F1 -.18(re)108 177.6 S
-(ad).18 E F0([)3.816 E F1(\255ers)A F0 3.816(][)C F1<ad61>-3.816 E/F2 10
-/Times-Italic@0 SF(aname)3.816 E F0 3.816(][)C F1<ad64>-3.816 E F2
-(delim)3.816 E F0 3.816(][)C F1<ad69>-3.816 E F2(te)3.816 E(xt)-.2 E F0
-3.816(][)C F1<ad6e>-3.816 E F2(nc)3.816 E(har)-.15 E(s)-.1 E F0 3.817
-(][)C F1<ad4e>-3.817 E F2(nc)3.817 E(har)-.15 E(s)-.1 E F0 3.817(][)C F1
-<ad70>-3.817 E F2(pr)3.817 E(ompt)-.45 E F0 3.817(][)C F1<ad74>-3.817 E
-F2(timeout)3.817 E F0 3.817(][)C F1<ad75>-3.817 E F2(fd)3.817 E F0(])A
+(ad).18 E F0([)3.817 E F1(\255ers)A F0 3.817(][)C F1<ad61>-3.817 E/F2 10
+/Times-Italic@0 SF(aname)3.817 E F0 3.817(][)C F1<ad64>-3.817 E F2
+(delim)3.817 E F0 3.817(][)C F1<ad69>-3.817 E F2(te)3.817 E(xt)-.2 E F0
+3.817(][)C F1<ad6e>-3.817 E F2(nc)3.816 E(har)-.15 E(s)-.1 E F0 3.816
+(][)C F1<ad4e>-3.816 E F2(nc)3.816 E(har)-.15 E(s)-.1 E F0 3.816(][)C F1
+<ad70>-3.816 E F2(pr)3.816 E(ompt)-.45 E F0 3.816(][)C F1<ad74>-3.816 E
+F2(timeout)3.816 E F0 3.816(][)C F1<ad75>-3.816 E F2(fd)3.816 E F0(])A
([)108 189.6 Q F2(name)A F0(...])2.5 E .516(One line is read from the s\
tandard input, or from the \214le descriptor)144 201.6 R F2(fd)3.016 E
-F0 .516(supplied as an ar)3.016 F .517(gument to)-.18 F(the)144 213.6 Q
-F1<ad75>2.539 E F0 .039(option, and the \214rst w)2.539 F .038
-(ord is assigned to the \214rst)-.1 F F2(name)2.538 E F0 2.538(,t).18 G
-.038(he second w)-2.538 F .038(ord to the second)-.1 F F2(name)2.538 E
+F0 .516(supplied as an ar)3.016 F .516(gument to)-.18 F(the)144 213.6 Q
+F1<ad75>2.538 E F0 .038(option, and the \214rst w)2.538 F .038
+(ord is assigned to the \214rst)-.1 F F2(name)2.539 E F0 2.539(,t).18 G
+.039(he second w)-2.539 F .039(ord to the second)-.1 F F2(name)2.539 E
F0(,).18 E .42(and so on, with lefto)144 225.6 R -.15(ve)-.15 G 2.92(rw)
.15 G .42(ords and their interv)-3.02 F .42
(ening separators assigned to the last)-.15 F F2(name)2.92 E F0 5.42(.I)
-.18 G 2.92(ft)-5.42 G(here)-2.92 E .541(are fe)144 237.6 R .541(wer w)
--.25 F .541(ords read from the input stream than names, the remaining n\
-ames are assigned empty)-.1 F -.25(va)144 249.6 S 3.357(lues. The).25 F
-.857(characters in)3.357 F/F3 9/Times-Bold@0 SF(IFS)3.357 E F0 .857
+.18 G 2.92(ft)-5.42 G(here)-2.92 E .54(are fe)144 237.6 R .54(wer w)-.25
+F .541(ords read from the input stream than names, the remaining names \
+are assigned empty)-.1 F -.25(va)144 249.6 S 3.357(lues. The).25 F .857
+(characters in)3.357 F/F3 9/Times-Bold@0 SF(IFS)3.357 E F0 .857
(are used to split the line into w)3.107 F .857
-(ords using the same rules the shell)-.1 F .754(uses for e)144 261.6 R
+(ords using the same rules the shell)-.1 F .753(uses for e)144 261.6 R
.753(xpansion \(described abo)-.15 F 1.053 -.15(ve u)-.15 H(nder).15 E
F1 -.75(Wo)3.253 G .753(rd Splitting).75 F F0 3.253(\). The)B .753
-(backslash character \()3.253 F F1(\\)A F0 3.253(\)m)C .753(ay be)-3.253
-F .075(used to remo)144 273.6 R .375 -.15(ve a)-.15 H .375 -.15(ny s).15
-H .075(pecial meaning for the ne).15 F .076
-(xt character read and for line continuation.)-.15 F(Options,)5.076 E
+(backslash character \()3.253 F F1(\\)A F0 3.253(\)m)C .754(ay be)-3.253
+F .076(used to remo)144 273.6 R .376 -.15(ve a)-.15 H .376 -.15(ny s).15
+H .075(pecial meaning for the ne).15 F .075
+(xt character read and for line continuation.)-.15 F(Options,)5.075 E
(if supplied, ha)144 285.6 Q .3 -.15(ve t)-.2 H(he follo).15 E
-(wing meanings:)-.25 E F1<ad61>144 297.6 Q F2(aname)2.5 E F0 1.05(The w)
-180 309.6 R 1.049
+(wing meanings:)-.25 E F1<ad61>144 297.6 Q F2(aname)2.5 E F0 1.049
+(The w)180 309.6 R 1.049
(ords are assigned to sequential indices of the array v)-.1 F(ariable)
--.25 E F2(aname)3.549 E F0 3.549(,s).18 G 1.049(tarting at 0.)-3.549 F
-F2(aname)180.33 321.6 Q F0(is unset before an)2.68 E 2.5(yn)-.15 G .5
--.25(ew va)-2.5 H(lues are assigned.).25 E(Other)5 E F2(name)2.5 E F0
-(ar)2.5 E(guments are ignored.)-.18 E F1<ad64>144 333.6 Q F2(delim)2.5 E
-F0(The \214rst character of)180 345.6 Q F2(delim)2.5 E F0
+-.25 E F2(aname)3.55 E F0 3.55(,s).18 G 1.05(tarting at 0.)-3.55 F F2
+(aname)180.33 321.6 Q F0(is unset before an)2.68 E 2.5(yn)-.15 G .5 -.25
+(ew va)-2.5 H(lues are assigned.).25 E(Other)5 E F2(name)2.5 E F0(ar)2.5
+E(guments are ignored.)-.18 E F1<ad64>144 333.6 Q F2(delim)2.5 E F0
+(The \214rst character of)180 345.6 Q F2(delim)2.5 E F0
(is used to terminate the input line, rather than ne)2.5 E(wline.)-.25 E
-F1<ad65>144 357.6 Q F0 .372
+F1<ad65>144 357.6 Q F0 .373
(If the standard input is coming from a terminal,)25.86 F F1 -.18(re)
-2.873 G(adline).18 E F0(\(see)2.873 E F3(READLINE)2.873 E F0(abo)2.623 E
--.15(ve)-.15 G 2.873(\)i).15 G 2.873(su)-2.873 G(sed)-2.873 E .218
+2.873 G(adline).18 E F0(\(see)2.873 E F3(READLINE)2.872 E F0(abo)2.622 E
+-.15(ve)-.15 G 2.872(\)i).15 G 2.872(su)-2.872 G(sed)-2.872 E .218
(to obtain the line.)180 369.6 R .218
(Readline uses the current \(or def)5.218 F .218
(ault, if line editing w)-.1 F .218(as not pre)-.1 F(viously)-.25 E
(acti)180 381.6 Q -.15(ve)-.25 G 2.5(\)e).15 G(diting settings.)-2.5 E
-F1<ad69>144 393.6 Q F2(te)2.5 E(xt)-.2 E F0(If)10.78 E F1 -.18(re)2.715
-G(adline).18 E F0 .216(is being used to read the line,)2.715 F F2(te)
+F1<ad69>144 393.6 Q F2(te)2.5 E(xt)-.2 E F0(If)10.78 E F1 -.18(re)2.716
+G(adline).18 E F0 .216(is being used to read the line,)2.716 F F2(te)
2.716 E(xt)-.2 E F0 .216(is placed into the editing b)2.716 F(uf)-.2 E
-.216(fer before edit-)-.25 F(ing be)180 405.6 Q(gins.)-.15 E F1<ad6e>144
+.215(fer before edit-)-.25 F(ing be)180 405.6 Q(gins.)-.15 E F1<ad6e>144
417.6 Q F2(nc)2.5 E(har)-.15 E(s)-.1 E F1 -.18(re)180 429.6 S(ad).18 E
-F0 1.395(returns after reading)3.895 F F2(nc)3.895 E(har)-.15 E(s)-.1 E
-F0 1.395(characters rather than w)3.895 F 1.394
+F0 1.394(returns after reading)3.894 F F2(nc)3.894 E(har)-.15 E(s)-.1 E
+F0 1.395(characters rather than w)3.894 F 1.395
(aiting for a complete line of)-.1 F(input, b)180 441.6 Q
(ut honor a delimiter if fe)-.2 E(wer than)-.25 E F2(nc)2.5 E(har)-.15 E
(s)-.1 E F0(characters are read before the delimiter)2.5 E(.)-.55 E F1
<ad4e>144 453.6 Q F2(nc)2.5 E(har)-.15 E(s)-.1 E F1 -.18(re)180 465.6 S
-(ad).18 E F0 1.269(returns after reading e)3.769 F(xactly)-.15 E F2(nc)
+(ad).18 E F0 1.269(returns after reading e)3.77 F(xactly)-.15 E F2(nc)
3.769 E(har)-.15 E(s)-.1 E F0 1.269(characters rather than w)3.769 F
-1.27(aiting for a complete)-.1 F .275
+1.269(aiting for a complete)-.1 F .274
(line of input, unless EOF is encountered or)180 477.6 R F1 -.18(re)
-2.775 G(ad).18 E F0 .274(times out.)2.774 F .274
-(Delimiter characters encoun-)5.274 F 1.002
+2.775 G(ad).18 E F0 .275(times out.)2.775 F .275
+(Delimiter characters encoun-)5.275 F 1.003
(tered in the input are not treated specially and do not cause)180 489.6
-R F1 -.18(re)3.503 G(ad).18 E F0 1.003(to return until)3.503 F F2(nc)
-3.503 E(har)-.15 E(s)-.1 E F0(characters are read.)180 501.6 Q F1<ad70>
-144 513.6 Q F2(pr)2.5 E(ompt)-.45 E F0(Display)180 525.6 Q F2(pr)3.661 E
-(ompt)-.45 E F0 1.161(on standard error)3.661 F 3.661(,w)-.4 G 1.161
+R F1 -.18(re)3.502 G(ad).18 E F0 1.002(to return until)3.502 F F2(nc)
+3.502 E(har)-.15 E(s)-.1 E F0(characters are read.)180 501.6 Q F1<ad70>
+144 513.6 Q F2(pr)2.5 E(ompt)-.45 E F0(Display)180 525.6 Q F2(pr)3.66 E
+(ompt)-.45 E F0 1.161(on standard error)3.66 F 3.661(,w)-.4 G 1.161
(ithout a trailing ne)-3.661 F 1.161(wline, before attempting to read)
-.25 F(an)180 537.6 Q 2.5(yi)-.15 G 2.5(nput. The)-2.5 F
(prompt is displayed only if input is coming from a terminal.)2.5 E F1
-<ad72>144 549.6 Q F0 .543(Backslash does not act as an escape character)
-25.86 F 5.543(.T)-.55 G .544(he backslash is considered to be part of)
+<ad72>144 549.6 Q F0 .544(Backslash does not act as an escape character)
+25.86 F 5.543(.T)-.55 G .543(he backslash is considered to be part of)
-5.543 F(the line.)180 561.6 Q(In particular)5 E 2.5(,ab)-.4 G
(ackslash-ne)-2.5 E(wline pair may not be used as a line continuation.)
-.25 E F1<ad73>144 573.6 Q F0(Silent mode.)26.41 E
(If input is coming from a terminal, characters are not echoed.)5 E F1
-<ad74>144 585.6 Q F2(timeout)2.5 E F0(Cause)180 597.6 Q F1 -.18(re)2.929
-G(ad).18 E F0 .428(to time out and return f)2.929 F .428
-(ailure if a complete line of input \(or a speci\214ed num-)-.1 F .56
+<ad74>144 585.6 Q F2(timeout)2.5 E F0(Cause)180 597.6 Q F1 -.18(re)2.928
+G(ad).18 E F0 .428(to time out and return f)2.928 F .428
+(ailure if a complete line of input \(or a speci\214ed num-)-.1 F .561
(ber of characters\) is not read within)180 609.6 R F2(timeout)3.061 E
-F0(seconds.)3.061 E F2(timeout)5.561 E F0 .561(may be a decimal number)
+F0(seconds.)3.061 E F2(timeout)5.561 E F0 .56(may be a decimal number)
3.061 F(with a fractional portion follo)180 621.6 Q
(wing the decimal point.)-.25 E(This option is only ef)5 E(fecti)-.25 E
.3 -.15(ve i)-.25 H(f).15 E F1 -.18(re)2.5 G(ad).18 E F0 .506(is readin\
g input from a terminal, pipe, or other special \214le; it has no ef)180
-633.6 R .506(fect when reading)-.25 F .59(from re)180 645.6 R .59
-(gular \214les.)-.15 F(If)5.59 E F1 -.18(re)3.09 G(ad).18 E F0 .589
-(times out,)3.09 F F1 -.18(re)3.089 G(ad).18 E F0(sa)3.089 E -.15(ve)-.2
-G 3.089(sa).15 G .889 -.15(ny p)-3.089 H .589
+633.6 R .505(fect when reading)-.25 F .589(from re)180 645.6 R .589
+(gular \214les.)-.15 F(If)5.589 E F1 -.18(re)3.089 G(ad).18 E F0 .589
+(times out,)3.089 F F1 -.18(re)3.089 G(ad).18 E F0(sa)3.089 E -.15(ve)
+-.2 G 3.089(sa).15 G .889 -.15(ny p)-3.089 H .59
(artial input read into the speci\214ed).15 F -.25(va)180 657.6 S
(riable).25 E F2(name)2.77 E F0 5.27(.I)C(f)-5.27 E F2(timeout)2.77 E F0
.27(is 0,)2.77 F F1 -.18(re)2.77 G(ad).18 E F0 .27(returns immediately)
(on-zero other)-3.62 F(-)-.2 E 2.5(wise. The)180 681.6 R -.15(ex)2.5 G
(it status is greater than 128 if the timeout is e).15 E(xceeded.)-.15 E
F1<ad75>144 693.6 Q F2(fd)2.5 E F0(Read input from \214le descriptor)
-14.46 E F2(fd)2.5 E F0(.)A .191(If no)144 710.4 R F2(names)3.051 E F0
-.191(are supplied, the line read is assigned to the v)2.961 F(ariable)
--.25 E F3(REPL)2.692 E(Y)-.828 E/F4 9/Times-Roman@0 SF(.)A F0 .192
-(The return code is zero,)4.692 F 1.344
-(unless end-of-\214le is encountered,)144 722.4 R F1 -.18(re)3.844 G(ad)
+14.46 E F2(fd)2.5 E F0(.)A .192(If no)144 710.4 R F2(names)3.052 E F0
+.192(are supplied, the line read is assigned to the v)2.962 F(ariable)
+-.25 E F3(REPL)2.691 E(Y)-.828 E/F4 9/Times-Roman@0 SF(.)A F0 .191
+(The return code is zero,)4.691 F 1.343
+(unless end-of-\214le is encountered,)144 722.4 R F1 -.18(re)3.843 G(ad)
.18 E F0 1.343
-(times out \(in which case the return code is greater than)3.844 F
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(63)187.615 E 0 Cg EP
+(times out \(in which case the return code is greater than)3.843 F
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(63)190.395 E 0 Cg EP
%%Page: 64 64
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
--.35 E .871(128\), a v)144 84 R .871
+-.35 E .872(128\), a v)144 84 R .871
(ariable assignment error \(such as assigning to a readonly v)-.25 F
-.872(ariable\) occurs, or an in)-.25 F -.25(va)-.4 G(lid).25 E
+.871(ariable\) occurs, or an in)-.25 F -.25(va)-.4 G(lid).25 E
(\214le descriptor is supplied as the ar)144 96 Q(gument to)-.18 E/F1 10
/Times-Bold@0 SF<ad75>2.5 E F0(.)A F1 -.18(re)108 112.8 S(adonly).18 E
F0([)2.5 E F1(\255aAf)A F0 2.5(][)C F1<ad70>-2.5 E F0 2.5(][)C/F2 10
(..])-2.5 E .77(The gi)144 124.8 R -.15(ve)-.25 G(n).15 E F2(names)3.27
E F0 .77(are mark)3.27 F .77(ed readonly; the v)-.1 F .77
(alues of these)-.25 F F2(names)3.63 E F0 .77
-(may not be changed by subse-)3.54 F 1.096(quent assignment.)144 136.8 R
-1.096(If the)6.096 F F1<ad66>3.596 E F0 1.097
-(option is supplied, the functions corresponding to the)3.596 F F2
-(names)3.597 E F0 1.097(are so)3.597 F(mark)144 148.8 Q 3.334(ed. The)
+(may not be changed by subse-)3.54 F 1.097(quent assignment.)144 136.8 R
+1.097(If the)6.097 F F1<ad66>3.597 E F0 1.097
+(option is supplied, the functions corresponding to the)3.597 F F2
+(names)3.596 E F0 1.096(are so)3.596 F(mark)144 148.8 Q 3.334(ed. The)
-.1 F F1<ad61>3.334 E F0 .834(option restricts the v)3.334 F .834
(ariables to inde)-.25 F -.15(xe)-.15 G 3.334(da).15 G .834(rrays; the)
-3.334 F F1<ad41>3.334 E F0 .834(option restricts the v)3.334 F(ari-)
--.25 E .776(ables to associati)144 160.8 R 1.076 -.15(ve a)-.25 H 3.276
-(rrays. If).15 F .777(both options are supplied,)3.276 F F1<ad41>3.277 E
-F0(tak)3.277 E .777(es precedence.)-.1 F .777(If no)5.777 F F2(name)
-3.637 E F0(ar)3.457 E(gu-)-.18 E .522(ments are gi)144 172.8 R -.15(ve)
+-.25 E .777(ables to associati)144 160.8 R 1.077 -.15(ve a)-.25 H 3.277
+(rrays. If).15 F .777(both options are supplied,)3.277 F F1<ad41>3.277 E
+F0(tak)3.277 E .776(es precedence.)-.1 F .776(If no)5.776 F F2(name)
+3.636 E F0(ar)3.456 E(gu-)-.18 E .521(ments are gi)144 172.8 R -.15(ve)
-.25 G .521(n, or if the).15 F F1<ad70>3.021 E F0 .521
(option is supplied, a list of all readonly names is printed.)3.021 F
-.521(The other)5.521 F .295(options may be used to restrict the output \
-to a subset of the set of readonly names.)144 184.8 R(The)5.296 E F1
-<ad70>2.796 E F0(option)2.796 E .786
+.522(The other)5.521 F .295(options may be used to restrict the output \
+to a subset of the set of readonly names.)144 184.8 R(The)5.295 E F1
+<ad70>2.795 E F0(option)2.795 E .786
(causes output to be displayed in a format that may be reused as input.)
-144 196.8 R .786(If a v)5.786 F .785(ariable name is fol-)-.25 F(lo)144
-208.8 Q .717(wed by =)-.25 F F2(wor)A(d)-.37 E F0 3.218(,t)C .718(he v)
+144 196.8 R .786(If a v)5.786 F .786(ariable name is fol-)-.25 F(lo)144
+208.8 Q .718(wed by =)-.25 F F2(wor)A(d)-.37 E F0 3.218(,t)C .718(he v)
-3.218 F .718(alue of the v)-.25 F .718(ariable is set to)-.25 F F2(wor)
3.218 E(d)-.37 E F0 5.718(.T)C .718(he return status is 0 unless an in)
-5.718 F -.25(va)-.4 G(lid).25 E .26(option is encountered, one of the)
-.25 F .26(ariable name, or)-.25 F F1<ad66>2.76 E F0 .26
(is supplied with a)2.76 F F2(name)144.36 232.8 Q F0
(that is not a function.)2.68 E F1 -.18(re)108 249.6 S(tur).18 E(n)-.15
-E F0([)2.5 E F2(n)A F0(])A .02(Causes a function to stop e)144 261.6 R
--.15(xe)-.15 G .02(cuting and return the v).15 F .021
-(alue speci\214ed by)-.25 F F2(n)2.881 E F0 .021(to its caller)2.761 F
-5.021(.I)-.55 G(f)-5.021 E F2(n)2.881 E F0 .021(is omitted,)2.761 F .469
+E F0([)2.5 E F2(n)A F0(])A .021(Causes a function to stop e)144 261.6 R
+-.15(xe)-.15 G .021(cuting and return the v).15 F .021
+(alue speci\214ed by)-.25 F F2(n)2.88 E F0 .02(to its caller)2.76 F 5.02
+(.I)-.55 G(f)-5.02 E F2(n)2.88 E F0 .02(is omitted,)2.76 F .469
(the return status is that of the last command e)144 273.6 R -.15(xe)
-.15 G .469(cuted in the function body).15 F 5.469(.I)-.65 G(f)-5.469 E
-F1 -.18(re)2.969 G(tur).18 E(n)-.15 E F0 .468(is used out-)2.969 F .466
-(side a function, b)144 285.6 R .466(ut during e)-.2 F -.15(xe)-.15 G
+F1 -.18(re)2.969 G(tur).18 E(n)-.15 E F0 .469(is used out-)2.969 F .467
+(side a function, b)144 285.6 R .467(ut during e)-.2 F -.15(xe)-.15 G
.467(cution of a script by the).15 F F1(.)2.967 E F0(\()5.467 E F1(sour)
-A(ce)-.18 E F0 2.967(\)c)C .467(ommand, it causes the shell to)-2.967 F
-.088(stop e)144 297.6 R -.15(xe)-.15 G .087
+A(ce)-.18 E F0 2.966(\)c)C .466(ommand, it causes the shell to)-2.966 F
+.087(stop e)144 297.6 R -.15(xe)-.15 G .087
(cuting that script and return either).15 F F2(n)2.947 E F0 .087
(or the e)2.827 F .087(xit status of the last command e)-.15 F -.15(xe)
--.15 G .087(cuted within).15 F .613(the script as the e)144 309.6 R .613
+-.15 G .088(cuted within).15 F .613(the script as the e)144 309.6 R .613
(xit status of the script.)-.15 F(If)5.613 E F2(n)3.113 E F0 .613
(is supplied, the return v)3.113 F .613
-(alue is its least signi\214cant 8)-.25 F 2.511(bits. The)144 321.6 R
-.011(return status is non-zero if)2.511 F F1 -.18(re)2.511 G(tur).18 E
-(n)-.15 E F0 .011(is supplied a non-numeric ar)2.511 F .01
-(gument, or is used outside)-.18 F 2.909(af)144 333.6 S .409
-(unction and not during e)-2.909 F -.15(xe)-.15 G .41
+(alue is its least signi\214cant 8)-.25 F 2.51(bits. The)144 321.6 R .01
+(return status is non-zero if)2.51 F F1 -.18(re)2.511 G(tur).18 E(n)-.15
+E F0 .011(is supplied a non-numeric ar)2.511 F .011
+(gument, or is used outside)-.18 F 2.91(af)144 333.6 S .41
+(unction and not during e)-2.91 F -.15(xe)-.15 G .41
(cution of a script by).15 F F1(.)2.91 E F0(or)3.743 E F1(sour)2.91 E
-(ce)-.18 E F0 5.41(.A)C .71 -.15(ny c)-5.41 H .41
+(ce)-.18 E F0 5.41(.A)C .71 -.15(ny c)-5.41 H .409
(ommand associated with the).15 F F1(RETURN)144 345.6 Q F0(trap is e)2.5
E -.15(xe)-.15 G(cuted before e).15 E -.15(xe)-.15 G
(cution resumes after the function or script.).15 E F1(set)108 362.4 Q
F2(option\255name)2.5 E F0 2.5(][)C F2(ar)-2.5 E(g)-.37 E F0(...])2.5 E
F1(set)108 374.4 Q F0([)2.5 E F1(+abefhkmnptuvxBCEHPT)A F0 2.5(][)C F1
(+o)-2.5 E F2(option\255name)2.5 E F0 2.5(][)C F2(ar)-2.5 E(g)-.37 E F0
-(...])2.5 E -.4(Wi)144 386.4 S .836(thout options, the name and v).4 F
-.835(alue of each shell v)-.25 F .835
+(...])2.5 E -.4(Wi)144 386.4 S .835(thout options, the name and v).4 F
+.835(alue of each shell v)-.25 F .836
(ariable are displayed in a format that can be)-.25 F .784
(reused as input for setting or resetting the currently-set v)144 398.4
-R 3.284(ariables. Read-only)-.25 F -.25(va)3.284 G .784
-(riables cannot be).25 F 2.912(reset. In)144 410.4 R F2(posix)2.912 E F0
+R 3.284(ariables. Read-only)-.25 F -.25(va)3.284 G .783
+(riables cannot be).25 F 2.911(reset. In)144 410.4 R F2(posix)2.911 E F0
.412(mode, only shell v)2.912 F .412(ariables are listed.)-.25 F .412
-(The output is sorted according to the current)5.412 F 3.53
-(locale. When)144 422.4 R 1.031(options are speci\214ed, the)3.53 F
-3.531(ys)-.15 G 1.031(et or unset shell attrib)-3.531 F 3.531(utes. An)
--.2 F 3.531(ya)-.15 G -.18(rg)-3.531 G 1.031(uments remaining).18 F
-1.624(after option processing are treated as v)144 434.4 R 1.623
+(The output is sorted according to the current)5.412 F 3.531
+(locale. When)144 422.4 R 1.031(options are speci\214ed, the)3.531 F
+3.531(ys)-.15 G 1.031(et or unset shell attrib)-3.531 F 3.53(utes. An)
+-.2 F 3.53(ya)-.15 G -.18(rg)-3.53 G 1.03(uments remaining).18 F 1.623
+(after option processing are treated as v)144 434.4 R 1.624
(alues for the positional parameters and are assigned, in)-.25 F(order)
144 446.4 Q 2.5(,t)-.4 G(o)-2.5 E F1($1)2.5 E F0(,)A F1($2)2.5 E F0(,)A
F1 2.5(... $)2.5 F F2(n)A F0 5(.O)C(ptions, if speci\214ed, ha)-5 E .3
-.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F1<ad61>144 458.4 Q
-F0 .539(Automatically mark v)29.3 F .539
-(ariables and functions which are modi\214ed or created for e)-.25 F .54
-(xport to)-.15 F(the en)184 470.4 Q(vironment of subsequent commands.)
--.4 E F1<ad62>144 482.4 Q F0 .132
+F0 .54(Automatically mark v)29.3 F .539
+(ariables and functions which are modi\214ed or created for e)-.25 F
+.539(xport to)-.15 F(the en)184 470.4 Q
+(vironment of subsequent commands.)-.4 E F1<ad62>144 482.4 Q F0 .131
(Report the status of terminated background jobs immediately)28.74 F
-2.632(,r)-.65 G .131(ather than before the ne)-2.632 F(xt)-.15 E
+2.632(,r)-.65 G .132(ather than before the ne)-2.632 F(xt)-.15 E
(primary prompt.)184 494.4 Q(This is ef)5 E(fecti)-.25 E .3 -.15(ve o)
-.25 H(nly when job control is enabled.).15 E F1<ad65>144 506.4 Q F0
-.087(Exit immediately if a)29.86 F F2(pipeline)2.587 E F0 .087
-(\(which may consist of a single)2.587 F F2 .088(simple command)2.588 F
-F0 .088(\), a)B F2(list)2.588 E F0 2.588(,o)C(r)-2.588 E(a)184 518.4 Q
-F2 1.294(compound command)3.794 F F0(\(see)3.794 E/F3 9/Times-Bold@0 SF
-1.294(SHELL GRAMMAR)3.794 F F0(abo)3.544 E -.15(ve)-.15 G 3.793(\), e)
-.15 F 1.293(xits with a non-zero status.)-.15 F .079
+.088(Exit immediately if a)29.86 F F2(pipeline)2.588 E F0 .087
+(\(which may consist of a single)2.588 F F2 .087(simple command)2.587 F
+F0 .087(\), a)B F2(list)2.587 E F0 2.587(,o)C(r)-2.587 E(a)184 518.4 Q
+F2 1.293(compound command)3.793 F F0(\(see)3.793 E/F3 9/Times-Bold@0 SF
+1.293(SHELL GRAMMAR)3.793 F F0(abo)3.544 E -.15(ve)-.15 G 3.794(\), e)
+.15 F 1.294(xits with a non-zero status.)-.15 F .08
(The shell does not e)184 530.4 R .079(xit if the command that f)-.15 F
-.08(ails is part of the command list immediately)-.1 F(follo)184 542.4 Q
-1.655(wing a)-.25 F F1(while)4.155 E F0(or)4.155 E F1(until)4.155 E F0
--.1(ke)4.155 G(yw)-.05 E 1.655(ord, part of the test follo)-.1 F 1.654
-(wing the)-.25 F F1(if)4.154 E F0(or)4.154 E F1(elif)4.154 E F0(reserv)
-4.154 E(ed)-.15 E -.1(wo)184 554.4 S .581(rds, part of an).1 F 3.081(yc)
--.15 G .581(ommand e)-3.081 F -.15(xe)-.15 G .581(cuted in a).15 F F1
-(&&)3.081 E F0(or)3.081 E F1(||)3.081 E F0 .582(list e)3.082 F .582
-(xcept the command follo)-.15 F(wing)-.25 E .918(the \214nal)184 566.4 R
-F1(&&)3.418 E F0(or)3.418 E F1(||)3.418 E F0 3.418(,a)C 1.218 -.15(ny c)
--3.418 H .918(ommand in a pipeline b).15 F .917
-(ut the last, or if the command')-.2 F 3.417(sr)-.55 G(eturn)-3.417 E
--.25(va)184 578.4 S .66(lue is being in).25 F -.15(ve)-.4 G .66
-(rted with).15 F F1(!)3.16 E F0 5.661(.I)C 3.161(fac)-5.661 G .661
-(ompound command other than a subshell returns a)-3.161 F 1.113
+.079(ails is part of the command list immediately)-.1 F(follo)184 542.4
+Q 1.654(wing a)-.25 F F1(while)4.154 E F0(or)4.154 E F1(until)4.154 E F0
+-.1(ke)4.154 G(yw)-.05 E 1.655(ord, part of the test follo)-.1 F 1.655
+(wing the)-.25 F F1(if)4.155 E F0(or)4.155 E F1(elif)4.155 E F0(reserv)
+4.155 E(ed)-.15 E -.1(wo)184 554.4 S .582(rds, part of an).1 F 3.082(yc)
+-.15 G .582(ommand e)-3.082 F -.15(xe)-.15 G .581(cuted in a).15 F F1
+(&&)3.081 E F0(or)3.081 E F1(||)3.081 E F0 .581(list e)3.081 F .581
+(xcept the command follo)-.15 F(wing)-.25 E .917(the \214nal)184 566.4 R
+F1(&&)3.417 E F0(or)3.417 E F1(||)3.417 E F0 3.417(,a)C 1.217 -.15(ny c)
+-3.417 H .918(ommand in a pipeline b).15 F .918
+(ut the last, or if the command')-.2 F 3.418(sr)-.55 G(eturn)-3.418 E
+-.25(va)184 578.4 S .661(lue is being in).25 F -.15(ve)-.4 G .661
+(rted with).15 F F1(!)3.161 E F0 5.661(.I)C 3.161(fac)-5.661 G .66
+(ompound command other than a subshell returns a)-3.161 F 1.112
(non-zero status because a command f)184 590.4 R 1.112(ailed while)-.1 F
-F1<ad65>3.612 E F0 -.1(wa)3.612 G 3.612(sb).1 G 1.112
-(eing ignored, the shell does)-3.612 F .177(not e)184 602.4 R 2.677
-(xit. A)-.15 F .177(trap on)2.677 F F1(ERR)2.677 E F0 2.677(,i)C 2.678
-(fs)-2.677 G .178(et, is e)-2.678 F -.15(xe)-.15 G .178
-(cuted before the shell e).15 F 2.678(xits. This)-.15 F .178
-(option applies to)2.678 F .618(the shell en)184 614.4 R .617
+F1<ad65>3.612 E F0 -.1(wa)3.612 G 3.612(sb).1 G 1.113
+(eing ignored, the shell does)-3.612 F .178(not e)184 602.4 R 2.678
+(xit. A)-.15 F .178(trap on)2.678 F F1(ERR)2.678 E F0 2.678(,i)C 2.678
+(fs)-2.678 G .178(et, is e)-2.678 F -.15(xe)-.15 G .178
+(cuted before the shell e).15 F 2.677(xits. This)-.15 F .177
+(option applies to)2.677 F .617(the shell en)184 614.4 R .617
(vironment and each subshell en)-.4 F .617(vironment separately \(see)
--.4 F F3 .617(COMMAND EXE-)3.117 F .642(CUTION ENVIR)184 626.4 R(ONMENT)
+-.4 F F3 .618(COMMAND EXE-)3.118 F .643(CUTION ENVIR)184 626.4 R(ONMENT)
-.27 E F0(abo)2.893 E -.15(ve)-.15 G .643
(\), and may cause subshells to e).15 F .643(xit before e)-.15 F -.15
-(xe)-.15 G .643(cuting all).15 F(the commands in the subshell.)184 638.4
+(xe)-.15 G .642(cuting all).15 F(the commands in the subshell.)184 638.4
Q 2.042(If a compound command or shell function e)184 656.4 R -.15(xe)
-.15 G 2.042(cutes in a conte).15 F 2.042(xt where)-.15 F F1<ad65>4.542
-E F0 2.042(is being)4.542 F 1.435(ignored, none of the commands e)184
-668.4 R -.15(xe)-.15 G 1.436
-(cuted within the compound command or function).15 F .194
-(body will be af)184 680.4 R .194(fected by the)-.25 F F1<ad65>2.694 E
+E F0 2.043(is being)4.543 F 1.436(ignored, none of the commands e)184
+668.4 R -.15(xe)-.15 G 1.435
+(cuted within the compound command or function).15 F .193
+(body will be af)184 680.4 R .193(fected by the)-.25 F F1<ad65>2.693 E
F0 .193(setting, e)2.693 F -.15(ve)-.25 G 2.693(ni).15 G(f)-2.693 E F1
-<ad65>2.693 E F0 .193(is set and a command returns a f)2.693 F(ailure)
+<ad65>2.693 E F0 .194(is set and a command returns a f)2.693 F(ailure)
-.1 E 3.39(status. If)184 692.4 R 3.39(ac)3.39 G .89
(ompound command or shell function sets)-3.39 F F1<ad65>3.39 E F0 .89
(while e)3.39 F -.15(xe)-.15 G .89(cuting in a conte).15 F(xt)-.15 E
-(where)184 704.4 Q F1<ad65>3.154 E F0 .654
-(is ignored, that setting will not ha)3.154 F .953 -.15(ve a)-.2 H .953
--.15(ny e).15 H -.25(ff).15 G .653(ect until the compound command).25 F
+(where)184 704.4 Q F1<ad65>3.153 E F0 .653
+(is ignored, that setting will not ha)3.153 F .954 -.15(ve a)-.2 H .954
+-.15(ny e).15 H -.25(ff).15 G .654(ect until the compound command).25 F
(or the command containing the function call completes.)184 716.4 Q
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(64)187.615 E 0 Cg EP
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(64)190.395 E 0 Cg EP
%%Page: 65 65
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
-.35 E/F1 10/Times-Bold@0 SF<ad66>144 84 Q F0(Disable pathname e)30.97 E
-(xpansion.)-.15 E F1<ad68>144 96 Q F0 2.238
-(Remember the location of commands as the)28.74 F 4.738(ya)-.15 G 2.239
-(re look)-4.738 F 2.239(ed up for e)-.1 F -.15(xe)-.15 G 4.739
-(cution. This).15 F(is)4.739 E(enabled by def)184 108 Q(ault.)-.1 E F1
-<ad6b>144 120 Q F0 .514(All ar)28.74 F .514
+(xpansion.)-.15 E F1<ad68>144 96 Q F0 2.239
+(Remember the location of commands as the)28.74 F 4.738(ya)-.15 G 2.238
+(re look)-4.738 F 2.238(ed up for e)-.1 F -.15(xe)-.15 G 4.738
+(cution. This).15 F(is)4.738 E(enabled by def)184 108 Q(ault.)-.1 E F1
+<ad6b>144 120 Q F0 .513(All ar)28.74 F .514
(guments in the form of assignment statements are placed in the en)-.18
-F .513(vironment for a)-.4 F
+F .514(vironment for a)-.4 F
(command, not just those that precede the command name.)184 132 Q F1
-<ad6d>144 144 Q F0 .148(Monitor mode.)25.97 F .148
-(Job control is enabled.)5.148 F .149(This option is on by def)5.148 F
-.149(ault for interacti)-.1 F .449 -.15(ve s)-.25 H(hells).15 E .651
+<ad6d>144 144 Q F0 .149(Monitor mode.)25.97 F .149
+(Job control is enabled.)5.149 F .148(This option is on by def)5.149 F
+.148(ault for interacti)-.1 F .448 -.15(ve s)-.25 H(hells).15 E .65
(on systems that support it \(see)184 156 R/F2 9/Times-Bold@0 SF .651
(JOB CONTR)3.151 F(OL)-.27 E F0(abo)2.901 E -.15(ve)-.15 G 3.151
-(\). All).15 F .65(processes run in a separate)3.151 F .678
-(process group.)184 168 R .679(When a background job completes, the she\
-ll prints a line containing its)5.678 F -.15(ex)184 180 S(it status.).15
-E F1<ad6e>144 192 Q F0 .653(Read commands b)28.74 F .653(ut do not e)-.2
-F -.15(xe)-.15 G .653(cute them.).15 F .652
-(This may be used to check a shell script for)5.653 F(syntax errors.)184
+(\). All).15 F .651(processes run in a separate)3.151 F .679
+(process group.)184 168 R .678(When a background job completes, the she\
+ll prints a line containing its)5.679 F -.15(ex)184 180 S(it status.).15
+E F1<ad6e>144 192 Q F0 .652(Read commands b)28.74 F .652(ut do not e)-.2
+F -.15(xe)-.15 G .652(cute them.).15 F .653
+(This may be used to check a shell script for)5.652 F(syntax errors.)184
204 Q(This is ignored by interacti)5 E .3 -.15(ve s)-.25 H(hells.).15 E
F1<ad6f>144 216 Q/F3 10/Times-Italic@0 SF(option\255name)2.5 E F0(The)
184 228 Q F3(option\255name)2.5 E F0(can be one of the follo)2.5 E
(errtrace)184 336 Q F0(Same as)5.03 E F1<ad45>2.5 E F0(.)A F1(functrace)
184 348 Q F0(Same as)224 360 Q F1<ad54>2.5 E F0(.)A F1(hashall)184 372 Q
F0(Same as)9.43 E F1<ad68>2.5 E F0(.)A F1(histexpand)184 384 Q F0
-(Same as)224 396 Q F1<ad48>2.5 E F0(.)A F1(history)184 408 Q F0 .586
+(Same as)224 396 Q F1<ad48>2.5 E F0(.)A F1(history)184 408 Q F0 .587
(Enable command history)10 F 3.087(,a)-.65 G 3.087(sd)-3.087 G .587
(escribed abo)-3.087 F .887 -.15(ve u)-.15 H(nder).15 E F2(HIST)3.087 E
(OR)-.162 E(Y)-.315 E/F4 9/Times-Roman@0 SF(.)A F0 .587(This option is)
5.087 F(on by def)224 420 Q(ault in interacti)-.1 E .3 -.15(ve s)-.25 H
-(hells.).15 E F1(ignor)184 432 Q(eeof)-.18 E F0 1.657(The ef)224 444 R
-1.657(fect is as if the shell command)-.25 F/F5 10/Courier@0 SF
-(IGNOREEOF=10)4.156 E F0 1.656(had been e)4.156 F -.15(xe)-.15 G(cuted)
+(hells.).15 E F1(ignor)184 432 Q(eeof)-.18 E F0 1.656(The ef)224 444 R
+1.656(fect is as if the shell command)-.25 F/F5 10/Courier@0 SF
+(IGNOREEOF=10)4.157 E F0 1.657(had been e)4.157 F -.15(xe)-.15 G(cuted)
.15 E(\(see)224 456 Q F1(Shell V)2.5 E(ariables)-.92 E F0(abo)2.5 E -.15
(ve)-.15 G(\).).15 E F1 -.1(ke)184 468 S(yw).1 E(ord)-.1 E F0(Same as)
224 480 Q F1<ad6b>2.5 E F0(.)A F1(monitor)184 492 Q F0(Same as)5.56 E F1
(Same as)15 E F1<ad62>2.5 E F0(.)A F1(nounset)184 576 Q F0(Same as)6.66
E F1<ad75>2.5 E F0(.)A F1(onecmd)184 588 Q F0(Same as)6.67 E F1<ad74>2.5
E F0(.)A F1(ph)184 600 Q(ysical)-.15 E F0(Same as)5.14 E F1<ad50>2.5 E
-F0(.)A F1(pipefail)184 612 Q F0 1.029(If set, the return v)7.77 F 1.029
-(alue of a pipeline is the v)-.25 F 1.03
-(alue of the last \(rightmost\) com-)-.25 F 1.137(mand to e)224 624 R
+F0(.)A F1(pipefail)184 612 Q F0 1.03(If set, the return v)7.77 F 1.029
+(alue of a pipeline is the v)-.25 F 1.029
+(alue of the last \(rightmost\) com-)-.25 F 1.136(mand to e)224 624 R
1.136
(xit with a non-zero status, or zero if all commands in the pipeline)
-.15 F -.15(ex)224 636 S(it successfully).15 E 5(.T)-.65 G
(his option is disabled by def)-5 E(ault.)-.1 E F1(posix)184 648 Q F0
-2.09(Change the beha)17.77 F 2.091(vior of)-.2 F F1(bash)4.591 E F0
+2.091(Change the beha)17.77 F 2.091(vior of)-.2 F F1(bash)4.591 E F0
2.091(where the def)4.591 F 2.091(ault operation dif)-.1 F 2.091
(fers from the)-.25 F 1.212(POSIX standard to match the standard \()224
660 R F3 1.212(posix mode)B F0 3.712(\). See)B F2 1.212(SEE ALSO)3.712 F
-F0(belo)3.462 E(w)-.25 E 2.306
-(for a reference to a document that details ho)224 672 R 4.807(wp)-.25 G
-2.307(osix mode af)-4.807 F 2.307(fects bash')-.25 F(s)-.55 E(beha)224
+F0(belo)3.463 E(w)-.25 E 2.307
+(for a reference to a document that details ho)224 672 R 4.806(wp)-.25 G
+2.306(osix mode af)-4.806 F 2.306(fects bash')-.25 F(s)-.55 E(beha)224
684 Q(vior)-.2 E(.)-.55 E F1(pri)184 696 Q(vileged)-.1 E F0(Same as)224
-708 Q F1<ad70>2.5 E F0(.)A(GNU Bash 4.3)72 768 Q(2013 September 2)
-138.455 E(65)187.615 E 0 Cg EP
+708 Q F1<ad70>2.5 E F0(.)A(GNU Bash 4.3)72 768 Q(2013 October 20)141.235
+E(65)190.395 E 0 Cg EP
%%Page: 66 66
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
-.35 E/F1 10/Times-Bold@0 SF -.1(ve)184 84 S(rbose).1 E F0(Same as)7.33
-E F1<ad76>2.5 E F0(.)A F1(vi)184 96 Q F0 1.466
-(Use a vi-style command line editing interf)32.22 F 3.965(ace. This)-.1
-F 1.465(also af)3.965 F 1.465(fects the editing)-.25 F(interf)224 108 Q
+E F1<ad76>2.5 E F0(.)A F1(vi)184 96 Q F0 1.465
+(Use a vi-style command line editing interf)32.22 F 3.966(ace. This)-.1
+F 1.466(also af)3.966 F 1.466(fects the editing)-.25 F(interf)224 108 Q
(ace used for)-.1 E F1 -.18(re)2.5 G(ad \255e).18 E F0(.)A F1(xtrace)184
-120 Q F0(Same as)13.35 E F1<ad78>2.5 E F0(.)A(If)184 138 Q F1<ad6f>3.052
-E F0 .552(is supplied with no)3.052 F/F2 10/Times-Italic@0 SF
-(option\255name)3.053 E F0 3.053(,t)C .553(he v)-3.053 F .553
-(alues of the current options are printed.)-.25 F(If)5.553 E F1(+o)184
-150 Q F0 1.072(is supplied with no)3.572 F F2(option\255name)3.572 E F0
-3.572(,a)C 1.071(series of)-.001 F F1(set)3.571 E F0 1.071
-(commands to recreate the current)3.571 F
+120 Q F0(Same as)13.35 E F1<ad78>2.5 E F0(.)A(If)184 138 Q F1<ad6f>3.053
+E F0 .553(is supplied with no)3.053 F/F2 10/Times-Italic@0 SF
+(option\255name)3.053 E F0 3.053(,t)C .553(he v)-3.053 F .552
+(alues of the current options are printed.)-.25 F(If)5.552 E F1(+o)184
+150 Q F0 1.071(is supplied with no)3.571 F F2(option\255name)3.571 E F0
+3.571(,as)C 1.071(eries of)-3.571 F F1(set)3.572 E F0 1.072
+(commands to recreate the current)3.572 F
(option settings is displayed on the standard output.)184 162 Q F1<ad70>
-144 174 Q F0 -.45(Tu)28.74 G 1.071(rn on).45 F F2(privile)4.821 E -.1
-(ge)-.4 G(d).1 E F0 3.572(mode. In)4.341 F 1.072(this mode, the)3.572 F
+144 174 Q F0 -.45(Tu)28.74 G 1.072(rn on).45 F F2(privile)4.822 E -.1
+(ge)-.4 G(d).1 E F0 3.572(mode. In)4.342 F 1.072(this mode, the)3.572 F
/F3 9/Times-Bold@0 SF($ENV)3.572 E F0(and)3.322 E F3($B)3.572 E(ASH_ENV)
--.27 E F0 1.072(\214les are not pro-)3.322 F 1.501
-(cessed, shell functions are not inherited from the en)184 186 R 1.5
-(vironment, and the)-.4 F F3(SHELLOPTS)4 E/F4 9/Times-Roman@0 SF(,)A F3
--.27(BA)184 198 S(SHOPTS).27 E F4(,)A F3(CDP)2.774 E -.855(AT)-.666 G(H)
-.855 E F4(,)A F0(and)2.774 E F3(GLOBIGNORE)3.024 E F0 -.25(va)2.774 G
-.524(riables, if the).25 F 3.025(ya)-.15 G .525(ppear in the en)-3.025 F
-(vironment,)-.4 E .38(are ignored.)184 210 R .38
-(If the shell is started with the ef)5.38 F(fecti)-.25 E .679 -.15(ve u)
--.25 H .379(ser \(group\) id not equal to the real).15 F .461
+-.27 E F0 1.071(\214les are not pro-)3.322 F 1.5
+(cessed, shell functions are not inherited from the en)184 186 R 1.501
+(vironment, and the)-.4 F F3(SHELLOPTS)4.001 E/F4 9/Times-Roman@0 SF(,)A
+F3 -.27(BA)184 198 S(SHOPTS).27 E F4(,)A F3(CDP)2.775 E -.855(AT)-.666 G
+(H).855 E F4(,)A F0(and)2.775 E F3(GLOBIGNORE)3.025 E F0 -.25(va)2.775 G
+.524(riables, if the).25 F 3.024(ya)-.15 G .524(ppear in the en)-3.024 F
+(vironment,)-.4 E .379(are ignored.)184 210 R .379
+(If the shell is started with the ef)5.379 F(fecti)-.25 E .679 -.15
+(ve u)-.25 H .38(ser \(group\) id not equal to the real).15 F .462
(user \(group\) id, and the)184 222 R F1<ad70>2.961 E F0 .461
-(option is not supplied, these actions are tak)2.961 F .462
-(en and the ef)-.1 F(fec-)-.25 E(ti)184 234 Q .695 -.15(ve u)-.25 H .395
+(option is not supplied, these actions are tak)2.961 F .461
+(en and the ef)-.1 F(fec-)-.25 E(ti)184 234 Q .694 -.15(ve u)-.25 H .394
(ser id is set to the real user id.).15 F .395(If the)5.395 F F1<ad70>
-2.895 E F0 .394(option is supplied at startup, the ef)2.895 F(fecti)-.25
-E -.15(ve)-.25 G .386(user id is not reset.)184 246 R -.45(Tu)5.386 G
-.386(rning this option of).45 F 2.886(fc)-.25 G .387(auses the ef)-2.886
-F(fecti)-.25 E .687 -.15(ve u)-.25 H .387(ser and group ids to be).15 F
+2.895 E F0 .395(option is supplied at startup, the ef)2.895 F(fecti)-.25
+E -.15(ve)-.25 G .387(user id is not reset.)184 246 R -.45(Tu)5.387 G
+.387(rning this option of).45 F 2.886(fc)-.25 G .386(auses the ef)-2.886
+F(fecti)-.25 E .686 -.15(ve u)-.25 H .386(ser and group ids to be).15 F
(set to the real user and group ids.)184 258 Q F1<ad74>144 270 Q F0
(Exit after reading and e)30.97 E -.15(xe)-.15 G(cuting one command.).15
-E F1<ad75>144 282 Q F0 -.35(Tr)28.74 G .044(eat unset v).35 F .044(aria\
+E F1<ad75>144 282 Q F0 -.35(Tr)28.74 G .043(eat unset v).35 F .044(aria\
bles and parameters other than the special parameters "@" and "*" as an)
--.25 F .182(error when performing parameter e)184 294 R 2.682
-(xpansion. If)-.15 F -.15(ex)2.682 G .183
+-.25 F .183(error when performing parameter e)184 294 R 2.683
+(xpansion. If)-.15 F -.15(ex)2.683 G .182
(pansion is attempted on an unset v).15 F(ari-)-.25 E .746
(able or parameter)184 306 R 3.246(,t)-.4 G .746
(he shell prints an error message, and, if not interacti)-3.246 F -.15
-.15 G(re read.)-2.5 E F1<ad78>144 342 Q F0 .315(After e)29.3 F .315
(xpanding each)-.15 F F2 .315(simple command)2.815 F F0(,)A F1 -.25(fo)
2.815 G(r).25 E F0(command,)2.815 E F1(case)2.815 E F0(command,)2.815 E
-F1(select)2.815 E F0(command,)2.815 E 1.236(or arithmetic)184 354 R F1
+F1(select)2.815 E F0(command,)2.815 E 1.235(or arithmetic)184 354 R F1
-.25(fo)3.736 G(r).25 E F0 1.236(command, display the e)3.736 F 1.236
(xpanded v)-.15 F 1.236(alue of)-.25 F F3(PS4)3.736 E F4(,)A F0(follo)
3.486 E 1.236(wed by the com-)-.25 F(mand and its e)184 366 Q
(xpanded ar)-.15 E(guments or associated w)-.18 E(ord list.)-.1 E F1
-<ad42>144 378 Q F0 2.578(The shell performs brace e)27.63 F 2.578
+<ad42>144 378 Q F0 2.579(The shell performs brace e)27.63 F 2.578
(xpansion \(see)-.15 F F1 2.578(Brace Expansion)5.078 F F0(abo)5.078 E
--.15(ve)-.15 G 5.079(\). This).15 F 2.579(is on by)5.079 F(def)184 390 Q
-(ault.)-.1 E F1<ad43>144 402 Q F0 .214(If set,)27.08 F F1(bash)2.714 E
-F0 .214(does not o)2.714 F -.15(ve)-.15 G .214(rwrite an e).15 F .214
+-.15(ve)-.15 G 5.078(\). This).15 F 2.578(is on by)5.078 F(def)184 390 Q
+(ault.)-.1 E F1<ad43>144 402 Q F0 .213(If set,)27.08 F F1(bash)2.713 E
+F0 .213(does not o)2.713 F -.15(ve)-.15 G .214(rwrite an e).15 F .214
(xisting \214le with the)-.15 F F1(>)2.714 E F0(,)A F1(>&)2.714 E F0
-2.713(,a)C(nd)-2.713 E F1(<>)2.713 E F0 .213(redirection opera-)2.713 F
-3.053(tors. This)184 414 R .553(may be o)3.053 F -.15(ve)-.15 G .553
+2.714(,a)C(nd)-2.714 E F1(<>)2.714 E F0 .214(redirection opera-)2.714 F
+3.054(tors. This)184 414 R .553(may be o)3.053 F -.15(ve)-.15 G .553
(rridden when creating output \214les by using the redirection opera-)
.15 F(tor)184 426 Q F1(>|)2.5 E F0(instead of)2.5 E F1(>)2.5 E F0(.)A F1
-<ad45>144 438 Q F0 .104(If set, an)27.63 F 2.604(yt)-.15 G .104(rap on)
--2.604 F F1(ERR)2.604 E F0 .103
-(is inherited by shell functions, command substitutions, and com-)2.604
-F .838(mands e)184 450 R -.15(xe)-.15 G .838(cuted in a subshell en).15
-F 3.338(vironment. The)-.4 F F1(ERR)3.338 E F0 .839
-(trap is normally not inherited in)3.339 F(such cases.)184 462 Q F1
-<ad48>144 474 Q F0(Enable)26.52 E F1(!)3.032 E F0 .532
-(style history substitution.)5.532 F .531(This option is on by def)5.532
-F .531(ault when the shell is inter)-.1 F(-)-.2 E(acti)184 486 Q -.15
-(ve)-.25 G(.).15 E F1<ad50>144 498 Q F0 .959
+<ad45>144 438 Q F0 .103(If set, an)27.63 F 2.603(yt)-.15 G .103(rap on)
+-2.603 F F1(ERR)2.603 E F0 .104
+(is inherited by shell functions, command substitutions, and com-)2.603
+F .839(mands e)184 450 R -.15(xe)-.15 G .839(cuted in a subshell en).15
+F 3.339(vironment. The)-.4 F F1(ERR)3.338 E F0 .838
+(trap is normally not inherited in)3.338 F(such cases.)184 462 Q F1
+<ad48>144 474 Q F0(Enable)26.52 E F1(!)3.031 E F0 .531
+(style history substitution.)5.531 F .531(This option is on by def)5.531
+F .532(ault when the shell is inter)-.1 F(-)-.2 E(acti)184 486 Q -.15
+(ve)-.25 G(.).15 E F1<ad50>144 498 Q F0 .96
(If set, the shell does not resolv)28.19 F 3.459(es)-.15 G .959
-(ymbolic links when e)-3.459 F -.15(xe)-.15 G .96
-(cuting commands such as).15 F F1(cd)3.46 E F0 2.822
+(ymbolic links when e)-3.459 F -.15(xe)-.15 G .959
+(cuting commands such as).15 F F1(cd)3.459 E F0 2.821
(that change the current w)184 510 R 2.822(orking directory)-.1 F 7.822
-(.I)-.65 G 5.322(tu)-7.822 G 2.822(ses the ph)-5.322 F 2.821
-(ysical directory structure)-.05 F 2.685(instead. By)184 522 R(def)2.685
+(.I)-.65 G 5.322(tu)-7.822 G 2.822(ses the ph)-5.322 F 2.822
+(ysical directory structure)-.05 F 2.686(instead. By)184 522 R(def)2.686
E(ault,)-.1 E F1(bash)2.686 E F0(follo)2.686 E .186
(ws the logical chain of directories when performing com-)-.25 F
(mands which change the current directory)184 534 Q(.)-.65 E F1<ad54>144
(cuted in a subshell en).15 F 4.432(vironment. The)-.4 F F1(DEB)4.432 E
(UG)-.1 E F0(and)4.432 E F1(RETURN)184 570 Q F0
(traps are normally not inherited in such cases.)2.5 E F1<adad>144 582 Q
-F0 .401(If no ar)28.6 F .401(guments follo)-.18 F 2.901(wt)-.25 G .401
+F0 .4(If no ar)28.6 F .401(guments follo)-.18 F 2.901(wt)-.25 G .401
(his option, then the positional parameters are unset.)-2.901 F
-(Otherwise,)5.4 E(the positional parameters are set to the)184 594 Q F2
-(ar)2.5 E(g)-.37 E F0(s, e)A -.15(ve)-.25 G 2.5(ni).15 G 2.5(fs)-2.5 G
+(Otherwise,)5.401 E(the positional parameters are set to the)184 594 Q
+F2(ar)2.5 E(g)-.37 E F0(s, e)A -.15(ve)-.25 G 2.5(ni).15 G 2.5(fs)-2.5 G
(ome of them be)-2.5 E(gin with a)-.15 E F1<ad>2.5 E F0(.)A F1<ad>144
-606 Q F0 1.944(Signal the end of options, cause all remaining)34.3 F F2
-(ar)4.444 E(g)-.37 E F0 4.444(st)C 4.444(ob)-4.444 G 4.445(ea)-4.444 G
-1.945(ssigned to the positional)-4.445 F 3.446(parameters. The)184 618 R
-F1<ad78>3.446 E F0(and)3.446 E F1<ad76>3.446 E F0 .945
-(options are turned of)3.446 F 3.445(f. If)-.25 F .945(there are no)
-3.445 F F2(ar)3.445 E(g)-.37 E F0 .945(s, the positional)B
+606 Q F0 1.945(Signal the end of options, cause all remaining)34.3 F F2
+(ar)4.444 E(g)-.37 E F0 4.444(st)C 4.444(ob)-4.444 G 4.444(ea)-4.444 G
+1.944(ssigned to the positional)-4.444 F 3.445(parameters. The)184 618 R
+F1<ad78>3.445 E F0(and)3.445 E F1<ad76>3.445 E F0 .945
+(options are turned of)3.445 F 3.445(f. If)-.25 F .946(there are no)
+3.445 F F2(ar)3.446 E(g)-.37 E F0 .946(s, the positional)B
(parameters remain unchanged.)184 630 Q .425(The options are of)144
646.8 R 2.925(fb)-.25 G 2.925(yd)-2.925 G(ef)-2.925 E .425
(ault unless otherwise noted.)-.1 F .425
-(Using + rather than \255 causes these options)5.425 F .178
-(to be turned of)144 658.8 R 2.678(f. The)-.25 F .178
+(Using + rather than \255 causes these options)5.425 F .177
+(to be turned of)144 658.8 R 2.677(f. The)-.25 F .178
(options can also be speci\214ed as ar)2.678 F .178(guments to an in)
--.18 F -.2(vo)-.4 G .177(cation of the shell.).2 F(The)5.177 E .066
+-.18 F -.2(vo)-.4 G .178(cation of the shell.).2 F(The)5.178 E .066
(current set of options may be found in)144 670.8 R F1<24ad>2.566 E F0
5.066(.T)C .066(he return status is al)-5.066 F -.1(wa)-.1 G .066
-(ys true unless an in).1 F -.25(va)-.4 G .067(lid option).25 F
+(ys true unless an in).1 F -.25(va)-.4 G .066(lid option).25 F
(is encountered.)144 682.8 Q F1(shift)108 699.6 Q F0([)2.5 E F2(n)A F0
-(])A .429(The positional parameters from)144 711.6 R F2(n)2.929 E F0
-.429(+1 ... are renamed to)B F1 .429($1 ....)2.929 F F0 -.15(Pa)5.428 G
-.428(rameters represented by the num-).15 F(bers)144 723.6 Q F1($#)2.582
-E F0(do)2.582 E .082(wn to)-.25 F F1($#)2.582 E F0<ad>A F2(n)A F0 .082
-(+1 are unset.)B F2(n)5.442 E F0 .082(must be a non-ne)2.822 F -.05(ga)
--.15 G(ti).05 E .383 -.15(ve n)-.25 H .083(umber less than or equal to)
-.15 F F1($#)2.583 E F0 5.083(.I)C(f)-5.083 E F2(n)2.943 E F0
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(66)187.615 E 0 Cg EP
+(])A .428(The positional parameters from)144 711.6 R F2(n)2.928 E F0
+.429(+1 ... are renamed to)B F1 .429($1 ....)2.929 F F0 -.15(Pa)5.429 G
+.429(rameters represented by the num-).15 F(bers)144 723.6 Q F1($#)2.583
+E F0(do)2.583 E .083(wn to)-.25 F F1($#)2.583 E F0<ad>A F2(n)A F0 .083
+(+1 are unset.)B F2(n)5.443 E F0 .083(must be a non-ne)2.823 F -.05(ga)
+-.15 G(ti).05 E .382 -.15(ve n)-.25 H .082(umber less than or equal to)
+.15 F F1($#)2.582 E F0 5.082(.I)C(f)-5.082 E F2(n)2.942 E F0
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(66)190.395 E 0 Cg EP
%%Page: 67 67
%%BeginPageSetup
BP
/Times-Italic@0 SF(n)2.92 E F0 .06(is not gi)2.8 F -.15(ve)-.25 G .06
(n, it is assumed to be 1.).15 F(If)5.06 E F1(n)2.92 E F0 .06
(is greater than)2.8 F/F2 10/Times-Bold@0 SF($#)2.56 E F0 2.56(,t)C(he)
--2.56 E .143(positional parameters are not changed.)144 96 R .144
-(The return status is greater than zero if)5.143 F F1(n)3.004 E F0 .144
-(is greater than)2.884 F F2($#)2.644 E F0
+-2.56 E .144(positional parameters are not changed.)144 96 R .144
+(The return status is greater than zero if)5.144 F F1(n)3.003 E F0 .143
+(is greater than)2.883 F F2($#)2.643 E F0
(or less than zero; otherwise 0.)144 108 Q F2(shopt)108 124.8 Q F0([)2.5
E F2(\255pqsu)A F0 2.5(][)C F2<ad6f>-2.5 E F0 2.5(][)C F1(optname)-2.5 E
-F0(...])2.5 E -.8(To)144 136.8 S .64(ggle the v).8 F .639
+F0(...])2.5 E -.8(To)144 136.8 S .639(ggle the v).8 F .639
(alues of settings controlling optional shell beha)-.25 F(vior)-.2 E
-5.639(.T)-.55 G .639(he settings can be either those)-5.639 F .374
-(listed belo)144 148.8 R 1.674 -.65(w, o)-.25 H 1.174 -.4(r, i).65 H
-2.874(ft).4 G(he)-2.874 E F2<ad6f>2.874 E F0 .375
+5.639(.T)-.55 G .64(he settings can be either those)-5.639 F .375
+(listed belo)144 148.8 R 1.675 -.65(w, o)-.25 H 1.175 -.4(r, i).65 H
+2.875(ft).4 G(he)-2.875 E F2<ad6f>2.875 E F0 .375
(option is used, those a)2.875 F -.25(va)-.2 G .375(ilable with the).25
-F F2<ad6f>2.875 E F0 .375(option to the)2.875 F F2(set)2.875 E F0 -.2
-(bu)2.875 G .375(iltin com-).2 F 3.326(mand. W)144 160.8 R .826
-(ith no options, or with the)-.4 F F2<ad70>3.326 E F0 .825
-(option, a list of all settable options is displayed, with an)3.326 F
+F F2<ad6f>2.875 E F0 .374(option to the)2.875 F F2(set)2.874 E F0 -.2
+(bu)2.874 G .374(iltin com-).2 F 3.325(mand. W)144 160.8 R .825
+(ith no options, or with the)-.4 F F2<ad70>3.325 E F0 .826
+(option, a list of all settable options is displayed, with an)3.325 F
.945(indication of whether or not each is set.)144 172.8 R(The)5.945 E
F2<ad70>3.445 E F0 .945(option causes output to be displayed in a form)
3.445 F(that may be reused as input.)144 184.8 Q(Other options ha)5 E .3
F0(Enable \(set\) each)26.41 E F1(optname)2.5 E F0(.)A F2<ad75>144 208.8
Q F0(Disable \(unset\) each)24.74 E F1(optname)2.5 E F0(.)A F2<ad71>144
220.8 Q F0 .003(Suppresses normal output \(quiet mode\); the return sta\
-tus indicates whether the)24.74 F F1(optname)2.503 E F0(is)2.503 E .255
-(set or unset.)180 232.8 R .255(If multiple)5.255 F F1(optname)2.755 E
-F0(ar)2.755 E .256(guments are gi)-.18 F -.15(ve)-.25 G 2.756(nw).15 G
-(ith)-2.756 E F2<ad71>2.756 E F0 2.756(,t)C .256
-(he return status is zero if)-2.756 F(all)180 244.8 Q F1(optnames)2.5 E
+tus indicates whether the)24.74 F F1(optname)2.504 E F0(is)2.504 E .256
+(set or unset.)180 232.8 R .256(If multiple)5.256 F F1(optname)2.756 E
+F0(ar)2.756 E .256(guments are gi)-.18 F -.15(ve)-.25 G 2.756(nw).15 G
+(ith)-2.756 E F2<ad71>2.756 E F0 2.755(,t)C .255
+(he return status is zero if)-2.755 F(all)180 244.8 Q F1(optnames)2.5 E
F0(are enabled; non-zero otherwise.)2.5 E F2<ad6f>144 256.8 Q F0
(Restricts the v)25.3 E(alues of)-.25 E F1(optname)2.5 E F0
(to be those de\214ned for the)2.5 E F2<ad6f>2.5 E F0(option to the)2.5
-E F2(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .625(If either)144 273.6 R F2
-<ad73>3.125 E F0(or)3.124 E F2<ad75>3.124 E F0 .624(is used with no)
+E F2(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .624(If either)144 273.6 R F2
+<ad73>3.124 E F0(or)3.124 E F2<ad75>3.124 E F0 .624(is used with no)
3.124 F F1(optname)3.124 E F0(ar)3.124 E(guments,)-.18 E F2(shopt)3.124
-E F0(sho)3.124 E .624(ws only those options which are)-.25 F 2.233
+E F0(sho)3.124 E .624(ws only those options which are)-.25 F 2.234
(set or unset, respecti)144 285.6 R -.15(ve)-.25 G(ly).15 E 7.234(.U)
-.65 G 2.234(nless otherwise noted, the)-7.234 F F2(shopt)4.734 E F0
2.234(options are disabled \(unset\) by)4.734 F(def)144 297.6 Q(ault.)
-.1 E 1.544(The return status when listing options is zero if all)144
-314.4 R F1(optnames)4.044 E F0 1.544(are enabled, non-zero otherwise.)
-4.044 F .696
+314.4 R F1(optnames)4.044 E F0 1.545(are enabled, non-zero otherwise.)
+4.045 F .696
(When setting or unsetting options, the return status is zero unless an)
-144 326.4 R F1(optname)3.196 E F0 .696(is not a v)3.196 F .696
+144 326.4 R F1(optname)3.196 E F0 .696(is not a v)3.196 F .695
(alid shell)-.25 F(option.)144 338.4 Q(The list of)144 355.2 Q F2(shopt)
-2.5 E F0(options is:)2.5 E F2(autocd)144 373.2 Q F0 .2
+2.5 E F0(options is:)2.5 E F2(autocd)144 373.2 Q F0 .199
(If set, a command name that is the name of a directory is e)11.11 F
--.15(xe)-.15 G .199(cuted as if it were the ar).15 F(gu-)-.18 E
+-.15(xe)-.15 G .2(cuted as if it were the ar).15 F(gu-)-.18 E
(ment to the)184 385.2 Q F2(cd)2.5 E F0 2.5(command. This)2.5 F
(option is only used by interacti)2.5 E .3 -.15(ve s)-.25 H(hells.).15 E
-F2(cdable_v)144 397.2 Q(ars)-.1 E F0 .155(If set, an ar)184 409.2 R .155
-(gument to the)-.18 F F2(cd)2.655 E F0 -.2(bu)2.655 G .156
+F2(cdable_v)144 397.2 Q(ars)-.1 E F0 .156(If set, an ar)184 409.2 R .156
+(gument to the)-.18 F F2(cd)2.656 E F0 -.2(bu)2.656 G .155
(iltin command that is not a directory is assumed to be the).2 F
(name of a v)184 421.2 Q(ariable whose v)-.25 E
(alue is the directory to change to.)-.25 E F2(cdspell)144 433.2 Q F0
1.055
(If set, minor errors in the spelling of a directory component in a)
-10.55 F F2(cd)3.555 E F0 1.055(command will be)3.555 F 3.987
-(corrected. The)184 445.2 R 1.487(errors check)3.987 F 1.487
-(ed for are transposed characters, a missing character)-.1 F 3.988(,a)
--.4 G(nd)-3.988 E .77(one character too man)184 457.2 R 4.57 -.65(y. I)
+10.55 F F2(cd)3.555 E F0 1.055(command will be)3.555 F 3.988
+(corrected. The)184 445.2 R 1.488(errors check)3.988 F 1.487
+(ed for are transposed characters, a missing character)-.1 F 3.987(,a)
+-.4 G(nd)-3.987 E .77(one character too man)184 457.2 R 4.57 -.65(y. I)
-.15 H 3.27(fac).65 G .77
(orrection is found, the corrected \214lename is printed, and)-3.27 F
(the command proceeds.)184 469.2 Q
(This option is only used by interacti)5 E .3 -.15(ve s)-.25 H(hells.)
-.15 E F2(checkhash)144 481.2 Q F0 2.079(If set,)184 493.2 R F2(bash)
-4.579 E F0 2.079(checks that a command found in the hash table e)4.579 F
-2.08(xists before trying to)-.15 F -.15(exe)184 505.2 S(cute it.).15 E
+.15 E F2(checkhash)144 481.2 Q F0 2.08(If set,)184 493.2 R F2(bash)4.58
+E F0 2.079(checks that a command found in the hash table e)4.58 F 2.079
+(xists before trying to)-.15 F -.15(exe)184 505.2 S(cute it.).15 E
(If a hashed command no longer e)5 E
(xists, a normal path search is performed.)-.15 E F2(checkjobs)144 517.2
-Q F0 .449(If set,)184 529.2 R F2(bash)2.949 E F0 .449
-(lists the status of an)2.949 F 2.949(ys)-.15 G .448
-(topped and running jobs before e)-2.949 F .448(xiting an interacti)-.15
-F -.15(ve)-.25 G 3.438(shell. If)184 541.2 R(an)3.438 E 3.438(yj)-.15 G
-.938(obs are running, this causes the e)-3.438 F .938
-(xit to be deferred until a second e)-.15 F .939(xit is)-.15 F 2.203
+Q F0 .448(If set,)184 529.2 R F2(bash)2.948 E F0 .448
+(lists the status of an)2.948 F 2.949(ys)-.15 G .449
+(topped and running jobs before e)-2.949 F .449(xiting an interacti)-.15
+F -.15(ve)-.25 G 3.439(shell. If)184 541.2 R(an)3.439 E 3.439(yj)-.15 G
+.938(obs are running, this causes the e)-3.439 F .938
+(xit to be deferred until a second e)-.15 F .938(xit is)-.15 F 2.203
(attempted without an interv)184 553.2 R 2.203(ening command \(see)-.15
F/F3 9/Times-Bold@0 SF 2.203(JOB CONTR)4.703 F(OL)-.27 E F0(abo)4.453 E
--.15(ve)-.15 G 4.703(\). The).15 F(shell)4.703 E(al)184 565.2 Q -.1(wa)
+-.15(ve)-.15 G 4.703(\). The).15 F(shell)4.704 E(al)184 565.2 Q -.1(wa)
-.1 G(ys postpones e).1 E(xiting if an)-.15 E 2.5(yj)-.15 G
-(obs are stopped.)-2.5 E F2(checkwinsize)144 577.2 Q F0 .796(If set,)184
-589.2 R F2(bash)3.296 E F0 .796(checks the windo)3.296 F 3.296(ws)-.25 G
-.797(ize after each command and, if necessary)-3.296 F 3.297(,u)-.65 G
-.797(pdates the)-3.297 F -.25(va)184 601.2 S(lues of).25 E F3(LINES)2.5
+(obs are stopped.)-2.5 E F2(checkwinsize)144 577.2 Q F0 .797(If set,)184
+589.2 R F2(bash)3.297 E F0 .797(checks the windo)3.297 F 3.297(ws)-.25 G
+.796(ize after each command and, if necessary)-3.297 F 3.296(,u)-.65 G
+.796(pdates the)-3.296 F -.25(va)184 601.2 S(lues of).25 E F3(LINES)2.5
E F0(and)2.25 E F3(COLUMNS)2.5 E/F4 9/Times-Roman@0 SF(.)A F2(cmdhist)
144 613.2 Q F0 1.202(If set,)6.11 F F2(bash)3.702 E F0 1.202
(attempts to sa)3.702 F 1.502 -.15(ve a)-.2 H 1.202
(ll lines of a multiple-line command in the same history).15 F(entry)184
625.2 Q 5(.T)-.65 G(his allo)-5 E
(ws easy re-editing of multi-line commands.)-.25 E F2(compat31)144 637.2
-Q F0 .419(If set,)184 649.2 R F2(bash)2.919 E F0 .419(changes its beha)
-2.919 F .419(vior to that of v)-.2 F .42
-(ersion 3.1 with respect to quoted ar)-.15 F(guments)-.18 E .462(to the)
-184 661.2 R F2([[)2.962 E F0 .462(conditional command')2.962 F(s)-.55 E
+Q F0 .42(If set,)184 649.2 R F2(bash)2.92 E F0 .42(changes its beha)2.92
+F .419(vior to that of v)-.2 F .419
+(ersion 3.1 with respect to quoted ar)-.15 F(guments)-.18 E .461(to the)
+184 661.2 R F2([[)2.961 E F0 .462(conditional command')2.962 F(s)-.55 E
F2(=~)2.962 E F0 .462
(operator and locale-speci\214c string comparison when)2.962 F .71
(using the)184 673.2 R F2([[)3.21 E F0 .71(conditional command')3.21 F
(s)-.55 E F2(<)3.21 E F0(and)3.21 E F2(>)3.21 E F0 3.21(operators. Bash)
-3.21 F -.15(ve)3.21 G .71(rsions prior to bash-4.1).15 F .821
+3.21 F -.15(ve)3.21 G .71(rsions prior to bash-4.1).15 F .82
(use ASCII collation and)184 685.2 R F1(str)3.321 E(cmp)-.37 E F0 .821
-(\(3\); bash-4.1 and later use the current locale').19 F 3.32(sc)-.55 G
-(ollation)-3.32 E(sequence and)184 697.2 Q F1(str)2.5 E(coll)-.37 E F0
-(\(3\).).51 E(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(67)
-187.615 E 0 Cg EP
+(\(3\); bash-4.1 and later use the current locale').19 F 3.321(sc)-.55 G
+(ollation)-3.321 E(sequence and)184 697.2 Q F1(str)2.5 E(coll)-.37 E F0
+(\(3\).).51 E(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(67)190.395
+E 0 Cg EP
%%Page: 68 68
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
--.35 E/F1 10/Times-Bold@0 SF(compat32)144 84 Q F0 1.409(If set,)184 96 R
-F1(bash)3.909 E F0 1.409(changes its beha)3.909 F 1.409
-(vior to that of v)-.2 F 1.41
-(ersion 3.2 with respect to locale-speci\214c)-.15 F .423
+-.35 E/F1 10/Times-Bold@0 SF(compat32)144 84 Q F0 1.41(If set,)184 96 R
+F1(bash)3.91 E F0 1.41(changes its beha)3.91 F 1.409(vior to that of v)
+-.2 F 1.409(ersion 3.2 with respect to locale-speci\214c)-.15 F .422
(string comparison when using the)184 108 R F1([[)2.922 E F0 .422
(conditional command')2.922 F(s)-.55 E F1(<)2.922 E F0(and)2.922 E F1(>)
-2.922 E F0 .422(operators \(see pre-)2.922 F(vious item\).)184 120 Q F1
-(compat40)144 132 Q F0 1.409(If set,)184 144 R F1(bash)3.909 E F0 1.409
-(changes its beha)3.909 F 1.409(vior to that of v)-.2 F 1.41
-(ersion 4.0 with respect to locale-speci\214c)-.15 F 2.008
-(string comparison when using the)184 156 R F1([[)4.508 E F0 2.007
-(conditional command')4.508 F(s)-.55 E F1(<)4.507 E F0(and)4.507 E F1(>)
-4.507 E F0 2.007(operators \(see)4.507 F .769(description of)184 168 R
-F1(compat31)3.269 E F0 3.269(\)a)C .769(nd the ef)-3.269 F .769
-(fect of interrupting a command list.)-.25 F .77(Bash v)5.77 F(ersions)
--.15 E .087(4.0 and later interrupt the list as if the shell recei)184
-180 R -.15(ve)-.25 G 2.586(dt).15 G .086(he interrupt; pre)-2.586 F .086
-(vious v)-.25 F .086(ersions con-)-.15 F(tinue with the ne)184 192 Q
-(xt command in the list.)-.15 E F1(compat41)144 204 Q F0 1.483(If set,)
-184 216 R F1(bash)3.983 E F0 3.983(,w)C 1.483(hen in)-3.983 F/F2 10
-/Times-Italic@0 SF(posix)3.983 E F0 1.484
-(mode, treats a single quote in a double-quoted parameter)3.983 F -.15
-(ex)184 228 S .959(pansion as a special character).15 F 5.959(.T)-.55 G
-.958(he single quotes must match \(an e)-5.959 F -.15(ve)-.25 G 3.458
-(nn).15 G .958(umber\) and)-3.458 F .59
+2.923 E F0 .423(operators \(see pre-)2.923 F(vious item\).)184 120 Q F1
+(compat40)144 132 Q F0 1.41(If set,)184 144 R F1(bash)3.91 E F0 1.41
+(changes its beha)3.91 F 1.409(vior to that of v)-.2 F 1.409
+(ersion 4.0 with respect to locale-speci\214c)-.15 F 2.007
+(string comparison when using the)184 156 R F1([[)4.507 E F0 2.008
+(conditional command')4.507 F(s)-.55 E F1(<)4.508 E F0(and)4.508 E F1(>)
+4.508 E F0 2.008(operators \(see)4.508 F .77(description of)184 168 R F1
+(compat31)3.27 E F0 3.269(\)a)C .769(nd the ef)-3.269 F .769
+(fect of interrupting a command list.)-.25 F .769(Bash v)5.769 F
+(ersions)-.15 E .086
+(4.0 and later interrupt the list as if the shell recei)184 180 R -.15
+(ve)-.25 G 2.587(dt).15 G .087(he interrupt; pre)-2.587 F .087(vious v)
+-.25 F .087(ersions con-)-.15 F(tinue with the ne)184 192 Q
+(xt command in the list.)-.15 E F1(compat41)144 204 Q F0 1.484(If set,)
+184 216 R F1(bash)3.984 E F0 3.984(,w)C 1.484(hen in)-3.984 F/F2 10
+/Times-Italic@0 SF(posix)3.984 E F0 1.483
+(mode, treats a single quote in a double-quoted parameter)3.984 F -.15
+(ex)184 228 S .958(pansion as a special character).15 F 5.958(.T)-.55 G
+.959(he single quotes must match \(an e)-5.958 F -.15(ve)-.25 G 3.459
+(nn).15 G .959(umber\) and)-3.459 F .59
(the characters between the single quotes are considered quoted.)184 240
-R .59(This is the beha)5.59 F .59(vior of)-.2 F .59
+R .59(This is the beha)5.59 F .59(vior of)-.2 F .589
(posix mode through v)184 252 R .589(ersion 4.1.)-.15 F .589(The def)
-5.589 F .589(ault bash beha)-.1 F .589(vior remains as in pre)-.2 F .589
+5.589 F .589(ault bash beha)-.1 F .589(vior remains as in pre)-.2 F .59
(vious v)-.25 F(er)-.15 E(-)-.2 E(sions.)184 264 Q F1(compat42)144 276 Q
-F0 1.796(If set,)184 288 R F1(bash)4.296 E F0 1.796
+F0 1.797(If set,)184 288 R F1(bash)4.297 E F0 1.796
(does not process the replacement string in the pattern substitution w)
4.296 F(ord)-.1 E -.15(ex)184 300 S(pansion using quote remo).15 E -.25
-(va)-.15 G(l.).25 E F1(complete_fullquote)144 312 Q F0 .654(If set,)184
+(va)-.15 G(l.).25 E F1(complete_fullquote)144 312 Q F0 .653(If set,)184
324 R F1(bash)3.153 E F0 .653(quotes all shell metacharacters in \214le\
-names and directory names when per)3.153 F(-)-.2 E 1.524
-(forming completion.)184 336 R 1.524(If not set,)6.524 F F1(bash)4.024 E
+names and directory names when per)3.153 F(-)-.2 E 1.525
+(forming completion.)184 336 R 1.524(If not set,)6.525 F F1(bash)4.024 E
F0(remo)4.024 E -.15(ve)-.15 G 4.024(sm).15 G 1.524
(etacharacters such as the dollar sign)-4.024 F 2.667(from the set of c\
haracters that will be quoted in completed \214lenames when these)184
-348 R .028(metacharacters appear in shell v)184 360 R .028
-(ariable references in w)-.25 F .029(ords to be completed.)-.1 F .029
-(This means)5.029 F 1.073(that dollar signs in v)184 372 R 1.073
+348 R .029(metacharacters appear in shell v)184 360 R .028
+(ariable references in w)-.25 F .028(ords to be completed.)-.1 F .028
+(This means)5.028 F 1.072(that dollar signs in v)184 372 R 1.073
(ariable names that e)-.25 F 1.073
(xpand to directories will not be quoted; ho)-.15 F(w-)-.25 E -2.15 -.25
-(ev e)184 384 T 1.922 -.4(r, a).25 H 1.422 -.15(ny d).4 H 1.123
+(ev e)184 384 T 1.923 -.4(r, a).25 H 1.423 -.15(ny d).4 H 1.123
(ollar signs appearing in \214lenames will not be quoted, either).15 F
-6.123(.T)-.55 G 1.123(his is acti)-6.123 F -.15(ve)-.25 G .59
+6.123(.T)-.55 G 1.122(his is acti)-6.123 F -.15(ve)-.25 G .59
(only when bash is using backslashes to quote completed \214lenames.)184
396 R .59(This v)5.59 F .59(ariable is set)-.25 F(by def)184 408 Q
(ault, which is the def)-.1 E(ault bash beha)-.1 E(vior in v)-.2 E
-(ersions through 4.2.)-.15 E F1(dir)144 420 Q(expand)-.18 E F0 .486
-(If set,)184 432 R F1(bash)2.986 E F0 .486
+(ersions through 4.2.)-.15 E F1(dir)144 420 Q(expand)-.18 E F0 .487
+(If set,)184 432 R F1(bash)2.987 E F0 .486
(replaces directory names with the results of w)2.986 F .486(ord e)-.1 F
-.487(xpansion when perform-)-.15 F .18(ing \214lename completion.)184
-444 R .179(This changes the contents of the readline editing b)5.18 F
-(uf)-.2 E(fer)-.25 E 5.179(.I)-.55 G 2.679(fn)-5.179 G(ot)-2.679 E(set,)
-184 456 Q F1(bash)2.5 E F0(attempts to preserv)2.5 E 2.5(ew)-.15 G
-(hat the user typed.)-2.5 E F1(dirspell)144 468 Q F0 .858(If set,)7.77 F
-F1(bash)3.358 E F0 .858
-(attempts spelling correction on directory names during w)3.358 F .859
+.486(xpansion when perform-)-.15 F .179(ing \214lename completion.)184
+444 R .179(This changes the contents of the readline editing b)5.179 F
+(uf)-.2 E(fer)-.25 E 5.18(.I)-.55 G 2.68(fn)-5.18 G(ot)-2.68 E(set,)184
+456 Q F1(bash)2.5 E F0(attempts to preserv)2.5 E 2.5(ew)-.15 G
+(hat the user typed.)-2.5 E F1(dirspell)144 468 Q F0 .859(If set,)7.77 F
+F1(bash)3.359 E F0 .858
+(attempts spelling correction on directory names during w)3.359 F .858
(ord completion if)-.1 F
(the directory name initially supplied does not e)184 480 Q(xist.)-.15 E
F1(dotglob)144 492 Q F0 .165(If set,)7.77 F F1(bash)2.665 E F0 .165
(includes \214lenames be)2.665 F .165(ginning with a `.)-.15 F 2.665('i)
-.7 G 2.665(nt)-2.665 G .165(he results of pathname e)-2.665 F
-(xpansion.)-.15 E F1(execfail)144 504 Q F0 1.386
-(If set, a non-interacti)7.79 F 1.686 -.15(ve s)-.25 H 1.386
+(xpansion.)-.15 E F1(execfail)144 504 Q F0 1.387
+(If set, a non-interacti)7.79 F 1.687 -.15(ve s)-.25 H 1.386
(hell will not e).15 F 1.386(xit if it cannot e)-.15 F -.15(xe)-.15 G
-1.387(cute the \214le speci\214ed as an).15 F(ar)184 516 Q
+1.386(cute the \214le speci\214ed as an).15 F(ar)184 516 Q
(gument to the)-.18 E F1(exec)2.5 E F0 -.2(bu)2.5 G(iltin command.).2 E
(An interacti)5 E .3 -.15(ve s)-.25 H(hell does not e).15 E(xit if)-.15
E F1(exec)2.5 E F0 -.1(fa)2.5 G(ils.).1 E F1(expand_aliases)144 528 Q F0
-.717(If set, aliases are e)184 540 R .717(xpanded as described abo)-.15
+.716(If set, aliases are e)184 540 R .717(xpanded as described abo)-.15
F 1.017 -.15(ve u)-.15 H(nder).15 E/F3 9/Times-Bold@0 SF(ALIASES)3.217 E
-/F4 9/Times-Roman@0 SF(.)A F0 .716(This option is enabled)5.217 F
+/F4 9/Times-Roman@0 SF(.)A F0 .717(This option is enabled)5.217 F
(by def)184 552 Q(ault for interacti)-.1 E .3 -.15(ve s)-.25 H(hells.)
.15 E F1(extdeb)144 564 Q(ug)-.2 E F0(If set, beha)184 576 Q
(vior intended for use by deb)-.2 E(uggers is enabled:)-.2 E F1(1.)184
-588 Q F0(The)28.5 E F1<ad46>4.25 E F0 1.75(option to the)4.25 F F1
+588 Q F0(The)28.5 E F1<ad46>4.251 E F0 1.751(option to the)4.251 F F1
(declar)4.251 E(e)-.18 E F0 -.2(bu)4.251 G 1.751
(iltin displays the source \214le name and line).2 F
(number corresponding to each function name supplied as an ar)220 600 Q
(gument.)-.18 E F1(2.)184 612 Q F0 1.667(If the command run by the)28.5
F F1(DEB)4.167 E(UG)-.1 E F0 1.667(trap returns a non-zero v)4.167 F
1.667(alue, the ne)-.25 F(xt)-.15 E(command is skipped and not e)220 624
-Q -.15(xe)-.15 G(cuted.).15 E F1(3.)184 636 Q F0 .84
-(If the command run by the)28.5 F F1(DEB)3.34 E(UG)-.1 E F0 .841
-(trap returns a v)3.341 F .841(alue of 2, and the shell is)-.25 F -.15
+Q -.15(xe)-.15 G(cuted.).15 E F1(3.)184 636 Q F0 .841
+(If the command run by the)28.5 F F1(DEB)3.341 E(UG)-.1 E F0 .841
+(trap returns a v)3.341 F .84(alue of 2, and the shell is)-.25 F -.15
(exe)220 648 S .488
(cuting in a subroutine \(a shell function or a shell script e).15 F
-.15(xe)-.15 G .488(cuted by the).15 F F1(.)2.988 E F0(or)2.988 E F1
(sour)220 660 Q(ce)-.18 E F0 -.2(bu)2.5 G(iltins\), a call to).2 E F1
-.18(re)2.5 G(tur).18 E(n)-.15 E F0(is simulated.)2.5 E F1(4.)184 672 Q
-F3 -.27(BA)28.5 G(SH_ARGC).27 E F0(and)3.153 E F3 -.27(BA)3.403 G
+F3 -.27(BA)28.5 G(SH_ARGC).27 E F0(and)3.154 E F3 -.27(BA)3.404 G
(SH_ARGV).27 E F0 .904(are updated as described in their descriptions)
3.154 F(abo)220 684 Q -.15(ve)-.15 G(.).15 E F1(5.)184 696 Q F0 1.359
(Function tracing is enabled:)28.5 F 1.359
708 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F1(\()2.5 E F2
(command)2.5 E F1(\))2.5 E F0(inherit the)2.5 E F1(DEB)2.5 E(UG)-.1 E F0
(and)2.5 E F1(RETURN)2.5 E F0(traps.)2.5 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(68)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(68)190.395 E 0 Cg EP
%%Page: 69 69
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
--.35 E/F1 10/Times-Bold@0 SF(6.)184 84 Q F0 .804
-(Error tracing is enabled:)28.5 F .805
-(command substitution, shell functions, and subshells)5.804 F(in)220 96
+-.35 E/F1 10/Times-Bold@0 SF(6.)184 84 Q F0 .805
+(Error tracing is enabled:)28.5 F .804
+(command substitution, shell functions, and subshells)5.805 F(in)220 96
Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F1(\()2.5 E/F2 10
/Times-Italic@0 SF(command)2.5 E F1(\))2.5 E F0(inherit the)2.5 E F1
(ERR)2.5 E F0(trap.)2.5 E F1(extglob)144 108 Q F0 .4(If set, the e)8.89
(uoting is performed within)-4.973 F F1(${)4.973 E F2(par)A(ameter)-.15
E F1(})A F0 -.15(ex)4.973 G(pansions).15 E(enclosed in double quotes.)
184 156 Q(This option is enabled by def)5 E(ault.)-.1 E F1(failglob)144
-168 Q F0 1.425(If set, patterns which f)7.77 F 1.425
-(ail to match \214lenames during pathname e)-.1 F 1.424
+168 Q F0 1.424(If set, patterns which f)7.77 F 1.425
+(ail to match \214lenames during pathname e)-.1 F 1.425
(xpansion result in an)-.15 F -.15(ex)184 180 S(pansion error).15 E(.)
-.55 E F1 -.25(fo)144 192 S -.18(rc).25 G(e_\214gnor).18 E(e)-.18 E F0
-.936(If set, the suf)184 204 R<8c78>-.25 E .936(es speci\214ed by the)
+.937(If set, the suf)184 204 R<8c78>-.25 E .936(es speci\214ed by the)
-.15 F/F3 9/Times-Bold@0 SF(FIGNORE)3.436 E F0 .936(shell v)3.186 F .936
-(ariable cause w)-.25 F .937(ords to be ignored)-.1 F .32
+(ariable cause w)-.25 F .936(ords to be ignored)-.1 F .32
(when performing w)184 216 R .32(ord completion e)-.1 F -.15(ve)-.25 G
2.82(ni).15 G 2.82(ft)-2.82 G .32(he ignored w)-2.82 F .32
-(ords are the only possible com-)-.1 F 2.947(pletions. See)184 228 R F3
-.447(SHELL V)2.947 F(ARIABLES)-1.215 E F0(abo)2.697 E .747 -.15(ve f)
--.15 H .448(or a description of).15 F F3(FIGNORE)2.948 E/F4 9
-/Times-Roman@0 SF(.)A F0 .448(This option is)4.948 F(enabled by def)184
-240 Q(ault.)-.1 E F1(globasciiranges)144 252 Q F0 2.519(If set, range e)
-184 264 R 2.519(xpressions used in pattern matching brack)-.15 F 2.518
-(et e)-.1 F 2.518(xpressions \(see)-.15 F F3 -.09(Pa)5.018 G(tter).09 E
-(n)-.135 E(Matching)184 276 Q F0(abo)2.964 E -.15(ve)-.15 G 3.214(\)b)
-.15 G(eha)-3.214 E 1.014 -.15(ve a)-.2 H 3.214(si).15 G 3.214(fi)-3.214
+(ords are the only possible com-)-.1 F 2.948(pletions. See)184 228 R F3
+.448(SHELL V)2.948 F(ARIABLES)-1.215 E F0(abo)2.698 E .748 -.15(ve f)
+-.15 H .448(or a description of).15 F F3(FIGNORE)2.947 E/F4 9
+/Times-Roman@0 SF(.)A F0 .447(This option is)4.947 F(enabled by def)184
+240 Q(ault.)-.1 E F1(globasciiranges)144 252 Q F0 2.518(If set, range e)
+184 264 R 2.519(xpressions used in pattern matching brack)-.15 F 2.519
+(et e)-.1 F 2.519(xpressions \(see)-.15 F F3 -.09(Pa)5.019 G(tter).09 E
+(n)-.135 E(Matching)184 276 Q F0(abo)2.965 E -.15(ve)-.15 G 3.215(\)b)
+.15 G(eha)-3.215 E 1.015 -.15(ve a)-.2 H 3.214(si).15 G 3.214(fi)-3.214
G 3.214(nt)-3.214 G .714
(he traditional C locale when performing comparisons.)-3.214 F 1.02
(That is, the current locale')184 288 R 3.52(sc)-.55 G 1.02
(ollating sequence is not tak)-3.52 F 1.02(en into account, so)-.1 F F1
-(b)3.52 E F0 1.02(will not)3.52 F .956(collate between)184 300 R F1(A)
-3.456 E F0(and)3.456 E F1(B)3.456 E F0 3.457(,a)C .957(nd upper)-3.457 F
-.957(-case and lo)-.2 F(wer)-.25 E .957
+(b)3.52 E F0 1.02(will not)3.52 F .957(collate between)184 300 R F1(A)
+3.457 E F0(and)3.457 E F1(B)3.457 E F0 3.457(,a)C .957(nd upper)-3.457 F
+.957(-case and lo)-.2 F(wer)-.25 E .956
(-case ASCII characters will collate)-.2 F(together)184 312 Q(.)-.55 E
-F1(globstar)144 324 Q F0 .519(If set, the pattern)5 F F1(**)3.019 E F0
-.519(used in a pathname e)3.019 F .519(xpansion conte)-.15 F .518
-(xt will match all \214les and zero)-.15 F .431
+F1(globstar)144 324 Q F0 .518(If set, the pattern)5 F F1(**)3.018 E F0
+.519(used in a pathname e)3.019 F .519(xpansion conte)-.15 F .519
+(xt will match all \214les and zero)-.15 F .432
(or more directories and subdirectories.)184 336 R .431
-(If the pattern is follo)5.431 F .432(wed by a)-.25 F F1(/)2.932 E F0
-2.932(,o)C .432(nly directories)-2.932 F(and subdirectories match.)184
+(If the pattern is follo)5.432 F .431(wed by a)-.25 F F1(/)2.931 E F0
+2.931(,o)C .431(nly directories)-2.931 F(and subdirectories match.)184
348 Q F1(gnu_errfmt)144 360 Q F0(If set, shell error messages are writt\
en in the standard GNU error message format.)184 372 Q F1(histappend)144
384 Q F0 .676
(If set, the history list is appended to the \214le named by the v)184
-396 R .676(alue of the)-.25 F F3(HISTFILE)3.176 E F0 -.25(va)2.926 G
+396 R .676(alue of the)-.25 F F3(HISTFILE)3.177 E F0 -.25(va)2.927 G
(ri-).25 E(able when the shell e)184 408 Q(xits, rather than o)-.15 E
-.15(ve)-.15 G(rwriting the \214le.).15 E F1(histr)144 420 Q(eedit)-.18
-E F0 .575(If set, and)184 432 R F1 -.18(re)3.075 G(adline).18 E F0 .575
-(is being used, a user is gi)3.075 F -.15(ve)-.25 G 3.075(nt).15 G .576
-(he opportunity to re-edit a f)-3.075 F .576(ailed his-)-.1 F
-(tory substitution.)184 444 Q F1(histv)144 456 Q(erify)-.1 E F0 .403
+E F0 .576(If set, and)184 432 R F1 -.18(re)3.076 G(adline).18 E F0 .575
+(is being used, a user is gi)3.076 F -.15(ve)-.25 G 3.075(nt).15 G .575
+(he opportunity to re-edit a f)-3.075 F .575(ailed his-)-.1 F
+(tory substitution.)184 444 Q F1(histv)144 456 Q(erify)-.1 E F0 .402
(If set, and)184 468 R F1 -.18(re)2.903 G(adline).18 E F0 .403
(is being used, the results of history substitution are not immediately)
-2.903 F .661(passed to the shell parser)184 480 R 5.661(.I)-.55 G .662
-(nstead, the resulting line is loaded into the)-5.661 F F1 -.18(re)3.162
-G(adline).18 E F0(editing)3.162 E -.2(bu)184 492 S -.25(ff).2 G(er).25 E
+2.903 F .662(passed to the shell parser)184 480 R 5.662(.I)-.55 G .661
+(nstead, the resulting line is loaded into the)-5.662 F F1 -.18(re)3.161
+G(adline).18 E F0(editing)3.161 E -.2(bu)184 492 S -.25(ff).2 G(er).25 E
2.5(,a)-.4 G(llo)-2.5 E(wing further modi\214cation.)-.25 E F1
-(hostcomplete)144 504 Q F0 1.182(If set, and)184 516 R F1 -.18(re)3.682
-G(adline).18 E F0 1.182(is being used,)3.682 F F1(bash)3.682 E F0 1.181
-(will attempt to perform hostname completion)3.681 F 1.38(when a w)184
-528 R 1.38(ord containing a)-.1 F F1(@)3.881 E F0 1.381
-(is being completed \(see)3.881 F F1(Completing)3.881 E F0(under)3.881 E
-F3(READLINE)3.881 E F0(abo)184 540 Q -.15(ve)-.15 G 2.5(\). This).15 F
+(hostcomplete)144 504 Q F0 1.181(If set, and)184 516 R F1 -.18(re)3.681
+G(adline).18 E F0 1.181(is being used,)3.681 F F1(bash)3.682 E F0 1.182
+(will attempt to perform hostname completion)3.682 F 1.381(when a w)184
+528 R 1.381(ord containing a)-.1 F F1(@)3.881 E F0 1.381
+(is being completed \(see)3.881 F F1(Completing)3.88 E F0(under)3.88 E
+F3(READLINE)3.88 E F0(abo)184 540 Q -.15(ve)-.15 G 2.5(\). This).15 F
(is enabled by def)2.5 E(ault.)-.1 E F1(huponexit)144 552 Q F0(If set,)
184 564 Q F1(bash)2.5 E F0(will send)2.5 E F3(SIGHUP)2.5 E F0
(to all jobs when an interacti)2.25 E .3 -.15(ve l)-.25 H(ogin shell e)
(ord and all remaining characters on)-.1 F .967
(that line to be ignored in an interacti)184 600 R 1.267 -.15(ve s)-.25
H .967(hell \(see).15 F F3(COMMENTS)3.467 E F0(abo)3.217 E -.15(ve)-.15
-G 3.467(\). This).15 F .968(option is)3.468 F(enabled by def)184 612 Q
-(ault.)-.1 E F1(lastpipe)144 624 Q F0 1.212
+G 3.467(\). This).15 F .967(option is)3.467 F(enabled by def)184 612 Q
+(ault.)-.1 E F1(lastpipe)144 624 Q F0 1.211
(If set, and job control is not acti)6.66 F -.15(ve)-.25 G 3.712(,t).15
G 1.212(he shell runs the last command of a pipeline not)-3.712 F -.15
(exe)184 636 S(cuted in the background in the current shell en).15 E
-(vironment.)-.4 E F1(lithist)144 648 Q F0 .654(If set, and the)15.55 F
-F1(cmdhist)3.154 E F0 .654
+(vironment.)-.4 E F1(lithist)144 648 Q F0 .655(If set, and the)15.55 F
+F1(cmdhist)3.155 E F0 .654
(option is enabled, multi-line commands are sa)3.154 F -.15(ve)-.2 G
-3.155(dt).15 G 3.155(ot)-3.155 G .655(he history)-3.155 F
+3.154(dt).15 G 3.154(ot)-3.154 G .654(he history)-3.154 F
(with embedded ne)184 660 Q
(wlines rather than using semicolon separators where possible.)-.25 E F1
(login_shell)144 672 Q F0 .486
(The shell sets this option if it is started as a login shell \(see)184
-684 R F3(INV)2.986 E(OCA)-.405 E(TION)-.855 E F0(abo)2.736 E -.15(ve)
--.15 G 2.986(\). The).15 F -.25(va)184 696 S(lue may not be changed.).25
-E(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(69)187.615 E 0 Cg EP
+684 R F3(INV)2.987 E(OCA)-.405 E(TION)-.855 E F0(abo)2.737 E -.15(ve)
+-.15 G 2.987(\). The).15 F -.25(va)184 696 S(lue may not be changed.).25
+E(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(69)190.395 E 0 Cg EP
%%Page: 70 70
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
--.35 E/F1 10/Times-Bold@0 SF(mailwar)144 84 Q(n)-.15 E F0 .814
-(If set, and a \214le that)184 96 R F1(bash)3.314 E F0 .815
-(is checking for mail has been accessed since the last time it)3.314 F
+-.35 E/F1 10/Times-Bold@0 SF(mailwar)144 84 Q(n)-.15 E F0 .815
+(If set, and a \214le that)184 96 R F1(bash)3.315 E F0 .814
+(is checking for mail has been accessed since the last time it)3.315 F
-.1(wa)184 108 S 2.5(sc).1 G(heck)-2.5 E(ed, the message `)-.1 E
(`The mail in)-.74 E/F2 10/Times-Italic@0 SF(mail\214le)2.5 E F0
(has been read')2.5 E 2.5('i)-.74 G 2.5(sd)-2.5 G(isplayed.)-2.5 E F1
-(no_empty_cmd_completion)144 120 Q F0 .325(If set, and)184 132 R F1 -.18
-(re)2.825 G(adline).18 E F0 .325(is being used,)2.825 F F1(bash)2.824 E
+(no_empty_cmd_completion)144 120 Q F0 .324(If set, and)184 132 R F1 -.18
+(re)2.824 G(adline).18 E F0 .324(is being used,)2.824 F F1(bash)2.824 E
F0 .324(will not attempt to search the)2.824 F/F3 9/Times-Bold@0 SF
--.666(PA)2.824 G(TH)-.189 E F0 .324(for possible)2.574 F
+-.666(PA)2.825 G(TH)-.189 E F0 .325(for possible)2.575 F
(completions when completion is attempted on an empty line.)184 144 Q F1
-(nocaseglob)144 156 Q F0 .436(If set,)184 168 R F1(bash)2.936 E F0 .436
-(matches \214lenames in a case\255insensiti)2.936 F .737 -.15(ve f)-.25
-H .437(ashion when performing pathname).05 F -.15(ex)184 180 S
+(nocaseglob)144 156 Q F0 .437(If set,)184 168 R F1(bash)2.937 E F0 .436
+(matches \214lenames in a case\255insensiti)2.937 F .736 -.15(ve f)-.25
+H .436(ashion when performing pathname).05 F -.15(ex)184 180 S
(pansion \(see).15 E F1 -.1(Pa)2.5 G(thname Expansion).1 E F0(abo)2.5 E
--.15(ve)-.15 G(\).).15 E F1(nocasematch)144 192 Q F0 1.194(If set,)184
-204 R F1(bash)3.694 E F0 1.194(matches patterns in a case\255insensiti)
-3.694 F 1.493 -.15(ve f)-.25 H 1.193(ashion when performing matching).05
+-.15(ve)-.15 G(\).).15 E F1(nocasematch)144 192 Q F0 1.193(If set,)184
+204 R F1(bash)3.693 E F0 1.194(matches patterns in a case\255insensiti)
+3.693 F 1.494 -.15(ve f)-.25 H 1.194(ashion when performing matching).05
F(while e)184 216 Q -.15(xe)-.15 G(cuting).15 E F1(case)2.5 E F0(or)2.5
E F1([[)2.5 E F0(conditional commands.)2.5 E F1(nullglob)144 228 Q F0
-.854(If set,)184 240 R F1(bash)3.354 E F0(allo)3.354 E .855
-(ws patterns which match no \214les \(see)-.25 F F1 -.1(Pa)3.355 G .855
-(thname Expansion).1 F F0(abo)3.355 E -.15(ve)-.15 G 3.355(\)t).15 G(o)
--3.355 E -.15(ex)184 252 S(pand to a null string, rather than themselv)
-.15 E(es.)-.15 E F1(pr)144 264 Q(ogcomp)-.18 E F0 .677
+.855(If set,)184 240 R F1(bash)3.355 E F0(allo)3.355 E .855
+(ws patterns which match no \214les \(see)-.25 F F1 -.1(Pa)3.354 G .854
+(thname Expansion).1 F F0(abo)3.354 E -.15(ve)-.15 G 3.354(\)t).15 G(o)
+-3.354 E -.15(ex)184 252 S(pand to a null string, rather than themselv)
+.15 E(es.)-.15 E F1(pr)144 264 Q(ogcomp)-.18 E F0 .676
(If set, the programmable completion f)184 276 R .677(acilities \(see)
--.1 F F1(Pr)3.176 E .676(ogrammable Completion)-.18 F F0(abo)3.176 E
+-.1 F F1(Pr)3.177 E .677(ogrammable Completion)-.18 F F0(abo)3.177 E
-.15(ve)-.15 G(\)).15 E(are enabled.)184 288 Q
(This option is enabled by def)5 E(ault.)-.1 E F1(pr)144 300 Q(omptv)
--.18 E(ars)-.1 E F0 1.447(If set, prompt strings under)184 312 R 1.448
-(go parameter e)-.18 F 1.448(xpansion, command substitution, arithmetic)
--.15 F -.15(ex)184 324 S .171(pansion, and quote remo).15 F -.25(va)-.15
+-.18 E(ars)-.1 E F0 1.448(If set, prompt strings under)184 312 R 1.448
+(go parameter e)-.18 F 1.447(xpansion, command substitution, arithmetic)
+-.15 F -.15(ex)184 324 S .17(pansion, and quote remo).15 F -.25(va)-.15
G 2.67(la).25 G .17(fter being e)-2.67 F .17(xpanded as described in)
--.15 F F3(PR)2.67 E(OMPTING)-.27 E F0(abo)2.42 E -.15(ve)-.15 G(.).15 E
-(This option is enabled by def)184 336 Q(ault.)-.1 E F1 -.18(re)144 348
+-.15 F F3(PR)2.671 E(OMPTING)-.27 E F0(abo)2.421 E -.15(ve)-.15 G(.).15
+E(This option is enabled by def)184 336 Q(ault.)-.1 E F1 -.18(re)144 348
S(stricted_shell).18 E F0 1.069
(The shell sets this option if it is started in restricted mode \(see)
184 360 R F3 1.069(RESTRICTED SHELL)3.569 F F0(belo)184 372 Q 4.178
1.678(This is not reset when the startup \214les are)6.678 F -.15(exe)
184 384 S(cuted, allo).15 E(wing the startup \214les to disco)-.25 E
-.15(ve)-.15 G 2.5(rw).15 G(hether or not a shell is restricted.)-2.5 E
-F1(shift_v)144 396 Q(erbose)-.1 E F0 .501(If set, the)184 408 R F1
-(shift)3.001 E F0 -.2(bu)3.001 G .501
-(iltin prints an error message when the shift count e).2 F .502
+F1(shift_v)144 396 Q(erbose)-.1 E F0 .502(If set, the)184 408 R F1
+(shift)3.002 E F0 -.2(bu)3.002 G .501
+(iltin prints an error message when the shift count e).2 F .501
(xceeds the number)-.15 F(of positional parameters.)184 420 Q F1(sour)
-144 432 Q(cepath)-.18 E F0 .771(If set, the)184 444 R F1(sour)3.271 E
-(ce)-.18 E F0(\()3.271 E F1(.)A F0 3.271(\)b)C .771(uiltin uses the v)
--3.471 F .771(alue of)-.25 F F3 -.666(PA)3.27 G(TH)-.189 E F0 .77
-(to \214nd the directory containing the)3.02 F(\214le supplied as an ar)
-184 456 Q 2.5(gument. This)-.18 F(option is enabled by def)2.5 E(ault.)
--.1 E F1(xpg_echo)144 468 Q F0(If set, the)184 480 Q F1(echo)2.5 E F0
--.2(bu)2.5 G(iltin e).2 E(xpands backslash-escape sequences by def)-.15
-E(ault.)-.1 E F1(suspend)108 496.8 Q F0([)2.5 E F1<ad66>A F0(])A 1.001
-(Suspend the e)144 508.8 R -.15(xe)-.15 G 1.001
-(cution of this shell until it recei).15 F -.15(ve)-.25 G 3.501(sa).15 G
-F3(SIGCONT)A F0 3.502(signal. A)3.252 F 1.002(login shell cannot be)
-3.502 F .023(suspended; the)144 520.8 R F1<ad66>2.523 E F0 .023
-(option can be used to o)2.523 F -.15(ve)-.15 G .022
-(rride this and force the suspension.).15 F .022(The return status is)
-5.022 F 2.5(0u)144 532.8 S(nless the shell is a login shell and)-2.5 E
+144 432 Q(cepath)-.18 E F0 .77(If set, the)184 444 R F1(sour)3.27 E(ce)
+-.18 E F0(\()3.27 E F1(.)A F0 3.27(\)b)C .77(uiltin uses the v)-3.47 F
+.771(alue of)-.25 F F3 -.666(PA)3.271 G(TH)-.189 E F0 .771
+(to \214nd the directory containing the)3.021 F
+(\214le supplied as an ar)184 456 Q 2.5(gument. This)-.18 F
+(option is enabled by def)2.5 E(ault.)-.1 E F1(xpg_echo)144 468 Q F0
+(If set, the)184 480 Q F1(echo)2.5 E F0 -.2(bu)2.5 G(iltin e).2 E
+(xpands backslash-escape sequences by def)-.15 E(ault.)-.1 E F1(suspend)
+108 496.8 Q F0([)2.5 E F1<ad66>A F0(])A 1.002(Suspend the e)144 508.8 R
+-.15(xe)-.15 G 1.002(cution of this shell until it recei).15 F -.15(ve)
+-.25 G 3.501(sa).15 G F3(SIGCONT)A F0 3.501(signal. A)3.251 F 1.001
+(login shell cannot be)3.501 F .022(suspended; the)144 520.8 R F1<ad66>
+2.522 E F0 .022(option can be used to o)2.522 F -.15(ve)-.15 G .022
+(rride this and force the suspension.).15 F .023(The return status is)
+5.023 F 2.5(0u)144 532.8 S(nless the shell is a login shell and)-2.5 E
F1<ad66>2.5 E F0(is not supplied, or if job control is not enabled.)2.5
E F1(test)108 549.6 Q F2 -.2(ex)2.5 G(pr).2 E F1([)108 561.6 Q F2 -.2
-(ex)2.5 G(pr).2 E F1(])2.5 E F0 .877
-(Return a status of 0 \(true\) or 1 \(f)6.77 F .878
-(alse\) depending on the e)-.1 F -.25(va)-.25 G .878
+(ex)2.5 G(pr).2 E F1(])2.5 E F0 .878
+(Return a status of 0 \(true\) or 1 \(f)6.77 F .877
+(alse\) depending on the e)-.1 F -.25(va)-.25 G .877
(luation of the conditional e).25 F(xpression)-.15 E F2 -.2(ex)144 573.6
S(pr).2 E F0 5.53(.E).73 G .53
(ach operator and operand must be a separate ar)-5.53 F 3.03
-(gument. Expressions)-.18 F .53(are composed of the)3.03 F 3.079
-(primaries described abo)144 585.6 R 3.379 -.15(ve u)-.15 H(nder).15 E
-F3(CONDITION)5.579 E 3.079(AL EXPRESSIONS)-.18 F/F4 9/Times-Roman@0 SF
-(.)A F1(test)7.579 E F0 3.08(does not accept an)5.58 F(y)-.15 E
+(gument. Expressions)-.18 F .53(are composed of the)3.03 F 3.08
+(primaries described abo)144 585.6 R 3.38 -.15(ve u)-.15 H(nder).15 E F3
+(CONDITION)5.58 E 3.079(AL EXPRESSIONS)-.18 F/F4 9/Times-Roman@0 SF(.)A
+F1(test)7.579 E F0 3.079(does not accept an)5.579 F(y)-.15 E
(options, nor does it accept and ignore an ar)144 597.6 Q(gument of)-.18
-E F1<adad>2.5 E F0(as signifying the end of options.)2.5 E .786
-(Expressions may be combined using the follo)144 615.6 R .785
-(wing operators, listed in decreasing order of prece-)-.25 F 3.411
-(dence. The)144 627.6 R -.25(eva)3.411 G .911
-(luation depends on the number of ar).25 F .912(guments; see belo)-.18 F
-4.712 -.65(w. O)-.25 H .912(perator precedence is).65 F
+E F1<adad>2.5 E F0(as signifying the end of options.)2.5 E .785
+(Expressions may be combined using the follo)144 615.6 R .786
+(wing operators, listed in decreasing order of prece-)-.25 F 3.412
+(dence. The)144 627.6 R -.25(eva)3.412 G .912
+(luation depends on the number of ar).25 F .911(guments; see belo)-.18 F
+4.711 -.65(w. O)-.25 H .911(perator precedence is).65 F
(used when there are \214v)144 639.6 Q 2.5(eo)-.15 G 2.5(rm)-2.5 G
(ore ar)-2.5 E(guments.)-.18 E F1(!)144 651.6 Q F2 -.2(ex)2.5 G(pr).2 E
F0 -.35(Tr)12.6 G(ue if).35 E F2 -.2(ex)2.5 G(pr).2 E F0(is f)3.23 E
(ex)144 687.6 S(pr1).2 E F0<ad>2.5 E F1(a)A F2 -.2(ex)2.5 G(pr2).2 E F0
-.35(Tr)180 699.6 S(ue if both).35 E F2 -.2(ex)2.5 G(pr1).2 E F0(and)2.5
E F2 -.2(ex)2.5 G(pr2).2 E F0(are true.)2.52 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(70)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(70)190.395 E 0 Cg EP
%%Page: 71 71
%%BeginPageSetup
BP
E 2.5(2a)144 178.8 S -.18(rg)-2.5 G(uments).18 E .37(If the \214rst ar)
180 190.8 R .37(gument is)-.18 F F2(!)2.87 E F0 2.87(,t)C .37(he e)-2.87
F .37(xpression is true if and only if the second ar)-.15 F .37
-(gument is null.)-.18 F .38(If the \214rst ar)180 202.8 R .38
-(gument is one of the unary conditional operators listed abo)-.18 F .679
--.15(ve u)-.15 H(nder).15 E/F3 9/Times-Bold@0 SF(CONDI-)2.879 E(TION)180
-214.8 Q .552(AL EXPRESSIONS)-.18 F/F4 9/Times-Roman@0 SF(,)A F0 .552
+(gument is null.)-.18 F .379(If the \214rst ar)180 202.8 R .38
+(gument is one of the unary conditional operators listed abo)-.18 F .68
+-.15(ve u)-.15 H(nder).15 E/F3 9/Times-Bold@0 SF(CONDI-)2.88 E(TION)180
+214.8 Q .553(AL EXPRESSIONS)-.18 F/F4 9/Times-Roman@0 SF(,)A F0 .552
(the e)2.802 F .552(xpression is true if the unary test is true.)-.15 F
.552(If the \214rst ar)5.552 F(gu-)-.18 E(ment is not a v)180 226.8 Q
(alid unary conditional operator)-.25 E 2.5(,t)-.4 G(he e)-2.5 E
(If the second ar)5.236 F .236(gument is one of)-.18 F .855
(the binary conditional operators listed abo)180 262.8 R 1.155 -.15
(ve u)-.15 H(nder).15 E F3(CONDITION)3.355 E .855(AL EXPRESSIONS)-.18 F
-F4(,)A F0(the)3.105 E .579(result of the e)180 274.8 R .578(xpression i\
+F4(,)A F0(the)3.104 E .578(result of the e)180 274.8 R .578(xpression i\
s the result of the binary test using the \214rst and third ar)-.15 F
-(guments)-.18 E 1.332(as operands.)180 286.8 R(The)6.332 E F2<ad61>3.832
-E F0(and)3.832 E F2<ad6f>3.832 E F0 1.333
+(guments)-.18 E 1.333(as operands.)180 286.8 R(The)6.333 E F2<ad61>3.833
+E F0(and)3.833 E F2<ad6f>3.832 E F0 1.332
(operators are considered binary operators when there are)3.832 F .558
(three ar)180 298.8 R 3.058(guments. If)-.18 F .558(the \214rst ar)3.058
F .558(gument is)-.18 F F2(!)3.058 E F0 3.058(,t)C .558(he v)-3.058 F
.558(alue is the ne)-.25 F -.05(ga)-.15 G .558(tion of the tw).05 F
-(o-ar)-.1 E(gument)-.18 E .52(test using the second and third ar)180
-310.8 R 3.021(guments. If)-.18 F .521(the \214rst ar)3.021 F .521
-(gument is e)-.18 F(xactly)-.15 E F2(\()3.021 E F0 .521(and the third)
-3.021 F(ar)180 322.8 Q .485(gument is e)-.18 F(xactly)-.15 E F2(\))2.985
-E F0 2.985(,t)C .485(he result is the one-ar)-2.985 F .485
+(o-ar)-.1 E(gument)-.18 E .521(test using the second and third ar)180
+310.8 R 3.021(guments. If)-.18 F .521(the \214rst ar)3.021 F .52
+(gument is e)-.18 F(xactly)-.15 E F2(\()3.02 E F0 .52(and the third)3.02
+F(ar)180 322.8 Q .485(gument is e)-.18 F(xactly)-.15 E F2(\))2.985 E F0
+2.985(,t)C .485(he result is the one-ar)-2.985 F .485
(gument test of the second ar)-.18 F 2.985(gument. Other)-.18 F(-)-.2 E
(wise, the e)180 334.8 Q(xpression is f)-.15 E(alse.)-.1 E 2.5(4a)144
-346.8 S -.18(rg)-2.5 G(uments).18 E .384(If the \214rst ar)180 358.8 R
-.384(gument is)-.18 F F2(!)2.884 E F0 2.885(,t)C .385
-(he result is the ne)-2.885 F -.05(ga)-.15 G .385(tion of the three-ar)
-.05 F .385(gument e)-.18 F .385(xpression com-)-.15 F 1.648
+346.8 S -.18(rg)-2.5 G(uments).18 E .385(If the \214rst ar)180 358.8 R
+.385(gument is)-.18 F F2(!)2.885 E F0 2.885(,t)C .385
+(he result is the ne)-2.885 F -.05(ga)-.15 G .384(tion of the three-ar)
+.05 F .384(gument e)-.18 F .384(xpression com-)-.15 F 1.647
(posed of the remaining ar)180 370.8 R 4.147(guments. Otherwise,)-.18 F
-1.647(the e)4.147 F 1.647(xpression is parsed and e)-.15 F -.25(va)-.25
+1.647(the e)4.147 F 1.648(xpression is parsed and e)-.15 F -.25(va)-.25
G(luated).25 E(according to precedence using the rules listed abo)180
382.8 Q -.15(ve)-.15 G(.).15 E 2.5(5o)144 394.8 S 2.5(rm)-2.5 G(ore ar)
-2.5 E(guments)-.18 E 1.635(The e)180 406.8 R 1.635
1.229(Print the accumulated user and system times for the shell and for\
processes run from the shell.)13.23 F(The return status is 0.)144 465.6
Q F2(trap)108 482.4 Q F0([)2.5 E F2(\255lp)A F0 2.5(][)C([)-2.5 E F1(ar)
-A(g)-.37 E F0(])A F1(sigspec)2.5 E F0(...])2.5 E .702(The command)144
-494.4 R F1(ar)3.532 E(g)-.37 E F0 .702(is to be read and e)3.422 F -.15
-(xe)-.15 G .702(cuted when the shell recei).15 F -.15(ve)-.25 G 3.203
-(ss).15 G(ignal\(s\))-3.203 E F1(sigspec)3.203 E F0 5.703(.I).31 G(f)
--5.703 E F1(ar)3.533 E(g)-.37 E F0(is)3.423 E .609
+A(g)-.37 E F0(])A F1(sigspec)2.5 E F0(...])2.5 E .703(The command)144
+494.4 R F1(ar)3.533 E(g)-.37 E F0 .703(is to be read and e)3.423 F -.15
+(xe)-.15 G .702(cuted when the shell recei).15 F -.15(ve)-.25 G 3.202
+(ss).15 G(ignal\(s\))-3.202 E F1(sigspec)3.202 E F0 5.702(.I).31 G(f)
+-5.702 E F1(ar)3.532 E(g)-.37 E F0(is)3.422 E .608
(absent \(and there is a single)144 506.4 R F1(sigspec)3.108 E F0 3.108
(\)o)C(r)-3.108 E F2<ad>3.108 E F0 3.108(,e)C .608
(ach speci\214ed signal is reset to its original disposition)-3.108 F
-.658(\(the v)144 518.4 R .658(alue it had upon entrance to the shell\).)
--.25 F(If)5.658 E F1(ar)3.488 E(g)-.37 E F0 .659
+.659(\(the v)144 518.4 R .659(alue it had upon entrance to the shell\).)
+-.25 F(If)5.658 E F1(ar)3.488 E(g)-.37 E F0 .658
(is the null string the signal speci\214ed by each)3.378 F F1(sigspec)
-144.34 530.4 Q F0 .581
-(is ignored by the shell and by the commands it in)3.391 F -.2(vo)-.4 G
--.1(ke).2 G 3.08(s. If).1 F F1(ar)3.41 E(g)-.37 E F0 .58
-(is not present and)3.3 F F2<ad70>3.08 E F0(has)3.08 E 1.214
+144.34 530.4 Q F0 .58(is ignored by the shell and by the commands it in)
+3.39 F -.2(vo)-.4 G -.1(ke).2 G 3.081(s. If).1 F F1(ar)3.411 E(g)-.37 E
+F0 .581(is not present and)3.301 F F2<ad70>3.081 E F0(has)3.081 E 1.215
(been supplied, then the trap commands associated with each)144 542.4 R
-F1(sigspec)4.054 E F0 1.215(are displayed.)4.024 F 1.215(If no ar)6.215
+F1(sigspec)4.054 E F0 1.214(are displayed.)4.024 F 1.214(If no ar)6.214
F(gu-)-.18 E .86(ments are supplied or if only)144 554.4 R F2<ad70>3.36
E F0 .86(is gi)3.36 F -.15(ve)-.25 G(n,).15 E F2(trap)3.36 E F0 .86
(prints the list of commands associated with each)3.36 F 2.83
(signal. The)144 566.4 R F2<ad6c>2.83 E F0 .33(option causes the shell \
-to print a list of signal names and their corresponding num-)2.83 F
-4.311(bers. Each)144 578.4 R F1(sigspec)4.651 E F0 1.811
-(is either a signal name de\214ned in <)4.621 F F1(signal.h)A F0 1.81
-(>, or a signal number)B 6.81(.S)-.55 G(ignal)-6.81 E
+to print a list of signal names and their corresponding num-)2.83 F 4.31
+(bers. Each)144 578.4 R F1(sigspec)4.65 E F0 1.811
+(is either a signal name de\214ned in <)4.62 F F1(signal.h)A F0 1.811
+(>, or a signal number)B 6.811(.S)-.55 G(ignal)-6.811 E
(names are case insensiti)144 590.4 Q .3 -.15(ve a)-.25 H(nd the).15 E
-F3(SIG)2.5 E F0(pre\214x is optional.)2.25 E 1.648(If a)144 608.4 R F1
-(sigspec)4.488 E F0(is)4.458 E F3(EXIT)4.148 E F0 1.648
-(\(0\) the command)3.898 F F1(ar)4.479 E(g)-.37 E F0 1.649(is e)4.369 F
--.15(xe)-.15 G 1.649(cuted on e).15 F 1.649(xit from the shell.)-.15 F
-1.649(If a)6.649 F F1(sigspec)4.489 E F0(is)4.459 E F3(DEB)144 620.4 Q
-(UG)-.09 E F4(,)A F0 1.168(the command)3.418 F F1(ar)3.998 E(g)-.37 E F0
-1.168(is e)3.888 F -.15(xe)-.15 G 1.167(cuted before e).15 F -.15(ve)
--.25 G(ry).15 E F1 1.167(simple command)3.667 F F0(,)A F1(for)3.667 E F0
-(command,)3.667 E F1(case)3.667 E F0(com-)3.667 E(mand,)144 632.4 Q F1
-(select)2.646 E F0 .146(command, e)2.646 F -.15(ve)-.25 G .146
-(ry arithmetic).15 F F1(for)2.646 E F0 .147
-(command, and before the \214rst command e)2.646 F -.15(xe)-.15 G .147
-(cutes in a).15 F .146(shell function \(see)144 644.4 R F3 .146
-(SHELL GRAMMAR)2.646 F F0(abo)2.396 E -.15(ve)-.15 G 2.646(\). Refer).15
-F .146(to the description of the)2.646 F F2(extdeb)2.645 E(ug)-.2 E F0
-.145(option to)2.645 F(the)144 656.4 Q F2(shopt)3.2 E F0 -.2(bu)3.2 G .7
-(iltin for details of its ef).2 F .7(fect on the)-.25 F F2(DEB)3.2 E(UG)
--.1 E F0 3.2(trap. If)3.2 F(a)3.2 E F1(sigspec)3.54 E F0(is)3.51 E F3
-(RETURN)3.2 E F4(,)A F0 .701(the com-)2.951 F(mand)144 668.4 Q F1(ar)
-3.474 E(g)-.37 E F0 .644(is e)3.364 F -.15(xe)-.15 G .643
+F3(SIG)2.5 E F0(pre\214x is optional.)2.25 E 1.649(If a)144 608.4 R F1
+(sigspec)4.489 E F0(is)4.459 E F3(EXIT)4.149 E F0 1.649
+(\(0\) the command)3.899 F F1(ar)4.479 E(g)-.37 E F0 1.649(is e)4.369 F
+-.15(xe)-.15 G 1.649(cuted on e).15 F 1.648(xit from the shell.)-.15 F
+1.648(If a)6.648 F F1(sigspec)4.488 E F0(is)4.458 E F3(DEB)144 620.4 Q
+(UG)-.09 E F4(,)A F0 1.167(the command)3.417 F F1(ar)3.997 E(g)-.37 E F0
+1.167(is e)3.887 F -.15(xe)-.15 G 1.167(cuted before e).15 F -.15(ve)
+-.25 G(ry).15 E F1 1.168(simple command)3.667 F F0(,)A F1(for)3.668 E F0
+(command,)3.668 E F1(case)3.668 E F0(com-)3.668 E(mand,)144 632.4 Q F1
+(select)2.647 E F0 .147(command, e)2.647 F -.15(ve)-.25 G .147
+(ry arithmetic).15 F F1(for)2.647 E F0 .146
+(command, and before the \214rst command e)2.647 F -.15(xe)-.15 G .146
+(cutes in a).15 F .145(shell function \(see)144 644.4 R F3 .145
+(SHELL GRAMMAR)2.645 F F0(abo)2.395 E -.15(ve)-.15 G 2.646(\). Refer).15
+F .146(to the description of the)2.646 F F2(extdeb)2.646 E(ug)-.2 E F0
+.146(option to)2.646 F(the)144 656.4 Q F2(shopt)3.201 E F0 -.2(bu)3.201
+G .7(iltin for details of its ef).2 F .7(fect on the)-.25 F F2(DEB)3.2 E
+(UG)-.1 E F0 3.2(trap. If)3.2 F(a)3.2 E F1(sigspec)3.54 E F0(is)3.51 E
+F3(RETURN)3.2 E F4(,)A F0 .7(the com-)2.95 F(mand)144 668.4 Q F1(ar)
+3.473 E(g)-.37 E F0 .643(is e)3.363 F -.15(xe)-.15 G .643
(cuted each time a shell function or a script e).15 F -.15(xe)-.15 G
-.643(cuted with the).15 F F2(.)3.143 E F0(or)3.143 E F2(sour)3.143 E(ce)
--.18 E F0 -.2(bu)3.143 G(iltins).2 E(\214nishes e)144 680.4 Q -.15(xe)
--.15 G(cuting.).15 E .521(If a)144 698.4 R F1(sigspec)3.361 E F0(is)
-3.331 E F3(ERR)3.021 E F4(,)A F0 .522(the command)2.771 F F1(ar)3.352 E
+.644(cuted with the).15 F F2(.)3.144 E F0(or)3.144 E F2(sour)3.144 E(ce)
+-.18 E F0 -.2(bu)3.144 G(iltins).2 E(\214nishes e)144 680.4 Q -.15(xe)
+-.15 G(cuting.).15 E .522(If a)144 698.4 R F1(sigspec)3.362 E F0(is)
+3.332 E F3(ERR)3.022 E F4(,)A F0 .522(the command)2.772 F F1(ar)3.352 E
(g)-.37 E F0 .522(is e)3.242 F -.15(xe)-.15 G .522(cuted whene).15 F
--.15(ve)-.25 G 3.022(raap).15 G .522(ipeline \(which may consist of a)
+-.15(ve)-.25 G 3.022(raap).15 G .521(ipeline \(which may consist of a)
-3.022 F .185(single simple command\), a list, or a compound command re\
-turns a non\255zero e)144 710.4 R .184(xit status, subject to)-.15 F
-1.92(the follo)144 722.4 R 1.92(wing conditions.)-.25 F(The)6.92 E F3
+turns a non\255zero e)144 710.4 R .185(xit status, subject to)-.15 F
+1.921(the follo)144 722.4 R 1.92(wing conditions.)-.25 F(The)6.92 E F3
(ERR)4.42 E F0 1.92(trap is not e)4.17 F -.15(xe)-.15 G 1.92
(cuted if the f).15 F 1.92(ailed command is part of the)-.1 F
-(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(71)187.615 E 0 Cg EP
+(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(71)190.395 E 0 Cg EP
%%Page: 72 72
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
--.35 E .464(command list immediately follo)144 84 R .464(wing a)-.25 F
+-.35 E .463(command list immediately follo)144 84 R .463(wing a)-.25 F
/F1 10/Times-Bold@0 SF(while)2.964 E F0(or)2.964 E F1(until)2.964 E F0
-.1(ke)2.964 G(yw)-.05 E .464(ord, part of the test in an)-.1 F/F2 10
-/Times-Italic@0 SF(if)2.973 E F0(statement,)4.923 E .711
-(part of a command e)144 96 R -.15(xe)-.15 G .711(cuted in a).15 F F1
-(&&)3.211 E F0(or)3.211 E F1(||)3.212 E F0 .712(list e)3.212 F .712
-(xcept the command follo)-.15 F .712(wing the \214nal)-.25 F F1(&&)3.212
-E F0(or)3.212 E F1(||)3.212 E F0(,)A(an)144 108 Q 2.777(yc)-.15 G .276
-(ommand in a pipeline b)-2.777 F .276(ut the last, or if the command')
+/Times-Italic@0 SF(if)2.974 E F0(statement,)4.924 E .712
+(part of a command e)144 96 R -.15(xe)-.15 G .712(cuted in a).15 F F1
+(&&)3.212 E F0(or)3.212 E F1(||)3.212 E F0 .712(list e)3.212 F .711
+(xcept the command follo)-.15 F .711(wing the \214nal)-.25 F F1(&&)3.211
+E F0(or)3.211 E F1(||)3.211 E F0(,)A(an)144 108 Q 2.776(yc)-.15 G .276
+(ommand in a pipeline b)-2.776 F .276(ut the last, or if the command')
-.2 F 2.776(sr)-.55 G .276(eturn v)-2.776 F .276(alue is being in)-.25 F
--.15(ve)-.4 G .276(rted using).15 F F1(!)2.776 E F0(.)A
+-.15(ve)-.4 G .277(rted using).15 F F1(!)2.777 E F0(.)A
(These are the same conditions obe)144 120 Q(yed by the)-.15 E F1(err)
2.5 E(exit)-.18 E F0(\()2.5 E F1<ad65>A F0 2.5(\)o)C(ption.)-2.5 E 1.095
(Signals ignored upon entry to the shell cannot be trapped or reset.)144
138 R -.35(Tr)6.095 G 1.095(apped signals that are not).35 F .662
(being ignored are reset to their original v)144 150 R .662
-(alues in a subshell or subshell en)-.25 F .661(vironment when one is)
+(alues in a subshell or subshell en)-.25 F .662(vironment when one is)
-.4 F 2.5(created. The)144 162 R(return status is f)2.5 E(alse if an)-.1
E(y)-.15 E F2(sigspec)2.84 E F0(is in)2.81 E -.25(va)-.4 G
(lid; otherwise).25 E F1(trap)2.5 E F0(returns true.)2.5 E F1(type)108
178.8 Q F0([)2.5 E F1(\255aftpP)A F0(])A F2(name)2.5 E F0([)2.5 E F2
-(name)A F0(...])2.5 E -.4(Wi)144 190.8 S .173
-(th no options, indicate ho).4 F 2.673(we)-.25 G(ach)-2.673 E F2(name)
-3.033 E F0 -.1(wo)2.853 G .174
-(uld be interpreted if used as a command name.).1 F .174(If the)5.174 F
-F1<ad74>144 202.8 Q F0 .843(option is used,)3.343 F F1(type)3.343 E F0
+(name)A F0(...])2.5 E -.4(Wi)144 190.8 S .174
+(th no options, indicate ho).4 F 2.674(we)-.25 G(ach)-2.674 E F2(name)
+3.034 E F0 -.1(wo)2.854 G .173
+(uld be interpreted if used as a command name.).1 F .173(If the)5.173 F
+F1<ad74>144 202.8 Q F0 .842(option is used,)3.342 F F1(type)3.342 E F0
.843(prints a string which is one of)3.343 F F2(alias)3.343 E F0(,).27 E
F2 -.1(ke)3.343 G(ywor)-.2 E(d)-.37 E F0(,).77 E F2(function)3.343 E F0
-(,).24 E F2 -.2(bu)3.342 G(iltin).2 E F0 3.342(,o).24 G(r)-3.342 E F2
-(\214le)5.252 E F0(if)3.522 E F2(name)144.36 214.8 Q F0 .086
-(is an alias, shell reserv)2.766 F .086(ed w)-.15 F .086
-(ord, function, b)-.1 F .087(uiltin, or disk \214le, respecti)-.2 F -.15
-(ve)-.25 G(ly).15 E 5.087(.I)-.65 G 2.587(ft)-5.087 G(he)-2.587 E F2
-(name)2.947 E F0 .087(is not)2.767 F .119
+(,).24 E F2 -.2(bu)3.343 G(iltin).2 E F0 3.343(,o).24 G(r)-3.343 E F2
+(\214le)5.253 E F0(if)3.523 E F2(name)144.36 214.8 Q F0 .087
+(is an alias, shell reserv)2.767 F .087(ed w)-.15 F .087
+(ord, function, b)-.1 F .086(uiltin, or disk \214le, respecti)-.2 F -.15
+(ve)-.25 G(ly).15 E 5.086(.I)-.65 G 2.586(ft)-5.086 G(he)-2.586 E F2
+(name)2.946 E F0 .086(is not)2.766 F .118
(found, then nothing is printed, and an e)144 226.8 R .118
-(xit status of f)-.15 F .118(alse is returned.)-.1 F .118(If the)5.118 F
-F1<ad70>2.618 E F0 .118(option is used,)2.618 F F1(type)2.618 E F0 .855
+(xit status of f)-.15 F .118(alse is returned.)-.1 F .119(If the)5.119 F
+F1<ad70>2.619 E F0 .119(option is used,)2.619 F F1(type)2.619 E F0 .855
(either returns the name of the disk \214le that w)144 238.8 R .855
(ould be e)-.1 F -.15(xe)-.15 G .855(cuted if).15 F F2(name)3.715 E F0
-.855(were speci\214ed as a com-)3.535 F .641(mand name, or nothing if)
-144 250.8 R/F3 10/Courier@0 SF .641(type -t name)3.141 F F0 -.1(wo)3.141
-G .641(uld not return).1 F F2(\214le)3.14 E F0 5.64(.T).18 G(he)-5.64 E
-F1<ad50>3.14 E F0 .64(option forces a)3.14 F/F4 9/Times-Bold@0 SF -.666
-(PA)3.14 G(TH)-.189 E F0 .112(search for each)144 262.8 R F2(name)2.612
-E F0 2.612(,e)C -.15(ve)-2.862 G 2.613(ni).15 G(f)-2.613 E F3 .113
+.855(were speci\214ed as a com-)3.535 F .64(mand name, or nothing if)144
+250.8 R/F3 10/Courier@0 SF .64(type -t name)3.14 F F0 -.1(wo)3.14 G .641
+(uld not return).1 F F2(\214le)3.141 E F0 5.641(.T).18 G(he)-5.641 E F1
+<ad50>3.141 E F0 .641(option forces a)3.141 F/F4 9/Times-Bold@0 SF -.666
+(PA)3.141 G(TH)-.189 E F0 .113(search for each)144 262.8 R F2(name)2.613
+E F0 2.613(,e)C -.15(ve)-2.863 G 2.613(ni).15 G(f)-2.613 E F3 .113
(type -t name)2.613 F F0 -.1(wo)2.613 G .113(uld not return).1 F F2
-(\214le)2.613 E F0 5.113(.I).18 G 2.613(fac)-5.113 G .113
-(ommand is hashed,)-2.613 F F1<ad70>2.613 E F0(and)144 274.8 Q F1<ad50>
-3.231 E F0 .731(print the hashed v)3.231 F .73
+(\214le)2.613 E F0 5.113(.I).18 G 2.613(fa)-5.113 G .112
+(command is hashed,)-.001 F F1<ad70>2.612 E F0(and)144 274.8 Q F1<ad50>
+3.23 E F0 .73(print the hashed v)3.23 F .731
(alue, which is not necessarily the \214le that appears \214rst in)-.25
-F F4 -.666(PA)3.23 G(TH)-.189 E/F5 9/Times-Roman@0 SF(.)A F0 .73(If the)
-5.23 F F1<ad61>144 286.8 Q F0 1.748(option is used,)4.248 F F1(type)
-4.248 E F0 1.748(prints all of the places that contain an e)4.248 F -.15
-(xe)-.15 G 1.748(cutable named).15 F F2(name)4.249 E F0 6.749(.T).18 G
-(his)-6.749 E .744(includes aliases and functions, if and only if the)
-144 298.8 R F1<ad70>3.244 E F0 .744(option is not also used.)3.244 F
-.743(The table of hashed)5.744 F 1.223
-(commands is not consulted when using)144 310.8 R F1<ad61>3.723 E F0
-6.223(.T)C(he)-6.223 E F1<ad66>3.723 E F0 1.223
-(option suppresses shell function lookup, as)3.723 F .326(with the)144
-322.8 R F1(command)2.826 E F0 -.2(bu)2.826 G(iltin.).2 E F1(type)5.326 E
-F0 .326(returns true if all of the ar)2.826 F .325(guments are found, f)
--.18 F .325(alse if an)-.1 F 2.825(ya)-.15 G .325(re not)-2.825 F
-(found.)144 334.8 Q F1(ulimit)108 351.6 Q F0([)2.5 E F1(\255HST)A
-(abcde\214lmnpqrstuvx)-.92 E F0([)2.5 E F2(limit)A F0(]])A(Pro)144 363.6
-Q .243(vides control o)-.15 F -.15(ve)-.15 G 2.743(rt).15 G .243
-(he resources a)-2.743 F -.25(va)-.2 G .244
+F F4 -.666(PA)3.231 G(TH)-.189 E/F5 9/Times-Roman@0 SF(.)A F0 .731
+(If the)5.231 F F1<ad61>144 286.8 Q F0 1.749(option is used,)4.249 F F1
+(type)4.248 E F0 1.748(prints all of the places that contain an e)4.248
+F -.15(xe)-.15 G 1.748(cutable named).15 F F2(name)4.248 E F0 6.748(.T)
+.18 G(his)-6.748 E .744
+(includes aliases and functions, if and only if the)144 298.8 R F1<ad70>
+3.244 E F0 .744(option is not also used.)3.244 F .744
+(The table of hashed)5.744 F 1.223(commands is not consulted when using)
+144 310.8 R F1<ad61>3.723 E F0 6.223(.T)C(he)-6.223 E F1<ad66>3.723 E F0
+1.223(option suppresses shell function lookup, as)3.723 F .325(with the)
+144 322.8 R F1(command)2.825 E F0 -.2(bu)2.825 G(iltin.).2 E F1(type)
+5.325 E F0 .325(returns true if all of the ar)2.825 F .326
+(guments are found, f)-.18 F .326(alse if an)-.1 F 2.826(ya)-.15 G .326
+(re not)-2.826 F(found.)144 334.8 Q F1(ulimit)108 351.6 Q F0([)2.5 E F1
+(\255HST)A(abcde\214lmnpqrstuvx)-.92 E F0([)2.5 E F2(limit)A F0(]])A
+(Pro)144 363.6 Q .244(vides control o)-.15 F -.15(ve)-.15 G 2.744(rt).15
+G .244(he resources a)-2.744 F -.25(va)-.2 G .244
(ilable to the shell and to processes started by it, on systems).25 F
-.944(that allo)144 375.6 R 3.444(ws)-.25 G .944(uch control.)-3.444 F
-(The)5.944 E F1<ad48>3.444 E F0(and)3.444 E F1<ad53>3.444 E F0 .943
+.943(that allo)144 375.6 R 3.443(ws)-.25 G .943(uch control.)-3.443 F
+(The)5.943 E F1<ad48>3.443 E F0(and)3.443 E F1<ad53>3.444 E F0 .944
(options specify that the hard or soft limit is set for the)3.444 F(gi)
-144 387.6 Q -.15(ve)-.25 G 2.708(nr).15 G 2.708(esource. A)-2.708 F .208
+144 387.6 Q -.15(ve)-.25 G 2.709(nr).15 G 2.709(esource. A)-2.709 F .208
(hard limit cannot be increased by a non-root user once it is set; a so\
-ft limit may)2.708 F .426(be increased up to the v)144 399.6 R .426
-(alue of the hard limit.)-.25 F .425(If neither)5.426 F F1<ad48>2.925 E
-F0(nor)2.925 E F1<ad53>2.925 E F0 .425
-(is speci\214ed, both the soft and)2.925 F .139(hard limits are set.)144
+ft limit may)2.709 F .425(be increased up to the v)144 399.6 R .425
+(alue of the hard limit.)-.25 F .426(If neither)5.425 F F1<ad48>2.926 E
+F0(nor)2.926 E F1<ad53>2.926 E F0 .426
+(is speci\214ed, both the soft and)2.926 F .139(hard limits are set.)144
411.6 R .139(The v)5.139 F .139(alue of)-.25 F F2(limit)2.729 E F0 .139
(can be a number in the unit speci\214ed for the resource or one)3.319 F
-.742(of the special v)144 423.6 R(alues)-.25 E F1(hard)3.242 E F0(,)A F1
+.741(of the special v)144 423.6 R(alues)-.25 E F1(hard)3.241 E F0(,)A F1
(soft)3.241 E F0 3.241(,o)C(r)-3.241 E F1(unlimited)3.241 E F0 3.241(,w)
C .741(hich stand for the current hard limit, the current)-3.241 F .78
(soft limit, and no limit, respecti)144 435.6 R -.15(ve)-.25 G(ly).15 E
5.78(.I)-.65 G(f)-5.78 E F2(limit)3.37 E F0 .78
(is omitted, the current v)3.96 F .78(alue of the soft limit of the)-.25
-F .499(resource is printed, unless the)144 447.6 R F1<ad48>2.999 E F0
-.499(option is gi)2.999 F -.15(ve)-.25 G 2.999(n. When).15 F .498
+F .498(resource is printed, unless the)144 447.6 R F1<ad48>2.999 E F0
+.499(option is gi)2.999 F -.15(ve)-.25 G 2.999(n. When).15 F .499
(more than one resource is speci\214ed, the)2.999 F
(limit name and unit are printed before the v)144 459.6 Q 2.5
(alue. Other)-.25 F(options are interpreted as follo)2.5 E(ws:)-.25 E F1
(The maximum resident set size \(man)21.97 E 2.5(ys)-.15 G
(ystems do not honor this limit\))-2.5 E F1<ad6e>144 579.6 Q F0 .791(Th\
e maximum number of open \214le descriptors \(most systems do not allo)
-24.74 F 3.291(wt)-.25 G .791(his v)-3.291 F .791(alue to)-.25 F
-(be set\))180 591.6 Q F1<ad70>144 603.6 Q F0
+24.74 F 3.29(wt)-.25 G .79(his v)-3.29 F .79(alue to)-.25 F(be set\))180
+591.6 Q F1<ad70>144 603.6 Q F0
(The pipe size in 512-byte blocks \(this may not be set\))24.74 E F1
<ad71>144 615.6 Q F0
(The maximum number of bytes in POSIX message queues)24.74 E F1<ad72>144
(n, and the).15 F F1<ad61>2.968 E F0 .468(option is not used,)2.968 F F2
(limit)2.968 E F0 .468(is the ne)2.968 F 2.968(wv)-.25 G .468
(alue of the speci\214ed resource.)-3.218 F(If)5.468 E(GNU Bash 4.3)72
-768 Q(2013 September 2)138.455 E(72)187.615 E 0 Cg EP
+768 Q(2013 October 20)141.235 E(72)190.395 E 0 Cg EP
%%Page: 73 73
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
--.35 E .045(no option is gi)144 84 R -.15(ve)-.25 G .045(n, then).15 F
-/F1 10/Times-Bold@0 SF<ad66>2.545 E F0 .045(is assumed.)2.545 F -1.11
-(Va)5.045 G .045(lues are in 1024-byte increments, e)1.11 F .044
-(xcept for)-.15 F F1<ad74>2.544 E F0 2.544(,w)C .044(hich is)-2.544 F
-.402(in seconds;)144 96 R F1<ad70>2.902 E F0 2.902(,w)C .402
-(hich is in units of 512-byte blocks; and)-2.902 F F1<ad54>2.902 E F0(,)
+-.35 E .044(no option is gi)144 84 R -.15(ve)-.25 G .044(n, then).15 F
+/F1 10/Times-Bold@0 SF<ad66>2.544 E F0 .045(is assumed.)2.545 F -1.11
+(Va)5.045 G .045(lues are in 1024-byte increments, e)1.11 F .045
+(xcept for)-.15 F F1<ad74>2.545 E F0 2.545(,w)C .045(hich is)-2.545 F
+.403(in seconds;)144 96 R F1<ad70>2.903 E F0 2.903(,w)C .402
+(hich is in units of 512-byte blocks; and)-2.903 F F1<ad54>2.902 E F0(,)
A F1<ad62>2.902 E F0(,)A F1<ad6e>2.902 E F0 2.902(,a)C(nd)-2.902 E F1
-<ad75>2.903 E F0 2.903(,w)C .403(hich are unscaled)-2.903 F -.25(va)144
-108 S 3.083(lues. The).25 F .583(return status is 0 unless an in)3.083 F
+<ad75>2.902 E F0 2.902(,w)C .402(hich are unscaled)-2.902 F -.25(va)144
+108 S 3.082(lues. The).25 F .583(return status is 0 unless an in)3.083 F
-.25(va)-.4 G .583(lid option or ar).25 F .583
(gument is supplied, or an error occurs)-.18 F(while setting a ne)144
120 Q 2.5(wl)-.25 G(imit.)-2.5 E F1(umask)108 136.8 Q F0([)2.5 E F1
(gins with a digit, it is interpreted as an octal)-.15 F .066(number; o\
therwise it is interpreted as a symbolic mode mask similar to that acce\
pted by)144 160.8 R F2 -.15(ch)2.566 G(mod).15 E F0(\(1\).).77 E(If)144
-172.8 Q F2(mode)3.262 E F0 .382(is omitted, the current v)3.062 F .382
+172.8 Q F2(mode)3.263 E F0 .382(is omitted, the current v)3.063 F .382
(alue of the mask is printed.)-.25 F(The)5.382 E F1<ad53>2.882 E F0 .382
(option causes the mask to be)2.882 F .547
(printed in symbolic form; the def)144 184.8 R .547
(ault output is an octal number)-.1 F 5.547(.I)-.55 G 3.047(ft)-5.547 G
(he)-3.047 E F1<ad70>3.047 E F0 .547(option is supplied, and)3.047 F F2
-(mode)144.38 196.8 Q F0 .551
-(is omitted, the output is in a form that may be reused as input.)3.231
-F .552(The return status is 0 if the)5.552 F(mode w)144 208.8 Q
+(mode)144.38 196.8 Q F0 .552
+(is omitted, the output is in a form that may be reused as input.)3.232
+F .551(The return status is 0 if the)5.551 F(mode w)144 208.8 Q
(as successfully changed or if no)-.1 E F2(mode)2.5 E F0(ar)2.5 E
(gument w)-.18 E(as supplied, and f)-.1 E(alse otherwise.)-.1 E F1
(unalias)108 225.6 Q F0<5bad>2.5 E F1(a)A F0 2.5(][)C F2(name)-2.5 E F0
(alue is true unless a supplied)-.25 E F2(name)2.86 E F0
(is not a de\214ned alias.)2.68 E F1(unset)108 266.4 Q F0<5bad>2.5 E F1
(fv)A F0 2.5(][)C<ad>-2.5 E F1(n)A F0 2.5(][)C F2(name)-2.5 E F0(...])
-2.5 E -.15(Fo)144 278.4 S 3.827(re).15 G(ach)-3.827 E F2(name)3.827 E F0
-3.827(,r).18 G(emo)-3.827 E 1.627 -.15(ve t)-.15 H 1.327
+2.5 E -.15(Fo)144 278.4 S 3.828(re).15 G(ach)-3.828 E F2(name)3.828 E F0
+3.828(,r).18 G(emo)-3.828 E 1.628 -.15(ve t)-.15 H 1.328
(he corresponding v).15 F 1.327(ariable or function.)-.25 F 1.327
-(If the)6.327 F F1<ad76>3.828 E F0 1.328(option is gi)3.828 F -.15(ve)
--.25 G 1.328(n, each).15 F F2(name)144.36 290.4 Q F0 1.551
-(refers to a shell v)4.231 F 1.551(ariable, and that v)-.25 F 1.551
-(ariable is remo)-.25 F -.15(ve)-.15 G 4.05(d. Read-only).15 F -.25(va)
-4.05 G 1.55(riables may not be).25 F 4.641(unset. If)144 302.4 R F1
-<ad66>4.641 E F0 2.141(is speci\214ed, each)4.641 F F2(name)5.001 E F0
+(If the)6.327 F F1<ad76>3.827 E F0 1.327(option is gi)3.827 F -.15(ve)
+-.25 G 1.327(n, each).15 F F2(name)144.36 290.4 Q F0 1.55
+(refers to a shell v)4.23 F 1.551(ariable, and that v)-.25 F 1.551
+(ariable is remo)-.25 F -.15(ve)-.15 G 4.051(d. Read-only).15 F -.25(va)
+4.051 G 1.551(riables may not be).25 F 4.642(unset. If)144 302.4 R F1
+<ad66>4.642 E F0 2.142(is speci\214ed, each)4.642 F F2(name)5.001 E F0
2.141(refers to a shell function, and the function de\214nition is)4.821
-F(remo)144 314.4 Q -.15(ve)-.15 G 2.538(d. If).15 F(the)2.537 E F1<ad6e>
+F(remo)144 314.4 Q -.15(ve)-.15 G 2.537(d. If).15 F(the)2.537 E F1<ad6e>
2.537 E F0 .037(option is supplied, and)2.537 F F2(name)2.537 E F0 .037
(is a v)2.537 F .037(ariable with the)-.25 F F2(namer)2.537 E(ef)-.37 E
-F0(attrib)2.537 E(ute,)-.2 E F2(name)2.537 E F0(will)2.537 E .492
+F0(attrib)2.537 E(ute,)-.2 E F2(name)2.537 E F0(will)2.538 E .492
(be unset rather than the v)144 326.4 R .492(ariable it references.)-.25
F F1<ad6e>5.492 E F0 .492(has no ef)2.992 F .492(fect if the)-.25 F F1
-<ad66>2.992 E F0 .492(option is supplied.)2.992 F .493(If no)5.493 F
-.221(options are supplied, each)144 338.4 R F2(name)2.721 E F0 .221
-(refers to a v)2.721 F .22(ariable; if there is no v)-.25 F .22
-(ariable by that name, an)-.25 F 2.72(yf)-.15 G(unc-)-2.72 E 1.188
+<ad66>2.992 E F0 .492(option is supplied.)2.992 F .492(If no)5.492 F .22
+(options are supplied, each)144 338.4 R F2(name)2.72 E F0 .22
+(refers to a v)2.72 F .221(ariable; if there is no v)-.25 F .221
+(ariable by that name, an)-.25 F 2.721(yf)-.15 G(unc-)-2.721 E 1.189
(tion with that name is unset.)144 350.4 R 1.189(Each unset v)6.189 F
-1.189(ariable or function is remo)-.25 F -.15(ve)-.15 G 3.689(df).15 G
-1.189(rom the en)-3.689 F(vironment)-.4 E 3.206
+1.189(ariable or function is remo)-.25 F -.15(ve)-.15 G 3.688(df).15 G
+1.188(rom the en)-3.688 F(vironment)-.4 E 3.205
(passed to subsequent commands.)144 362.4 R 3.206(If an)8.206 F 5.706
(yo)-.15 G(f)-5.706 E/F3 9/Times-Bold@0 SF(COMP_W)5.706 E(ORDBREAKS)-.09
-E/F4 9/Times-Roman@0 SF(,)A F3(RANDOM)5.455 E F4(,)A F3(SECONDS)5.455 E
-F4(,)A F3(LINENO)144 374.4 Q F4(,)A F3(HISTCMD)4.347 E F4(,)A F3(FUNCN)
-4.347 E(AME)-.18 E F4(,)A F3(GR)4.347 E(OUPS)-.27 E F4(,)A F0(or)4.348 E
+E/F4 9/Times-Roman@0 SF(,)A F3(RANDOM)5.456 E F4(,)A F3(SECONDS)5.456 E
+F4(,)A F3(LINENO)144 374.4 Q F4(,)A F3(HISTCMD)4.348 E F4(,)A F3(FUNCN)
+4.348 E(AME)-.18 E F4(,)A F3(GR)4.348 E(OUPS)-.27 E F4(,)A F0(or)4.348 E
F3(DIRST)4.598 E -.495(AC)-.81 G(K).495 E F0 2.098(are unset, the)4.348
-F 4.598(yl)-.15 G 2.098(ose their special)-4.598 F(properties, e)144
+F 4.597(yl)-.15 G 2.097(ose their special)-4.597 F(properties, e)144
386.4 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(ft)-2.5 G(he)-2.5 E 2.5(ya)-.15
G(re subsequently reset.)-2.5 E(The e)5 E(xit status is true unless a)
-.15 E F2(name)2.86 E F0(is readonly)2.68 E(.)-.65 E F1(wait)108 403.2 Q
F0([)2.5 E F1<ad6e>A F0 2.5(][)C F2 2.5(n.)-2.5 G(..)-2.5 E F0(])A -.8
-(Wa)144 415.2 S .027(it for each speci\214ed child process and return i\
-ts termination status.).8 F(Each)5.026 E F2(n)2.886 E F0 .026
-(may be a process ID)2.766 F .256
+(Wa)144 415.2 S .026(it for each speci\214ed child process and return i\
+ts termination status.).8 F(Each)5.027 E F2(n)2.887 E F0 .027
+(may be a process ID)2.767 F .256
(or a job speci\214cation; if a job spec is gi)144 427.2 R -.15(ve)-.25
G .256(n, all processes in that job').15 F 2.756(sp)-.55 G .256
(ipeline are w)-2.756 F .256(aited for)-.1 F 5.256(.I)-.55 G(f)-5.256 E
-F2(n)3.116 E F0 .318(is not gi)144 439.2 R -.15(ve)-.25 G .318
+F2(n)3.116 E F0 .317(is not gi)144 439.2 R -.15(ve)-.25 G .317
(n, all currently acti).15 F .618 -.15(ve c)-.25 H .318
(hild processes are w).15 F .318(aited for)-.1 F 2.818(,a)-.4 G .318
-(nd the return status is zero.)-2.818 F .317(If the)5.317 F F1<ad6e>144
-451.2 Q F0 .361(option is supplied,)2.861 F F1(wait)2.861 E F0 -.1(wa)
-2.861 G .361(its for an).1 F 2.862(yj)-.15 G .362
-(ob to terminate and returns its e)-2.862 F .362(xit status.)-.15 F(If)
-5.362 E F2(n)3.222 E F0(speci\214es)3.102 E 2.596(an)144 463.2 S(on-e)
--2.596 E .096(xistent process or job, the return status is 127.)-.15 F
-.095(Otherwise, the return status is the e)5.095 F .095(xit status)-.15
+(nd the return status is zero.)-2.818 F .318(If the)5.318 F F1<ad6e>144
+451.2 Q F0 .362(option is supplied,)2.862 F F1(wait)2.862 E F0 -.1(wa)
+2.862 G .362(its for an).1 F 2.862(yj)-.15 G .362
+(ob to terminate and returns its e)-2.862 F .361(xit status.)-.15 F(If)
+5.361 E F2(n)3.221 E F0(speci\214es)3.101 E 2.595(an)144 463.2 S(on-e)
+-2.595 E .095(xistent process or job, the return status is 127.)-.15 F
+.096(Otherwise, the return status is the e)5.095 F .096(xit status)-.15
F(of the last process or job w)144 475.2 Q(aited for)-.1 E(.)-.55 E/F5
10.95/Times-Bold@0 SF(RESTRICTED SHELL)72 492 Q F0(If)108 504 Q F1(bash)
-4.396 E F0 1.896(is started with the name)4.396 F F1(rbash)4.397 E F0
-4.397(,o)C 4.397(rt)-4.397 G(he)-4.397 E F1<ad72>4.397 E F0 1.897
-(option is supplied at in)4.397 F -.2(vo)-.4 G 1.897
-(cation, the shell becomes).2 F 3.446(restricted. A)108 516 R .945
-(restricted shell is used to set up an en)3.446 F .945
-(vironment more controlled than the standard shell.)-.4 F(It)5.945 E
+4.397 E F0 1.897(is started with the name)4.397 F F1(rbash)4.397 E F0
+4.397(,o)C 4.397(rt)-4.397 G(he)-4.397 E F1<ad72>4.397 E F0 1.896
+(option is supplied at in)4.397 F -.2(vo)-.4 G 1.896
+(cation, the shell becomes).2 F 3.445(restricted. A)108 516 R .945
+(restricted shell is used to set up an en)3.445 F .946
+(vironment more controlled than the standard shell.)-.4 F(It)5.946 E
(beha)108 528 Q -.15(ve)-.2 G 2.5(si).15 G(dentically to)-2.5 E F1(bash)
2.5 E F0(with the e)2.5 E(xception that the follo)-.15 E
(wing are disallo)-.25 E(wed or not performed:)-.25 E 32.5<8363>108
(pecifying command names containing)-32.5 E F1(/)2.5 E F0 32.5<8373>108
595.2 S(pecifying a \214lename containing a)-32.5 E F1(/)2.5 E F0
(as an ar)2.5 E(gument to the)-.18 E F1(.)2.5 E F0 -.2(bu)5 G
-(iltin command).2 E 32.5<8373>108 612 S .449
+(iltin command).2 E 32.5<8373>108 612 S .45
(pecifying a \214lename containing a slash as an ar)-32.5 F .449
-(gument to the)-.18 F F1<ad70>2.95 E F0 .45(option to the)2.95 F F1
-(hash)2.95 E F0 -.2(bu)2.95 G .45(iltin com-).2 F(mand)144 624 Q 32.5
+(gument to the)-.18 F F1<ad70>2.949 E F0 .449(option to the)2.949 F F1
+(hash)2.949 E F0 -.2(bu)2.949 G .449(iltin com-).2 F(mand)144 624 Q 32.5
<8369>108 640.8 S(mporting function de\214nitions from the shell en)
-32.5 E(vironment at startup)-.4 E 32.5<8370>108 657.6 S(arsing the v)
-32.5 E(alue of)-.25 E F3(SHELLOPTS)2.5 E F0(from the shell en)2.25 E
108 708 S(dding or deleting b)-32.5 E(uiltin commands with the)-.2 E F1
<ad66>2.5 E F0(and)2.5 E F1<ad64>2.5 E F0(options to the)2.5 E F1
(enable)2.5 E F0 -.2(bu)2.5 G(iltin command).2 E(GNU Bash 4.3)72 768 Q
-(2013 September 2)138.455 E(73)187.615 E 0 Cg EP
+(2013 October 20)141.235 E(73)190.395 E 0 Cg EP
%%Page: 74 74
%%BeginPageSetup
BP
E(estricted)-.18 E F0(.)A(These restrictions are enforced after an)108
134.4 Q 2.5(ys)-.15 G(tartup \214les are read.)-2.5 E 1.566
(When a command that is found to be a shell script is e)108 151.2 R -.15
-(xe)-.15 G 1.566(cuted \(see).15 F/F2 9/Times-Bold@0 SF 1.566
-(COMMAND EXECUTION)4.066 F F0(abo)3.816 E -.15(ve)-.15 G(\),).15 E F1
+(xe)-.15 G 1.567(cuted \(see).15 F/F2 9/Times-Bold@0 SF 1.567
+(COMMAND EXECUTION)4.067 F F0(abo)3.817 E -.15(ve)-.15 G(\),).15 E F1
(rbash)108 163.2 Q F0(turns of)2.5 E 2.5(fa)-.25 G .3 -.15(ny r)-2.5 H
(estrictions in the shell spa).15 E(wned to e)-.15 E -.15(xe)-.15 G
(cute the script.).15 E/F3 10.95/Times-Bold@0 SF(SEE ALSO)72 180 Q/F4 10
(oundation)-.15 E(bfox@gnu.or)108 489.6 Q(g)-.18 E(Chet Rame)108 506.4 Q
1.3 -.65(y, C)-.15 H(ase W).65 E(estern Reserv)-.8 E 2.5(eU)-.15 G(ni)
-2.5 E -.15(ve)-.25 G(rsity).15 E(chet.rame)108 518.4 Q(y@case.edu)-.15
-E F3 -.11(BU)72 535.2 S 2.738(GR).11 G(EPOR)-2.738 E(TS)-.438 E F0 .567
+E F3 -.11(BU)72 535.2 S 2.738(GR).11 G(EPOR)-2.738 E(TS)-.438 E F0 .568
(If you \214nd a b)108 547.2 R .568(ug in)-.2 F F1(bash,)3.068 E F0 .568
(you should report it.)3.068 F .568(But \214rst, you should mak)5.568 F
-3.068(es)-.1 G .568(ure that it really is a b)-3.068 F .568(ug, and)-.2
-F 5.626(that it appears in the latest v)108 559.2 R 5.625(ersion of)-.15
-F F1(bash)8.125 E F0 10.625(.T)C 5.625(he latest v)-10.625 F 5.625
-(ersion is al)-.15 F -.1(wa)-.1 G 5.625(ys a).1 F -.25(va)-.2 G 5.625
+3.068(es)-.1 G .568(ure that it really is a b)-3.068 F .567(ug, and)-.2
+F 5.625(that it appears in the latest v)108 559.2 R 5.625(ersion of)-.15
+F F1(bash)8.125 E F0 10.625(.T)C 5.625(he latest v)-10.625 F 5.626
+(ersion is al)-.15 F -.1(wa)-.1 G 5.626(ys a).1 F -.25(va)-.2 G 5.626
(ilable from).25 F F4(ftp://ftp.gnu.or)108 571.2 Q(g/pub/gnu/bash/)-.37
-E F0(.)A .41(Once you ha)108 588 R .71 -.15(ve d)-.2 H .41
-(etermined that a b).15 F .41(ug actually e)-.2 F .411(xists, use the)
--.15 F F4(bashb)3.181 E(ug)-.2 E F0 .411(command to submit a b)3.131 F
-.411(ug report.)-.2 F(If)5.411 E .595(you ha)108 600 R .895 -.15
-(ve a \214)-.2 H .595(x, you are encouraged to mail that as well!).15 F
-.594(Suggestions and `philosophical' b)5.595 F .594(ug reports may)-.2 F
+E F0(.)A .411(Once you ha)108 588 R .711 -.15(ve d)-.2 H .411
+(etermined that a b).15 F .411(ug actually e)-.2 F .411(xists, use the)
+-.15 F F4(bashb)3.18 E(ug)-.2 E F0 .41(command to submit a b)3.13 F .41
+(ug report.)-.2 F(If)5.41 E .594(you ha)108 600 R .894 -.15(ve a \214)
+-.2 H .595(x, you are encouraged to mail that as well!).15 F .595
+(Suggestions and `philosophical' b)5.595 F .595(ug reports may)-.2 F
(be mailed to)108 612 Q F4 -.2(bu)2.5 G(g-bash@gnu.or).2 E(g)-.37 E F0
(or posted to the Usenet ne)2.5 E(wsgroup)-.25 E F1(gnu.bash.b)2.5 E(ug)
-.2 E F0(.)A(ALL b)108 628.8 Q(ug reports should include:)-.2 E(The v)
2.72 E(vides for \214ling a b)-.15 E(ug report.)-.2 E(Comments and b)108
727.2 Q(ug reports concerning this manual page should be directed to)-.2
E F4 -.15(ch)2.5 G(et.r).15 E(ame)-.15 E(y@case)-.3 E(.edu)-.15 E F0(.)
-.25 E(GNU Bash 4.3)72 768 Q(2013 September 2)138.455 E(74)187.615 E 0 Cg
+.25 E(GNU Bash 4.3)72 768 Q(2013 October 20)141.235 E(74)190.395 E 0 Cg
EP
%%Page: 75 75
%%BeginPageSetup
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
-.35 E/F1 10.95/Times-Bold@0 SF -.11(BU)72 84 S(GS).11 E F0(It')108 96 Q
-2.5(st)-.55 G(oo big and too slo)-2.5 E -.65(w.)-.25 G 1.868
-(There are some subtle dif)108 112.8 R 1.868(ferences between)-.25 F/F2
+2.5(st)-.55 G(oo big and too slo)-2.5 E -.65(w.)-.25 G 1.869
+(There are some subtle dif)108 112.8 R 1.869(ferences between)-.25 F/F2
10/Times-Bold@0 SF(bash)4.369 E F0 1.869(and traditional v)4.369 F 1.869
-(ersions of)-.15 F F2(sh)4.369 E F0 4.369(,m)C 1.869
-(ostly because of the)-4.369 F/F3 9/Times-Bold@0 SF(POSIX)108 124.8 Q F0
+(ersions of)-.15 F F2(sh)4.368 E F0 4.368(,m)C 1.868
+(ostly because of the)-4.368 F/F3 9/Times-Bold@0 SF(POSIX)108 124.8 Q F0
(speci\214cation.)2.25 E(Aliases are confusing in some uses.)108 141.6 Q
(Shell b)108 158.4 Q
(uiltin commands and functions are not stoppable/restartable.)-.2 E
1.315(Compound commands and command sequences of the form `a ; b ; c' a\
-re not handled gracefully when)108 175.2 R .389
+re not handled gracefully when)108 175.2 R .39
(process suspension is attempted.)108 187.2 R .389
-(When a process is stopped, the shell immediately e)5.389 F -.15(xe)-.15
-G .39(cutes the ne).15 F .39(xt com-)-.15 F .193(mand in the sequence.)
-108 199.2 R .192(It suf)5.193 F .192(\214ces to place the sequence of c\
-ommands between parentheses to force it into a)-.25 F
-(subshell, which may be stopped as a unit.)108 211.2 Q(Array v)108 228 Q
-(ariables may not \(yet\) be e)-.25 E(xported.)-.15 E
+(When a process is stopped, the shell immediately e)5.39 F -.15(xe)-.15
+G .389(cutes the ne).15 F .389(xt com-)-.15 F .192
+(mand in the sequence.)108 199.2 R .192(It suf)5.192 F .192(\214ces to \
+place the sequence of commands between parentheses to force it into a)
+-.25 F(subshell, which may be stopped as a unit.)108 211.2 Q(Array v)108
+228 Q(ariables may not \(yet\) be e)-.25 E(xported.)-.15 E
(There may be only one acti)108 244.8 Q .3 -.15(ve c)-.25 H
-(oprocess at a time.).15 E(GNU Bash 4.3)72 768 Q(2013 September 2)
-138.455 E(75)187.615 E 0 Cg EP
+(oprocess at a time.).15 E(GNU Bash 4.3)72 768 Q(2013 October 20)141.235
+E(75)190.395 E 0 Cg EP
%%Trailer
end
%%EOF
@xrdef{Modifying Shell Behavior-snt}{Section@tie 4.3}
@xrdef{The Set Builtin-title}{The Set Builtin}
@xrdef{The Set Builtin-snt}{Section@tie 4.3.1}
-@xrdef{Modifying Shell Behavior-pg}{58}
-@xrdef{The Set Builtin-pg}{58}
+@xrdef{Modifying Shell Behavior-pg}{59}
+@xrdef{The Set Builtin-pg}{59}
@xrdef{The Shopt Builtin-title}{The Shopt Builtin}
@xrdef{The Shopt Builtin-snt}{Section@tie 4.3.2}
-@xrdef{The Shopt Builtin-pg}{62}
+@xrdef{The Shopt Builtin-pg}{63}
@xrdef{Special Builtins-title}{Special Builtins}
@xrdef{Special Builtins-snt}{Section@tie 4.4}
@xrdef{Special Builtins-pg}{68}
\entry{test}{45}{\code {test}}
\entry{[}{45}{\code {[}}
\entry{times}{46}{\code {times}}
-\entry{trap}{46}{\code {trap}}
+\entry{trap}{47}{\code {trap}}
\entry{umask}{47}{\code {umask}}
\entry{unset}{48}{\code {unset}}
\entry{alias}{48}{\code {alias}}
\entry{bind}{48}{\code {bind}}
\entry{builtin}{49}{\code {builtin}}
-\entry{caller}{49}{\code {caller}}
+\entry{caller}{50}{\code {caller}}
\entry{command}{50}{\code {command}}
\entry{declare}{50}{\code {declare}}
\entry{echo}{52}{\code {echo}}
\entry{help}{53}{\code {help}}
\entry{let}{53}{\code {let}}
\entry{local}{53}{\code {local}}
-\entry{logout}{53}{\code {logout}}
-\entry{mapfile}{53}{\code {mapfile}}
+\entry{logout}{54}{\code {logout}}
+\entry{mapfile}{54}{\code {mapfile}}
\entry{printf}{54}{\code {printf}}
\entry{read}{55}{\code {read}}
\entry{readarray}{56}{\code {readarray}}
-\entry{source}{56}{\code {source}}
-\entry{type}{56}{\code {type}}
+\entry{source}{57}{\code {source}}
+\entry{type}{57}{\code {type}}
\entry{typeset}{57}{\code {typeset}}
\entry{ulimit}{57}{\code {ulimit}}
\entry{unalias}{58}{\code {unalias}}
-\entry{set}{58}{\code {set}}
-\entry{shopt}{62}{\code {shopt}}
+\entry{set}{59}{\code {set}}
+\entry{shopt}{63}{\code {shopt}}
\entry{dirs}{91}{\code {dirs}}
\entry{popd}{91}{\code {popd}}
\entry{pushd}{92}{\code {pushd}}
\entry {\code {break}}{41}
\entry {\code {builtin}}{49}
\initial {C}
-\entry {\code {caller}}{49}
+\entry {\code {caller}}{50}
\entry {\code {cd}}{42}
\entry {\code {command}}{50}
\entry {\code {compgen}}{127}
\initial {L}
\entry {\code {let}}{53}
\entry {\code {local}}{53}
-\entry {\code {logout}}{53}
+\entry {\code {logout}}{54}
\initial {M}
-\entry {\code {mapfile}}{53}
+\entry {\code {mapfile}}{54}
\initial {P}
\entry {\code {popd}}{91}
\entry {\code {printf}}{54}
\entry {\code {readonly}}{44}
\entry {\code {return}}{45}
\initial {S}
-\entry {\code {set}}{58}
+\entry {\code {set}}{59}
\entry {\code {shift}}{45}
-\entry {\code {shopt}}{62}
-\entry {\code {source}}{56}
+\entry {\code {shopt}}{63}
+\entry {\code {source}}{57}
\entry {\code {suspend}}{100}
\initial {T}
\entry {\code {test}}{45}
\entry {\code {times}}{46}
-\entry {\code {trap}}{46}
-\entry {\code {type}}{56}
+\entry {\code {trap}}{47}
+\entry {\code {type}}{57}
\entry {\code {typeset}}{57}
\initial {U}
\entry {\code {ulimit}}{57}
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!-- Created on September, 11 2013 by texi2html 1.64 -->
+<!-- Created on October, 22 2013 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
<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.3, 2 September 2013).
+the Bash shell (version 4.3, 20 October 2013).
The Bash home page is <A HREF="http://www.gnu.org/software/bash/">http://www.gnu.org/software/bash/</A>.
</P><P>
-This is Edition 4.3, last updated 2 September 2013,
+This is Edition 4.3, last updated 20 October 2013,
of <CITE>The GNU Bash Reference Manual</CITE>,
for <CODE>Bash</CODE>, Version 4.3.
</P><P>
</TABLE></BLOCKQUOTE>
<P>
-The order of expansions is: brace expansion, tilde expansion,
-parameter, variable, and arithmetic expansion and
-command substitution
-(done in a left-to-right fashion), word splitting, and filename
-expansion.
+The order of expansions is:
+brace expansion;
+tilde expansion, parameter and variable expansion, arithmetic expansion,
+and command substitution (done in a left-to-right fashion);
+word splitting;
+and filename expansion.
</P><P>
On systems that can support it, there is an additional expansion
-available: <VAR>process substitution</VAR>. This is performed at the
-same time as parameter, variable, and arithmetic expansion and
+available: <VAR>process substitution</VAR>.
+This is performed at the
+same time as tilde, parameter, variable, and arithmetic expansion and
command substitution.
</P><P>
<DT><CODE>cd</CODE>
<DD><A NAME="IDX71"></A>
-<TABLE><tr><td> </td><td class=example><pre>cd [-L|[-P [-e]]] [<VAR>directory</VAR>]
+<TABLE><tr><td> </td><td class=example><pre>cd [-L|[-P [-e]] [-@] [<VAR>directory</VAR>]
</pre></td></tr></table><P>
Change the current working directory to <VAR>directory</VAR>.
and the current working directory cannot be successfully determined
after a successful directory change, <CODE>cd</CODE> will return an unsuccessful
status.
+</P><P>
+
+On systems that support it, the <SAMP>`-@'</SAMP> option presents the extended
+attributes associated with a file as a directory.
+</P><P>
+
If <VAR>directory</VAR> is <SAMP>`-'</SAMP>, it is converted to <CODE>$OLDPWD</CODE>
before the directory change is attempted.
</P><P>
# You can re-read the inputrc file with C-x C-r.
# Lines beginning with '#' are comments.
#
-# First, include any systemwide bindings and variable
+# First, include any system-wide bindings and variable
# assignments from /etc/Inputrc
$include /etc/Inputrc
<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>September, 11 2013</I>
+This document was generated by <I>Chet Ramey</I> on <I>October, 22 2013</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
<P></P>
<BR>
<FONT SIZE="-1">
This document was generated
-by <I>Chet Ramey</I> on <I>September, 11 2013</I>
+by <I>Chet Ramey</I> on <I>October, 22 2013</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
/usr/homes/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.3, 2 September 2013).
+the Bash shell (version 4.3, 20 October 2013).
- This is Edition 4.3, last updated 2 September 2013, of `The GNU Bash
+ This is Edition 4.3, last updated 20 October 2013, of `The GNU Bash
Reference Manual', for `Bash', Version 4.3.
Copyright (C) 1988-2013 Free Software Foundation, Inc.
*************
This text is a brief description of the features that are present in
-the Bash shell (version 4.3, 2 September 2013). The Bash home page is
+the Bash shell (version 4.3, 20 October 2013). The Bash home page is
`http://www.gnu.org/software/bash/'.
- This is Edition 4.3, last updated 2 September 2013, of `The GNU Bash
+ This is Edition 4.3, last updated 20 October 2013, of `The GNU Bash
Reference Manual', for `Bash', Version 4.3.
Bash contains features that appear in other popular shells, and some
* Quote Removal:: How and when quote characters are removed from
words.
- The order of expansions is: brace expansion, tilde expansion,
-parameter, variable, and arithmetic expansion and command substitution
-(done in a left-to-right fashion), word splitting, and filename
-expansion.
+ The order of expansions is: brace expansion; tilde expansion,
+parameter and variable expansion, arithmetic expansion, and command
+substitution (done in a left-to-right fashion); word splitting; and
+filename expansion.
On systems that can support it, there is an additional expansion
available: PROCESS SUBSTITUTION. This is performed at the same time as
-parameter, variable, and arithmetic expansion and command substitution.
+tilde, parameter, variable, and arithmetic expansion and command
+substitution.
Only brace expansion, word splitting, and filename expansion can
change the number of words of the expansion; other expansions expand a
greater than or equal to 1.
`cd'
- cd [-L|[-P [-e]]] [DIRECTORY]
+ cd [-L|[-P [-e]] [-@] [DIRECTORY]
Change the current working directory to DIRECTORY. If DIRECTORY
is not supplied, the value of the `HOME' shell variable is used.
If the `-e' option is supplied with `-P' and the current working
directory cannot be successfully determined after a successful
- directory change, `cd' will return an unsuccessful status. If
- DIRECTORY is `-', it is converted to `$OLDPWD' before the
+ directory change, `cd' will return an unsuccessful status.
+
+ On systems that support it, the `-@' option presents the extended
+ attributes associated with a file as a directory.
+
+ If DIRECTORY is `-', it is converted to `$OLDPWD' before the
directory change is attempted.
If a non-empty directory name from `CDPATH' is used, or if `-' is
# You can re-read the inputrc file with C-x C-r.
# Lines beginning with '#' are comments.
#
- # First, include any systemwide bindings and variable
+ # First, include any system-wide bindings and variable
# assignments from /etc/Inputrc
$include /etc/Inputrc
* :: Bourne Shell Builtins.
(line 11)
* [: Bourne Shell Builtins.
- (line 254)
+ (line 258)
* alias: Bash Builtins. (line 11)
* bg: Job Control Builtins.
(line 7)
* compopt: Programmable Completion Builtins.
(line 228)
* continue: Bourne Shell Builtins.
- (line 76)
+ (line 80)
* declare: Bash Builtins. (line 149)
* dirs: Directory Stack Builtins.
(line 7)
* echo: Bash Builtins. (line 241)
* enable: Bash Builtins. (line 303)
* eval: Bourne Shell Builtins.
- (line 85)
+ (line 89)
* exec: Bourne Shell Builtins.
- (line 93)
+ (line 97)
* exit: Bourne Shell Builtins.
- (line 110)
+ (line 114)
* export: Bourne Shell Builtins.
- (line 117)
+ (line 121)
* fc: Bash History Builtins.
(line 10)
* fg: Job Control Builtins.
(line 17)
* getopts: Bourne Shell Builtins.
- (line 133)
+ (line 137)
* hash: Bourne Shell Builtins.
- (line 176)
+ (line 180)
* help: Bash Builtins. (line 332)
* history: Bash History Builtins.
(line 40)
* pushd: Directory Stack Builtins.
(line 61)
* pwd: Bourne Shell Builtins.
- (line 196)
+ (line 200)
* read: Bash Builtins. (line 473)
* readarray: Bash Builtins. (line 560)
* readonly: Bourne Shell Builtins.
- (line 206)
+ (line 210)
* return: Bourne Shell Builtins.
- (line 225)
+ (line 229)
* set: The Set Builtin. (line 11)
* shift: Bourne Shell Builtins.
- (line 241)
+ (line 245)
* shopt: The Shopt Builtin. (line 9)
* source: Bash Builtins. (line 569)
* suspend: Job Control Builtins.
(line 101)
* test: Bourne Shell Builtins.
- (line 254)
+ (line 258)
* times: Bourne Shell Builtins.
- (line 330)
+ (line 334)
* trap: Bourne Shell Builtins.
- (line 336)
+ (line 340)
* type: Bash Builtins. (line 574)
* typeset: Bash Builtins. (line 606)
* ulimit: Bash Builtins. (line 612)
* umask: Bourne Shell Builtins.
- (line 385)
+ (line 389)
* unalias: Bash Builtins. (line 703)
* unset: Bourne Shell Builtins.
- (line 403)
+ (line 407)
* wait: Job Control Builtins.
(line 76)
\1f
Tag Table:
-Node: Top\7f932
-Node: Introduction\7f2852
-Node: What is Bash?\7f3080
-Node: What is a shell?\7f4193
-Node: Definitions\7f6732
-Node: Basic Shell Features\7f9650
-Node: Shell Syntax\7f10869
-Node: Shell Operation\7f11899
-Node: Quoting\7f13193
-Node: Escape Character\7f14496
-Node: Single Quotes\7f14981
-Node: Double Quotes\7f15329
-Node: ANSI-C Quoting\7f16454
-Node: Locale Translation\7f17698
-Node: Comments\7f18594
-Node: Shell Commands\7f19212
-Node: Simple Commands\7f20084
-Node: Pipelines\7f20715
-Node: Lists\7f23453
-Node: Compound Commands\7f25182
-Node: Looping Constructs\7f26188
-Node: Conditional Constructs\7f28651
-Node: Command Grouping\7f39581
-Node: Coprocesses\7f41060
-Node: GNU Parallel\7f42893
-Node: Shell Functions\7f46879
-Node: Shell Parameters\7f51963
-Node: Positional Parameters\7f56092
-Node: Special Parameters\7f56992
-Node: Shell Expansions\7f60051
-Node: Brace Expansion\7f61977
-Node: Tilde Expansion\7f64758
-Node: Shell Parameter Expansion\7f67107
-Node: Command Substitution\7f79401
-Node: Arithmetic Expansion\7f80734
-Node: Process Substitution\7f81666
-Node: Word Splitting\7f82716
-Node: Filename Expansion\7f84364
-Node: Pattern Matching\7f86529
-Node: Quote Removal\7f90229
-Node: Redirections\7f90524
-Node: Executing Commands\7f99688
-Node: Simple Command Expansion\7f100358
-Node: Command Search and Execution\7f102288
-Node: Command Execution Environment\7f104625
-Node: Environment\7f107611
-Node: Exit Status\7f109270
-Node: Signals\7f110892
-Node: Shell Scripts\7f112860
-Node: Shell Builtin Commands\7f115378
-Node: Bourne Shell Builtins\7f117406
-Node: Bash Builtins\7f137182
-Node: Modifying Shell Behavior\7f164635
-Node: The Set Builtin\7f164980
-Node: The Shopt Builtin\7f175306
-Node: Special Builtins\7f189727
-Node: Shell Variables\7f190706
-Node: Bourne Shell Variables\7f191146
-Node: Bash Variables\7f193177
-Node: Bash Features\7f220052
-Node: Invoking Bash\7f220951
-Node: Bash Startup Files\7f226729
-Node: Interactive Shells\7f231758
-Node: What is an Interactive Shell?\7f232168
-Node: Is this Shell Interactive?\7f232817
-Node: Interactive Shell Behavior\7f233632
-Node: Bash Conditional Expressions\7f236920
-Node: Shell Arithmetic\7f240922
-Node: Aliases\7f243698
-Node: Arrays\7f246254
-Node: The Directory Stack\7f251235
-Node: Directory Stack Builtins\7f251954
-Node: Controlling the Prompt\7f254910
-Node: The Restricted Shell\7f257682
-Node: Bash POSIX Mode\7f259519
-Node: Job Control\7f268906
-Node: Job Control Basics\7f269366
-Node: Job Control Builtins\7f274085
-Node: Job Control Variables\7f278556
-Node: Command Line Editing\7f279714
-Node: Introduction and Notation\7f281386
-Node: Readline Interaction\7f283008
-Node: Readline Bare Essentials\7f284199
-Node: Readline Movement Commands\7f285988
-Node: Readline Killing Commands\7f286953
-Node: Readline Arguments\7f288873
-Node: Searching\7f289917
-Node: Readline Init File\7f292103
-Node: Readline Init File Syntax\7f293250
-Node: Conditional Init Constructs\7f310087
-Node: Sample Init File\7f312620
-Node: Bindable Readline Commands\7f315737
-Node: Commands For Moving\7f316944
-Node: Commands For History\7f318088
-Node: Commands For Text\7f322273
-Node: Commands For Killing\7f324946
-Node: Numeric Arguments\7f327403
-Node: Commands For Completion\7f328542
-Node: Keyboard Macros\7f332734
-Node: Miscellaneous Commands\7f333422
-Node: Readline vi Mode\7f339228
-Node: Programmable Completion\7f340135
-Node: Programmable Completion Builtins\7f347411
-Node: A Programmable Completion Example\7f357157
-Node: Using History Interactively\7f362407
-Node: Bash History Facilities\7f363091
-Node: Bash History Builtins\7f366090
-Node: History Interaction\7f370018
-Node: Event Designators\7f372723
-Node: Word Designators\7f373945
-Node: Modifiers\7f375584
-Node: Installing Bash\7f376988
-Node: Basic Installation\7f378125
-Node: Compilers and Options\7f380817
-Node: Compiling For Multiple Architectures\7f381558
-Node: Installation Names\7f383222
-Node: Specifying the System Type\7f384040
-Node: Sharing Defaults\7f384756
-Node: Operation Controls\7f385429
-Node: Optional Features\7f386387
-Node: Reporting Bugs\7f396451
-Node: Major Differences From The Bourne Shell\7f397649
-Node: GNU Free Documentation License\7f414508
-Node: Indexes\7f439704
-Node: Builtin Index\7f440158
-Node: Reserved Word Index\7f446985
-Node: Variable Index\7f449433
-Node: Function Index\7f462956
-Node: Concept Index\7f470184
+Node: Top\7f930
+Node: Introduction\7f2848
+Node: What is Bash?\7f3076
+Node: What is a shell?\7f4189
+Node: Definitions\7f6728
+Node: Basic Shell Features\7f9646
+Node: Shell Syntax\7f10865
+Node: Shell Operation\7f11895
+Node: Quoting\7f13189
+Node: Escape Character\7f14492
+Node: Single Quotes\7f14977
+Node: Double Quotes\7f15325
+Node: ANSI-C Quoting\7f16450
+Node: Locale Translation\7f17694
+Node: Comments\7f18590
+Node: Shell Commands\7f19208
+Node: Simple Commands\7f20080
+Node: Pipelines\7f20711
+Node: Lists\7f23449
+Node: Compound Commands\7f25178
+Node: Looping Constructs\7f26184
+Node: Conditional Constructs\7f28647
+Node: Command Grouping\7f39577
+Node: Coprocesses\7f41056
+Node: GNU Parallel\7f42889
+Node: Shell Functions\7f46875
+Node: Shell Parameters\7f51959
+Node: Positional Parameters\7f56088
+Node: Special Parameters\7f56988
+Node: Shell Expansions\7f60047
+Node: Brace Expansion\7f61990
+Node: Tilde Expansion\7f64771
+Node: Shell Parameter Expansion\7f67120
+Node: Command Substitution\7f79414
+Node: Arithmetic Expansion\7f80747
+Node: Process Substitution\7f81679
+Node: Word Splitting\7f82729
+Node: Filename Expansion\7f84377
+Node: Pattern Matching\7f86542
+Node: Quote Removal\7f90242
+Node: Redirections\7f90537
+Node: Executing Commands\7f99701
+Node: Simple Command Expansion\7f100371
+Node: Command Search and Execution\7f102301
+Node: Command Execution Environment\7f104638
+Node: Environment\7f107624
+Node: Exit Status\7f109283
+Node: Signals\7f110905
+Node: Shell Scripts\7f112873
+Node: Shell Builtin Commands\7f115391
+Node: Bourne Shell Builtins\7f117419
+Node: Bash Builtins\7f137326
+Node: Modifying Shell Behavior\7f164779
+Node: The Set Builtin\7f165124
+Node: The Shopt Builtin\7f175450
+Node: Special Builtins\7f189871
+Node: Shell Variables\7f190850
+Node: Bourne Shell Variables\7f191290
+Node: Bash Variables\7f193321
+Node: Bash Features\7f220196
+Node: Invoking Bash\7f221095
+Node: Bash Startup Files\7f226873
+Node: Interactive Shells\7f231902
+Node: What is an Interactive Shell?\7f232312
+Node: Is this Shell Interactive?\7f232961
+Node: Interactive Shell Behavior\7f233776
+Node: Bash Conditional Expressions\7f237064
+Node: Shell Arithmetic\7f241066
+Node: Aliases\7f243842
+Node: Arrays\7f246398
+Node: The Directory Stack\7f251379
+Node: Directory Stack Builtins\7f252098
+Node: Controlling the Prompt\7f255054
+Node: The Restricted Shell\7f257826
+Node: Bash POSIX Mode\7f259663
+Node: Job Control\7f269050
+Node: Job Control Basics\7f269510
+Node: Job Control Builtins\7f274229
+Node: Job Control Variables\7f278700
+Node: Command Line Editing\7f279858
+Node: Introduction and Notation\7f281530
+Node: Readline Interaction\7f283152
+Node: Readline Bare Essentials\7f284343
+Node: Readline Movement Commands\7f286132
+Node: Readline Killing Commands\7f287097
+Node: Readline Arguments\7f289017
+Node: Searching\7f290061
+Node: Readline Init File\7f292247
+Node: Readline Init File Syntax\7f293394
+Node: Conditional Init Constructs\7f310231
+Node: Sample Init File\7f312764
+Node: Bindable Readline Commands\7f315882
+Node: Commands For Moving\7f317089
+Node: Commands For History\7f318233
+Node: Commands For Text\7f322418
+Node: Commands For Killing\7f325091
+Node: Numeric Arguments\7f327548
+Node: Commands For Completion\7f328687
+Node: Keyboard Macros\7f332879
+Node: Miscellaneous Commands\7f333567
+Node: Readline vi Mode\7f339373
+Node: Programmable Completion\7f340280
+Node: Programmable Completion Builtins\7f347556
+Node: A Programmable Completion Example\7f357302
+Node: Using History Interactively\7f362552
+Node: Bash History Facilities\7f363236
+Node: Bash History Builtins\7f366235
+Node: History Interaction\7f370163
+Node: Event Designators\7f372868
+Node: Word Designators\7f374090
+Node: Modifiers\7f375729
+Node: Installing Bash\7f377133
+Node: Basic Installation\7f378270
+Node: Compilers and Options\7f380962
+Node: Compiling For Multiple Architectures\7f381703
+Node: Installation Names\7f383367
+Node: Specifying the System Type\7f384185
+Node: Sharing Defaults\7f384901
+Node: Operation Controls\7f385574
+Node: Optional Features\7f386532
+Node: Reporting Bugs\7f396596
+Node: Major Differences From The Bourne Shell\7f397794
+Node: GNU Free Documentation License\7f414653
+Node: Indexes\7f439849
+Node: Builtin Index\7f440303
+Node: Reserved Word Index\7f447130
+Node: Variable Index\7f449578
+Node: Function Index\7f463101
+Node: Concept Index\7f470329
\1f
End Tag Table
-This is TeX, Version 3.1415926 (TeX Live 2011/Fink) (format=tex 2012.4.18) 11 SEP 2013 09:17
+This is TeX, Version 3.1415926 (TeX Live 2011/Fink) (format=tex 2012.4.18) 22 OCT 2013 11:07
**/usr/homes/chet/src/bash/src/doc/bashref.texi
(/usr/homes/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
Loading texinfo [version 2009-01-18.17]:
[16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30]
[31] [32] [33] [34] [35] [36] [37] [38] Chapter 4 [39] [40] [41] [42] [43]
[44] [45] [46] [47]
-Underfull \hbox (badness 5231) in paragraph at lines 3764--3777
+Underfull \hbox (badness 5231) in paragraph at lines 3770--3783
@texttt emacs-meta[]@textrm , @texttt emacs-ctlx[]@textrm , @texttt vi[]@textr
m , @texttt vi-move[]@textrm , @texttt vi-command[]@textrm , and
[48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62]
[63] [64] [65] [66] [67] Chapter 5 [68] [69] [70] [71] [72] [73] [74] [75]
[76] [77] [78] Chapter 6 [79]
-Overfull \hbox (51.96864pt too wide) in paragraph at lines 5981--5981
+Overfull \hbox (51.96864pt too wide) in paragraph at lines 5987--5987
[]@texttt bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@t
exttt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
-Overfull \hbox (76.23077pt too wide) in paragraph at lines 5982--5982
+Overfull \hbox (76.23077pt too wide) in paragraph at lines 5988--5988
[]@texttt bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@texttt
] [-O @textttsl shopt_option@texttt ] -c @textttsl string @texttt [@textttsl ar
-
.etc.
-Overfull \hbox (34.72258pt too wide) in paragraph at lines 5983--5983
+Overfull \hbox (34.72258pt too wide) in paragraph at lines 5989--5989
[]@texttt bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @textttsl op-tion@text
tt ] [-O @textttsl shopt_option@texttt ] [@textttsl ar-
.etc.
[80] [81]
-Underfull \hbox (badness 2245) in paragraph at lines 6155--6157
+Underfull \hbox (badness 2245) in paragraph at lines 6161--6163
[]@textrm When a lo-gin shell ex-its, Bash reads and ex-e-cutes com-mands from
the file
.etc.
[82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96]
-Underfull \hbox (badness 2521) in paragraph at lines 7373--7376
+Underfull \hbox (badness 2521) in paragraph at lines 7379--7382
@textrm `@texttt --enable-strict-posix-default[]@textrm '[] to @texttt configur
e[] @textrm when build-ing (see Sec-tion 10.8
[132]) (/usr/homes/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9
[133] [134] [135] [136] [137]) Chapter 10 [138] [139] [140] [141]
-Underfull \hbox (badness 2772) in paragraph at lines 7981--7985
+Underfull \hbox (badness 2772) in paragraph at lines 7987--7991
[]@textrm Enable sup-port for large files (@texttt http://www.sas.com/standard
s/large_
Here is how much of TeX's memory you used:
2085 strings out of 497974
28645 string characters out of 3220833
- 66407 words of memory out of 3000000
+ 66405 words of memory out of 3000000
2901 multiletter control sequences out of 15000+200000
32127 words of font info for 112 fonts, out of 3000000 for 9000
51 hyphenation exceptions out of 8191
16i,6n,14p,319b,705s stack positions out of 5000i,500n,10000p,200000b,50000s
-Output written on bashref.dvi (173 pages, 719680 bytes).
+Output written on bashref.dvi (173 pages, 719856 bytes).
%!PS-Adobe-2.0
%%Creator: dvips(k) 5.991 Copyright 2011 Radical Eye Software
%%Title: bashref.dvi
-%%CreationDate: Wed Sep 11 09:17:51 2013
+%%CreationDate: Tue Oct 22 11:07:57 2013
%%Pages: 173
%%PageOrder: Ascend
%%BoundingBox: 0 0 612 792
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips -D 600 -t letter -o bashref.ps bashref.dvi
%DVIPSParameters: dpi=600
-%DVIPSSource: TeX output 2013.09.11:0917
+%DVIPSSource: TeX output 2013.10.22:1107
%%BeginProcSet: tex.pro 0 0
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
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.3,)g(for)f
-Fs(Bash)g Ft(V)-8 b(ersion)31 b(4.3.)3118 1697 y(Septem)m(b)s(er)f
-(2013)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.3.)3217 1697 y(Octob)s(er)f(2013)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 4279 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 4389 y(4.3,)c(2)e(Septem)m(b)s
-(er)g(2013\).)150 4523 y(This)h(is)h(Edition)g(4.3,)i(last)f(up)s
-(dated)d(2)i(Septem)m(b)s(er)g(2013,)i(of)e Fq(The)f(GNU)i(Bash)f
-(Reference)h(Man)m(ual)p Ft(,)150 4633 y(for)d Fs(Bash)p
-Ft(,)g(V)-8 b(ersion)31 b(4.3.)150 4767 y(Cop)m(yrigh)m(t)602
-4764 y(c)577 4767 y Fp(\015)f Ft(1988{2013)35 b(F)-8
-b(ree)31 b(Soft)m(w)m(are)h(F)-8 b(oundation,)31 b(Inc.)390
-4902 y(P)m(ermission)21 b(is)f(gran)m(ted)h(to)g(cop)m(y)-8
+(the)h(Bash)f(shell)h(\(v)m(ersion)150 4389 y(4.3,)c(20)f(Octob)s(er)f
+(2013\).)150 4523 y(This)35 b(is)g(Edition)h(4.3,)i(last)f(up)s(dated)d
+(20)i(Octob)s(er)g(2013,)j(of)c Fq(The)h(GNU)g(Bash)f(Reference)i(Man)m
+(ual)p Ft(,)150 4633 y(for)30 b Fs(Bash)p Ft(,)g(V)-8
+b(ersion)31 b(4.3.)150 4767 y(Cop)m(yrigh)m(t)602 4764
+y(c)577 4767 y Fp(\015)f Ft(1988{2013)35 b(F)-8 b(ree)31
+b(Soft)m(w)m(are)h(F)-8 b(oundation,)31 b(Inc.)390 4902
+y(P)m(ermission)21 b(is)f(gran)m(ted)h(to)g(cop)m(y)-8
b(,)24 b(distribute)c(and/or)h(mo)s(dify)e(this)i(do)s(cumen)m(t)f
(under)f(the)390 5011 y(terms)25 b(of)h(the)f(GNU)h(F)-8
b(ree)27 b(Do)s(cumen)m(tation)g(License,)g(V)-8 b(ersion)26
b Ft(48)275 2545 y(4.3)92 b(Mo)s(difying)30 b(Shell)g(Beha)m(vior)9
b Fm(:)17 b(:)f(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
-h(:)f(:)h(:)f(:)39 b Ft(58)399 2654 y(4.3.1)93 b(The)30
+h(:)f(:)h(:)f(:)39 b Ft(59)399 2654 y(4.3.1)93 b(The)30
b(Set)g(Builtin)c Fm(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)55 b
-Ft(58)399 2764 y(4.3.2)93 b(The)30 b(Shopt)f(Builtin)13
+Ft(59)399 2764 y(4.3.2)93 b(The)30 b(Shopt)f(Builtin)13
b Fm(:)j(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
-(:)h(:)f(:)h(:)f(:)g(:)43 b Ft(62)275 2873 y(4.4)92 b(Sp)s(ecial)30
+(:)h(:)f(:)h(:)f(:)g(:)43 b Ft(63)275 2873 y(4.4)92 b(Sp)s(ecial)30
b(Builtins)21 b Fm(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)
g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)50
(teractiv)m(e)j(shell)d(in)g(whic)m(h)g(the)g Fs(interactive_comments)
16 b Ft(option)150 4902 y(to)40 b(the)f Fs(shopt)e Ft(builtin)h(is)h
(enabled)g(\(see)h(Section)g(4.3.2)g([The)f(Shopt)f(Builtin],)k(page)e
-(62\),)i(a)d(w)m(ord)150 5011 y(b)s(eginning)26 b(with)g(`)p
+(63\),)i(a)d(w)m(ord)150 5011 y(b)s(eginning)26 b(with)g(`)p
Fs(#)p Ft(')g(causes)h(that)f(w)m(ord)g(and)g(all)h(remaining)g(c)m
(haracters)g(on)f(that)h(line)g(to)g(b)s(e)f(ignored.)150
5121 y(An)43 b(in)m(teractiv)m(e)j(shell)e(without)f(the)g
(status)f(of)g(the)150 518 y(last)27 b(command)f(in)f(the)i(pip)s
(eline,)f(unless)g(the)g Fs(pipefail)e Ft(option)i(is)g(enabled)g
(\(see)h(Section)g(4.3.1)h([The)150 628 y(Set)34 b(Builtin],)j(page)e
-(58\).)53 b(If)34 b Fs(pipefail)e Ft(is)i(enabled,)h(the)g(pip)s
+(59\).)53 b(If)34 b Fs(pipefail)e Ft(is)i(enabled,)h(the)g(pip)s
(eline's)f(return)f(status)h(is)h(the)f(v)-5 b(alue)35
b(of)150 737 y(the)d(last)h(\(righ)m(tmost\))h(command)e(to)h(exit)g
(with)e(a)i(non-zero)f(status,)h(or)f(zero)h(if)f(all)h(commands)f
2042 y Ft(that)42 b(matc)m(hes)g Fq(w)m(ord)t Ft(.)71
b(If)41 b(the)g(shell)g(option)g Fs(nocasematch)d Ft(\(see)k(the)f
(description)g(of)630 2152 y Fs(shopt)34 b Ft(in)h(Section)h(4.3.2)h
-([The)e(Shopt)f(Builtin],)k(page)e(62\))g(is)g(enabled,)g(the)g(matc)m
+([The)e(Shopt)f(Builtin],)k(page)e(63\))g(is)g(enabled,)g(the)g(matc)m
(h)g(is)630 2262 y(p)s(erformed)29 b(without)i(regard)g(to)g(the)g
(case)h(of)f(alphab)s(etic)g(c)m(haracters.)44 b(The)30
b(`)p Fs(|)p Ft(')h(is)g(used)630 2371 y(to)e(separate)g(m)m(ultiple)g
Ft('.)46 b(If)31 b(the)h(shell)h(option)f Fs(nocasematch)630
737 y Ft(\(see)42 b(the)f(description)g(of)h Fs(shopt)d
Ft(in)i(Section)h(4.3.2)h([The)e(Shopt)f(Builtin],)45
-b(page)d(62\))630 847 y(is)e(enabled,)i(the)e(matc)m(h)h(is)e(p)s
+b(page)d(63\))630 847 y(is)e(enabled,)i(the)e(matc)m(h)h(is)e(p)s
(erformed)g(without)g(regard)h(to)h(the)f(case)g(of)g(alphab)s(etic)630
956 y(c)m(haracters.)h(The)28 b(return)e(v)-5 b(alue)28
b(is)g(0)g(if)g(the)g(string)g(matc)m(hes)h(\(`)p Fs(==)p
(return)630 1864 y(v)-5 b(alue)40 b(is)g(2.)68 b(If)39
b(the)h(shell)f(option)h Fs(nocasematch)d Ft(\(see)j(the)g(description)
g(of)f Fs(shopt)f Ft(in)630 1974 y(Section)32 b(4.3.2)g([The)f(Shopt)f
-(Builtin],)i(page)g(62\))g(is)f(enabled,)g(the)g(matc)m(h)h(is)e(p)s
+(Builtin],)i(page)g(63\))g(is)f(enabled,)g(the)g(matc)m(h)h(is)e(p)s
(erformed)630 2084 y(without)36 b(regard)g(to)h(the)f(case)h(of)f
(alphab)s(etic)h(c)m(haracters.)59 b(An)m(y)36 b(part)g(of)h(the)f
(pattern)630 2193 y(ma)m(y)31 b(b)s(e)f(quoted)h(to)g(force)g(the)g
1240 y Fp(\017)60 b Ft(arithmetic)32 b(expansion)225
1374 y Fp(\017)60 b Ft(w)m(ord)30 b(splitting)225 1508
y Fp(\017)60 b Ft(\014lename)31 b(expansion)275 1667
-y(The)i(order)g(of)h(expansions)g(is:)47 b(brace)34 b(expansion,)h
-(tilde)g(expansion,)f(parameter,)i(v)-5 b(ariable,)36
-b(and)150 1777 y(arithmetic)46 b(expansion)f(and)g(command)f
-(substitution)h(\(done)g(in)g(a)g(left-to-righ)m(t)j(fashion\),)h(w)m
-(ord)150 1887 y(splitting,)31 b(and)f(\014lename)h(expansion.)275
-2021 y(On)42 b(systems)h(that)h(can)g(supp)s(ort)e(it,)47
-b(there)d(is)f(an)h(additional)g(expansion)f(a)m(v)-5
-b(ailable:)69 b Fq(pro)s(cess)150 2131 y(substitution)p
-Ft(.)61 b(This)36 b(is)h(p)s(erformed)f(at)i(the)f(same)h(time)f(as)h
-(parameter,)h(v)-5 b(ariable,)40 b(and)d(arithmetic)150
-2240 y(expansion)30 b(and)g(command)g(substitution.)275
+y(The)24 b(order)h(of)h(expansions)f(is:)39 b(brace)25
+b(expansion;)j(tilde)e(expansion,)g(parameter)g(and)f(v)-5
+b(ariable)26 b(ex-)150 1777 y(pansion,)j(arithmetic)i(expansion,)f(and)
+f(command)g(substitution)g(\(done)g(in)h(a)f(left-to-righ)m(t)k
+(fashion\);)150 1887 y(w)m(ord)d(splitting;)h(and)f(\014lename)h
+(expansion.)275 2021 y(On)c(systems)h(that)h(can)g(supp)s(ort)e(it,)i
+(there)g(is)f(an)g(additional)i(expansion)e(a)m(v)-5
+b(ailable:)42 b Fq(pro)s(cess)28 b(sub-)150 2131 y(stitution)p
+Ft(.)42 b(This)30 b(is)g(p)s(erformed)f(at)j(the)e(same)h(time)h(as)e
+(tilde,)i(parameter,)f(v)-5 b(ariable,)32 b(and)e(arithmetic)150
+2240 y(expansion)g(and)g(command)g(substitution.)275
2374 y(Only)35 b(brace)i(expansion,)h(w)m(ord)e(splitting,)j(and)d
(\014lename)g(expansion)g(can)h(c)m(hange)h(the)e(n)m(um)m(b)s(er)150
2484 y(of)h(w)m(ords)f(of)g(the)h(expansion;)i(other)e(expansions)f
b(Filename)41 b(Expansion)150 5121 y Ft(After)26 b(w)m(ord)g
(splitting,)i(unless)d(the)i(`)p Fs(-f)p Ft(')f(option)g(has)g(b)s(een)
f(set)i(\(see)g(Section)g(4.3.1)h([The)e(Set)g(Builtin],)150
-5230 y(page)h(58\),)i(Bash)d(scans)h(eac)m(h)h(w)m(ord)e(for)g(the)h(c)
+5230 y(page)h(59\),)i(Bash)d(scans)h(eac)m(h)h(w)m(ord)e(for)g(the)h(c)
m(haracters)g(`)p Fs(*)p Ft(',)h(`)p Fs(?)p Ft(',)g(and)e(`)p
Fs([)p Ft('.)39 b(If)26 b(one)h(of)g(these)f(c)m(haracters)150
5340 y(app)s(ears,)h(then)f(the)h(w)m(ord)f(is)h(regarded)g(as)g(a)g
1314 y(In)30 b(other)g(cases,)i(the)e(`)p Fs(.)p Ft(')h(c)m(haracter)h
(is)e(not)h(treated)g(sp)s(ecially)-8 b(.)275 1453 y(See)28
b(the)g(description)g(of)g Fs(shopt)e Ft(in)i(Section)g(4.3.2)i([The)e
-(Shopt)f(Builtin],)i(page)g(62,)g(for)f(a)g(descrip-)150
+(Shopt)f(Builtin],)i(page)g(63,)g(for)f(a)g(descrip-)150
1562 y(tion)j(of)f(the)h Fs(nocaseglob)p Ft(,)d Fs(nullglob)p
Ft(,)g Fs(failglob)p Ft(,)h(and)g Fs(dotglob)g Ft(options.)275
1701 y(The)j Fs(GLOBIGNORE)f Ft(shell)i(v)-5 b(ariable)34
(y)f(default)g(or)g(with)g(command-line)g(argumen)m(ts\))h(or)330
652 y(b)m(y)c Fs(set)225 787 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(62\))225 921 y Fp(\017)60
+(Shopt)g(Builtin],)h(page)g(63\))225 921 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(88\))225
1056 y Fp(\017)60 b Ft(v)-5 b(arious)50 b(pro)s(cess)f
768 y(page)g(18.)41 b(These)29 b(assignmen)m(t)i(statemen)m(ts)g
(a\013ect)f(only)g(the)f(en)m(vironmen)m(t)h(seen)g(b)m(y)f(that)h
(command.)275 909 y(If)d(the)h(`)p Fs(-k)p Ft(')g(option)g(is)g(set)g
-(\(see)h(Section)f(4.3.1)i([The)e(Set)g(Builtin],)h(page)f(58\),)i
+(\(see)h(Section)f(4.3.1)i([The)e(Set)g(Builtin],)h(page)f(59\),)i
(then)e(all)g(parameter)150 1019 y(assignmen)m(ts)i(are)g(placed)h(in)e
(the)h(en)m(vironmen)m(t)g(for)g(a)g(command,)f(not)h(just)f(those)i
(that)f(precede)g(the)150 1128 y(command)g(name.)275
(receiv)m(e)i Fs(SIGHUP)d Ft(using)h Fs(disown)150 847
y(-h)p Ft(.)275 992 y(If)38 b(the)h Fs(huponexit)e Ft(shell)i(option)g
(has)g(b)s(een)f(set)i(with)f Fs(shopt)e Ft(\(see)j(Section)g(4.3.2)h
-([The)e(Shopt)150 1102 y(Builtin],)31 b(page)g(62\),)h(Bash)f(sends)e
+([The)e(Shopt)150 1102 y(Builtin],)31 b(page)g(63\),)h(Bash)f(sends)e
(a)i Fs(SIGHUP)e Ft(to)i(all)g(jobs)f(when)f(an)i(in)m(teractiv)m(e)i
(login)e(shell)g(exits.)275 1247 y(If)38 b(Bash)h(is)g(w)m(aiting)h
(for)f(a)g(command)f(to)i(complete)g(and)e(receiv)m(es)j(a)e(signal)h
(is)h(exited.)70 b Fq(n)40 b Ft(m)m(ust)g(b)s(e)f(greater)j(than)d(or)i
(equal)f(to)h(1.)70 b(The)40 b(return)630 518 y(status)31
b(is)f(zero)h(unless)f Fq(n)g Ft(is)g(not)h(greater)g(than)g(or)f
-(equal)h(to)g(1.)150 677 y Fs(cd)870 812 y(cd)47 b([-L|[-P)f([-e]]])g
-([)p Fi(directory)11 b Fs(])630 946 y Ft(Change)26 b(the)g(curren)m(t)g
-(w)m(orking)g(directory)h(to)f Fq(directory)8 b Ft(.)40
-b(If)25 b Fq(directory)35 b Ft(is)26 b(not)g(supplied,)630
+(equal)h(to)g(1.)150 677 y Fs(cd)870 812 y(cd)47 b([-L|[-P)f([-e]])g
+([-@])h([)p Fi(directory)11 b Fs(])630 946 y Ft(Change)26
+b(the)g(curren)m(t)g(w)m(orking)g(directory)h(to)f Fq(directory)8
+b Ft(.)40 b(If)25 b Fq(directory)35 b Ft(is)26 b(not)g(supplied,)630
1056 y(the)g(v)-5 b(alue)26 b(of)f(the)h Fs(HOME)e Ft(shell)i(v)-5
b(ariable)26 b(is)g(used.)38 b(An)m(y)25 b(additional)i(argumen)m(ts)e
(follo)m(wing)630 1166 y Fq(directory)39 b Ft(are)31
(supplied)f(with)g(`)p Fs(-P)p Ft(')h(and)g(the)g(curren)m(t)g(w)m
(orking)h(directory)f(cannot)630 2580 y(b)s(e)37 b(successfully)g
(determined)g(after)i(a)e(successful)h(directory)g(c)m(hange,)i
-Fs(cd)d Ft(will)h(return)630 2690 y(an)28 b(unsuccessful)f(status.)41
-b(If)28 b Fq(directory)36 b Ft(is)29 b(`)p Fs(-)p Ft(',)g(it)g(is)f
-(con)m(v)m(erted)i(to)f Fs($OLDPWD)e Ft(b)s(efore)h(the)630
-2800 y(directory)j(c)m(hange)g(is)g(attempted.)630 2934
-y(If)i(a)h(non-empt)m(y)g(directory)g(name)f(from)g Fs(CDPATH)f
-Ft(is)h(used,)h(or)g(if)f(`)p Fs(-)p Ft(')h(is)f(the)h(\014rst)f(argu-)
-630 3044 y(men)m(t,)28 b(and)e(the)h(directory)g(c)m(hange)h(is)f
-(successful,)h(the)f(absolute)g(pathname)g(of)f(the)h(new)630
-3153 y(w)m(orking)k(directory)g(is)f(written)g(to)i(the)e(standard)g
-(output.)630 3288 y(The)f(return)g(status)h(is)f(zero)i(if)e(the)h
-(directory)g(is)g(successfully)g(c)m(hanged,)g(non-zero)g(oth-)630
-3397 y(erwise.)150 3557 y Fs(continue)870 3691 y(continue)46
-b([)p Fi(n)11 b Fs(])630 3826 y Ft(Resume)32 b(the)g(next)g(iteration)i
+Fs(cd)d Ft(will)h(return)630 2690 y(an)30 b(unsuccessful)f(status.)630
+2824 y(On)37 b(systems)g(that)h(supp)s(ort)e(it,)k(the)e(`)p
+Fs(-@)p Ft(')g(option)g(presen)m(ts)f(the)h(extended)f(attributes)630
+2934 y(asso)s(ciated)32 b(with)e(a)h(\014le)f(as)h(a)f(directory)-8
+b(.)630 3068 y(If)41 b Fq(directory)49 b Ft(is)41 b(`)p
+Fs(-)p Ft(',)j(it)e(is)f(con)m(v)m(erted)h(to)g Fs($OLDPWD)d
+Ft(b)s(efore)i(the)g(directory)h(c)m(hange)g(is)630 3178
+y(attempted.)630 3313 y(If)33 b(a)h(non-empt)m(y)g(directory)g(name)f
+(from)g Fs(CDPATH)f Ft(is)h(used,)h(or)g(if)f(`)p Fs(-)p
+Ft(')h(is)f(the)h(\014rst)f(argu-)630 3422 y(men)m(t,)28
+b(and)e(the)h(directory)g(c)m(hange)h(is)f(successful,)h(the)f
+(absolute)g(pathname)g(of)f(the)h(new)630 3532 y(w)m(orking)k
+(directory)g(is)f(written)g(to)i(the)e(standard)g(output.)630
+3666 y(The)f(return)g(status)h(is)f(zero)i(if)e(the)h(directory)g(is)g
+(successfully)g(c)m(hanged,)g(non-zero)g(oth-)630 3776
+y(erwise.)150 3935 y Fs(continue)870 4070 y(continue)46
+b([)p Fi(n)11 b Fs(])630 4204 y Ft(Resume)32 b(the)g(next)g(iteration)i
(of)e(an)g(enclosing)h Fs(for)p Ft(,)f Fs(while)p Ft(,)f
-Fs(until)p Ft(,)g(or)h Fs(select)f Ft(lo)s(op.)630 3935
+Fs(until)p Ft(,)g(or)h Fs(select)f Ft(lo)s(op.)630 4314
y(If)f Fq(n)h Ft(is)g(supplied,)e(the)j(execution)g(of)f(the)g
Fq(n)p Ft(th)f(enclosing)i(lo)s(op)f(is)f(resumed.)42
-b Fq(n)30 b Ft(m)m(ust)h(b)s(e)630 4045 y(greater)39
+b Fq(n)30 b Ft(m)m(ust)h(b)s(e)630 4423 y(greater)39
b(than)f(or)g(equal)g(to)h(1.)63 b(The)38 b(return)e(status)j(is)e
-(zero)i(unless)e Fq(n)h Ft(is)g(not)g(greater)630 4154
-y(than)30 b(or)g(equal)h(to)g(1.)150 4314 y Fs(eval)870
-4448 y(eval)47 b([)p Fi(arguments)11 b Fs(])630 4583
+(zero)i(unless)e Fq(n)h Ft(is)g(not)g(greater)630 4533
+y(than)30 b(or)g(equal)h(to)g(1.)150 4692 y Fs(eval)870
+4827 y(eval)47 b([)p Fi(arguments)11 b Fs(])630 4961
y Ft(The)25 b(argumen)m(ts)h(are)g(concatenated)i(together)f(in)m(to)f
-(a)g(single)h(command,)f(whic)m(h)g(is)f(then)630 4692
+(a)g(single)h(command,)f(whic)m(h)g(is)f(then)630 5071
y(read)35 b(and)g(executed,)j(and)d(its)h(exit)g(status)g(returned)e
(as)h(the)h(exit)g(status)g(of)g Fs(eval)p Ft(.)54 b(If)630
-4802 y(there)31 b(are)f(no)h(argumen)m(ts)f(or)h(only)f(empt)m(y)h
+5181 y(there)31 b(are)f(no)h(argumen)m(ts)f(or)h(only)f(empt)m(y)h
(argumen)m(ts,)g(the)f(return)g(status)g(is)h(zero.)150
-4961 y Fs(exec)870 5096 y(exec)47 b([-cl])f([-a)h Fi(name)11
-b Fs(])46 b([)p Fi(command)56 b Fs([)p Fi(arguments)11
-b Fs(]])630 5230 y Ft(If)36 b Fq(command)k Ft(is)c(supplied,)h(it)g
-(replaces)h(the)e(shell)h(without)f(creating)i(a)f(new)f(pro)s(cess.)
-630 5340 y(If)h(the)g(`)p Fs(-l)p Ft(')g(option)h(is)f(supplied,)g(the)
-h(shell)f(places)h(a)g(dash)e(at)i(the)f(b)s(eginning)f(of)i(the)p
-eop end
+5340 y Fs(exec)p eop end
%%Page: 43 49
TeXDict begin 43 48 bop 150 -116 a Ft(Chapter)30 b(4:)h(Shell)f
-(Builtin)h(Commands)2079 b(43)630 299 y(zeroth)36 b(argumen)m(t)g
-(passed)f(to)h Fq(command)t Ft(.)56 b(This)34 b(is)i(what)f(the)h
-Fs(login)e Ft(program)h(do)s(es.)630 408 y(The)e(`)p
-Fs(-c)p Ft(')h(option)g(causes)g Fq(command)j Ft(to)e(b)s(e)e(executed)
-i(with)e(an)h(empt)m(y)g(en)m(vironmen)m(t.)630 518 y(If)d(`)p
-Fs(-a)p Ft(')g(is)h(supplied,)f(the)g(shell)h(passes)f
-Fq(name)37 b Ft(as)31 b(the)h(zeroth)g(argumen)m(t)g(to)g
-Fq(command)t Ft(.)630 628 y(If)g Fq(command)j Ft(cannot)e(b)s(e)f
+(Builtin)h(Commands)2079 b(43)870 299 y Fs(exec)47 b([-cl])f([-a)h
+Fi(name)11 b Fs(])46 b([)p Fi(command)56 b Fs([)p Fi(arguments)11
+b Fs(]])630 440 y Ft(If)36 b Fq(command)k Ft(is)c(supplied,)h(it)g
+(replaces)h(the)e(shell)h(without)f(creating)i(a)f(new)f(pro)s(cess.)
+630 549 y(If)h(the)g(`)p Fs(-l)p Ft(')g(option)h(is)f(supplied,)g(the)h
+(shell)f(places)h(a)g(dash)e(at)i(the)f(b)s(eginning)f(of)i(the)630
+659 y(zeroth)e(argumen)m(t)g(passed)f(to)h Fq(command)t
+Ft(.)56 b(This)34 b(is)i(what)f(the)h Fs(login)e Ft(program)h(do)s(es.)
+630 769 y(The)e(`)p Fs(-c)p Ft(')h(option)g(causes)g
+Fq(command)j Ft(to)e(b)s(e)e(executed)i(with)e(an)h(empt)m(y)g(en)m
+(vironmen)m(t.)630 878 y(If)d(`)p Fs(-a)p Ft(')g(is)h(supplied,)f(the)g
+(shell)h(passes)f Fq(name)37 b Ft(as)31 b(the)h(zeroth)g(argumen)m(t)g
+(to)g Fq(command)t Ft(.)630 988 y(If)g Fq(command)j Ft(cannot)e(b)s(e)f
(executed)h(for)f(some)g(reason,)h(a)g(non-in)m(teractiv)m(e)i(shell)d
-(exits,)630 737 y(unless)27 b(the)g Fs(execfail)e Ft(shell)i(option)h
+(exits,)630 1097 y(unless)27 b(the)g Fs(execfail)e Ft(shell)i(option)h
(is)f(enabled.)40 b(In)27 b(that)g(case,)j(it)d(returns)f(failure.)40
-b(An)630 847 y(in)m(teractiv)m(e)d(shell)d(returns)f(failure)h(if)g
+b(An)630 1207 y(in)m(teractiv)m(e)d(shell)d(returns)f(failure)h(if)g
(the)g(\014le)g(cannot)g(b)s(e)g(executed.)52 b(If)33
-b(no)h Fq(command)630 956 y Ft(is)27 b(sp)s(eci\014ed,)g(redirections)h
-(ma)m(y)f(b)s(e)g(used)f(to)i(a\013ect)g(the)f(curren)m(t)g(shell)g(en)
-m(vironmen)m(t.)40 b(If)630 1066 y(there)34 b(are)h(no)f(redirection)h
-(errors,)g(the)f(return)f(status)i(is)f(zero;)j(otherwise)e(the)f
-(return)630 1176 y(status)d(is)f(non-zero.)150 1348 y
-Fs(exit)870 1489 y(exit)47 b([)p Fi(n)11 b Fs(])630 1630
-y Ft(Exit)30 b(the)g(shell,)h(returning)d(a)j(status)f(of)g
+b(no)h Fq(command)630 1316 y Ft(is)27 b(sp)s(eci\014ed,)g(redirections)
+h(ma)m(y)f(b)s(e)g(used)f(to)i(a\013ect)g(the)f(curren)m(t)g(shell)g
+(en)m(vironmen)m(t.)40 b(If)630 1426 y(there)34 b(are)h(no)f
+(redirection)h(errors,)g(the)f(return)f(status)i(is)f(zero;)j
+(otherwise)e(the)f(return)630 1536 y(status)d(is)f(non-zero.)150
+1708 y Fs(exit)870 1849 y(exit)47 b([)p Fi(n)11 b Fs(])630
+1990 y Ft(Exit)30 b(the)g(shell,)h(returning)d(a)j(status)f(of)g
Fq(n)f Ft(to)h(the)g(shell's)g(paren)m(t.)41 b(If)30
-b Fq(n)f Ft(is)h(omitted,)h(the)630 1739 y(exit)c(status)g(is)g(that)g
+b Fq(n)f Ft(is)h(omitted,)h(the)630 2099 y(exit)c(status)g(is)g(that)g
(of)g(the)g(last)g(command)f(executed.)41 b(An)m(y)26
-b(trap)h(on)f Fs(EXIT)f Ft(is)i(executed)630 1849 y(b)s(efore)j(the)h
-(shell)f(terminates.)150 2021 y Fs(export)870 2162 y(export)46
+b(trap)h(on)f Fs(EXIT)f Ft(is)i(executed)630 2209 y(b)s(efore)j(the)h
+(shell)f(terminates.)150 2381 y Fs(export)870 2522 y(export)46
b([-fn])g([-p])h([)p Fi(name)11 b Fs([=)p Fi(value)g
-Fs(]])630 2303 y Ft(Mark)40 b(eac)m(h)h Fq(name)k Ft(to)40
+Fs(]])630 2663 y Ft(Mark)40 b(eac)m(h)h Fq(name)k Ft(to)40
b(b)s(e)f(passed)g(to)i(c)m(hild)f(pro)s(cesses)f(in)g(the)h(en)m
-(vironmen)m(t.)70 b(If)39 b(the)630 2412 y(`)p Fs(-f)p
+(vironmen)m(t.)70 b(If)39 b(the)630 2772 y(`)p Fs(-f)p
Ft(')29 b(option)h(is)g(supplied,)f(the)g Fq(name)5 b
Ft(s)30 b(refer)f(to)h(shell)g(functions;)f(otherwise)h(the)g(names)630
-2522 y(refer)36 b(to)i(shell)e(v)-5 b(ariables.)60 b(The)36
+2882 y(refer)36 b(to)i(shell)e(v)-5 b(ariables.)60 b(The)36
b(`)p Fs(-n)p Ft(')h(option)g(means)f(to)h(no)g(longer)g(mark)f(eac)m
-(h)i Fq(name)630 2632 y Ft(for)h(exp)s(ort.)65 b(If)39
+(h)i Fq(name)630 2992 y Ft(for)h(exp)s(ort.)65 b(If)39
b(no)g Fq(names)j Ft(are)d(supplied,)h(or)f(if)g(the)g(`)p
Fs(-p)p Ft(')g(option)g(is)g(giv)m(en,)j(a)d(list)h(of)630
-2741 y(names)27 b(of)h(all)h(exp)s(orted)e(v)-5 b(ariables)28
+3101 y(names)27 b(of)h(all)h(exp)s(orted)e(v)-5 b(ariables)28
b(is)g(displa)m(y)m(ed.)40 b(The)27 b(`)p Fs(-p)p Ft(')g(option)h
-(displa)m(ys)g(output)f(in)630 2851 y(a)32 b(form)e(that)i(ma)m(y)g(b)s
+(displa)m(ys)g(output)f(in)630 3211 y(a)32 b(form)e(that)i(ma)m(y)g(b)s
(e)e(reused)h(as)g(input.)43 b(If)30 b(a)i(v)-5 b(ariable)32
b(name)f(is)g(follo)m(w)m(ed)i(b)m(y)e(=)p Fq(v)-5 b(alue)5
-b Ft(,)630 2960 y(the)31 b(v)-5 b(alue)30 b(of)h(the)g(v)-5
+b Ft(,)630 3320 y(the)31 b(v)-5 b(alue)30 b(of)h(the)g(v)-5
b(ariable)31 b(is)f(set)h(to)g Fq(v)-5 b(alue)5 b Ft(.)630
-3101 y(The)29 b(return)e(status)j(is)f(zero)h(unless)e(an)h(in)m(v)-5
+3461 y(The)29 b(return)e(status)j(is)f(zero)h(unless)e(an)h(in)m(v)-5
b(alid)29 b(option)h(is)f(supplied,)f(one)i(of)f(the)g(names)630
-3211 y(is)h(not)h(a)f(v)-5 b(alid)31 b(shell)f(v)-5 b(ariable)31
+3571 y(is)h(not)h(a)f(v)-5 b(alid)31 b(shell)f(v)-5 b(ariable)31
b(name,)f(or)h(`)p Fs(-f)p Ft(')f(is)g(supplied)f(with)g(a)i(name)f
-(that)h(is)f(not)h(a)630 3320 y(shell)g(function.)150
-3493 y Fs(getopts)870 3634 y(getopts)46 b Fi(optstring)56
-b(name)h Fs([)p Fi(args)11 b Fs(])630 3774 y(getopts)28
+(that)h(is)f(not)h(a)630 3680 y(shell)g(function.)150
+3853 y Fs(getopts)870 3994 y(getopts)46 b Fi(optstring)56
+b(name)h Fs([)p Fi(args)11 b Fs(])630 4134 y(getopts)28
b Ft(is)i(used)g(b)m(y)g(shell)g(scripts)g(to)g(parse)g(p)s(ositional)h
-(parameters.)41 b Fq(optstring)d Ft(con-)630 3884 y(tains)k(the)g
+(parameters.)41 b Fq(optstring)d Ft(con-)630 4244 y(tains)k(the)g
(option)f(c)m(haracters)i(to)g(b)s(e)d(recognized;)49
b(if)42 b(a)f(c)m(haracter)j(is)d(follo)m(w)m(ed)i(b)m(y)f(a)630
-3994 y(colon,)33 b(the)f(option)g(is)g(exp)s(ected)g(to)h(ha)m(v)m(e)g
+4354 y(colon,)33 b(the)f(option)g(is)g(exp)s(ected)g(to)h(ha)m(v)m(e)g
(an)e(argumen)m(t,)i(whic)m(h)f(should)e(b)s(e)h(separated)630
-4103 y(from)40 b(it)g(b)m(y)g(whitespace.)70 b(The)40
+4463 y(from)40 b(it)g(b)m(y)g(whitespace.)70 b(The)40
b(colon)h(\(`)p Fs(:)p Ft('\))g(and)e(question)h(mark)g(\(`)p
-Fs(?)p Ft('\))h(ma)m(y)f(not)h(b)s(e)630 4213 y(used)d(as)g(option)h(c)
+Fs(?)p Ft('\))h(ma)m(y)f(not)h(b)s(e)630 4573 y(used)d(as)g(option)h(c)
m(haracters.)67 b(Eac)m(h)39 b(time)g(it)g(is)f(in)m(v)m(ok)m(ed,)k
-Fs(getopts)37 b Ft(places)i(the)g(next)630 4322 y(option)29
+Fs(getopts)37 b Ft(places)i(the)g(next)630 4682 y(option)29
b(in)f(the)g(shell)h(v)-5 b(ariable)29 b Fq(name)5 b
Ft(,)29 b(initializing)h Fq(name)k Ft(if)28 b(it)h(do)s(es)f(not)g
-(exist,)i(and)e(the)630 4432 y(index)33 b(of)g(the)h(next)f(argumen)m
+(exist,)i(and)e(the)630 4792 y(index)33 b(of)g(the)h(next)f(argumen)m
(t)h(to)g(b)s(e)e(pro)s(cessed)h(in)m(to)h(the)g(v)-5
-b(ariable)34 b Fs(OPTIND)p Ft(.)48 b Fs(OPTIND)630 4542
+b(ariable)34 b Fs(OPTIND)p Ft(.)48 b Fs(OPTIND)630 4902
y Ft(is)41 b(initialized)i(to)f(1)f(eac)m(h)h(time)g(the)f(shell)g(or)g
(a)g(shell)g(script)g(is)g(in)m(v)m(ok)m(ed.)74 b(When)41
-b(an)630 4651 y(option)36 b(requires)e(an)h(argumen)m(t,)i
+b(an)630 5011 y(option)36 b(requires)e(an)h(argumen)m(t,)i
Fs(getopts)c Ft(places)j(that)g(argumen)m(t)g(in)m(to)g(the)f(v)-5
-b(ariable)630 4761 y Fs(OPTARG)p Ft(.)55 b(The)35 b(shell)g(do)s(es)h
+b(ariable)630 5121 y Fs(OPTARG)p Ft(.)55 b(The)35 b(shell)g(do)s(es)h
(not)g(reset)g Fs(OPTIND)e Ft(automatically;)41 b(it)36
-b(m)m(ust)f(b)s(e)g(man)m(ually)630 4870 y(reset)i(b)s(et)m(w)m(een)g
+b(m)m(ust)f(b)s(e)g(man)m(ually)630 5230 y(reset)i(b)s(et)m(w)m(een)g
(m)m(ultiple)h(calls)f(to)g Fs(getopts)e Ft(within)h(the)h(same)g
-(shell)f(in)m(v)m(o)s(cation)j(if)e(a)630 4980 y(new)30
-b(set)h(of)f(parameters)h(is)f(to)i(b)s(e)d(used.)630
-5121 y(When)41 b(the)h(end)e(of)i(options)g(is)f(encoun)m(tered,)k
-Fs(getopts)39 b Ft(exits)j(with)f(a)h(return)e(v)-5 b(alue)630
-5230 y(greater)32 b(than)e(zero.)41 b Fs(OPTIND)29 b
-Ft(is)h(set)h(to)g(the)g(index)f(of)g(the)h(\014rst)f(non-option)g
-(argumen)m(t,)630 5340 y(and)g Fq(name)35 b Ft(is)c(set)g(to)g(`)p
-Fs(?)p Ft('.)p eop end
+(shell)f(in)m(v)m(o)s(cation)j(if)e(a)630 5340 y(new)30
+b(set)h(of)f(parameters)h(is)f(to)i(b)s(e)d(used.)p eop
+end
%%Page: 44 50
TeXDict begin 44 49 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(44)630 299 y Fs(getopts)27
-b Ft(normally)j(parses)e(the)i(p)s(ositional)g(parameters,)g(but)e(if)i
-(more)f(argumen)m(ts)h(are)630 408 y(giv)m(en)h(in)f
-Fq(args)t Ft(,)h Fs(getopts)e Ft(parses)g(those)i(instead.)630
-540 y Fs(getopts)h Ft(can)h(rep)s(ort)g(errors)g(in)h(t)m(w)m(o)h(w)m
-(a)m(ys.)51 b(If)33 b(the)h(\014rst)e(c)m(haracter)k(of)d
-Fq(optstring)42 b Ft(is)34 b(a)630 650 y(colon,)g Fq(silen)m(t)h
+b(Shell)30 b(Builtin)h(Commands)2069 b(44)630 299 y(When)41
+b(the)h(end)e(of)i(options)g(is)f(encoun)m(tered,)k Fs(getopts)39
+b Ft(exits)j(with)f(a)h(return)e(v)-5 b(alue)630 408
+y(greater)32 b(than)e(zero.)41 b Fs(OPTIND)29 b Ft(is)h(set)h(to)g(the)
+g(index)f(of)g(the)h(\014rst)f(non-option)g(argumen)m(t,)630
+518 y(and)g Fq(name)35 b Ft(is)c(set)g(to)g(`)p Fs(?)p
+Ft('.)630 655 y Fs(getopts)c Ft(normally)j(parses)e(the)i(p)s
+(ositional)g(parameters,)g(but)e(if)i(more)f(argumen)m(ts)h(are)630
+765 y(giv)m(en)h(in)f Fq(args)t Ft(,)h Fs(getopts)e Ft(parses)g(those)i
+(instead.)630 902 y Fs(getopts)h Ft(can)h(rep)s(ort)g(errors)g(in)h(t)m
+(w)m(o)h(w)m(a)m(ys.)51 b(If)33 b(the)h(\014rst)e(c)m(haracter)k(of)d
+Fq(optstring)42 b Ft(is)34 b(a)630 1011 y(colon,)g Fq(silen)m(t)h
Ft(error)d(rep)s(orting)f(is)i(used.)45 b(In)31 b(normal)h(op)s
-(eration,)h(diagnostic)h(messages)630 759 y(are)c(prin)m(ted)e(when)g
+(eration,)h(diagnostic)h(messages)630 1121 y(are)c(prin)m(ted)e(when)g
(in)m(v)-5 b(alid)30 b(options)g(or)f(missing)g(option)g(argumen)m(ts)h
-(are)f(encoun)m(tered.)630 869 y(If)34 b(the)g(v)-5 b(ariable)35
-b Fs(OPTERR)d Ft(is)i(set)h(to)f(0,)i(no)e(error)g(messages)h(will)f(b)
-s(e)f(displa)m(y)m(ed,)j(ev)m(en)f(if)630 978 y(the)c(\014rst)e(c)m
-(haracter)j(of)f Fs(optstring)d Ft(is)i(not)h(a)f(colon.)630
-1110 y(If)39 b(an)h(in)m(v)-5 b(alid)41 b(option)f(is)g(seen,)i
-Fs(getopts)c Ft(places)j(`)p Fs(?)p Ft(')f(in)m(to)h
-Fq(name)k Ft(and,)d(if)e(not)g(silen)m(t,)630 1219 y(prin)m(ts)f(an)h
-(error)f(message)h(and)f(unsets)g Fs(OPTARG)p Ft(.)67
-b(If)39 b Fs(getopts)f Ft(is)i(silen)m(t,)j(the)c(option)630
-1329 y(c)m(haracter)32 b(found)d(is)h(placed)h(in)f Fs(OPTARG)f
-Ft(and)h(no)g(diagnostic)i(message)f(is)g(prin)m(ted.)630
-1461 y(If)c(a)g(required)f(argumen)m(t)i(is)f(not)g(found,)g(and)f
+(are)f(encoun)m(tered.)630 1230 y(If)34 b(the)g(v)-5
+b(ariable)35 b Fs(OPTERR)d Ft(is)i(set)h(to)f(0,)i(no)e(error)g
+(messages)h(will)f(b)s(e)f(displa)m(y)m(ed,)j(ev)m(en)f(if)630
+1340 y(the)c(\014rst)e(c)m(haracter)j(of)f Fs(optstring)d
+Ft(is)i(not)h(a)f(colon.)630 1477 y(If)39 b(an)h(in)m(v)-5
+b(alid)41 b(option)f(is)g(seen,)i Fs(getopts)c Ft(places)j(`)p
+Fs(?)p Ft(')f(in)m(to)h Fq(name)k Ft(and,)d(if)e(not)g(silen)m(t,)630
+1587 y(prin)m(ts)f(an)h(error)f(message)h(and)f(unsets)g
+Fs(OPTARG)p Ft(.)67 b(If)39 b Fs(getopts)f Ft(is)i(silen)m(t,)j(the)c
+(option)630 1696 y(c)m(haracter)32 b(found)d(is)h(placed)h(in)f
+Fs(OPTARG)f Ft(and)h(no)g(diagnostic)i(message)f(is)g(prin)m(ted.)630
+1833 y(If)c(a)g(required)f(argumen)m(t)i(is)f(not)g(found,)g(and)f
Fs(getopts)f Ft(is)i(not)h(silen)m(t,)h(a)e(question)g(mark)630
-1570 y(\(`)p Fs(?)p Ft('\))35 b(is)g(placed)g(in)g Fq(name)5
+1943 y(\(`)p Fs(?)p Ft('\))35 b(is)g(placed)g(in)g Fq(name)5
b Ft(,)36 b Fs(OPTARG)d Ft(is)h(unset,)i(and)e(a)h(diagnostic)h
-(message)f(is)g(prin)m(ted.)630 1680 y(If)e Fs(getopts)f
+(message)f(is)g(prin)m(ted.)630 2052 y(If)e Fs(getopts)f
Ft(is)h(silen)m(t,)j(then)d(a)i(colon)f(\(`)p Fs(:)p
Ft('\))h(is)e(placed)h(in)g Fq(name)k Ft(and)33 b Fs(OPTARG)f
-Ft(is)i(set)g(to)630 1789 y(the)d(option)f(c)m(haracter)i(found.)150
-1943 y Fs(hash)870 2074 y(hash)47 b([-r])f([-p)h Fi(filename)11
-b Fs(])45 b([-dt])h([)p Fi(name)11 b Fs(])630 2206 y
+Ft(is)i(set)g(to)630 2162 y(the)d(option)f(c)m(haracter)i(found.)150
+2326 y Fs(hash)870 2463 y(hash)47 b([-r])f([-p)h Fi(filename)11
+b Fs(])45 b([-dt])h([)p Fi(name)11 b Fs(])630 2600 y
Ft(Eac)m(h)32 b(time)g Fs(hash)e Ft(is)h(in)m(v)m(ok)m(ed,)j(it)d
(remem)m(b)s(ers)g(the)g(full)g(pathnames)g(of)h(the)f(commands)630
-2315 y(sp)s(eci\014ed)i(as)i Fq(name)k Ft(argumen)m(ts,)c(so)g(they)f
+2710 y(sp)s(eci\014ed)i(as)i Fq(name)k Ft(argumen)m(ts,)c(so)g(they)f
(need)g(not)g(b)s(e)f(searc)m(hed)i(for)f(on)g(subsequen)m(t)630
-2425 y(in)m(v)m(o)s(cations.)79 b(The)41 b(commands)h(are)h(found)e(b)m
-(y)h(searc)m(hing)i(through)d(the)i(directories)630 2534
+2819 y(in)m(v)m(o)s(cations.)79 b(The)41 b(commands)h(are)h(found)e(b)m
+(y)h(searc)m(hing)i(through)d(the)i(directories)630 2929
y(listed)33 b(in)g Fs($PATH)p Ft(.)47 b(An)m(y)33 b(previously-remem)m
(b)s(ered)f(pathname)h(is)g(discarded.)48 b(The)32 b(`)p
-Fs(-p)p Ft(')630 2644 y(option)i(inhibits)e(the)i(path)f(searc)m(h,)i
+Fs(-p)p Ft(')630 3039 y(option)i(inhibits)e(the)i(path)f(searc)m(h,)i
(and)e Fq(\014lename)38 b Ft(is)c(used)e(as)i(the)f(lo)s(cation)i(of)f
-Fq(name)5 b Ft(.)630 2754 y(The)35 b(`)p Fs(-r)p Ft(')g(option)g
+Fq(name)5 b Ft(.)630 3148 y(The)35 b(`)p Fs(-r)p Ft(')g(option)g
(causes)h(the)g(shell)f(to)h(forget)g(all)g(remem)m(b)s(ered)f(lo)s
-(cations.)56 b(The)35 b(`)p Fs(-d)p Ft(')630 2863 y(option)c(causes)f
+(cations.)56 b(The)35 b(`)p Fs(-d)p Ft(')630 3258 y(option)c(causes)f
(the)g(shell)h(to)f(forget)i(the)e(remem)m(b)s(ered)f(lo)s(cation)j(of)
-e(eac)m(h)h Fq(name)5 b Ft(.)41 b(If)30 b(the)630 2973
+e(eac)m(h)h Fq(name)5 b Ft(.)41 b(If)30 b(the)630 3367
y(`)p Fs(-t)p Ft(')35 b(option)h(is)g(supplied,)f(the)h(full)f
(pathname)g(to)i(whic)m(h)e(eac)m(h)h Fq(name)41 b Ft(corresp)s(onds)34
-b(is)630 3082 y(prin)m(ted.)39 b(If)26 b(m)m(ultiple)h
+b(is)630 3477 y(prin)m(ted.)39 b(If)26 b(m)m(ultiple)h
Fq(name)32 b Ft(argumen)m(ts)27 b(are)g(supplied)e(with)h(`)p
Fs(-t)p Ft(')g(the)h Fq(name)32 b Ft(is)26 b(prin)m(ted)630
-3192 y(b)s(efore)f(the)h(hashed)e(full)h(pathname.)39
+3587 y(b)s(efore)f(the)h(hashed)e(full)h(pathname.)39
b(The)25 b(`)p Fs(-l)p Ft(')h(option)f(causes)h(output)f(to)i(b)s(e)d
-(displa)m(y)m(ed)630 3302 y(in)31 b(a)g(format)h(that)f(ma)m(y)h(b)s(e)
+(displa)m(y)m(ed)630 3696 y(in)31 b(a)g(format)h(that)f(ma)m(y)h(b)s(e)
f(reused)f(as)h(input.)42 b(If)31 b(no)g(argumen)m(ts)h(are)f(giv)m
-(en,)i(or)e(if)g(only)630 3411 y(`)p Fs(-l)p Ft(')44
+(en,)i(or)e(if)g(only)630 3806 y(`)p Fs(-l)p Ft(')44
b(is)f(supplied,)j(information)e(ab)s(out)g(remem)m(b)s(ered)f
-(commands)g(is)h(prin)m(ted.)80 b(The)630 3521 y(return)25
+(commands)g(is)h(prin)m(ted.)80 b(The)630 3915 y(return)25
b(status)h(is)f(zero)i(unless)e(a)h Fq(name)31 b Ft(is)26
b(not)g(found)e(or)i(an)g(in)m(v)-5 b(alid)26 b(option)g(is)g
-(supplied.)150 3674 y Fs(pwd)870 3806 y(pwd)47 b([-LP])630
-3937 y Ft(Prin)m(t)24 b(the)h(absolute)g(pathname)g(of)f(the)h(curren)m
+(supplied.)150 4080 y Fs(pwd)870 4217 y(pwd)47 b([-LP])630
+4354 y Ft(Prin)m(t)24 b(the)h(absolute)g(pathname)g(of)f(the)h(curren)m
(t)f(w)m(orking)h(directory)-8 b(.)40 b(If)23 b(the)i(`)p
-Fs(-P)p Ft(')f(option)630 4047 y(is)36 b(supplied,)f(the)h(pathname)f
+Fs(-P)p Ft(')f(option)630 4463 y(is)36 b(supplied,)f(the)h(pathname)f
(prin)m(ted)g(will)h(not)g(con)m(tain)h(sym)m(b)s(olic)f(links.)55
-b(If)35 b(the)h(`)p Fs(-L)p Ft(')630 4156 y(option)44
+b(If)35 b(the)h(`)p Fs(-L)p Ft(')630 4573 y(option)44
b(is)g(supplied,)i(the)e(pathname)f(prin)m(ted)h(ma)m(y)g(con)m(tain)h
-(sym)m(b)s(olic)f(links.)80 b(The)630 4266 y(return)26
+(sym)m(b)s(olic)f(links.)80 b(The)630 4682 y(return)26
b(status)h(is)h(zero)g(unless)e(an)h(error)g(is)g(encoun)m(tered)g
-(while)h(determining)f(the)g(name)630 4376 y(of)k(the)f(curren)m(t)g
+(while)h(determining)f(the)g(name)630 4792 y(of)k(the)f(curren)m(t)g
(directory)h(or)f(an)h(in)m(v)-5 b(alid)31 b(option)g(is)f(supplied.)
-150 4529 y Fs(readonly)870 4661 y(readonly)46 b([-aAf])g([-p])g([)p
-Fi(name)11 b Fs([=)p Fi(value)g Fs(]])43 b(...)630 4792
+150 4956 y Fs(readonly)870 5093 y(readonly)46 b([-aAf])g([-p])g([)p
+Fi(name)11 b Fs([=)p Fi(value)g Fs(]])43 b(...)630 5230
y Ft(Mark)24 b(eac)m(h)h Fq(name)k Ft(as)24 b(readonly)-8
b(.)39 b(The)24 b(v)-5 b(alues)24 b(of)g(these)g(names)g(ma)m(y)g(not)g
-(b)s(e)g(c)m(hanged)g(b)m(y)630 4902 y(subsequen)m(t)e(assignmen)m(t.)
+(b)s(e)g(c)m(hanged)g(b)m(y)630 5340 y(subsequen)m(t)e(assignmen)m(t.)
39 b(If)22 b(the)h(`)p Fs(-f)p Ft(')f(option)i(is)e(supplied,)h(eac)m
-(h)h Fq(name)k Ft(refers)22 b(to)i(a)f(shell)630 5011
-y(function.)39 b(The)26 b(`)p Fs(-a)p Ft(')h(option)g(means)g(eac)m(h)h
+(h)h Fq(name)k Ft(refers)22 b(to)i(a)f(shell)p eop end
+%%Page: 45 51
+TeXDict begin 45 50 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(45)630 299 y(function.)39
+b(The)26 b(`)p Fs(-a)p Ft(')h(option)g(means)g(eac)m(h)h
Fq(name)k Ft(refers)26 b(to)i(an)e(indexed)h(arra)m(y)g(v)-5
-b(ariable;)630 5121 y(the)26 b(`)p Fs(-A)p Ft(')g(option)h(means)f(eac)
-m(h)h Fq(name)32 b Ft(refers)25 b(to)i(an)f(asso)s(ciativ)m(e)j(arra)m
-(y)e(v)-5 b(ariable.)40 b(If)26 b(b)s(oth)630 5230 y(options)h(are)g
+b(ariable;)630 408 y(the)26 b(`)p Fs(-A)p Ft(')g(option)h(means)f(eac)m
+(h)h Fq(name)32 b Ft(refers)25 b(to)i(an)f(asso)s(ciativ)m(e)j(arra)m
+(y)e(v)-5 b(ariable.)40 b(If)26 b(b)s(oth)630 518 y(options)h(are)g
(supplied,)f(`)p Fs(-A)p Ft(')g(tak)m(es)i(precedence.)40
b(If)26 b(no)h Fq(name)32 b Ft(argumen)m(ts)26 b(are)h(giv)m(en,)i(or)
-630 5340 y(if)h(the)h(`)p Fs(-p)p Ft(')f(option)h(is)g(supplied,)e(a)i
+630 628 y(if)h(the)h(`)p Fs(-p)p Ft(')f(option)h(is)g(supplied,)e(a)i
(list)g(of)g(all)g(readonly)f(names)h(is)f(prin)m(ted.)41
-b(The)30 b(other)p eop end
-%%Page: 45 51
-TeXDict begin 45 50 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(45)630 299 y(options)36
-b(ma)m(y)g(b)s(e)g(used)f(to)h(restrict)h(the)f(output)f(to)h(a)h
-(subset)e(of)h(the)g(set)g(of)g(readonly)630 408 y(names.)63
-b(The)37 b(`)p Fs(-p)p Ft(')h(option)g(causes)g(output)f(to)i(b)s(e)e
-(displa)m(y)m(ed)h(in)g(a)g(format)g(that)g(ma)m(y)630
-518 y(b)s(e)32 b(reused)h(as)g(input.)48 b(If)33 b(a)g(v)-5
-b(ariable)34 b(name)f(is)h(follo)m(w)m(ed)g(b)m(y)f(=)p
-Fq(v)-5 b(alue)5 b Ft(,)35 b(the)e(v)-5 b(alue)33 b(of)h(the)630
-628 y(v)-5 b(ariable)38 b(is)f(set)h(to)g Fq(v)-5 b(alue)5
-b Ft(.)62 b(The)37 b(return)f(status)h(is)h(zero)g(unless)e(an)h(in)m
-(v)-5 b(alid)38 b(option)g(is)630 737 y(supplied,)f(one)g(of)g(the)g
-Fq(name)42 b Ft(argumen)m(ts)37 b(is)g(not)g(a)g(v)-5
-b(alid)37 b(shell)g(v)-5 b(ariable)38 b(or)e(function)630
-847 y(name,)31 b(or)f(the)h(`)p Fs(-f)p Ft(')f(option)h(is)f(supplied)f
-(with)h(a)h(name)f(that)h(is)g(not)f(a)h(shell)g(function.)150
-1000 y Fs(return)870 1132 y(return)46 b([)p Fi(n)11 b
-Fs(])630 1263 y Ft(Cause)37 b(a)g(shell)h(function)f(to)g(stop)h
-(executing)g(and)e(return)h(the)g(v)-5 b(alue)37 b Fq(n)g
-Ft(to)h(its)f(caller.)630 1373 y(If)h Fq(n)h Ft(is)g(not)g(supplied,)h
-(the)f(return)e(v)-5 b(alue)40 b(is)f(the)g(exit)g(status)g(of)g(the)g
-(last)h(command)630 1482 y(executed)35 b(in)f(the)h(function.)53
-b Fs(return)33 b Ft(ma)m(y)i(also)g(b)s(e)f(used)f(to)j(terminate)f
-(execution)h(of)630 1592 y(a)e(script)g(b)s(eing)g(executed)g(with)g
-(the)g Fs(.)g Ft(\()p Fs(source)p Ft(\))f(builtin,)h(returning)f
-(either)i Fq(n)e Ft(or)h(the)630 1702 y(exit)j(status)f(of)g(the)g
-(last)h(command)e(executed)i(within)e(the)h(script)g(as)g(the)g(exit)h
-(status)630 1811 y(of)i(the)g(script.)65 b(If)38 b Fq(n)g
-Ft(is)h(supplied,)h(the)f(return)e(v)-5 b(alue)39 b(is)g(its)g(least)h
-(signi\014can)m(t)g(8)f(bits.)630 1921 y(An)m(y)g(command)f(asso)s
-(ciated)j(with)d(the)h Fs(RETURN)e Ft(trap)i(is)g(executed)g(b)s(efore)
-g(execution)630 2030 y(resumes)29 b(after)h(the)g(function)g(or)g
-(script.)40 b(The)29 b(return)g(status)h(is)g(non-zero)g(if)g
-Fs(return)e Ft(is)630 2140 y(supplied)h(a)i(non-n)m(umeric)g(argumen)m
-(t)g(or)f(is)h(used)f(outside)h(a)g(function)f(and)g(not)h(during)630
-2250 y(the)g(execution)g(of)g(a)f(script)h(b)m(y)f Fs(.)g
-Ft(or)g Fs(source)p Ft(.)150 2403 y Fs(shift)870 2534
-y(shift)46 b([)p Fi(n)11 b Fs(])630 2666 y Ft(Shift)41
+b(The)30 b(other)630 737 y(options)36 b(ma)m(y)g(b)s(e)g(used)f(to)h
+(restrict)h(the)f(output)f(to)h(a)h(subset)e(of)h(the)g(set)g(of)g
+(readonly)630 847 y(names.)63 b(The)37 b(`)p Fs(-p)p
+Ft(')h(option)g(causes)g(output)f(to)i(b)s(e)e(displa)m(y)m(ed)h(in)g
+(a)g(format)g(that)g(ma)m(y)630 956 y(b)s(e)32 b(reused)h(as)g(input.)
+48 b(If)33 b(a)g(v)-5 b(ariable)34 b(name)f(is)h(follo)m(w)m(ed)g(b)m
+(y)f(=)p Fq(v)-5 b(alue)5 b Ft(,)35 b(the)e(v)-5 b(alue)33
+b(of)h(the)630 1066 y(v)-5 b(ariable)38 b(is)f(set)h(to)g
+Fq(v)-5 b(alue)5 b Ft(.)62 b(The)37 b(return)f(status)h(is)h(zero)g
+(unless)e(an)h(in)m(v)-5 b(alid)38 b(option)g(is)630
+1176 y(supplied,)f(one)g(of)g(the)g Fq(name)42 b Ft(argumen)m(ts)37
+b(is)g(not)g(a)g(v)-5 b(alid)37 b(shell)g(v)-5 b(ariable)38
+b(or)e(function)630 1285 y(name,)31 b(or)f(the)h(`)p
+Fs(-f)p Ft(')f(option)h(is)f(supplied)f(with)h(a)h(name)f(that)h(is)g
+(not)f(a)h(shell)g(function.)150 1450 y Fs(return)870
+1587 y(return)46 b([)p Fi(n)11 b Fs(])630 1724 y Ft(Cause)37
+b(a)g(shell)h(function)f(to)g(stop)h(executing)g(and)e(return)h(the)g
+(v)-5 b(alue)37 b Fq(n)g Ft(to)h(its)f(caller.)630 1833
+y(If)h Fq(n)h Ft(is)g(not)g(supplied,)h(the)f(return)e(v)-5
+b(alue)40 b(is)f(the)g(exit)g(status)g(of)g(the)g(last)h(command)630
+1943 y(executed)35 b(in)f(the)h(function.)53 b Fs(return)33
+b Ft(ma)m(y)i(also)g(b)s(e)f(used)f(to)j(terminate)f(execution)h(of)630
+2052 y(a)e(script)g(b)s(eing)g(executed)g(with)g(the)g
+Fs(.)g Ft(\()p Fs(source)p Ft(\))f(builtin,)h(returning)f(either)i
+Fq(n)e Ft(or)h(the)630 2162 y(exit)j(status)f(of)g(the)g(last)h
+(command)e(executed)i(within)e(the)h(script)g(as)g(the)g(exit)h(status)
+630 2271 y(of)i(the)g(script.)65 b(If)38 b Fq(n)g Ft(is)h(supplied,)h
+(the)f(return)e(v)-5 b(alue)39 b(is)g(its)g(least)h(signi\014can)m(t)g
+(8)f(bits.)630 2381 y(An)m(y)g(command)f(asso)s(ciated)j(with)d(the)h
+Fs(RETURN)e Ft(trap)i(is)g(executed)g(b)s(efore)g(execution)630
+2491 y(resumes)29 b(after)h(the)g(function)g(or)g(script.)40
+b(The)29 b(return)g(status)h(is)g(non-zero)g(if)g Fs(return)e
+Ft(is)630 2600 y(supplied)h(a)i(non-n)m(umeric)g(argumen)m(t)g(or)f(is)
+h(used)f(outside)h(a)g(function)f(and)g(not)h(during)630
+2710 y(the)g(execution)g(of)g(a)f(script)h(b)m(y)f Fs(.)g
+Ft(or)g Fs(source)p Ft(.)150 2874 y Fs(shift)870 3011
+y(shift)46 b([)p Fi(n)11 b Fs(])630 3148 y Ft(Shift)41
b(the)g(p)s(ositional)h(parameters)g(to)g(the)f(left)h(b)m(y)g
Fq(n)p Ft(.)73 b(The)40 b(p)s(ositional)j(parameters)630
-2776 y(from)34 b Fq(n)p Fs(+)p Ft(1)39 b(.)22 b(.)h(.)45
+3258 y(from)34 b Fq(n)p Fs(+)p Ft(1)39 b(.)22 b(.)h(.)45
b Fs($#)34 b Ft(are)g(renamed)g(to)h Fs($1)k Ft(.)22
b(.)g(.)46 b Fs($#)p Ft(-)p Fq(n)p Ft(.)51 b(P)m(arameters)36
-b(represen)m(ted)e(b)m(y)g(the)630 2885 y(n)m(um)m(b)s(ers)25
+b(represen)m(ted)e(b)m(y)g(the)630 3367 y(n)m(um)m(b)s(ers)25
b Fs($#)i Ft(to)g Fs($#)p Ft(-)p Fq(n)p Fs(+)p Ft(1)g(are)g(unset.)39
b Fq(n)26 b Ft(m)m(ust)h(b)s(e)f(a)i(non-negativ)m(e)h(n)m(um)m(b)s(er)
-c(less)i(than)g(or)630 2995 y(equal)33 b(to)h Fs($#)p
+c(less)i(than)g(or)630 3477 y(equal)33 b(to)h Fs($#)p
Ft(.)47 b(If)33 b Fq(n)f Ft(is)h(zero)g(or)g(greater)h(than)f
Fs($#)p Ft(,)g(the)g(p)s(ositional)g(parameters)g(are)h(not)630
-3104 y(c)m(hanged.)48 b(If)32 b Fq(n)g Ft(is)h(not)f(supplied,)h(it)g
+3587 y(c)m(hanged.)48 b(If)32 b Fq(n)g Ft(is)h(not)f(supplied,)h(it)g
(is)f(assumed)g(to)h(b)s(e)f(1.)48 b(The)32 b(return)g(status)h(is)f
-(zero)630 3214 y(unless)e Fq(n)f Ft(is)i(greater)g(than)g
+(zero)630 3696 y(unless)e Fq(n)f Ft(is)i(greater)g(than)g
Fs($#)e Ft(or)i(less)f(than)h(zero,)g(non-zero)g(otherwise.)150
-3367 y Fs(test)150 3477 y([)870 3608 y(test)47 b Fi(expr)630
-3740 y Ft(Ev)-5 b(aluate)40 b(a)f(conditional)h(express)f(ion)g
+3861 y Fs(test)150 3970 y([)870 4107 y(test)47 b Fi(expr)630
+4244 y Ft(Ev)-5 b(aluate)40 b(a)f(conditional)h(express)f(ion)g
Fq(expr)45 b Ft(and)38 b(return)g(a)h(status)g(of)g(0)g(\(true\))h(or)f
-(1)630 3850 y(\(false\).)j(Eac)m(h)31 b(op)s(erator)f(and)f(op)s(erand)
+(1)630 4354 y(\(false\).)j(Eac)m(h)31 b(op)s(erator)f(and)f(op)s(erand)
g(m)m(ust)h(b)s(e)f(a)i(separate)g(argumen)m(t.)41 b(Expressions)630
-3959 y(are)26 b(comp)s(osed)f(of)g(the)h(primaries)f(describ)s(ed)f(b)s
+4463 y(are)26 b(comp)s(osed)f(of)g(the)h(primaries)f(describ)s(ed)f(b)s
(elo)m(w)h(in)g(Section)h(6.4)h([Bash)e(Conditional)630
-4069 y(Expressions],)39 b(page)g(85.)64 b Fs(test)37
+4573 y(Expressions],)39 b(page)g(85.)64 b Fs(test)37
b Ft(do)s(es)g(not)h(accept)i(an)m(y)e(options,)i(nor)e(do)s(es)f(it)h
-(accept)630 4178 y(and)30 b(ignore)h(an)f(argumen)m(t)h(of)f(`)p
+(accept)630 4682 y(and)30 b(ignore)h(an)f(argumen)m(t)h(of)f(`)p
Fs(--)p Ft(')h(as)f(signifying)h(the)f(end)g(of)h(options.)630
-4310 y(When)f(the)h Fs([)f Ft(form)g(is)g(used,)g(the)g(last)i(argumen)
+4819 y(When)f(the)h Fs([)f Ft(form)g(is)g(used,)g(the)g(last)i(argumen)
m(t)e(to)i(the)e(command)g(m)m(ust)h(b)s(e)e(a)i Fs(])p
-Ft(.)630 4441 y(Expressions)23 b(ma)m(y)h(b)s(e)e(com)m(bined)i(using)f
+Ft(.)630 4956 y(Expressions)23 b(ma)m(y)h(b)s(e)e(com)m(bined)i(using)f
(the)h(follo)m(wing)h(op)s(erators,)g(listed)f(in)f(decreasing)630
-4551 y(order)30 b(of)h(precedence.)43 b(The)30 b(ev)-5
+5066 y(order)30 b(of)h(precedence.)43 b(The)30 b(ev)-5
b(aluation)33 b(dep)s(ends)28 b(on)j(the)g(n)m(um)m(b)s(er)f(of)h
-(argumen)m(ts;)g(see)630 4661 y(b)s(elo)m(w.)41 b(Op)s(erator)30
+(argumen)m(ts;)g(see)630 5176 y(b)s(elo)m(w.)41 b(Op)s(erator)30
b(precedence)h(is)f(used)g(when)f(there)i(are)f(\014v)m(e)h(or)f(more)h
-(argumen)m(ts.)630 4814 y Fs(!)f Fi(expr)210 b Ft(T)-8
-b(rue)30 b(if)g Fq(expr)37 b Ft(is)30 b(false.)630 4967
-y Fs(\()g Fi(expr)40 b Fs(\))122 b Ft(Returns)23 b(the)h(v)-5
-b(alue)24 b(of)g Fq(expr)7 b Ft(.)37 b(This)23 b(ma)m(y)i(b)s(e)e(used)
-g(to)h(o)m(v)m(erride)h(the)f(normal)1110 5077 y(precedence)31
-b(of)f(op)s(erators.)630 5230 y Fi(expr1)39 b Fs(-a)30
-b Fi(expr2)1110 5340 y Ft(T)-8 b(rue)30 b(if)g(b)s(oth)g
-Fq(expr1)37 b Ft(and)30 b Fq(expr2)38 b Ft(are)30 b(true.)p
-eop end
+(argumen)m(ts.)630 5340 y Fs(!)f Fi(expr)210 b Ft(T)-8
+b(rue)30 b(if)g Fq(expr)37 b Ft(is)30 b(false.)p eop
+end
%%Page: 46 52
TeXDict begin 46 51 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(46)630 299 y Fi(expr1)39
-b Fs(-o)30 b Fi(expr2)1110 408 y Ft(T)-8 b(rue)30 b(if)g(either)h
-Fq(expr1)38 b Ft(or)30 b Fq(expr2)37 b Ft(is)31 b(true.)630
-568 y(The)37 b Fs(test)f Ft(and)g Fs([)h Ft(builtins)g(ev)-5
-b(aluate)39 b(conditional)f(expressions)f(using)g(a)g(set)h(of)f(rules)
-630 677 y(based)30 b(on)g(the)h(n)m(um)m(b)s(er)e(of)h(argumen)m(ts.)
-630 837 y(0)h(argumen)m(ts)1110 946 y(The)f(expression)g(is)g(false.)
-630 1106 y(1)h(argumen)m(t)1110 1215 y(The)f(expression)g(is)g(true)h
-(if)f(and)g(only)g(if)h(the)f(argumen)m(t)h(is)f(not)h(n)m(ull.)630
-1375 y(2)g(argumen)m(ts)1110 1484 y(If)f(the)h(\014rst)f(argumen)m(t)h
-(is)g(`)p Fs(!)p Ft(',)g(the)g(expression)g(is)g(true)f(if)h(and)f
-(only)h(if)g(the)1110 1594 y(second)j(argumen)m(t)f(is)h(n)m(ull.)50
-b(If)33 b(the)h(\014rst)e(argumen)m(t)i(is)g(one)g(of)f(the)h(unary)
-1110 1704 y(conditional)42 b(op)s(erators)f(\(see)g(Section)h(6.4)f
-([Bash)g(Conditional)g(Expres-)1110 1813 y(sions],)34
-b(page)f(85\),)i(the)e(expression)f(is)h(true)g(if)g(the)g(unary)e
-(test)j(is)f(true.)47 b(If)1110 1923 y(the)33 b(\014rst)g(argumen)m(t)h
-(is)f(not)g(a)h(v)-5 b(alid)34 b(unary)e(op)s(erator,)i(the)g
-(expression)f(is)1110 2032 y(false.)630 2192 y(3)e(argumen)m(ts)1110
-2301 y(The)44 b(follo)m(wing)i(conditions)f(are)g(applied)f(in)g(the)g
-(order)g(listed.)84 b(If)44 b(the)1110 2411 y(second)f(argumen)m(t)g
-(is)g(one)g(of)g(the)g(binary)f(conditional)i(op)s(erators)f(\(see)1110
-2521 y(Section)h(6.4)g([Bash)g(Conditional)g(Expressions],)i(page)e
-(85\),)k(the)43 b(result)1110 2630 y(of)h(the)h(expression)f(is)g(the)g
+b(Shell)30 b(Builtin)h(Commands)2069 b(46)630 299 y Fs(\()30
+b Fi(expr)40 b Fs(\))122 b Ft(Returns)23 b(the)h(v)-5
+b(alue)24 b(of)g Fq(expr)7 b Ft(.)37 b(This)23 b(ma)m(y)i(b)s(e)e(used)
+g(to)h(o)m(v)m(erride)h(the)f(normal)1110 408 y(precedence)31
+b(of)f(op)s(erators.)630 568 y Fi(expr1)39 b Fs(-a)30
+b Fi(expr2)1110 677 y Ft(T)-8 b(rue)30 b(if)g(b)s(oth)g
+Fq(expr1)37 b Ft(and)30 b Fq(expr2)38 b Ft(are)30 b(true.)630
+837 y Fi(expr1)39 b Fs(-o)30 b Fi(expr2)1110 946 y Ft(T)-8
+b(rue)30 b(if)g(either)h Fq(expr1)38 b Ft(or)30 b Fq(expr2)37
+b Ft(is)31 b(true.)630 1106 y(The)37 b Fs(test)f Ft(and)g
+Fs([)h Ft(builtins)g(ev)-5 b(aluate)39 b(conditional)f(expressions)f
+(using)g(a)g(set)h(of)f(rules)630 1215 y(based)30 b(on)g(the)h(n)m(um)m
+(b)s(er)e(of)h(argumen)m(ts.)630 1375 y(0)h(argumen)m(ts)1110
+1484 y(The)f(expression)g(is)g(false.)630 1644 y(1)h(argumen)m(t)1110
+1753 y(The)f(expression)g(is)g(true)h(if)f(and)g(only)g(if)h(the)f
+(argumen)m(t)h(is)f(not)h(n)m(ull.)630 1913 y(2)g(argumen)m(ts)1110
+2022 y(If)f(the)h(\014rst)f(argumen)m(t)h(is)g(`)p Fs(!)p
+Ft(',)g(the)g(expression)g(is)g(true)f(if)h(and)f(only)h(if)g(the)1110
+2132 y(second)j(argumen)m(t)f(is)h(n)m(ull.)50 b(If)33
+b(the)h(\014rst)e(argumen)m(t)i(is)g(one)g(of)f(the)h(unary)1110
+2242 y(conditional)42 b(op)s(erators)f(\(see)g(Section)h(6.4)f([Bash)g
+(Conditional)g(Expres-)1110 2351 y(sions],)34 b(page)f(85\),)i(the)e
+(expression)f(is)h(true)g(if)g(the)g(unary)e(test)j(is)f(true.)47
+b(If)1110 2461 y(the)33 b(\014rst)g(argumen)m(t)h(is)f(not)g(a)h(v)-5
+b(alid)34 b(unary)e(op)s(erator,)i(the)g(expression)f(is)1110
+2570 y(false.)630 2730 y(3)e(argumen)m(ts)1110 2839 y(The)44
+b(follo)m(wing)i(conditions)f(are)g(applied)f(in)g(the)g(order)g
+(listed.)84 b(If)44 b(the)1110 2949 y(second)f(argumen)m(t)g(is)g(one)g
+(of)g(the)g(binary)f(conditional)i(op)s(erators)f(\(see)1110
+3059 y(Section)h(6.4)g([Bash)g(Conditional)g(Expressions],)i(page)e
+(85\),)k(the)43 b(result)1110 3168 y(of)h(the)h(expression)f(is)g(the)g
(result)g(of)h(the)f(binary)g(test)h(using)e(the)i(\014rst)1110
-2740 y(and)31 b(third)g(argumen)m(ts)i(as)f(op)s(erands.)44
+3278 y(and)31 b(third)g(argumen)m(ts)i(as)f(op)s(erands.)44
b(The)31 b(`)p Fs(-a)p Ft(')h(and)g(`)p Fs(-o)p Ft(')f(op)s(erators)i
-(are)1110 2849 y(considered)25 b(binary)g(op)s(erators)g(when)f(there)i
-(are)f(three)h(argumen)m(ts.)39 b(If)25 b(the)1110 2959
+(are)1110 3387 y(considered)25 b(binary)g(op)s(erators)g(when)f(there)i
+(are)f(three)h(argumen)m(ts.)39 b(If)25 b(the)1110 3497
y(\014rst)j(argumen)m(t)h(is)g(`)p Fs(!)p Ft(',)h(the)f(v)-5
b(alue)29 b(is)g(the)g(negation)i(of)e(the)g(t)m(w)m(o-argumen)m(t)1110
-3068 y(test)38 b(using)f(the)g(second)g(and)g(third)f(argumen)m(ts.)61
-b(If)37 b(the)g(\014rst)f(argumen)m(t)1110 3178 y(is)j(exactly)i(`)p
+3606 y(test)38 b(using)f(the)g(second)g(and)g(third)f(argumen)m(ts.)61
+b(If)37 b(the)g(\014rst)f(argumen)m(t)1110 3716 y(is)j(exactly)i(`)p
Fs(\()p Ft(')f(and)f(the)g(third)g(argumen)m(t)h(is)f(exactly)i(`)p
-Fs(\))p Ft(',)h(the)e(result)f(is)1110 3288 y(the)46
+Fs(\))p Ft(',)h(the)e(result)f(is)1110 3826 y(the)46
b(one-argumen)m(t)g(test)h(of)f(the)f(second)h(argumen)m(t.)86
-b(Otherwise,)50 b(the)1110 3397 y(expression)30 b(is)h(false.)630
-3557 y(4)g(argumen)m(ts)1110 3666 y(If)h(the)i(\014rst)e(argumen)m(t)h
+b(Otherwise,)50 b(the)1110 3935 y(expression)30 b(is)h(false.)630
+4095 y(4)g(argumen)m(ts)1110 4204 y(If)h(the)i(\014rst)e(argumen)m(t)h
(is)g(`)p Fs(!)p Ft(',)h(the)f(result)g(is)g(the)g(negation)h(of)f(the)
-g(three-)1110 3776 y(argumen)m(t)h(expression)f(comp)s(osed)h(of)f(the)
-h(remaining)g(argumen)m(ts.)50 b(Oth-)1110 3885 y(erwise,)34
+g(three-)1110 4314 y(argumen)m(t)h(expression)f(comp)s(osed)h(of)f(the)
+h(remaining)g(argumen)m(ts.)50 b(Oth-)1110 4423 y(erwise,)34
b(the)f(expression)g(is)g(parsed)g(and)f(ev)-5 b(aluated)34
-b(according)h(to)e(prece-)1110 3995 y(dence)e(using)e(the)i(rules)f
-(listed)h(ab)s(o)m(v)m(e.)630 4154 y(5)g(or)f(more)h(argumen)m(ts)1110
-4264 y(The)43 b(expression)f(is)i(parsed)e(and)g(ev)-5
-b(aluated)45 b(according)f(to)f(precedence)1110 4374
+b(according)h(to)e(prece-)1110 4533 y(dence)e(using)e(the)i(rules)f
+(listed)h(ab)s(o)m(v)m(e.)630 4692 y(5)g(or)f(more)h(argumen)m(ts)1110
+4802 y(The)43 b(expression)f(is)i(parsed)e(and)g(ev)-5
+b(aluated)45 b(according)f(to)f(precedence)1110 4912
y(using)30 b(the)g(rules)g(listed)h(ab)s(o)m(v)m(e.)630
-4533 y(When)40 b(used)f(with)g Fs(test)g Ft(or)h(`)p
+5071 y(When)40 b(used)f(with)g Fs(test)g Ft(or)h(`)p
Fs([)p Ft(',)j(the)d(`)p Fs(<)p Ft(')g(and)f(`)p Fs(>)p
-Ft(')h(op)s(erators)g(sort)g(lexicographically)630 4643
-y(using)30 b(ASCI)s(I)f(ordering.)150 4802 y Fs(times)870
-4936 y(times)630 5071 y Ft(Prin)m(t)37 b(out)h(the)g(user)e(and)h
-(system)g(times)h(used)f(b)m(y)g(the)h(shell)f(and)g(its)h(c)m
-(hildren.)61 b(The)630 5181 y(return)29 b(status)i(is)f(zero.)150
-5340 y Fs(trap)p eop end
+Ft(')h(op)s(erators)g(sort)g(lexicographically)630 5181
+y(using)30 b(ASCI)s(I)f(ordering.)150 5340 y Fs(times)p
+eop end
%%Page: 47 53
TeXDict begin 47 52 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(47)870 299 y Fs(trap)47
-b([-lp])f([)p Fi(arg)11 b Fs(])46 b([)p Fi(sigspec)56
-b Fs(...)o(])630 457 y Ft(The)43 b(commands)f(in)h Fq(arg)51
-b Ft(are)44 b(to)g(b)s(e)e(read)h(and)g(executed)h(when)e(the)h(shell)g
-(receiv)m(es)630 567 y(signal)36 b Fq(sigsp)s(ec)6 b
-Ft(.)55 b(If)35 b Fq(arg)44 b Ft(is)35 b(absen)m(t)h(\(and)f(there)g
+b(Shell)30 b(Builtin)h(Commands)2069 b(47)870 299 y Fs(times)630
+434 y Ft(Prin)m(t)37 b(out)h(the)g(user)e(and)h(system)g(times)h(used)f
+(b)m(y)g(the)h(shell)f(and)g(its)h(c)m(hildren.)61 b(The)630
+543 y(return)29 b(status)i(is)f(zero.)150 704 y Fs(trap)870
+838 y(trap)47 b([-lp])f([)p Fi(arg)11 b Fs(])46 b([)p
+Fi(sigspec)56 b Fs(...)o(])630 973 y Ft(The)43 b(commands)f(in)h
+Fq(arg)51 b Ft(are)44 b(to)g(b)s(e)e(read)h(and)g(executed)h(when)e
+(the)h(shell)g(receiv)m(es)630 1083 y(signal)36 b Fq(sigsp)s(ec)6
+b Ft(.)55 b(If)35 b Fq(arg)44 b Ft(is)35 b(absen)m(t)h(\(and)f(there)g
(is)g(a)h(single)g Fq(sigsp)s(ec)6 b Ft(\))35 b(or)h(equal)f(to)i(`)p
-Fs(-)p Ft(',)630 676 y(eac)m(h)28 b(sp)s(eci\014ed)e(signal's)h(disp)s
+Fs(-)p Ft(',)630 1192 y(eac)m(h)28 b(sp)s(eci\014ed)e(signal's)h(disp)s
(osition)f(is)h(reset)g(to)g(the)g(v)-5 b(alue)27 b(it)g(had)f(when)f
-(the)i(shell)g(w)m(as)630 786 y(started.)63 b(If)37 b
-Fq(arg)46 b Ft(is)37 b(the)h(n)m(ull)g(string,)h(then)e(the)h(signal)h
-(sp)s(eci\014ed)d(b)m(y)i(eac)m(h)h Fq(sigsp)s(ec)k Ft(is)630
-896 y(ignored)36 b(b)m(y)g(the)g(shell)g(and)g(commands)f(it)i(in)m(v)m
-(ok)m(es.)59 b(If)35 b Fq(arg)45 b Ft(is)36 b(not)g(presen)m(t)g(and)f
-(`)p Fs(-p)p Ft(')630 1005 y(has)e(b)s(een)g(supplied,)f(the)i(shell)f
-(displa)m(ys)h(the)f(trap)g(commands)g(asso)s(ciated)i(with)e(eac)m(h)
-630 1115 y Fq(sigsp)s(ec)6 b Ft(.)40 b(If)28 b(no)g(argumen)m(ts)h(are)
-g(supplied,)f(or)g(only)h(`)p Fs(-p)p Ft(')f(is)g(giv)m(en,)i
-Fs(trap)e Ft(prin)m(ts)g(the)g(list)630 1224 y(of)g(commands)f(asso)s
+(the)i(shell)g(w)m(as)630 1302 y(started.)63 b(If)37
+b Fq(arg)46 b Ft(is)37 b(the)h(n)m(ull)g(string,)h(then)e(the)h(signal)
+h(sp)s(eci\014ed)d(b)m(y)i(eac)m(h)h Fq(sigsp)s(ec)k
+Ft(is)630 1412 y(ignored)36 b(b)m(y)g(the)g(shell)g(and)g(commands)f
+(it)i(in)m(v)m(ok)m(es.)59 b(If)35 b Fq(arg)45 b Ft(is)36
+b(not)g(presen)m(t)g(and)f(`)p Fs(-p)p Ft(')630 1521
+y(has)e(b)s(een)g(supplied,)f(the)i(shell)f(displa)m(ys)h(the)f(trap)g
+(commands)g(asso)s(ciated)i(with)e(eac)m(h)630 1631 y
+Fq(sigsp)s(ec)6 b Ft(.)40 b(If)28 b(no)g(argumen)m(ts)h(are)g
+(supplied,)f(or)g(only)h(`)p Fs(-p)p Ft(')f(is)g(giv)m(en,)i
+Fs(trap)e Ft(prin)m(ts)g(the)g(list)630 1740 y(of)g(commands)f(asso)s
(ciated)i(with)f(eac)m(h)h(signal)f(n)m(um)m(b)s(er)e(in)i(a)g(form)f
-(that)h(ma)m(y)h(b)s(e)e(reused)630 1334 y(as)34 b(shell)g(input.)51
+(that)h(ma)m(y)h(b)s(e)e(reused)630 1850 y(as)34 b(shell)g(input.)51
b(The)33 b(`)p Fs(-l)p Ft(')h(option)g(causes)h(the)f(shell)g(to)h
-(prin)m(t)e(a)i(list)f(of)g(signal)h(names)630 1443 y(and)j(their)h
+(prin)m(t)e(a)i(list)f(of)g(signal)h(names)630 1960 y(and)j(their)h
(corresp)s(onding)f(n)m(um)m(b)s(ers.)65 b(Eac)m(h)39
b Fq(sigsp)s(ec)45 b Ft(is)39 b(either)g(a)g(signal)h(name)f(or)g(a)630
-1553 y(signal)27 b(n)m(um)m(b)s(er.)39 b(Signal)27 b(names)f(are)h
+2069 y(signal)27 b(n)m(um)m(b)s(er.)39 b(Signal)27 b(names)f(are)h
(case)h(insensitiv)m(e)g(and)e(the)g Fs(SIG)g Ft(pre\014x)g(is)h
-(optional.)630 1711 y(If)35 b(a)g Fq(sigsp)s(ec)41 b
+(optional.)630 2204 y(If)35 b(a)g Fq(sigsp)s(ec)41 b
Ft(is)35 b Fs(0)g Ft(or)g Fs(EXIT)p Ft(,)g Fq(arg)43
b Ft(is)35 b(executed)h(when)e(the)h(shell)h(exits.)55
-b(If)35 b(a)g Fq(sigsp)s(ec)41 b Ft(is)630 1821 y Fs(DEBUG)p
+b(If)35 b(a)g Fq(sigsp)s(ec)41 b Ft(is)630 2314 y Fs(DEBUG)p
Ft(,)32 b(the)g(command)g Fq(arg)40 b Ft(is)33 b(executed)g(b)s(efore)f
(ev)m(ery)h(simple)f(command,)h Fs(for)e Ft(com-)630
-1931 y(mand,)d Fs(case)g Ft(command,)h Fs(select)e Ft(command,)i(ev)m
-(ery)h(arithmetic)g Fs(for)d Ft(command,)j(and)630 2040
+2423 y(mand,)d Fs(case)g Ft(command,)h Fs(select)e Ft(command,)i(ev)m
+(ery)h(arithmetic)g Fs(for)d Ft(command,)j(and)630 2533
y(b)s(efore)22 b(the)g(\014rst)f(command)h(executes)i(in)e(a)g(shell)h
(function.)37 b(Refer)22 b(to)h(the)g(description)f(of)630
-2150 y(the)i Fs(extdebug)d Ft(option)j(to)h(the)f Fs(shopt)e
+2642 y(the)i Fs(extdebug)d Ft(option)j(to)h(the)f Fs(shopt)e
Ft(builtin)h(\(see)i(Section)f(4.3.2)i([The)d(Shopt)g(Builtin],)630
-2259 y(page)33 b(62\))g(for)f(details)h(of)f(its)h(e\013ect)g(on)f(the)
+2752 y(page)33 b(63\))g(for)f(details)h(of)f(its)h(e\013ect)g(on)f(the)
g Fs(DEBUG)f Ft(trap.)46 b(If)31 b(a)i Fq(sigsp)s(ec)38
-b Ft(is)32 b Fs(RETURN)p Ft(,)f(the)630 2369 y(command)h
+b Ft(is)32 b Fs(RETURN)p Ft(,)f(the)630 2862 y(command)h
Fq(arg)41 b Ft(is)33 b(executed)g(eac)m(h)h(time)f(a)g(shell)g
-(function)g(or)f(a)h(script)g(executed)g(with)630 2478
+(function)g(or)f(a)h(script)g(executed)g(with)630 2971
y(the)e Fs(.)f Ft(or)g Fs(source)f Ft(builtins)g(\014nishes)h
-(executing.)630 2637 y(If)20 b(a)i Fq(sigsp)s(ec)27 b
+(executing.)630 3106 y(If)20 b(a)i Fq(sigsp)s(ec)27 b
Ft(is)21 b Fs(ERR)p Ft(,)h(the)f(command)g Fq(arg)29
b Ft(is)21 b(executed)h(whenev)m(er)e(a)i(pip)s(eline)e(\(whic)m(h)h
-(ma)m(y)630 2746 y(consist)35 b(of)g(a)f(single)h(simple)g(command\),)h
+(ma)m(y)630 3216 y(consist)35 b(of)g(a)f(single)h(simple)g(command\),)h
(a)e(list,)j(or)d(a)h(comp)s(ound)e(command)h(returns)630
-2856 y(a)41 b(non-zero)g(exit)h(status,)h(sub)5 b(ject)41
+3325 y(a)41 b(non-zero)g(exit)h(status,)h(sub)5 b(ject)41
b(to)g(the)g(follo)m(wing)h(conditions.)72 b(The)40 b
-Fs(ERR)f Ft(trap)i(is)630 2966 y(not)c(executed)h(if)f(the)h(failed)f
+Fs(ERR)f Ft(trap)i(is)630 3435 y(not)c(executed)h(if)f(the)h(failed)f
(command)g(is)g(part)g(of)h(the)f(command)g(list)h(immediately)630
-3075 y(follo)m(wing)30 b(an)e Fs(until)f Ft(or)i Fs(while)e
+3544 y(follo)m(wing)30 b(an)e Fs(until)f Ft(or)i Fs(while)e
Ft(k)m(eyw)m(ord,)i(part)g(of)f(the)h(test)g(follo)m(wing)h(the)f
-Fs(if)f Ft(or)g Fs(elif)630 3185 y Ft(reserv)m(ed)45
+Fs(if)f Ft(or)g Fs(elif)630 3654 y Ft(reserv)m(ed)45
b(w)m(ords,)j(part)c(of)h(a)g(command)g(executed)g(in)g(a)g
-Fs(&&)f Ft(or)h Fs(||)f Ft(list)h(except)h(the)630 3294
+Fs(&&)f Ft(or)h Fs(||)f Ft(list)h(except)h(the)630 3764
y(command)28 b(follo)m(wing)j(the)d(\014nal)h Fs(&&)f
Ft(or)g Fs(||)p Ft(,)h(an)m(y)g(command)f(in)h(a)g(pip)s(eline)f(but)g
-(the)h(last,)630 3404 y(or)d(if)g(the)f(command's)h(return)f(status)h
+(the)h(last,)630 3873 y(or)d(if)g(the)f(command's)h(return)f(status)h
(is)g(b)s(eing)f(in)m(v)m(erted)i(using)e Fs(!)p Ft(.)39
-b(These)25 b(are)i(the)f(same)630 3513 y(conditions)31
+b(These)25 b(are)i(the)f(same)630 3983 y(conditions)31
b(ob)s(ey)m(ed)f(b)m(y)h(the)f Fs(errexit)f Ft(\(`)p
-Fs(-e)p Ft('\))i(option.)630 3672 y(Signals)37 b(ignored)f(up)s(on)f
+Fs(-e)p Ft('\))i(option.)630 4118 y(Signals)37 b(ignored)f(up)s(on)f
(en)m(try)i(to)g(the)f(shell)h(cannot)g(b)s(e)f(trapp)s(ed)f(or)h
-(reset.)59 b(T)-8 b(rapp)s(ed)630 3781 y(signals)28 b(that)f(are)h(not)
+(reset.)59 b(T)-8 b(rapp)s(ed)630 4227 y(signals)28 b(that)f(are)h(not)
f(b)s(eing)g(ignored)g(are)g(reset)h(to)g(their)f(original)h(v)-5
-b(alues)28 b(in)e(a)i(subshell)630 3891 y(or)i(subshell)g(en)m
-(vironmen)m(t)h(when)e(one)i(is)f(created.)630 4049 y(The)g(return)f
+b(alues)28 b(in)e(a)i(subshell)630 4337 y(or)i(subshell)g(en)m
+(vironmen)m(t)h(when)e(one)i(is)f(created.)630 4472 y(The)g(return)f
(status)i(is)f(zero)h(unless)f(a)h Fq(sigsp)s(ec)36 b
Ft(do)s(es)30 b(not)h(sp)s(ecify)f(a)g(v)-5 b(alid)31
-b(signal.)150 4256 y Fs(umask)870 4415 y(umask)46 b([-p])h([-S])g([)p
-Fi(mode)11 b Fs(])630 4573 y Ft(Set)29 b(the)h(shell)f(pro)s(cess's)g
+b(signal.)150 4632 y Fs(umask)870 4767 y(umask)46 b([-p])h([-S])g([)p
+Fi(mode)11 b Fs(])630 4902 y Ft(Set)29 b(the)h(shell)f(pro)s(cess's)g
(\014le)g(creation)h(mask)f(to)h Fq(mo)s(de)5 b Ft(.)40
b(If)28 b Fq(mo)s(de)34 b Ft(b)s(egins)29 b(with)f(a)i(digit,)630
-4682 y(it)e(is)f(in)m(terpreted)g(as)g(an)g(o)s(ctal)i(n)m(um)m(b)s
+5011 y(it)e(is)f(in)m(terpreted)g(as)g(an)g(o)s(ctal)i(n)m(um)m(b)s
(er;)e(if)g(not,)h(it)g(is)f(in)m(terpreted)g(as)g(a)h(sym)m(b)s(olic)f
-(mo)s(de)630 4792 y(mask)i(similar)g(to)g(that)h(accepted)g(b)m(y)f
+(mo)s(de)630 5121 y(mask)i(similar)g(to)g(that)h(accepted)g(b)m(y)f
(the)g Fs(chmod)e Ft(command.)40 b(If)28 b Fq(mo)s(de)34
-b Ft(is)28 b(omitted,)j(the)630 4902 y(curren)m(t)36
+b Ft(is)28 b(omitted,)j(the)630 5230 y(curren)m(t)36
b(v)-5 b(alue)36 b(of)g(the)h(mask)f(is)g(prin)m(ted.)57
b(If)35 b(the)h(`)p Fs(-S)p Ft(')g(option)h(is)f(supplied)f(without)h
-(a)630 5011 y Fq(mo)s(de)k Ft(argumen)m(t,)d(the)e(mask)g(is)g(prin)m
+(a)630 5340 y Fq(mo)s(de)k Ft(argumen)m(t,)d(the)e(mask)g(is)g(prin)m
(ted)g(in)g(a)h(sym)m(b)s(olic)f(format.)55 b(If)35 b(the)g(`)p
-Fs(-p)p Ft(')g(option)630 5121 y(is)f(supplied,)f(and)g
-Fq(mo)s(de)38 b Ft(is)33 b(omitted,)j(the)e(output)f(is)g(in)h(a)g
-(form)f(that)h(ma)m(y)g(b)s(e)f(reused)630 5230 y(as)e(input.)41
-b(The)31 b(return)f(status)h(is)g(zero)h(if)e(the)h(mo)s(de)g(is)g
-(successfully)g(c)m(hanged)g(or)g(if)g(no)630 5340 y
-Fq(mo)s(de)k Ft(argumen)m(t)c(is)f(supplied,)g(and)f(non-zero)i
-(otherwise.)p eop end
+Fs(-p)p Ft(')g(option)p eop end
%%Page: 48 54
TeXDict begin 48 53 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(48)630 299 y(Note)38
-b(that)e(when)g(the)g(mo)s(de)g(is)g(in)m(terpreted)h(as)f(an)g(o)s
-(ctal)i(n)m(um)m(b)s(er,)e(eac)m(h)i(n)m(um)m(b)s(er)d(of)630
-408 y(the)f(umask)g(is)h(subtracted)f(from)f Fs(7)p Ft(.)53
-b(Th)m(us,)34 b(a)h(umask)e(of)i Fs(022)e Ft(results)h(in)g(p)s
-(ermissions)630 518 y(of)d Fs(755)p Ft(.)150 678 y Fs(unset)870
-812 y(unset)46 b([-fnv])g([)p Fi(name)11 b Fs(])630 947
-y Ft(Remo)m(v)m(e)32 b(eac)m(h)g(v)-5 b(ariable)32 b(or)e(function)h
-Fq(name)5 b Ft(.)42 b(If)30 b(the)h(`)p Fs(-v)p Ft(')f(option)h(is)g
-(giv)m(en,)h(eac)m(h)g Fq(name)630 1056 y Ft(refers)20
-b(to)i(a)f(shell)g(v)-5 b(ariable)21 b(and)g(that)g(v)-5
-b(ariable)22 b(is)e(rem)m(v)m(o)m(v)m(ed.)40 b(If)20
-b(the)h(`)p Fs(-f)p Ft(')g(option)g(is)g(giv)m(en,)630
-1166 y(the)37 b Fq(name)5 b Ft(s)37 b(refer)f(to)i(shell)f(functions,)h
+b(Shell)30 b(Builtin)h(Commands)2069 b(48)630 299 y(is)34
+b(supplied,)f(and)g Fq(mo)s(de)38 b Ft(is)33 b(omitted,)j(the)e(output)
+f(is)g(in)h(a)g(form)f(that)h(ma)m(y)g(b)s(e)f(reused)630
+408 y(as)e(input.)41 b(The)31 b(return)f(status)h(is)g(zero)h(if)e(the)
+h(mo)s(de)g(is)g(successfully)g(c)m(hanged)g(or)g(if)g(no)630
+518 y Fq(mo)s(de)k Ft(argumen)m(t)c(is)f(supplied,)g(and)f(non-zero)i
+(otherwise.)630 660 y(Note)38 b(that)e(when)g(the)g(mo)s(de)g(is)g(in)m
+(terpreted)h(as)f(an)g(o)s(ctal)i(n)m(um)m(b)s(er,)e(eac)m(h)i(n)m(um)m
+(b)s(er)d(of)630 770 y(the)f(umask)g(is)h(subtracted)f(from)f
+Fs(7)p Ft(.)53 b(Th)m(us,)34 b(a)h(umask)e(of)i Fs(022)e
+Ft(results)h(in)g(p)s(ermissions)630 879 y(of)d Fs(755)p
+Ft(.)150 1054 y Fs(unset)870 1196 y(unset)46 b([-fnv])g([)p
+Fi(name)11 b Fs(])630 1338 y Ft(Remo)m(v)m(e)32 b(eac)m(h)g(v)-5
+b(ariable)32 b(or)e(function)h Fq(name)5 b Ft(.)42 b(If)30
+b(the)h(`)p Fs(-v)p Ft(')f(option)h(is)g(giv)m(en,)h(eac)m(h)g
+Fq(name)630 1448 y Ft(refers)20 b(to)i(a)f(shell)g(v)-5
+b(ariable)21 b(and)g(that)g(v)-5 b(ariable)22 b(is)e(rem)m(v)m(o)m(v)m
+(ed.)40 b(If)20 b(the)h(`)p Fs(-f)p Ft(')g(option)g(is)g(giv)m(en,)630
+1557 y(the)37 b Fq(name)5 b Ft(s)37 b(refer)f(to)i(shell)f(functions,)h
(and)e(the)h(function)g(de\014nition)f(is)h(remo)m(v)m(ed.)61
-b(If)630 1276 y(the)30 b(`)p Fs(-n)p Ft(')f(option)h(is)g(supplied,)e
+b(If)630 1667 y(the)30 b(`)p Fs(-n)p Ft(')f(option)h(is)g(supplied,)e
(and)h Fq(name)35 b Ft(is)30 b(a)g(v)-5 b(ariable)30
-b(with)f(the)h Fq(nameref)47 b Ft(attribute,)630 1385
+b(with)f(the)h Fq(nameref)47 b Ft(attribute,)630 1776
y Fq(name)39 b Ft(will)33 b(b)s(e)g(unset)g(rather)h(than)f(the)g(v)-5
b(ariable)35 b(it)f(references.)50 b(`)p Fs(-n)p Ft(')33
-b(has)h(no)f(e\013ect)i(if)630 1495 y(the)h(`)p Fs(-f)p
+b(has)h(no)f(e\013ect)i(if)630 1886 y(the)h(`)p Fs(-f)p
Ft(')g(option)h(is)f(supplied.)56 b(If)36 b(no)g(options)g(are)g
(supplied,)h(eac)m(h)g Fq(name)k Ft(refers)36 b(to)h(a)630
-1604 y(v)-5 b(ariable;)37 b(if)d(there)g(is)g(no)g(v)-5
+1995 y(v)-5 b(ariable;)37 b(if)d(there)g(is)g(no)g(v)-5
b(ariable)34 b(b)m(y)g(that)h(name,)g(an)m(y)f(function)g(with)f(that)i
-(name)f(is)630 1714 y(unset.)46 b(Readonly)33 b(v)-5
+(name)f(is)630 2105 y(unset.)46 b(Readonly)33 b(v)-5
b(ariables)33 b(and)e(functions)h(ma)m(y)h(not)g(b)s(e)e(unset.)47
-b(The)31 b(return)h(status)630 1824 y(is)e(zero)i(unless)d(a)i
-Fq(name)36 b Ft(is)30 b(readonly)-8 b(.)150 2056 y Fr(4.2)68
-b(Bash)45 b(Builtin)g(Commands)150 2216 y Ft(This)c(section)h(describ)s
+b(The)31 b(return)h(status)630 2215 y(is)e(zero)i(unless)d(a)i
+Fq(name)36 b Ft(is)30 b(readonly)-8 b(.)150 2470 y Fr(4.2)68
+b(Bash)45 b(Builtin)g(Commands)150 2629 y Ft(This)c(section)h(describ)s
(es)f(builtin)f(commands)h(whic)m(h)g(are)h(unique)e(to)j(or)e(ha)m(v)m
-(e)h(b)s(een)f(extended)g(in)150 2325 y(Bash.)g(Some)30
+(e)h(b)s(een)f(extended)g(in)150 2739 y(Bash.)g(Some)30
b(of)h(these)g(commands)f(are)g(sp)s(eci\014ed)g(in)g(the)h
-Fl(posix)e Ft(standard.)150 2485 y Fs(alias)870 2619
+Fl(posix)e Ft(standard.)150 2921 y Fs(alias)870 3063
y(alias)46 b([-p])h([)p Fi(name)11 b Fs([=)p Fi(value)g
-Fs(])43 b(...)o(])630 2754 y Ft(Without)h(argumen)m(ts)f(or)g(with)g
+Fs(])43 b(...)o(])630 3205 y Ft(Without)h(argumen)m(ts)f(or)g(with)g
(the)h(`)p Fs(-p)p Ft(')f(option,)k Fs(alias)41 b Ft(prin)m(ts)i(the)g
-(list)h(of)f(aliases)630 2864 y(on)36 b(the)g(standard)f(output)h(in)f
+(list)h(of)f(aliases)630 3315 y(on)36 b(the)g(standard)f(output)h(in)f
(a)i(form)e(that)i(allo)m(ws)g(them)f(to)g(b)s(e)g(reused)f(as)h
-(input.)56 b(If)630 2973 y(argumen)m(ts)29 b(are)g(supplied,)f(an)h
+(input.)56 b(If)630 3424 y(argumen)m(ts)29 b(are)g(supplied,)f(an)h
(alias)h(is)f(de\014ned)e(for)i(eac)m(h)h Fq(name)k Ft(whose)28
-b Fq(v)-5 b(alue)35 b Ft(is)29 b(giv)m(en.)630 3083 y(If)39
+b Fq(v)-5 b(alue)35 b Ft(is)29 b(giv)m(en.)630 3534 y(If)39
b(no)h Fq(v)-5 b(alue)45 b Ft(is)40 b(giv)m(en,)j(the)d(name)f(and)g(v)
-5 b(alue)40 b(of)g(the)g(alias)h(is)f(prin)m(ted.)68
-b(Aliases)41 b(are)630 3192 y(describ)s(ed)29 b(in)h(Section)i(6.6)f
-([Aliases],)h(page)f(88.)150 3352 y Fs(bind)870 3487
+b(Aliases)41 b(are)630 3643 y(describ)s(ed)29 b(in)h(Section)i(6.6)f
+([Aliases],)h(page)f(88.)150 3818 y Fs(bind)870 3960
y(bind)47 b([-m)g Fi(keymap)11 b Fs(])45 b([-lpsvPSVX])870
-3596 y(bind)i([-m)g Fi(keymap)11 b Fs(])45 b([-q)i Fi(function)11
+4070 y(bind)i([-m)g Fi(keymap)11 b Fs(])45 b([-q)i Fi(function)11
b Fs(])45 b([-u)h Fi(function)11 b Fs(])45 b([-r)i Fi(keyseq)11
-b Fs(])870 3706 y(bind)47 b([-m)g Fi(keymap)11 b Fs(])45
-b(-f)i Fi(filename)870 3815 y Fs(bind)g([-m)g Fi(keymap)11
-b Fs(])45 b(-x)i Fi(keyseq:shell-command)870 3925 y Fs(bind)g([-m)g
+b Fs(])870 4179 y(bind)47 b([-m)g Fi(keymap)11 b Fs(])45
+b(-f)i Fi(filename)870 4289 y Fs(bind)g([-m)g Fi(keymap)11
+b Fs(])45 b(-x)i Fi(keyseq:shell-command)870 4398 y Fs(bind)g([-m)g
Fi(keymap)11 b Fs(])45 b Fi(keyseq:function-name)870
-4035 y Fs(bind)i Fi(readline-command)630 4169 y Ft(Displa)m(y)22
+4508 y Fs(bind)i Fi(readline-command)630 4650 y Ft(Displa)m(y)22
b(curren)m(t)f(Readline)h(\(see)f(Chapter)g(8)g([Command)f(Line)h
-(Editing],)j(page)e(102\))g(k)m(ey)630 4279 y(and)36
+(Editing],)j(page)e(102\))g(k)m(ey)630 4760 y(and)36
b(function)g(bindings,)i(bind)d(a)i(k)m(ey)g(sequence)g(to)h(a)f
-(Readline)g(function)f(or)h(macro,)630 4388 y(or)44 b(set)h(a)g
+(Readline)g(function)f(or)h(macro,)630 4869 y(or)44 b(set)h(a)g
(Readline)f(v)-5 b(ariable.)83 b(Eac)m(h)45 b(non-option)g(argumen)m(t)
-f(is)g(a)h(command)f(as)g(it)630 4498 y(w)m(ould)e(app)s(ear)f(in)h(a)h
+f(is)g(a)h(command)f(as)g(it)630 4979 y(w)m(ould)e(app)s(ear)f(in)h(a)h
(Readline)g(initialization)i(\014le)d(\(see)h(Section)g(8.3)g
-([Readline)g(Init)630 4607 y(File],)c(page)d(105\),)j(but)c(eac)m(h)h
+([Readline)g(Init)630 5088 y(File],)c(page)d(105\),)j(but)c(eac)m(h)h
(binding)f(or)g(command)h(m)m(ust)f(b)s(e)g(passed)g(as)h(a)g(separate)
-630 4717 y(argumen)m(t;)31 b(e.g.,)h(`)p Fs
-("\\C-x\\C-r":re-read-init-f)o(ile)p Ft('.)630 4852 y(Options,)e(if)h
-(supplied,)e(ha)m(v)m(e)i(the)g(follo)m(wing)h(meanings:)630
-5011 y Fs(-m)e Fi(keymap)1110 5121 y Ft(Use)54 b Fq(k)m(eymap)j
-Ft(as)d(the)g(k)m(eymap)g(to)h(b)s(e)e(a\013ected)i(b)m(y)f(the)g
-(subsequen)m(t)1110 5230 y(bindings.)46 b(Acceptable)34
-b Fq(k)m(eymap)i Ft(names)c(are)h Fs(emacs)p Ft(,)f Fs(emacs-standard)p
-Ft(,)1110 5340 y Fs(emacs-meta)p Ft(,)99 b Fs(emacs-ctlx)p
-Ft(,)f Fs(vi)p Ft(,)j Fs(vi-move)p Ft(,)f Fs(vi-command)p
-Ft(,)f(and)p eop end
+630 5198 y(argumen)m(t;)31 b(e.g.,)h(`)p Fs
+("\\C-x\\C-r":re-read-init-f)o(ile)p Ft('.)630 5340 y(Options,)e(if)h
+(supplied,)e(ha)m(v)m(e)i(the)g(follo)m(wing)h(meanings:)p
+eop end
%%Page: 49 55
TeXDict begin 49 54 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(49)1110 299 y
-Fs(vi-insert)p Ft(.)64 b Fs(vi)38 b Ft(is)h(equiv)-5
+b(Shell)30 b(Builtin)h(Commands)2069 b(49)630 299 y Fs(-m)30
+b Fi(keymap)1110 408 y Ft(Use)54 b Fq(k)m(eymap)j Ft(as)d(the)g(k)m
+(eymap)g(to)h(b)s(e)e(a\013ected)i(b)m(y)f(the)g(subsequen)m(t)1110
+518 y(bindings.)46 b(Acceptable)34 b Fq(k)m(eymap)i Ft(names)c(are)h
+Fs(emacs)p Ft(,)f Fs(emacs-standard)p Ft(,)1110 628 y
+Fs(emacs-meta)p Ft(,)99 b Fs(emacs-ctlx)p Ft(,)f Fs(vi)p
+Ft(,)j Fs(vi-move)p Ft(,)f Fs(vi-command)p Ft(,)f(and)1110
+737 y Fs(vi-insert)p Ft(.)64 b Fs(vi)38 b Ft(is)h(equiv)-5
b(alen)m(t)41 b(to)e Fs(vi-command)p Ft(;)i Fs(emacs)c
-Ft(is)i(equiv)-5 b(alen)m(t)1110 408 y(to)31 b Fs(emacs-standard)p
-Ft(.)630 563 y Fs(-l)384 b Ft(List)31 b(the)f(names)g(of)h(all)g
-(Readline)g(functions.)630 718 y Fs(-p)384 b Ft(Displa)m(y)34
+Ft(is)i(equiv)-5 b(alen)m(t)1110 847 y(to)31 b Fs(emacs-standard)p
+Ft(.)630 1013 y Fs(-l)384 b Ft(List)31 b(the)f(names)g(of)h(all)g
+(Readline)g(functions.)630 1179 y Fs(-p)384 b Ft(Displa)m(y)34
b(Readline)f(function)g(names)g(and)f(bindings)f(in)i(suc)m(h)f(a)i(w)m
-(a)m(y)f(that)1110 827 y(they)e(can)f(b)s(e)g(used)g(as)g(input)g(or)g
-(in)g(a)h(Readline)g(initialization)i(\014le.)630 982
+(a)m(y)f(that)1110 1289 y(they)e(can)f(b)s(e)g(used)g(as)g(input)g(or)g
+(in)g(a)h(Readline)g(initialization)i(\014le.)630 1455
y Fs(-P)384 b Ft(List)31 b(curren)m(t)f(Readline)h(function)f(names)g
-(and)g(bindings.)630 1137 y Fs(-v)384 b Ft(Displa)m(y)25
+(and)g(bindings.)630 1621 y Fs(-v)384 b Ft(Displa)m(y)25
b(Readline)f(v)-5 b(ariable)25 b(names)f(and)f(v)-5 b(alues)24
-b(in)g(suc)m(h)f(a)i(w)m(a)m(y)f(that)h(they)1110 1247
+b(in)g(suc)m(h)f(a)i(w)m(a)m(y)f(that)h(they)1110 1731
y(can)31 b(b)s(e)e(used)h(as)h(input)e(or)h(in)g(a)h(Readline)g
-(initialization)j(\014le.)630 1401 y Fs(-V)384 b Ft(List)31
+(initialization)j(\014le.)630 1897 y Fs(-V)384 b Ft(List)31
b(curren)m(t)f(Readline)h(v)-5 b(ariable)31 b(names)f(and)g(v)-5
-b(alues.)630 1556 y Fs(-s)384 b Ft(Displa)m(y)39 b(Readline)f(k)m(ey)g
+b(alues.)630 2063 y Fs(-s)384 b Ft(Displa)m(y)39 b(Readline)f(k)m(ey)g
(sequences)f(b)s(ound)f(to)i(macros)g(and)f(the)g(strings)1110
-1666 y(they)d(output)f(in)h(suc)m(h)f(a)h(w)m(a)m(y)h(that)f(they)g
-(can)g(b)s(e)f(used)g(as)h(input)e(or)i(in)g(a)1110 1775
-y(Readline)d(initialization)i(\014le.)630 1930 y Fs(-S)384
+2172 y(they)d(output)f(in)h(suc)m(h)f(a)h(w)m(a)m(y)h(that)f(they)g
+(can)g(b)s(e)f(used)g(as)h(input)e(or)i(in)g(a)1110 2282
+y(Readline)d(initialization)i(\014le.)630 2448 y Fs(-S)384
b Ft(Displa)m(y)39 b(Readline)f(k)m(ey)g(sequences)f(b)s(ound)f(to)i
-(macros)g(and)f(the)g(strings)1110 2039 y(they)31 b(output.)630
-2194 y Fs(-f)f Fi(filename)1110 2304 y Ft(Read)h(k)m(ey)g(bindings)e
-(from)h Fq(\014lename)5 b Ft(.)630 2458 y Fs(-q)30 b
-Fi(function)1110 2568 y Ft(Query)g(ab)s(out)g(whic)m(h)g(k)m(eys)h(in)m
-(v)m(ok)m(e)h(the)f(named)f Fq(function)p Ft(.)630 2723
-y Fs(-u)g Fi(function)1110 2832 y Ft(Un)m(bind)f(all)i(k)m(eys)g(b)s
-(ound)e(to)i(the)f(named)g Fq(function)p Ft(.)630 2987
-y Fs(-r)g Fi(keyseq)1110 3097 y Ft(Remo)m(v)m(e)i(an)m(y)f(curren)m(t)f
-(binding)f(for)h Fq(k)m(eyseq)r Ft(.)630 3251 y Fs(-x)g
-Fi(keyseq:shell-command)1110 3361 y Ft(Cause)35 b Fq(shell-command)k
+(macros)g(and)f(the)g(strings)1110 2558 y(they)31 b(output.)630
+2724 y Fs(-f)f Fi(filename)1110 2834 y Ft(Read)h(k)m(ey)g(bindings)e
+(from)h Fq(\014lename)5 b Ft(.)630 3000 y Fs(-q)30 b
+Fi(function)1110 3109 y Ft(Query)g(ab)s(out)g(whic)m(h)g(k)m(eys)h(in)m
+(v)m(ok)m(e)h(the)f(named)f Fq(function)p Ft(.)630 3275
+y Fs(-u)g Fi(function)1110 3385 y Ft(Un)m(bind)f(all)i(k)m(eys)g(b)s
+(ound)e(to)i(the)f(named)g Fq(function)p Ft(.)630 3551
+y Fs(-r)g Fi(keyseq)1110 3661 y Ft(Remo)m(v)m(e)i(an)m(y)f(curren)m(t)f
+(binding)f(for)h Fq(k)m(eyseq)r Ft(.)630 3827 y Fs(-x)g
+Fi(keyseq:shell-command)1110 3937 y Ft(Cause)35 b Fq(shell-command)k
Ft(to)d(b)s(e)f(executed)h(whenev)m(er)f Fq(k)m(eyseq)j
-Ft(is)d(en)m(tered.)1110 3471 y(When)46 b Fq(shell-command)k
+Ft(is)d(en)m(tered.)1110 4046 y(When)46 b Fq(shell-command)k
Ft(is)c(executed,)51 b(the)46 b(shell)g(sets)g(the)g
-Fs(READLINE_)1110 3580 y(LINE)37 b Ft(v)-5 b(ariable)38
+Fs(READLINE_)1110 4156 y(LINE)37 b Ft(v)-5 b(ariable)38
b(to)g(the)g(con)m(ten)m(ts)i(of)e(the)g(Readline)g(line)g(bu\013er)f
-(and)g(the)1110 3690 y Fs(READLINE_POINT)e Ft(v)-5 b(ariable)39
+(and)g(the)1110 4265 y Fs(READLINE_POINT)e Ft(v)-5 b(ariable)39
b(to)h(the)e(curren)m(t)h(lo)s(cation)h(of)f(the)g(insertion)1110
-3799 y(p)s(oin)m(t.)59 b(If)37 b(the)f(executed)i(command)e(c)m(hanges)
-i(the)f(v)-5 b(alue)37 b(of)f Fs(READLINE_)1110 3909
+4375 y(p)s(oin)m(t.)59 b(If)37 b(the)f(executed)i(command)e(c)m(hanges)
+i(the)f(v)-5 b(alue)37 b(of)f Fs(READLINE_)1110 4484
y(LINE)29 b Ft(or)h Fs(READLINE_POINT)p Ft(,)c(those)31
b(new)e(v)-5 b(alues)31 b(will)f(b)s(e)f(re\015ected)i(in)f(the)1110
-4018 y(editing)h(state.)630 4173 y Fs(-X)384 b Ft(List)27
+4594 y(editing)h(state.)630 4760 y Fs(-X)384 b Ft(List)27
b(all)i(k)m(ey)f(sequences)f(b)s(ound)e(to)j(shell)g(commands)e(and)h
-(the)g(asso)s(ciated)1110 4283 y(commands)j(in)g(a)h(format)g(that)f
-(can)h(b)s(e)f(reused)f(as)i(input.)630 4437 y(The)26
+(the)g(asso)s(ciated)1110 4870 y(commands)j(in)g(a)h(format)g(that)f
+(can)h(b)s(e)f(reused)f(as)i(input.)630 5036 y(The)26
b(return)f(status)i(is)f(zero)i(unless)d(an)i(in)m(v)-5
b(alid)27 b(option)g(is)f(supplied)f(or)i(an)f(error)g(o)s(ccurs.)150
-4592 y Fs(builtin)870 4724 y(builtin)46 b([)p Fi(shell-builtin)54
-b Fs([)p Fi(args)11 b Fs(]])630 4856 y Ft(Run)35 b(a)h(shell)h
-(builtin,)g(passing)f(it)g Fq(args)t Ft(,)i(and)e(return)f(its)h(exit)h
-(status.)58 b(This)36 b(is)g(useful)630 4966 y(when)29
-b(de\014ning)h(a)g(shell)h(function)f(with)g(the)g(same)h(name)f(as)h
-(a)g(shell)f(builtin,)g(retaining)630 5076 y(the)k(functionalit)m(y)h
-(of)f(the)f(builtin)g(within)g(the)h(function.)50 b(The)33
-b(return)g(status)h(is)f(non-)630 5185 y(zero)e(if)g
-Fq(shell-builtin)f Ft(is)g(not)h(a)g(shell)f(builtin)g(command.)150
-5340 y Fs(caller)p eop end
+5202 y Fs(builtin)870 5340 y(builtin)46 b([)p Fi(shell-builtin)54
+b Fs([)p Fi(args)11 b Fs(]])p eop end
%%Page: 50 56
TeXDict begin 50 55 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(50)870 299 y Fs(caller)46
-b([)p Fi(expr)11 b Fs(])630 445 y Ft(Returns)34 b(the)g(con)m(text)j
-(of)e(an)m(y)g(activ)m(e)i(subroutine)c(call)j(\(a)f(shell)g(function)f
-(or)h(a)g(script)630 555 y(executed)c(with)f(the)h Fs(.)f
-Ft(or)g Fs(source)f Ft(builtins\).)630 701 y(Without)45
+b(Shell)30 b(Builtin)h(Commands)2069 b(50)630 299 y(Run)35
+b(a)h(shell)h(builtin,)g(passing)f(it)g Fq(args)t Ft(,)i(and)e(return)f
+(its)h(exit)h(status.)58 b(This)36 b(is)g(useful)630
+408 y(when)29 b(de\014ning)h(a)g(shell)h(function)f(with)g(the)g(same)h
+(name)f(as)h(a)g(shell)f(builtin,)g(retaining)630 518
+y(the)k(functionalit)m(y)h(of)f(the)f(builtin)g(within)g(the)h
+(function.)50 b(The)33 b(return)g(status)h(is)f(non-)630
+628 y(zero)e(if)g Fq(shell-builtin)f Ft(is)g(not)h(a)g(shell)f(builtin)
+g(command.)150 774 y Fs(caller)870 902 y(caller)46 b([)p
+Fi(expr)11 b Fs(])630 1029 y Ft(Returns)34 b(the)g(con)m(text)j(of)e
+(an)m(y)g(activ)m(e)i(subroutine)c(call)j(\(a)f(shell)g(function)f(or)h
+(a)g(script)630 1139 y(executed)c(with)f(the)h Fs(.)f
+Ft(or)g Fs(source)f Ft(builtins\).)630 1267 y(Without)45
b Fq(expr)7 b Ft(,)46 b Fs(caller)d Ft(displa)m(ys)h(the)g(line)g(n)m
(um)m(b)s(er)f(and)g(source)h(\014lename)h(of)f(the)630
-810 y(curren)m(t)35 b(subroutine)f(call.)56 b(If)35 b(a)h(non-negativ)m
-(e)h(in)m(teger)g(is)e(supplied)f(as)h Fq(expr)7 b Ft(,)36
-b Fs(caller)630 920 y Ft(displa)m(ys)41 b(the)f(line)h(n)m(um)m(b)s
-(er,)h(subroutine)d(name,)44 b(and)c(source)g(\014le)h(corresp)s
-(onding)e(to)630 1029 y(that)c(p)s(osition)g(in)f(the)h(curren)m(t)f
-(execution)i(call)g(stac)m(k.)54 b(This)34 b(extra)h(information)g(ma)m
-(y)630 1139 y(b)s(e)30 b(used,)g(for)g(example,)h(to)g(prin)m(t)f(a)h
-(stac)m(k)h(trace.)42 b(The)29 b(curren)m(t)i(frame)f(is)g(frame)h(0.)
-630 1285 y(The)e(return)f(v)-5 b(alue)29 b(is)h(0)f(unless)g(the)g
-(shell)g(is)h(not)f(executing)h(a)g(subroutine)e(call)i(or)g
-Fq(expr)630 1395 y Ft(do)s(es)g(not)h(corresp)s(ond)e(to)i(a)g(v)-5
+1377 y(curren)m(t)35 b(subroutine)f(call.)56 b(If)35
+b(a)h(non-negativ)m(e)h(in)m(teger)g(is)e(supplied)f(as)h
+Fq(expr)7 b Ft(,)36 b Fs(caller)630 1486 y Ft(displa)m(ys)41
+b(the)f(line)h(n)m(um)m(b)s(er,)h(subroutine)d(name,)44
+b(and)c(source)g(\014le)h(corresp)s(onding)e(to)630 1596
+y(that)c(p)s(osition)g(in)f(the)h(curren)m(t)f(execution)i(call)g(stac)
+m(k.)54 b(This)34 b(extra)h(information)g(ma)m(y)630
+1705 y(b)s(e)30 b(used,)g(for)g(example,)h(to)g(prin)m(t)f(a)h(stac)m
+(k)h(trace.)42 b(The)29 b(curren)m(t)i(frame)f(is)g(frame)h(0.)630
+1833 y(The)e(return)f(v)-5 b(alue)29 b(is)h(0)f(unless)g(the)g(shell)g
+(is)h(not)f(executing)h(a)g(subroutine)e(call)i(or)g
+Fq(expr)630 1943 y Ft(do)s(es)g(not)h(corresp)s(ond)e(to)i(a)g(v)-5
b(alid)30 b(p)s(osition)h(in)f(the)g(call)i(stac)m(k.)150
-1577 y Fs(command)870 1724 y(command)46 b([-pVv])g Fi(command)56
-b Fs([)p Fi(arguments)g Fs(...)o(])630 1870 y Ft(Runs)31
+2089 y Fs(command)870 2217 y(command)46 b([-pVv])g Fi(command)56
+b Fs([)p Fi(arguments)g Fs(...)o(])630 2345 y Ft(Runs)31
b Fq(command)36 b Ft(with)d Fq(argumen)m(ts)j Ft(ignoring)d(an)m(y)g
-(shell)g(function)f(named)g Fq(command)t Ft(.)630 1979
+(shell)g(function)f(named)g Fq(command)t Ft(.)630 2454
y(Only)39 b(shell)i(builtin)e(commands)h(or)g(commands)f(found)g(b)m(y)
-h(searc)m(hing)h(the)f Fs(PATH)f Ft(are)630 2089 y(executed.)g(If)23
+h(searc)m(hing)h(the)f Fs(PATH)f Ft(are)630 2564 y(executed.)g(If)23
b(there)h(is)f(a)h(shell)f(function)g(named)g Fs(ls)p
Ft(,)i(running)c(`)p Fs(command)29 b(ls)p Ft(')23 b(within)g(the)630
-2198 y(function)33 b(will)g(execute)i(the)f(external)g(command)f
+2673 y(function)33 b(will)g(execute)i(the)f(external)g(command)f
Fs(ls)f Ft(instead)i(of)f(calling)i(the)e(function)630
-2308 y(recursiv)m(ely)-8 b(.)84 b(The)44 b(`)p Fs(-p)p
+2783 y(recursiv)m(ely)-8 b(.)84 b(The)44 b(`)p Fs(-p)p
Ft(')h(option)g(means)f(to)h(use)g(a)f(default)h(v)-5
-b(alue)45 b(for)f Fs(PATH)g Ft(that)h(is)630 2418 y(guaran)m(teed)35
+b(alue)45 b(for)f Fs(PATH)g Ft(that)h(is)630 2892 y(guaran)m(teed)35
b(to)f(\014nd)e(all)j(of)f(the)g(standard)f(utilities.)52
-b(The)33 b(return)g(status)h(in)f(this)h(case)630 2527
+b(The)33 b(return)g(status)h(in)f(this)h(case)630 3002
y(is)29 b(127)g(if)g Fq(command)j Ft(cannot)d(b)s(e)e(found)h(or)g(an)g
(error)h(o)s(ccurred,)f(and)g(the)h(exit)g(status)g(of)630
-2637 y Fq(command)34 b Ft(otherwise.)630 2783 y(If)25
+3112 y Fq(command)34 b Ft(otherwise.)630 3240 y(If)25
b(either)g(the)h(`)p Fs(-V)p Ft(')f(or)g(`)p Fs(-v)p
Ft(')g(option)g(is)g(supplied,)h(a)f(description)g(of)h
-Fq(command)i Ft(is)d(prin)m(ted.)630 2892 y(The)i(`)p
+Fq(command)i Ft(is)d(prin)m(ted.)630 3349 y(The)i(`)p
Fs(-v)p Ft(')h(option)h(causes)f(a)h(single)f(w)m(ord)g(indicating)h
-(the)f(command)g(or)g(\014le)g(name)g(used)630 3002 y(to)36
+(the)f(command)g(or)g(\014le)g(name)g(used)630 3459 y(to)36
b(in)m(v)m(ok)m(e)g Fq(command)j Ft(to)c(b)s(e)g(displa)m(y)m(ed;)j
(the)d(`)p Fs(-V)p Ft(')g(option)g(pro)s(duces)e(a)j(more)f(v)m(erb)s
-(ose)630 3112 y(description.)61 b(In)36 b(this)h(case,)j(the)e(return)e
+(ose)630 3568 y(description.)61 b(In)36 b(this)h(case,)j(the)e(return)e
(status)h(is)g(zero)h(if)f Fq(command)k Ft(is)c(found,)h(and)630
-3221 y(non-zero)31 b(if)f(not.)150 3404 y Fs(declare)870
-3550 y(declare)46 b([-aAfFgilnrtux])d([-p])k([)p Fi(name)11
-b Fs([=)p Fi(value)g Fs(])43 b(...)o(])630 3696 y Ft(Declare)29
+3678 y(non-zero)31 b(if)f(not.)150 3824 y Fs(declare)870
+3952 y(declare)46 b([-aAfFgilnrtux])d([-p])k([)p Fi(name)11
+b Fs([=)p Fi(value)g Fs(])43 b(...)o(])630 4080 y Ft(Declare)29
b(v)-5 b(ariables)28 b(and)e(giv)m(e)j(them)e(attributes.)40
b(If)27 b(no)g Fq(name)5 b Ft(s)27 b(are)h(giv)m(en,)h(then)e(displa)m
-(y)630 3806 y(the)k(v)-5 b(alues)30 b(of)h(v)-5 b(ariables)31
-b(instead.)630 3952 y(The)c(`)p Fs(-p)p Ft(')h(option)g(will)g(displa)m
+(y)630 4189 y(the)k(v)-5 b(alues)30 b(of)h(v)-5 b(ariables)31
+b(instead.)630 4317 y(The)c(`)p Fs(-p)p Ft(')h(option)g(will)g(displa)m
(y)g(the)g(attributes)g(and)g(v)-5 b(alues)28 b(of)g(eac)m(h)h
Fq(name)5 b Ft(.)40 b(When)27 b(`)p Fs(-p)p Ft(')630
-4061 y(is)j(used)g(with)g Fq(name)35 b Ft(argumen)m(ts,)c(additional)h
+4427 y(is)j(used)g(with)g Fq(name)35 b Ft(argumen)m(ts,)c(additional)h
(options,)e(other)h(than)f(`)p Fs(-f)p Ft(')g(and)g(`)p
-Fs(-F)p Ft(',)h(are)630 4171 y(ignored.)630 4317 y(When)36
+Fs(-F)p Ft(',)h(are)630 4536 y(ignored.)630 4664 y(When)36
b(`)p Fs(-p)p Ft(')f(is)h(supplied)f(without)h Fq(name)41
b Ft(argumen)m(ts,)d Fs(declare)c Ft(will)i(displa)m(y)g(the)g(at-)630
-4427 y(tributes)31 b(and)f(v)-5 b(alues)31 b(of)g(all)h(v)-5
+4774 y(tributes)31 b(and)f(v)-5 b(alues)31 b(of)g(all)h(v)-5
b(ariables)31 b(ha)m(ving)h(the)f(attributes)g(sp)s(eci\014ed)f(b)m(y)h
-(the)g(addi-)630 4536 y(tional)h(options.)41 b(If)30
+(the)g(addi-)630 4883 y(tional)h(options.)41 b(If)30
b(no)g(other)h(options)g(are)g(supplied)e(with)h(`)p
Fs(-p)p Ft(',)g Fs(declare)f Ft(will)i(displa)m(y)630
-4646 y(the)f(attributes)g(and)e(v)-5 b(alues)30 b(of)g(all)g(shell)g(v)
+4993 y(the)f(attributes)g(and)e(v)-5 b(alues)30 b(of)g(all)g(shell)g(v)
-5 b(ariables.)41 b(The)29 b(`)p Fs(-f)p Ft(')g(option)h(will)g
-(restrict)g(the)630 4756 y(displa)m(y)h(to)g(shell)f(functions.)630
-4902 y(The)36 b(`)p Fs(-F)p Ft(')h(option)g(inhibits)f(the)h(displa)m
+(restrict)g(the)630 5103 y(displa)m(y)h(to)g(shell)f(functions.)630
+5230 y(The)36 b(`)p Fs(-F)p Ft(')h(option)g(inhibits)f(the)h(displa)m
(y)g(of)g(function)g(de\014nitions;)i(only)e(the)g(function)630
-5011 y(name)30 b(and)f(attributes)i(are)f(prin)m(ted.)40
+5340 y(name)30 b(and)f(attributes)i(are)f(prin)m(ted.)40
b(If)30 b(the)g Fs(extdebug)e Ft(shell)i(option)g(is)g(enabled)g(using)
-630 5121 y Fs(shopt)24 b Ft(\(see)i(Section)g(4.3.2)i([The)d(Shopt)f
-(Builtin],)k(page)e(62\),)i(the)d(source)h(\014le)f(name)h(and)630
-5230 y(line)38 b(n)m(um)m(b)s(er)e(where)i(the)g(function)f(is)h
-(de\014ned)e(are)i(displa)m(y)m(ed)h(as)e(w)m(ell.)64
-b(`)p Fs(-F)p Ft(')38 b(implies)630 5340 y(`)p Fs(-f)p
-Ft('.)p eop end
+p eop end
%%Page: 51 57
TeXDict begin 51 56 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(51)630 299 y(The)32
+b(Shell)30 b(Builtin)h(Commands)2069 b(51)630 299 y Fs(shopt)24
+b Ft(\(see)i(Section)g(4.3.2)i([The)d(Shopt)f(Builtin],)k(page)e(63\),)
+i(the)d(source)h(\014le)f(name)h(and)630 408 y(line)38
+b(n)m(um)m(b)s(er)e(where)i(the)g(function)f(is)h(de\014ned)e(are)i
+(displa)m(y)m(ed)h(as)e(w)m(ell.)64 b(`)p Fs(-F)p Ft(')38
+b(implies)630 518 y(`)p Fs(-f)p Ft('.)630 654 y(The)32
b(`)p Fs(-g)p Ft(')h(option)g(forces)g(v)-5 b(ariables)33
b(to)h(b)s(e)e(created)h(or)g(mo)s(di\014ed)e(at)j(the)f(global)h(scop)
-s(e,)630 408 y(ev)m(en)k(when)e Fs(declare)f Ft(is)j(executed)g(in)f(a)
+s(e,)630 764 y(ev)m(en)k(when)e Fs(declare)f Ft(is)j(executed)g(in)f(a)
g(shell)h(function.)61 b(It)37 b(is)g(ignored)h(in)f(all)h(other)630
-518 y(cases.)630 646 y(The)27 b(follo)m(wing)h(options)g(can)f(b)s(e)g
+873 y(cases.)630 1009 y(The)27 b(follo)m(wing)h(options)g(can)f(b)s(e)g
(used)f(to)i(restrict)g(output)e(to)i(v)-5 b(ariables)28
-b(with)f(the)g(sp)s(ec-)630 756 y(i\014ed)j(attributes)h(or)f(to)h(giv)
-m(e)h(v)-5 b(ariables)31 b(attributes:)630 902 y Fs(-a)384
-b Ft(Eac)m(h)36 b Fq(name)k Ft(is)34 b(an)h(indexed)g(arra)m(y)g(v)-5
-b(ariable)36 b(\(see)f(Section)h(6.7)g([Arra)m(ys],)1110
-1011 y(page)31 b(89\).)630 1157 y Fs(-A)384 b Ft(Eac)m(h)24
+b(with)f(the)g(sp)s(ec-)630 1119 y(i\014ed)j(attributes)h(or)f(to)h
+(giv)m(e)h(v)-5 b(ariables)31 b(attributes:)630 1281
+y Fs(-a)384 b Ft(Eac)m(h)36 b Fq(name)k Ft(is)34 b(an)h(indexed)g(arra)
+m(y)g(v)-5 b(ariable)36 b(\(see)f(Section)h(6.7)g([Arra)m(ys],)1110
+1390 y(page)31 b(89\).)630 1553 y Fs(-A)384 b Ft(Eac)m(h)24
b Fq(name)k Ft(is)23 b(an)g(asso)s(ciativ)m(e)j(arra)m(y)e(v)-5
b(ariable)24 b(\(see)g(Section)g(6.7)g([Arra)m(ys],)1110
-1267 y(page)31 b(89\).)630 1413 y Fs(-f)384 b Ft(Use)31
-b(function)f(names)g(only)-8 b(.)630 1559 y Fs(-i)384
+1662 y(page)31 b(89\).)630 1824 y Fs(-f)384 b Ft(Use)31
+b(function)f(names)g(only)-8 b(.)630 1987 y Fs(-i)384
b Ft(The)36 b(v)-5 b(ariable)37 b(is)f(to)h(b)s(e)f(treated)h(as)g(an)f
(in)m(teger;)41 b(arithmetic)c(ev)-5 b(aluation)1110
-1669 y(\(see)29 b(Section)f(6.5)h([Shell)f(Arithmetic],)i(page)e(87\))h
-(is)f(p)s(erformed)e(when)h(the)1110 1778 y(v)-5 b(ariable)31
-b(is)g(assigned)f(a)h(v)-5 b(alue.)630 1924 y Fs(-l)384
+2096 y(\(see)29 b(Section)f(6.5)h([Shell)f(Arithmetic],)i(page)e(87\))h
+(is)f(p)s(erformed)e(when)h(the)1110 2206 y(v)-5 b(ariable)31
+b(is)g(assigned)f(a)h(v)-5 b(alue.)630 2368 y Fs(-l)384
b Ft(When)26 b(the)g(v)-5 b(ariable)27 b(is)f(assigned)g(a)g(v)-5
b(alue,)28 b(all)f(upp)s(er-case)e(c)m(haracters)j(are)1110
-2034 y(con)m(v)m(erted)k(to)f(lo)m(w)m(er-case.)43 b(The)30
-b(upp)s(er-case)g(attribute)h(is)g(disabled.)630 2180
+2478 y(con)m(v)m(erted)k(to)f(lo)m(w)m(er-case.)43 b(The)30
+b(upp)s(er-case)g(attribute)h(is)g(disabled.)630 2640
y Fs(-n)384 b Ft(Giv)m(e)28 b(eac)m(h)g Fq(name)k Ft(the)27
b Fq(nameref)44 b Ft(attribute,)28 b(making)f(it)h(a)f(name)f
-(reference)1110 2290 y(to)32 b(another)g(v)-5 b(ariable.)46
+(reference)1110 2749 y(to)32 b(another)g(v)-5 b(ariable.)46
b(That)31 b(other)h(v)-5 b(ariable)33 b(is)f(de\014ned)e(b)m(y)i(the)g
-(v)-5 b(alue)32 b(of)1110 2399 y Fq(name)5 b Ft(.)39
+(v)-5 b(alue)32 b(of)1110 2859 y Fq(name)5 b Ft(.)39
b(All)25 b(references)f(and)g(assignmen)m(ts)h(to)g Fq(name)5
-b Ft(,)26 b(except)f(for)f(c)m(hanging)1110 2509 y(the)38
+b Ft(,)26 b(except)f(for)f(c)m(hanging)1110 2968 y(the)38
b(`)p Fs(-n)p Ft(')f(attribute)h(itself,)i(are)e(p)s(erformed)e(on)h
-(the)h(v)-5 b(ariable)38 b(referenced)1110 2619 y(b)m(y)j
+(the)h(v)-5 b(ariable)38 b(referenced)1110 3078 y(b)m(y)j
Fq(name)5 b Ft('s)41 b(v)-5 b(alue.)74 b(The)41 b(`)p
Fs(-n)p Ft(')g(attribute)g(cannot)h(b)s(e)f(applied)g(to)g(arra)m(y)
-1110 2728 y(v)-5 b(ariables.)630 2874 y Fs(-r)384 b Ft(Mak)m(e)25
+1110 3188 y(v)-5 b(ariables.)630 3350 y Fs(-r)384 b Ft(Mak)m(e)25
b Fq(name)5 b Ft(s)23 b(readonly)-8 b(.)39 b(These)24
b(names)f(cannot)h(then)f(b)s(e)g(assigned)h(v)-5 b(alues)1110
-2984 y(b)m(y)30 b(subsequen)m(t)g(assignmen)m(t)h(statemen)m(ts)h(or)f
-(unset.)630 3130 y Fs(-t)384 b Ft(Giv)m(e)33 b(eac)m(h)h
+3459 y(b)m(y)30 b(subsequen)m(t)g(assignmen)m(t)h(statemen)m(ts)h(or)f
+(unset.)630 3622 y Fs(-t)384 b Ft(Giv)m(e)33 b(eac)m(h)h
Fq(name)j Ft(the)32 b Fs(trace)f Ft(attribute.)46 b(T)-8
-b(raced)32 b(functions)g(inherit)g(the)1110 3240 y Fs(DEBUG)26
+b(raced)32 b(functions)g(inherit)g(the)1110 3731 y Fs(DEBUG)26
b Ft(and)h Fs(RETURN)f Ft(traps)h(from)g(the)h(calling)h(shell.)40
-b(The)27 b(trace)i(attribute)1110 3349 y(has)h(no)g(sp)s(ecial)h
-(meaning)g(for)f(v)-5 b(ariables.)630 3495 y Fs(-u)384
+b(The)27 b(trace)i(attribute)1110 3841 y(has)h(no)g(sp)s(ecial)h
+(meaning)g(for)f(v)-5 b(ariables.)630 4003 y Fs(-u)384
b Ft(When)28 b(the)h(v)-5 b(ariable)29 b(is)f(assigned)h(a)f(v)-5
b(alue,)30 b(all)f(lo)m(w)m(er-case)i(c)m(haracters)f(are)1110
-3605 y(con)m(v)m(erted)i(to)f(upp)s(er-case.)40 b(The)30
-b(lo)m(w)m(er-case)j(attribute)e(is)g(disabled.)630 3751
+4113 y(con)m(v)m(erted)i(to)f(upp)s(er-case.)40 b(The)30
+b(lo)m(w)m(er-case)j(attribute)e(is)g(disabled.)630 4275
y Fs(-x)384 b Ft(Mark)30 b(eac)m(h)h Fq(name)k Ft(for)29
b(exp)s(ort)h(to)g(subsequen)m(t)f(commands)h(via)g(the)g(en)m(vi-)1110
-3861 y(ronmen)m(t.)630 4007 y(Using)e(`)p Fs(+)p Ft(')h(instead)f(of)g
+4384 y(ronmen)m(t.)630 4547 y(Using)e(`)p Fs(+)p Ft(')h(instead)f(of)g
(`)p Fs(-)p Ft(')g(turns)f(o\013)i(the)f(attribute)h(instead,)g(with)f
-(the)g(exceptions)h(that)630 4116 y(`)p Fs(+a)p Ft(')h(ma)m(y)h(not)f
+(the)g(exceptions)h(that)630 4656 y(`)p Fs(+a)p Ft(')h(ma)m(y)h(not)f
(b)s(e)f(used)g(to)i(destro)m(y)g(an)f(arra)m(y)g(v)-5
b(ariable)31 b(and)f(`)p Fs(+r)p Ft(')g(will)g(not)g(remo)m(v)m(e)i
-(the)630 4226 y(readonly)e(attribute.)41 b(When)30 b(used)f(in)g(a)h
+(the)630 4766 y(readonly)e(attribute.)41 b(When)30 b(used)f(in)g(a)h
(function,)g Fs(declare)e Ft(mak)m(es)j(eac)m(h)f Fq(name)35
-b Ft(lo)s(cal,)630 4335 y(as)30 b(with)g(the)h Fs(local)e
+b Ft(lo)s(cal,)630 4875 y(as)30 b(with)g(the)h Fs(local)e
Ft(command,)h(unless)f(the)i(`)p Fs(-g)p Ft(')f(option)g(is)h(used.)40
-b(If)29 b(a)i(v)-5 b(ariable)31 b(name)630 4445 y(is)f(follo)m(w)m(ed)i
+b(If)29 b(a)i(v)-5 b(ariable)31 b(name)630 4985 y(is)f(follo)m(w)m(ed)i
(b)m(y)f(=)p Fq(v)-5 b(alue)5 b Ft(,)31 b(the)f(v)-5
b(alue)31 b(of)g(the)f(v)-5 b(ariable)31 b(is)g(set)g(to)g
-Fq(v)-5 b(alue)5 b Ft(.)630 4573 y(The)35 b(return)f(status)i(is)g
+Fq(v)-5 b(alue)5 b Ft(.)630 5121 y(The)35 b(return)f(status)i(is)g
(zero)g(unless)f(an)g(in)m(v)-5 b(alid)36 b(option)g(is)g(encoun)m
-(tered,)h(an)f(attempt)630 4682 y(is)c(made)g(to)g(de\014ne)f(a)h
+(tered,)h(an)f(attempt)630 5230 y(is)c(made)g(to)g(de\014ne)f(a)h
(function)g(using)f(`)p Fs(-f)f(foo=bar)p Ft(',)h(an)h(attempt)g(is)g
-(made)g(to)h(assign)630 4792 y(a)42 b(v)-5 b(alue)43
+(made)g(to)h(assign)630 5340 y(a)42 b(v)-5 b(alue)43
b(to)g(a)f(readonly)g(v)-5 b(ariable,)47 b(an)42 b(attempt)h(is)f(made)
-g(to)h(assign)f(a)h(v)-5 b(alue)42 b(to)h(an)630 4902
-y(arra)m(y)30 b(v)-5 b(ariable)30 b(without)g(using)e(the)i(comp)s
-(ound)e(assignmen)m(t)i(syn)m(tax)g(\(see)h(Section)f(6.7)630
-5011 y([Arra)m(ys],)47 b(page)c(89\),)48 b(one)43 b(of)g(the)g
-Fq(names)k Ft(is)c(not)g(a)g(v)-5 b(alid)43 b(shell)g(v)-5
-b(ariable)44 b(name,)i(an)630 5121 y(attempt)28 b(is)f(made)h(to)f
-(turn)f(o\013)i(readonly)f(status)g(for)g(a)h(readonly)f(v)-5
-b(ariable,)29 b(an)e(attempt)630 5230 y(is)h(made)h(to)g(turn)e(o\013)i
-(arra)m(y)f(status)h(for)f(an)g(arra)m(y)h(v)-5 b(ariable,)30
-b(or)e(an)g(attempt)i(is)e(made)g(to)630 5340 y(displa)m(y)j(a)f
-(non-existen)m(t)i(function)e(with)g(`)p Fs(-f)p Ft('.)p
-eop end
+g(to)h(assign)f(a)h(v)-5 b(alue)42 b(to)h(an)p eop end
%%Page: 52 58
TeXDict begin 52 57 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(52)150 299 y Fs(echo)870
-434 y(echo)47 b([-neE])f([)p Fi(arg)57 b Fs(...)o(])630
-568 y Ft(Output)31 b(the)i Fq(arg)8 b Ft(s,)33 b(separated)g(b)m(y)g
-(spaces,)g(terminated)g(with)f(a)h(newline.)47 b(The)32
-b(return)630 678 y(status)27 b(is)g(0)h(unless)e(a)i(write)f(error)f(o)
-s(ccurs.)40 b(If)26 b(`)p Fs(-n)p Ft(')h(is)g(sp)s(eci\014ed,)h(the)f
-(trailing)h(newline)f(is)630 787 y(suppressed.)37 b(If)24
-b(the)g(`)p Fs(-e)p Ft(')h(option)g(is)f(giv)m(en,)j(in)m(terpretation)
-f(of)e(the)h(follo)m(wing)h(bac)m(kslash-)630 897 y(escap)s(ed)38
+b(Shell)30 b(Builtin)h(Commands)2069 b(52)630 299 y(arra)m(y)30
+b(v)-5 b(ariable)30 b(without)g(using)e(the)i(comp)s(ound)e(assignmen)m
+(t)i(syn)m(tax)g(\(see)h(Section)f(6.7)630 408 y([Arra)m(ys],)47
+b(page)c(89\),)48 b(one)43 b(of)g(the)g Fq(names)k Ft(is)c(not)g(a)g(v)
+-5 b(alid)43 b(shell)g(v)-5 b(ariable)44 b(name,)i(an)630
+518 y(attempt)28 b(is)f(made)h(to)f(turn)f(o\013)i(readonly)f(status)g
+(for)g(a)h(readonly)f(v)-5 b(ariable,)29 b(an)e(attempt)630
+628 y(is)h(made)h(to)g(turn)e(o\013)i(arra)m(y)f(status)h(for)f(an)g
+(arra)m(y)h(v)-5 b(ariable,)30 b(or)e(an)g(attempt)i(is)e(made)g(to)630
+737 y(displa)m(y)j(a)f(non-existen)m(t)i(function)e(with)g(`)p
+Fs(-f)p Ft('.)150 909 y Fs(echo)870 1050 y(echo)47 b([-neE])f([)p
+Fi(arg)57 b Fs(...)o(])630 1191 y Ft(Output)31 b(the)i
+Fq(arg)8 b Ft(s,)33 b(separated)g(b)m(y)g(spaces,)g(terminated)g(with)f
+(a)h(newline.)47 b(The)32 b(return)630 1301 y(status)27
+b(is)g(0)h(unless)e(a)i(write)f(error)f(o)s(ccurs.)40
+b(If)26 b(`)p Fs(-n)p Ft(')h(is)g(sp)s(eci\014ed,)h(the)f(trailing)h
+(newline)f(is)630 1410 y(suppressed.)37 b(If)24 b(the)g(`)p
+Fs(-e)p Ft(')h(option)g(is)f(giv)m(en,)j(in)m(terpretation)f(of)e(the)h
+(follo)m(wing)h(bac)m(kslash-)630 1520 y(escap)s(ed)38
b(c)m(haracters)i(is)f(enabled.)65 b(The)38 b(`)p Fs(-E)p
Ft(')g(option)h(disables)f(the)h(in)m(terpretation)h(of)630
-1007 y(these)27 b(escap)s(e)g(c)m(haracters,)i(ev)m(en)e(on)g(systems)f
+1630 y(these)27 b(escap)s(e)g(c)m(haracters,)i(ev)m(en)e(on)g(systems)f
(where)g(they)h(are)g(in)m(terpreted)g(b)m(y)f(default.)630
-1116 y(The)32 b Fs(xpg_echo)f Ft(shell)i(option)g(ma)m(y)h(b)s(e)e
+1739 y(The)32 b Fs(xpg_echo)f Ft(shell)i(option)g(ma)m(y)h(b)s(e)e
(used)g(to)h(dynamically)h(determine)f(whether)f(or)630
-1226 y(not)h Fs(echo)f Ft(expands)g(these)h(escap)s(e)h(c)m(haracters)g
+1849 y(not)h Fs(echo)f Ft(expands)g(these)h(escap)s(e)h(c)m(haracters)g
(b)m(y)f(default.)48 b Fs(echo)32 b Ft(do)s(es)g(not)i(in)m(terpret)630
-1335 y(`)p Fs(--)p Ft(')c(to)h(mean)g(the)f(end)g(of)h(options.)630
-1470 y Fs(echo)e Ft(in)m(terprets)i(the)f(follo)m(wing)i(escap)s(e)f
-(sequences:)630 1630 y Fs(\\a)384 b Ft(alert)31 b(\(b)s(ell\))630
-1789 y Fs(\\b)384 b Ft(bac)m(kspace)630 1949 y Fs(\\c)g
-Ft(suppress)28 b(further)h(output)630 2109 y Fs(\\e)630
-2218 y(\\E)384 b Ft(escap)s(e)630 2378 y Fs(\\f)g Ft(form)30
-b(feed)630 2538 y Fs(\\n)384 b Ft(new)30 b(line)630 2697
-y Fs(\\r)384 b Ft(carriage)32 b(return)630 2857 y Fs(\\t)384
-b Ft(horizon)m(tal)32 b(tab)630 3017 y Fs(\\v)384 b Ft(v)m(ertical)32
-b(tab)630 3176 y Fs(\\\\)384 b Ft(bac)m(kslash)630 3336
+1958 y(`)p Fs(--)p Ft(')c(to)h(mean)g(the)f(end)g(of)h(options.)630
+2099 y Fs(echo)e Ft(in)m(terprets)i(the)f(follo)m(wing)i(escap)s(e)f
+(sequences:)630 2271 y Fs(\\a)384 b Ft(alert)31 b(\(b)s(ell\))630
+2444 y Fs(\\b)384 b Ft(bac)m(kspace)630 2616 y Fs(\\c)g
+Ft(suppress)28 b(further)h(output)630 2788 y Fs(\\e)630
+2898 y(\\E)384 b Ft(escap)s(e)630 3070 y Fs(\\f)g Ft(form)30
+b(feed)630 3242 y Fs(\\n)384 b Ft(new)30 b(line)630 3414
+y Fs(\\r)384 b Ft(carriage)32 b(return)630 3587 y Fs(\\t)384
+b Ft(horizon)m(tal)32 b(tab)630 3759 y Fs(\\v)384 b Ft(v)m(ertical)32
+b(tab)630 3931 y Fs(\\\\)384 b Ft(bac)m(kslash)630 4103
y Fs(\\0)p Fi(nnn)240 b Ft(the)32 b(eigh)m(t-bit)i(c)m(haracter)g
(whose)e(v)-5 b(alue)33 b(is)f(the)g(o)s(ctal)i(v)-5
-b(alue)32 b Fq(nnn)f Ft(\(zero)i(to)1110 3446 y(three)e(o)s(ctal)g
-(digits\))630 3605 y Fs(\\x)p Fi(HH)288 b Ft(the)40 b(eigh)m(t-bit)h(c)
+b(alue)32 b Fq(nnn)f Ft(\(zero)i(to)1110 4213 y(three)e(o)s(ctal)g
+(digits\))630 4385 y Fs(\\x)p Fi(HH)288 b Ft(the)40 b(eigh)m(t-bit)h(c)
m(haracter)g(whose)e(v)-5 b(alue)39 b(is)h(the)f(hexadecimal)i(v)-5
-b(alue)40 b Fq(HH)1110 3715 y Ft(\(one)31 b(or)f(t)m(w)m(o)i(hex)e
-(digits\))630 3875 y Fs(\\u)p Fi(HHHH)192 b Ft(the)41
+b(alue)40 b Fq(HH)1110 4495 y Ft(\(one)31 b(or)f(t)m(w)m(o)i(hex)e
+(digits\))630 4667 y Fs(\\u)p Fi(HHHH)192 b Ft(the)41
b(Unico)s(de)g(\(ISO/IEC)f(10646\))j(c)m(haracter)g(whose)e(v)-5
-b(alue)41 b(is)g(the)g(hex-)1110 3984 y(adecimal)32 b(v)-5
+b(alue)41 b(is)g(the)g(hex-)1110 4776 y(adecimal)32 b(v)-5
b(alue)31 b Fq(HHHH)41 b Ft(\(one)31 b(to)g(four)e(hex)h(digits\))630
-4144 y Fs(\\U)p Fi(HHHHHHHH)1110 4253 y Ft(the)41 b(Unico)s(de)g
+4949 y Fs(\\U)p Fi(HHHHHHHH)1110 5058 y Ft(the)41 b(Unico)s(de)g
(\(ISO/IEC)f(10646\))j(c)m(haracter)g(whose)e(v)-5 b(alue)41
-b(is)g(the)g(hex-)1110 4363 y(adecimal)32 b(v)-5 b(alue)31
+b(is)g(the)g(hex-)1110 5168 y(adecimal)32 b(v)-5 b(alue)31
b Fq(HHHHHHHH)41 b Ft(\(one)31 b(to)g(eigh)m(t)h(hex)e(digits\))150
-4523 y Fs(enable)870 4657 y(enable)46 b([-a])h([-dnps])f([-f)g
-Fi(filename)11 b Fs(])45 b([)p Fi(name)57 b Fs(...)o(])630
-4792 y Ft(Enable)36 b(and)f(disable)h(builtin)g(shell)g(commands.)56
-b(Disabling)37 b(a)g(builtin)e(allo)m(ws)i(a)f(disk)630
-4902 y(command)e(whic)m(h)g(has)g(the)g(same)h(name)f(as)h(a)f(shell)h
-(builtin)e(to)i(b)s(e)f(executed)h(without)630 5011 y(sp)s(ecifying)27
-b(a)g(full)g(pathname,)g(ev)m(en)h(though)f(the)g(shell)g(normally)g
-(searc)m(hes)h(for)f(builtins)630 5121 y(b)s(efore)32
-b(disk)f(commands.)46 b(If)31 b(`)p Fs(-n)p Ft(')h(is)g(used,)g(the)g
-Fq(name)5 b Ft(s)32 b(b)s(ecome)h(disabled.)45 b(Otherwise)630
-5230 y Fq(name)5 b Ft(s)44 b(are)h(enabled.)82 b(F)-8
-b(or)45 b(example,)k(to)c(use)f(the)g Fs(test)f Ft(binary)h(found)f
-(via)h Fs($PATH)630 5340 y Ft(instead)31 b(of)f(the)h(shell)f(builtin)g
-(v)m(ersion,)h(t)m(yp)s(e)g(`)p Fs(enable)e(-n)h(test)p
-Ft('.)p eop end
+5340 y Fs(enable)p eop end
%%Page: 53 59
TeXDict begin 53 58 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(53)630 299 y(If)42
-b(the)h(`)p Fs(-p)p Ft(')f(option)h(is)f(supplied,)j(or)d(no)h
+b(Shell)30 b(Builtin)h(Commands)2069 b(53)870 299 y Fs(enable)46
+b([-a])h([-dnps])f([-f)g Fi(filename)11 b Fs(])45 b([)p
+Fi(name)57 b Fs(...)o(])630 434 y Ft(Enable)36 b(and)f(disable)h
+(builtin)g(shell)g(commands.)56 b(Disabling)37 b(a)g(builtin)e(allo)m
+(ws)i(a)f(disk)630 543 y(command)e(whic)m(h)g(has)g(the)g(same)h(name)f
+(as)h(a)f(shell)h(builtin)e(to)i(b)s(e)f(executed)h(without)630
+653 y(sp)s(ecifying)27 b(a)g(full)g(pathname,)g(ev)m(en)h(though)f(the)
+g(shell)g(normally)g(searc)m(hes)h(for)f(builtins)630
+763 y(b)s(efore)32 b(disk)f(commands.)46 b(If)31 b(`)p
+Fs(-n)p Ft(')h(is)g(used,)g(the)g Fq(name)5 b Ft(s)32
+b(b)s(ecome)h(disabled.)45 b(Otherwise)630 872 y Fq(name)5
+b Ft(s)44 b(are)h(enabled.)82 b(F)-8 b(or)45 b(example,)k(to)c(use)f
+(the)g Fs(test)f Ft(binary)h(found)f(via)h Fs($PATH)630
+982 y Ft(instead)31 b(of)f(the)h(shell)f(builtin)g(v)m(ersion,)h(t)m
+(yp)s(e)g(`)p Fs(enable)e(-n)h(test)p Ft('.)630 1117
+y(If)42 b(the)h(`)p Fs(-p)p Ft(')f(option)h(is)f(supplied,)j(or)d(no)h
Fq(name)k Ft(argumen)m(ts)c(app)s(ear,)i(a)e(list)g(of)g(shell)630
-408 y(builtins)37 b(is)h(prin)m(ted.)63 b(With)38 b(no)f(other)h
+1226 y(builtins)37 b(is)h(prin)m(ted.)63 b(With)38 b(no)f(other)h
(argumen)m(ts,)j(the)d(list)g(consists)g(of)g(all)h(enabled)630
-518 y(shell)33 b(builtins.)46 b(The)32 b(`)p Fs(-a)p
+1336 y(shell)33 b(builtins.)46 b(The)32 b(`)p Fs(-a)p
Ft(')h(option)g(means)f(to)i(list)f(eac)m(h)h(builtin)e(with)g(an)g
-(indication)i(of)630 628 y(whether)c(or)g(not)h(it)g(is)f(enabled.)630
-763 y(The)40 b(`)p Fs(-f)p Ft(')g(option)g(means)g(to)h(load)g(the)f
+(indication)i(of)630 1445 y(whether)c(or)g(not)h(it)g(is)f(enabled.)630
+1580 y(The)40 b(`)p Fs(-f)p Ft(')g(option)g(means)g(to)h(load)g(the)f
(new)f(builtin)h(command)g Fq(name)45 b Ft(from)40 b(shared)630
-872 y(ob)5 b(ject)26 b Fq(\014lename)5 b Ft(,)28 b(on)d(systems)h(that)
-g(supp)s(ort)e(dynamic)h(loading.)40 b(The)25 b(`)p Fs(-d)p
-Ft(')h(option)g(will)630 982 y(delete)32 b(a)e(builtin)g(loaded)h(with)
-f(`)p Fs(-f)p Ft('.)630 1117 y(If)h(there)g(are)g(no)g(options,)h(a)f
-(list)h(of)f(the)g(shell)g(builtins)g(is)g(displa)m(y)m(ed.)43
-b(The)31 b(`)p Fs(-s)p Ft(')f(option)630 1227 y(restricts)f
-Fs(enable)e Ft(to)i(the)f Fl(posix)g Ft(sp)s(ecial)h(builtins.)40
-b(If)27 b(`)p Fs(-s)p Ft(')i(is)f(used)g(with)g(`)p Fs(-f)p
-Ft(',)h(the)f(new)630 1336 y(builtin)i(b)s(ecomes)h(a)f(sp)s(ecial)h
-(builtin)f(\(see)i(Section)f(4.4)g([Sp)s(ecial)g(Builtins],)g(page)g
-(68\).)630 1471 y(The)26 b(return)f(status)h(is)g(zero)h(unless)e(a)i
-Fq(name)k Ft(is)26 b(not)g(a)h(shell)f(builtin)g(or)g(there)g(is)g(an)g
-(error)630 1581 y(loading)31 b(a)g(new)f(builtin)g(from)g(a)g(shared)g
-(ob)5 b(ject.)150 1742 y Fs(help)870 1877 y(help)47 b([-dms])f([)p
-Fi(pattern)11 b Fs(])630 2012 y Ft(Displa)m(y)40 b(helpful)e
-(information)h(ab)s(out)g(builtin)f(commands.)66 b(If)38
-b Fq(pattern)h Ft(is)g(sp)s(eci\014ed,)630 2122 y Fs(help)28
-b Ft(giv)m(es)i(detailed)g(help)e(on)h(all)h(commands)e(matc)m(hing)i
-Fq(pattern)p Ft(,)g(otherwise)f(a)g(list)h(of)630 2231
-y(the)h(builtins)e(is)i(prin)m(ted.)630 2366 y(Options,)f(if)h
+1690 y(ob)5 b(ject)26 b Fq(\014lename)5 b Ft(,)28 b(on)d(systems)h
+(that)g(supp)s(ort)e(dynamic)h(loading.)40 b(The)25 b(`)p
+Fs(-d)p Ft(')h(option)g(will)630 1799 y(delete)32 b(a)e(builtin)g
+(loaded)h(with)f(`)p Fs(-f)p Ft('.)630 1934 y(If)h(there)g(are)g(no)g
+(options,)h(a)f(list)h(of)f(the)g(shell)g(builtins)g(is)g(displa)m(y)m
+(ed.)43 b(The)31 b(`)p Fs(-s)p Ft(')f(option)630 2044
+y(restricts)f Fs(enable)e Ft(to)i(the)f Fl(posix)g Ft(sp)s(ecial)h
+(builtins.)40 b(If)27 b(`)p Fs(-s)p Ft(')i(is)f(used)g(with)g(`)p
+Fs(-f)p Ft(',)h(the)f(new)630 2153 y(builtin)i(b)s(ecomes)h(a)f(sp)s
+(ecial)h(builtin)f(\(see)i(Section)f(4.4)g([Sp)s(ecial)g(Builtins],)g
+(page)g(68\).)630 2288 y(The)26 b(return)f(status)h(is)g(zero)h(unless)
+e(a)i Fq(name)k Ft(is)26 b(not)g(a)h(shell)f(builtin)g(or)g(there)g(is)
+g(an)g(error)630 2398 y(loading)31 b(a)g(new)f(builtin)g(from)g(a)g
+(shared)g(ob)5 b(ject.)150 2558 y Fs(help)870 2693 y(help)47
+b([-dms])f([)p Fi(pattern)11 b Fs(])630 2828 y Ft(Displa)m(y)40
+b(helpful)e(information)h(ab)s(out)g(builtin)f(commands.)66
+b(If)38 b Fq(pattern)h Ft(is)g(sp)s(eci\014ed,)630 2937
+y Fs(help)28 b Ft(giv)m(es)i(detailed)g(help)e(on)h(all)h(commands)e
+(matc)m(hing)i Fq(pattern)p Ft(,)g(otherwise)f(a)g(list)h(of)630
+3047 y(the)h(builtins)e(is)i(prin)m(ted.)630 3182 y(Options,)f(if)h
(supplied,)e(ha)m(v)m(e)i(the)g(follo)m(wing)h(meanings:)630
-2527 y Fs(-d)384 b Ft(Displa)m(y)32 b(a)e(short)g(description)h(of)f
-(eac)m(h)i Fq(pattern)630 2688 y Fs(-m)384 b Ft(Displa)m(y)32
+3342 y Fs(-d)384 b Ft(Displa)m(y)32 b(a)e(short)g(description)h(of)f
+(eac)m(h)i Fq(pattern)630 3502 y Fs(-m)384 b Ft(Displa)m(y)32
b(the)e(description)g(of)h(eac)m(h)h Fq(pattern)e Ft(in)g(a)h
-(manpage-lik)m(e)h(format)630 2849 y Fs(-s)384 b Ft(Displa)m(y)32
+(manpage-lik)m(e)h(format)630 3662 y Fs(-s)384 b Ft(Displa)m(y)32
b(only)e(a)h(short)f(usage)h(synopsis)e(for)i(eac)m(h)g
-Fq(pattern)630 3009 y Ft(The)f(return)f(status)i(is)f(zero)h(unless)f
-(no)g(command)h(matc)m(hes)g Fq(pattern)p Ft(.)150 3170
-y Fs(let)870 3305 y(let)47 b Fi(expression)55 b Fs([)p
-Fi(expression)h Fs(...)o(])630 3440 y Ft(The)41 b Fs(let)g
+Fq(pattern)630 3823 y Ft(The)f(return)f(status)i(is)f(zero)h(unless)f
+(no)g(command)h(matc)m(hes)g Fq(pattern)p Ft(.)150 3983
+y Fs(let)870 4118 y(let)47 b Fi(expression)55 b Fs([)p
+Fi(expression)h Fs(...)o(])630 4253 y Ft(The)41 b Fs(let)g
Ft(builtin)g(allo)m(ws)i(arithmetic)f(to)h(b)s(e)d(p)s(erformed)g(on)i
-(shell)g(v)-5 b(ariables.)74 b(Eac)m(h)630 3550 y Fq(expression)31
+(shell)g(v)-5 b(ariables.)74 b(Eac)m(h)630 4362 y Fq(expression)31
b Ft(is)g(ev)-5 b(aluated)32 b(according)f(to)h(the)f(rules)g(giv)m(en)
-h(b)s(elo)m(w)f(in)f(Section)i(6.5)g([Shell)630 3660
+h(b)s(elo)m(w)f(in)f(Section)i(6.5)g([Shell)630 4472
y(Arithmetic],)51 b(page)46 b(87.)87 b(If)45 b(the)g(last)h
Fq(expression)g Ft(ev)-5 b(aluates)47 b(to)f(0,)k Fs(let)44
-b Ft(returns)g(1;)630 3769 y(otherwise)31 b(0)g(is)f(returned.)150
-3930 y Fs(local)870 4065 y(local)46 b([)p Fi(option)11
+b Ft(returns)g(1;)630 4581 y(otherwise)31 b(0)g(is)f(returned.)150
+4741 y Fs(local)870 4876 y(local)46 b([)p Fi(option)11
b Fs(])45 b Fi(name)11 b Fs([=)p Fi(value)g Fs(])44 b(...)630
-4200 y Ft(F)-8 b(or)26 b(eac)m(h)h(argumen)m(t,)g(a)e(lo)s(cal)i(v)-5
+5011 y Ft(F)-8 b(or)26 b(eac)m(h)h(argumen)m(t,)g(a)e(lo)s(cal)i(v)-5
b(ariable)26 b(named)f Fq(name)31 b Ft(is)25 b(created,)j(and)d
-(assigned)g Fq(v)-5 b(alue)5 b Ft(.)630 4310 y(The)37
+(assigned)g Fq(v)-5 b(alue)5 b Ft(.)630 5121 y(The)37
b Fq(option)h Ft(can)f(b)s(e)g(an)m(y)h(of)f(the)h(options)g(accepted)g
(b)m(y)g Fs(declare)p Ft(.)59 b Fs(local)36 b Ft(can)i(only)630
-4419 y(b)s(e)j(used)h(within)f(a)i(function;)48 b(it)42
+5230 y(b)s(e)j(used)h(within)f(a)i(function;)48 b(it)42
b(mak)m(es)h(the)f(v)-5 b(ariable)43 b Fq(name)48 b Ft(ha)m(v)m(e)43
-b(a)f(visible)h(scop)s(e)630 4529 y(restricted)c(to)g(that)g(function)f
+b(a)f(visible)h(scop)s(e)630 5340 y(restricted)c(to)g(that)g(function)f
(and)f(its)i(c)m(hildren.)64 b(The)38 b(return)f(status)h(is)h(zero)g
-(unless)630 4639 y Fs(local)g Ft(is)h(used)g(outside)g(a)h(function,)h
-(an)e(in)m(v)-5 b(alid)41 b Fq(name)46 b Ft(is)40 b(supplied,)i(or)e
-Fq(name)45 b Ft(is)c(a)630 4748 y(readonly)30 b(v)-5
-b(ariable.)150 4909 y Fs(logout)870 5044 y(logout)46
-b([)p Fi(n)11 b Fs(])630 5179 y Ft(Exit)31 b(a)g(login)g(shell,)g
-(returning)e(a)i(status)g(of)f Fq(n)g Ft(to)h(the)g(shell's)f(paren)m
-(t.)150 5340 y Fs(mapfile)p eop end
+(unless)p eop end
%%Page: 54 60
TeXDict begin 54 59 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(54)870 299 y Fs(mapfile)46
-b([-n)h Fi(count)11 b Fs(])45 b([-O)i Fi(origin)11 b
-Fs(])46 b([-s)g Fi(count)11 b Fs(])46 b([-t])h([-u)g
-Fi(fd)11 b Fs(])1061 408 y([-C)47 b Fi(callback)11 b
-Fs(])45 b([-c)i Fi(quantum)11 b Fs(])45 b([)p Fi(array)11
-b Fs(])630 540 y Ft(Read)37 b(lines)g(from)f(the)h(standard)f(input)g
+b(Shell)30 b(Builtin)h(Commands)2069 b(54)630 299 y Fs(local)39
+b Ft(is)h(used)g(outside)g(a)h(function,)h(an)e(in)m(v)-5
+b(alid)41 b Fq(name)46 b Ft(is)40 b(supplied,)i(or)e
+Fq(name)45 b Ft(is)c(a)630 408 y(readonly)30 b(v)-5 b(ariable.)150
+565 y Fs(logout)870 697 y(logout)46 b([)p Fi(n)11 b Fs(])630
+830 y Ft(Exit)31 b(a)g(login)g(shell,)g(returning)e(a)i(status)g(of)f
+Fq(n)g Ft(to)h(the)g(shell's)f(paren)m(t.)150 986 y Fs(mapfile)870
+1119 y(mapfile)46 b([-n)h Fi(count)11 b Fs(])45 b([-O)i
+Fi(origin)11 b Fs(])46 b([-s)g Fi(count)11 b Fs(])46
+b([-t])h([-u)g Fi(fd)11 b Fs(])1061 1229 y([-C)47 b Fi(callback)11
+b Fs(])45 b([-c)i Fi(quantum)11 b Fs(])45 b([)p Fi(array)11
+b Fs(])630 1362 y Ft(Read)37 b(lines)g(from)f(the)h(standard)f(input)g
(in)m(to)h(the)g(indexed)f(arra)m(y)i(v)-5 b(ariable)37
-b Fq(arra)m(y)8 b Ft(,)39 b(or)630 650 y(from)c(\014le)h(descriptor)g
+b Fq(arra)m(y)8 b Ft(,)39 b(or)630 1471 y(from)c(\014le)h(descriptor)g
Fq(fd)j Ft(if)d(the)g(`)p Fs(-u)p Ft(')g(option)g(is)g(supplied.)56
b(The)35 b(v)-5 b(ariable)37 b Fs(MAPFILE)d Ft(is)630
-759 y(the)d(default)f Fq(arra)m(y)8 b Ft(.)41 b(Options,)30
+1581 y(the)d(default)f Fq(arra)m(y)8 b Ft(.)41 b(Options,)30
b(if)h(supplied,)e(ha)m(v)m(e)j(the)e(follo)m(wing)i(meanings:)630
-913 y Fs(-n)384 b Ft(Cop)m(y)30 b(at)h(most)g Fq(coun)m(t)i
+1737 y Fs(-n)384 b Ft(Cop)m(y)30 b(at)h(most)g Fq(coun)m(t)i
Ft(lines.)41 b(If)30 b Fq(coun)m(t)j Ft(is)d(0,)h(all)h(lines)e(are)h
-(copied.)630 1066 y Fs(-O)384 b Ft(Begin)31 b(assigning)g(to)g
+(copied.)630 1893 y Fs(-O)384 b Ft(Begin)31 b(assigning)g(to)g
Fq(arra)m(y)39 b Ft(at)31 b(index)f Fq(origin)p Ft(.)41
-b(The)30 b(default)h(index)f(is)g(0.)630 1219 y Fs(-s)384
+b(The)30 b(default)h(index)f(is)g(0.)630 2049 y Fs(-s)384
b Ft(Discard)31 b(the)f(\014rst)g Fq(coun)m(t)j Ft(lines)e(read.)630
-1373 y Fs(-t)384 b Ft(Remo)m(v)m(e)32 b(a)f(trailing)g(newline)g(from)f
-(eac)m(h)h(line)g(read.)630 1526 y Fs(-u)384 b Ft(Read)31
+2205 y Fs(-t)384 b Ft(Remo)m(v)m(e)32 b(a)f(trailing)g(newline)g(from)f
+(eac)m(h)h(line)g(read.)630 2361 y Fs(-u)384 b Ft(Read)31
b(lines)f(from)g(\014le)h(descriptor)f Fq(fd)j Ft(instead)e(of)f(the)h
-(standard)e(input.)630 1680 y Fs(-C)384 b Ft(Ev)-5 b(aluate)43
+(standard)e(input.)630 2517 y Fs(-C)384 b Ft(Ev)-5 b(aluate)43
b Fq(callbac)m(k)49 b Ft(eac)m(h)42 b(time)g Fq(quan)m(tum)p
Ft(P)f(lines)h(are)f(read.)74 b(The)41 b(`)p Fs(-c)p
-Ft(')1110 1789 y(option)31 b(sp)s(eci\014es)f Fq(quan)m(tum)p
-Ft(.)630 1943 y Fs(-c)384 b Ft(Sp)s(ecify)30 b(the)g(n)m(um)m(b)s(er)f
+Ft(')1110 2627 y(option)31 b(sp)s(eci\014es)f Fq(quan)m(tum)p
+Ft(.)630 2783 y Fs(-c)384 b Ft(Sp)s(ecify)30 b(the)g(n)m(um)m(b)s(er)f
(of)i(lines)f(read)h(b)s(et)m(w)m(een)g(eac)m(h)g(call)h(to)f
-Fq(callbac)m(k)6 b Ft(.)630 2096 y(If)36 b(`)p Fs(-C)p
+Fq(callbac)m(k)6 b Ft(.)630 2939 y(If)36 b(`)p Fs(-C)p
Ft(')g(is)h(sp)s(eci\014ed)f(without)g(`)p Fs(-c)p Ft(',)i(the)f
(default)f(quan)m(tum)g(is)h(5000.)61 b(When)36 b Fq(callbac)m(k)630
-2206 y Ft(is)e(ev)-5 b(aluated,)36 b(it)f(is)f(supplied)f(the)h(index)f
+3049 y Ft(is)e(ev)-5 b(aluated,)36 b(it)f(is)f(supplied)f(the)h(index)f
(of)h(the)h(next)f(arra)m(y)g(elemen)m(t)i(to)e(b)s(e)g(assigned)630
-2315 y(and)f(the)g(line)h(to)f(b)s(e)g(assigned)g(to)h(that)g(elemen)m
+3158 y(and)f(the)g(line)h(to)f(b)s(e)g(assigned)g(to)h(that)g(elemen)m
(t)h(as)e(additional)h(argumen)m(ts.)50 b Fq(callbac)m(k)630
-2425 y Ft(is)30 b(ev)-5 b(aluated)32 b(after)f(the)f(line)h(is)g(read)f
+3268 y Ft(is)30 b(ev)-5 b(aluated)32 b(after)f(the)f(line)h(is)g(read)f
(but)g(b)s(efore)f(the)i(arra)m(y)g(elemen)m(t)h(is)e(assigned.)630
-2556 y(If)25 b(not)g(supplied)f(with)h(an)g(explicit)i(origin,)g
+3401 y(If)25 b(not)g(supplied)f(with)h(an)g(explicit)i(origin,)g
Fs(mapfile)c Ft(will)j(clear)g Fq(arra)m(y)34 b Ft(b)s(efore)24
-b(assigning)630 2666 y(to)31 b(it.)630 2798 y Fs(mapfile)41
+b(assigning)630 3510 y(to)31 b(it.)630 3643 y Fs(mapfile)41
b Ft(returns)g(successfully)i(unless)e(an)i(in)m(v)-5
b(alid)43 b(option)g(or)g(option)g(argumen)m(t)g(is)630
-2907 y(supplied,)29 b Fq(arra)m(y)39 b Ft(is)30 b(in)m(v)-5
+3753 y(supplied,)29 b Fq(arra)m(y)39 b Ft(is)30 b(in)m(v)-5
b(alid)31 b(or)g(unassignable,)f(or)h Fq(arra)m(y)38
b Ft(is)31 b(not)f(an)h(indexed)e(arra)m(y)-8 b(.)150
-3061 y Fs(printf)870 3192 y(printf)46 b([-v)h Fi(var)11
+3909 y Fs(printf)870 4042 y(printf)46 b([-v)h Fi(var)11
b Fs(])46 b Fi(format)57 b Fs([)p Fi(arguments)11 b Fs(])630
-3324 y Ft(W)-8 b(rite)27 b(the)g(formatted)f Fq(argumen)m(ts)k
+4174 y Ft(W)-8 b(rite)27 b(the)g(formatted)f Fq(argumen)m(ts)k
Ft(to)d(the)f(standard)f(output)h(under)e(the)i(con)m(trol)i(of)e(the)
-630 3433 y Fq(format)r Ft(.)57 b(The)35 b(`)p Fs(-v)p
+630 4284 y Fq(format)r Ft(.)57 b(The)35 b(`)p Fs(-v)p
Ft(')h(option)g(causes)g(the)g(output)g(to)g(b)s(e)f(assigned)h(to)h
-(the)e(v)-5 b(ariable)37 b Fq(v)-5 b(ar)630 3543 y Ft(rather)30
+(the)e(v)-5 b(ariable)37 b Fq(v)-5 b(ar)630 4394 y Ft(rather)30
b(than)g(b)s(eing)g(prin)m(ted)g(to)h(the)g(standard)e(output.)630
-3674 y(The)36 b Fq(format)i Ft(is)f(a)f(c)m(haracter)i(string)e(whic)m
+4526 y(The)36 b Fq(format)i Ft(is)f(a)f(c)m(haracter)i(string)e(whic)m
(h)g(con)m(tains)i(three)e(t)m(yp)s(es)g(of)h(ob)5 b(jects:)53
-b(plain)630 3784 y(c)m(haracters,)41 b(whic)m(h)c(are)h(simply)e
+b(plain)630 4636 y(c)m(haracters,)41 b(whic)m(h)c(are)h(simply)e
(copied)i(to)g(standard)f(output,)i(c)m(haracter)g(escap)s(e)e(se-)630
-3893 y(quences,)g(whic)m(h)f(are)g(con)m(v)m(erted)h(and)f(copied)g(to)
-g(the)g(standard)f(output,)i(and)f(format)630 4003 y(sp)s
+4746 y(quences,)g(whic)m(h)f(are)g(con)m(v)m(erted)h(and)f(copied)g(to)
+g(the)g(standard)f(output,)i(and)f(format)630 4855 y(sp)s
(eci\014cations,)i(eac)m(h)g(of)e(whic)m(h)g(causes)g(prin)m(ting)g(of)
g(the)h(next)f(successiv)m(e)h Fq(argumen)m(t)r Ft(.)630
-4113 y(In)24 b(addition)h(to)g(the)g(standard)f Fs(printf\(1\))e
+4965 y(In)24 b(addition)h(to)g(the)g(standard)f Fs(printf\(1\))e
Ft(formats,)27 b Fs(printf)c Ft(in)m(terprets)i(the)f(follo)m(wing)630
-4222 y(extensions:)630 4376 y Fs(\045b)384 b Ft(Causes)30
+5074 y(extensions:)630 5230 y Fs(\045b)384 b Ft(Causes)30
b Fs(printf)e Ft(to)j(expand)f(bac)m(kslash)h(escap)s(e)f(sequences)h
-(in)f(the)g(corre-)1110 4485 y(sp)s(onding)19 b Fq(argumen)m(t)r
+(in)f(the)g(corre-)1110 5340 y(sp)s(onding)19 b Fq(argumen)m(t)r
Ft(,)k(except)f(that)f(`)p Fs(\\c)p Ft(')g(terminates)h(output,)g(bac)m
-(kslashes)1110 4595 y(in)27 b(`)p Fs(\\')p Ft(',)h(`)p
-Fs(\\")p Ft(',)g(and)f(`)p Fs(\\?)p Ft(')g(are)h(not)f(remo)m(v)m(ed,)j
-(and)c(o)s(ctal)j(escap)s(es)f(b)s(eginning)1110 4704
-y(with)i(`)p Fs(\\0)p Ft(')g(ma)m(y)h(con)m(tain)h(up)d(to)i(four)f
-(digits.)630 4858 y Fs(\045q)384 b Ft(Causes)32 b Fs(printf)e
-Ft(to)i(output)g(the)g(corresp)s(onding)f Fq(argumen)m(t)j
-Ft(in)d(a)i(format)1110 4967 y(that)e(can)g(b)s(e)e(reused)h(as)h
-(shell)f(input.)630 5121 y Fs(\045\()p Fi(datefmt)11
-b Fs(\)T)1110 5230 y Ft(Causes)29 b Fs(printf)e Ft(to)j(output)f(the)g
-(date-time)i(string)e(resulting)h(from)e(using)1110 5340
-y Fq(datefm)m(t)45 b Ft(as)d(a)g(format)g(string)g(for)g
-Fs(strftime)p Ft(\(3\).)74 b(The)41 b(corresp)s(onding)p
-eop end
+(kslashes)p eop end
%%Page: 55 61
TeXDict begin 55 60 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(55)1110 299 y
-Fq(argumen)m(t)42 b Ft(is)e(an)g(in)m(teger)i(represen)m(ting)e(the)g
-(n)m(um)m(b)s(er)f(of)h(seconds)g(since)1110 408 y(the)24
-b(ep)s(o)s(c)m(h.)38 b(Tw)m(o)24 b(sp)s(ecial)h(argumen)m(t)f(v)-5
-b(alues)24 b(ma)m(y)h(b)s(e)e(used:)36 b(-1)25 b(represen)m(ts)1110
-518 y(the)30 b(curren)m(t)g(time,)h(and)e(-2)i(represen)m(ts)f(the)g
-(time)h(the)f(shell)g(w)m(as)g(in)m(v)m(ok)m(ed.)1110
-628 y(If)38 b(no)g(argumen)m(t)h(is)f(sp)s(eci\014ed,)i(con)m(v)m
+b(Shell)30 b(Builtin)h(Commands)2069 b(55)1110 299 y(in)27
+b(`)p Fs(\\')p Ft(',)h(`)p Fs(\\")p Ft(',)g(and)f(`)p
+Fs(\\?)p Ft(')g(are)h(not)f(remo)m(v)m(ed,)j(and)c(o)s(ctal)j(escap)s
+(es)f(b)s(eginning)1110 408 y(with)i(`)p Fs(\\0)p Ft(')g(ma)m(y)h(con)m
+(tain)h(up)d(to)i(four)f(digits.)630 587 y Fs(\045q)384
+b Ft(Causes)32 b Fs(printf)e Ft(to)i(output)g(the)g(corresp)s(onding)f
+Fq(argumen)m(t)j Ft(in)d(a)i(format)1110 696 y(that)e(can)g(b)s(e)e
+(reused)h(as)h(shell)f(input.)630 874 y Fs(\045\()p Fi(datefmt)11
+b Fs(\)T)1110 984 y Ft(Causes)29 b Fs(printf)e Ft(to)j(output)f(the)g
+(date-time)i(string)e(resulting)h(from)e(using)1110 1093
+y Fq(datefm)m(t)45 b Ft(as)d(a)g(format)g(string)g(for)g
+Fs(strftime)p Ft(\(3\).)74 b(The)41 b(corresp)s(onding)1110
+1203 y Fq(argumen)m(t)h Ft(is)e(an)g(in)m(teger)i(represen)m(ting)e
+(the)g(n)m(um)m(b)s(er)f(of)h(seconds)g(since)1110 1313
+y(the)24 b(ep)s(o)s(c)m(h.)38 b(Tw)m(o)24 b(sp)s(ecial)h(argumen)m(t)f
+(v)-5 b(alues)24 b(ma)m(y)h(b)s(e)e(used:)36 b(-1)25
+b(represen)m(ts)1110 1422 y(the)30 b(curren)m(t)g(time,)h(and)e(-2)i
+(represen)m(ts)f(the)g(time)h(the)f(shell)g(w)m(as)g(in)m(v)m(ok)m(ed.)
+1110 1532 y(If)38 b(no)g(argumen)m(t)h(is)f(sp)s(eci\014ed,)i(con)m(v)m
(ersion)f(b)s(eha)m(v)m(es)g(as)g(if)f(-1)h(had)f(b)s(een)1110
-737 y(giv)m(en.)k(This)29 b(is)i(an)f(exception)i(to)f(the)f(usual)g
-Fs(printf)f Ft(b)s(eha)m(vior.)630 883 y(Argumen)m(ts)f(to)h
+1641 y(giv)m(en.)k(This)29 b(is)i(an)f(exception)i(to)f(the)f(usual)g
+Fs(printf)f Ft(b)s(eha)m(vior.)630 1819 y(Argumen)m(ts)f(to)h
(non-string)e(format)i(sp)s(eci\014ers)e(are)h(treated)h(as)g(C)e
-(language)j(constan)m(ts,)630 993 y(except)22 b(that)g(a)g(leading)g
+(language)j(constan)m(ts,)630 1929 y(except)22 b(that)g(a)g(leading)g
(plus)e(or)h(min)m(us)f(sign)i(is)f(allo)m(w)m(ed,)k(and)c(if)g(the)g
-(leading)h(c)m(haracter)h(is)630 1103 y(a)i(single)g(or)f(double)h
+(leading)h(c)m(haracter)h(is)630 2039 y(a)i(single)g(or)f(double)h
(quote,)h(the)f(v)-5 b(alue)25 b(is)f(the)h(ASCI)s(I)e(v)-5
b(alue)25 b(of)f(the)h(follo)m(wing)h(c)m(haracter.)630
-1230 y(The)31 b Fq(format)i Ft(is)e(reused)f(as)i(necessary)f(to)h
+2182 y(The)31 b Fq(format)i Ft(is)e(reused)f(as)i(necessary)f(to)h
(consume)f(all)h(of)f(the)g Fq(argumen)m(ts)t Ft(.)43
-b(If)31 b(the)g Fq(for-)630 1340 y(mat)d Ft(requires)e(more)g
+b(If)31 b(the)g Fq(for-)630 2292 y(mat)d Ft(requires)e(more)g
Fq(argumen)m(ts)k Ft(than)25 b(are)i(supplied,)e(the)h(extra)h(format)f
-(sp)s(eci\014cations)630 1450 y(b)s(eha)m(v)m(e)j(as)g(if)f(a)h(zero)g
+(sp)s(eci\014cations)630 2402 y(b)s(eha)m(v)m(e)j(as)g(if)f(a)h(zero)g
(v)-5 b(alue)29 b(or)g(n)m(ull)f(string,)h(as)g(appropriate,)g(had)f(b)
-s(een)g(supplied.)38 b(The)630 1559 y(return)29 b(v)-5
+s(een)g(supplied.)38 b(The)630 2511 y(return)29 b(v)-5
b(alue)31 b(is)g(zero)g(on)f(success,)h(non-zero)g(on)f(failure.)150
-1705 y Fs(read)870 1833 y(read)47 b([-ers])f([-a)h Fi(aname)11
+2689 y Fs(read)870 2833 y(read)47 b([-ers])f([-a)h Fi(aname)11
b Fs(])45 b([-d)i Fi(delim)11 b Fs(])46 b([-i)h Fi(text)11
-b Fs(])46 b([-n)g Fi(nchars)11 b Fs(])1061 1943 y([-N)47
+b Fs(])46 b([-n)g Fi(nchars)11 b Fs(])1061 2943 y([-N)47
b Fi(nchars)11 b Fs(])45 b([-p)i Fi(prompt)11 b Fs(])45
b([-t)i Fi(timeout)11 b Fs(])45 b([-u)i Fi(fd)11 b Fs(])47
-b([)p Fi(name)57 b Fs(...)o(])630 2071 y Ft(One)26 b(line)h(is)g(read)f
+b([)p Fi(name)57 b Fs(...)o(])630 3087 y Ft(One)26 b(line)h(is)g(read)f
(from)h(the)f(standard)g(input,)h(or)g(from)f(the)h(\014le)f
-(descriptor)h Fq(fd)i Ft(supplied)630 2180 y(as)37 b(an)g(argumen)m(t)h
+(descriptor)h Fq(fd)i Ft(supplied)630 3196 y(as)37 b(an)g(argumen)m(t)h
(to)f(the)h(`)p Fs(-u)p Ft(')e(option,)k(and)c(the)i(\014rst)e(w)m(ord)
-g(is)h(assigned)h(to)f(the)h(\014rst)630 2290 y Fq(name)5
+g(is)h(assigned)h(to)f(the)h(\014rst)630 3306 y Fq(name)5
b Ft(,)28 b(the)g(second)g(w)m(ord)f(to)h(the)f(second)h
Fq(name)5 b Ft(,)28 b(and)f(so)h(on,)g(with)f(lefto)m(v)m(er)j(w)m
-(ords)d(and)630 2399 y(their)h(in)m(terv)m(ening)g(separators)g
+(ords)d(and)630 3415 y(their)h(in)m(terv)m(ening)g(separators)g
(assigned)g(to)h(the)e(last)i Fq(name)5 b Ft(.)40 b(If)27
-b(there)h(are)g(few)m(er)f(w)m(ords)630 2509 y(read)44
+b(there)h(are)g(few)m(er)f(w)m(ords)630 3525 y(read)44
b(from)f(the)g(input)g(stream)h(than)g(names,)j(the)c(remaining)h
-(names)g(are)g(assigned)630 2619 y(empt)m(y)31 b(v)-5
+(names)g(are)g(assigned)630 3634 y(empt)m(y)31 b(v)-5
b(alues.)41 b(The)30 b(c)m(haracters)i(in)e(the)h(v)-5
b(alue)31 b(of)g(the)f Fs(IFS)g Ft(v)-5 b(ariable)31
-b(are)g(used)f(to)h(split)630 2728 y(the)e(line)g(in)m(to)h(w)m(ords)f
+b(are)g(used)f(to)h(split)630 3744 y(the)e(line)g(in)m(to)h(w)m(ords)f
(using)f(the)h(same)g(rules)g(the)g(shell)g(uses)f(for)h(expansion)g
-(\(describ)s(ed)630 2838 y(ab)s(o)m(v)m(e)34 b(in)f(Section)g(3.5.7)i
+(\(describ)s(ed)630 3854 y(ab)s(o)m(v)m(e)34 b(in)f(Section)g(3.5.7)i
([W)-8 b(ord)33 b(Splitting],)i(page)e(29\).)49 b(The)33
b(bac)m(kslash)g(c)m(haracter)i(`)p Fs(\\)p Ft(')630
-2947 y(ma)m(y)j(b)s(e)f(used)g(to)h(remo)m(v)m(e)h(an)m(y)f(sp)s(ecial)
+3963 y(ma)m(y)j(b)s(e)f(used)g(to)h(remo)m(v)m(e)h(an)m(y)f(sp)s(ecial)
g(meaning)f(for)h(the)f(next)h(c)m(haracter)h(read)f(and)630
-3057 y(for)i(line)h(con)m(tin)m(uation.)73 b(If)40 b(no)h(names)f(are)h
+4073 y(for)i(line)h(con)m(tin)m(uation.)73 b(If)40 b(no)h(names)f(are)h
(supplied,)h(the)f(line)f(read)h(is)f(assigned)h(to)630
-3166 y(the)34 b(v)-5 b(ariable)35 b Fs(REPLY)p Ft(.)51
+4182 y(the)34 b(v)-5 b(ariable)35 b Fs(REPLY)p Ft(.)51
b(The)33 b(return)g(co)s(de)i(is)f(zero,)i(unless)e(end-of-\014le)g(is)
-g(encoun)m(tered,)630 3276 y Fs(read)d Ft(times)i(out)g(\(in)g(whic)m
+g(encoun)m(tered,)630 4292 y Fs(read)d Ft(times)i(out)g(\(in)g(whic)m
(h)f(case)h(the)g(return)e(co)s(de)i(is)g(greater)g(than)f(128\),)j(a)e
-(v)-5 b(ariable)630 3386 y(assignmen)m(t)27 b(error)e(\(suc)m(h)h(as)g
+(v)-5 b(ariable)630 4402 y(assignmen)m(t)27 b(error)e(\(suc)m(h)h(as)g
(assigning)g(to)g(a)h(readonly)e(v)-5 b(ariable\))27
-b(o)s(ccurs,)g(or)f(an)f(in)m(v)-5 b(alid)630 3495 y(\014le)30
+b(o)s(ccurs,)g(or)f(an)f(in)m(v)-5 b(alid)630 4511 y(\014le)30
b(descriptor)h(is)f(supplied)f(as)i(the)f(argumen)m(t)h(to)g(`)p
-Fs(-u)p Ft('.)630 3623 y(Options,)f(if)h(supplied,)e(ha)m(v)m(e)i(the)g
-(follo)m(wing)h(meanings:)630 3769 y Fs(-a)e Fi(aname)114
+Fs(-u)p Ft('.)630 4655 y(Options,)f(if)h(supplied,)e(ha)m(v)m(e)i(the)g
+(follo)m(wing)h(meanings:)630 4833 y Fs(-a)e Fi(aname)114
b Ft(The)34 b(w)m(ords)f(are)i(assigned)f(to)h(sequen)m(tial)h(indices)
-e(of)g(the)g(arra)m(y)h(v)-5 b(ariable)1110 3879 y Fq(aname)5
+e(of)g(the)g(arra)m(y)h(v)-5 b(ariable)1110 4943 y Fq(aname)5
b Ft(,)29 b(starting)g(at)f(0.)40 b(All)29 b(elemen)m(ts)g(are)f(remo)m
-(v)m(ed)h(from)e Fq(aname)33 b Ft(b)s(efore)1110 3988
+(v)m(ed)h(from)e Fq(aname)33 b Ft(b)s(efore)1110 5052
y(the)e(assignmen)m(t.)41 b(Other)30 b Fq(name)36 b Ft(argumen)m(ts)30
-b(are)h(ignored.)630 4134 y Fs(-d)f Fi(delim)114 b Ft(The)41
+b(are)h(ignored.)630 5230 y Fs(-d)f Fi(delim)114 b Ft(The)41
b(\014rst)h(c)m(haracter)h(of)f Fq(delim)g Ft(is)g(used)g(to)g
-(terminate)h(the)f(input)f(line,)1110 4244 y(rather)30
-b(than)g(newline.)630 4390 y Fs(-e)384 b Ft(Readline)46
-b(\(see)g(Chapter)e(8)h([Command)f(Line)h(Editing],)50
-b(page)45 b(102\))i(is)1110 4500 y(used)37 b(to)i(obtain)g(the)f(line.)
+(terminate)h(the)f(input)f(line,)1110 5340 y(rather)30
+b(than)g(newline.)p eop end
+%%Page: 56 62
+TeXDict begin 56 61 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(56)630 299 y Fs(-e)384
+b Ft(Readline)46 b(\(see)g(Chapter)e(8)h([Command)f(Line)h(Editing],)50
+b(page)45 b(102\))i(is)1110 408 y(used)37 b(to)i(obtain)g(the)f(line.)
65 b(Readline)39 b(uses)e(the)i(curren)m(t)f(\(or)g(default,)j(if)1110
-4609 y(line)31 b(editing)g(w)m(as)f(not)h(previously)f(activ)m(e\))j
-(editing)e(settings.)630 4756 y Fs(-i)f Fi(text)162 b
+518 y(line)31 b(editing)g(w)m(as)f(not)h(previously)f(activ)m(e\))j
+(editing)e(settings.)630 671 y Fs(-i)f Fi(text)162 b
Ft(If)36 b(Readline)i(is)f(b)s(eing)g(used)f(to)h(read)g(the)g(line,)j
-Fq(text)f Ft(is)e(placed)h(in)m(to)g(the)1110 4865 y(editing)31
-b(bu\013er)e(b)s(efore)h(editing)h(b)s(egins.)630 5011
-y Fs(-n)f Fi(nchars)1110 5121 y Fs(read)38 b Ft(returns)f(after)j
+Fq(text)f Ft(is)e(placed)h(in)m(to)g(the)1110 781 y(editing)31
+b(bu\013er)e(b)s(efore)h(editing)h(b)s(egins.)630 934
+y Fs(-n)f Fi(nchars)1110 1044 y Fs(read)38 b Ft(returns)f(after)j
(reading)f Fq(nc)m(hars)j Ft(c)m(haracters)e(rather)f(than)g(w)m
-(aiting)1110 5230 y(for)g(a)h(complete)h(line)f(of)f(input,)i(but)e
-(honor)g(a)h(delimiter)g(if)f(few)m(er)h(than)1110 5340
+(aiting)1110 1154 y(for)g(a)h(complete)h(line)f(of)f(input,)i(but)e
+(honor)g(a)h(delimiter)g(if)f(few)m(er)h(than)1110 1263
y Fq(nc)m(hars)34 b Ft(c)m(haracters)e(are)e(read)h(b)s(efore)f(the)g
-(delimiter.)p eop end
-%%Page: 56 62
-TeXDict begin 56 61 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(56)630 299 y Fs(-N)30
-b Fi(nchars)1110 408 y Fs(read)39 b Ft(returns)f(after)j(reading)e
-(exactly)j Fq(nc)m(hars)h Ft(c)m(haracters)f(rather)d(than)1110
-518 y(w)m(aiting)32 b(for)f(a)g(complete)i(line)e(of)g(input,)g(unless)
-f(EOF)h(is)g(encoun)m(tered)g(or)1110 628 y Fs(read)f
-Ft(times)i(out.)43 b(Delimiter)33 b(c)m(haracters)f(encoun)m(tered)g
-(in)f(the)g(input)g(are)1110 737 y(not)g(treated)h(sp)s(ecially)g(and)f
-(do)f(not)i(cause)f Fs(read)f Ft(to)i(return)e(un)m(til)h
-Fq(nc)m(hars)1110 847 y Ft(c)m(haracters)h(are)f(read.)630
-1016 y Fs(-p)f Fi(prompt)1110 1126 y Ft(Displa)m(y)38
+(delimiter.)630 1417 y Fs(-N)g Fi(nchars)1110 1526 y
+Fs(read)39 b Ft(returns)f(after)j(reading)e(exactly)j
+Fq(nc)m(hars)h Ft(c)m(haracters)f(rather)d(than)1110
+1636 y(w)m(aiting)32 b(for)f(a)g(complete)i(line)e(of)g(input,)g
+(unless)f(EOF)h(is)g(encoun)m(tered)g(or)1110 1745 y
+Fs(read)f Ft(times)i(out.)43 b(Delimiter)33 b(c)m(haracters)f(encoun)m
+(tered)g(in)f(the)g(input)g(are)1110 1855 y(not)g(treated)h(sp)s
+(ecially)g(and)f(do)f(not)i(cause)f Fs(read)f Ft(to)i(return)e(un)m
+(til)h Fq(nc)m(hars)1110 1965 y Ft(c)m(haracters)h(are)f(read.)630
+2118 y Fs(-p)f Fi(prompt)1110 2228 y Ft(Displa)m(y)38
b Fq(prompt)r Ft(,)f(without)g(a)f(trailing)i(newline,)g(b)s(efore)e
-(attempting)i(to)1110 1235 y(read)f(an)m(y)h(input.)60
+(attempting)i(to)1110 2337 y(read)f(an)m(y)h(input.)60
b(The)37 b(prompt)g(is)g(displa)m(y)m(ed)h(only)f(if)g(input)g(is)g
-(coming)1110 1345 y(from)30 b(a)h(terminal.)630 1514
+(coming)1110 2447 y(from)30 b(a)h(terminal.)630 2600
y Fs(-r)384 b Ft(If)21 b(this)h(option)g(is)f(giv)m(en,)k(bac)m(kslash)
d(do)s(es)f(not)h(act)h(as)f(an)f(escap)s(e)h(c)m(haracter.)1110
-1624 y(The)30 b(bac)m(kslash)i(is)f(considered)g(to)h(b)s(e)e(part)h
-(of)g(the)g(line.)43 b(In)30 b(particular,)i(a)1110 1733
+2710 y(The)30 b(bac)m(kslash)i(is)f(considered)g(to)h(b)s(e)e(part)h
+(of)g(the)g(line.)43 b(In)30 b(particular,)i(a)1110 2819
y(bac)m(kslash-newline)f(pair)f(ma)m(y)h(not)g(b)s(e)f(used)f(as)i(a)g
-(line)f(con)m(tin)m(uation.)630 1903 y Fs(-s)384 b Ft(Silen)m(t)28
+(line)f(con)m(tin)m(uation.)630 2973 y Fs(-s)384 b Ft(Silen)m(t)28
b(mo)s(de.)40 b(If)27 b(input)f(is)i(coming)g(from)f(a)h(terminal,)h(c)
-m(haracters)g(are)f(not)1110 2012 y(ec)m(ho)s(ed.)630
-2182 y Fs(-t)i Fi(timeout)1110 2291 y Ft(Cause)42 b Fs(read)g
+m(haracters)g(are)f(not)1110 3082 y(ec)m(ho)s(ed.)630
+3236 y Fs(-t)i Fi(timeout)1110 3345 y Ft(Cause)42 b Fs(read)g
Ft(to)h(time)h(out)f(and)f(return)f(failure)i(if)g(a)g(complete)h(line)
-f(of)1110 2401 y(input)26 b(\(or)h(a)g(sp)s(eci\014ed)f(n)m(um)m(b)s
+f(of)1110 3455 y(input)26 b(\(or)h(a)g(sp)s(eci\014ed)f(n)m(um)m(b)s
(er)g(of)h(c)m(haracters\))h(is)f(not)g(read)g(within)f
-Fq(time-)1110 2511 y(out)37 b Ft(seconds.)53 b Fq(timeout)38
+Fq(time-)1110 3565 y(out)37 b Ft(seconds.)53 b Fq(timeout)38
b Ft(ma)m(y)d(b)s(e)f(a)h(decimal)h(n)m(um)m(b)s(er)d(with)h(a)h
-(fractional)1110 2620 y(p)s(ortion)29 b(follo)m(wing)h(the)f(decimal)h
+(fractional)1110 3674 y(p)s(ortion)29 b(follo)m(wing)h(the)f(decimal)h
(p)s(oin)m(t.)40 b(This)29 b(option)g(is)g(only)g(e\013ectiv)m(e)j(if)
-1110 2730 y Fs(read)j Ft(is)i(reading)g(input)e(from)h(a)h(terminal,)i
-(pip)s(e,)e(or)g(other)f(sp)s(ecial)i(\014le;)1110 2839
+1110 3784 y Fs(read)j Ft(is)i(reading)g(input)e(from)h(a)h(terminal,)i
+(pip)s(e,)e(or)g(other)f(sp)s(ecial)i(\014le;)1110 3893
y(it)31 b(has)g(no)g(e\013ect)h(when)e(reading)h(from)g(regular)g
(\014les.)42 b(If)30 b Fs(read)g Ft(times)h(out,)1110
-2949 y Fs(read)d Ft(sa)m(v)m(es)i(an)m(y)g(partial)g(input)e(read)h(in)
+4003 y Fs(read)d Ft(sa)m(v)m(es)i(an)m(y)g(partial)g(input)e(read)h(in)
m(to)h(the)f(sp)s(eci\014ed)g(v)-5 b(ariable)30 b Fq(name)5
-b Ft(.)1110 3059 y(If)35 b Fq(timeout)j Ft(is)e(0,)h
+b Ft(.)1110 4113 y(If)35 b Fq(timeout)j Ft(is)e(0,)h
Fs(read)e Ft(returns)f(immediately)-8 b(,)39 b(without)c(trying)h(to)g
-(read)1110 3168 y(and)30 b(data.)44 b(The)30 b(exit)i(status)f(is)g(0)g
+(read)1110 4222 y(and)30 b(data.)44 b(The)30 b(exit)i(status)f(is)g(0)g
(if)g(input)f(is)h(a)m(v)-5 b(ailable)34 b(on)c(the)i(sp)s(eci\014ed)
-1110 3278 y(\014le)g(descriptor,)g(non-zero)h(otherwise.)46
-b(The)31 b(exit)i(status)f(is)g(greater)h(than)1110 3387
-y(128)f(if)e(the)h(timeout)g(is)f(exceeded.)630 3557
+1110 4332 y(\014le)g(descriptor,)g(non-zero)h(otherwise.)46
+b(The)31 b(exit)i(status)f(is)g(greater)h(than)1110 4441
+y(128)f(if)e(the)h(timeout)g(is)f(exceeded.)630 4595
y Fs(-u)g Fi(fd)258 b Ft(Read)31 b(input)e(from)h(\014le)g(descriptor)h
-Fq(fd)t Ft(.)150 3726 y Fs(readarray)870 3836 y(readarray)45
+Fq(fd)t Ft(.)150 4748 y Fs(readarray)870 4858 y(readarray)45
b([-n)i Fi(count)11 b Fs(])46 b([-O)h Fi(origin)11 b
Fs(])45 b([-s)i Fi(count)11 b Fs(])46 b([-t])g([-u)h
-Fi(fd)11 b Fs(])1061 3945 y([-C)47 b Fi(callback)11 b
+Fi(fd)11 b Fs(])1061 4967 y([-C)47 b Fi(callback)11 b
Fs(])45 b([-c)i Fi(quantum)11 b Fs(])45 b([)p Fi(array)11
-b Fs(])630 4085 y Ft(Read)37 b(lines)g(from)f(the)h(standard)f(input)g
+b Fs(])630 5099 y Ft(Read)37 b(lines)g(from)f(the)h(standard)f(input)g
(in)m(to)h(the)g(indexed)f(arra)m(y)i(v)-5 b(ariable)37
-b Fq(arra)m(y)8 b Ft(,)39 b(or)630 4194 y(from)30 b(\014le)g
+b Fq(arra)m(y)8 b Ft(,)39 b(or)630 5208 y(from)30 b(\014le)g
(descriptor)h Fq(fd)i Ft(if)d(the)h(`)p Fs(-u)p Ft(')f(option)h(is)f
-(supplied.)630 4334 y(A)g(synon)m(ym)g(for)g Fs(mapfile)p
-Ft(.)150 4503 y Fs(source)870 4643 y(source)46 b Fi(filename)630
-4782 y Ft(A)30 b(synon)m(ym)g(for)g Fs(.)g Ft(\(see)i(Section)f(4.1)g
-([Bourne)g(Shell)f(Builtins],)h(page)g(41\).)150 4951
-y Fs(type)870 5091 y(type)47 b([-afptP])e([)p Fi(name)57
-b Fs(...)o(])630 5230 y Ft(F)-8 b(or)41 b(eac)m(h)h Fq(name)5
-b Ft(,)44 b(indicate)e(ho)m(w)f(it)g(w)m(ould)f(b)s(e)g(in)m(terpreted)
-h(if)g(used)f(as)h(a)g(command)630 5340 y(name.)p eop
-end
+(supplied.)630 5340 y(A)g(synon)m(ym)g(for)g Fs(mapfile)p
+Ft(.)p eop end
%%Page: 57 63
TeXDict begin 57 62 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(57)630 299 y(If)38
-b(the)g(`)p Fs(-t)p Ft(')g(option)g(is)g(used,)i Fs(type)d
-Ft(prin)m(ts)g(a)i(single)f(w)m(ord)g(whic)m(h)g(is)g(one)g(of)h(`)p
-Fs(alias)p Ft(',)630 408 y(`)p Fs(function)p Ft(',)32
-b(`)p Fs(builtin)p Ft(',)g(`)p Fs(file)p Ft(')g(or)h(`)p
+b(Shell)30 b(Builtin)h(Commands)2069 b(57)150 299 y Fs(source)870
+435 y(source)46 b Fi(filename)630 571 y Ft(A)30 b(synon)m(ym)g(for)g
+Fs(.)g Ft(\(see)i(Section)f(4.1)g([Bourne)g(Shell)f(Builtins],)h(page)g
+(41\).)150 734 y Fs(type)870 870 y(type)47 b([-afptP])e([)p
+Fi(name)57 b Fs(...)o(])630 1006 y Ft(F)-8 b(or)41 b(eac)m(h)h
+Fq(name)5 b Ft(,)44 b(indicate)e(ho)m(w)f(it)g(w)m(ould)f(b)s(e)g(in)m
+(terpreted)h(if)g(used)f(as)h(a)g(command)630 1116 y(name.)630
+1252 y(If)d(the)g(`)p Fs(-t)p Ft(')g(option)g(is)g(used,)i
+Fs(type)d Ft(prin)m(ts)g(a)i(single)f(w)m(ord)g(whic)m(h)g(is)g(one)g
+(of)h(`)p Fs(alias)p Ft(',)630 1362 y(`)p Fs(function)p
+Ft(',)32 b(`)p Fs(builtin)p Ft(',)g(`)p Fs(file)p Ft(')g(or)h(`)p
Fs(keyword)p Ft(',)f(if)h Fq(name)38 b Ft(is)33 b(an)f(alias,)j(shell)e
-(function,)630 518 y(shell)i(builtin,)g(disk)g(\014le,)h(or)e(shell)h
+(function,)630 1471 y(shell)i(builtin,)g(disk)g(\014le,)h(or)e(shell)h
(reserv)m(ed)g(w)m(ord,)h(resp)s(ectiv)m(ely)-8 b(.)55
-b(If)34 b(the)h Fq(name)40 b Ft(is)35 b(not)630 628 y(found,)29
-b(then)h(nothing)h(is)f(prin)m(ted,)g(and)g Fs(type)f
-Ft(returns)g(a)i(failure)g(status.)630 765 y(If)39 b(the)g(`)p
-Fs(-p)p Ft(')g(option)h(is)f(used,)i Fs(type)d Ft(either)h(returns)f
-(the)i(name)f(of)g(the)g(disk)g(\014le)g(that)630 874
-y(w)m(ould)30 b(b)s(e)g(executed,)h(or)g(nothing)f(if)g(`)p
-Fs(-t)p Ft(')h(w)m(ould)f(not)g(return)g(`)p Fs(file)p
-Ft('.)630 1011 y(The)23 b(`)p Fs(-P)p Ft(')g(option)h(forces)g(a)g
+b(If)34 b(the)h Fq(name)40 b Ft(is)35 b(not)630 1581
+y(found,)29 b(then)h(nothing)h(is)f(prin)m(ted,)g(and)g
+Fs(type)f Ft(returns)g(a)i(failure)g(status.)630 1717
+y(If)39 b(the)g(`)p Fs(-p)p Ft(')g(option)h(is)f(used,)i
+Fs(type)d Ft(either)h(returns)f(the)i(name)f(of)g(the)g(disk)g(\014le)g
+(that)630 1826 y(w)m(ould)30 b(b)s(e)g(executed,)h(or)g(nothing)f(if)g
+(`)p Fs(-t)p Ft(')h(w)m(ould)f(not)g(return)g(`)p Fs(file)p
+Ft('.)630 1963 y(The)23 b(`)p Fs(-P)p Ft(')g(option)h(forces)g(a)g
(path)f(searc)m(h)h(for)f(eac)m(h)h Fq(name)5 b Ft(,)26
b(ev)m(en)e(if)f(`)p Fs(-t)p Ft(')g(w)m(ould)g(not)h(return)630
-1121 y(`)p Fs(file)p Ft('.)630 1258 y(If)41 b(a)h(command)f(is)h
+2072 y(`)p Fs(file)p Ft('.)630 2208 y(If)41 b(a)h(command)f(is)h
(hashed,)i(`)p Fs(-p)p Ft(')d(and)g(`)p Fs(-P)p Ft(')g(prin)m(t)g(the)h
-(hashed)f(v)-5 b(alue,)45 b(whic)m(h)c(is)h(not)630 1367
+(hashed)f(v)-5 b(alue,)45 b(whic)m(h)c(is)h(not)630 2318
y(necessarily)31 b(the)g(\014le)f(that)h(app)s(ears)f(\014rst)g(in)g
-Fs($PATH)p Ft(.)630 1504 y(If)36 b(the)h(`)p Fs(-a)p
+Fs($PATH)p Ft(.)630 2454 y(If)36 b(the)h(`)p Fs(-a)p
Ft(')g(option)g(is)g(used,)g Fs(type)f Ft(returns)f(all)j(of)f(the)g
-(places)g(that)g(con)m(tain)h(an)f(exe-)630 1614 y(cutable)d(named)f
+(places)g(that)g(con)m(tain)h(an)f(exe-)630 2564 y(cutable)d(named)f
Fq(\014le)5 b Ft(.)49 b(This)32 b(includes)h(aliases)i(and)d
(functions,)i(if)f(and)f(only)i(if)f(the)g(`)p Fs(-p)p
-Ft(')630 1724 y(option)e(is)f(not)h(also)g(used.)630
-1861 y(If)26 b(the)h(`)p Fs(-f)p Ft(')g(option)g(is)g(used,)g
+Ft(')630 2673 y(option)e(is)f(not)h(also)g(used.)630
+2809 y(If)26 b(the)h(`)p Fs(-f)p Ft(')g(option)g(is)g(used,)g
Fs(type)e Ft(do)s(es)i(not)g(attempt)g(to)h(\014nd)d(shell)i
-(functions,)g(as)g(with)630 1970 y(the)k Fs(command)d
-Ft(builtin.)630 2107 y(The)j(return)f(status)h(is)g(zero)h(if)f(all)h
+(functions,)g(as)g(with)630 2919 y(the)k Fs(command)d
+Ft(builtin.)630 3055 y(The)j(return)f(status)h(is)g(zero)h(if)f(all)h
(of)f(the)h Fq(names)i Ft(are)e(found,)e(non-zero)i(if)f(an)m(y)g(are)h
-(not)630 2217 y(found.)150 2381 y Fs(typeset)870 2518
+(not)630 3165 y(found.)150 3328 y Fs(typeset)870 3464
y(typeset)46 b([-afFgrxilnrtux])d([-p])k([)p Fi(name)11
-b Fs([=)p Fi(value)g Fs(])43 b(...)o(])630 2655 y Ft(The)31
+b Fs([=)p Fi(value)g Fs(])43 b(...)o(])630 3600 y Ft(The)31
b Fs(typeset)e Ft(command)i(is)g(supplied)f(for)h(compatibilit)m(y)i
-(with)e(the)g(Korn)f(shell.)44 b(It)31 b(is)630 2765
+(with)e(the)g(Korn)f(shell.)44 b(It)31 b(is)630 3709
y(a)g(synon)m(ym)f(for)g(the)g Fs(declare)f Ft(builtin)h(command.)150
-2929 y Fs(ulimit)870 3066 y(ulimit)46 b([-abcdefilmnpqrstuvxHST])41
-b([)p Fi(limit)11 b Fs(])630 3203 y(ulimit)25 b Ft(pro)m(vides)h(con)m
+3872 y Fs(ulimit)870 4008 y(ulimit)46 b([-abcdefilmnpqrstuvxHST])41
+b([)p Fi(limit)11 b Fs(])630 4144 y(ulimit)25 b Ft(pro)m(vides)h(con)m
(trol)i(o)m(v)m(er)g(the)f(resources)f(a)m(v)-5 b(ailable)29
-b(to)e(pro)s(cesses)f(started)h(b)m(y)g(the)630 3313
+b(to)e(pro)s(cesses)f(started)h(b)m(y)g(the)630 4254
y(shell,)i(on)f(systems)g(that)h(allo)m(w)h(suc)m(h)e(con)m(trol.)41
b(If)28 b(an)g(option)h(is)f(giv)m(en,)i(it)e(is)h(in)m(terpreted)630
-3422 y(as)i(follo)m(ws:)630 3587 y Fs(-S)384 b Ft(Change)30
+4364 y(as)i(follo)m(ws:)630 4526 y Fs(-S)384 b Ft(Change)30
b(and)g(rep)s(ort)g(the)g(soft)h(limit)g(asso)s(ciated)h(with)e(a)h
-(resource.)630 3751 y Fs(-H)384 b Ft(Change)30 b(and)g(rep)s(ort)g(the)
+(resource.)630 4689 y Fs(-H)384 b Ft(Change)30 b(and)g(rep)s(ort)g(the)
g(hard)g(limit)h(asso)s(ciated)h(with)e(a)h(resource.)630
-3915 y Fs(-a)384 b Ft(All)31 b(curren)m(t)f(limits)h(are)g(rep)s
-(orted.)630 4080 y Fs(-b)384 b Ft(The)30 b(maxim)m(um)g(so)s(c)m(k)m
-(et)i(bu\013er)e(size.)630 4244 y Fs(-c)384 b Ft(The)30
+4852 y Fs(-a)384 b Ft(All)31 b(curren)m(t)f(limits)h(are)g(rep)s
+(orted.)630 5015 y Fs(-b)384 b Ft(The)30 b(maxim)m(um)g(so)s(c)m(k)m
+(et)i(bu\013er)e(size.)630 5177 y Fs(-c)384 b Ft(The)30
b(maxim)m(um)g(size)h(of)g(core)g(\014les)f(created.)630
-4408 y Fs(-d)384 b Ft(The)30 b(maxim)m(um)g(size)h(of)g(a)g(pro)s
-(cess's)f(data)h(segmen)m(t.)630 4573 y Fs(-e)384 b Ft(The)30
-b(maxim)m(um)g(sc)m(heduling)h(priorit)m(y)f(\()p Fs(")p
-Ft(nice)p Fs(")p Ft(\).)630 4737 y Fs(-f)384 b Ft(The)30
-b(maxim)m(um)g(size)h(of)g(\014les)f(written)h(b)m(y)f(the)g(shell)h
-(and)f(its)h(c)m(hildren.)630 4902 y Fs(-i)384 b Ft(The)30
-b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i(p)s(ending)e(signals.)630
-5066 y Fs(-l)384 b Ft(The)30 b(maxim)m(um)g(size)h(that)g(ma)m(y)g(b)s
-(e)f(lo)s(c)m(k)m(ed)i(in)m(to)f(memory)-8 b(.)630 5230
-y Fs(-m)384 b Ft(The)36 b(maxim)m(um)g(residen)m(t)h(set)g(size)g
-(\(man)m(y)g(systems)f(do)h(not)f(honor)g(this)1110 5340
-y(limit\).)p eop end
+5340 y Fs(-d)384 b Ft(The)30 b(maxim)m(um)g(size)h(of)g(a)g(pro)s
+(cess's)f(data)h(segmen)m(t.)p eop end
%%Page: 58 64
TeXDict begin 58 63 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(58)630 299 y Fs(-n)384
-b Ft(The)38 b(maxim)m(um)h(n)m(um)m(b)s(er)e(of)i(op)s(en)f(\014le)h
-(descriptors)g(\(most)g(systems)g(do)1110 408 y(not)31
-b(allo)m(w)g(this)g(v)-5 b(alue)31 b(to)g(b)s(e)e(set\).)630
-560 y Fs(-p)384 b Ft(The)30 b(pip)s(e)f(bu\013er)h(size.)630
-712 y Fs(-q)384 b Ft(The)30 b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i(b)m
-(ytes)g(in)f(POSIX)f(message)j(queues.)630 864 y Fs(-r)384
-b Ft(The)30 b(maxim)m(um)g(real-time)i(sc)m(heduling)f(priorit)m(y)-8
-b(.)630 1016 y Fs(-s)384 b Ft(The)30 b(maxim)m(um)g(stac)m(k)i(size.)
-630 1168 y Fs(-t)384 b Ft(The)30 b(maxim)m(um)g(amoun)m(t)h(of)f(cpu)g
-(time)h(in)f(seconds.)630 1320 y Fs(-u)384 b Ft(The)30
-b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i(pro)s(cesses)f(a)m(v)-5
-b(ailable)33 b(to)e(a)f(single)i(user.)630 1472 y Fs(-v)384
-b Ft(The)41 b(maxim)m(um)h(amoun)m(t)g(of)h(virtual)f(memory)g(a)m(v)-5
-b(ailable)44 b(to)e(the)g(shell,)1110 1581 y(and,)30
-b(on)g(some)h(systems,)g(to)g(its)g(c)m(hildren.)630
-1733 y Fs(-x)384 b Ft(The)30 b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i
-(\014le)f(lo)s(c)m(ks.)630 1885 y Fs(-T)384 b Ft(The)30
-b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i(threads.)630 2037
+b(Shell)30 b(Builtin)h(Commands)2069 b(58)630 299 y Fs(-e)384
+b Ft(The)30 b(maxim)m(um)g(sc)m(heduling)h(priorit)m(y)f(\()p
+Fs(")p Ft(nice)p Fs(")p Ft(\).)630 482 y Fs(-f)384 b
+Ft(The)30 b(maxim)m(um)g(size)h(of)g(\014les)f(written)h(b)m(y)f(the)g
+(shell)h(and)f(its)h(c)m(hildren.)630 666 y Fs(-i)384
+b Ft(The)30 b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i(p)s(ending)e
+(signals.)630 849 y Fs(-l)384 b Ft(The)30 b(maxim)m(um)g(size)h(that)g
+(ma)m(y)g(b)s(e)f(lo)s(c)m(k)m(ed)i(in)m(to)f(memory)-8
+b(.)630 1033 y Fs(-m)384 b Ft(The)36 b(maxim)m(um)g(residen)m(t)h(set)g
+(size)g(\(man)m(y)g(systems)f(do)h(not)f(honor)g(this)1110
+1142 y(limit\).)630 1326 y Fs(-n)384 b Ft(The)38 b(maxim)m(um)h(n)m(um)
+m(b)s(er)e(of)i(op)s(en)f(\014le)h(descriptors)g(\(most)g(systems)g(do)
+1110 1435 y(not)31 b(allo)m(w)g(this)g(v)-5 b(alue)31
+b(to)g(b)s(e)e(set\).)630 1619 y Fs(-p)384 b Ft(The)30
+b(pip)s(e)f(bu\013er)h(size.)630 1802 y Fs(-q)384 b Ft(The)30
+b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i(b)m(ytes)g(in)f(POSIX)f(message)j
+(queues.)630 1986 y Fs(-r)384 b Ft(The)30 b(maxim)m(um)g(real-time)i
+(sc)m(heduling)f(priorit)m(y)-8 b(.)630 2169 y Fs(-s)384
+b Ft(The)30 b(maxim)m(um)g(stac)m(k)i(size.)630 2352
+y Fs(-t)384 b Ft(The)30 b(maxim)m(um)g(amoun)m(t)h(of)f(cpu)g(time)h
+(in)f(seconds.)630 2536 y Fs(-u)384 b Ft(The)30 b(maxim)m(um)g(n)m(um)m
+(b)s(er)f(of)i(pro)s(cesses)f(a)m(v)-5 b(ailable)33 b(to)e(a)f(single)i
+(user.)630 2719 y Fs(-v)384 b Ft(The)41 b(maxim)m(um)h(amoun)m(t)g(of)h
+(virtual)f(memory)g(a)m(v)-5 b(ailable)44 b(to)e(the)g(shell,)1110
+2829 y(and,)30 b(on)g(some)h(systems,)g(to)g(its)g(c)m(hildren.)630
+3012 y Fs(-x)384 b Ft(The)30 b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i
+(\014le)f(lo)s(c)m(ks.)630 3196 y Fs(-T)384 b Ft(The)30
+b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i(threads.)630 3379
y(If)i Fq(limit)k Ft(is)d(giv)m(en,)h(and)f(the)f(`)p
Fs(-a)p Ft(')h(option)g(is)g(not)g(used,)g Fq(limit)j
-Ft(is)c(the)h(new)g(v)-5 b(alue)34 b(of)g(the)630 2146
+Ft(is)c(the)h(new)g(v)-5 b(alue)34 b(of)g(the)630 3489
y(sp)s(eci\014ed)f(resource.)51 b(The)34 b(sp)s(ecial)g
Fq(limit)j Ft(v)-5 b(alues)34 b Fs(hard)p Ft(,)g Fs(soft)p
-Ft(,)g(and)f Fs(unlimited)e Ft(stand)630 2256 y(for)h(the)g(curren)m(t)
+Ft(,)g(and)f Fs(unlimited)e Ft(stand)630 3598 y(for)h(the)g(curren)m(t)
g(hard)f(limit,)i(the)g(curren)m(t)f(soft)g(limit,)h(and)f(no)g(limit,)
-h(resp)s(ectiv)m(ely)-8 b(.)48 b(A)630 2366 y(hard)24
+h(resp)s(ectiv)m(ely)-8 b(.)48 b(A)630 3708 y(hard)24
b(limit)i(cannot)g(b)s(e)e(increased)h(b)m(y)g(a)h(non-ro)s(ot)f(user)f
(once)i(it)g(is)f(set;)j(a)d(soft)g(limit)h(ma)m(y)630
-2475 y(b)s(e)37 b(increased)h(up)e(to)j(the)f(v)-5 b(alue)38
+3818 y(b)s(e)37 b(increased)h(up)e(to)j(the)f(v)-5 b(alue)38
b(of)f(the)h(hard)f(limit.)63 b(Otherwise,)39 b(the)f(curren)m(t)f(v)-5
-b(alue)630 2585 y(of)36 b(the)f(soft)h(limit)h(for)e(the)g(sp)s
+b(alue)630 3927 y(of)36 b(the)f(soft)h(limit)h(for)e(the)g(sp)s
(eci\014ed)g(resource)h(is)f(prin)m(ted,)i(unless)e(the)h(`)p
-Fs(-H)p Ft(')f(option)h(is)630 2694 y(supplied.)j(When)28
+Fs(-H)p Ft(')f(option)h(is)630 4037 y(supplied.)j(When)28
b(setting)h(new)f(limits,)h(if)f(neither)h(`)p Fs(-H)p
Ft(')f(nor)f(`)p Fs(-S)p Ft(')h(is)h(supplied,)e(b)s(oth)h(the)630
-2804 y(hard)g(and)h(soft)h(limits)g(are)g(set.)41 b(If)29
+4146 y(hard)g(and)h(soft)h(limits)g(are)g(set.)41 b(If)29
b(no)g(option)h(is)f(giv)m(en,)i(then)e(`)p Fs(-f)p Ft(')h(is)f
-(assumed.)40 b(V)-8 b(alues)630 2914 y(are)38 b(in)f(1024-b)m(yte)k
+(assumed.)40 b(V)-8 b(alues)630 4256 y(are)38 b(in)f(1024-b)m(yte)k
(incremen)m(ts,)f(except)e(for)g(`)p Fs(-t)p Ft(',)h(whic)m(h)e(is)h
(in)f(seconds;)42 b(`)p Fs(-p)p Ft(',)d(whic)m(h)630
-3023 y(is)33 b(in)f(units)g(of)h(512-b)m(yte)i(blo)s(c)m(ks;)g(and)d(`)
+4366 y(is)33 b(in)f(units)g(of)h(512-b)m(yte)i(blo)s(c)m(ks;)g(and)d(`)
p Fs(-T)p Ft(',)i(`)p Fs(-b)p Ft(',)f(`)p Fs(-n)p Ft(')g(and)f(`)p
-Fs(-u)p Ft(',)h(whic)m(h)g(are)g(unscaled)630 3133 y(v)-5
-b(alues.)630 3263 y(The)34 b(return)g(status)h(is)f(zero)i(unless)e(an)
+Fs(-u)p Ft(',)h(whic)m(h)g(are)g(unscaled)630 4475 y(v)-5
+b(alues.)630 4622 y(The)34 b(return)g(status)h(is)f(zero)i(unless)e(an)
g(in)m(v)-5 b(alid)36 b(option)f(or)f(argumen)m(t)i(is)e(supplied,)h
-(or)630 3373 y(an)30 b(error)g(o)s(ccurs)g(while)h(setting)g(a)g(new)f
-(limit.)150 3525 y Fs(unalias)870 3656 y(unalias)46 b([-a])g([)p
-Fi(name)57 b Fs(...)47 b(])630 3786 y Ft(Remo)m(v)m(e)39
+(or)630 4731 y(an)30 b(error)g(o)s(ccurs)g(while)h(setting)g(a)g(new)f
+(limit.)150 4915 y Fs(unalias)870 5061 y(unalias)46 b([-a])g([)p
+Fi(name)57 b Fs(...)47 b(])630 5208 y Ft(Remo)m(v)m(e)39
b(eac)m(h)f Fq(name)k Ft(from)36 b(the)h(list)h(of)f(aliases.)61
b(If)36 b(`)p Fs(-a)p Ft(')h(is)g(supplied,)h(all)f(aliases)i(are)630
-3896 y(remo)m(v)m(ed.)j(Aliases)31 b(are)g(describ)s(ed)e(in)h(Section)
-i(6.6)f([Aliases],)h(page)f(88.)150 4121 y Fr(4.3)68
-b(Mo)t(difying)45 b(Shell)g(Beha)l(vior)150 4341 y Fj(4.3.1)63
-b(The)41 b(Set)g(Builtin)150 4488 y Ft(This)35 b(builtin)h(is)g(so)g
+5317 y(remo)m(v)m(ed.)j(Aliases)31 b(are)g(describ)s(ed)e(in)h(Section)
+i(6.6)f([Aliases],)h(page)f(88.)p eop end
+%%Page: 59 65
+TeXDict begin 59 64 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(59)150 299 y Fr(4.3)68
+b(Mo)t(difying)45 b(Shell)g(Beha)l(vior)150 520 y Fj(4.3.1)63
+b(The)41 b(Set)g(Builtin)150 667 y Ft(This)35 b(builtin)h(is)g(so)g
(complicated)i(that)f(it)f(deserv)m(es)h(its)f(o)m(wn)g(section.)59
b Fs(set)35 b Ft(allo)m(ws)j(y)m(ou)e(to)h(c)m(hange)150
-4598 y(the)c(v)-5 b(alues)34 b(of)f(shell)g(options)h(and)e(set)i(the)f
+777 y(the)c(v)-5 b(alues)34 b(of)f(shell)g(options)h(and)e(set)i(the)f
(p)s(ositional)h(parameters,)h(or)e(to)h(displa)m(y)f(the)g(names)h
-(and)150 4707 y(v)-5 b(alues)31 b(of)f(shell)h(v)-5 b(ariables.)150
-4859 y Fs(set)870 4990 y(set)47 b([--abefhkmnptuvxBCEHPT])41
+(and)150 886 y(v)-5 b(alues)31 b(of)f(shell)h(v)-5 b(ariables.)150
+1041 y Fs(set)870 1172 y(set)47 b([--abefhkmnptuvxBCEHPT])41
b([-o)47 b Fi(option-name)11 b Fs(])44 b([)p Fi(argument)56
-b Fs(...)o(])870 5100 y(set)47 b([+abefhkmnptuvxBCEHPT])42
+b Fs(...)o(])870 1282 y(set)47 b([+abefhkmnptuvxBCEHPT])42
b([+o)47 b Fi(option-name)11 b Fs(])43 b([)p Fi(argument)56
-b Fs(...)o(])630 5230 y Ft(If)22 b(no)h(options)g(or)g(argumen)m(ts)g
+b Fs(...)o(])630 1414 y Ft(If)22 b(no)h(options)g(or)g(argumen)m(ts)g
(are)g(supplied,)g Fs(set)f Ft(displa)m(ys)g(the)h(names)g(and)f(v)-5
-b(alues)23 b(of)g(all)630 5340 y(shell)j(v)-5 b(ariables)27
+b(alues)23 b(of)g(all)630 1523 y(shell)j(v)-5 b(ariables)27
b(and)e(functions,)h(sorted)g(according)h(to)g(the)f(curren)m(t)f(lo)s
-(cale,)k(in)c(a)i(format)p eop end
-%%Page: 59 65
-TeXDict begin 59 64 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(59)630 299 y(that)29
-b(ma)m(y)h(b)s(e)e(reused)g(as)h(input)f(for)h(setting)h(or)e
-(resetting)i(the)f(curren)m(tly-set)h(v)-5 b(ariables.)630
-408 y(Read-only)37 b(v)-5 b(ariables)37 b(cannot)h(b)s(e)e(reset.)59
-b(In)36 b Fl(posix)g Ft(mo)s(de,)i(only)f(shell)f(v)-5
-b(ariables)38 b(are)630 518 y(listed.)630 647 y(When)29
-b(options)g(are)g(supplied,)f(they)h(set)h(or)f(unset)f(shell)h
-(attributes.)41 b(Options,)29 b(if)g(sp)s(ec-)630 757
-y(i\014ed,)h(ha)m(v)m(e)i(the)e(follo)m(wing)i(meanings:)630
-905 y Fs(-a)384 b Ft(Mark)32 b(v)-5 b(ariables)33 b(and)e(function)h
+(cale,)k(in)c(a)i(format)630 1633 y(that)i(ma)m(y)h(b)s(e)e(reused)g
+(as)h(input)f(for)h(setting)h(or)e(resetting)i(the)f(curren)m(tly-set)h
+(v)-5 b(ariables.)630 1743 y(Read-only)37 b(v)-5 b(ariables)37
+b(cannot)h(b)s(e)e(reset.)59 b(In)36 b Fl(posix)g Ft(mo)s(de,)i(only)f
+(shell)f(v)-5 b(ariables)38 b(are)630 1852 y(listed.)630
+1984 y(When)29 b(options)g(are)g(supplied,)f(they)h(set)h(or)f(unset)f
+(shell)h(attributes.)41 b(Options,)29 b(if)g(sp)s(ec-)630
+2094 y(i\014ed,)h(ha)m(v)m(e)i(the)e(follo)m(wing)i(meanings:)630
+2248 y Fs(-a)384 b Ft(Mark)32 b(v)-5 b(ariables)33 b(and)e(function)h
(whic)m(h)g(are)g(mo)s(di\014ed)f(or)h(created)h(for)f(ex-)1110
-1014 y(p)s(ort)e(to)h(the)f(en)m(vironmen)m(t)h(of)g(subsequen)m(t)f
-(commands.)630 1163 y Fs(-b)384 b Ft(Cause)44 b(the)h(status)g(of)f
+2357 y(p)s(ort)e(to)h(the)f(en)m(vironmen)m(t)h(of)g(subsequen)m(t)f
+(commands.)630 2511 y Fs(-b)384 b Ft(Cause)44 b(the)h(status)g(of)f
(terminated)h(bac)m(kground)g(jobs)f(to)h(b)s(e)f(rep)s(orted)1110
-1272 y(immediately)-8 b(,)30 b(rather)d(than)f(b)s(efore)h(prin)m(ting)
-g(the)g(next)g(primary)g(prompt.)630 1421 y Fs(-e)384
+2621 y(immediately)-8 b(,)30 b(rather)d(than)f(b)s(efore)h(prin)m(ting)
+g(the)g(next)g(primary)g(prompt.)630 2775 y Fs(-e)384
b Ft(Exit)65 b(immediately)g(if)f(a)h(pip)s(eline)e(\(see)i(Section)g
-(3.2.2)h([Pip)s(elines],)1110 1530 y(page)56 b(8\),)62
+(3.2.2)h([Pip)s(elines],)1110 2885 y(page)56 b(8\),)62
b(whic)m(h)55 b(ma)m(y)h(consist)f(of)h(a)f(single)h(simple)f(command)g
-(\(see)1110 1640 y(Section)30 b(3.2.1)i([Simple)d(Commands],)g(page)h
-(8\),)h(a)f(list)g(\(see)h(Section)f(3.2.3)1110 1749
+(\(see)1110 2994 y(Section)30 b(3.2.1)i([Simple)d(Commands],)g(page)h
+(8\),)h(a)f(list)g(\(see)h(Section)f(3.2.3)1110 3104
y([Lists],)66 b(page)59 b(9\),)67 b(or)58 b(a)h(comp)s(ound)e(command)h
-(\(see)h(Section)g(3.2.4)1110 1859 y([Comp)s(ound)67
+(\(see)h(Section)g(3.2.4)1110 3213 y([Comp)s(ound)67
b(Commands],)77 b(page)69 b(9\))g(returns)e(a)i(non-zero)g(status.)1110
-1969 y(The)41 b(shell)g(do)s(es)g(not)g(exit)h(if)f(the)h(command)f
-(that)h(fails)f(is)g(part)g(of)h(the)1110 2078 y(command)g(list)h
+3323 y(The)41 b(shell)g(do)s(es)g(not)g(exit)h(if)f(the)h(command)f
+(that)h(fails)f(is)g(part)g(of)h(the)1110 3432 y(command)g(list)h
(immediately)g(follo)m(wing)g(a)g Fs(while)e Ft(or)h
-Fs(until)e Ft(k)m(eyw)m(ord,)1110 2188 y(part)61 b(of)g(the)g(test)h
+Fs(until)e Ft(k)m(eyw)m(ord,)1110 3542 y(part)61 b(of)g(the)g(test)h
(in)e(an)h Fs(if)f Ft(statemen)m(t,)71 b(part)61 b(of)g(an)m(y)g
-(command)1110 2297 y(executed)50 b(in)e(a)h Fs(&&)f Ft(or)h
+(command)1110 3652 y(executed)50 b(in)e(a)h Fs(&&)f Ft(or)h
Fs(||)f Ft(list)h(except)g(the)g(command)g(follo)m(wing)h(the)1110
-2407 y(\014nal)37 b Fs(&&)g Ft(or)g Fs(||)p Ft(,)h(an)m(y)g(command)f
+3761 y(\014nal)37 b Fs(&&)g Ft(or)g Fs(||)p Ft(,)h(an)m(y)g(command)f
(in)g(a)g(pip)s(eline)g(but)g(the)g(last,)j(or)e(if)f(the)1110
-2516 y(command's)c(return)f(status)h(is)g(b)s(eing)g(in)m(v)m(erted)h
+3871 y(command's)c(return)f(status)h(is)g(b)s(eing)g(in)m(v)m(erted)h
(with)e Fs(!)p Ft(.)48 b(If)33 b(a)g(comp)s(ound)1110
-2626 y(command)g(other)g(than)f(a)i(subshell)d(returns)h(a)h(non-zero)h
-(status)f(b)s(ecause)1110 2736 y(a)g(command)f(failed)h(while)f(`)p
+3980 y(command)g(other)g(than)f(a)i(subshell)d(returns)h(a)h(non-zero)h
+(status)f(b)s(ecause)1110 4090 y(a)g(command)f(failed)h(while)f(`)p
Fs(-e)p Ft(')h(w)m(as)f(b)s(eing)g(ignored,)h(the)g(shell)g(do)s(es)f
-(not)1110 2845 y(exit.)42 b(A)30 b(trap)g(on)h Fs(ERR)p
+(not)1110 4200 y(exit.)42 b(A)30 b(trap)g(on)h Fs(ERR)p
Ft(,)e(if)i(set,)g(is)f(executed)i(b)s(efore)e(the)g(shell)h(exits.)
-1110 2974 y(This)f(option)h(applies)f(to)h(the)g(shell)g(en)m(vironmen)
-m(t)g(and)f(eac)m(h)h(subshell)f(en-)1110 3084 y(vironmen)m(t)j
+1110 4331 y(This)f(option)h(applies)f(to)h(the)g(shell)g(en)m(vironmen)
+m(t)g(and)f(eac)m(h)h(subshell)f(en-)1110 4441 y(vironmen)m(t)j
(separately)i(\(see)f(Section)g(3.7.3)h([Command)d(Execution)i(En-)1110
-3193 y(vironmen)m(t],)i(page)f(36\),)i(and)d(ma)m(y)h(cause)f
-(subshells)g(to)h(exit)g(b)s(efore)f(exe-)1110 3303 y(cuting)d(all)g
-(the)g(commands)f(in)g(the)g(subshell.)1110 3432 y(If)41
+4551 y(vironmen)m(t],)i(page)f(36\),)i(and)d(ma)m(y)h(cause)f
+(subshells)g(to)h(exit)g(b)s(efore)f(exe-)1110 4660 y(cuting)d(all)g
+(the)g(commands)f(in)g(the)g(subshell.)1110 4792 y(If)41
b(a)g(comp)s(ound)e(command)i(or)g(shell)g(function)g(executes)h(in)f
-(a)g(con)m(text)1110 3541 y(where)26 b(`)p Fs(-e)p Ft(')g(is)g(b)s
+(a)g(con)m(text)1110 4902 y(where)26 b(`)p Fs(-e)p Ft(')g(is)g(b)s
(eing)g(ignored,)i(none)e(of)g(the)g(commands)g(executed)h(within)1110
-3651 y(the)35 b(comp)s(ound)f(command)h(or)g(function)f(b)s(o)s(dy)g
-(will)h(b)s(e)f(a\013ected)j(b)m(y)e(the)1110 3761 y(`)p
+5011 y(the)35 b(comp)s(ound)f(command)h(or)g(function)f(b)s(o)s(dy)g
+(will)h(b)s(e)f(a\013ected)j(b)m(y)e(the)1110 5121 y(`)p
Fs(-e)p Ft(')41 b(setting,)k(ev)m(en)d(if)g(`)p Fs(-e)p
Ft(')f(is)g(set)h(and)e(a)i(command)f(returns)f(a)i(failure)1110
-3870 y(status.)60 b(If)37 b(a)g(comp)s(ound)e(command)i(or)g(shell)g
-(function)f(sets)h(`)p Fs(-e)p Ft(')g(while)1110 3980
+5230 y(status.)60 b(If)37 b(a)g(comp)s(ound)e(command)i(or)g(shell)g
+(function)f(sets)h(`)p Fs(-e)p Ft(')g(while)1110 5340
y(executing)f(in)f(a)g(con)m(text)i(where)d(`)p Fs(-e)p
-Ft(')h(is)g(ignored,)h(that)f(setting)h(will)g(not)1110
-4089 y(ha)m(v)m(e)26 b(an)m(y)f(e\013ect)h(un)m(til)f(the)g(comp)s
-(ound)e(command)h(or)h(the)g(command)f(con-)1110 4199
-y(taining)31 b(the)g(function)f(call)h(completes.)630
-4347 y Fs(-f)384 b Ft(Disable)31 b(\014lename)g(expansion)f
-(\(globbing\).)630 4495 y Fs(-h)384 b Ft(Lo)s(cate)33
+Ft(')h(is)g(ignored,)h(that)f(setting)h(will)g(not)p
+eop end
+%%Page: 60 66
+TeXDict begin 60 65 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(60)1110 299 y(ha)m(v)m(e)26
+b(an)m(y)f(e\013ect)h(un)m(til)f(the)g(comp)s(ound)e(command)h(or)h
+(the)g(command)f(con-)1110 408 y(taining)31 b(the)g(function)f(call)h
+(completes.)630 564 y Fs(-f)384 b Ft(Disable)31 b(\014lename)g
+(expansion)f(\(globbing\).)630 720 y Fs(-h)384 b Ft(Lo)s(cate)33
b(and)e(remem)m(b)s(er)h(\(hash\))g(commands)f(as)h(they)g(are)g(lo)s
-(ok)m(ed)h(up)e(for)1110 4605 y(execution.)42 b(This)29
-b(option)i(is)g(enabled)f(b)m(y)g(default.)630 4753 y
+(ok)m(ed)h(up)e(for)1110 830 y(execution.)42 b(This)29
+b(option)i(is)g(enabled)f(b)m(y)g(default.)630 985 y
Fs(-k)384 b Ft(All)34 b(argumen)m(ts)g(in)f(the)h(form)f(of)g
(assignmen)m(t)h(statemen)m(ts)i(are)d(placed)h(in)1110
-4863 y(the)k(en)m(vironmen)m(t)g(for)g(a)g(command,)h(not)f(just)f
-(those)i(that)f(precede)g(the)1110 4973 y(command)30
-b(name.)630 5121 y Fs(-m)384 b Ft(Job)32 b(con)m(trol)h(is)f(enabled)g
+1095 y(the)k(en)m(vironmen)m(t)g(for)g(a)g(command,)h(not)f(just)f
+(those)i(that)f(precede)g(the)1110 1204 y(command)30
+b(name.)630 1360 y Fs(-m)384 b Ft(Job)32 b(con)m(trol)h(is)f(enabled)g
(\(see)h(Chapter)f(7)g([Job)g(Con)m(trol],)i(page)e(98\).)47
-b(All)1110 5230 y(pro)s(cesses)27 b(run)f(in)i(a)g(separate)g(pro)s
+b(All)1110 1470 y(pro)s(cesses)27 b(run)f(in)i(a)g(separate)g(pro)s
(cess)f(group.)40 b(When)27 b(a)h(bac)m(kground)f(job)1110
-5340 y(completes,)32 b(the)f(shell)f(prin)m(ts)g(a)h(line)f(con)m
-(taining)i(its)f(exit)g(status.)p eop end
-%%Page: 60 66
-TeXDict begin 60 65 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(60)630 299 y Fs(-n)384
+1579 y(completes,)32 b(the)f(shell)f(prin)m(ts)g(a)h(line)f(con)m
+(taining)i(its)f(exit)g(status.)630 1735 y Fs(-n)384
b Ft(Read)21 b(commands)f(but)g(do)h(not)g(execute)h(them;)i(this)d(ma)
-m(y)g(b)s(e)f(used)g(to)h(c)m(hec)m(k)1110 408 y(a)42
+m(y)g(b)s(e)f(used)g(to)h(c)m(hec)m(k)1110 1845 y(a)42
b(script)g(for)g(syn)m(tax)g(errors.)75 b(This)41 b(option)h(is)g
-(ignored)g(b)m(y)g(in)m(teractiv)m(e)1110 518 y(shells.)630
-667 y Fs(-o)30 b Fi(option-name)1110 777 y Ft(Set)h(the)f(option)h
+(ignored)g(b)m(y)g(in)m(teractiv)m(e)1110 1954 y(shells.)630
+2110 y Fs(-o)30 b Fi(option-name)1110 2220 y Ft(Set)h(the)f(option)h
(corresp)s(onding)e(to)i Fq(option-name)5 b Ft(:)1110
-927 y Fs(allexport)1590 1036 y Ft(Same)30 b(as)h Fs(-a)p
-Ft(.)1110 1186 y Fs(braceexpand)1590 1295 y Ft(Same)f(as)h
-Fs(-B)p Ft(.)1110 1445 y Fs(emacs)240 b Ft(Use)25 b(an)f
+2375 y Fs(allexport)1590 2485 y Ft(Same)30 b(as)h Fs(-a)p
+Ft(.)1110 2641 y Fs(braceexpand)1590 2750 y Ft(Same)f(as)h
+Fs(-B)p Ft(.)1110 2906 y Fs(emacs)240 b Ft(Use)25 b(an)f
Fs(emacs)p Ft(-st)m(yle)h(line)f(editing)h(in)m(terface)h(\(see)g
-(Chapter)e(8)1590 1554 y([Command)33 b(Line)g(Editing],)h(page)h
-(102\).)51 b(This)32 b(also)i(a\013ects)1590 1664 y(the)d(editing)g(in)
-m(terface)h(used)d(for)h Fs(read)f(-e)p Ft(.)1110 1813
+(Chapter)e(8)1590 3016 y([Command)33 b(Line)g(Editing],)h(page)h
+(102\).)51 b(This)32 b(also)i(a\013ects)1590 3125 y(the)d(editing)g(in)
+m(terface)h(used)d(for)h Fs(read)f(-e)p Ft(.)1110 3281
y Fs(errexit)144 b Ft(Same)30 b(as)h Fs(-e)p Ft(.)1110
-1963 y Fs(errtrace)96 b Ft(Same)30 b(as)h Fs(-E)p Ft(.)1110
-2112 y Fs(functrace)1590 2222 y Ft(Same)f(as)h Fs(-T)p
-Ft(.)1110 2371 y Fs(hashall)144 b Ft(Same)30 b(as)h Fs(-h)p
-Ft(.)1110 2521 y Fs(histexpand)1590 2630 y Ft(Same)f(as)h
-Fs(-H)p Ft(.)1110 2780 y Fs(history)144 b Ft(Enable)39
+3437 y Fs(errtrace)96 b Ft(Same)30 b(as)h Fs(-E)p Ft(.)1110
+3592 y Fs(functrace)1590 3702 y Ft(Same)f(as)h Fs(-T)p
+Ft(.)1110 3858 y Fs(hashall)144 b Ft(Same)30 b(as)h Fs(-h)p
+Ft(.)1110 4013 y Fs(histexpand)1590 4123 y Ft(Same)f(as)h
+Fs(-H)p Ft(.)1110 4279 y Fs(history)144 b Ft(Enable)39
b(command)g(history)-8 b(,)42 b(as)d(describ)s(ed)f(in)h(Section)h(9.1)
-1590 2889 y([Bash)d(History)g(F)-8 b(acilities],)41 b(page)c(134.)60
-b(This)36 b(option)h(is)f(on)1590 2999 y(b)m(y)30 b(default)h(in)f(in)m
-(teractiv)m(e)j(shells.)1110 3148 y Fs(ignoreeof)1590
-3258 y Ft(An)d(in)m(teractiv)m(e)j(shell)e(will)g(not)f(exit)h(up)s(on)
-e(reading)i(EOF.)1110 3407 y Fs(keyword)144 b Ft(Same)30
-b(as)h Fs(-k)p Ft(.)1110 3557 y Fs(monitor)144 b Ft(Same)30
-b(as)h Fs(-m)p Ft(.)1110 3706 y Fs(noclobber)1590 3816
-y Ft(Same)f(as)h Fs(-C)p Ft(.)1110 3965 y Fs(noexec)192
-b Ft(Same)30 b(as)h Fs(-n)p Ft(.)1110 4115 y Fs(noglob)192
-b Ft(Same)30 b(as)h Fs(-f)p Ft(.)1110 4264 y Fs(nolog)240
-b Ft(Curren)m(tly)30 b(ignored.)1110 4413 y Fs(notify)192
-b Ft(Same)30 b(as)h Fs(-b)p Ft(.)1110 4563 y Fs(nounset)144
-b Ft(Same)30 b(as)h Fs(-u)p Ft(.)1110 4712 y Fs(onecmd)192
-b Ft(Same)30 b(as)h Fs(-t)p Ft(.)1110 4862 y Fs(physical)96
-b Ft(Same)30 b(as)h Fs(-P)p Ft(.)1110 5011 y Fs(pipefail)96
-b Ft(If)44 b(set,)k(the)d(return)e(v)-5 b(alue)45 b(of)f(a)h(pip)s
-(eline)e(is)i(the)f(v)-5 b(alue)45 b(of)1590 5121 y(the)33
-b(last)h(\(righ)m(tmost\))h(command)e(to)h(exit)g(with)f(a)g(non-zero)
-1590 5230 y(status,)28 b(or)f(zero)g(if)f(all)i(commands)e(in)g(the)h
-(pip)s(eline)f(exit)i(suc-)1590 5340 y(cessfully)-8 b(.)41
-b(This)30 b(option)h(is)f(disabled)g(b)m(y)h(default.)p
-eop end
+1590 4388 y([Bash)d(History)g(F)-8 b(acilities],)41 b(page)c(134.)60
+b(This)36 b(option)h(is)f(on)1590 4498 y(b)m(y)30 b(default)h(in)f(in)m
+(teractiv)m(e)j(shells.)1110 4654 y Fs(ignoreeof)1590
+4763 y Ft(An)d(in)m(teractiv)m(e)j(shell)e(will)g(not)f(exit)h(up)s(on)
+e(reading)i(EOF.)1110 4919 y Fs(keyword)144 b Ft(Same)30
+b(as)h Fs(-k)p Ft(.)1110 5075 y Fs(monitor)144 b Ft(Same)30
+b(as)h Fs(-m)p Ft(.)1110 5230 y Fs(noclobber)1590 5340
+y Ft(Same)f(as)h Fs(-C)p Ft(.)p eop end
%%Page: 61 67
TeXDict begin 61 66 bop 150 -116 a Ft(Chapter)30 b(4:)41
b(Shell)30 b(Builtin)h(Commands)2069 b(61)1110 299 y
-Fs(posix)240 b Ft(Change)30 b(the)g(b)s(eha)m(vior)h(of)f(Bash)g(where)
-g(the)g(default)h(op)s(era-)1590 408 y(tion)25 b(di\013ers)f(from)g
-(the)h Fl(posix)f Ft(standard)f(to)i(matc)m(h)h(the)f(stan-)1590
-518 y(dard)32 b(\(see)i(Section)g(6.11)h([Bash)e(POSIX)f(Mo)s(de],)j
-(page)e(94\).)1590 628 y(This)k(is)g(in)m(tended)g(to)h(mak)m(e)g(Bash)
-g(b)s(eha)m(v)m(e)g(as)g(a)f(strict)h(su-)1590 737 y(p)s(erset)30
-b(of)h(that)f(standard.)1110 911 y Fs(privileged)1590
-1020 y Ft(Same)g(as)h Fs(-p)p Ft(.)1110 1194 y Fs(verbose)144
-b Ft(Same)30 b(as)h Fs(-v)p Ft(.)1110 1367 y Fs(vi)384
+Fs(noexec)192 b Ft(Same)30 b(as)h Fs(-n)p Ft(.)1110 470
+y Fs(noglob)192 b Ft(Same)30 b(as)h Fs(-f)p Ft(.)1110
+641 y Fs(nolog)240 b Ft(Curren)m(tly)30 b(ignored.)1110
+813 y Fs(notify)192 b Ft(Same)30 b(as)h Fs(-b)p Ft(.)1110
+984 y Fs(nounset)144 b Ft(Same)30 b(as)h Fs(-u)p Ft(.)1110
+1155 y Fs(onecmd)192 b Ft(Same)30 b(as)h Fs(-t)p Ft(.)1110
+1326 y Fs(physical)96 b Ft(Same)30 b(as)h Fs(-P)p Ft(.)1110
+1498 y Fs(pipefail)96 b Ft(If)44 b(set,)k(the)d(return)e(v)-5
+b(alue)45 b(of)f(a)h(pip)s(eline)e(is)i(the)f(v)-5 b(alue)45
+b(of)1590 1607 y(the)33 b(last)h(\(righ)m(tmost\))h(command)e(to)h
+(exit)g(with)f(a)g(non-zero)1590 1717 y(status,)28 b(or)f(zero)g(if)f
+(all)i(commands)e(in)g(the)h(pip)s(eline)f(exit)i(suc-)1590
+1826 y(cessfully)-8 b(.)41 b(This)30 b(option)h(is)f(disabled)g(b)m(y)h
+(default.)1110 1998 y Fs(posix)240 b Ft(Change)30 b(the)g(b)s(eha)m
+(vior)h(of)f(Bash)g(where)g(the)g(default)h(op)s(era-)1590
+2107 y(tion)25 b(di\013ers)f(from)g(the)h Fl(posix)f
+Ft(standard)f(to)i(matc)m(h)h(the)f(stan-)1590 2217 y(dard)32
+b(\(see)i(Section)g(6.11)h([Bash)e(POSIX)f(Mo)s(de],)j(page)e(94\).)
+1590 2326 y(This)k(is)g(in)m(tended)g(to)h(mak)m(e)g(Bash)g(b)s(eha)m
+(v)m(e)g(as)g(a)f(strict)h(su-)1590 2436 y(p)s(erset)30
+b(of)h(that)f(standard.)1110 2607 y Fs(privileged)1590
+2717 y Ft(Same)g(as)h Fs(-p)p Ft(.)1110 2888 y Fs(verbose)144
+b Ft(Same)30 b(as)h Fs(-v)p Ft(.)1110 3059 y Fs(vi)384
b Ft(Use)36 b(a)g Fs(vi)p Ft(-st)m(yle)g(line)g(editing)g(in)m
-(terface.)58 b(This)35 b(also)h(a\013ects)1590 1477 y(the)31
+(terface.)58 b(This)35 b(also)h(a\013ects)1590 3169 y(the)31
b(editing)g(in)m(terface)h(used)d(for)h Fs(read)f(-e)p
-Ft(.)1110 1650 y Fs(xtrace)192 b Ft(Same)30 b(as)h Fs(-x)p
-Ft(.)630 1824 y Fs(-p)384 b Ft(T)-8 b(urn)33 b(on)h(privileged)h(mo)s
+Ft(.)1110 3340 y Fs(xtrace)192 b Ft(Same)30 b(as)h Fs(-x)p
+Ft(.)630 3511 y Fs(-p)384 b Ft(T)-8 b(urn)33 b(on)h(privileged)h(mo)s
(de.)51 b(In)34 b(this)g(mo)s(de,)h(the)f Fs($BASH_ENV)e
-Ft(and)h Fs($ENV)1110 1934 y Ft(\014les)23 b(are)h(not)f(pro)s(cessed,)
+Ft(and)h Fs($ENV)1110 3621 y Ft(\014les)23 b(are)h(not)f(pro)s(cessed,)
h(shell)g(functions)e(are)i(not)f(inherited)g(from)f(the)i(en-)1110
-2043 y(vironmen)m(t,)h(and)e(the)g Fs(SHELLOPTS)p Ft(,)f
+3730 y(vironmen)m(t,)h(and)e(the)g Fs(SHELLOPTS)p Ft(,)f
Fs(BASHOPTS)p Ft(,)h Fs(CDPATH)e Ft(and)i Fs(GLOBIGNORE)1110
-2153 y Ft(v)-5 b(ariables,)23 b(if)e(they)g(app)s(ear)f(in)g(the)h(en)m
+3840 y Ft(v)-5 b(ariables,)23 b(if)e(they)g(app)s(ear)f(in)g(the)h(en)m
(vironmen)m(t,)i(are)e(ignored.)38 b(If)20 b(the)h(shell)1110
-2262 y(is)37 b(started)h(with)f(the)g(e\013ectiv)m(e)j(user)d
+3950 y(is)37 b(started)h(with)f(the)g(e\013ectiv)m(e)j(user)d
(\(group\))g(id)g(not)g(equal)h(to)g(the)f(real)1110
-2372 y(user)d(\(group\))g(id,)i(and)e(the)g(`)p Fs(-p)p
+4059 y(user)d(\(group\))g(id,)i(and)e(the)g(`)p Fs(-p)p
Ft(')g(option)h(is)g(not)f(supplied,)h(these)g(actions)1110
-2482 y(are)d(tak)m(en)i(and)d(the)h(e\013ectiv)m(e)j(user)c(id)h(is)g
+4169 y(are)d(tak)m(en)i(and)d(the)h(e\013ectiv)m(e)j(user)c(id)h(is)g
(set)h(to)f(the)h(real)f(user)g(id.)45 b(If)32 b(the)1110
-2591 y(`)p Fs(-p)p Ft(')e(option)i(is)e(supplied)g(at)h(startup,)f(the)
+4278 y(`)p Fs(-p)p Ft(')e(option)i(is)e(supplied)g(at)h(startup,)f(the)
h(e\013ectiv)m(e)i(user)d(id)h(is)f(not)h(reset.)1110
-2701 y(T)-8 b(urning)35 b(this)i(option)g(o\013)g(causes)g(the)g
+4388 y(T)-8 b(urning)35 b(this)i(option)g(o\013)g(causes)g(the)g
(e\013ectiv)m(e)i(user)d(and)g(group)g(ids)g(to)1110
-2810 y(b)s(e)30 b(set)h(to)g(the)f(real)h(user)f(and)g(group)g(ids.)630
-2984 y Fs(-t)384 b Ft(Exit)31 b(after)g(reading)f(and)g(executing)h
-(one)g(command.)630 3157 y Fs(-u)384 b Ft(T)-8 b(reat)25
+4498 y(b)s(e)30 b(set)h(to)g(the)f(real)h(user)f(and)g(group)g(ids.)630
+4669 y Fs(-t)384 b Ft(Exit)31 b(after)g(reading)f(and)g(executing)h
+(one)g(command.)630 4840 y Fs(-u)384 b Ft(T)-8 b(reat)25
b(unset)e(v)-5 b(ariables)25 b(and)e(parameters)h(other)h(than)e(the)h
-(sp)s(ecial)h(param-)1110 3267 y(eters)35 b(`)p Fs(@)p
+(sp)s(ecial)h(param-)1110 4950 y(eters)35 b(`)p Fs(@)p
Ft(')f(or)g(`)p Fs(*)p Ft(')h(as)f(an)g(error)g(when)f(p)s(erforming)g
-(parameter)i(expansion.)1110 3377 y(An)28 b(error)h(message)g(will)g(b)
+(parameter)i(expansion.)1110 5059 y(An)28 b(error)h(message)g(will)g(b)
s(e)f(written)h(to)h(the)e(standard)g(error,)h(and)f(a)h(non-)1110
-3486 y(in)m(teractiv)m(e)k(shell)e(will)g(exit.)630 3660
+5169 y(in)m(teractiv)m(e)k(shell)e(will)g(exit.)630 5340
y Fs(-v)384 b Ft(Prin)m(t)30 b(shell)h(input)e(lines)i(as)g(they)f(are)
-h(read.)630 3833 y Fs(-x)384 b Ft(Prin)m(t)21 b(a)h(trace)h(of)f
-(simple)f(commands,)i Fs(for)e Ft(commands,)i Fs(case)d
-Ft(commands,)1110 3943 y Fs(select)29 b Ft(commands,)j(and)e
-(arithmetic)j Fs(for)d Ft(commands)h(and)f(their)i(argu-)1110
-4052 y(men)m(ts)h(or)f(asso)s(ciated)i(w)m(ord)e(lists)h(after)g(they)f
-(are)h(expanded)f(and)f(b)s(efore)1110 4162 y(they)i(are)g(executed.)49
-b(The)32 b(v)-5 b(alue)33 b(of)g(the)g Fs(PS4)f Ft(v)-5
-b(ariable)34 b(is)f(expanded)f(and)1110 4271 y(the)24
-b(resultan)m(t)h(v)-5 b(alue)24 b(is)g(prin)m(ted)g(b)s(efore)f(the)h
-(command)g(and)f(its)i(expanded)1110 4381 y(argumen)m(ts.)630
-4555 y Fs(-B)384 b Ft(The)41 b(shell)g(will)g(p)s(erform)f(brace)h
-(expansion)g(\(see)h(Section)g(3.5.1)g([Brace)1110 4664
-y(Expansion],)30 b(page)h(21\).)42 b(This)30 b(option)h(is)f(on)g(b)m
-(y)h(default.)630 4838 y Fs(-C)384 b Ft(Prev)m(en)m(t)25
-b(output)e(redirection)h(using)f(`)p Fs(>)p Ft(',)i(`)p
-Fs(>&)p Ft(',)g(and)e(`)p Fs(<>)p Ft(')g(from)h(o)m(v)m(erwriting)1110
-4947 y(existing)31 b(\014les.)630 5121 y Fs(-E)384 b
-Ft(If)39 b(set,)j(an)m(y)e(trap)f(on)g Fs(ERR)g Ft(is)g(inherited)g(b)m
-(y)g(shell)h(functions,)h(command)1110 5230 y(substitutions,)35
-b(and)e(commands)g(executed)i(in)f(a)g(subshell)f(en)m(vironmen)m(t.)
-1110 5340 y(The)d Fs(ERR)f Ft(trap)i(is)f(normally)h(not)f(inherited)g
-(in)g(suc)m(h)g(cases.)p eop end
+h(read.)p eop end
%%Page: 62 68
TeXDict begin 62 67 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(62)630 299 y Fs(-H)384
-b Ft(Enable)38 b(`)p Fs(!)p Ft(')h(st)m(yle)h(history)e(substitution)g
-(\(see)h(Section)h(9.3)f([History)g(In-)1110 408 y(teraction],)g(page)d
-(136\).)57 b(This)34 b(option)i(is)f(on)g(b)m(y)h(default)f(for)g(in)m
-(teractiv)m(e)1110 518 y(shells.)630 670 y Fs(-P)384
-b Ft(If)39 b(set,)j(do)d(not)g(resolv)m(e)i(sym)m(b)s(olic)e(links)g
-(when)f(p)s(erforming)g(commands)1110 780 y(suc)m(h)29
-b(as)h Fs(cd)f Ft(whic)m(h)g(c)m(hange)h(the)g(curren)m(t)f(directory)
--8 b(.)42 b(The)28 b(ph)m(ysical)j(direc-)1110 890 y(tory)j(is)g(used)f
-(instead.)52 b(By)34 b(default,)h(Bash)f(follo)m(ws)h(the)f(logical)i
-(c)m(hain)f(of)1110 999 y(directories)j(when)d(p)s(erforming)h
-(commands)g(whic)m(h)g(c)m(hange)i(the)f(curren)m(t)1110
-1109 y(directory)-8 b(.)1110 1240 y(F)g(or)31 b(example,)g(if)f(`)p
-Fs(/usr/sys)p Ft(')e(is)i(a)g(sym)m(b)s(olic)h(link)f(to)g(`)p
-Fs(/usr/local/sys)p Ft(')1110 1349 y(then:)1350 1480
-y Fs($)47 b(cd)h(/usr/sys;)d(echo)i($PWD)1350 1590 y(/usr/sys)1350
-1700 y($)g(cd)h(..;)f(pwd)1350 1809 y(/usr)1110 1940
-y Ft(If)30 b Fs(set)f(-P)h Ft(is)h(on,)f(then:)1350 2071
-y Fs($)47 b(cd)h(/usr/sys;)d(echo)i($PWD)1350 2181 y(/usr/local/sys)
-1350 2290 y($)g(cd)h(..;)f(pwd)1350 2400 y(/usr/local)630
-2552 y(-T)384 b Ft(If)34 b(set,)j(an)m(y)e(trap)g(on)g
-Fs(DEBUG)e Ft(and)i Fs(RETURN)e Ft(are)i(inherited)g(b)m(y)f(shell)i
-(func-)1110 2662 y(tions,)k(command)d(substitutions,)h(and)f(commands)g
-(executed)h(in)f(a)h(sub-)1110 2771 y(shell)33 b(en)m(vironmen)m(t.)49
-b(The)32 b Fs(DEBUG)g Ft(and)g Fs(RETURN)f Ft(traps)h(are)i(normally)f
-(not)1110 2881 y(inherited)d(in)g(suc)m(h)g(cases.)630
-3033 y Fs(--)384 b Ft(If)31 b(no)h(argumen)m(ts)f(follo)m(w)i(this)f
-(option,)g(then)f(the)h(p)s(ositional)h(parameters)1110
-3143 y(are)h(unset.)49 b(Otherwise,)34 b(the)g(p)s(ositional)g
-(parameters)g(are)g(set)g(to)g(the)g Fq(ar-)1110 3253
-y(gumen)m(ts)t Ft(,)d(ev)m(en)g(if)f(some)h(of)f(them)h(b)s(egin)f
-(with)g(a)g(`)p Fs(-)p Ft('.)630 3405 y Fs(-)432 b Ft(Signal)45
-b(the)g(end)f(of)h(options,)k(cause)c(all)h(remaining)e
-Fq(argumen)m(ts)49 b Ft(to)d(b)s(e)1110 3515 y(assigned)38
-b(to)h(the)f(p)s(ositional)h(parameters.)65 b(The)37
-b(`)p Fs(-x)p Ft(')h(and)g(`)p Fs(-v)p Ft(')g(options)1110
-3624 y(are)25 b(turned)e(o\013.)40 b(If)24 b(there)h(are)g(no)f
+b(Shell)30 b(Builtin)h(Commands)2069 b(62)630 299 y Fs(-x)384
+b Ft(Prin)m(t)21 b(a)h(trace)h(of)f(simple)f(commands,)i
+Fs(for)e Ft(commands,)i Fs(case)d Ft(commands,)1110 408
+y Fs(select)29 b Ft(commands,)j(and)e(arithmetic)j Fs(for)d
+Ft(commands)h(and)f(their)i(argu-)1110 518 y(men)m(ts)h(or)f(asso)s
+(ciated)i(w)m(ord)e(lists)h(after)g(they)f(are)h(expanded)f(and)f(b)s
+(efore)1110 628 y(they)i(are)g(executed.)49 b(The)32
+b(v)-5 b(alue)33 b(of)g(the)g Fs(PS4)f Ft(v)-5 b(ariable)34
+b(is)f(expanded)f(and)1110 737 y(the)24 b(resultan)m(t)h(v)-5
+b(alue)24 b(is)g(prin)m(ted)g(b)s(efore)f(the)h(command)g(and)f(its)i
+(expanded)1110 847 y(argumen)m(ts.)630 1000 y Fs(-B)384
+b Ft(The)41 b(shell)g(will)g(p)s(erform)f(brace)h(expansion)g(\(see)h
+(Section)g(3.5.1)g([Brace)1110 1110 y(Expansion],)30
+b(page)h(21\).)42 b(This)30 b(option)h(is)f(on)g(b)m(y)h(default.)630
+1263 y Fs(-C)384 b Ft(Prev)m(en)m(t)25 b(output)e(redirection)h(using)f
+(`)p Fs(>)p Ft(',)i(`)p Fs(>&)p Ft(',)g(and)e(`)p Fs(<>)p
+Ft(')g(from)h(o)m(v)m(erwriting)1110 1373 y(existing)31
+b(\014les.)630 1526 y Fs(-E)384 b Ft(If)39 b(set,)j(an)m(y)e(trap)f(on)
+g Fs(ERR)g Ft(is)g(inherited)g(b)m(y)g(shell)h(functions,)h(command)
+1110 1636 y(substitutions,)35 b(and)e(commands)g(executed)i(in)f(a)g
+(subshell)f(en)m(vironmen)m(t.)1110 1745 y(The)d Fs(ERR)f
+Ft(trap)i(is)f(normally)h(not)f(inherited)g(in)g(suc)m(h)g(cases.)630
+1899 y Fs(-H)384 b Ft(Enable)38 b(`)p Fs(!)p Ft(')h(st)m(yle)h(history)
+e(substitution)g(\(see)h(Section)h(9.3)f([History)g(In-)1110
+2008 y(teraction],)g(page)d(136\).)57 b(This)34 b(option)i(is)f(on)g(b)
+m(y)h(default)f(for)g(in)m(teractiv)m(e)1110 2118 y(shells.)630
+2271 y Fs(-P)384 b Ft(If)39 b(set,)j(do)d(not)g(resolv)m(e)i(sym)m(b)s
+(olic)e(links)g(when)f(p)s(erforming)g(commands)1110
+2381 y(suc)m(h)29 b(as)h Fs(cd)f Ft(whic)m(h)g(c)m(hange)h(the)g
+(curren)m(t)f(directory)-8 b(.)42 b(The)28 b(ph)m(ysical)j(direc-)1110
+2491 y(tory)j(is)g(used)f(instead.)52 b(By)34 b(default,)h(Bash)f
+(follo)m(ws)h(the)f(logical)i(c)m(hain)f(of)1110 2600
+y(directories)j(when)d(p)s(erforming)h(commands)g(whic)m(h)g(c)m(hange)
+i(the)f(curren)m(t)1110 2710 y(directory)-8 b(.)1110
+2841 y(F)g(or)31 b(example,)g(if)f(`)p Fs(/usr/sys)p
+Ft(')e(is)i(a)g(sym)m(b)s(olic)h(link)f(to)g(`)p Fs(/usr/local/sys)p
+Ft(')1110 2951 y(then:)1350 3082 y Fs($)47 b(cd)h(/usr/sys;)d(echo)i
+($PWD)1350 3192 y(/usr/sys)1350 3302 y($)g(cd)h(..;)f(pwd)1350
+3411 y(/usr)1110 3543 y Ft(If)30 b Fs(set)f(-P)h Ft(is)h(on,)f(then:)
+1350 3674 y Fs($)47 b(cd)h(/usr/sys;)d(echo)i($PWD)1350
+3784 y(/usr/local/sys)1350 3893 y($)g(cd)h(..;)f(pwd)1350
+4003 y(/usr/local)630 4156 y(-T)384 b Ft(If)34 b(set,)j(an)m(y)e(trap)g
+(on)g Fs(DEBUG)e Ft(and)i Fs(RETURN)e Ft(are)i(inherited)g(b)m(y)f
+(shell)i(func-)1110 4266 y(tions,)k(command)d(substitutions,)h(and)f
+(commands)g(executed)h(in)f(a)h(sub-)1110 4376 y(shell)33
+b(en)m(vironmen)m(t.)49 b(The)32 b Fs(DEBUG)g Ft(and)g
+Fs(RETURN)f Ft(traps)h(are)i(normally)f(not)1110 4485
+y(inherited)d(in)g(suc)m(h)g(cases.)630 4639 y Fs(--)384
+b Ft(If)31 b(no)h(argumen)m(ts)f(follo)m(w)i(this)f(option,)g(then)f
+(the)h(p)s(ositional)h(parameters)1110 4748 y(are)h(unset.)49
+b(Otherwise,)34 b(the)g(p)s(ositional)g(parameters)g(are)g(set)g(to)g
+(the)g Fq(ar-)1110 4858 y(gumen)m(ts)t Ft(,)d(ev)m(en)g(if)f(some)h(of)
+f(them)h(b)s(egin)f(with)g(a)g(`)p Fs(-)p Ft('.)630 5011
+y Fs(-)432 b Ft(Signal)45 b(the)g(end)f(of)h(options,)k(cause)c(all)h
+(remaining)e Fq(argumen)m(ts)49 b Ft(to)d(b)s(e)1110
+5121 y(assigned)38 b(to)h(the)f(p)s(ositional)h(parameters.)65
+b(The)37 b(`)p Fs(-x)p Ft(')h(and)g(`)p Fs(-v)p Ft(')g(options)1110
+5230 y(are)25 b(turned)e(o\013.)40 b(If)24 b(there)h(are)g(no)f
(argumen)m(ts,)i(the)f(p)s(ositional)h(parameters)1110
-3734 y(remain)k(unc)m(hanged.)630 3886 y(Using)d(`)p
-Fs(+)p Ft(')h(rather)f(than)g(`)p Fs(-)p Ft(')g(causes)h(these)f
+5340 y(remain)k(unc)m(hanged.)p eop end
+%%Page: 63 69
+TeXDict begin 63 68 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(63)630 299 y(Using)27
+b(`)p Fs(+)p Ft(')h(rather)f(than)g(`)p Fs(-)p Ft(')g(causes)h(these)f
(options)h(to)g(b)s(e)e(turned)g(o\013.)40 b(The)27 b(options)h(can)630
-3996 y(also)36 b(b)s(e)f(used)f(up)s(on)g(in)m(v)m(o)s(cation)j(of)e
+408 y(also)36 b(b)s(e)f(used)f(up)s(on)g(in)m(v)m(o)s(cation)j(of)e
(the)g(shell.)56 b(The)34 b(curren)m(t)h(set)h(of)f(options)h(ma)m(y)g
-(b)s(e)630 4105 y(found)29 b(in)h Fs($-)p Ft(.)630 4236
+(b)s(e)630 518 y(found)29 b(in)h Fs($-)p Ft(.)630 659
y(The)43 b(remaining)h(N)f Fq(argumen)m(ts)48 b Ft(are)c(p)s(ositional)
-g(parameters)g(and)f(are)h(assigned,)j(in)630 4346 y(order,)30
+g(parameters)g(and)f(are)h(assigned,)j(in)630 769 y(order,)30
b(to)h Fs($1)p Ft(,)f Fs($2)p Ft(,)36 b(.)22 b(.)g(.)42
b Fs($N)p Ft(.)e(The)30 b(sp)s(ecial)h(parameter)g Fs(#)f
-Ft(is)g(set)h(to)g(N.)630 4477 y(The)f(return)f(status)i(is)f(alw)m(a)m
+Ft(is)g(set)h(to)g(N.)630 910 y(The)f(return)f(status)i(is)f(alw)m(a)m
(ys)i(zero)f(unless)f(an)g(in)m(v)-5 b(alid)31 b(option)g(is)f
-(supplied.)150 4669 y Fj(4.3.2)63 b(The)41 b(Shopt)h(Builtin)150
-4816 y Ft(This)30 b(builtin)g(allo)m(ws)h(y)m(ou)g(to)g(c)m(hange)h
+(supplied.)150 1123 y Fj(4.3.2)63 b(The)41 b(Shopt)h(Builtin)150
+1270 y Ft(This)30 b(builtin)g(allo)m(ws)h(y)m(ou)g(to)g(c)m(hange)h
(additional)f(shell)f(optional)i(b)s(eha)m(vior.)150
-4968 y Fs(shopt)870 5099 y(shopt)46 b([-pqsu])g([-o])h([)p
-Fi(optname)56 b Fs(...)o(])630 5230 y Ft(T)-8 b(oggle)37
+1450 y Fs(shopt)870 1591 y(shopt)46 b([-pqsu])g([-o])h([)p
+Fi(optname)56 b Fs(...)o(])630 1732 y Ft(T)-8 b(oggle)37
b(the)e(v)-5 b(alues)35 b(of)g(settings)h(con)m(trolling)g(optional)g
-(shell)f(b)s(eha)m(vior.)55 b(The)34 b(settings)630 5340
+(shell)f(b)s(eha)m(vior.)55 b(The)34 b(settings)630 1842
y(can)h(b)s(e)f(either)i(those)f(listed)h(b)s(elo)m(w,)g(or,)h(if)d
(the)i(`)p Fs(-o)p Ft(')e(option)i(is)f(used,)g(those)h(a)m(v)-5
-b(ailable)p eop end
-%%Page: 63 69
-TeXDict begin 63 68 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(63)630 299 y(with)37
-b(the)h(`)p Fs(-o)p Ft(')f(option)h(to)h(the)e Fs(set)g
-Ft(builtin)g(command)g(\(see)i(Section)f(4.3.1)h([The)f(Set)630
-408 y(Builtin],)27 b(page)f(58\).)40 b(With)26 b(no)f(options,)i(or)e
-(with)g(the)g(`)p Fs(-p)p Ft(')g(option,)i(a)e(list)h(of)f(all)h
-(settable)630 518 y(options)31 b(is)f(displa)m(y)m(ed,)h(with)f(an)g
-(indication)h(of)g(whether)e(or)i(not)f(eac)m(h)i(is)e(set.)41
-b(The)30 b(`)p Fs(-p)p Ft(')630 628 y(option)37 b(causes)f(output)g(to)
-h(b)s(e)f(displa)m(y)m(ed)g(in)g(a)h(form)f(that)g(ma)m(y)h(b)s(e)f
-(reused)f(as)i(input.)630 737 y(Other)30 b(options)h(ha)m(v)m(e)g(the)g
-(follo)m(wing)h(meanings:)630 894 y Fs(-s)384 b Ft(Enable)30
-b(\(set\))i(eac)m(h)f Fq(optname)5 b Ft(.)630 1052 y
-Fs(-u)384 b Ft(Disable)31 b(\(unset\))g(eac)m(h)h Fq(optname)5
-b Ft(.)630 1209 y Fs(-q)384 b Ft(Suppresses)28 b(normal)h(output;)h
-(the)g(return)e(status)i(indicates)h(whether)e(the)1110
-1319 y Fq(optname)37 b Ft(is)31 b(set)h(or)f(unset.)43
-b(If)31 b(m)m(ultiple)h Fq(optname)37 b Ft(argumen)m(ts)31
-b(are)h(giv)m(en)1110 1428 y(with)43 b(`)p Fs(-q)p Ft(',)j(the)d
-(return)f(status)h(is)g(zero)h(if)f(all)g Fq(optnames)k
-Ft(are)d(enabled;)1110 1538 y(non-zero)31 b(otherwise.)630
-1695 y Fs(-o)384 b Ft(Restricts)28 b(the)g(v)-5 b(alues)28
-b(of)f Fq(optname)33 b Ft(to)c(b)s(e)d(those)i(de\014ned)f(for)g(the)g
-(`)p Fs(-o)p Ft(')h(op-)1110 1805 y(tion)23 b(to)h(the)f
-Fs(set)f Ft(builtin)h(\(see)g(Section)h(4.3.1)h([The)d(Set)i(Builtin],)
-h(page)e(58\).)630 1962 y(If)40 b(either)g(`)p Fs(-s)p
-Ft(')g(or)g(`)p Fs(-u)p Ft(')g(is)g(used)g(with)g(no)g
-Fq(optname)45 b Ft(argumen)m(ts,)e Fs(shopt)c Ft(sho)m(ws)h(only)630
-2071 y(those)31 b(options)g(whic)m(h)f(are)g(set)h(or)g(unset,)f(resp)s
-(ectiv)m(ely)-8 b(.)630 2205 y(Unless)30 b(otherwise)h(noted,)g(the)g
-Fs(shopt)d Ft(options)j(are)g(disabled)f(\(o\013)7 b(\))32
-b(b)m(y)e(default.)630 2338 y(The)d(return)f(status)i(when)f(listing)h
-(options)g(is)f(zero)i(if)e(all)i Fq(optnames)i Ft(are)d(enabled,)g
-(non-)630 2448 y(zero)40 b(otherwise.)66 b(When)39 b(setting)h(or)f
-(unsetting)g(options,)i(the)e(return)f(status)h(is)g(zero)630
-2557 y(unless)30 b(an)g Fq(optname)36 b Ft(is)30 b(not)h(a)g(v)-5
-b(alid)30 b(shell)h(option.)630 2691 y(The)f(list)h(of)f
-Fs(shopt)f Ft(options)i(is:)630 2848 y Fs(autocd)192
+b(ailable)630 1952 y(with)37 b(the)h(`)p Fs(-o)p Ft(')f(option)h(to)h
+(the)e Fs(set)g Ft(builtin)g(command)g(\(see)i(Section)f(4.3.1)h([The)f
+(Set)630 2061 y(Builtin],)27 b(page)f(59\).)40 b(With)26
+b(no)f(options,)i(or)e(with)g(the)g(`)p Fs(-p)p Ft(')g(option,)i(a)e
+(list)h(of)f(all)h(settable)630 2171 y(options)31 b(is)f(displa)m(y)m
+(ed,)h(with)f(an)g(indication)h(of)g(whether)e(or)i(not)f(eac)m(h)i(is)
+e(set.)41 b(The)30 b(`)p Fs(-p)p Ft(')630 2280 y(option)37
+b(causes)f(output)g(to)h(b)s(e)f(displa)m(y)m(ed)g(in)g(a)h(form)f
+(that)g(ma)m(y)h(b)s(e)f(reused)f(as)i(input.)630 2390
+y(Other)30 b(options)h(ha)m(v)m(e)g(the)g(follo)m(wing)h(meanings:)630
+2563 y Fs(-s)384 b Ft(Enable)30 b(\(set\))i(eac)m(h)f
+Fq(optname)5 b Ft(.)630 2736 y Fs(-u)384 b Ft(Disable)31
+b(\(unset\))g(eac)m(h)h Fq(optname)5 b Ft(.)630 2909
+y Fs(-q)384 b Ft(Suppresses)28 b(normal)h(output;)h(the)g(return)e
+(status)i(indicates)h(whether)e(the)1110 3019 y Fq(optname)37
+b Ft(is)31 b(set)h(or)f(unset.)43 b(If)31 b(m)m(ultiple)h
+Fq(optname)37 b Ft(argumen)m(ts)31 b(are)h(giv)m(en)1110
+3128 y(with)43 b(`)p Fs(-q)p Ft(',)j(the)d(return)f(status)h(is)g(zero)
+h(if)f(all)g Fq(optnames)k Ft(are)d(enabled;)1110 3238
+y(non-zero)31 b(otherwise.)630 3411 y Fs(-o)384 b Ft(Restricts)28
+b(the)g(v)-5 b(alues)28 b(of)f Fq(optname)33 b Ft(to)c(b)s(e)d(those)i
+(de\014ned)f(for)g(the)g(`)p Fs(-o)p Ft(')h(op-)1110
+3520 y(tion)23 b(to)h(the)f Fs(set)f Ft(builtin)h(\(see)g(Section)h
+(4.3.1)h([The)d(Set)i(Builtin],)h(page)e(59\).)630 3693
+y(If)40 b(either)g(`)p Fs(-s)p Ft(')g(or)g(`)p Fs(-u)p
+Ft(')g(is)g(used)g(with)g(no)g Fq(optname)45 b Ft(argumen)m(ts,)e
+Fs(shopt)c Ft(sho)m(ws)h(only)630 3803 y(those)31 b(options)g(whic)m(h)
+f(are)g(set)h(or)g(unset,)f(resp)s(ectiv)m(ely)-8 b(.)630
+3944 y(Unless)30 b(otherwise)h(noted,)g(the)g Fs(shopt)d
+Ft(options)j(are)g(disabled)f(\(o\013)7 b(\))32 b(b)m(y)e(default.)630
+4086 y(The)d(return)f(status)i(when)f(listing)h(options)g(is)f(zero)i
+(if)e(all)i Fq(optnames)i Ft(are)d(enabled,)g(non-)630
+4195 y(zero)40 b(otherwise.)66 b(When)39 b(setting)h(or)f(unsetting)g
+(options,)i(the)e(return)f(status)h(is)g(zero)630 4305
+y(unless)30 b(an)g Fq(optname)36 b Ft(is)30 b(not)h(a)g(v)-5
+b(alid)30 b(shell)h(option.)630 4446 y(The)f(list)h(of)f
+Fs(shopt)f Ft(options)i(is:)630 4619 y Fs(autocd)192
b Ft(If)27 b(set,)h(a)g(command)f(name)g(that)h(is)f(the)g(name)g(of)h
-(a)f(directory)h(is)f(executed)1110 2958 y(as)j(if)f(it)h(w)m(ere)f
+(a)f(directory)h(is)f(executed)1110 4729 y(as)j(if)f(it)h(w)m(ere)f
(the)h(argumen)m(t)g(to)g(the)f Fs(cd)g Ft(command.)40
-b(This)29 b(option)g(is)h(only)1110 3067 y(used)g(b)m(y)g(in)m
-(teractiv)m(e)j(shells.)630 3224 y Fs(cdable_vars)1110
-3334 y Ft(If)h(this)h(is)g(set,)i(an)e(argumen)m(t)g(to)h(the)f
-Fs(cd)f Ft(builtin)h(command)f(that)i(is)f(not)1110 3444
+b(This)29 b(option)g(is)h(only)1110 4838 y(used)g(b)m(y)g(in)m
+(teractiv)m(e)j(shells.)630 5011 y Fs(cdable_vars)1110
+5121 y Ft(If)h(this)h(is)g(set,)i(an)e(argumen)m(t)g(to)h(the)f
+Fs(cd)f Ft(builtin)h(command)f(that)i(is)f(not)1110 5230
y(a)c(directory)g(is)g(assumed)f(to)h(b)s(e)f(the)h(name)f(of)h(a)g(v)
--5 b(ariable)31 b(whose)g(v)-5 b(alue)31 b(is)1110 3553
-y(the)g(directory)f(to)i(c)m(hange)f(to.)630 3710 y Fs(cdspell)144
+-5 b(ariable)31 b(whose)g(v)-5 b(alue)31 b(is)1110 5340
+y(the)g(directory)f(to)i(c)m(hange)f(to.)p eop end
+%%Page: 64 70
+TeXDict begin 64 69 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(64)630 299 y Fs(cdspell)144
b Ft(If)27 b(set,)h(minor)f(errors)f(in)h(the)g(sp)s(elling)h(of)f(a)g
-(directory)h(comp)s(onen)m(t)f(in)g(a)h Fs(cd)1110 3820
+(directory)h(comp)s(onen)m(t)f(in)g(a)h Fs(cd)1110 408
y Ft(command)i(will)h(b)s(e)f(corrected.)43 b(The)30
b(errors)g(c)m(hec)m(k)m(ed)j(for)d(are)h(transp)s(osed)1110
-3930 y(c)m(haracters,)46 b(a)c(missing)f(c)m(haracter,)47
+518 y(c)m(haracters,)46 b(a)c(missing)f(c)m(haracter,)47
b(and)40 b(a)i(c)m(haracter)h(to)s(o)g(man)m(y)-8 b(.)74
-b(If)42 b(a)1110 4039 y(correction)25 b(is)e(found,)g(the)h(corrected)g
-(path)f(is)g(prin)m(ted,)h(and)f(the)g(command)1110 4149
+b(If)42 b(a)1110 628 y(correction)25 b(is)e(found,)g(the)h(corrected)g
+(path)f(is)g(prin)m(ted,)h(and)f(the)g(command)1110 737
y(pro)s(ceeds.)40 b(This)30 b(option)h(is)f(only)h(used)e(b)m(y)h(in)m
-(teractiv)m(e)k(shells.)630 4306 y Fs(checkhash)1110
-4416 y Ft(If)29 b(this)h(is)g(set,)g(Bash)g(c)m(hec)m(ks)h(that)g(a)f
-(command)f(found)g(in)g(the)h(hash)f(table)1110 4525
+(teractiv)m(e)k(shells.)630 883 y Fs(checkhash)1110 993
+y Ft(If)29 b(this)h(is)g(set,)g(Bash)g(c)m(hec)m(ks)h(that)g(a)f
+(command)f(found)g(in)g(the)h(hash)f(table)1110 1103
y(exists)k(b)s(efore)f(trying)h(to)h(execute)g(it.)48
-b(If)32 b(a)h(hashed)e(command)i(no)f(longer)1110 4635
+b(If)32 b(a)h(hashed)e(command)i(no)f(longer)1110 1212
y(exists,)f(a)g(normal)f(path)g(searc)m(h)h(is)g(p)s(erformed.)630
-4792 y Fs(checkjobs)1110 4902 y Ft(If)d(set,)i(Bash)e(lists)h(the)g
+1358 y Fs(checkjobs)1110 1468 y Ft(If)d(set,)i(Bash)e(lists)h(the)g
(status)g(of)f(an)m(y)h(stopp)s(ed)f(and)g(running)e(jobs)i(b)s(efore)
-1110 5011 y(exiting)42 b(an)f(in)m(teractiv)m(e)j(shell.)72
+1110 1577 y(exiting)42 b(an)f(in)m(teractiv)m(e)j(shell.)72
b(If)41 b(an)m(y)g(jobs)f(are)i(running,)g(this)f(causes)1110
-5121 y(the)30 b(exit)g(to)g(b)s(e)f(deferred)g(un)m(til)h(a)f(second)h
-(exit)g(is)g(attempted)h(without)e(an)1110 5230 y(in)m(terv)m(ening)j
+1687 y(the)30 b(exit)g(to)g(b)s(e)f(deferred)g(un)m(til)h(a)f(second)h
+(exit)g(is)g(attempted)h(without)e(an)1110 1797 y(in)m(terv)m(ening)j
(command)e(\(see)h(Chapter)f(7)h([Job)f(Con)m(trol],)i(page)f(98\).)42
-b(The)1110 5340 y(shell)31 b(alw)m(a)m(ys)g(p)s(ostp)s(ones)f(exiting)h
-(if)g(an)m(y)f(jobs)g(are)h(stopp)s(ed.)p eop end
-%%Page: 64 70
-TeXDict begin 64 69 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(64)630 299 y Fs(checkwinsize)
-1110 408 y Ft(If)41 b(set,)k(Bash)c(c)m(hec)m(ks)i(the)f(windo)m(w)e
-(size)j(after)f(eac)m(h)g(command)f(and,)j(if)1110 518
-y(necessary)-8 b(,)31 b(up)s(dates)f(the)g(v)-5 b(alues)31
-b(of)g Fs(LINES)e Ft(and)g Fs(COLUMNS)p Ft(.)630 669
-y Fs(cmdhist)144 b Ft(If)33 b(set,)j(Bash)e(attempts)h(to)g(sa)m(v)m(e)
-g(all)g(lines)f(of)g(a)h(m)m(ultiple-line)g(command)1110
-778 y(in)c(the)g(same)g(history)g(en)m(try)-8 b(.)42
-b(This)30 b(allo)m(ws)i(easy)g(re-editing)g(of)f(m)m(ulti-line)1110
-888 y(commands.)630 1039 y Fs(compat31)96 b Ft(If)27
-b(set,)i(Bash)e(c)m(hanges)i(its)f(b)s(eha)m(vior)f(to)i(that)f(of)f(v)
-m(ersion)h(3.1)h(with)e(resp)s(ect)1110 1148 y(to)39
-b(quoted)f(argumen)m(ts)g(to)h(the)f(conditional)h(command's)f(`)p
-Fs(=~)p Ft(')g(op)s(erator)1110 1258 y(and)i(with)f(resp)s(ect)i(to)g
-(lo)s(cale-sp)s(eci\014c)h(string)e(comparison)g(when)f(using)1110
-1367 y(the)31 b Fs([[)e Ft(conditional)j(command's)e(`)p
-Fs(<)p Ft(')h(and)f(`)p Fs(>)p Ft(')g(op)s(erators.)41
-b(Bash)31 b(v)m(ersions)1110 1477 y(prior)g(to)h(bash-4.1)g(use)g(ASCI)
-s(I)e(collation)j(and)e(strcmp\(3\);)i(bash-4.1)g(and)1110
-1587 y(later)e(use)f(the)h(curren)m(t)f(lo)s(cale's)i(collation)h
-(sequence)e(and)f(strcoll\(3\).)630 1737 y Fs(compat32)96
+b(The)1110 1906 y(shell)31 b(alw)m(a)m(ys)g(p)s(ostp)s(ones)f(exiting)h
+(if)g(an)m(y)f(jobs)g(are)h(stopp)s(ed.)630 2052 y Fs(checkwinsize)1110
+2162 y Ft(If)41 b(set,)k(Bash)c(c)m(hec)m(ks)i(the)f(windo)m(w)e(size)j
+(after)f(eac)m(h)g(command)f(and,)j(if)1110 2271 y(necessary)-8
+b(,)31 b(up)s(dates)f(the)g(v)-5 b(alues)31 b(of)g Fs(LINES)e
+Ft(and)g Fs(COLUMNS)p Ft(.)630 2418 y Fs(cmdhist)144
+b Ft(If)33 b(set,)j(Bash)e(attempts)h(to)g(sa)m(v)m(e)g(all)g(lines)f
+(of)g(a)h(m)m(ultiple-line)g(command)1110 2527 y(in)c(the)g(same)g
+(history)g(en)m(try)-8 b(.)42 b(This)30 b(allo)m(ws)i(easy)g
+(re-editing)g(of)f(m)m(ulti-line)1110 2637 y(commands.)630
+2783 y Fs(compat31)96 b Ft(If)27 b(set,)i(Bash)e(c)m(hanges)i(its)f(b)s
+(eha)m(vior)f(to)i(that)f(of)f(v)m(ersion)h(3.1)h(with)e(resp)s(ect)
+1110 2892 y(to)39 b(quoted)f(argumen)m(ts)g(to)h(the)f(conditional)h
+(command's)f(`)p Fs(=~)p Ft(')g(op)s(erator)1110 3002
+y(and)i(with)f(resp)s(ect)i(to)g(lo)s(cale-sp)s(eci\014c)h(string)e
+(comparison)g(when)f(using)1110 3112 y(the)31 b Fs([[)e
+Ft(conditional)j(command's)e(`)p Fs(<)p Ft(')h(and)f(`)p
+Fs(>)p Ft(')g(op)s(erators.)41 b(Bash)31 b(v)m(ersions)1110
+3221 y(prior)g(to)h(bash-4.1)g(use)g(ASCI)s(I)e(collation)j(and)e
+(strcmp\(3\);)i(bash-4.1)g(and)1110 3331 y(later)e(use)f(the)h(curren)m
+(t)f(lo)s(cale's)i(collation)h(sequence)e(and)f(strcoll\(3\).)630
+3477 y Fs(compat32)96 b Ft(If)27 b(set,)i(Bash)e(c)m(hanges)i(its)f(b)s
+(eha)m(vior)f(to)i(that)f(of)f(v)m(ersion)h(3.2)h(with)e(resp)s(ect)
+1110 3587 y(to)34 b(lo)s(cale-sp)s(eci\014c)h(string)e(comparison)g
+(when)f(using)h(the)g Fs([[)g Ft(conditional)1110 3696
+y(command's)d(`)p Fs(<)p Ft(')h(and)f(`)p Fs(>)p Ft(')g(op)s(erators)h
+(\(see)g(previous)f(item\).)630 3842 y Fs(compat40)96
b Ft(If)27 b(set,)i(Bash)e(c)m(hanges)i(its)f(b)s(eha)m(vior)f(to)i
-(that)f(of)f(v)m(ersion)h(3.2)h(with)e(resp)s(ect)1110
-1847 y(to)34 b(lo)s(cale-sp)s(eci\014c)h(string)e(comparison)g(when)f
-(using)h(the)g Fs([[)g Ft(conditional)1110 1956 y(command's)d(`)p
-Fs(<)p Ft(')h(and)f(`)p Fs(>)p Ft(')g(op)s(erators)h(\(see)g(previous)f
-(item\).)630 2107 y Fs(compat40)96 b Ft(If)27 b(set,)i(Bash)e(c)m
-(hanges)i(its)f(b)s(eha)m(vior)f(to)i(that)f(of)f(v)m(ersion)h(4.0)h
-(with)e(resp)s(ect)1110 2217 y(to)34 b(lo)s(cale-sp)s(eci\014c)h
-(string)e(comparison)g(when)f(using)h(the)g Fs([[)g Ft(conditional)1110
-2326 y(command's)28 b(`)p Fs(<)p Ft(')h(and)f(`)p Fs(>)p
-Ft(')h(op)s(erators)f(\(see)i(description)e(of)h Fs(compat31)p
-Ft(\))e(and)1110 2436 y(the)38 b(e\013ect)i(of)e(in)m(terrupting)f(a)i
-(command)e(list.)64 b(Bash)38 b(v)m(ersions)h(4.0)g(and)1110
-2545 y(later)24 b(in)m(terrupt)f(the)g(list)h(as)g(if)f(the)h(shell)f
-(receiv)m(ed)i(the)e(in)m(terrupt;)i(previous)1110 2655
-y(v)m(ersions)31 b(con)m(tin)m(ue)g(with)f(the)h(next)g(command)f(in)g
-(the)g(list.)630 2806 y Fs(compat41)96 b Ft(If)25 b(set,)j(Bash,)e
-(when)f(in)g Fl(posix)g Ft(mo)s(de,)i(treats)f(a)g(single)h(quote)f(in)
-f(a)h(double-)1110 2915 y(quoted)46 b(parameter)h(expansion)f(as)g(a)h
-(sp)s(ecial)f(c)m(haracter.)90 b(The)45 b(single)1110
-3025 y(quotes)34 b(m)m(ust)g(matc)m(h)h(\(an)f(ev)m(en)h(n)m(um)m(b)s
-(er\))e(and)g(the)h(c)m(haracters)h(b)s(et)m(w)m(een)1110
-3134 y(the)40 b(single)g(quotes)g(are)g(considered)g(quoted.)69
-b(This)38 b(is)i(the)g(b)s(eha)m(vior)g(of)1110 3244
+(that)f(of)f(v)m(ersion)h(4.0)h(with)e(resp)s(ect)1110
+3952 y(to)34 b(lo)s(cale-sp)s(eci\014c)h(string)e(comparison)g(when)f
+(using)h(the)g Fs([[)g Ft(conditional)1110 4061 y(command's)28
+b(`)p Fs(<)p Ft(')h(and)f(`)p Fs(>)p Ft(')h(op)s(erators)f(\(see)i
+(description)e(of)h Fs(compat31)p Ft(\))e(and)1110 4171
+y(the)38 b(e\013ect)i(of)e(in)m(terrupting)f(a)i(command)e(list.)64
+b(Bash)38 b(v)m(ersions)h(4.0)g(and)1110 4281 y(later)24
+b(in)m(terrupt)f(the)g(list)h(as)g(if)f(the)h(shell)f(receiv)m(ed)i
+(the)e(in)m(terrupt;)i(previous)1110 4390 y(v)m(ersions)31
+b(con)m(tin)m(ue)g(with)f(the)h(next)g(command)f(in)g(the)g(list.)630
+4536 y Fs(compat41)96 b Ft(If)25 b(set,)j(Bash,)e(when)f(in)g
+Fl(posix)g Ft(mo)s(de,)i(treats)f(a)g(single)h(quote)f(in)f(a)h
+(double-)1110 4646 y(quoted)46 b(parameter)h(expansion)f(as)g(a)h(sp)s
+(ecial)f(c)m(haracter.)90 b(The)45 b(single)1110 4756
+y(quotes)34 b(m)m(ust)g(matc)m(h)h(\(an)f(ev)m(en)h(n)m(um)m(b)s(er\))e
+(and)g(the)h(c)m(haracters)h(b)s(et)m(w)m(een)1110 4865
+y(the)40 b(single)g(quotes)g(are)g(considered)g(quoted.)69
+b(This)38 b(is)i(the)g(b)s(eha)m(vior)g(of)1110 4975
y Fl(posix)f Ft(mo)s(de)g(through)g(v)m(ersion)h(4.1.)69
b(The)39 b(default)g(Bash)h(b)s(eha)m(vior)g(re-)1110
-3354 y(mains)30 b(as)h(in)f(previous)g(v)m(ersions.)630
-3504 y Fs(compat42)96 b Ft(If)29 b(set,)i(Bash)f(do)s(es)f(not)h(pro)s
+5084 y(mains)30 b(as)h(in)f(previous)g(v)m(ersions.)630
+5230 y Fs(compat42)96 b Ft(If)29 b(set,)i(Bash)f(do)s(es)f(not)h(pro)s
(cess)g(the)g(replacemen)m(t)h(string)e(in)h(the)g(pattern)1110
-3614 y(substitution)g(w)m(ord)g(expansion)g(using)g(quote)h(remo)m(v)-5
-b(al.)630 3765 y Fs(complete_fullquote)1110 3874 y Ft(If)31
-b(set,)g(Bash)h(quotes)f(all)h(shell)f(metac)m(haracters)i(in)e
-(\014lenames)g(and)g(direc-)1110 3984 y(tory)g(names)f(when)g(p)s
-(erforming)f(completion.)43 b(If)30 b(not)h(set,)g(Bash)g(remo)m(v)m
-(es)1110 4093 y(metac)m(haracters)40 b(suc)m(h)d(as)h(the)g(dollar)g
-(sign)g(from)f(the)h(set)g(of)f(c)m(haracters)1110 4203
-y(that)f(will)g(b)s(e)f(quoted)g(in)g(completed)i(\014lenames)e(when)f
-(these)i(metac)m(har-)1110 4313 y(acters)29 b(app)s(ear)e(in)g(shell)h
-(v)-5 b(ariable)28 b(references)g(in)f(w)m(ords)g(to)i(b)s(e)e
-(completed.)1110 4422 y(This)k(means)i(that)g(dollar)f(signs)g(in)g(v)
--5 b(ariable)33 b(names)g(that)f(expand)g(to)h(di-)1110
-4532 y(rectories)28 b(will)g(not)f(b)s(e)f(quoted;)j(ho)m(w)m(ev)m(er,)
-g(an)m(y)e(dollar)h(signs)f(app)s(earing)f(in)1110 4641
+5340 y(substitution)g(w)m(ord)g(expansion)g(using)g(quote)h(remo)m(v)-5
+b(al.)p eop end
+%%Page: 65 71
+TeXDict begin 65 70 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(65)630 299 y Fs
+(complete_fullquote)1110 408 y Ft(If)31 b(set,)g(Bash)h(quotes)f(all)h
+(shell)f(metac)m(haracters)i(in)e(\014lenames)g(and)g(direc-)1110
+518 y(tory)g(names)f(when)g(p)s(erforming)f(completion.)43
+b(If)30 b(not)h(set,)g(Bash)g(remo)m(v)m(es)1110 628
+y(metac)m(haracters)40 b(suc)m(h)d(as)h(the)g(dollar)g(sign)g(from)f
+(the)h(set)g(of)f(c)m(haracters)1110 737 y(that)f(will)g(b)s(e)f
+(quoted)g(in)g(completed)i(\014lenames)e(when)f(these)i(metac)m(har-)
+1110 847 y(acters)29 b(app)s(ear)e(in)g(shell)h(v)-5
+b(ariable)28 b(references)g(in)f(w)m(ords)g(to)i(b)s(e)e(completed.)
+1110 956 y(This)k(means)i(that)g(dollar)f(signs)g(in)g(v)-5
+b(ariable)33 b(names)g(that)f(expand)g(to)h(di-)1110
+1066 y(rectories)28 b(will)g(not)f(b)s(e)f(quoted;)j(ho)m(w)m(ev)m(er,)
+g(an)m(y)e(dollar)h(signs)f(app)s(earing)f(in)1110 1176
y(\014lenames)j(will)h(not)f(b)s(e)g(quoted,)h(either.)41
b(This)28 b(is)i(activ)m(e)h(only)e(when)g(bash)1110
-4751 y(is)39 b(using)f(bac)m(kslashes)i(to)g(quote)g(completed)f
-(\014lenames.)67 b(This)38 b(v)-5 b(ariable)1110 4861
+1285 y(is)39 b(using)f(bac)m(kslashes)i(to)g(quote)g(completed)f
+(\014lenames.)67 b(This)38 b(v)-5 b(ariable)1110 1395
y(is)41 b(set)g(b)m(y)g(default,)j(whic)m(h)c(is)h(the)g(default)g
-(Bash)g(b)s(eha)m(vior)g(in)g(v)m(ersions)1110 4970 y(through)30
-b(4.2.)630 5121 y Fs(direxpand)1110 5230 y Ft(If)k(set,)i(Bash)f
+(Bash)g(b)s(eha)m(vior)g(in)g(v)m(ersions)1110 1504 y(through)30
+b(4.2.)630 1682 y Fs(direxpand)1110 1792 y Ft(If)k(set,)i(Bash)f
(replaces)g(directory)g(names)g(with)f(the)g(results)h(of)f(w)m(ord)g
-(ex-)1110 5340 y(pansion)k(when)g(p)s(erforming)f(\014lename)i
-(completion.)67 b(This)38 b(c)m(hanges)i(the)p eop end
-%%Page: 65 71
-TeXDict begin 65 70 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(65)1110 299 y(con)m(ten)m(ts)29
-b(of)e(the)g(readline)h(editing)g(bu\013er.)38 b(If)27
-b(not)g(set,)i(Bash)e(attempts)h(to)1110 408 y(preserv)m(e)j(what)f
-(the)g(user)g(t)m(yp)s(ed.)630 555 y Fs(dirspell)96 b
-Ft(If)26 b(set,)i(Bash)f(attempts)g(sp)s(elling)g(correction)g(on)g
-(directory)g(names)f(during)1110 664 y(w)m(ord)36 b(completion)h(if)f
-(the)g(directory)g(name)g(initially)h(supplied)e(do)s(es)h(not)1110
-774 y(exist.)630 920 y Fs(dotglob)144 b Ft(If)27 b(set,)i(Bash)f
-(includes)g(\014lenames)g(b)s(eginning)f(with)g(a)h(`.')41
-b(in)27 b(the)h(results)g(of)1110 1029 y(\014lename)j(expansion.)630
-1176 y Fs(execfail)96 b Ft(If)24 b(this)h(is)f(set,)j(a)e(non-in)m
+(ex-)1110 1902 y(pansion)k(when)g(p)s(erforming)f(\014lename)i
+(completion.)67 b(This)38 b(c)m(hanges)i(the)1110 2011
+y(con)m(ten)m(ts)29 b(of)e(the)g(readline)h(editing)g(bu\013er.)38
+b(If)27 b(not)g(set,)i(Bash)e(attempts)h(to)1110 2121
+y(preserv)m(e)j(what)f(the)g(user)g(t)m(yp)s(ed.)630
+2299 y Fs(dirspell)96 b Ft(If)26 b(set,)i(Bash)f(attempts)g(sp)s
+(elling)g(correction)g(on)g(directory)g(names)f(during)1110
+2408 y(w)m(ord)36 b(completion)h(if)f(the)g(directory)g(name)g
+(initially)h(supplied)e(do)s(es)h(not)1110 2518 y(exist.)630
+2696 y Fs(dotglob)144 b Ft(If)27 b(set,)i(Bash)f(includes)g
+(\014lenames)g(b)s(eginning)f(with)g(a)h(`.')41 b(in)27
+b(the)h(results)g(of)1110 2806 y(\014lename)j(expansion.)630
+2984 y Fs(execfail)96 b Ft(If)24 b(this)h(is)f(set,)j(a)e(non-in)m
(teractiv)m(e)i(shell)e(will)f(not)h(exit)h(if)e(it)h(cannot)h(execute)
-1110 1285 y(the)i(\014le)g(sp)s(eci\014ed)g(as)g(an)g(argumen)m(t)g(to)
+1110 3093 y(the)i(\014le)g(sp)s(eci\014ed)g(as)g(an)g(argumen)m(t)g(to)
h(the)f Fs(exec)f Ft(builtin)h(command.)39 b(An)1110
-1395 y(in)m(teractiv)m(e)33 b(shell)e(do)s(es)f(not)g(exit)i(if)e
-Fs(exec)f Ft(fails.)630 1541 y Fs(expand_aliases)1110
-1650 y Ft(If)j(set,)h(aliases)g(are)g(expanded)e(as)h(describ)s(ed)f(b)
-s(elo)m(w)h(under)f(Aliases,)i(Sec-)1110 1760 y(tion)38
+3203 y(in)m(teractiv)m(e)33 b(shell)e(do)s(es)f(not)g(exit)i(if)e
+Fs(exec)f Ft(fails.)630 3381 y Fs(expand_aliases)1110
+3491 y Ft(If)j(set,)h(aliases)g(are)g(expanded)e(as)h(describ)s(ed)f(b)
+s(elo)m(w)h(under)f(Aliases,)i(Sec-)1110 3600 y(tion)38
b(6.6)h([Aliases],)j(page)d(88.)64 b(This)37 b(option)h(is)g(enabled)g
-(b)m(y)g(default)g(for)1110 1870 y(in)m(teractiv)m(e)33
-b(shells.)630 2016 y Fs(extdebug)96 b Ft(If)30 b(set,)h(b)s(eha)m(vior)
+(b)m(y)g(default)g(for)1110 3710 y(in)m(teractiv)m(e)33
+b(shells.)630 3888 y Fs(extdebug)96 b Ft(If)30 b(set,)h(b)s(eha)m(vior)
g(in)m(tended)f(for)g(use)g(b)m(y)g(debuggers)g(is)h(enabled:)1159
-2144 y(1.)61 b(The)32 b(`)p Fs(-F)p Ft(')g(option)h(to)g(the)g
+4032 y(1.)61 b(The)32 b(`)p Fs(-F)p Ft(')g(option)h(to)g(the)g
Fs(declare)d Ft(builtin)i(\(see)i(Section)f(4.2)h([Bash)1290
-2253 y(Builtins],)29 b(page)g(48\))g(displa)m(ys)f(the)g(source)h
-(\014le)f(name)g(and)f(line)h(n)m(um-)1290 2363 y(b)s(er)h(corresp)s
+4141 y(Builtins],)29 b(page)g(48\))g(displa)m(ys)f(the)g(source)h
+(\014le)f(name)g(and)f(line)h(n)m(um-)1290 4251 y(b)s(er)h(corresp)s
(onding)g(to)i(eac)m(h)g(function)f(name)g(supplied)f(as)i(an)f(argu-)
-1290 2472 y(men)m(t.)1159 2600 y(2.)61 b(If)20 b(the)h(command)g(run)e
+1290 4361 y(men)m(t.)1159 4504 y(2.)61 b(If)20 b(the)h(command)g(run)e
(b)m(y)i(the)f Fs(DEBUG)g Ft(trap)g(returns)g(a)h(non-zero)g(v)-5
-b(alue,)1290 2710 y(the)31 b(next)f(command)g(is)h(skipp)s(ed)e(and)g
-(not)i(executed.)1159 2838 y(3.)61 b(If)37 b(the)g(command)g(run)f(b)m
+b(alue,)1290 4614 y(the)31 b(next)f(command)g(is)h(skipp)s(ed)e(and)g
+(not)i(executed.)1159 4758 y(3.)61 b(If)37 b(the)g(command)g(run)f(b)m
(y)i(the)f Fs(DEBUG)f Ft(trap)h(returns)f(a)i(v)-5 b(alue)38
-b(of)f(2,)1290 2947 y(and)c(the)g(shell)h(is)f(executing)i(in)e(a)h
-(subroutine)e(\(a)i(shell)g(function)f(or)1290 3057 y(a)h(shell)h
+b(of)f(2,)1290 4867 y(and)c(the)g(shell)h(is)f(executing)i(in)e(a)h
+(subroutine)e(\(a)i(shell)g(function)f(or)1290 4977 y(a)h(shell)h
(script)f(executed)h(b)m(y)f(the)g Fs(.)g Ft(or)g Fs(source)e
-Ft(builtins\),)j(a)g(call)g(to)1290 3166 y Fs(return)29
-b Ft(is)h(sim)m(ulated.)1159 3294 y(4.)61 b Fs(BASH_ARGC)34
+Ft(builtins\),)j(a)g(call)g(to)1290 5087 y Fs(return)29
+b Ft(is)h(sim)m(ulated.)1159 5230 y(4.)61 b Fs(BASH_ARGC)34
b Ft(and)i Fs(BASH_ARGV)e Ft(are)j(up)s(dated)e(as)h(describ)s(ed)g(in)
-g(their)1290 3404 y(descriptions)30 b(\(see)i(Section)f(5.2)g([Bash)g
-(V)-8 b(ariables],)32 b(page)f(69\).)1159 3532 y(5.)61
+g(their)1290 5340 y(descriptions)30 b(\(see)i(Section)f(5.2)g([Bash)g
+(V)-8 b(ariables],)32 b(page)f(69\).)p eop end
+%%Page: 66 72
+TeXDict begin 66 71 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(66)1159 299 y(5.)61
b(F)-8 b(unction)57 b(tracing)g(is)g(enabled:)93 b(command)56
-b(substitution,)63 b(shell)1290 3641 y(functions,)30
-b(and)f(subshells)g(in)m(v)m(ok)m(ed)j(with)d Fs(\()h
-Fi(command)39 b Fs(\))30 b Ft(inherit)g(the)1290 3751
-y Fs(DEBUG)f Ft(and)h Fs(RETURN)e Ft(traps.)1159 3879
-y(6.)61 b(Error)41 b(tracing)i(is)f(enabled:)63 b(command)42
-b(substitution,)i(shell)f(func-)1290 3988 y(tions,)30
-b(and)f(subshells)g(in)m(v)m(ok)m(ed)i(with)e Fs(\()h
-Fi(command)39 b Fs(\))29 b Ft(inherit)g(the)h Fs(ERR)1290
-4098 y Ft(trap.)630 4244 y Fs(extglob)144 b Ft(If)26
-b(set,)i(the)f(extended)f(pattern)h(matc)m(hing)g(features)g(describ)s
-(ed)e(ab)s(o)m(v)m(e)j(\(see)1110 4354 y(Section)j(3.5.8.1)i([P)m
-(attern)f(Matc)m(hing],)g(page)f(30\))h(are)f(enabled.)630
-4500 y Fs(extquote)96 b Ft(If)49 b(set,)54 b Fs($')p
+b(substitution,)63 b(shell)1290 408 y(functions,)30 b(and)f(subshells)g
+(in)m(v)m(ok)m(ed)j(with)d Fs(\()h Fi(command)39 b Fs(\))30
+b Ft(inherit)g(the)1290 518 y Fs(DEBUG)f Ft(and)h Fs(RETURN)e
+Ft(traps.)1159 649 y(6.)61 b(Error)41 b(tracing)i(is)f(enabled:)63
+b(command)42 b(substitution,)i(shell)f(func-)1290 758
+y(tions,)30 b(and)f(subshells)g(in)m(v)m(ok)m(ed)i(with)e
+Fs(\()h Fi(command)39 b Fs(\))29 b Ft(inherit)g(the)h
+Fs(ERR)1290 868 y Ft(trap.)630 1019 y Fs(extglob)144
+b Ft(If)26 b(set,)i(the)f(extended)f(pattern)h(matc)m(hing)g(features)g
+(describ)s(ed)e(ab)s(o)m(v)m(e)j(\(see)1110 1129 y(Section)j(3.5.8.1)i
+([P)m(attern)f(Matc)m(hing],)g(page)f(30\))h(are)f(enabled.)630
+1280 y Fs(extquote)96 b Ft(If)49 b(set,)54 b Fs($')p
Fi(string)11 b Fs(')46 b Ft(and)j Fs($")p Fi(string)11
b Fs(")46 b Ft(quoting)k(is)f(p)s(erformed)e(within)1110
-4609 y Fs(${)p Fi(parameter)11 b Fs(})30 b Ft(expansions)j(enclosed)h
-(in)g(double)f(quotes.)51 b(This)32 b(option)1110 4719
-y(is)e(enabled)h(b)m(y)f(default.)630 4865 y Fs(failglob)96
+1390 y Fs(${)p Fi(parameter)11 b Fs(})30 b Ft(expansions)j(enclosed)h
+(in)g(double)f(quotes.)51 b(This)32 b(option)1110 1499
+y(is)e(enabled)h(b)m(y)f(default.)630 1650 y Fs(failglob)96
b Ft(If)36 b(set,)j(patterns)d(whic)m(h)g(fail)h(to)h(matc)m(h)f
-(\014lenames)f(during)g(\014lename)g(ex-)1110 4975 y(pansion)30
-b(result)g(in)g(an)g(expansion)h(error.)630 5121 y Fs(force_fignore)
-1110 5230 y Ft(If)43 b(set,)k(the)d(su\016xes)f(sp)s(eci\014ed)f(b)m(y)
+(\014lenames)f(during)g(\014lename)g(ex-)1110 1760 y(pansion)30
+b(result)g(in)g(an)g(expansion)h(error.)630 1911 y Fs(force_fignore)
+1110 2021 y Ft(If)43 b(set,)k(the)d(su\016xes)f(sp)s(eci\014ed)f(b)m(y)
i(the)f Fs(FIGNORE)f Ft(shell)h(v)-5 b(ariable)44 b(cause)1110
-5340 y(w)m(ords)31 b(to)h(b)s(e)f(ignored)h(when)f(p)s(erforming)f(w)m
-(ord)h(completion)i(ev)m(en)f(if)g(the)p eop end
-%%Page: 66 72
-TeXDict begin 66 71 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(66)1110 299 y(ignored)37
+2131 y(w)m(ords)31 b(to)h(b)s(e)f(ignored)h(when)f(p)s(erforming)f(w)m
+(ord)h(completion)i(ev)m(en)f(if)g(the)1110 2240 y(ignored)37
b(w)m(ords)g(are)g(the)h(only)f(p)s(ossible)g(completions.)62
-b(See)37 b(Section)h(5.2)1110 408 y([Bash)24 b(V)-8 b(ariables],)27
-b(page)e(69,)h(for)d(a)h(description)g(of)g Fs(FIGNORE)p
-Ft(.)37 b(This)22 b(option)1110 518 y(is)30 b(enabled)h(b)m(y)f
-(default.)630 701 y Fs(globasciiranges)1110 810 y Ft(If)j(set,)h(range)
-f(expressions)g(used)f(in)h(pattern)g(matc)m(hing)h(brac)m(k)m(et)h
-(expres-)1110 920 y(sions)28 b(\(see)h(Section)h(3.5.8.1)g([P)m(attern)
-g(Matc)m(hing],)h(page)e(30\))g(b)s(eha)m(v)m(e)g(as)g(if)1110
-1029 y(in)i(the)g(traditional)i(C)d(lo)s(cale)j(when)d(p)s(erforming)g
-(comparisons.)44 b(That)31 b(is,)1110 1139 y(the)d(curren)m(t)g(lo)s
-(cale's)i(collating)h(sequence)d(is)h(not)f(tak)m(en)h(in)m(to)g
-(accoun)m(t,)i(so)1110 1249 y(`)p Fs(b)p Ft(')j(will)g(not)g(collate)i
-(b)s(et)m(w)m(een)e(`)p Fs(A)p Ft(')g(and)f(`)p Fs(B)p
-Ft(',)h(and)f(upp)s(er-case)g(and)g(lo)m(w)m(er-)1110
-1358 y(case)e(ASCI)s(I)e(c)m(haracters)j(will)f(collate)i(together.)630
-1541 y Fs(globstar)96 b Ft(If)38 b(set,)j(the)e(pattern)f(`)p
-Fs(**)p Ft(')h(used)e(in)i(a)f(\014lename)h(expansion)f(con)m(text)j
-(will)1110 1650 y(matc)m(h)36 b(all)g(\014les)f(and)f(zero)i(or)f(more)
-g(directories)h(and)e(sub)s(directories.)54 b(If)1110
-1760 y(the)30 b(pattern)g(is)g(follo)m(w)m(ed)i(b)m(y)d(a)i(`)p
+b(See)37 b(Section)h(5.2)1110 2350 y([Bash)24 b(V)-8
+b(ariables],)27 b(page)e(69,)h(for)d(a)h(description)g(of)g
+Fs(FIGNORE)p Ft(.)37 b(This)22 b(option)1110 2459 y(is)30
+b(enabled)h(b)m(y)f(default.)630 2611 y Fs(globasciiranges)1110
+2720 y Ft(If)j(set,)h(range)f(expressions)g(used)f(in)h(pattern)g(matc)
+m(hing)h(brac)m(k)m(et)h(expres-)1110 2830 y(sions)28
+b(\(see)h(Section)h(3.5.8.1)g([P)m(attern)g(Matc)m(hing],)h(page)e
+(30\))g(b)s(eha)m(v)m(e)g(as)g(if)1110 2939 y(in)i(the)g(traditional)i
+(C)d(lo)s(cale)j(when)d(p)s(erforming)g(comparisons.)44
+b(That)31 b(is,)1110 3049 y(the)d(curren)m(t)g(lo)s(cale's)i(collating)
+h(sequence)d(is)h(not)f(tak)m(en)h(in)m(to)g(accoun)m(t,)i(so)1110
+3159 y(`)p Fs(b)p Ft(')j(will)g(not)g(collate)i(b)s(et)m(w)m(een)e(`)p
+Fs(A)p Ft(')g(and)f(`)p Fs(B)p Ft(',)h(and)f(upp)s(er-case)g(and)g(lo)m
+(w)m(er-)1110 3268 y(case)e(ASCI)s(I)e(c)m(haracters)j(will)f(collate)i
+(together.)630 3420 y Fs(globstar)96 b Ft(If)38 b(set,)j(the)e(pattern)
+f(`)p Fs(**)p Ft(')h(used)e(in)i(a)f(\014lename)h(expansion)f(con)m
+(text)j(will)1110 3529 y(matc)m(h)36 b(all)g(\014les)f(and)f(zero)i(or)
+f(more)g(directories)h(and)e(sub)s(directories.)54 b(If)1110
+3639 y(the)30 b(pattern)g(is)g(follo)m(w)m(ed)i(b)m(y)d(a)i(`)p
Fs(/)p Ft(',)f(only)g(directories)h(and)f(sub)s(directories)1110
-1870 y(matc)m(h.)630 2052 y Fs(gnu_errfmt)1110 2162 y
+3748 y(matc)m(h.)630 3900 y Fs(gnu_errfmt)1110 4009 y
Ft(If)35 b(set,)j(shell)e(error)g(messages)g(are)h(written)e(in)h(the)g
-(standard)f Fl(gnu)g Ft(error)1110 2271 y(message)c(format.)630
-2454 y Fs(histappend)1110 2564 y Ft(If)c(set,)j(the)e(history)g(list)g
+(standard)f Fl(gnu)g Ft(error)1110 4119 y(message)c(format.)630
+4270 y Fs(histappend)1110 4380 y Ft(If)c(set,)j(the)e(history)g(list)g
(is)g(app)s(ended)e(to)j(the)f(\014le)g(named)f(b)m(y)h(the)g(v)-5
-b(alue)29 b(of)1110 2673 y(the)d Fs(HISTFILE)d Ft(v)-5
+b(alue)29 b(of)1110 4489 y(the)d Fs(HISTFILE)d Ft(v)-5
b(ariable)26 b(when)e(the)h(shell)h(exits,)h(rather)e(than)h(o)m(v)m
-(erwriting)1110 2783 y(the)31 b(\014le.)630 2966 y Fs(histreedit)1110
-3075 y Ft(If)i(set,)h(and)f(Readline)h(is)f(b)s(eing)g(used,)g(a)g
+(erwriting)1110 4599 y(the)31 b(\014le.)630 4750 y Fs(histreedit)1110
+4860 y Ft(If)i(set,)h(and)f(Readline)h(is)f(b)s(eing)g(used,)g(a)g
(user)g(is)g(giv)m(en)h(the)g(opp)s(ortunit)m(y)1110
-3185 y(to)d(re-edit)g(a)g(failed)g(history)f(substitution.)630
-3367 y Fs(histverify)1110 3477 y Ft(If)35 b(set,)i(and)e(Readline)h(is)
+4969 y(to)d(re-edit)g(a)g(failed)g(history)f(substitution.)630
+5121 y Fs(histverify)1110 5230 y Ft(If)35 b(set,)i(and)e(Readline)h(is)
f(b)s(eing)g(used,)h(the)f(results)g(of)g(history)h(substitu-)1110
-3587 y(tion)h(are)g(not)g(immediately)h(passed)e(to)h(the)g(shell)g
-(parser.)59 b(Instead,)38 b(the)1110 3696 y(resulting)i(line)f(is)h
-(loaded)g(in)m(to)g(the)g(Readline)g(editing)g(bu\013er,)h(allo)m(wing)
-1110 3806 y(further)29 b(mo)s(di\014cation.)630 3988
-y Fs(hostcomplete)1110 4098 y Ft(If)38 b(set,)j(and)c(Readline)i(is)f
-(b)s(eing)g(used,)h(Bash)g(will)f(attempt)h(to)g(p)s(erform)1110
-4208 y(hostname)d(completion)h(when)e(a)h(w)m(ord)f(con)m(taining)i(a)f
-(`)p Fs(@)p Ft(')g(is)g(b)s(eing)f(com-)1110 4317 y(pleted)g(\(see)h
+5340 y(tion)h(are)g(not)g(immediately)h(passed)e(to)h(the)g(shell)g
+(parser.)59 b(Instead,)38 b(the)p eop end
+%%Page: 67 73
+TeXDict begin 67 72 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(67)1110 299 y(resulting)40
+b(line)f(is)h(loaded)g(in)m(to)g(the)g(Readline)g(editing)g(bu\013er,)h
+(allo)m(wing)1110 408 y(further)29 b(mo)s(di\014cation.)630
+564 y Fs(hostcomplete)1110 673 y Ft(If)38 b(set,)j(and)c(Readline)i(is)
+f(b)s(eing)g(used,)h(Bash)g(will)f(attempt)h(to)g(p)s(erform)1110
+783 y(hostname)d(completion)h(when)e(a)h(w)m(ord)f(con)m(taining)i(a)f
+(`)p Fs(@)p Ft(')g(is)g(b)s(eing)f(com-)1110 892 y(pleted)g(\(see)h
(Section)f(8.4.6)i([Commands)d(F)-8 b(or)36 b(Completion],)g(page)g
-(121\).)1110 4427 y(This)30 b(option)g(is)h(enabled)f(b)m(y)g(default.)
-630 4609 y Fs(huponexit)1110 4719 y Ft(If)i(set,)i(Bash)f(will)h(send)d
+(121\).)1110 1002 y(This)30 b(option)g(is)h(enabled)f(b)m(y)g(default.)
+630 1157 y Fs(huponexit)1110 1267 y Ft(If)i(set,)i(Bash)f(will)h(send)d
Fs(SIGHUP)h Ft(to)h(all)h(jobs)e(when)g(an)g(in)m(teractiv)m(e)k(login)
-1110 4829 y(shell)31 b(exits)g(\(see)g(Section)g(3.7.6)h([Signals],)g
-(page)f(38\).)630 5011 y Fs(interactive_comments)1110
-5121 y Ft(Allo)m(w)c(a)g(w)m(ord)e(b)s(eginning)g(with)h(`)p
+1110 1377 y(shell)31 b(exits)g(\(see)g(Section)g(3.7.6)h([Signals],)g
+(page)f(38\).)630 1532 y Fs(interactive_comments)1110
+1641 y Ft(Allo)m(w)c(a)g(w)m(ord)e(b)s(eginning)g(with)h(`)p
Fs(#)p Ft(')g(to)h(cause)f(that)h(w)m(ord)f(and)f(all)i(remain-)1110
-5230 y(ing)41 b(c)m(haracters)i(on)e(that)h(line)g(to)g(b)s(e)f
+1751 y(ing)41 b(c)m(haracters)i(on)e(that)h(line)g(to)g(b)s(e)f
(ignored)g(in)g(an)g(in)m(teractiv)m(e)j(shell.)1110
-5340 y(This)30 b(option)g(is)h(enabled)f(b)m(y)g(default.)p
-eop end
-%%Page: 67 73
-TeXDict begin 67 72 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(67)630 299 y Fs(lastpipe)96
-b Ft(If)24 b(set,)i(and)e(job)g(con)m(trol)i(is)f(not)f(activ)m(e,)k
-(the)d(shell)f(runs)f(the)i(last)g(command)1110 408 y(of)37
-b(a)h(pip)s(eline)e(not)h(executed)h(in)f(the)g(bac)m(kground)g(in)g
-(the)g(curren)m(t)g(shell)1110 518 y(en)m(vironmen)m(t.)630
-677 y Fs(lithist)144 b Ft(If)22 b(enabled,)i(and)d(the)h
+1861 y(This)30 b(option)g(is)h(enabled)f(b)m(y)g(default.)630
+2016 y Fs(lastpipe)96 b Ft(If)24 b(set,)i(and)e(job)g(con)m(trol)i(is)f
+(not)f(activ)m(e,)k(the)d(shell)f(runs)f(the)i(last)g(command)1110
+2125 y(of)37 b(a)h(pip)s(eline)e(not)h(executed)h(in)f(the)g(bac)m
+(kground)g(in)g(the)g(curren)m(t)g(shell)1110 2235 y(en)m(vironmen)m
+(t.)630 2390 y Fs(lithist)144 b Ft(If)22 b(enabled,)i(and)d(the)h
Fs(cmdhist)e Ft(option)j(is)f(enabled,)i(m)m(ulti-line)f(commands)1110
-787 y(are)28 b(sa)m(v)m(ed)h(to)g(the)f(history)g(with)f(em)m(b)s
-(edded)g(newlines)h(rather)g(than)f(using)1110 897 y(semicolon)32
-b(separators)f(where)e(p)s(ossible.)630 1056 y Fs(login_shell)1110
-1166 y Ft(The)35 b(shell)h(sets)g(this)f(option)h(if)g(it)g(is)f
+2500 y(are)28 b(sa)m(v)m(ed)h(to)g(the)f(history)g(with)f(em)m(b)s
+(edded)g(newlines)h(rather)g(than)f(using)1110 2609 y(semicolon)32
+b(separators)f(where)e(p)s(ossible.)630 2765 y Fs(login_shell)1110
+2874 y Ft(The)35 b(shell)h(sets)g(this)f(option)h(if)g(it)g(is)f
(started)h(as)g(a)g(login)g(shell)g(\(see)g(Sec-)1110
-1275 y(tion)29 b(6.1)g([In)m(v)m(oking)h(Bash],)f(page)g(80\).)41
+2984 y(tion)29 b(6.1)g([In)m(v)m(oking)h(Bash],)f(page)g(80\).)41
b(The)28 b(v)-5 b(alue)29 b(ma)m(y)g(not)f(b)s(e)g(c)m(hanged.)630
-1435 y Fs(mailwarn)96 b Ft(If)34 b(set,)i(and)e(a)h(\014le)g(that)g
+3139 y Fs(mailwarn)96 b Ft(If)34 b(set,)i(and)e(a)h(\014le)g(that)g
(Bash)f(is)h(c)m(hec)m(king)h(for)f(mail)g(has)f(b)s(een)g(accessed)
-1110 1544 y(since)24 b(the)h(last)g(time)f(it)h(w)m(as)f(c)m(hec)m(k)m
+1110 3249 y(since)24 b(the)h(last)g(time)f(it)h(w)m(as)f(c)m(hec)m(k)m
(ed,)k(the)c(message)h Fs("The)k(mail)h(in)f Fi(mail-)1110
-1654 y(file)40 b Fs(has)29 b(been)g(read")g Ft(is)i(displa)m(y)m(ed.)
-630 1813 y Fs(no_empty_cmd_completion)1110 1923 y Ft(If)f(set,)g(and)g
+3358 y(file)40 b Fs(has)29 b(been)g(read")g Ft(is)i(displa)m(y)m(ed.)
+630 3513 y Fs(no_empty_cmd_completion)1110 3623 y Ft(If)f(set,)g(and)g
(Readline)g(is)h(b)s(eing)e(used,)h(Bash)g(will)g(not)g(attempt)i(to)e
-(searc)m(h)1110 2032 y(the)25 b Fs(PATH)f Ft(for)h(p)s(ossible)f
+(searc)m(h)1110 3733 y(the)25 b Fs(PATH)f Ft(for)h(p)s(ossible)f
(completions)j(when)d(completion)i(is)f(attempted)h(on)1110
-2142 y(an)k(empt)m(y)h(line.)630 2301 y Fs(nocaseglob)1110
-2411 y Ft(If)38 b(set,)k(Bash)d(matc)m(hes)g(\014lenames)g(in)f(a)h
-(case-insensitiv)m(e)j(fashion)c(when)1110 2521 y(p)s(erforming)29
-b(\014lename)i(expansion.)630 2680 y Fs(nocasematch)1110
-2790 y Ft(If)42 b(set,)k(Bash)d(matc)m(hes)g(patterns)g(in)f(a)h
-(case-insensitiv)m(e)i(fashion)d(when)1110 2899 y(p)s(erforming)31
+3842 y(an)k(empt)m(y)h(line.)630 3998 y Fs(nocaseglob)1110
+4107 y Ft(If)38 b(set,)k(Bash)d(matc)m(hes)g(\014lenames)g(in)f(a)h
+(case-insensitiv)m(e)j(fashion)c(when)1110 4217 y(p)s(erforming)29
+b(\014lename)i(expansion.)630 4372 y Fs(nocasematch)1110
+4482 y Ft(If)42 b(set,)k(Bash)d(matc)m(hes)g(patterns)g(in)f(a)h
+(case-insensitiv)m(e)i(fashion)d(when)1110 4591 y(p)s(erforming)31
b(matc)m(hing)i(while)f(executing)i Fs(case)d Ft(or)h
-Fs([[)g Ft(conditional)h(com-)1110 3009 y(mands.)630
-3168 y Fs(nullglob)96 b Ft(If)23 b(set,)j(Bash)e(allo)m(ws)g
+Fs([[)g Ft(conditional)h(com-)1110 4701 y(mands.)630
+4856 y Fs(nullglob)96 b Ft(If)23 b(set,)j(Bash)e(allo)m(ws)g
(\014lename)g(patterns)g(whic)m(h)f(matc)m(h)h(no)g(\014les)f(to)i
-(expand)1110 3278 y(to)31 b(a)g(n)m(ull)f(string,)h(rather)f(than)g
-(themselv)m(es.)630 3437 y Fs(progcomp)96 b Ft(If)25
+(expand)1110 4966 y(to)31 b(a)g(n)m(ull)f(string,)h(rather)f(than)g
+(themselv)m(es.)630 5121 y Fs(progcomp)96 b Ft(If)25
b(set,)i(the)f(programmable)g(completion)g(facilities)i(\(see)f
-(Section)f(8.6)h([Pro-)1110 3547 y(grammable)45 b(Completion],)k(page)c
+(Section)f(8.6)h([Pro-)1110 5230 y(grammable)45 b(Completion],)k(page)c
(125\))h(are)f(enabled.)82 b(This)44 b(option)h(is)1110
-3656 y(enabled)30 b(b)m(y)h(default.)630 3816 y Fs(promptvars)1110
-3925 y Ft(If)50 b(set,)56 b(prompt)49 b(strings)h(undergo)g(parameter)h
-(expansion,)k(command)1110 4035 y(substitution,)35 b(arithmetic)g
-(expansion,)g(and)e(quote)i(remo)m(v)-5 b(al)35 b(after)f(b)s(eing)1110
-4144 y(expanded)53 b(as)h(describ)s(ed)e(b)s(elo)m(w)i(\(see)h(Section)
-f(6.9)h([Con)m(trolling)g(the)1110 4254 y(Prompt],)30
-b(page)h(92\).)42 b(This)30 b(option)h(is)f(enabled)h(b)m(y)f(default.)
-630 4413 y Fs(restricted_shell)1110 4523 y Ft(The)40
-b(shell)h(sets)g(this)g(option)g(if)g(it)h(is)e(started)i(in)e
-(restricted)i(mo)s(de)e(\(see)1110 4633 y(Section)c(6.10)g([The)f
-(Restricted)g(Shell],)i(page)e(93\).)56 b(The)34 b(v)-5
-b(alue)35 b(ma)m(y)h(not)1110 4742 y(b)s(e)c(c)m(hanged.)49
-b(This)32 b(is)h(not)h(reset)f(when)f(the)h(startup)g(\014les)f(are)i
-(executed,)1110 4852 y(allo)m(wing)k(the)e(startup)f(\014les)h(to)g
-(disco)m(v)m(er)h(whether)f(or)f(not)i(a)f(shell)g(is)g(re-)1110
-4961 y(stricted.)630 5121 y Fs(shift_verbose)1110 5230
-y Ft(If)g(this)g(is)g(set,)j(the)d Fs(shift)f Ft(builtin)h(prin)m(ts)f
-(an)h(error)g(message)i(when)d(the)1110 5340 y(shift)30
-b(coun)m(t)h(exceeds)g(the)g(n)m(um)m(b)s(er)e(of)h(p)s(ositional)i
-(parameters.)p eop end
+5340 y(enabled)30 b(b)m(y)h(default.)p eop end
%%Page: 68 74
TeXDict begin 68 73 bop 150 -116 a Ft(Chapter)30 b(4:)41
-b(Shell)30 b(Builtin)h(Commands)2069 b(68)630 299 y Fs(sourcepath)1110
-408 y Ft(If)22 b(set,)j(the)e Fs(source)e Ft(builtin)h(uses)g(the)h(v)
--5 b(alue)23 b(of)g Fs(PATH)e Ft(to)j(\014nd)d(the)h(directory)1110
-518 y(con)m(taining)29 b(the)e(\014le)h(supplied)e(as)h(an)g(argumen)m
-(t.)40 b(This)27 b(option)h(is)f(enabled)1110 628 y(b)m(y)j(default.)
-630 787 y Fs(xpg_echo)96 b Ft(If)31 b(set,)h(the)g Fs(echo)e
+b(Shell)30 b(Builtin)h(Commands)2069 b(68)630 299 y Fs(promptvars)1110
+408 y Ft(If)50 b(set,)56 b(prompt)49 b(strings)h(undergo)g(parameter)h
+(expansion,)k(command)1110 518 y(substitution,)35 b(arithmetic)g
+(expansion,)g(and)e(quote)i(remo)m(v)-5 b(al)35 b(after)f(b)s(eing)1110
+628 y(expanded)53 b(as)h(describ)s(ed)e(b)s(elo)m(w)i(\(see)h(Section)f
+(6.9)h([Con)m(trolling)g(the)1110 737 y(Prompt],)30 b(page)h(92\).)42
+b(This)30 b(option)h(is)f(enabled)h(b)m(y)f(default.)630
+897 y Fs(restricted_shell)1110 1006 y Ft(The)40 b(shell)h(sets)g(this)g
+(option)g(if)g(it)h(is)e(started)i(in)e(restricted)i(mo)s(de)e(\(see)
+1110 1116 y(Section)c(6.10)g([The)f(Restricted)g(Shell],)i(page)e
+(93\).)56 b(The)34 b(v)-5 b(alue)35 b(ma)m(y)h(not)1110
+1225 y(b)s(e)c(c)m(hanged.)49 b(This)32 b(is)h(not)h(reset)f(when)f
+(the)h(startup)g(\014les)f(are)i(executed,)1110 1335
+y(allo)m(wing)k(the)e(startup)f(\014les)h(to)g(disco)m(v)m(er)h
+(whether)f(or)f(not)i(a)f(shell)g(is)g(re-)1110 1445
+y(stricted.)630 1604 y Fs(shift_verbose)1110 1714 y Ft(If)g(this)g(is)g
+(set,)j(the)d Fs(shift)f Ft(builtin)h(prin)m(ts)f(an)h(error)g(message)
+i(when)d(the)1110 1823 y(shift)30 b(coun)m(t)h(exceeds)g(the)g(n)m(um)m
+(b)s(er)e(of)h(p)s(ositional)i(parameters.)630 1983 y
+Fs(sourcepath)1110 2092 y Ft(If)22 b(set,)j(the)e Fs(source)e
+Ft(builtin)h(uses)g(the)h(v)-5 b(alue)23 b(of)g Fs(PATH)e
+Ft(to)j(\014nd)d(the)h(directory)1110 2202 y(con)m(taining)29
+b(the)e(\014le)h(supplied)e(as)h(an)g(argumen)m(t.)40
+b(This)27 b(option)h(is)f(enabled)1110 2311 y(b)m(y)j(default.)630
+2471 y Fs(xpg_echo)96 b Ft(If)31 b(set,)h(the)g Fs(echo)e
Ft(builtin)h(expands)f(bac)m(kslash-escap)s(e)j(sequences)f(b)m(y)f
-(de-)1110 897 y(fault.)630 1056 y(The)c(return)f(status)i(when)f
+(de-)1110 2580 y(fault.)630 2740 y(The)c(return)f(status)i(when)f
(listing)h(options)g(is)f(zero)i(if)e(all)i Fq(optnames)i
-Ft(are)d(enabled,)g(non-)630 1166 y(zero)40 b(otherwise.)66
+Ft(are)d(enabled,)g(non-)630 2849 y(zero)40 b(otherwise.)66
b(When)39 b(setting)h(or)f(unsetting)g(options,)i(the)e(return)f
-(status)h(is)g(zero)630 1275 y(unless)30 b(an)g Fq(optname)36
+(status)h(is)g(zero)630 2959 y(unless)30 b(an)g Fq(optname)36
b Ft(is)30 b(not)h(a)g(v)-5 b(alid)30 b(shell)h(option.)150
-1508 y Fr(4.4)68 b(Sp)t(ecial)45 b(Builtins)150 1667
+3191 y Fr(4.4)68 b(Sp)t(ecial)45 b(Builtins)150 3351
y Ft(F)-8 b(or)35 b(historical)h(reasons,)g(the)e Fl(posix)g
Ft(standard)f(has)i(classi\014ed)f(sev)m(eral)i(builtin)e(commands)g
-(as)h Fk(sp)-5 b(e-)150 1777 y(cial)p Ft(.)47 b(When)33
+(as)h Fk(sp)-5 b(e-)150 3460 y(cial)p Ft(.)47 b(When)33
b(Bash)f(is)h(executing)g(in)f Fl(posix)g Ft(mo)s(de,)h(the)g(sp)s
(ecial)g(builtins)e(di\013er)i(from)f(other)g(builtin)150
-1886 y(commands)e(in)g(three)h(resp)s(ects:)199 2021
+3570 y(commands)e(in)g(three)h(resp)s(ects:)199 3704
y(1.)61 b(Sp)s(ecial)31 b(builtins)e(are)i(found)e(b)s(efore)h(shell)h
-(functions)f(during)f(command)h(lo)s(okup.)199 2155 y(2.)61
+(functions)f(during)f(command)h(lo)s(okup.)199 3839 y(2.)61
b(If)30 b(a)h(sp)s(ecial)g(builtin)f(returns)f(an)h(error)g(status,)h
-(a)g(non-in)m(teractiv)m(e)i(shell)d(exits.)199 2290
+(a)g(non-in)m(teractiv)m(e)i(shell)d(exits.)199 3973
y(3.)61 b(Assignmen)m(t)30 b(statemen)m(ts)h(preceding)f(the)f(command)
g(sta)m(y)i(in)e(e\013ect)i(in)e(the)h(shell)f(en)m(vironmen)m(t)330
-2399 y(after)i(the)f(command)h(completes.)275 2559 y(When)36
+4083 y(after)i(the)f(command)h(completes.)275 4242 y(When)36
b(Bash)g(is)h(not)f(executing)i(in)e Fl(posix)f Ft(mo)s(de,)j(these)f
(builtins)f(b)s(eha)m(v)m(e)h(no)f(di\013eren)m(tly)h(than)150
-2668 y(the)31 b(rest)f(of)h(the)f(Bash)h(builtin)e(commands.)41
+4352 y(the)31 b(rest)f(of)h(the)f(Bash)h(builtin)e(commands.)41
b(The)30 b(Bash)g Fl(posix)g Ft(mo)s(de)g(is)g(describ)s(ed)f(in)h
-(Section)h(6.11)150 2778 y([Bash)g(POSIX)e(Mo)s(de],)i(page)g(94.)275
-2912 y(These)f(are)g(the)h Fl(posix)f Ft(sp)s(ecial)h(builtins:)390
-3047 y Fs(break)46 b(:)i(.)f(continue)f(eval)g(exec)h(exit)g(export)f
-(readonly)f(return)h(set)390 3156 y(shift)g(trap)h(unset)p
+(Section)h(6.11)150 4462 y([Bash)g(POSIX)e(Mo)s(de],)i(page)g(94.)275
+4596 y(These)f(are)g(the)h Fl(posix)f Ft(sp)s(ecial)h(builtins:)390
+4731 y Fs(break)46 b(:)i(.)f(continue)f(eval)g(exec)h(exit)g(export)f
+(readonly)f(return)h(set)390 4840 y(shift)g(trap)h(unset)p
eop end
%%Page: 69 75
TeXDict begin 69 74 bop 150 -116 a Ft(Chapter)30 b(5:)41
b(Eac)m(h)31 b(w)m(ord)f(in)g(the)h(list)g(is)g(a)g(v)-5
b(alid)630 408 y(argumen)m(t)33 b(for)g(the)f(`)p Fs(-s)p
Ft(')h(option)g(to)g(the)g Fs(shopt)e Ft(builtin)i(command)f(\(see)i
-(Section)f(4.3.2)630 518 y([The)j(Shopt)g(Builtin],)i(page)f(62\).)60
+(Section)f(4.3.2)630 518 y([The)j(Shopt)g(Builtin],)i(page)f(63\).)60
b(The)36 b(options)h(app)s(earing)f(in)g Fs(BASHOPTS)e
Ft(are)i(those)630 628 y(rep)s(orted)e(as)h(`)p Fs(on)p
Ft(')f(b)m(y)h(`)p Fs(shopt)p Ft('.)53 b(If)34 b(this)g(v)-5
2522 y(is)g(pushed)f(on)m(to)i Fs(BASH_ARGC)p Ft(.)59
b(The)37 b(shell)g(sets)h Fs(BASH_ARGC)c Ft(only)k(when)e(in)h
(extended)630 2632 y(debugging)23 b(mo)s(de)f(\(see)h(Section)g(4.3.2)i
-([The)d(Shopt)g(Builtin],)j(page)e(62)h(for)e(a)h(description)630
+([The)d(Shopt)g(Builtin],)j(page)e(63)h(for)e(a)h(description)630
2741 y(of)31 b(the)f Fs(extdebug)e Ft(option)j(to)g(the)g
Fs(shopt)e Ft(builtin\).)150 2898 y Fs(BASH_ARGV)630
3007 y Ft(An)24 b(arra)m(y)g(v)-5 b(ariable)25 b(con)m(taining)h(all)f
(on)m(to)i Fs(BASH_ARGV)p Ft(.)66 b(The)40 b(shell)630
3446 y(sets)28 b Fs(BASH_ARGV)e Ft(only)i(when)f(in)h(extended)g
(debugging)g(mo)s(de)g(\(see)h(Section)f(4.3.2)i([The)630
-3555 y(Shopt)i(Builtin],)h(page)g(62)g(for)f(a)h(description)f(of)h
+3555 y(Shopt)i(Builtin],)h(page)g(63)g(for)f(a)h(description)f(of)h
(the)f Fs(extdebug)e Ft(option)j(to)g(the)f Fs(shopt)630
3665 y Ft(builtin\).)150 3821 y Fs(BASH_CMDS)630 3931
y Ft(An)i(asso)s(ciativ)m(e)i(arra)m(y)f(v)-5 b(ariable)35
150 4902 y Fs(BASH_COMPAT)630 5011 y Ft(The)i(v)-5 b(alue)34
b(is)f(used)g(to)h(set)f(the)h(shell's)g(compatibilit)m(y)h(lev)m(el.)
51 b(See)34 b(Section)g(4.3.2)h([The)630 5121 y(Shopt)40
-b(Builtin],)45 b(page)c(62,)k(for)c(a)g(description)g(of)g(the)g(v)-5
+b(Builtin],)45 b(page)c(63,)k(for)c(a)g(description)g(of)g(the)g(v)-5
b(arious)41 b(compatibilit)m(y)i(lev)m(els)630 5230 y(and)31
b(their)g(e\013ects.)45 b(The)31 b(v)-5 b(alue)31 b(ma)m(y)h(b)s(e)f(a)
h(decimal)g(n)m(um)m(b)s(er)e(\(e.g.,)j(4.2\))g(or)e(an)h(in)m(teger)
(when)h(prin)m(ting)630 3258 y(selection)39 b(lists.)63
b(Automatically)41 b(set)d(if)f(the)h Fs(checkwinsize)d
Ft(option)j(is)f(enabled)h(\(see)630 3367 y(Section)44
-b(4.3.2)h([The)e(Shopt)g(Builtin],)k(page)d(62\),)k(or)43
+b(4.3.2)h([The)e(Shopt)g(Builtin],)k(page)d(63\),)k(or)43
b(in)g(an)g(in)m(teractiv)m(e)j(shell)e(up)s(on)630 3477
y(receipt)31 b(of)g(a)g Fs(SIGWINCH)p Ft(.)150 3660 y
Fs(COMP_CWORD)630 3769 y Ft(An)38 b(index)g(in)m(to)h
(ting)630 4843 y(selection)c(lists.)63 b(Automatically)41
b(set)d(if)f(the)h Fs(checkwinsize)d Ft(option)j(is)f(enabled)h(\(see)
630 4952 y(Section)44 b(4.3.2)h([The)e(Shopt)g(Builtin],)k(page)d
-(62\),)k(or)43 b(in)g(an)g(in)m(teractiv)m(e)j(shell)e(up)s(on)630
+(63\),)k(or)43 b(in)g(an)g(in)m(teractiv)m(e)j(shell)e(up)s(on)630
5062 y(receipt)31 b(of)g(a)g Fs(SIGWINCH)p Ft(.)150 5230
y Fs(MACHTYPE)96 b Ft(A)26 b(string)g(that)h(fully)f(describ)s(es)f
(the)h(system)g(t)m(yp)s(e)h(on)f(whic)m(h)f(Bash)i(is)f(executing,)i
b Ft(The)20 b(v)-5 b(alue)22 b(is)e(the)h(prompt)f(prin)m(ted)h(b)s
(efore)f(the)h(command)g(line)g(is)g(ec)m(ho)s(ed)g(when)f(the)h(`)p
Fs(-x)p Ft(')630 4604 y(option)32 b(is)f(set)h(\(see)g(Section)h(4.3.1)
-g([The)e(Set)g(Builtin],)i(page)f(58\).)45 b(The)31 b(\014rst)f(c)m
+g([The)e(Set)g(Builtin],)i(page)f(59\).)45 b(The)31 b(\014rst)f(c)m
(haracter)630 4714 y(of)k Fs(PS4)g Ft(is)g(replicated)i(m)m(ultiple)f
(times,)h(as)e(necessary)-8 b(,)37 b(to)e(indicate)g(m)m(ultiple)g(lev)
m(els)h(of)630 4823 y(indirection.)41 b(The)30 b(default)h(is)f(`)p
41 b(Eac)m(h)31 b(w)m(ord)f(in)g(the)h(list)g(is)g(a)g(v)-5
b(alid)630 2248 y(argumen)m(t)24 b(for)f(the)h(`)p Fs(-o)p
Ft(')f(option)h(to)g(the)g Fs(set)f Ft(builtin)g(command)g(\(see)i
-(Section)f(4.3.1)h([The)630 2358 y(Set)k(Builtin],)h(page)f(58\).)42
+(Section)f(4.3.1)h([The)630 2358 y(Set)k(Builtin],)h(page)f(59\).)42
b(The)28 b(options)h(app)s(earing)f(in)g Fs(SHELLOPTS)e
Ft(are)j(those)h(rep)s(orted)630 2467 y(as)g(`)p Fs(on)p
Ft(')f(b)m(y)h(`)p Fs(set)g(-o)p Ft('.)40 b(If)29 b(this)h(v)-5
b Fs(])43 b([)p Fi(ar-)390 1460 y(gument)57 b Fs(...)o(])275
1592 y Ft(All)31 b(of)g(the)f(single-c)m(haracter)k(options)d(used)f
(with)g(the)h Fs(set)f Ft(builtin)g(\(see)h(Section)h(4.3.1)g([The)f
-(Set)150 1702 y(Builtin],)45 b(page)c(58\))i(can)e(b)s(e)f(used)h(as)g
+(Set)150 1702 y(Builtin],)45 b(page)c(59\))i(can)e(b)s(e)f(used)h(as)g
(options)g(when)f(the)i(shell)f(is)g(in)m(v)m(ok)m(ed.)74
b(In)41 b(addition,)j(there)150 1811 y(are)38 b(sev)m(eral)h(m)m
(ulti-c)m(haracter)h(options)d(that)h(y)m(ou)g(can)g(use.)61
2186 y Ft(Arrange)j(for)g(the)g(debugger)g(pro\014le)g(to)h(b)s(e)e
(executed)i(b)s(efore)f(the)g(shell)g(starts.)49 b(T)-8
b(urns)630 2296 y(on)37 b(extended)g(debugging)g(mo)s(de)g(\(see)h
-(Section)g(4.3.2)g([The)f(Shopt)g(Builtin],)i(page)f(62)630
+(Section)g(4.3.2)g([The)f(Shopt)g(Builtin],)i(page)f(63)630
2405 y(for)30 b(a)h(description)f(of)h(the)f Fs(extdebug)f
Ft(option)h(to)h(the)g Fs(shopt)e Ft(builtin\).)150 2561
y Fs(--dump-po-strings)630 2670 y Ft(A)37 b(list)g(of)f(all)i
b Fs(])630 4518 y Fq(shopt)p 854 4518 28 4 v 40 w(option)44
b Ft(is)g(one)h(of)f(the)g(shell)h(options)f(accepted)h(b)m(y)f(the)h
Fs(shopt)d Ft(builtin)i(\(see)630 4628 y(Section)28 b(4.3.2)g([The)f
-(Shopt)f(Builtin],)i(page)f(62\).)41 b(If)26 b Fq(shopt)p
+(Shopt)f(Builtin],)i(page)f(63\).)41 b(If)26 b Fq(shopt)p
2690 4628 V 40 w(option)h Ft(is)g(presen)m(t,)h(`)p Fs(-O)p
Ft(')f(sets)630 4738 y(the)40 b(v)-5 b(alue)40 b(of)f(that)h(option;)45
b(`)p Fs(+O)p Ft(')40 b(unsets)e(it.)69 b(If)39 b Fq(shopt)p
(exiting)i(imme-)330 4770 y(diately)f(when)e(it)i(receiv)m(es)h(an)e
Fs(EOF)f Ft(on)h(its)g(standard)f(input)g(when)h(reading)g(a)g(command)
g(\(see)330 4879 y(Section)31 b(4.3.1)h([The)e(Set)h(Builtin],)g(page)g
-(58\).)199 5011 y(7.)61 b(Command)43 b(history)h(\(see)h(Section)g(9.1)
+(59\).)199 5011 y(7.)61 b(Command)43 b(history)h(\(see)h(Section)g(9.1)
g([Bash)f(History)h(F)-8 b(acilities],)51 b(page)45 b(134\))h(and)d
(history)330 5121 y(expansion)h(\(see)i(Section)f(9.3)h([History)g(In)m
(teraction],)k(page)45 b(136\))h(are)f(enabled)g(b)m(y)f(default.)330
1046 y(12.)61 b(The)26 b(`)p Fs(-n)p Ft(')f(in)m(v)m(o)s(cation)k
(option)d(is)g(ignored,)h(and)f(`)p Fs(set)k(-n)p Ft(')25
b(has)h(no)g(e\013ect)i(\(see)e(Section)h(4.3.1)h([The)330
-1155 y(Set)j(Builtin],)g(page)g(58\).)154 1287 y(13.)61
+1155 y(Set)j(Builtin],)g(page)g(59\).)154 1287 y(13.)61
b(Bash)32 b(will)g(c)m(hec)m(k)i(for)e(mail)g(p)s(erio)s(dically)-8
b(,)34 b(dep)s(ending)c(on)i(the)g(v)-5 b(alues)32 b(of)g(the)h
Fs(MAIL)p Ft(,)e Fs(MAILPATH)p Ft(,)330 1397 y(and)f
s(ound)c(shell)j(v)-5 b(ariables)34 b(after)g(`)p Fs(set)29
b(-u)p Ft(')k(has)g(b)s(een)330 1638 y(enabled)d(will)h(not)g(cause)g
(the)f(shell)h(to)g(exit)g(\(see)g(Section)h(4.3.1)g([The)e(Set)h
-(Builtin],)g(page)g(58\).)154 1770 y(15.)61 b(The)48
+(Builtin],)g(page)g(59\).)154 1770 y(15.)61 b(The)48
b(shell)h(will)f(not)h(exit)g(on)g(expansion)f(errors)g(caused)g(b)m(y)
h Fq(v)-5 b(ar)54 b Ft(b)s(eing)48 b(unset)g(or)h(n)m(ull)f(in)330
1879 y Fs(${)p Fi(var)11 b Fs(:?)p Fi(word)g Fs(})26
(enabled)f(b)m(y)h(default)330 2868 y(\(see)35 b(the)g(description)f
(of)h(the)f Fs(cdspell)f Ft(option)h(to)i(the)e Fs(shopt)f
Ft(builtin)h(in)g(Section)h(4.3.2)h([The)330 2977 y(Shopt)30
-b(Builtin],)h(page)g(62\).)154 3109 y(21.)61 b(The)42
+b(Builtin],)h(page)g(63\).)154 3109 y(21.)61 b(The)42
b(shell)h(will)g(c)m(hec)m(k)h(the)f(v)-5 b(alue)43 b(of)f(the)h
Fs(TMOUT)e Ft(v)-5 b(ariable)44 b(and)e(exit)h(if)g(a)g(command)f(is)h
(not)330 3219 y(read)30 b(within)g(the)g(sp)s(eci\014ed)f(n)m(um)m(b)s
b(list)h(of)f(options)h(app)s(ears)e(in)630 4408 y(the)30
b(description)f(of)h(the)g(`)p Fs(-o)p Ft(')f(option)h(to)h(the)e
Fs(set)g Ft(builtin)g(\(see)i(Section)f(4.3.1)h([The)f(Set)630
-4518 y(Builtin],)h(page)g(58\).)150 4682 y Fs(-v)f Fi(varname)630
+4518 y(Builtin],)h(page)g(59\).)150 4682 y Fs(-v)f Fi(varname)630
4792 y Ft(T)-8 b(rue)30 b(if)g(the)h(shell)f(v)-5 b(ariable)32
b Fq(v)-5 b(arname)35 b Ft(is)30 b(set)h(\(has)g(b)s(een)e(assigned)i
(a)g(v)-5 b(alue\).)150 4956 y Fs(-R)30 b Fi(varname)630
923 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
1033 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(62\).)
+Ft(\(see)i(Section)g(4.3.2)h([The)e(Shopt)g(Builtin],)h(page)g(63\).)
275 1181 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 1290 y(alw)m(a)m(ys)42 b(reads)f(at)h(least)g(one)f
b(If)24 b(the)i(`)p Fs(-b)p Ft(')e(option)i(to)f(the)g
Fs(set)f Ft(builtin)h(is)g(enabled,)h(Bash)f(rep)s(orts)f(suc)m(h)h(c)m
(hanges)150 1443 y(immediately)g(\(see)g(Section)g(4.3.1)g([The)f(Set)g
-(Builtin],)i(page)f(58\).)40 b(An)m(y)24 b(trap)f(on)h
+(Builtin],)i(page)f(59\).)40 b(An)m(y)24 b(trap)f(on)h
Fs(SIGCHLD)e Ft(is)i(executed)150 1553 y(for)30 b(eac)m(h)i(c)m(hild)e
(pro)s(cess)g(that)h(exits.)275 1687 y(If)25 b(an)h(attempt)h(to)g
(exit)g(Bash)f(is)h(made)f(while)g(jobs)f(are)i(stopp)s(ed,)f(\(or)h
(running,)e(if)h(the)g Fs(checkjobs)150 1796 y Ft(option)e(is)f
(enabled)h({)g(see)g(Section)g(4.3.2)h([The)e(Shopt)g(Builtin],)j(page)
-e(62\),)i(the)e(shell)f(prin)m(ts)g(a)h(w)m(arning)150
+e(63\),)i(the)e(shell)f(prin)m(ts)g(a)h(w)m(arning)150
1906 y(message,)k(and)c(if)i(the)f Fs(checkjobs)e Ft(option)j(is)f
(enabled,)i(lists)e(the)h(jobs)f(and)f(their)i(statuses.)39
b(The)25 b Fs(jobs)150 2016 y Ft(command)36 b(ma)m(y)h(then)f(b)s(e)f
(an)m(y)g(time)150 1407 y(using)28 b(the)i(`)p Fs(-o)g(emacs)p
Ft(')d(or)i(`)p Fs(-o)h(vi)p Ft(')f(options)g(to)h(the)f
Fs(set)f Ft(builtin)h(command)g(\(see)h(Section)f(4.3.1)i([The)150
-1517 y(Set)g(Builtin],)g(page)g(58\),)h(or)e(disabled)g(using)g(the)h
+1517 y(Set)g(Builtin],)g(page)g(59\),)h(or)e(disabled)g(using)g(the)h
(`)p Fs(+o)f(emacs)p Ft(')f(or)h(`)p Fs(+o)g(vi)p Ft(')g(options)h(to)g
Fs(set)p Ft(.)150 1802 y Fr(8.1)68 b(In)l(tro)t(duction)45
b(to)g(Line)h(Editing)150 1962 y Ft(The)30 b(follo)m(wing)i(paragraphs)
g(FTP,)g(Bash,)h(and)g(GDB.)390 737 y(#)390 847 y(#)g(You)g(can)g
(re-read)f(the)h(inputrc)f(file)g(with)h(C-x)g(C-r.)390
956 y(#)g(Lines)g(beginning)e(with)i('#')g(are)g(comments.)390
-1066 y(#)390 1176 y(#)g(First,)g(include)e(any)i(systemwide)e(bindings)
-h(and)h(variable)390 1285 y(#)g(assignments)e(from)i(/etc/Inputrc)390
-1395 y($include)f(/etc/Inputrc)390 1614 y(#)390 1724
-y(#)h(Set)g(various)f(bindings)g(for)h(emacs)f(mode.)390
-1943 y(set)h(editing-mode)d(emacs)390 2162 y($if)j(mode=emacs)390
+1066 y(#)390 1176 y(#)g(First,)g(include)e(any)i(system-wide)e
+(bindings)h(and)g(variable)390 1285 y(#)h(assignments)e(from)i
+(/etc/Inputrc)390 1395 y($include)f(/etc/Inputrc)390
+1614 y(#)390 1724 y(#)h(Set)g(various)f(bindings)g(for)h(emacs)f(mode.)
+390 1943 y(set)h(editing-mode)d(emacs)390 2162 y($if)j(mode=emacs)390
2381 y(Meta-Control-h:)91 b(backward-kill-word)43 b(Text)k(after)f(the)
h(function)f(name)g(is)h(ignored)390 2600 y(#)390 2710
y(#)g(Arrow)g(keys)f(in)i(keypad)e(mode)390 2819 y(#)390
Ft(editing)h(mo)s(des,)h(use)f(the)g(`)p Fs(set)30 b(-o)150
3114 y(emacs)p Ft(')43 b(and)h(`)p Fs(set)30 b(-o)f(vi)p
Ft(')44 b(commands)g(\(see)i(Section)f(4.3.1)h([The)e(Set)h(Builtin],)j
-(page)e(58\).)83 b(The)150 3223 y(Readline)31 b(default)g(is)f
+(page)e(59\).)83 b(The)150 3223 y(Readline)31 b(default)g(is)f
Fs(emacs)f Ft(mo)s(de.)275 3367 y(When)g(y)m(ou)i(en)m(ter)f(a)h(line)f
(in)g Fs(vi)f Ft(mo)s(de,)h(y)m(ou)h(are)f(already)h(placed)f(in)g
(`insertion')g(mo)s(de,)g(as)h(if)f(y)m(ou)150 3476 y(had)f(t)m(yp)s
Fs(-s)p Ft('.)1110 1081 y Fs(setopt)192 b Ft(V)-8 b(alid)34
b(argumen)m(ts)f(for)f(the)h(`)p Fs(-o)p Ft(')g(option)g(to)h(the)f
Fs(set)e Ft(builtin)1590 1190 y(\(see)g(Section)h(4.3.1)g([The)e(Set)g
-(Builtin],)i(page)f(58\).)1110 1358 y Fs(shopt)240 b
+(Builtin],)i(page)f(59\).)1110 1358 y Fs(shopt)240 b
Ft(Shell)40 b(option)g(names)g(as)g(accepted)i(b)m(y)e(the)g
Fs(shopt)e Ft(builtin)1590 1468 y(\(see)31 b(Section)h(4.2)f([Bash)g
(Builtins],)g(page)g(48\).)1110 1636 y Fs(signal)192
(\(see)f(Section)h(4.1)f([Bourne)g(Shell)f(Builtins],)j(page)e(41\),)j
(and)c(basic)h(supp)s(ort)150 5011 y(for)31 b(the)h Fs(cdable_vars)d
Ft(shell)i(option)h(\(see)h(Section)f(4.3.2)i([The)d(Shopt)g(Builtin],)
-i(page)f(62\).)46 b Fs(_comp_)150 5121 y(cd)30 b Ft(mo)s(di\014es)g
+i(page)f(63\).)46 b Fs(_comp_)150 5121 y(cd)30 b Ft(mo)s(di\014es)g
(the)h(v)-5 b(alue)31 b(of)g Fq(IFS)36 b Ft(so)31 b(that)g(it)g(con)m
(tains)h(only)f(a)g(newline)g(to)h(accommo)s(date)g(\014le)f(names)150
5230 y(con)m(taining)i(spaces)g(and)e(tabs)h({)g Fs(compgen)e
1159 y Ft(When)40 b(the)h(`)p Fs(-o)30 b(history)p Ft(')38
b(option)j(to)g(the)g Fs(set)e Ft(builtin)h(is)h(enabled)f(\(see)h
(Section)g(4.3.1)i([The)d(Set)150 1269 y(Builtin],)32
-b(page)g(58\),)h(the)e(shell)h(pro)m(vides)f(access)h(to)g(the)f
+b(page)g(59\),)h(the)e(shell)h(pro)m(vides)f(access)h(to)g(the)f
Fq(command)g(history)p Ft(,)h(the)f(list)h(of)f(commands)150
1378 y(previously)h(t)m(yp)s(ed.)47 b(The)33 b(v)-5 b(alue)33
b(of)f(the)h Fs(HISTSIZE)e Ft(shell)h(v)-5 b(ariable)34
(bash)f(debugger)g(\(distributed)g(separately\).)150
5011 y Fs(--enable-direxpand-defau)o(lt)630 5121 y Ft(Cause)53
b(the)g Fs(direxpand)d Ft(shell)j(option)h(\(see)g(Section)f(4.3.2)i
-([The)e(Shopt)f(Builtin],)630 5230 y(page)29 b(62\))g(to)f(b)s(e)f
+([The)e(Shopt)f(Builtin],)630 5230 y(page)29 b(63\))g(to)f(b)s(e)f
(enabled)h(b)m(y)g(default)g(when)e(the)i(shell)g(starts.)41
b(It)27 b(is)h(normally)g(disabled)630 5340 y(b)m(y)i(default.)p
eop end
2016 y Ft(Set)40 b(the)g(default)g(v)-5 b(alue)41 b(of)f(the)g
Fq(extglob)j Ft(shell)d(option)g(describ)s(ed)f(ab)s(o)m(v)m(e)i(under)
d(Sec-)630 2125 y(tion)31 b(4.3.2)h([The)e(Shopt)g(Builtin],)h(page)g
-(62)g(to)h(b)s(e)d(enabled.)150 2281 y Fs(--enable-glob-asciirange)o
+(63)g(to)h(b)s(e)d(enabled.)150 2281 y Fs(--enable-glob-asciirange)o
(-def)o(ault)630 2390 y Ft(Set)i(the)g(default)f(v)-5
b(alue)31 b(of)g(the)g Fq(globasciiranges)36 b Ft(shell)31
b(option)g(describ)s(ed)f(ab)s(o)m(v)m(e)h(under)630
2500 y(Section)41 b(4.3.2)h([The)e(Shopt)f(Builtin],)44
-b(page)d(62)g(to)g(b)s(e)f(enabled.)70 b(This)39 b(con)m(trols)j(the)
+b(page)d(63)g(to)g(b)s(e)f(enabled.)70 b(This)39 b(con)m(trols)j(the)
630 2609 y(b)s(eha)m(vior)21 b(of)g(c)m(haracter)h(ranges)f(when)f
(used)g(in)g(pattern)h(matc)m(hing)h(brac)m(k)m(et)g(expressions.)150
2765 y Fs(--enable-help-builtin)630 2874 y Ft(Include)i(the)h
b Ft(The)29 b Fs(noclobber)e Ft(option)j(is)g(a)m(v)-5
b(ailable)32 b(to)e(a)m(v)m(oid)h(o)m(v)m(erwriting)g(existing)g
(\014les)e(with)h(output)f(redi-)330 3587 y(rection)39
-b(\(see)h(Section)f(4.3.1)h([The)e(Set)h(Builtin],)i(page)e(58\).)66
+b(\(see)h(Section)f(4.3.1)h([The)e(Set)h(Builtin],)i(page)e(59\).)66
b(The)38 b(`)p Fs(>|)p Ft(')h(redirection)g(op)s(erator)330
3696 y(ma)m(y)31 b(b)s(e)f(used)f(to)i(o)m(v)m(erride)h
Fs(noclobber)p Ft(.)225 3824 y Fp(\017)60 b Ft(The)34
2874 y Fp(\017)60 b Ft(Bash)43 b(includes)g(the)g Fs(shopt)f
Ft(builtin,)k(for)d(\014ner)f(con)m(trol)j(of)e(shell)h(optional)g
(capabilities)h(\(see)330 2984 y(Section)c(4.3.2)g([The)f(Shopt)f
-(Builtin],)k(page)d(62\),)k(and)39 b(allo)m(ws)i(these)f(options)h(to)f
+(Builtin],)k(page)d(63\),)k(and)39 b(allo)m(ws)i(these)f(options)h(to)f
(b)s(e)f(set)i(and)330 3093 y(unset)30 b(at)h(shell)g(in)m(v)m(o)s
(cation)h(\(see)f(Section)h(6.1)f([In)m(v)m(oking)g(Bash],)g(page)h
(80\).)225 3230 y Fp(\017)60 b Ft(Bash)45 b(has)f(m)m(uc)m(h)g(more)h
(optional)h(b)s(eha)m(vior)e(con)m(trollable)j(with)e(the)f
Fs(set)g Ft(builtin)g(\(see)h(Sec-)330 3340 y(tion)31
-b(4.3.1)h([The)e(Set)h(Builtin],)g(page)g(58\).)225 3477
+b(4.3.1)h([The)e(Set)h(Builtin],)g(page)g(59\).)225 3477
y Fp(\017)60 b Ft(The)45 b(`)p Fs(-x)p Ft(')g(\(`)p Fs(xtrace)p
Ft('\))g(option)h(displa)m(ys)g(commands)f(other)h(than)f(simple)h
(commands)f(when)330 3587 y(p)s(erforming)29 b(an)h(execution)i(trace)g
-(\(see)f(Section)g(4.3.1)h([The)e(Set)h(Builtin],)g(page)g(58\).)225
+(\(see)f(Section)g(4.3.1)h([The)e(Set)h(Builtin],)g(page)g(59\).)225
3724 y Fp(\017)60 b Ft(The)28 b Fs(test)g Ft(builtin)h(\(see)h(Section)
f(4.1)h([Bourne)f(Shell)g(Builtins],)h(page)g(41\))g(is)f(sligh)m(tly)h
(di\013eren)m(t,)330 3833 y(as)23 b(it)g(implemen)m(ts)f(the)h
b Fb(49)150 2902 y Fr(C)150 3019 y Fe(caller)17 b Fc(:)e(:)e(:)g(:)g(:)
g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
-43 b Fb(49)150 3106 y Fe(cd)10 b Fc(:)k(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+43 b Fb(50)150 3106 y Fe(cd)10 b Fc(:)k(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
(:)37 b Fb(42)150 3194 y Fe(command)15 b Fc(:)f(:)f(:)h(:)f(:)g(:)g(:)g
b Fb(53)2025 2856 y Fe(logout)17 b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g
(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44
-b Fb(53)2025 3118 y Fr(M)2025 3238 y Fe(mapfile)15 b
+b Fb(54)2025 3118 y Fr(M)2025 3238 y Fe(mapfile)15 b
Fc(:)f(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
-h(:)f(:)g(:)g(:)41 b Fb(53)2025 3500 y Fr(P)2025 3620
+h(:)f(:)g(:)g(:)41 b Fb(54)2025 3500 y Fr(P)2025 3620
y Fe(popd)23 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fb(91)2025
b Fb(45)2025 4782 y Fr(S)2025 4902 y Fe(set)8 b Fc(:)13
b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
-g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34 b Fb(58)2025 4991
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34 b Fb(59)2025 4991
y Fe(shift)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b Fb(45)2025
5080 y Fe(shopt)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b
-Fb(62)2025 5169 y Fe(source)17 b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+Fb(63)2025 5169 y Fe(source)17 b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g
(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44
-b Fb(56)2025 5259 y Fe(suspend)12 b Fc(:)j(:)e(:)g(:)g(:)g(:)h(:)f(:)g
+b Fb(57)2025 5259 y Fe(suspend)12 b Fc(:)j(:)e(:)g(:)g(:)g(:)h(:)f(:)g
(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39 b
Fb(100)p eop end
616 y Fe(trap)23 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49
-b Fb(46)150 709 y Fe(type)23 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+b Fb(47)150 709 y Fe(type)23 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49
-b Fb(56)150 803 y Fe(typeset)15 b Fc(:)f(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)
+b Fb(57)150 803 y Fe(typeset)15 b Fc(:)f(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)
g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)41
b Fb(57)2025 299 y Fr(U)2025 415 y Fe(ulimit)17 b Fc(:)d(:)g(:)f(:)g(:)
@numchapentry{Shell Builtin Commands}{4}{Shell Builtin Commands}{41}
@numsecentry{Bourne Shell Builtins}{4.1}{Bourne Shell Builtins}{41}
@numsecentry{Bash Builtin Commands}{4.2}{Bash Builtins}{48}
-@numsecentry{Modifying Shell Behavior}{4.3}{Modifying Shell Behavior}{58}
-@numsubsecentry{The Set Builtin}{4.3.1}{The Set Builtin}{58}
-@numsubsecentry{The Shopt Builtin}{4.3.2}{The Shopt Builtin}{62}
+@numsecentry{Modifying Shell Behavior}{4.3}{Modifying Shell Behavior}{59}
+@numsubsecentry{The Set Builtin}{4.3.1}{The Set Builtin}{59}
+@numsubsecentry{The Shopt Builtin}{4.3.2}{The Shopt Builtin}{63}
@numsecentry{Special Builtins}{4.4}{Special Builtins}{68}
@numchapentry{Shell Variables}{5}{Shell Variables}{69}
@numsecentry{Bourne Shell Variables}{5.1}{Bourne Shell Variables}{69}
routine call or _\be_\bx_\bp_\br does not correspond to a valid position in
the call stack.
- c\bcd\bd [-\b-L\bL|[-\b-P\bP [-\b-e\be]]] [_\bd_\bi_\br]
+ c\bcd\bd [-\b-L\bL|[-\b-P\bP [-\b-e\be]] [-@]] [_\bd_\bi_\br]
Change the current directory to _\bd_\bi_\br. if _\bd_\bi_\br is not supplied,
the value of the H\bHO\bOM\bME\bE shell variable is the default. Any addi-
tional arguments following _\bd_\bi_\br are ignored. The variable C\bCD\bDP\bPA\bAT\bTH\bH
slash or the beginning of _\bd_\bi_\br. If the -\b-e\be option is supplied
with -\b-P\bP, and the current working directory cannot be success-
fully determined after a successful directory change, c\bcd\bd will
- return an unsuccessful status. An argument of -\b- is converted to
- $\b$O\bOL\bLD\bDP\bPW\bWD\bD before the directory change is attempted. If a non-
- empty directory name from C\bCD\bDP\bPA\bAT\bTH\bH is used, or if -\b- is the first
- argument, and the directory change is successful, the absolute
- pathname of the new working directory is written to the standard
- output. The return value is true if the directory was success-
- fully changed; false otherwise.
+ return an unsuccessful status. On systems that support it, the
+ -\b-@\b@ option presents the extended attributes associated with a
+ file as a directory. An argument of -\b- is converted to $\b$O\bOL\bLD\bDP\bPW\bWD\bD
+ before the directory change is attempted. If a non-empty direc-
+ tory name from C\bCD\bDP\bPA\bAT\bTH\bH is used, or if -\b- is the first argument,
+ and the directory change is successful, the absolute pathname of
+ the new working directory is written to the standard output.
+ The return value is true if the directory was successfully
+ changed; false otherwise.
c\bco\bom\bmm\bma\ban\bnd\bd [-\b-p\bpV\bVv\bv] _\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\ba_\br_\bg ...]
Run _\bc_\bo_\bm_\bm_\ba_\bn_\bd with _\ba_\br_\bg_\bs suppressing the normal shell function
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
-%%CreationDate: Wed Sep 11 09:17:46 2013
+%%CreationDate: Tue Oct 22 11:07:52 2013
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
(cuting a subroutine call or).15 F F1 -.2(ex)3.019 G(pr).2 E F0 .519
(does not corre-)3.019 F(spond to a v)144 619.2 Q
(alid position in the call stack.)-.25 E F2(cd)108 636 Q F0([)2.5 E F2
-<ad4c>A F0(|[)A F2<ad50>A F0([)2.5 E F2<ad65>A F0(]]] [)A F1(dir)A F0(])
-A .321(Change the current directory to)144 648 R F1(dir)2.821 E F0 5.321
-(.i)C(f)-5.321 E F1(dir)2.821 E F0 .322(is not supplied, the v)2.821 F
-.322(alue of the)-.25 F F3(HOME)2.822 E F0 .322(shell v)2.572 F .322
-(ariable is)-.25 F 1.036(the def)144 660 R 3.536(ault. An)-.1 F 3.536
-(ya)-.15 G 1.035(dditional ar)-3.536 F 1.035(guments follo)-.18 F(wing)
--.25 E F1(dir)3.535 E F0 1.035(are ignored.)3.535 F 1.035(The v)6.035 F
-(ariable)-.25 E F3(CDP)3.535 E -.855(AT)-.666 G(H).855 E F0(de\214nes)
-3.285 E .849(the search path for the directory containing)144 672 R F1
-(dir)3.349 E F0 3.35(:e).73 G .85(ach directory name in)-3.35 F F3(CDP)
-3.35 E -.855(AT)-.666 G(H).855 E F0 .85(is searched for)3.1 F F1(dir)144
-684 Q F0 5.665(.A)C(lternati)-5.665 E .965 -.15(ve d)-.25 H .665
+<ad4c>A F0(|[)A F2<ad50>A F0([)2.5 E F2<ad65>A F0(]] [\255@]] [)A F1
+(dir)A F0(])A .321(Change the current directory to)144 648 R F1(dir)
+2.821 E F0 5.321(.i)C(f)-5.321 E F1(dir)2.821 E F0 .322
+(is not supplied, the v)2.821 F .322(alue of the)-.25 F F3(HOME)2.822 E
+F0 .322(shell v)2.572 F .322(ariable is)-.25 F 1.036(the def)144 660 R
+3.536(ault. An)-.1 F 3.536(ya)-.15 G 1.035(dditional ar)-3.536 F 1.035
+(guments follo)-.18 F(wing)-.25 E F1(dir)3.535 E F0 1.035(are ignored.)
+3.535 F 1.035(The v)6.035 F(ariable)-.25 E F3(CDP)3.535 E -.855(AT)-.666
+G(H).855 E F0(de\214nes)3.285 E .849
+(the search path for the directory containing)144 672 R F1(dir)3.349 E
+F0 3.35(:e).73 G .85(ach directory name in)-3.35 F F3(CDP)3.35 E -.855
+(AT)-.666 G(H).855 E F0 .85(is searched for)3.1 F F1(dir)144 684 Q F0
+5.665(.A)C(lternati)-5.665 E .965 -.15(ve d)-.25 H .665
(irectory names in).15 F F3(CDP)3.165 E -.855(AT)-.666 G(H).855 E F0
.665(are separated by a colon \(:\).)2.915 F 3.165(An)5.665 G .664
(ull directory name)-3.165 F(in)144 696 Q F3(CDP)4.162 E -.855(AT)-.666
F0(.)A 1.465(If the)144 120 R F1<ad65>3.965 E F0 1.465
(option is supplied with)3.965 F F1<ad50>3.965 E F0 3.965(,a)C 1.465
(nd the current w)-3.965 F 1.466
-(orking directory cannot be successfully)-.1 F .013
-(determined after a successful directory change,)144 132 R F1(cd)2.512 E
-F0 .012(will return an unsuccessful status.)2.512 F .012(An ar)5.012 F
-(gument)-.18 E(of)144 144 Q F1<ad>2.671 E F0 .171(is con)2.671 F -.15
-(ve)-.4 G .171(rted to).15 F/F3 9/Times-Bold@0 SF($OLDPWD)2.671 E F0
-.171(before the directory change is attempted.)2.421 F .172
-(If a non-empty directory)5.172 F .744(name from)144 156 R F3(CDP)3.244
-E -.855(AT)-.666 G(H).855 E F0 .744(is used, or if)2.994 F F1<ad>3.244 E
-F0 .744(is the \214rst ar)3.244 F .743
-(gument, and the directory change is successful,)-.18 F .594
-(the absolute pathname of the ne)144 168 R 3.094(ww)-.25 G .594
-(orking directory is written to the standard output.)-3.194 F .594
-(The return)5.594 F -.25(va)144 180 S(lue is true if the directory w).25
-E(as successfully changed; f)-.1 E(alse otherwise.)-.1 E F1(command)108
-196.8 Q F0([)2.5 E F1(\255pVv)A F0(])A F2(command)2.5 E F0([)2.5 E F2
-(ar)A(g)-.37 E F0(...])2.5 E(Run)144 208.8 Q F2(command)2.957 E F0(with)
+(orking directory cannot be successfully)-.1 F .468
+(determined after a successful directory change,)144 132 R F1(cd)2.968 E
+F0 .468(will return an unsuccessful status.)2.968 F .467(On systems)
+5.467 F .336(that support it, the)144 144 R F1<ad40>2.836 E F0 .336
+(option presents the e)2.836 F .336(xtended attrib)-.15 F .337
+(utes associated with a \214le as a directory)-.2 F(.)-.65 E .71(An ar)
+144 156 R .71(gument of)-.18 F F1<ad>3.21 E F0 .71(is con)3.21 F -.15
+(ve)-.4 G .71(rted to).15 F/F3 9/Times-Bold@0 SF($OLDPWD)3.21 E F0 .71
+(before the directory change is attempted.)2.96 F .71(If a non-)5.71 F
+.106(empty directory name from)144 168 R F3(CDP)2.606 E -.855(AT)-.666 G
+(H).855 E F0 .107(is used, or if)2.356 F F1<ad>2.607 E F0 .107
+(is the \214rst ar)2.607 F .107(gument, and the directory change)-.18 F
+.038(is successful, the absolute pathname of the ne)144 180 R 2.538(ww)
+-.25 G .038(orking directory is written to the standard output.)-2.638 F
+(The return v)144 192 Q(alue is true if the directory w)-.25 E
+(as successfully changed; f)-.1 E(alse otherwise.)-.1 E F1(command)108
+208.8 Q F0([)2.5 E F1(\255pVv)A F0(])A F2(command)2.5 E F0([)2.5 E F2
+(ar)A(g)-.37 E F0(...])2.5 E(Run)144 220.8 Q F2(command)2.956 E F0(with)
3.527 E F2(ar)3.087 E(gs)-.37 E F0 .257
(suppressing the normal shell function lookup. Only b)3.027 F .257
-(uiltin commands or)-.2 F .501(commands found in the)144 220.8 R F3
--.666(PA)3.001 G(TH)-.189 E F0 .502(are e)2.751 F -.15(xe)-.15 G 3.002
+(uiltin commands or)-.2 F .502(commands found in the)144 232.8 R F3
+-.666(PA)3.002 G(TH)-.189 E F0 .502(are e)2.752 F -.15(xe)-.15 G 3.002
(cuted. If).15 F(the)3.002 E F1<ad70>3.002 E F0 .502(option is gi)3.002
-F -.15(ve)-.25 G .502(n, the search for).15 F F2(command)3.202 E F0(is)
-3.772 E .4(performed using a def)144 232.8 R .4(ault v)-.1 F .4
-(alue for)-.25 F F3 -.666(PA)2.9 G(TH)-.189 E F0 .399
+F -.15(ve)-.25 G .501(n, the search for).15 F F2(command)3.201 E F0(is)
+3.771 E .399(performed using a def)144 244.8 R .399(ault v)-.1 F .399
+(alue for)-.25 F F3 -.666(PA)2.899 G(TH)-.189 E F0 .4
(that is guaranteed to \214nd all of the standard utilities.)2.649 F(If)
-5.399 E .174(either the)144 244.8 R F1<ad56>2.674 E F0(or)2.674 E F1
-<ad76>2.674 E F0 .175(option is supplied, a description of)2.674 F F2
-(command)2.875 E F0 .175(is printed.)3.445 F(The)5.175 E F1<ad76>2.675 E
-F0 .175(option causes)2.675 F 3.318(as)144 256.8 S .818(ingle w)-3.318 F
-.817(ord indicating the command or \214lename used to in)-.1 F -.2(vo)
--.4 G -.1(ke).2 G F2(command)3.617 E F0 .817(to be displayed; the)4.087
-F F1<ad56>144 268.8 Q F0 .249(option produces a more v)2.749 F .249
-(erbose description.)-.15 F .249(If the)5.249 F F1<ad56>2.749 E F0(or)
-2.749 E F1<ad76>2.75 E F0 .25(option is supplied, the e)2.75 F .25
-(xit status)-.15 F 1.005(is 0 if)144 280.8 R F2(command)3.705 E F0 -.1
-(wa)4.275 G 3.505(sf).1 G 1.005(ound, and 1 if not.)-3.505 F 1.004
+5.4 E .175(either the)144 256.8 R F1<ad56>2.675 E F0(or)2.675 E F1<ad76>
+2.675 E F0 .175(option is supplied, a description of)2.675 F F2(command)
+2.875 E F0 .174(is printed.)3.445 F(The)5.174 E F1<ad76>2.674 E F0 .174
+(option causes)2.674 F 3.317(as)144 268.8 S .817(ingle w)-3.317 F .817
+(ord indicating the command or \214lename used to in)-.1 F -.2(vo)-.4 G
+-.1(ke).2 G F2(command)3.618 E F0 .818(to be displayed; the)4.088 F F1
+<ad56>144 280.8 Q F0 .25(option produces a more v)2.75 F .25
+(erbose description.)-.15 F .249(If the)5.25 F F1<ad56>2.749 E F0(or)
+2.749 E F1<ad76>2.749 E F0 .249(option is supplied, the e)2.749 F .249
+(xit status)-.15 F 1.004(is 0 if)144 292.8 R F2(command)3.704 E F0 -.1
+(wa)4.274 G 3.504(sf).1 G 1.005(ound, and 1 if not.)-3.504 F 1.005
(If neither option is supplied and an error occurred or)6.005 F F2
-(command)144.2 292.8 Q F0 1.598(cannot be found, the e)4.868 F 1.599
-(xit status is 127.)-.15 F 1.599(Otherwise, the e)6.599 F 1.599
-(xit status of the)-.15 F F1(command)4.099 E F0 -.2(bu)144 304.8 S
+(command)144.2 304.8 Q F0 1.599(cannot be found, the e)4.869 F 1.599
+(xit status is 127.)-.15 F 1.599(Otherwise, the e)6.599 F 1.598
+(xit status of the)-.15 F F1(command)4.098 E F0 -.2(bu)144 316.8 S
(iltin is the e).2 E(xit status of)-.15 E F2(command)2.5 E F0(.).77 E F1
-(compgen)108 321.6 Q F0([)2.5 E F2(option)A F0 2.5(][)C F2(wor)-2.5 E(d)
--.37 E F0(])A .013(Generate possible completion matches for)144 333.6 R
+(compgen)108 333.6 Q F0([)2.5 E F2(option)A F0 2.5(][)C F2(wor)-2.5 E(d)
+-.37 E F0(])A .012(Generate possible completion matches for)144 345.6 R
F2(wor)2.513 E(d)-.37 E F0 .013(according to the)2.513 F F2(option)2.513
-E F0 .013(s, which may be an)B 2.512(yo)-.15 G(ption)-2.512 E .981
-(accepted by the)144 345.6 R F1(complete)3.481 E F0 -.2(bu)3.481 G .981
+E F0 .013(s, which may be an)B 2.513(yo)-.15 G(ption)-2.513 E .982
+(accepted by the)144 357.6 R F1(complete)3.482 E F0 -.2(bu)3.481 G .981
(iltin with the e).2 F .981(xception of)-.15 F F1<ad70>3.481 E F0(and)
-3.481 E F1<ad72>3.481 E F0 3.481(,a)C .982(nd write the matches to the)
--3.481 F 1.415(standard output.)144 357.6 R 1.415(When using the)6.415 F
+3.481 E F1<ad72>3.481 E F0 3.481(,a)C .981(nd write the matches to the)
+-3.481 F 1.415(standard output.)144 369.6 R 1.415(When using the)6.415 F
F1<ad46>3.915 E F0(or)3.915 E F1<ad43>3.915 E F0 1.415(options, the v)
3.915 F 1.415(arious shell v)-.25 F 1.415(ariables set by the pro-)-.25
-F(grammable completion f)144 369.6 Q(acilities, while a)-.1 E -.25(va)
+F(grammable completion f)144 381.6 Q(acilities, while a)-.1 E -.25(va)
-.2 G(ilable, will not ha).25 E .3 -.15(ve u)-.2 H(seful v).15 E(alues.)
--.25 E .352(The matches will be generated in the same w)144 393.6 R .352
+-.25 E .352(The matches will be generated in the same w)144 405.6 R .352
(ay as if the programmable completion code had gen-)-.1 F .02(erated th\
em directly from a completion speci\214cation with the same \215ags.)144
-405.6 R(If)5.02 E F2(wor)2.52 E(d)-.37 E F0 .02(is speci\214ed, only)
-2.52 F(those completions matching)144 417.6 Q F2(wor)2.5 E(d)-.37 E F0
-(will be displayed.)2.5 E(The return v)144 441.6 Q
+417.6 R(If)5.02 E F2(wor)2.52 E(d)-.37 E F0 .02(is speci\214ed, only)
+2.52 F(those completions matching)144 429.6 Q F2(wor)2.5 E(d)-.37 E F0
+(will be displayed.)2.5 E(The return v)144 453.6 Q
(alue is true unless an in)-.25 E -.25(va)-.4 G
(lid option is supplied, or no matches were generated.).25 E F1
-(complete)108 458.4 Q F0([)3.728 E F1(\255abcdefgjksuv)A F0 3.728(][)C
-F1<ad6f>-3.728 E F2(comp-option)3.728 E F0 3.728(][)C F1(\255DE)-3.728 E
+(complete)108 470.4 Q F0([)3.729 E F1(\255abcdefgjksuv)A F0 3.729(][)C
+F1<ad6f>-3.729 E F2(comp-option)3.729 E F0 3.729(][)C F1(\255DE)-3.729 E
F0 3.728(][)C F1<ad41>-3.728 E F2(action)3.728 E F0 3.728(][)C F1<ad47>
--3.728 E F2(globpat)3.728 E F0 3.729(][)C F1<ad57>-3.729 E F2(wor)3.729
-E(dlist)-.37 E F0 3.729(][)C F1<ad46>-3.729 E F2(func-)3.729 E(tion)108
-470.4 Q F0 2.5(][)C F1<ad43>-2.5 E F2(command)2.5 E F0(])A([)144 482.4 Q
+-3.728 E F2(globpat)3.728 E F0 3.728(][)C F1<ad57>-3.728 E F2(wor)3.728
+E(dlist)-.37 E F0 3.728(][)C F1<ad46>-3.728 E F2(func-)3.728 E(tion)108
+482.4 Q F0 2.5(][)C F1<ad43>-2.5 E F2(command)2.5 E F0(])A([)144 494.4 Q
F1<ad58>A F2(\214lterpat)2.5 E F0 2.5(][)C F1<ad50>-2.5 E F2(pr)2.5 E
(e\214x)-.37 E F0 2.5(][)C F1<ad53>-2.5 E F2(suf)2.5 E<8c78>-.18 E F0(])
A F2(name)2.5 E F0([)2.5 E F2(name ...)A F0(])A F1(complete \255pr)108
-494.4 Q F0([)2.5 E F1(\255DE)A F0 2.5(][)C F2(name)-2.5 E F0(...])2.5 E
-.633(Specify ho)144 506.4 R 3.133(wa)-.25 G -.18(rg)-3.133 G .633
-(uments to each).18 F F2(name)3.133 E F0 .633(should be completed.)3.133
-F .634(If the)5.634 F F1<ad70>3.134 E F0 .634
-(option is supplied, or if no)3.134 F .14(options are supplied, e)144
-518.4 R .139(xisting completion speci\214cations are printed in a w)-.15
-F .139(ay that allo)-.1 F .139(ws them to be)-.25 F .31
-(reused as input.)144 530.4 R(The)5.31 E F1<ad72>2.81 E F0 .31
-(option remo)2.81 F -.15(ve)-.15 G 2.81(sac).15 G .31
-(ompletion speci\214cation for each)-2.81 F F2(name)2.81 E F0 2.81(,o)C
-1.11 -.4(r, i)-2.81 H 2.81(fn).4 G(o)-2.81 E F2(name)2.81 E F0(s)A 1.347
-(are supplied, all completion speci\214cations.)144 542.4 R(The)6.347 E
-F1<ad44>3.847 E F0 1.346(option indicates that the remaining options)
-3.847 F .5(and actions should apply to the `)144 554.4 R(`def)-.74 E
+506.4 Q F0([)2.5 E F1(\255DE)A F0 2.5(][)C F2(name)-2.5 E F0(...])2.5 E
+.634(Specify ho)144 518.4 R 3.134(wa)-.25 G -.18(rg)-3.134 G .634
+(uments to each).18 F F2(name)3.134 E F0 .634(should be completed.)3.134
+F .633(If the)5.634 F F1<ad70>3.133 E F0 .633
+(option is supplied, or if no)3.133 F .139(options are supplied, e)144
+530.4 R .139(xisting completion speci\214cations are printed in a w)-.15
+F .14(ay that allo)-.1 F .14(ws them to be)-.25 F .31(reused as input.)
+144 542.4 R(The)5.31 E F1<ad72>2.81 E F0 .31(option remo)2.81 F -.15(ve)
+-.15 G 2.81(sac).15 G .31(ompletion speci\214cation for each)-2.81 F F2
+(name)2.81 E F0 2.81(,o)C 1.11 -.4(r, i)-2.81 H 2.81(fn).4 G(o)-2.81 E
+F2(name)2.81 E F0(s)A 1.346
+(are supplied, all completion speci\214cations.)144 554.4 R(The)6.347 E
+F1<ad44>3.847 E F0 1.347(option indicates that the remaining options)
+3.847 F .5(and actions should apply to the `)144 566.4 R(`def)-.74 E
(ault')-.1 E 3('c)-.74 G .5
(ommand completion; that is, completion attempted on)-3 F 3.455(ac)144
-566.4 S .955(ommand for which no completion has pre)-3.455 F .955
+578.4 S .955(ommand for which no completion has pre)-3.455 F .955
(viously been de\214ned.)-.25 F(The)5.955 E F1<ad45>3.455 E F0 .955
-(option indicates that)3.455 F .064
-(the remaining options and actions should apply to `)144 578.4 R
-(`empty')-.74 E 2.565('c)-.74 G .065
-(ommand completion; that is, comple-)-2.565 F
-(tion attempted on a blank line.)144 590.4 Q 1.438
+(option indicates that)3.455 F .065
+(the remaining options and actions should apply to `)144 590.4 R
+(`empty')-.74 E 2.564('c)-.74 G .064
+(ommand completion; that is, comple-)-2.564 F
+(tion attempted on a blank line.)144 602.4 Q 1.437
(The process of applying these completion speci\214cations when w)144
-614.4 R 1.437(ord completion is attempted is)-.1 F(described abo)144
-626.4 Q .3 -.15(ve u)-.15 H(nder).15 E F1(Pr)2.5 E
-(ogrammable Completion)-.18 E F0(.)A .555
-(Other options, if speci\214ed, ha)144 650.4 R .855 -.15(ve t)-.2 H .555
+626.4 R 1.438(ord completion is attempted is)-.1 F(described abo)144
+638.4 Q .3 -.15(ve u)-.15 H(nder).15 E F1(Pr)2.5 E
+(ogrammable Completion)-.18 E F0(.)A .556
+(Other options, if speci\214ed, ha)144 662.4 R .856 -.15(ve t)-.2 H .555
(he follo).15 F .555(wing meanings.)-.25 F .555(The ar)5.555 F .555
-(guments to the)-.18 F F1<ad47>3.056 E F0(,)A F1<ad57>3.056 E F0 3.056
-(,a)C(nd)-3.056 E F1<ad58>3.056 E F0 .723(options \(and, if necessary)
-144 662.4 R 3.223(,t)-.65 G(he)-3.223 E F1<ad50>3.223 E F0(and)3.223 E
-F1<ad53>3.223 E F0 .722
-(options\) should be quoted to protect them from e)3.223 F(xpan-)-.15 E
-(sion before the)144 674.4 Q F1(complete)2.5 E F0 -.2(bu)2.5 G
-(iltin is in).2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E F1<ad6f>144 686.4 Q
-F2(comp-option)2.5 E F0(The)184 698.4 Q F2(comp-option)2.79 E F0 .291
+(guments to the)-.18 F F1<ad47>3.055 E F0(,)A F1<ad57>3.055 E F0 3.055
+(,a)C(nd)-3.055 E F1<ad58>3.055 E F0 .722(options \(and, if necessary)
+144 674.4 R 3.222(,t)-.65 G(he)-3.222 E F1<ad50>3.222 E F0(and)3.222 E
+F1<ad53>3.222 E F0 .723
+(options\) should be quoted to protect them from e)3.222 F(xpan-)-.15 E
+(sion before the)144 686.4 Q F1(complete)2.5 E F0 -.2(bu)2.5 G
+(iltin is in).2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E F1<ad6f>144 698.4 Q
+F2(comp-option)2.5 E F0(The)184 710.4 Q F2(comp-option)2.791 E F0 .291
(controls se)2.791 F -.15(ve)-.25 G .291(ral aspects of the compspec')
.15 F 2.791(sb)-.55 G(eha)-2.791 E .291(vior be)-.2 F .291
-(yond the simple)-.15 F(generation of completions.)184 710.4 Q F2
+(yond the simple)-.15 F(generation of completions.)184 722.4 Q F2
(comp-option)5 E F0(may be one of:)2.5 E(GNU Bash-4.2)72 768 Q
(2004 Apr 20)148.735 E(3)203.725 E 0 Cg EP
%%Page: 4 4
/Times-Bold@0 SF(bashdefault)184 84 Q F0 .281
(Perform the rest of the def)224 96 R(ault)-.1 E F1(bash)2.781 E F0 .281
(completions if the compspec generates no)2.781 F(matches.)224 108 Q F1
-(default)184 120 Q F0 2.875(Use readline')10 F 5.375(sd)-.55 G(ef)-5.375
-E 2.876(ault \214lename completion if the compspec generates no)-.1 F
+(default)184 120 Q F0 2.876(Use readline')10 F 5.376(sd)-.55 G(ef)-5.376
+E 2.875(ault \214lename completion if the compspec generates no)-.1 F
(matches.)224 132 Q F1(dir)184 144 Q(names)-.15 E F0(Perform directory \
name completion if the compspec generates no matches.)224 156 Q F1
(\214lenames)184 168 Q F0 -.7(Te)224 180 S .137(ll readline that the co\
-mpspec generates \214lenames, so it can perform an).7 F 2.636<798c>-.15
-G(le-)-2.636 E .134(name\255speci\214c processing \(lik)224 192 R 2.634
+mpspec generates \214lenames, so it can perform an).7 F 2.637<798c>-.15
+G(le-)-2.637 E .134(name\255speci\214c processing \(lik)224 192 R 2.634
(ea)-.1 G .134(dding a slash to directory names, quoting spe-)-2.634 F
.45(cial characters, or suppressing trailing spaces\).)224 204 R .45
(Intended to be used with shell)5.45 F(functions.)224 216 Q F1(noquote)
184 228 Q F0 -.7(Te)5.55 G .814
(ll readline not to quote the completed w).7 F .814(ords if the)-.1 F
-3.314(ya)-.15 G .815(re \214lenames \(quoting)-3.314 F
+3.314(ya)-.15 G .814(re \214lenames \(quoting)-3.314 F
(\214lenames is the def)224 240 Q(ault\).)-.1 E F1(nospace)184 252 Q F0
-.7(Te)6.11 G .22(ll readline not to append a space \(the def).7 F .22
(ault\) to w)-.1 F .22(ords completed at the end)-.1 F(of the line.)224
264 Q F1(plusdirs)184 276 Q F0 1.985(After an)5.54 F 4.485(ym)-.15 G
1.985(atches de\214ned by the compspec are generated, directory name)
--4.485 F .584(completion is attempted and an)224 288 R 3.084(ym)-.15 G
+-4.485 F .583(completion is attempted and an)224 288 R 3.084(ym)-.15 G
.584(atches are added to the results of the other)-3.084 F(actions.)224
300 Q F1<ad41>144 312 Q/F2 10/Times-Italic@0 SF(action)2.5 E F0(The)184
324 Q F2(action)2.5 E F0(may be one of the follo)2.5 E
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
/Times-Bold@0 SF<ad43>144 84 Q/F2 10/Times-Italic@0 SF(command)2.5 E
-(command)184 96 Q F0 1.055(is e)3.555 F -.15(xe)-.15 G 1.055
+(command)184 96 Q F0 1.056(is e)3.556 F -.15(xe)-.15 G 1.056
(cuted in a subshell en).15 F 1.056
(vironment, and its output is used as the possible)-.4 F(completions.)
-184 108 Q F1<ad46>144 120 Q F2(function)2.5 E F0 .114
+184 108 Q F1<ad46>144 120 Q F2(function)2.5 E F0 .113
(The shell function)184 132 R F2(function)2.614 E F0 .114(is e)2.614 F
-.15(xe)-.15 G .114(cuted in the current shell en).15 F 2.614
-(vironment. When)-.4 F .113(the func-)2.613 F .816(tion is e)184 144 R
--.15(xe)-.15 G .816(cuted, the \214rst ar).15 F .816(gument \()-.18 F F1
-($1)A F0 3.316(\)i)C 3.316(st)-3.316 G .817
+(vironment. When)-.4 F .114(the func-)2.614 F .817(tion is e)184 144 R
+-.15(xe)-.15 G .817(cuted, the \214rst ar).15 F .817(gument \()-.18 F F1
+($1)A F0 3.316(\)i)C 3.316(st)-3.316 G .816
(he name of the command whose ar)-3.316 F(guments)-.18 E 1.407
(are being completed, the second ar)184 156 R 1.407(gument \()-.18 F F1
($2)A F0 3.907(\)i)C 3.907(st)-3.907 G 1.407(he w)-3.907 F 1.407
-(ord being completed, and the)-.1 F .103(third ar)184 168 R .103
-(gument \()-.18 F F1($3)A F0 2.603(\)i)C 2.603(st)-2.603 G .103(he w)
--2.603 F .104(ord preceding the w)-.1 F .104
-(ord being completed on the current com-)-.1 F .102(mand line.)184 180 R
-.102(When it \214nishes, the possible completions are retrie)5.102 F
--.15(ve)-.25 G 2.601(df).15 G .101(rom the v)-2.601 F .101(alue of the)
+(ord being completed, and the)-.1 F .104(third ar)184 168 R .104
+(gument \()-.18 F F1($3)A F0 2.604(\)i)C 2.604(st)-2.604 G .104(he w)
+-2.604 F .104(ord preceding the w)-.1 F .103
+(ord being completed on the current com-)-.1 F .101(mand line.)184 180 R
+.101(When it \214nishes, the possible completions are retrie)5.101 F
+-.15(ve)-.25 G 2.602(df).15 G .102(rom the v)-2.602 F .102(alue of the)
-.25 F/F3 9/Times-Bold@0 SF(COMPREPL)184 192 Q(Y)-.828 E F0(array v)2.25
-E(ariable.)-.25 E F1<ad47>144 204 Q F2(globpat)2.5 E F0 1.007
-(The pathname e)184 216 R 1.007(xpansion pattern)-.15 F F2(globpat)3.507
-E F0 1.007(is e)3.507 F 1.008(xpanded to generate the possible comple-)
+E(ariable.)-.25 E F1<ad47>144 204 Q F2(globpat)2.5 E F0 1.008
+(The pathname e)184 216 R 1.008(xpansion pattern)-.15 F F2(globpat)3.507
+E F0 1.007(is e)3.507 F 1.007(xpanded to generate the possible comple-)
-.15 F(tions.)184 228 Q F1<ad50>144 240 Q F2(pr)2.5 E(e\214x)-.37 E(pr)
-184 252 Q(e\214x)-.37 E F0 .535(is added at the be)3.035 F .534
+184 252 Q(e\214x)-.37 E F0 .534(is added at the be)3.034 F .534
(ginning of each possible completion after all other options ha)-.15 F
-.15(ve)-.2 G(been applied.)184 264 Q F1<ad53>144 276 Q F2(suf)2.5 E
2.81(\214x suf)-.18 F<8c78>-.18 E F0
(is appended to each possible completion after all other options ha)2.5
E .3 -.15(ve b)-.2 H(een applied.).15 E F1<ad57>144 288 Q F2(wor)2.5 E
-(dlist)-.37 E F0(The)184 300 Q F2(wor)3.639 E(dlist)-.37 E F0 1.14
-(is split using the characters in the)3.639 F F3(IFS)3.64 E F0 1.14
-(special v)3.39 F 1.14(ariable as delimiters, and)-.25 F 2.008
-(each resultant w)184 312 R 2.008(ord is e)-.1 F 4.508(xpanded. The)-.15
-F 2.007(possible completions are the members of the)4.508 F
+(dlist)-.37 E F0(The)184 300 Q F2(wor)3.64 E(dlist)-.37 E F0 1.14
+(is split using the characters in the)3.64 F F3(IFS)3.64 E F0 1.139
+(special v)3.39 F 1.139(ariable as delimiters, and)-.25 F 2.007
+(each resultant w)184 312 R 2.007(ord is e)-.1 F 4.507(xpanded. The)-.15
+F 2.008(possible completions are the members of the)4.507 F
(resultant list which match the w)184 324 Q(ord being completed.)-.1 E
-F1<ad58>144 336 Q F2(\214lterpat)2.5 E(\214lterpat)184 348 Q F0 .455
-(is a pattern as used for pathname e)2.955 F 2.956(xpansion. It)-.15 F
-.456(is applied to the list of possible)2.956 F 1.596
+F1<ad58>144 336 Q F2(\214lterpat)2.5 E(\214lterpat)184 348 Q F0 .456
+(is a pattern as used for pathname e)2.956 F 2.956(xpansion. It)-.15 F
+.455(is applied to the list of possible)2.956 F 1.596
(completions generated by the preceding options and ar)184 360 R 1.596
(guments, and each completion)-.18 F(matching)184 372 Q F2(\214lterpat)
-3.204 E F0 .704(is remo)3.204 F -.15(ve)-.15 G 3.204(df).15 G .704
-(rom the list.)-3.204 F 3.204(Al)5.704 G(eading)-3.204 E F1(!)3.204 E F0
-(in)3.204 E F2(\214lterpat)3.205 E F0(ne)3.205 E -.05(ga)-.15 G .705
+3.205 E F0 .705(is remo)3.205 F -.15(ve)-.15 G 3.205(df).15 G .704
+(rom the list.)-3.205 F 3.204(Al)5.704 G(eading)-3.204 E F1(!)3.204 E F0
+(in)3.204 E F2(\214lterpat)3.204 E F0(ne)3.204 E -.05(ga)-.15 G .704
(tes the pattern;).05 F(in this case, an)184 384 Q 2.5(yc)-.15 G
(ompletion not matching)-2.5 E F2(\214lterpat)2.5 E F0(is remo)2.5 E
--.15(ve)-.15 G(d.).15 E .467(The return v)144 400.8 R .467
+-.15(ve)-.15 G(d.).15 E .466(The return v)144 400.8 R .466
(alue is true unless an in)-.25 F -.25(va)-.4 G .466
-(lid option is supplied, an option other than).25 F F1<ad70>2.966 E F0
-(or)2.966 E F1<ad72>2.966 E F0 .466(is sup-)2.966 F 1.361
-(plied without a)144 412.8 R F2(name)3.861 E F0(ar)3.861 E 1.361
-(gument, an attempt is made to remo)-.18 F 1.662 -.15(ve a c)-.15 H
-1.362(ompletion speci\214cation for a).15 F F2(name)144 424.8 Q F0
+(lid option is supplied, an option other than).25 F F1<ad70>2.967 E F0
+(or)2.967 E F1<ad72>2.967 E F0 .467(is sup-)2.967 F 1.362
+(plied without a)144 412.8 R F2(name)3.862 E F0(ar)3.862 E 1.361
+(gument, an attempt is made to remo)-.18 F 1.661 -.15(ve a c)-.15 H
+1.361(ompletion speci\214cation for a).15 F F2(name)144 424.8 Q F0
(for which no speci\214cation e)2.5 E
(xists, or an error occurs adding a completion speci\214cation.)-.15 E
F1(compopt)108 441.6 Q F0([)2.5 E F1<ad6f>A F2(option)2.5 E F0 2.5(][)C
F1(\255DE)-2.5 E F0 2.5(][)C F1(+o)-2.5 E F2(option)2.5 E F0 2.5(][)C F2
(name)-2.5 E F0(])A .447(Modify completion options for each)144 453.6 R
F2(name)2.947 E F0 .447(according to the)2.947 F F2(option)2.947 E F0
-.447(s, or for the currently-e)B -.15(xe)-.15 G(cuting).15 E .725
-(completion if no)144 465.6 R F2(name)3.225 E F0 3.225(sa)C .725
-(re supplied.)-3.225 F .725(If no)5.725 F F2(option)3.225 E F0 3.225(sa)
-C .725(re gi)-3.225 F -.15(ve)-.25 G .726
+.447(s, or for the currently-e)B -.15(xe)-.15 G(cuting).15 E .726
+(completion if no)144 465.6 R F2(name)3.226 E F0 3.226(sa)C .726
+(re supplied.)-3.226 F .725(If no)5.725 F F2(option)3.225 E F0 3.225(sa)
+C .725(re gi)-3.225 F -.15(ve)-.25 G .725
(n, display the completion options for).15 F(each)144 477.6 Q F2(name)
-3.224 E F0 .724(or the current completion.)3.224 F .724(The possible v)
+3.223 E F0 .723(or the current completion.)3.223 F .724(The possible v)
5.724 F .724(alues of)-.25 F F2(option)3.224 E F0 .724(are those v)3.224
-F .723(alid for the)-.25 F F1(com-)3.223 E(plete)144 489.6 Q F0 -.2(bu)
-2.797 G .297(iltin described abo).2 F -.15(ve)-.15 G 5.297(.T).15 G(he)
+F .724(alid for the)-.25 F F1(com-)3.224 E(plete)144 489.6 Q F0 -.2(bu)
+2.798 G .298(iltin described abo).2 F -.15(ve)-.15 G 5.297(.T).15 G(he)
-5.297 E F1<ad44>2.797 E F0 .297
(option indicates that the remaining options should apply to)2.797 F
-1.228(the `)144 501.6 R(`def)-.74 E(ault')-.1 E 3.728('c)-.74 G 1.228(o\
+1.227(the `)144 501.6 R(`def)-.74 E(ault')-.1 E 3.727('c)-.74 G 1.228(o\
mmand completion; that is, completion attempted on a command for which \
-no)-3.728 F 2.177(completion has pre)144 513.6 R 2.177
-(viously been de\214ned.)-.25 F(The)7.177 E F1<ad45>4.677 E F0 2.178
-(option indicates that the remaining options)4.678 F(should apply to `)
+no)-3.727 F 2.178(completion has pre)144 513.6 R 2.178
+(viously been de\214ned.)-.25 F(The)7.178 E F1<ad45>4.678 E F0 2.177
+(option indicates that the remaining options)4.677 F(should apply to `)
144 525.6 Q(`empty')-.74 E 2.5('c)-.74 G
(ommand completion; that is, completion attempted on a blank line.)-2.5
-E 1.388(The return v)144 549.6 R 1.388(alue is true unless an in)-.25 F
--.25(va)-.4 G 1.387
+E 1.387(The return v)144 549.6 R 1.387(alue is true unless an in)-.25 F
+-.25(va)-.4 G 1.388
(lid option is supplied, an attempt is made to modify the).25 F
(options for a)144 561.6 Q F2(name)2.5 E F0
(for which no completion speci\214cation e)2.5 E
(xists, or an output error occurs.)-.15 E F1(continue)108 578.4 Q F0([)
-2.5 E F2(n)A F0(])A 1.753(Resume the ne)144 590.4 R 1.753
+2.5 E F2(n)A F0(])A 1.754(Resume the ne)144 590.4 R 1.754
(xt iteration of the enclosing)-.15 F F1 -.25(fo)4.254 G(r).25 E F0(,)A
F1(while)4.254 E F0(,)A F1(until)4.254 E F0 4.254(,o)C(r)-4.254 E F1
-(select)4.254 E F0 4.254(loop. If)4.254 F F2(n)4.614 E F0 1.754
-(is speci\214ed,)4.494 F 1.209(resume at the)144 602.4 R F2(n)3.709 E F0
+(select)4.254 E F0 4.253(loop. If)4.254 F F2(n)4.613 E F0 1.753
+(is speci\214ed,)4.493 F 1.208(resume at the)144 602.4 R F2(n)3.709 E F0
1.209(th enclosing loop.)B F2(n)6.569 E F0 1.209(must be)3.949 F/F4 10
/Symbol SF<b3>3.709 E F0 3.709(1. If)3.709 F F2(n)4.069 E F0 1.209
-(is greater than the number of enclosing)3.949 F .513
+(is greater than the number of enclosing)3.949 F .514
(loops, the last enclosing loop \(the `)144 614.4 R(`top-le)-.74 E -.15
-(ve)-.25 G(l').15 E 3.013('l)-.74 G .513(oop\) is resumed.)-3.013 F .514
-(The return v)5.514 F .514(alue is 0 unless)-.25 F F2(n)3.014 E F0(is)
-3.014 E(not greater than or equal to 1.)144 626.4 Q F1(declar)108 643.2
+(ve)-.25 G(l').15 E 3.014('l)-.74 G .514(oop\) is resumed.)-3.014 F .513
+(The return v)5.513 F .513(alue is 0 unless)-.25 F F2(n)3.013 E F0(is)
+3.013 E(not greater than or equal to 1.)144 626.4 Q F1(declar)108 643.2
Q(e)-.18 E F0([)2.5 E F1(\255aAfFgilnrtux)A F0 2.5(][)C F1<ad70>-2.5 E
F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0 2.5(].)C(..])-2.5 E F1
(typeset)108 655.2 Q F0([)2.5 E F1(\255aAfFgilnrtux)A F0 2.5(][)C F1
<ad70>-2.5 E F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0 2.5(].)C
-(..])-2.5 E 1.265(Declare v)144 667.2 R 1.265(ariables and/or gi)-.25 F
-1.565 -.15(ve t)-.25 H 1.265(hem attrib).15 F 3.765(utes. If)-.2 F(no)
+(..])-2.5 E 1.264(Declare v)144 667.2 R 1.264(ariables and/or gi)-.25 F
+1.564 -.15(ve t)-.25 H 1.264(hem attrib).15 F 3.765(utes. If)-.2 F(no)
3.765 E F2(name)3.765 E F0 3.765(sa)C 1.265(re gi)-3.765 F -.15(ve)-.25
-G 3.764(nt).15 G 1.264(hen display the v)-3.764 F 1.264(alues of)-.25 F
--.25(va)144 679.2 S 3.482(riables. The).25 F F1<ad70>3.482 E F0 .982
-(option will display the attrib)3.482 F .982(utes and v)-.2 F .983
-(alues of each)-.25 F F2(name)3.483 E F0 5.983(.W).18 G(hen)-5.983 E F1
-<ad70>3.483 E F0 .983(is used)3.483 F(with)144 691.2 Q F2(name)2.775 E
-F0(ar)2.775 E .275(guments, additional options, other than)-.18 F F1
-<ad66>2.775 E F0(and)2.775 E F1<ad46>2.775 E F0 2.775(,a)C .274
-(re ignored.)-2.775 F(When)5.274 E F1<ad70>2.774 E F0 .274(is supplied)
-2.774 F(without)144 703.2 Q F2(name)4.813 E F0(ar)4.813 E 2.313
-(guments, it will display the attrib)-.18 F 2.314(utes and v)-.2 F 2.314
-(alues of all v)-.25 F 2.314(ariables ha)-.25 F 2.314(ving the)-.2 F
-(attrib)144 715.2 Q 1.182(utes speci\214ed by the additional options.)
--.2 F 1.181(If no other options are supplied with)6.182 F F1<ad70>3.681
-E F0(,)A F1(declar)3.681 E(e)-.18 E F0 .62(will display the attrib)144
+G 3.765(nt).15 G 1.265(hen display the v)-3.765 F 1.265(alues of)-.25 F
+-.25(va)144 679.2 S 3.483(riables. The).25 F F1<ad70>3.483 E F0 .983
+(option will display the attrib)3.483 F .983(utes and v)-.2 F .982
+(alues of each)-.25 F F2(name)3.482 E F0 5.982(.W).18 G(hen)-5.982 E F1
+<ad70>3.482 E F0 .982(is used)3.482 F(with)144 691.2 Q F2(name)2.774 E
+F0(ar)2.774 E .274(guments, additional options, other than)-.18 F F1
+<ad66>2.775 E F0(and)2.775 E F1<ad46>2.775 E F0 2.775(,a)C .275
+(re ignored.)-2.775 F(When)5.275 E F1<ad70>2.775 E F0 .275(is supplied)
+2.775 F(without)144 703.2 Q F2(name)4.814 E F0(ar)4.814 E 2.314
+(guments, it will display the attrib)-.18 F 2.314(utes and v)-.2 F 2.313
+(alues of all v)-.25 F 2.313(ariables ha)-.25 F 2.313(ving the)-.2 F
+(attrib)144 715.2 Q 1.181(utes speci\214ed by the additional options.)
+-.2 F 1.182(If no other options are supplied with)6.181 F F1<ad70>3.682
+E F0(,)A F1(declar)3.682 E(e)-.18 E F0 .62(will display the attrib)144
727.2 R .62(utes and v)-.2 F .62(alues of all shell v)-.25 F 3.12
(ariables. The)-.25 F F1<ad66>3.12 E F0 .62
(option will restrict the display)3.12 F(GNU Bash-4.2)72 768 Q
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
-(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E 1.291
-(to shell functions.)144 84 R(The)6.291 E/F1 10/Times-Bold@0 SF<ad46>
-3.791 E F0 1.291(option inhibits the display of function de\214nitions;\
- only the function)3.791 F .948(name and attrib)144 96 R .948
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E 1.29
+(to shell functions.)144 84 R(The)6.29 E/F1 10/Times-Bold@0 SF<ad46>3.79
+E F0 1.291(option inhibits the display of function de\214nitions; only \
+the function)3.791 F .948(name and attrib)144 96 R .948
(utes are printed.)-.2 F .948(If the)5.948 F F1(extdeb)3.448 E(ug)-.2 E
F0 .948(shell option is enabled using)3.448 F F1(shopt)3.448 E F0 3.448
(,t)C .948(he source)-3.448 F 1.342(\214le name and line number where t\
he function is de\214ned are displayed as well.)144 108 R(The)6.342 E F1
-<ad46>3.841 E F0(option)3.841 E(implies)144 120 Q F1<ad66>3.891 E F0
-6.391(.T)C(he)-6.391 E F1<ad67>3.891 E F0 1.391(option forces v)3.891 F
+<ad46>3.842 E F0(option)3.842 E(implies)144 120 Q F1<ad66>3.892 E F0
+6.392(.T)C(he)-6.392 E F1<ad67>3.892 E F0 1.391(option forces v)3.892 F
1.391(ariables to be created or modi\214ed at the global scope, e)-.25 F
--.15(ve)-.25 G(n).15 E(when)144 132 Q F1(declar)4.383 E(e)-.18 E F0
-1.883(is e)4.383 F -.15(xe)-.15 G 1.883(cuted in a shell function.).15 F
-1.882(It is ignored in all other cases.)6.883 F 1.882(The follo)6.882 F
-(wing)-.25 E .793(options can be used to restrict output to v)144 144 R
-.794(ariables with the speci\214ed attrib)-.25 F .794(ute or to gi)-.2 F
-1.094 -.15(ve v)-.25 H(ariables)-.1 E(attrib)144 156 Q(utes:)-.2 E F1
+-.15(ve)-.25 G(n).15 E(when)144 132 Q F1(declar)4.382 E(e)-.18 E F0
+1.882(is e)4.382 F -.15(xe)-.15 G 1.882(cuted in a shell function.).15 F
+1.883(It is ignored in all other cases.)6.882 F 1.883(The follo)6.883 F
+(wing)-.25 E .794(options can be used to restrict output to v)144 144 R
+.794(ariables with the speci\214ed attrib)-.25 F .793(ute or to gi)-.2 F
+1.093 -.15(ve v)-.25 H(ariables)-.1 E(attrib)144 156 Q(utes:)-.2 E F1
<ad61>144 168 Q F0(Each)25.3 E/F2 10/Times-Italic@0 SF(name)2.5 E F0
(is an inde)2.5 E -.15(xe)-.15 G 2.5(da).15 G(rray v)-2.5 E
(ariable \(see)-.25 E F1(Arrays)2.5 E F0(abo)2.5 E -.15(ve)-.15 G(\).)
(is an associati)2.5 E .3 -.15(ve a)-.25 H(rray v).15 E(ariable \(see)
-.25 E F1(Arrays)2.5 E F0(abo)2.5 E -.15(ve)-.15 G(\).).15 E F1<ad66>144
192 Q F0(Use function names only)26.97 E(.)-.65 E F1<ad69>144 204 Q F0
-.558(The v)27.52 F .558(ariable is treated as an inte)-.25 F .558
+.557(The v)27.52 F .558(ariable is treated as an inte)-.25 F .558
(ger; arithmetic e)-.15 F -.25(va)-.25 G .558(luation \(see).25 F/F3 9
-/Times-Bold@0 SF .557(ARITHMETIC EV)3.058 F(ALU)-1.215 E(A-)-.54 E(TION)
+/Times-Bold@0 SF .558(ARITHMETIC EV)3.058 F(ALU)-1.215 E(A-)-.54 E(TION)
180 216 Q F0(abo)2.25 E -.15(ve)-.15 G 2.5(\)i).15 G 2.5(sp)-2.5 G
(erformed when the v)-2.5 E(ariable is assigned a v)-.25 E(alue.)-.25 E
-F1<ad6c>144 228 Q F0 .909(When the v)27.52 F .909
+F1<ad6c>144 228 Q F0 .91(When the v)27.52 F .909
(ariable is assigned a v)-.25 F .909(alue, all upper)-.25 F .909
-(-case characters are con)-.2 F -.15(ve)-.4 G .91(rted to lo).15 F(wer)
+(-case characters are con)-.2 F -.15(ve)-.4 G .909(rted to lo).15 F(wer)
-.25 E(-)-.2 E 2.5(case. The)180 240 R(upper)2.5 E(-case attrib)-.2 E
-(ute is disabled.)-.2 E F1<ad6e>144 252 Q F0(Gi)24.74 E 1.62 -.15(ve e)
--.25 H(ach).15 E F2(name)3.82 E F0(the)3.82 E F2(namer)3.819 E(ef)-.37 E
-F0(attrib)3.819 E 1.319(ute, making it a name reference to another v)-.2
-F(ariable.)-.25 E 1.032(That other v)180 264 R 1.033
+(ute is disabled.)-.2 E F1<ad6e>144 252 Q F0(Gi)24.74 E 1.619 -.15(ve e)
+-.25 H(ach).15 E F2(name)3.819 E F0(the)3.819 E F2(namer)3.819 E(ef)-.37
+E F0(attrib)3.819 E 1.319(ute, making it a name reference to another v)
+-.2 F(ariable.)-.25 E 1.033(That other v)180 264 R 1.033
(ariable is de\214ned by the v)-.25 F 1.033(alue of)-.25 F F2(name)3.533
E F0 6.033(.A)C 1.033(ll references and assignments to)-6.033 F F2(name)
-180 276 Q F0 4.033(,e)C 1.533(xcept for changing the)-4.183 F F1<ad6e>
+180 276 Q F0 4.032(,e)C 1.532(xcept for changing the)-4.182 F F1<ad6e>
4.032 E F0(attrib)4.032 E 1.532(ute itself, are performed on the v)-.2 F
-1.532(ariable refer)-.25 F(-)-.2 E(enced by)180 288 Q F2(name)2.5 E F0
+1.533(ariable refer)-.25 F(-)-.2 E(enced by)180 288 Q F2(name)2.5 E F0
1.1 -.55('s v)D 2.5(alue. The).3 F F1<ad6e>2.5 E F0(attrib)2.5 E
(ute cannot be applied to array v)-.2 E(ariables.)-.25 E F1<ad72>144 300
-Q F0(Mak)25.86 E(e)-.1 E F2(name)5.046 E F0 5.046(sr)C(eadonly)-5.046 E
-7.546(.T)-.65 G 2.546(hese names cannot then be assigned v)-7.546 F
-2.547(alues by subsequent)-.25 F(assignment statements or unset.)180 312
-Q F1<ad74>144 324 Q F0(Gi)26.97 E .73 -.15(ve e)-.25 H(ach).15 E F2
-(name)2.93 E F0(the)2.929 E F2(tr)2.929 E(ace)-.15 E F0(attrib)2.929 E
+Q F0(Mak)25.86 E(e)-.1 E F2(name)5.047 E F0 5.047(sr)C(eadonly)-5.047 E
+7.547(.T)-.65 G 2.546(hese names cannot then be assigned v)-7.547 F
+2.546(alues by subsequent)-.25 F(assignment statements or unset.)180 312
+Q F1<ad74>144 324 Q F0(Gi)26.97 E .729 -.15(ve e)-.25 H(ach).15 E F2
+(name)2.929 E F0(the)2.929 E F2(tr)2.929 E(ace)-.15 E F0(attrib)2.929 E
2.929(ute. T)-.2 F .429(raced functions inherit the)-.35 F F1(DEB)2.929
-E(UG)-.1 E F0(and)2.929 E F1(RETURN)2.929 E F0
+E(UG)-.1 E F0(and)2.93 E F1(RETURN)2.93 E F0
(traps from the calling shell.)180 336 Q(The trace attrib)5 E
(ute has no special meaning for v)-.2 E(ariables.)-.25 E F1<ad75>144 348
-Q F0 .909(When the v)24.74 F .909(ariable is assigned a v)-.25 F .909
+Q F0 .91(When the v)24.74 F .909(ariable is assigned a v)-.25 F .909
(alue, all lo)-.25 F(wer)-.25 E .909(-case characters are con)-.2 F -.15
-(ve)-.4 G .91(rted to upper).15 F(-)-.2 E 2.5(case. The)180 360 R(lo)2.5
-E(wer)-.25 E(-case attrib)-.2 E(ute is disabled.)-.2 E F1<ad78>144 372 Q
-F0(Mark)25.3 E F2(name)2.5 E F0 2.5(sf)C(or e)-2.5 E
-(xport to subsequent commands via the en)-.15 E(vironment.)-.4 E .121
-(Using `+' instead of `\255' turns of)144 388.8 R 2.621(ft)-.25 G .121
-(he attrib)-2.621 F .121(ute instead, with the e)-.2 F .12
-(xceptions that)-.15 F F1(+a)2.62 E F0 .12(may not be used)2.62 F .644
-(to destro)144 400.8 R 3.144(ya)-.1 G 3.144(na)-3.144 G .644(rray v)
--3.144 F .644(ariable and)-.25 F F1(+r)3.145 E F0 .645(will not remo)
-3.145 F .945 -.15(ve t)-.15 H .645(he readonly attrib).15 F 3.145
-(ute. When)-.2 F .645(used in a func-)3.145 F(tion,)144 412.8 Q F1
+(ve)-.4 G .909(rted to upper).15 F(-)-.2 E 2.5(case. The)180 360 R(lo)
+2.5 E(wer)-.25 E(-case attrib)-.2 E(ute is disabled.)-.2 E F1<ad78>144
+372 Q F0(Mark)25.3 E F2(name)2.5 E F0 2.5(sf)C(or e)-2.5 E
+(xport to subsequent commands via the en)-.15 E(vironment.)-.4 E .12
+(Using `+' instead of `\255' turns of)144 388.8 R 2.62(ft)-.25 G .12
+(he attrib)-2.62 F .121(ute instead, with the e)-.2 F .121
+(xceptions that)-.15 F F1(+a)2.621 E F0 .121(may not be used)2.621 F
+.645(to destro)144 400.8 R 3.145(ya)-.1 G 3.145(na)-3.145 G .645(rray v)
+-3.145 F .645(ariable and)-.25 F F1(+r)3.145 E F0 .645(will not remo)
+3.145 F .945 -.15(ve t)-.15 H .645(he readonly attrib).15 F 3.144
+(ute. When)-.2 F .644(used in a func-)3.144 F(tion,)144 412.8 Q F1
(declar)2.835 E(e)-.18 E F0(and)2.835 E F1(typeset)2.835 E F0(mak)2.835
E 2.835(ee)-.1 G(ach)-2.835 E F2(name)2.835 E F0 .335
(local, as with the)2.835 F F1(local)2.835 E F0 .335
-(command, unless the)2.835 F F1<ad67>2.835 E F0(option)2.835 E .133
-(is supplied.)144 424.8 R .133(If a v)5.133 F .133
+(command, unless the)2.835 F F1<ad67>2.835 E F0(option)2.835 E .134
+(is supplied.)144 424.8 R .134(If a v)5.134 F .134
(ariable name is follo)-.25 F .134(wed by =)-.25 F F2(value)A F0 2.634
-(,t)C .134(he v)-2.634 F .134(alue of the v)-.25 F .134
-(ariable is set to)-.25 F F2(value)2.634 E F0 5.134(.T)C(he)-5.134 E
-.801(return v)144 436.8 R .801(alue is 0 unless an in)-.25 F -.25(va)-.4
-G .8
+(,t)C .134(he v)-2.634 F .134(alue of the v)-.25 F .133
+(ariable is set to)-.25 F F2(value)2.633 E F0 5.133(.T)C(he)-5.133 E .8
+(return v)144 436.8 R .8(alue is 0 unless an in)-.25 F -.25(va)-.4 G
+.801
(lid option is encountered, an attempt is made to de\214ne a function)
-.25 F(using)144 448.8 Q/F4 10/Courier@0 SF 1.038(\255f foo=bar)3.538 F
-F0 3.538(,a)C 3.538(na)-3.538 G 1.038(ttempt is made to assign a v)
--3.538 F 1.038(alue to a readonly v)-.25 F 1.039(ariable, an attempt is)
+.25 F(using)144 448.8 Q/F4 10/Courier@0 SF 1.039(\255f foo=bar)3.539 F
+F0 3.539(,a)C 3.539(na)-3.539 G 1.038(ttempt is made to assign a v)
+-3.539 F 1.038(alue to a readonly v)-.25 F 1.038(ariable, an attempt is)
-.25 F .974(made to assign a v)144 460.8 R .974(alue to an array v)-.25
F .974(ariable without using the compound assignment syntax \(see)-.25 F
F1(Arrays)144 472.8 Q F0(abo)2.86 E -.15(ve)-.15 G .36(\), one of the)
.15 F F2(names)2.86 E F0 .36(is not a v)2.86 F .36(alid shell v)-.25 F
-.36(ariable name, an attempt is made to turn of)-.25 F(f)-.25 E .057
+.36(ariable name, an attempt is made to turn of)-.25 F(f)-.25 E .056
(readonly status for a readonly v)144 484.8 R .057
-(ariable, an attempt is made to turn of)-.25 F 2.556(fa)-.25 G .056
-(rray status for an array v)-2.556 F(ari-)-.25 E
+(ariable, an attempt is made to turn of)-.25 F 2.557(fa)-.25 G .057
+(rray status for an array v)-2.557 F(ari-)-.25 E
(able, or an attempt is made to display a non-e)144 496.8 Q
(xistent function with)-.15 E F1<ad66>2.5 E F0(.)A F1
(dirs [\255clpv] [+)108 513.6 Q F2(n)A F1 2.5(][)C<ad>-2.5 E F2(n)A F1
-(])A F0 -.4(Wi)144 525.6 S .328
+(])A F0 -.4(Wi)144 525.6 S .329
(thout options, displays the list of currently remembered directories.)
-.4 F .329(The def)5.329 F .329(ault display is on a)-.1 F 1.238
+.4 F .328(The def)5.328 F .328(ault display is on a)-.1 F 1.238
(single line with directory names separated by spaces.)144 537.6 R 1.238
(Directories are added to the list with the)6.238 F F1(pushd)144 549.6 Q
F0(command; the)2.5 E F1(popd)2.5 E F0(command remo)2.5 E -.15(ve)-.15 G
2.5(se).15 G(ntries from the list.)-2.5 E F1<ad63>144 561.6 Q F0
(Clears the directory stack by deleting all of the entries.)25.86 E F1
-<ad6c>144 573.6 Q F0 .881
-(Produces a listing using full pathnames; the def)27.52 F .882
+<ad6c>144 573.6 Q F0 .882
+(Produces a listing using full pathnames; the def)27.52 F .881
(ault listing format uses a tilde to denote)-.1 F(the home directory)180
585.6 Q(.)-.65 E F1<ad70>144 597.6 Q F0
(Print the directory stack with one entry per line.)24.74 E F1<ad76>144
-609.6 Q F0 .273(Print the directory stack with one entry per line, pre\
-\214xing each entry with its inde)25.3 F 2.772(xi)-.15 G 2.772(nt)-2.772
-G(he)-2.772 E(stack.)180 621.6 Q F1(+)144 633.6 Q F2(n)A F0 1.564
-(Displays the)25.3 F F2(n)4.064 E F0 1.565
-(th entry counting from the left of the list sho)B 1.565(wn by)-.25 F F1
-(dirs)4.065 E F0 1.565(when in)4.065 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E
+609.6 Q F0 .272(Print the directory stack with one entry per line, pre\
+\214xing each entry with its inde)25.3 F 2.773(xi)-.15 G 2.773(nt)-2.773
+G(he)-2.773 E(stack.)180 621.6 Q F1(+)144 633.6 Q F2(n)A F0 1.565
+(Displays the)25.3 F F2(n)4.065 E F0 1.565
+(th entry counting from the left of the list sho)B 1.564(wn by)-.25 F F1
+(dirs)4.064 E F0 1.564(when in)4.064 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E
(without options, starting with zero.)180 645.6 Q F1<ad>144 657.6 Q F2
(n)A F0 1.194(Displays the)25.3 F F2(n)3.694 E F0 1.194
(th entry counting from the right of the list sho)B 1.194(wn by)-.25 F
F1(dirs)3.694 E F0 1.194(when in)3.694 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E
-(without options, starting with zero.)180 669.6 Q .257(The return v)144
+(without options, starting with zero.)180 669.6 Q .258(The return v)144
686.4 R .258(alue is 0 unless an in)-.25 F -.25(va)-.4 G .258
(lid option is supplied or).25 F F2(n)2.758 E F0(inde)2.758 E -.15(xe)
-.15 G 2.758(sb).15 G -.15(ey)-2.758 G .258(ond the end of the direc-)
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
/Times-Bold@0 SF(diso)108 84 Q(wn)-.1 E F0([)2.5 E F1(\255ar)A F0 2.5
(][)C F1<ad68>-2.5 E F0 2.5(][)C/F2 10/Times-Italic@0 SF(jobspec)-2.5 E
-F0(...])2.5 E -.4(Wi)144 96 S .122(thout options, remo).4 F .422 -.15
+F0(...])2.5 E -.4(Wi)144 96 S .121(thout options, remo).4 F .422 -.15
(ve e)-.15 H(ach).15 E F2(jobspec)4.362 E F0 .122
(from the table of acti)2.932 F .422 -.15(ve j)-.25 H 2.622(obs. If).15
-F F2(jobspec)4.362 E F0 .121(is not present, and)2.932 F .096
+F F2(jobspec)4.362 E F0 .122(is not present, and)2.932 F .096
(neither the)144 108 R F1<ad61>2.596 E F0 .096(nor the)2.596 F F1<ad72>
2.596 E F0 .096(option is supplied, the)2.596 F F2(curr)2.596 E .096
(ent job)-.37 F F0 .096(is used.)2.596 F .096(If the)5.096 F F1<ad68>
2.596 E F0 .096(option is gi)2.596 F -.15(ve)-.25 G .096(n, each).15 F
-F2(jobspec)144 120 Q F0 .673(is not remo)3.483 F -.15(ve)-.15 G 3.173
-(df).15 G .672(rom the table, b)-3.173 F .672(ut is mark)-.2 F .672
-(ed so that)-.1 F/F3 9/Times-Bold@0 SF(SIGHUP)3.172 E F0 .672
+F2(jobspec)144 120 Q F0 .672(is not remo)3.482 F -.15(ve)-.15 G 3.172
+(df).15 G .672(rom the table, b)-3.172 F .672(ut is mark)-.2 F .672
+(ed so that)-.1 F/F3 9/Times-Bold@0 SF(SIGHUP)3.172 E F0 .673
(is not sent to the job if the)2.922 F .962(shell recei)144 132 R -.15
(ve)-.25 G 3.462(sa).15 G F3(SIGHUP)A/F4 9/Times-Roman@0 SF(.)A F0 .962
(If no)5.462 F F2(jobspec)5.202 E F0 .962(is supplied, the)3.772 F F1
<ad61>3.462 E F0 .962(option means to remo)3.462 F 1.262 -.15(ve o)-.15
-H 3.462(rm).15 G .962(ark all)-3.462 F 1.359(jobs; the)144 144 R F1
-<ad72>3.859 E F0 1.359(option without a)3.859 F F2(jobspec)5.599 E F0
-(ar)4.169 E 1.358(gument restricts operation to running jobs.)-.18 F
-1.358(The return)6.358 F -.25(va)144 156 S(lue is 0 unless a).25 E F2
+H 3.462(rm).15 G .962(ark all)-3.462 F 1.358(jobs; the)144 144 R F1
+<ad72>3.858 E F0 1.358(option without a)3.858 F F2(jobspec)5.598 E F0
+(ar)4.169 E 1.359(gument restricts operation to running jobs.)-.18 F
+1.359(The return)6.359 F -.25(va)144 156 S(lue is 0 unless a).25 E F2
(jobspec)4.24 E F0(does not specify a v)2.81 E(alid job)-.25 E(.)-.4 E
F1(echo)108 172.8 Q F0([)2.5 E F1(\255neE)A F0 2.5(][)C F2(ar)-2.5 E(g)
--.37 E F0(...])2.5 E .424(Output the)144 184.8 R F2(ar)2.924 E(g)-.37 E
+-.37 E F0(...])2.5 E .425(Output the)144 184.8 R F2(ar)2.925 E(g)-.37 E
F0 .424(s, separated by spaces, follo)B .424(wed by a ne)-.25 F 2.924
-(wline. The)-.25 F .424(return status is 0 unless a write)2.924 F .308
-(error occurs.)144 196.8 R(If)5.308 E F1<ad6e>2.808 E F0 .308
-(is speci\214ed, the trailing ne)2.808 F .308(wline is suppressed.)-.25
-F .307(If the)5.308 F F1<ad65>2.807 E F0 .307(option is gi)2.807 F -.15
-(ve)-.25 G .307(n, inter).15 F(-)-.2 E 1.348(pretation of the follo)144
+(wline. The)-.25 F .424(return status is 0 unless a write)2.924 F .307
+(error occurs.)144 196.8 R(If)5.307 E F1<ad6e>2.807 E F0 .307
+(is speci\214ed, the trailing ne)2.807 F .308(wline is suppressed.)-.25
+F .308(If the)5.308 F F1<ad65>2.808 E F0 .308(option is gi)2.808 F -.15
+(ve)-.25 G .308(n, inter).15 F(-)-.2 E 1.349(pretation of the follo)144
208.8 R 1.348(wing backslash-escaped characters is enabled.)-.25 F(The)
-6.348 E F1<ad45>3.849 E F0 1.349(option disables the)3.849 F 1.055
+6.348 E F1<ad45>3.848 E F0 1.348(option disables the)3.848 F 1.054
(interpretation of these escape characters, e)144 220.8 R -.15(ve)-.25 G
-3.555(no).15 G 3.555(ns)-3.555 G 1.055(ystems where the)-3.555 F 3.554
-(ya)-.15 G 1.054(re interpreted by def)-3.554 F(ault.)-.1 E(The)144
-232.8 Q F1(xpg_echo)3.458 E F0 .959
-(shell option may be used to dynamically determine whether or not)3.458
-F F1(echo)3.459 E F0 -.15(ex)3.459 G(pands).15 E .716
-(these escape characters by def)144 244.8 R(ault.)-.1 E F1(echo)5.716 E
-F0 .716(does not interpret)3.216 F F1<adad>3.216 E F0 .715
-(to mean the end of options.)3.216 F F1(echo)5.715 E F0
+3.555(no).15 G 3.555(ns)-3.555 G 1.055(ystems where the)-3.555 F 3.555
+(ya)-.15 G 1.055(re interpreted by def)-3.555 F(ault.)-.1 E(The)144
+232.8 Q F1(xpg_echo)3.459 E F0 .959
+(shell option may be used to dynamically determine whether or not)3.459
+F F1(echo)3.458 E F0 -.15(ex)3.458 G(pands).15 E .715
+(these escape characters by def)144 244.8 R(ault.)-.1 E F1(echo)5.715 E
+F0 .716(does not interpret)3.215 F F1<adad>3.216 E F0 .716
+(to mean the end of options.)3.216 F F1(echo)5.716 E F0
(interprets the follo)144 256.8 Q(wing escape sequences:)-.25 E F1(\\a)
144 268.8 Q F0(alert \(bell\))28.22 E F1(\\b)144 280.8 Q F0(backspace)
27.66 E F1(\\c)144 292.8 Q F0(suppress further output)28.78 E F1(\\e)144
(the eight-bit character whose v)13.78 E(alue is the he)-.25 E
(xadecimal v)-.15 E(alue)-.25 E F2(HH)2.5 E F0(\(one or tw)2.5 E 2.5(oh)
-.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E F1(\\u)144 424.8 Q F2(HHHH)A F0
-1.506(the Unicode \(ISO/IEC 10646\) character whose v)180 436.8 R 1.507
-(alue is the he)-.25 F 1.507(xadecimal v)-.15 F(alue)-.25 E F2(HHHH)
-4.007 E F0(\(one to four he)180 448.8 Q 2.5(xd)-.15 G(igits\))-2.5 E F1
-(\\U)144 460.8 Q F2(HHHHHHHH)A F0 .548
+1.507(the Unicode \(ISO/IEC 10646\) character whose v)180 436.8 R 1.506
+(alue is the he)-.25 F 1.506(xadecimal v)-.15 F(alue)-.25 E F2(HHHH)
+4.006 E F0(\(one to four he)180 448.8 Q 2.5(xd)-.15 G(igits\))-2.5 E F1
+(\\U)144 460.8 Q F2(HHHHHHHH)A F0 .547
(the Unicode \(ISO/IEC 10646\) character whose v)180 472.8 R .547
-(alue is the he)-.25 F .547(xadecimal v)-.15 F(alue)-.25 E F2(HHHHH-)
-3.047 E(HHH)180 484.8 Q F0(\(one to eight he)2.5 E 2.5(xd)-.15 G
+(alue is the he)-.25 F .548(xadecimal v)-.15 F(alue)-.25 E F2(HHHHH-)
+3.048 E(HHH)180 484.8 Q F0(\(one to eight he)2.5 E 2.5(xd)-.15 G
(igits\))-2.5 E F1(enable)108 501.6 Q F0([)2.5 E F1<ad61>A F0 2.5(][)C
F1(\255dnps)-2.5 E F0 2.5(][)C F1<ad66>-2.5 E F2(\214lename)2.5 E F0 2.5
-(][)C F2(name)-2.5 E F0(...])2.5 E .277(Enable and disable b)144 513.6 R
+(][)C F2(name)-2.5 E F0(...])2.5 E .278(Enable and disable b)144 513.6 R
.278(uiltin shell commands.)-.2 F .278(Disabling a b)5.278 F .278
-(uiltin allo)-.2 F .278(ws a disk command which has)-.25 F .834
+(uiltin allo)-.2 F .278(ws a disk command which has)-.25 F .833
(the same name as a shell b)144 525.6 R .834(uiltin to be e)-.2 F -.15
(xe)-.15 G .834(cuted without specifying a full pathname, e).15 F -.15
-(ve)-.25 G 3.333(nt).15 G(hough)-3.333 E .989
+(ve)-.25 G 3.334(nt).15 G(hough)-3.334 E .99
(the shell normally searches for b)144 537.6 R .989
-(uiltins before disk commands.)-.2 F(If)5.989 E F1<ad6e>3.489 E F0 .99
-(is used, each)3.49 F F2(name)3.49 E F0 .99(is dis-)3.49 F 1.582
+(uiltins before disk commands.)-.2 F(If)5.989 E F1<ad6e>3.489 E F0 .989
+(is used, each)3.489 F F2(name)3.489 E F0 .989(is dis-)3.489 F 1.581
(abled; otherwise,)144 549.6 R F2(names)4.082 E F0 1.582(are enabled.)
4.082 F -.15(Fo)6.582 G 4.082(re).15 G 1.582(xample, to use the)-4.232 F
-F1(test)4.082 E F0 1.582(binary found via the)4.082 F F3 -.666(PA)4.081
-G(TH)-.189 E F0 .08(instead of the shell b)144 561.6 R .08(uiltin v)-.2
-F .08(ersion, run)-.15 F/F5 10/Courier@0 SF .081(enable -n test)2.58 F
-F0 5.081(.T)C(he)-5.081 E F1<ad66>2.581 E F0 .081
-(option means to load the ne)2.581 F(w)-.25 E -.2(bu)144 573.6 S 1.525
-(iltin command).2 F F2(name)4.385 E F0 1.524(from shared object)4.204 F
+F1(test)4.082 E F0 1.582(binary found via the)4.082 F F3 -.666(PA)4.082
+G(TH)-.189 E F0 .081(instead of the shell b)144 561.6 R .081(uiltin v)
+-.2 F .081(ersion, run)-.15 F/F5 10/Courier@0 SF .081(enable -n test)
+2.581 F F0 5.081(.T)C(he)-5.081 E F1<ad66>2.58 E F0 .08
+(option means to load the ne)2.58 F(w)-.25 E -.2(bu)144 573.6 S 1.524
+(iltin command).2 F F2(name)4.384 E F0 1.524(from shared object)4.204 F
F2(\214lename)4.024 E F0 4.024(,o).18 G 4.024(ns)-4.024 G 1.524
(ystems that support dynamic loading.)-4.024 F(The)144 585.6 Q F1<ad64>
-2.866 E F0 .366(option will delete a b)2.866 F .366(uiltin pre)-.2 F
-.366(viously loaded with)-.25 F F1<ad66>2.867 E F0 5.367(.I)C 2.867(fn)
--5.367 G(o)-2.867 E F2(name)2.867 E F0(ar)2.867 E .367(guments are gi)
--.18 F -.15(ve)-.25 G .367(n, or).15 F .399(if the)144 597.6 R F1<ad70>
-2.899 E F0 .399(option is supplied, a list of shell b)2.899 F .399
+2.867 E F0 .367(option will delete a b)2.867 F .367(uiltin pre)-.2 F
+.367(viously loaded with)-.25 F F1<ad66>2.866 E F0 5.366(.I)C 2.866(fn)
+-5.366 G(o)-2.866 E F2(name)2.866 E F0(ar)2.866 E .366(guments are gi)
+-.18 F -.15(ve)-.25 G .366(n, or).15 F .398(if the)144 597.6 R F1<ad70>
+2.898 E F0 .399(option is supplied, a list of shell b)2.899 F .399
(uiltins is printed.)-.2 F -.4(Wi)5.399 G .399(th no other option ar).4
-F .398(guments, the)-.18 F .098(list consists of all enabled shell b)144
+F .399(guments, the)-.18 F .099(list consists of all enabled shell b)144
609.6 R 2.598(uiltins. If)-.2 F F1<ad6e>2.598 E F0 .098
-(is supplied, only disabled b)2.598 F .099(uiltins are printed.)-.2 F
-(If)5.099 E F1<ad61>2.599 E F0 1.917
+(is supplied, only disabled b)2.598 F .098(uiltins are printed.)-.2 F
+(If)5.098 E F1<ad61>2.598 E F0 1.916
(is supplied, the list printed includes all b)144 621.6 R 1.916
-(uiltins, with an indication of whether or not each is)-.2 F 2.878
-(enabled. If)144 633.6 R F1<ad73>2.878 E F0 .379
-(is supplied, the output is restricted to the POSIX)2.878 F F2(special)
-2.879 E F0 -.2(bu)2.879 G 2.879(iltins. The).2 F .379(return v)2.879 F
-(alue)-.25 E .995(is 0 unless a)144 645.6 R F2(name)3.855 E F0 .994
-(is not a shell b)3.675 F .994(uiltin or there is an error loading a ne)
--.2 F 3.494(wb)-.25 G .994(uiltin from a shared)-3.694 F(object.)144
+(uiltins, with an indication of whether or not each is)-.2 F 2.879
+(enabled. If)144 633.6 R F1<ad73>2.879 E F0 .379
+(is supplied, the output is restricted to the POSIX)2.879 F F2(special)
+2.879 E F0 -.2(bu)2.878 G 2.878(iltins. The).2 F .378(return v)2.878 F
+(alue)-.25 E .994(is 0 unless a)144 645.6 R F2(name)3.854 E F0 .994
+(is not a shell b)3.674 F .994(uiltin or there is an error loading a ne)
+-.2 F 3.495(wb)-.25 G .995(uiltin from a shared)-3.695 F(object.)144
657.6 Q F1 -2.3 -.15(ev a)108 674.4 T(l).15 E F0([)2.5 E F2(ar)A(g)-.37
-E F0(...])2.5 E(The)144 686.4 Q F2(ar)3.17 E(g)-.37 E F0 3.17(sa)C .671
-(re read and concatenated together into a single command.)-3.17 F .671
-(This command is then read)5.671 F .495(and e)144 698.4 R -.15(xe)-.15 G
-.495(cuted by the shell, and its e).15 F .495
+E F0(...])2.5 E(The)144 686.4 Q F2(ar)3.171 E(g)-.37 E F0 3.171(sa)C
+.671(re read and concatenated together into a single command.)-3.171 F
+.67(This command is then read)5.67 F .495(and e)144 698.4 R -.15(xe)-.15
+G .495(cuted by the shell, and its e).15 F .495
(xit status is returned as the v)-.15 F .495(alue of)-.25 F F1 -2.3 -.15
(ev a)2.995 H(l).15 E F0 5.495(.I)C 2.995(ft)-5.495 G .495(here are no)
-2.995 F F2(ar)2.995 E(gs)-.37 E F0(,).27 E(or only null ar)144 710.4 Q
/Times-Bold@0 SF(exec)108 84 Q F0([)2.5 E F1(\255cl)A F0 2.5(][)C F1
<ad61>-2.5 E/F2 10/Times-Italic@0 SF(name)2.5 E F0 2.5(][)C F2(command)
-2.5 E F0([)2.5 E F2(ar)A(guments)-.37 E F0(]])A(If)144 96 Q F2(command)
-3.005 E F0 .305(is speci\214ed, it replaces the shell.)3.575 F .305
-(No ne)5.305 F 2.805(wp)-.25 G .306(rocess is created.)-2.805 F(The)
-5.306 E F2(ar)3.136 E(guments)-.37 E F0(become)3.076 E .177(the ar)144
-108 R .177(guments to)-.18 F F2(command)2.676 E F0 5.176(.I)C 2.676(ft)
+3.006 E F0 .306(is speci\214ed, it replaces the shell.)3.576 F .305
+(No ne)5.305 F 2.805(wp)-.25 G .305(rocess is created.)-2.805 F(The)
+5.305 E F2(ar)3.135 E(guments)-.37 E F0(become)3.075 E .176(the ar)144
+108 R .176(guments to)-.18 F F2(command)2.676 E F0 5.176(.I)C 2.676(ft)
-5.176 G(he)-2.676 E F1<ad6c>2.676 E F0 .176
-(option is supplied, the shell places a dash at the be)2.676 F .176
-(ginning of)-.15 F .499(the zeroth ar)144 120 R .499(gument passed to)
--.18 F F2(command)2.999 E F0 5.499(.T).77 G .499(his is what)-5.499 F F2
-(lo)2.999 E(gin)-.1 E F0 .499(\(1\) does.).24 F(The)5.5 E F1<ad63>3 E F0
-.5(option causes)3 F F2(com-)3.2 E(mand)144 132 Q F0 .639(to be e)3.909
-F -.15(xe)-.15 G .638(cuted with an empty en).15 F 3.138(vironment. If)
--.4 F F1<ad61>3.138 E F0 .638(is supplied, the shell passes)3.138 F F2
-(name)3.498 E F0 .638(as the)3.318 F 1.077(zeroth ar)144 144 R 1.077
-(gument to the e)-.18 F -.15(xe)-.15 G 1.077(cuted command.).15 F(If)
-6.077 E F2(command)3.777 E F0 1.077(cannot be e)4.347 F -.15(xe)-.15 G
-1.077(cuted for some reason, a).15 F(non-interacti)144 156 Q .877 -.15
-(ve s)-.25 H .577(hell e).15 F .577(xits, unless the)-.15 F F1(execfail)
-3.077 E F0 .577(shell option is enabled.)3.077 F .576
-(In that case, it returns f)5.577 F(ail-)-.1 E 2.505(ure. An)144 168 R
-(interacti)2.505 E .305 -.15(ve s)-.25 H .005(hell returns f).15 F .005
-(ailure if the \214le cannot be e)-.1 F -.15(xe)-.15 G 2.505(cuted. If)
-.15 F F2(command)2.705 E F0 .005(is not speci\214ed,)3.275 F(an)144 180
-Q 3.037(yr)-.15 G .537(edirections tak)-3.037 F 3.036(ee)-.1 G -.25(ff)
--3.036 G .536(ect in the current shell, and the return status is 0.).25
-F .536(If there is a redirection)5.536 F(error)144 192 Q 2.5(,t)-.4 G
+(option is supplied, the shell places a dash at the be)2.676 F .177
+(ginning of)-.15 F .5(the zeroth ar)144 120 R .5(gument passed to)-.18 F
+F2(command)3 E F0 5.499(.T).77 G .499(his is what)-5.499 F F2(lo)2.999 E
+(gin)-.1 E F0 .499(\(1\) does.).24 F(The)5.499 E F1<ad63>2.999 E F0 .499
+(option causes)2.999 F F2(com-)3.199 E(mand)144 132 Q F0 .638(to be e)
+3.908 F -.15(xe)-.15 G .638(cuted with an empty en).15 F 3.138
+(vironment. If)-.4 F F1<ad61>3.138 E F0 .638
+(is supplied, the shell passes)3.138 F F2(name)3.499 E F0 .639(as the)
+3.319 F 1.078(zeroth ar)144 144 R 1.077(gument to the e)-.18 F -.15(xe)
+-.15 G 1.077(cuted command.).15 F(If)6.077 E F2(command)3.777 E F0 1.077
+(cannot be e)4.347 F -.15(xe)-.15 G 1.077(cuted for some reason, a).15 F
+(non-interacti)144 156 Q .876 -.15(ve s)-.25 H .576(hell e).15 F .576
+(xits, unless the)-.15 F F1(execfail)3.076 E F0 .577
+(shell option is enabled.)3.077 F .577(In that case, it returns f)5.577
+F(ail-)-.1 E 2.505(ure. An)144 168 R(interacti)2.505 E .305 -.15(ve s)
+-.25 H .005(hell returns f).15 F .005(ailure if the \214le cannot be e)
+-.1 F -.15(xe)-.15 G 2.505(cuted. If).15 F F2(command)2.705 E F0 .005
+(is not speci\214ed,)3.275 F(an)144 180 Q 3.036(yr)-.15 G .536
+(edirections tak)-3.036 F 3.036(ee)-.1 G -.25(ff)-3.036 G .536
+(ect in the current shell, and the return status is 0.).25 F .536
+(If there is a redirection)5.536 F(error)144 192 Q 2.5(,t)-.4 G
(he return status is 1.)-2.5 E F1(exit)108 208.8 Q F0([)2.5 E F2(n)A F0
-6.29(]C)C .095(ause the shell to e)-6.29 F .095(xit with a status of)
--.15 F F2(n)2.595 E F0 5.095(.I)C(f)-5.095 E F2(n)2.955 E F0 .096
-(is omitted, the e)2.835 F .096(xit status is that of the last command)
+6.29(]C)C .096(ause the shell to e)-6.29 F .096(xit with a status of)
+-.15 F F2(n)2.596 E F0 5.096(.I)C(f)-5.096 E F2(n)2.955 E F0 .095
+(is omitted, the e)2.835 F .095(xit status is that of the last command)
-.15 F -.15(exe)144 220.8 S 2.5(cuted. A).15 F(trap on)2.5 E/F3 9
/Times-Bold@0 SF(EXIT)2.5 E F0(is e)2.25 E -.15(xe)-.15 G
(cuted before the shell terminates.).15 E F1(export)108 237.6 Q F0([)2.5
E F1(\255fn)A F0 2.5(][).833 G F2(name)-2.5 E F0([=)A F2(wor)A(d)-.37 E
-F0(]] ...)A F1(export \255p)108 249.6 Q F0 .257(The supplied)144 261.6 R
+F0(]] ...)A F1(export \255p)108 249.6 Q F0 .256(The supplied)144 261.6 R
F2(names)3.117 E F0 .257(are mark)3.027 F .257(ed for automatic e)-.1 F
.257(xport to the en)-.15 F .257(vironment of subsequently e)-.4 F -.15
-(xe)-.15 G(cuted).15 E 2.626(commands. If)144 273.6 R(the)2.626 E F1
-<ad66>2.626 E F0 .127(option is gi)2.627 F -.15(ve)-.25 G .127(n, the)
+(xe)-.15 G(cuted).15 E 2.627(commands. If)144 273.6 R(the)2.627 E F1
+<ad66>2.627 E F0 .127(option is gi)2.627 F -.15(ve)-.25 G .127(n, the)
.15 F F2(names)2.987 E F0 .127(refer to functions.)2.897 F .127(If no)
-5.127 F F2(names)2.987 E F0 .127(are gi)2.897 F -.15(ve)-.25 G .127
+5.127 F F2(names)2.987 E F0 .127(are gi)2.897 F -.15(ve)-.25 G .126
(n, or if the).15 F F1<ad70>144 285.6 Q F0 .048
-(option is supplied, a list of names of all e)2.548 F .048(xported v)
--.15 F .048(ariables is printed.)-.25 F(The)5.048 E F1<ad6e>2.547 E F0
-.047(option causes the)2.547 F -.15(ex)144 297.6 S 1.446
+(option is supplied, a list of names of all e)2.547 F .048(xported v)
+-.15 F .048(ariables is printed.)-.25 F(The)5.048 E F1<ad6e>2.548 E F0
+.048(option causes the)2.548 F -.15(ex)144 297.6 S 1.447
(port property to be remo).15 F -.15(ve)-.15 G 3.947(df).15 G 1.447
(rom each)-3.947 F F2(name)3.947 E F0 6.447(.I)C 3.947(fav)-6.447 G
1.447(ariable name is follo)-4.197 F 1.447(wed by =)-.25 F F2(wor)A(d)
--.37 E F0 3.947(,t)C(he)-3.947 E -.25(va)144 309.6 S .742(lue of the v)
-.25 F .742(ariable is set to)-.25 F F2(wor)3.242 E(d)-.37 E F0(.)A F1
-(export)5.742 E F0 .742(returns an e)3.242 F .741
-(xit status of 0 unless an in)-.15 F -.25(va)-.4 G .741(lid option is)
-.25 F .031(encountered, one of the)144 321.6 R F2(names)2.531 E F0 .031
-(is not a v)2.531 F .032(alid shell v)-.25 F .032(ariable name, or)-.25
-F F1<ad66>2.532 E F0 .032(is supplied with a)2.532 F F2(name)2.892 E F0
-(that)2.712 E(is not a function.)144 333.6 Q F1(fc)108 350.4 Q F0([)2.5
+-.37 E F0 3.946(,t)C(he)-3.946 E -.25(va)144 309.6 S .741(lue of the v)
+.25 F .741(ariable is set to)-.25 F F2(wor)3.241 E(d)-.37 E F0(.)A F1
+(export)5.741 E F0 .742(returns an e)3.242 F .742
+(xit status of 0 unless an in)-.15 F -.25(va)-.4 G .742(lid option is)
+.25 F .032(encountered, one of the)144 321.6 R F2(names)2.532 E F0 .032
+(is not a v)2.532 F .032(alid shell v)-.25 F .032(ariable name, or)-.25
+F F1<ad66>2.531 E F0 .031(is supplied with a)2.531 F F2(name)2.891 E F0
+(that)2.711 E(is not a function.)144 333.6 Q F1(fc)108 350.4 Q F0([)2.5
E F1<ad65>A F2(ename)2.5 E F0 2.5(][)C F1(\255lnr)-2.5 E F0 2.5(][)C F2
<8c72>-2.5 E(st)-.1 E F0 2.5(][)C F2(last)-2.5 E F0(])A F1(fc \255s)108
362.4 Q F0([)2.5 E F2(pat)A F0(=)A F2 -.37(re)C(p).37 E F0 2.5(][)C F2
-(cmd)-2.5 E F0(])A .432
+(cmd)-2.5 E F0(])A .431
(The \214rst form selects a range of commands from)144 374.4 R F2<8c72>
-4.842 E(st)-.1 E F0(to)3.612 E F2(last)3.022 E F0 .431
-(from the history list and displays or)3.612 F .141(edits and re-e)144
-386.4 R -.15(xe)-.15 G .141(cutes them.).15 F F2 -.45(Fi)5.141 G -.1(rs)
+4.842 E(st)-.1 E F0(to)3.612 E F2(last)3.022 E F0 .432
+(from the history list and displays or)3.612 F .142(edits and re-e)144
+386.4 R -.15(xe)-.15 G .142(cutes them.).15 F F2 -.45(Fi)5.141 G -.1(rs)
.45 G(t).1 E F0(and)3.321 E F2(last)2.731 E F0 .141
(may be speci\214ed as a string \(to locate the last command)3.321 F(be)
-144 398.4 Q .311(ginning with that string\) or as a number \(an inde)
--.15 F 2.811(xi)-.15 G .31(nto the history list, where a ne)-2.811 F
--.05(ga)-.15 G(ti).05 E .61 -.15(ve n)-.25 H(umber).15 E .314
-(is used as an of)144 410.4 R .314
-(fset from the current command number\).)-.25 F(If)5.314 E F2(last)2.905
-E F0 .315(is not speci\214ed it is set to the cur)3.495 F(-)-.2 E .949
+144 398.4 Q .31(ginning with that string\) or as a number \(an inde)-.15
+F 2.811(xi)-.15 G .311(nto the history list, where a ne)-2.811 F -.05
+(ga)-.15 G(ti).05 E .611 -.15(ve n)-.25 H(umber).15 E .315
+(is used as an of)144 410.4 R .315
+(fset from the current command number\).)-.25 F(If)5.315 E F2(last)2.904
+E F0 .314(is not speci\214ed it is set to the cur)3.494 F(-)-.2 E .948
(rent command for listing \(so that)144 422.4 R/F4 10/Courier@0 SF .948
(fc \255l \25510)3.448 F F0 .948(prints the last 10 commands\) and to)
-3.448 F F2<8c72>5.358 E(st)-.1 E F0(other)4.128 E(-)-.2 E 2.5(wise. If)
+3.448 F F2<8c72>5.359 E(st)-.1 E F0(other)4.129 E(-)-.2 E 2.5(wise. If)
144 434.4 R F2<8c72>4.41 E(st)-.1 E F0
(is not speci\214ed it is set to the pre)3.18 E
(vious command for editing and \25516 for listing.)-.25 E(The)144 458.4
(rses the order of).15 F .438(the commands.)144 470.4 R .438(If the)
5.438 F F1<ad6c>2.938 E F0 .438(option is gi)2.938 F -.15(ve)-.25 G .438
(n, the commands are listed on standard output.).15 F(Otherwise,)5.438 E
-.334(the editor gi)144 482.4 R -.15(ve)-.25 G 2.834(nb).15 G(y)-2.834 E
-F2(ename)3.024 E F0 .335(is in)3.014 F -.2(vo)-.4 G -.1(ke).2 G 2.835
+.335(the editor gi)144 482.4 R -.15(ve)-.25 G 2.835(nb).15 G(y)-2.835 E
+F2(ename)3.025 E F0 .335(is in)3.015 F -.2(vo)-.4 G -.1(ke).2 G 2.835
(do).1 G 2.835(na\214)-2.835 G .335(le containing those commands.)-2.835
-F(If)5.335 E F2(ename)3.025 E F0 .335(is not gi)3.015 F -.15(ve)-.25 G
-(n,).15 E .631(the v)144 494.4 R .631(alue of the)-.25 F F3(FCEDIT)3.131
-E F0 -.25(va)2.881 G .631(riable is used, and the v).25 F .631(alue of)
--.25 F F3(EDIT)3.131 E(OR)-.162 E F0(if)2.881 E F3(FCEDIT)3.13 E F0 .63
-(is not set.)2.88 F .63(If nei-)5.63 F .95(ther v)144 506.4 R .95
-(ariable is set,)-.25 F F2(vi)5.116 E F0 .95(is used.)5.116 F .951
-(When editing is complete, the edited commands are echoed and)5.95 F
--.15(exe)144 518.4 S(cuted.).15 E .789(In the second form,)144 542.4 R
+F(If)5.334 E F2(ename)3.024 E F0 .334(is not gi)3.014 F -.15(ve)-.25 G
+(n,).15 E .63(the v)144 494.4 R .63(alue of the)-.25 F F3(FCEDIT)3.13 E
+F0 -.25(va)2.88 G .631(riable is used, and the v).25 F .631(alue of)-.25
+F F3(EDIT)3.131 E(OR)-.162 E F0(if)2.881 E F3(FCEDIT)3.131 E F0 .631
+(is not set.)2.881 F .631(If nei-)5.631 F .951(ther v)144 506.4 R .951
+(ariable is set,)-.25 F F2(vi)5.117 E F0 .951(is used.)5.117 F .95
+(When editing is complete, the edited commands are echoed and)5.951 F
+-.15(exe)144 518.4 S(cuted.).15 E .788(In the second form,)144 542.4 R
F2(command)3.288 E F0 .788(is re-e)3.288 F -.15(xe)-.15 G .788
(cuted after each instance of).15 F F2(pat)3.288 E F0 .788
-(is replaced by)3.288 F F2 -.37(re)3.288 G(p).37 E F0(.)A F2(Com-)5.788
-E(mand)144 554.4 Q F0 .346(is intepreted the same as)2.846 F F2<8c72>
+(is replaced by)3.288 F F2 -.37(re)3.289 G(p).37 E F0(.)A F2(Com-)5.789
+E(mand)144 554.4 Q F0 .347(is intepreted the same as)2.847 F F2<8c72>
2.847 E(st)-.1 E F0(abo)2.847 E -.15(ve)-.15 G 5.347(.A).15 G .347
-(useful alias to use with this is)-2.5 F F4 .347(r='fc \255s')2.847 F F0
-2.847(,s)C 2.847(ot)-2.847 G(hat)-2.847 E(typing)144 566.4 Q F4 7.166
-(rc)3.666 G(c)-7.166 E F0 1.166(runs the last command be)3.666 F 1.166
-(ginning with)-.15 F F4(cc)3.666 E F0 1.165(and typing)3.666 F F4(r)
-3.665 E F0(re-e)3.665 E -.15(xe)-.15 G 1.165(cutes the last com-).15 F
+(useful alias to use with this is)-2.5 F F4 .346(r='fc \255s')2.847 F F0
+2.846(,s)C 2.846(ot)-2.846 G(hat)-2.846 E(typing)144 566.4 Q F4 7.165
+(rc)3.665 G(c)-7.165 E F0 1.165(runs the last command be)3.665 F 1.166
+(ginning with)-.15 F F4(cc)3.666 E F0 1.166(and typing)3.666 F F4(r)
+3.666 E F0(re-e)3.666 E -.15(xe)-.15 G 1.166(cutes the last com-).15 F
(mand.)144 578.4 Q .142(If the \214rst form is used, the return v)144
602.4 R .142(alue is 0 unless an in)-.25 F -.25(va)-.4 G .142
(lid option is encountered or).25 F F2<8c72>4.552 E(st)-.1 E F0(or)3.322
-E F2(last)2.732 E F0 .455(specify history lines out of range.)144 614.4
+E F2(last)2.732 E F0 .454(specify history lines out of range.)144 614.4
R .454(If the)5.454 F F1<ad65>2.954 E F0 .454
-(option is supplied, the return v)2.954 F .454(alue is the v)-.25 F .454
-(alue of the)-.25 F .787(last command e)144 626.4 R -.15(xe)-.15 G .787
-(cuted or f).15 F .788
+(option is supplied, the return v)2.954 F .455(alue is the v)-.25 F .455
+(alue of the)-.25 F .788(last command e)144 626.4 R -.15(xe)-.15 G .788
+(cuted or f).15 F .787
(ailure if an error occurs with the temporary \214le of commands.)-.1 F
-.788(If the)5.788 F 1.136
+.787(If the)5.787 F 1.135
(second form is used, the return status is that of the command re-e)144
-638.4 R -.15(xe)-.15 G 1.135(cuted, unless).15 F F2(cmd)3.835 E F0 1.135
-(does not)4.405 F(specify a v)144 650.4 Q
+638.4 R -.15(xe)-.15 G 1.136(cuted, unless).15 F F2(cmd)3.836 E F0 1.136
+(does not)4.406 F(specify a v)144 650.4 Q
(alid history line, in which case)-.25 E F1(fc)2.5 E F0(returns f)2.5 E
(ailure.)-.1 E F1(fg)108 667.2 Q F0([)2.5 E F2(jobspec)A F0(])A(Resume)
-144 679.2 Q F2(jobspec)5.653 E F0 1.413(in the fore)4.223 F 1.413
+144 679.2 Q F2(jobspec)5.654 E F0 1.413(in the fore)4.224 F 1.413
(ground, and mak)-.15 F 3.913(ei)-.1 G 3.913(tt)-3.913 G 1.413
(he current job)-3.913 F 6.413(.I)-.4 G(f)-6.413 E F2(jobspec)5.653 E F0
-1.414(is not present, the)4.223 F(shell')144 691.2 Q 3.117(sn)-.55 G
-.617(otion of the)-3.117 F F2(curr)3.117 E .617(ent job)-.37 F F0 .617
-(is used.)3.117 F .617(The return v)5.617 F .616
+1.413(is not present, the)4.223 F(shell')144 691.2 Q 3.116(sn)-.55 G
+.616(otion of the)-3.116 F F2(curr)3.116 E .616(ent job)-.37 F F0 .617
+(is used.)3.116 F .617(The return v)5.617 F .617
(alue is that of the command placed into the)-.25 F(fore)144 703.2 Q
-.362(ground, or f)-.15 F .362
-(ailure if run when job control is disabled or)-.1 F 2.862(,w)-.4 G .363
+.363(ground, or f)-.15 F .363
+(ailure if run when job control is disabled or)-.1 F 2.862(,w)-.4 G .362
(hen run with job control enabled, if)-2.862 F F2(jobspec)145.74 715.2 Q
-F0 .004(does not specify a v)2.815 F .004(alid job or)-.25 F F2(jobspec)
+F0 .004(does not specify a v)2.814 F .004(alid job or)-.25 F F2(jobspec)
4.244 E F0 .004(speci\214es a job that w)2.814 F .004
(as started without job control.)-.1 F(GNU Bash-4.2)72 768 Q
(2004 Apr 20)148.735 E(8)203.725 E 0 Cg EP
/Times-Bold@0 SF(getopts)108 84 Q/F2 10/Times-Italic@0 SF
(optstring name)2.5 E F0([)2.5 E F2(ar)A(gs)-.37 E F0(])A F1(getopts)144
96 Q F0 .793
-(is used by shell procedures to parse positional parameters.)3.293 F F2
-(optstring)6.023 E F0 .793(contains the option)3.513 F .15
-(characters to be recognized; if a character is follo)144 108 R .149
-(wed by a colon, the option is e)-.25 F .149(xpected to ha)-.15 F .449
--.15(ve a)-.2 H(n).15 E(ar)144 120 Q .578
-(gument, which should be separated from it by white space.)-.18 F .579
+(is used by shell procedures to parse positional parameters.)3.294 F F2
+(optstring)6.023 E F0 .793(contains the option)3.513 F .149
+(characters to be recognized; if a character is follo)144 108 R .15
+(wed by a colon, the option is e)-.25 F .15(xpected to ha)-.15 F .45
+-.15(ve a)-.2 H(n).15 E(ar)144 120 Q .579
+(gument, which should be separated from it by white space.)-.18 F .578
(The colon and question mark char)5.579 F(-)-.2 E 1.665
(acters may not be used as option characters.)144 132 R 1.665
(Each time it is in)6.665 F -.2(vo)-.4 G -.1(ke).2 G(d,).1 E F1(getopts)
-4.165 E F0 1.665(places the ne)4.165 F(xt)-.15 E .796
-(option in the shell v)144 144 R(ariable)-.25 E F2(name)3.296 E F0 3.296
-(,i).18 G(nitializing)-3.296 E F2(name)3.657 E F0 .797(if it does not e)
-3.477 F .797(xist, and the inde)-.15 F 3.297(xo)-.15 G 3.297(ft)-3.297 G
-.797(he ne)-3.297 F(xt)-.15 E(ar)144 156 Q .085
+4.165 E F0 1.665(places the ne)4.165 F(xt)-.15 E .797
+(option in the shell v)144 144 R(ariable)-.25 E F2(name)3.297 E F0 3.297
+(,i).18 G(nitializing)-3.297 E F2(name)3.657 E F0 .797(if it does not e)
+3.477 F .796(xist, and the inde)-.15 F 3.296(xo)-.15 G 3.296(ft)-3.296 G
+.796(he ne)-3.296 F(xt)-.15 E(ar)144 156 Q .085
(gument to be processed into the v)-.18 F(ariable)-.25 E/F3 9
/Times-Bold@0 SF(OPTIND)2.585 E/F4 9/Times-Roman@0 SF(.)A F3(OPTIND)
-4.585 E F0 .085(is initialized to 1 each time the shell)2.335 F .845
+4.585 E F0 .085(is initialized to 1 each time the shell)2.335 F .846
(or a shell script is in)144 168 R -.2(vo)-.4 G -.1(ke).2 G 3.345
(d. When).1 F .845(an option requires an ar)3.345 F(gument,)-.18 E F1
-(getopts)3.346 E F0 .846(places that ar)3.346 F(gument)-.18 E .804
-(into the v)144 180 R(ariable)-.25 E F3(OPT)3.304 E(ARG)-.81 E F4(.)A F0
-.803(The shell does not reset)5.304 F F3(OPTIND)3.303 E F0 .803
-(automatically; it must be manually)3.053 F .293
+(getopts)3.345 E F0 .845(places that ar)3.345 F(gument)-.18 E .803
+(into the v)144 180 R(ariable)-.25 E F3(OPT)3.303 E(ARG)-.81 E F4(.)A F0
+.803(The shell does not reset)5.303 F F3(OPTIND)3.303 E F0 .804
+(automatically; it must be manually)3.054 F .294
(reset between multiple calls to)144 192 R F1(getopts)2.793 E F0 .293
(within the same shell in)2.793 F -.2(vo)-.4 G .293(cation if a ne).2 F
-2.793(ws)-.25 G .294(et of parameters)-2.793 F(is to be used.)144 204 Q
-2.044(When the end of options is encountered,)144 228 R F1(getopts)4.543
-E F0 -.15(ex)4.543 G 2.043(its with a return v).15 F 2.043
+2.793(ws)-.25 G .293(et of parameters)-2.793 F(is to be used.)144 204 Q
+2.043(When the end of options is encountered,)144 228 R F1(getopts)4.543
+E F0 -.15(ex)4.543 G 2.043(its with a return v).15 F 2.044
(alue greater than zero.)-.25 F F3(OPTIND)144 240 Q F0
(is set to the inde)2.25 E 2.5(xo)-.15 G 2.5(ft)-2.5 G
(he \214rst non-option ar)-2.5 E(gument, and)-.18 E F2(name)2.5 E F0
-(is set to ?.)2.5 E F1(getopts)144 264 Q F0 2.392
-(normally parses the positional parameters, b)4.892 F 2.392
-(ut if more ar)-.2 F 2.393(guments are gi)-.18 F -.15(ve)-.25 G 4.893
-(ni).15 G(n)-4.893 E F2(ar)4.893 E(gs)-.37 E F0(,).27 E F1(getopts)144
-276 Q F0(parses those instead.)2.5 E F1(getopts)144 300 Q F0 1.166
-(can report errors in tw)3.666 F 3.665(ow)-.1 G 3.665(ays. If)-3.765 F
-1.165(the \214rst character of)3.665 F F2(optstring)3.895 E F0 1.165
-(is a colon,)3.885 F F2(silent)4.005 E F0(error)4.345 E 1.07
+(is set to ?.)2.5 E F1(getopts)144 264 Q F0 2.393
+(normally parses the positional parameters, b)4.893 F 2.392
+(ut if more ar)-.2 F 2.392(guments are gi)-.18 F -.15(ve)-.25 G 4.892
+(ni).15 G(n)-4.892 E F2(ar)4.892 E(gs)-.37 E F0(,).27 E F1(getopts)144
+276 Q F0(parses those instead.)2.5 E F1(getopts)144 300 Q F0 1.165
+(can report errors in tw)3.665 F 3.665(ow)-.1 G 3.665(ays. If)-3.765 F
+1.165(the \214rst character of)3.665 F F2(optstring)3.895 E F0 1.166
+(is a colon,)3.886 F F2(silent)4.006 E F0(error)4.346 E 1.071
(reporting is used.)144 312 R 1.071
-(In normal operation, diagnostic messages are printed when in)6.07 F
--.25(va)-.4 G 1.071(lid options or).25 F .394(missing option ar)144 324
-R .394(guments are encountered.)-.18 F .394(If the v)5.394 F(ariable)
--.25 E F3(OPTERR)2.894 E F0 .394(is set to 0, no error messages)2.644 F
+(In normal operation, diagnostic messages are printed when in)6.071 F
+-.25(va)-.4 G 1.07(lid options or).25 F .393(missing option ar)144 324 R
+.393(guments are encountered.)-.18 F .394(If the v)5.394 F(ariable)-.25
+E F3(OPTERR)2.894 E F0 .394(is set to 0, no error messages)2.644 F
(will be displayed, e)144 336 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(ft)-2.5
G(he \214rst character of)-2.5 E F2(optstring)2.73 E F0(is not a colon.)
-2.72 E .666(If an in)144 360 R -.25(va)-.4 G .666(lid option is seen,)
-.25 F F1(getopts)3.166 E F0 .667(places ? into)3.167 F F2(name)3.527 E
-F0 .667(and, if not silent, prints an error message)3.347 F .4
-(and unsets)144 372 R F3(OPT)2.9 E(ARG)-.81 E F4(.)A F0(If)4.899 E F1
+2.72 E .667(If an in)144 360 R -.25(va)-.4 G .667(lid option is seen,)
+.25 F F1(getopts)3.167 E F0 .667(places ? into)3.167 F F2(name)3.527 E
+F0 .666(and, if not silent, prints an error message)3.347 F .399
+(and unsets)144 372 R F3(OPT)2.899 E(ARG)-.81 E F4(.)A F0(If)4.899 E F1
(getopts)2.899 E F0 .399
(is silent, the option character found is placed in)2.899 F F3(OPT)2.899
-E(ARG)-.81 E F0 .399(and no)2.649 F(diagnostic message is printed.)144
-384 Q 1.241(If a required ar)144 408 R 1.241(gument is not found, and)
--.18 F F1(getopts)3.741 E F0 1.241(is not silent, a question mark \()
-3.741 F F1(?).833 E F0 3.742(\)i).833 G 3.742(sp)-3.742 G 1.242
-(laced in)-3.742 F F2(name)144 420 Q F0(,).18 E F3(OPT)2.735 E(ARG)-.81
-E F0 .234(is unset, and a diagnostic message is printed.)2.485 F(If)
-5.234 E F1(getopts)2.734 E F0 .234(is silent, then a colon \()2.734 F F1
-(:).833 E F0(\)).833 E(is placed in)144 432 Q F2(name)2.86 E F0(and)2.68
-E F3(OPT)2.5 E(ARG)-.81 E F0(is set to the option character found.)2.25
-E F1(getopts)144 456 Q F0 .902
+E(ARG)-.81 E F0 .4(and no)2.65 F(diagnostic message is printed.)144 384
+Q 1.242(If a required ar)144 408 R 1.242(gument is not found, and)-.18 F
+F1(getopts)3.741 E F0 1.241(is not silent, a question mark \()3.741 F F1
+(?).833 E F0 3.741(\)i).833 G 3.741(sp)-3.741 G 1.241(laced in)-3.741 F
+F2(name)144 420 Q F0(,).18 E F3(OPT)2.734 E(ARG)-.81 E F0 .234
+(is unset, and a diagnostic message is printed.)2.484 F(If)5.234 E F1
+(getopts)2.734 E F0 .235(is silent, then a colon \()2.734 F F1(:).833 E
+F0(\)).833 E(is placed in)144 432 Q F2(name)2.86 E F0(and)2.68 E F3(OPT)
+2.5 E(ARG)-.81 E F0(is set to the option character found.)2.25 E F1
+(getopts)144 456 Q F0 .902
(returns true if an option, speci\214ed or unspeci\214ed, is found.)
-3.401 F .902(It returns f)5.902 F .902(alse if the end of)-.1 F
+3.402 F .902(It returns f)5.902 F .901(alse if the end of)-.1 F
(options is encountered or an error occurs.)144 468 Q F1(hash)108 484.8
Q F0([)2.5 E F1(\255lr)A F0 2.5(][)C F1<ad70>-2.5 E F2(\214lename)2.5 E
F0 2.5(][)C F1(\255dt)-2.5 E F0 2.5(][)C F2(name)-2.5 E F0(])A .858
3.718 E F0 .858(is determined by searching)3.538 F .956
(the directories in)144 508.8 R F1($P)3.456 E -.95(AT)-.74 G(H).95 E F0
.956(and remembered.)3.456 F(An)5.956 E 3.456(yp)-.15 G(re)-3.456 E .956
-(viously-remembered pathname is discarded.)-.25 F .243(If the)144 520.8
-R F1<ad70>2.743 E F0 .243
-(option is supplied, no path search is performed, and)2.743 F F2
-(\214lename)4.653 E F0 .242(is used as the full \214lename)2.923 F 1.711
-(of the command.)144 532.8 R(The)6.711 E F1<ad72>4.211 E F0 1.711
-(option causes the shell to for)4.211 F 1.712
-(get all remembered locations.)-.18 F(The)6.712 E F1<ad64>4.212 E F0
+(viously-remembered pathname is discarded.)-.25 F .242(If the)144 520.8
+R F1<ad70>2.742 E F0 .243
+(option is supplied, no path search is performed, and)2.742 F F2
+(\214lename)4.653 E F0 .243(is used as the full \214lename)2.923 F 1.712
+(of the command.)144 532.8 R(The)6.712 E F1<ad72>4.212 E F0 1.711
+(option causes the shell to for)4.212 F 1.711
+(get all remembered locations.)-.18 F(The)6.711 E F1<ad64>4.211 E F0
.833(option causes the shell to for)144 544.8 R .833
(get the remembered location of each)-.18 F F2(name)3.333 E F0 5.833(.I)
C 3.333(ft)-5.833 G(he)-3.333 E F1<ad74>3.333 E F0 .833(option is sup-)
-3.333 F .703(plied, the full pathname to which each)144 556.8 R F2(name)
-3.204 E F0 .704(corresponds is printed.)3.204 F .704(If multiple)5.704 F
-F2(name)3.204 E F0(ar)3.204 E(guments)-.18 E .795(are supplied with)144
+3.333 F .704(plied, the full pathname to which each)144 556.8 R F2(name)
+3.204 E F0 .703(corresponds is printed.)3.204 F .703(If multiple)5.703 F
+F2(name)3.203 E F0(ar)3.203 E(guments)-.18 E .795(are supplied with)144
568.8 R F1<ad74>3.295 E F0 3.295(,t)C(he)-3.295 E F2(name)3.295 E F0
.795(is printed before the hashed full pathname.)3.295 F(The)5.795 E F1
<ad6c>3.295 E F0 .795(option causes)3.295 F .934
(output to be displayed in a format that may be reused as input.)144
-580.8 R .934(If no ar)5.934 F .935(guments are gi)-.18 F -.15(ve)-.25 G
-.935(n, or if).15 F(only)144 592.8 Q F1<ad6c>2.822 E F0 .322
-(is supplied, information about remembered commands is printed.)2.822 F
-.321(The return status is true)5.321 F(unless a)144 604.8 Q F2(name)2.86
+580.8 R .934(If no ar)5.934 F .934(guments are gi)-.18 F -.15(ve)-.25 G
+.934(n, or if).15 F(only)144 592.8 Q F1<ad6c>2.821 E F0 .321
+(is supplied, information about remembered commands is printed.)2.821 F
+.322(The return status is true)5.322 F(unless a)144 604.8 Q F2(name)2.86
E F0(is not found or an in)2.68 E -.25(va)-.4 G(lid option is supplied.)
.25 E F1(help)108 621.6 Q F0([)2.5 E F1(\255dms)A F0 2.5(][)C F2
-(pattern)-2.5 E F0(])A .866(Display helpful information about b)144
+(pattern)-2.5 E F0(])A .867(Display helpful information about b)144
633.6 R .867(uiltin commands.)-.2 F(If)5.867 E F2(pattern)4.617 E F0
-.867(is speci\214ed,)3.607 F F1(help)3.367 E F0(gi)3.367 E -.15(ve)-.25
-G 3.367(sd).15 G(etailed)-3.367 E .307(help on all commands matching)144
-645.6 R F2(pattern)2.807 E F0 2.807(;o).24 G .307
-(therwise help for all the b)-2.807 F .306
+.866(is speci\214ed,)3.607 F F1(help)3.366 E F0(gi)3.366 E -.15(ve)-.25
+G 3.366(sd).15 G(etailed)-3.366 E .306(help on all commands matching)144
+645.6 R F2(pattern)2.806 E F0 2.807(;o).24 G .307
+(therwise help for all the b)-2.807 F .307
(uiltins and shell control struc-)-.2 F(tures is printed.)144 657.6 Q F1
<ad64>144 669.6 Q F0(Display a short description of each)24.74 E F2
(pattern)2.5 E F1<ad6d>144 681.6 Q F0(Display the description of each)
-.37 G(..)-2.5 E F0(])A F1(history \255s)108 144 Q F2(ar)2.5 E(g)-.37 E
F0([)2.5 E F2(ar)A 2.5(g.)-.37 G(..)-2.5 E F0(])A -.4(Wi)144 156 S .752
(th no options, display the command history list with line numbers.).4 F
-.752(Lines listed with a)5.752 F F1(*)3.252 E F0(ha)3.252 E -.15(ve)-.2
-G .381(been modi\214ed.)144 168 R .38(An ar)5.38 F .38(gument of)-.18 F
+.752(Lines listed with a)5.752 F F1(*)3.251 E F0(ha)3.251 E -.15(ve)-.2
+G .38(been modi\214ed.)144 168 R .38(An ar)5.38 F .38(gument of)-.18 F
F2(n)3.24 E F0 .38(lists only the last)3.12 F F2(n)3.24 E F0 2.88
(lines. If)3.12 F .38(the shell v)2.88 F(ariable)-.25 E/F3 9
-/Times-Bold@0 SF(HISTTIMEFOR-)2.88 E(MA)144 180 Q(T)-.855 E F0 .264
-(is set and not null, it is used as a format string for)2.514 F F2
-(strftime)2.765 E F0 .265(\(3\) to display the time stamp asso-)B 1.02
+/Times-Bold@0 SF(HISTTIMEFOR-)2.881 E(MA)144 180 Q(T)-.855 E F0 .265
+(is set and not null, it is used as a format string for)2.515 F F2
+(strftime)2.764 E F0 .264(\(3\) to display the time stamp asso-)B 1.019
(ciated with each displayed history entry)144 192 R 6.019(.N)-.65 G
3.519(oi)-6.019 G(nterv)-3.519 E 1.019
(ening blank is printed between the formatted)-.15 F .176
(wing meanings:)-.25 E F1<ad63>144 228 Q F0
(Clear the history list by deleting all the entries.)25.86 E F1<ad64>144
240 Q F2(of)2.5 E(fset)-.18 E F0(Delete the history entry at position)
-180 252 Q F2(of)2.5 E(fset)-.18 E F0(.)A F1<ad61>144 264 Q F0 .599
-(Append the `)25.3 F(`ne)-.74 E(w')-.25 E 3.099('h)-.74 G .598
-(istory lines \(history lines entered since the be)-3.099 F .598
+180 252 Q F2(of)2.5 E(fset)-.18 E F0(.)A F1<ad61>144 264 Q F0 .598
+(Append the `)25.3 F(`ne)-.74 E(w')-.25 E 3.098('h)-.74 G .598
+(istory lines \(history lines entered since the be)-3.098 F .599
(ginning of the current)-.15 F F1(bash)180 276 Q F0
(session\) to the history \214le.)2.5 E F1<ad6e>144 288 Q F0 .854(Read \
the history lines not already read from the history \214le into the cur\
-rent history list.)24.74 F .773
+rent history list.)24.74 F .772
(These are lines appended to the history \214le since the be)180 300 R
-.772(ginning of the current)-.15 F F1(bash)3.272 E F0(ses-)3.272 E
+.773(ginning of the current)-.15 F F1(bash)3.273 E F0(ses-)3.273 E
(sion.)180 312 Q F1<ad72>144 324 Q F0(Read the contents of the history \
\214le and append them to the current history list.)25.86 E F1<ad77>144
336 Q F0(Write the current history list to the history \214le, o)23.08 E
-.15(ve)-.15 G(rwriting the history \214le').15 E 2.5(sc)-.55 G
-(ontents.)-2.5 E F1<ad70>144 348 Q F0 .625
+(ontents.)-2.5 E F1<ad70>144 348 Q F0 .626
(Perform history substitution on the follo)24.74 F(wing)-.25 E F2(ar)
-3.125 E(gs)-.37 E F0 .626(and display the result on the standard)3.125 F
+3.125 E(gs)-.37 E F0 .625(and display the result on the standard)3.125 F
2.975(output. Does)180 360 R .475
(not store the results in the history list.)2.975 F(Each)5.475 E F2(ar)
2.975 E(g)-.37 E F0 .475(must be quoted to disable)2.975 F
-(normal history e)180 372 Q(xpansion.)-.15 E F1<ad73>144 384 Q F0 .362
-(Store the)26.41 F F2(ar)3.192 E(gs)-.37 E F0 .363
-(in the history list as a single entry)3.132 F 5.363(.T)-.65 G .363
+(normal history e)180 372 Q(xpansion.)-.15 E F1<ad73>144 384 Q F0 .363
+(Store the)26.41 F F2(ar)3.193 E(gs)-.37 E F0 .363
+(in the history list as a single entry)3.133 F 5.363(.T)-.65 G .362
(he last command in the history list is)-5.363 F(remo)180 396 Q -.15(ve)
-.15 G 2.5(db).15 G(efore the)-2.5 E F2(ar)2.83 E(gs)-.37 E F0
-(are added.)2.77 E .146(If the)144 412.8 R F3(HISTTIMEFORMA)2.645 E(T)
+(are added.)2.77 E .145(If the)144 412.8 R F3(HISTTIMEFORMA)2.645 E(T)
-.855 E F0 -.25(va)2.395 G .145
(riable is set, the time stamp information associated with each history)
-.25 F .668(entry is written to the history \214le, mark)144 424.8 R .669
-(ed with the history comment character)-.1 F 5.669(.W)-.55 G .669
-(hen the history)-5.669 F .956(\214le is read, lines be)144 436.8 R .956
-(ginning with the history comment character follo)-.15 F .955
-(wed immediately by a digit)-.25 F .415
+.25 F .669(entry is written to the history \214le, mark)144 424.8 R .669
+(ed with the history comment character)-.1 F 5.668(.W)-.55 G .668
+(hen the history)-5.668 F .955(\214le is read, lines be)144 436.8 R .956
+(ginning with the history comment character follo)-.15 F .956
+(wed immediately by a digit)-.25 F .416
(are interpreted as timestamps for the pre)144 448.8 R .416
-(vious history line.)-.25 F .416(The return v)5.416 F .416
+(vious history line.)-.25 F .416(The return v)5.416 F .415
(alue is 0 unless an in)-.25 F -.25(va)-.4 G(lid).25 E .499(option is e\
ncountered, an error occurs while reading or writing the history \214le\
-, an in)144 460.8 R -.25(va)-.4 G(lid).25 E F2(of)2.999 E(fset)-.18 E F0
-(is)2.999 E(supplied as an ar)144 472.8 Q(gument to)-.18 E F1<ad64>2.5 E
-F0 2.5(,o)C 2.5(rt)-2.5 G(he history e)-2.5 E
-(xpansion supplied as an ar)-.15 E(gument to)-.18 E F1<ad70>2.5 E F0 -.1
-(fa)2.5 G(ils.).1 E F1(jobs)108 489.6 Q F0([)2.5 E F1(\255lnprs)A F0 2.5
-(][)C F2(jobspec)A F0(... ])2.5 E F1(jobs \255x)108 501.6 Q F2(command)
-2.5 E F0([)2.5 E F2(ar)2.5 E(gs)-.37 E F0(... ])2.5 E
-(The \214rst form lists the acti)144 513.6 Q .3 -.15(ve j)-.25 H 2.5
-(obs. The).15 F(options ha)2.5 E .3 -.15(ve t)-.2 H(he follo).15 E
-(wing meanings:)-.25 E F1<ad6c>144 525.6 Q F0
+, an in)144 460.8 R -.25(va)-.4 G(lid).25 E F2(of)3 E(fset)-.18 E F0(is)
+3 E(supplied as an ar)144 472.8 Q(gument to)-.18 E F1<ad64>2.5 E F0 2.5
+(,o)C 2.5(rt)-2.5 G(he history e)-2.5 E(xpansion supplied as an ar)-.15
+E(gument to)-.18 E F1<ad70>2.5 E F0 -.1(fa)2.5 G(ils.).1 E F1(jobs)108
+489.6 Q F0([)2.5 E F1(\255lnprs)A F0 2.5(][)C F2(jobspec)A F0(... ])2.5
+E F1(jobs \255x)108 501.6 Q F2(command)2.5 E F0([)2.5 E F2(ar)2.5 E(gs)
+-.37 E F0(... ])2.5 E(The \214rst form lists the acti)144 513.6 Q .3
+-.15(ve j)-.25 H 2.5(obs. The).15 F(options ha)2.5 E .3 -.15(ve t)-.2 H
+(he follo).15 E(wing meanings:)-.25 E F1<ad6c>144 525.6 Q F0
(List process IDs in addition to the normal information.)27.52 E F1
-<ad6e>144 537.6 Q F0 .193(Display information only about jobs that ha)
-24.74 F .494 -.15(ve c)-.2 H .194(hanged status since the user w).15 F
-.194(as last noti-)-.1 F(\214ed of their status.)180 549.6 Q F1<ad70>144
+<ad6e>144 537.6 Q F0 .194(Display information only about jobs that ha)
+24.74 F .494 -.15(ve c)-.2 H .193(hanged status since the user w).15 F
+.193(as last noti-)-.1 F(\214ed of their status.)180 549.6 Q F1<ad70>144
561.6 Q F0(List only the process ID of the job')24.74 E 2.5(sp)-.55 G
(rocess group leader)-2.5 E(.)-.55 E F1<ad72>144 573.6 Q F0
(Display only running jobs.)25.86 E F1<ad73>144 585.6 Q F0
-(Display only stopped jobs.)26.41 E(If)144 602.4 Q F2(jobspec)4.554 E F0
-.314(is gi)3.124 F -.15(ve)-.25 G .314
-(n, output is restricted to information about that job).15 F 5.313(.T)
--.4 G .313(he return status is 0 unless)-5.313 F(an in)144 614.4 Q -.25
+(Display only stopped jobs.)26.41 E(If)144 602.4 Q F2(jobspec)4.553 E F0
+.313(is gi)3.123 F -.15(ve)-.25 G .313
+(n, output is restricted to information about that job).15 F 5.314(.T)
+-.4 G .314(he return status is 0 unless)-5.314 F(an in)144 614.4 Q -.25
(va)-.4 G(lid option is encountered or an in).25 E -.25(va)-.4 G(lid).25
-E F2(jobspec)4.24 E F0(is supplied.)2.81 E .394(If the)144 631.2 R F1
-<ad78>2.894 E F0 .394(option is supplied,)2.894 F F1(jobs)2.894 E F0
+E F2(jobspec)4.24 E F0(is supplied.)2.81 E .395(If the)144 631.2 R F1
+<ad78>2.895 E F0 .394(option is supplied,)2.894 F F1(jobs)2.894 E F0
.394(replaces an)2.894 F(y)-.15 E F2(jobspec)4.634 E F0 .394(found in)
-3.204 F F2(command)3.094 E F0(or)3.664 E F2(ar)3.224 E(gs)-.37 E F0 .395
+3.204 F F2(command)3.094 E F0(or)3.664 E F2(ar)3.224 E(gs)-.37 E F0 .394
(with the corre-)3.164 F(sponding process group ID, and e)144 643.2 Q
-.15(xe)-.15 G(cutes).15 E F2(command)2.7 E F0(passing it)3.27 E F2(ar)
2.5 E(gs)-.37 E F0 2.5(,r).27 G(eturning its e)-2.5 E(xit status.)-.15 E
<ad6e>2.5 E F2(signum)2.5 E F0(|)2.5 E F1<ad>2.5 E F2(sigspec)A F0 2.5
(][)C F2(pid)-2.5 E F0(|)2.5 E F2(jobspec)2.5 E F0 2.5(].)C(..)-2.5 E F1
(kill \255l)108 672 Q F0([)2.5 E F2(sigspec)A F0(|)2.5 E F2 -.2(ex)2.5 G
-(it_status).2 E F0(])A .12(Send the signal named by)144 684 R F2
-(sigspec)2.96 E F0(or)2.93 E F2(signum)2.96 E F0 .119
-(to the processes named by)2.939 F F2(pid)3.869 E F0(or)3.389 E F2
-(jobspec)2.619 E F0(.).31 E F2(sigspec)5.459 E F0(is)2.929 E .318
-(either a case-insensiti)144 696 R .618 -.15(ve s)-.25 H .318
-(ignal name such as).15 F F3(SIGKILL)2.818 E F0 .319
-(\(with or without the)2.569 F F3(SIG)2.819 E F0 .319
-(pre\214x\) or a signal)2.569 F(number;)144 708 Q F2(signum)4.189 E F0
-1.349(is a signal number)4.169 F 6.349(.I)-.55 G(f)-6.349 E F2(sigspec)
+(it_status).2 E F0(])A .119(Send the signal named by)144 684 R F2
+(sigspec)2.959 E F0(or)2.929 E F2(signum)2.959 E F0 .119
+(to the processes named by)2.939 F F2(pid)3.87 E F0(or)3.39 E F2
+(jobspec)2.62 E F0(.).31 E F2(sigspec)5.46 E F0(is)2.93 E .319
+(either a case-insensiti)144 696 R .619 -.15(ve s)-.25 H .319
+(ignal name such as).15 F F3(SIGKILL)2.819 E F0 .318
+(\(with or without the)2.569 F F3(SIG)2.818 E F0 .318
+(pre\214x\) or a signal)2.568 F(number;)144 708 Q F2(signum)4.188 E F0
+1.349(is a signal number)4.168 F 6.349(.I)-.55 G(f)-6.349 E F2(sigspec)
4.189 E F0 1.349(is not present, then)4.159 F F3(SIGTERM)3.849 E F0
-1.348(is assumed.)3.599 F(An)6.348 E(ar)144 720 Q .522(gument of)-.18 F
+1.349(is assumed.)3.599 F(An)6.349 E(ar)144 720 Q .523(gument of)-.18 F
F1<ad6c>3.023 E F0 .523(lists the signal names.)3.023 F .523(If an)5.523
F 3.023(ya)-.15 G -.18(rg)-3.023 G .523(uments are supplied when).18 F
F1<ad6c>3.023 E F0 .523(is gi)3.023 F -.15(ve)-.25 G .523(n, the names)
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E .28
(of the signals corresponding to the ar)144 84 R .28
(guments are listed, and the return status is 0.)-.18 F(The)5.28 E/F1 10
-/Times-Italic@0 SF -.2(ex)2.78 G(it_status).2 E F0(ar)144 96 Q .377
-(gument to)-.18 F/F2 10/Times-Bold@0 SF<ad6c>2.877 E F0 .378
-(is a number specifying either a signal number or the e)2.877 F .378
-(xit status of a process termi-)-.15 F .594(nated by a signal.)144 108 R
+/Times-Italic@0 SF -.2(ex)2.78 G(it_status).2 E F0(ar)144 96 Q .378
+(gument to)-.18 F/F2 10/Times-Bold@0 SF<ad6c>2.878 E F0 .378
+(is a number specifying either a signal number or the e)2.878 F .377
+(xit status of a process termi-)-.15 F .593(nated by a signal.)144 108 R
F2(kill)5.593 E F0 .593(returns true if at least one signal w)3.093 F
-.593(as successfully sent, or f)-.1 F .593(alse if an error)-.1 F
+.593(as successfully sent, or f)-.1 F .594(alse if an error)-.1 F
(occurs or an in)144 120 Q -.25(va)-.4 G(lid option is encountered.).25
E F2(let)108 136.8 Q F1(ar)2.5 E(g)-.37 E F0([)2.5 E F1(ar)A(g)-.37 E F0
-(...])2.5 E(Each)144 148.8 Q F1(ar)3.026 E(g)-.37 E F0 .196
-(is an arithmetic e)2.916 F .197(xpression to be e)-.15 F -.25(va)-.25 G
-.197(luated \(see).25 F/F3 9/Times-Bold@0 SF .197(ARITHMETIC EV)2.697 F
-(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E F0(abo)2.447 E -.15(ve)-.15 G
-2.697(\). If).15 F(the last)144 160.8 Q F1(ar)2.83 E(g)-.37 E F0 -.25
+(...])2.5 E(Each)144 148.8 Q F1(ar)3.027 E(g)-.37 E F0 .197
+(is an arithmetic e)2.917 F .197(xpression to be e)-.15 F -.25(va)-.25 G
+.196(luated \(see).25 F/F3 9/Times-Bold@0 SF .196(ARITHMETIC EV)2.696 F
+(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E F0(abo)2.446 E -.15(ve)-.15 G
+2.696(\). If).15 F(the last)144 160.8 Q F1(ar)2.83 E(g)-.37 E F0 -.25
(eva)2.72 G(luates to 0,).25 E F2(let)2.5 E F0
(returns 1; 0 is returned otherwise.)2.5 E F2(local)108 177.6 Q F0([)2.5
E F1(option)A F0 2.5(][)C F1(name)-2.5 E F0([=)A F1(value)A F0 2.5(].)C
(..])-2.5 E -.15(Fo)144 189.6 S 2.56(re).15 G .06(ach ar)-2.56 F .06
(gument, a local v)-.18 F .06(ariable named)-.25 F F1(name)2.92 E F0 .06
(is created, and assigned)2.74 F F1(value)2.56 E F0 5.06(.T).18 G(he)
--5.06 E F1(option)2.56 E F0 .06(can be)2.56 F(an)144 201.6 Q 3.152(yo)
--.15 G 3.152(ft)-3.152 G .652(he options accepted by)-3.152 F F2(declar)
-3.152 E(e)-.18 E F0 5.652(.W)C(hen)-5.652 E F2(local)3.152 E F0 .653
+-5.06 E F1(option)2.56 E F0 .06(can be)2.56 F(an)144 201.6 Q 3.153(yo)
+-.15 G 3.153(ft)-3.153 G .653(he options accepted by)-3.153 F F2(declar)
+3.153 E(e)-.18 E F0 5.652(.W)C(hen)-5.652 E F2(local)3.152 E F0 .652
(is used within a function, it causes the v)3.152 F(ari-)-.25 E(able)144
-213.6 Q F1(name)3.721 E F0 .861(to ha)3.541 F 1.161 -.15(ve a v)-.2 H
-.861(isible scope restricted to that function and its children.).15 F
--.4(Wi)5.86 G .86(th no operands,).4 F F2(local)144 225.6 Q F0 1.164
-(writes a list of local v)3.664 F 1.165
+213.6 Q F1(name)3.72 E F0 .86(to ha)3.54 F 1.16 -.15(ve a v)-.2 H .861
+(isible scope restricted to that function and its children.).15 F -.4
+(Wi)5.861 G .861(th no operands,).4 F F2(local)144 225.6 Q F0 1.165
+(writes a list of local v)3.665 F 1.165
(ariables to the standard output.)-.25 F 1.165(It is an error to use)
-6.165 F F2(local)3.665 E F0 1.165(when not)3.665 F .233
-(within a function.)144 237.6 R .233(The return status is 0 unless)5.233
+6.165 F F2(local)3.664 E F0 1.164(when not)3.664 F .232
+(within a function.)144 237.6 R .233(The return status is 0 unless)5.232
F F2(local)2.733 E F0 .233(is used outside a function, an in)2.733 F
--.25(va)-.4 G(lid).25 E F1(name)3.092 E F0(is)2.912 E(supplied, or)144
+-.25(va)-.4 G(lid).25 E F1(name)3.093 E F0(is)2.913 E(supplied, or)144
249.6 Q F1(name)2.5 E F0(is a readonly v)2.5 E(ariable.)-.25 E F2
(logout)108 266.4 Q F0(Exit a login shell.)9.33 E F2(map\214le)108 283.2
Q F0([)2.5 E F2<ad6e>A F1(count)2.5 E F0 2.5(][)C F2<ad4f>-2.5 E F1
-2.5 E F1(origin)2.5 E F0 2.5(][)C F2<ad73>-2.5 E F1(count)2.5 E F0 2.5
(][)C F2<ad74>-2.5 E F0 2.5(][)C F2<ad75>-2.5 E F1(fd)2.5 E F0 2.5(][)C
F2<ad43>-2.5 E F1(callbac)2.5 E(k)-.2 E F0 2.5(][)C F2<ad63>-2.5 E F1
-(quantum)2.5 E F0 2.5(][)C F1(arr)-2.5 E(ay)-.15 E F0(])A .35
+(quantum)2.5 E F0 2.5(][)C F1(arr)-2.5 E(ay)-.15 E F0(])A .351
(Read lines from the standard input into the inde)144 307.2 R -.15(xe)
--.15 G 2.851(da).15 G .351(rray v)-2.851 F(ariable)-.25 E F1(arr)2.851 E
-(ay)-.15 E F0 2.851(,o).32 G 2.851(rf)-2.851 G .351
-(rom \214le descriptor)-2.851 F F1(fd)2.851 E F0 1.249(if the)144 319.2
-R F2<ad75>3.749 E F0 1.249(option is supplied.)3.749 F 1.249(The v)6.249
-F(ariable)-.25 E F3(MAPFILE)3.749 E F0 1.249(is the def)3.499 F(ault)-.1
-E F1(arr)3.748 E(ay)-.15 E F0 6.248(.O)C 1.248(ptions, if supplied,)
--6.248 F(ha)144 331.2 Q .3 -.15(ve t)-.2 H(he follo).15 E
-(wing meanings:)-.25 E F2<ad6e>144 343.2 Q F0(Cop)24.74 E 2.5(ya)-.1 G
-2.5(tm)-2.5 G(ost)-2.5 E F1(count)2.7 E F0 2.5(lines. If)3.18 F F1
-(count)2.5 E F0(is 0, all lines are copied.)2.5 E F2<ad4f>144 355.2 Q F0
-(Be)22.52 E(gin assigning to)-.15 E F1(arr)2.83 E(ay)-.15 E F0(at inde)
-2.82 E(x)-.15 E F1(origin)2.5 E F0 5(.T).24 G(he def)-5 E(ault inde)-.1
-E 2.5(xi)-.15 G 2.5(s0)-2.5 G(.)-2.5 E F2<ad73>144 367.2 Q F0
+-.15 G 2.851(da).15 G .351(rray v)-2.851 F(ariable)-.25 E F1(arr)2.85 E
+(ay)-.15 E F0 2.85(,o).32 G 2.85(rf)-2.85 G .35(rom \214le descriptor)
+-2.85 F F1(fd)2.85 E F0 1.248(if the)144 319.2 R F2<ad75>3.748 E F0
+1.248(option is supplied.)3.748 F 1.249(The v)6.249 F(ariable)-.25 E F3
+(MAPFILE)3.749 E F0 1.249(is the def)3.499 F(ault)-.1 E F1(arr)3.749 E
+(ay)-.15 E F0 6.249(.O)C 1.249(ptions, if supplied,)-6.249 F(ha)144
+331.2 Q .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F2<ad6e>
+144 343.2 Q F0(Cop)24.74 E 2.5(ya)-.1 G 2.5(tm)-2.5 G(ost)-2.5 E F1
+(count)2.7 E F0 2.5(lines. If)3.18 F F1(count)2.5 E F0
+(is 0, all lines are copied.)2.5 E F2<ad4f>144 355.2 Q F0(Be)22.52 E
+(gin assigning to)-.15 E F1(arr)2.83 E(ay)-.15 E F0(at inde)2.82 E(x)
+-.15 E F1(origin)2.5 E F0 5(.T).24 G(he def)-5 E(ault inde)-.1 E 2.5(xi)
+-.15 G 2.5(s0)-2.5 G(.)-2.5 E F2<ad73>144 367.2 Q F0
(Discard the \214rst)26.41 E F1(count)2.5 E F0(lines read.)2.5 E F2
<ad74>144 379.2 Q F0(Remo)26.97 E .3 -.15(ve a t)-.15 H(railing ne).15 E
(wline from each line read.)-.25 E F2<ad75>144 391.2 Q F0
2.5 E F0(lines are read.)2.5 E(The)5 E F2<ad63>2.5 E F0
(option speci\214es)2.5 E F1(quantum)2.5 E F0(.).32 E F2<ad63>144 415.2
Q F0(Specify the number of lines read between each call to)25.86 E F1
-(callbac)2.5 E(k)-.2 E F0(.).67 E(If)144 432 Q F2<ad43>2.967 E F0 .467
+(callbac)2.5 E(k)-.2 E F0(.).67 E(If)144 432 Q F2<ad43>2.968 E F0 .467
(is speci\214ed without)2.967 F F2<ad63>2.967 E F0 2.967(,t)C .467
(he def)-2.967 F .467(ault quantum is 5000.)-.1 F(When)5.467 E F1
(callbac)2.967 E(k)-.2 E F0 .467(is e)2.967 F -.25(va)-.25 G .467
-(luated, it is sup-).25 F .262(plied the inde)144 444 R 2.762(xo)-.15 G
-2.762(ft)-2.762 G .262(he ne)-2.762 F .261(xt array element to be assig\
-ned and the line to be assigned to that element)-.15 F .274
-(as additional ar)144 456 R(guments.)-.18 E F1(callbac)5.274 E(k)-.2 E
-F0 .274(is e)2.774 F -.25(va)-.25 G .274
-(luated after the line is read b).25 F .275
+(luated, it is sup-).25 F .261(plied the inde)144 444 R 2.761(xo)-.15 G
+2.761(ft)-2.761 G .261(he ne)-2.761 F .262(xt array element to be assig\
+ned and the line to be assigned to that element)-.15 F .275
+(as additional ar)144 456 R(guments.)-.18 E F1(callbac)5.275 E(k)-.2 E
+F0 .275(is e)2.775 F -.25(va)-.25 G .274
+(luated after the line is read b).25 F .274
(ut before the array element is)-.2 F(assigned.)144 468 Q
(If not supplied with an e)144 484.8 Q(xplicit origin,)-.15 E F2
(map\214le)2.5 E F0(will clear)2.5 E F1(arr)2.5 E(ay)-.15 E F0
-(before assigning to it.)2.5 E F2(map\214le)144 501.6 Q F0 1.906
-(returns successfully unless an in)4.406 F -.25(va)-.4 G 1.905
-(lid option or option ar).25 F 1.905(gument is supplied,)-.18 F F1(arr)
-4.405 E(ay)-.15 E F0(is)4.405 E(in)144 513.6 Q -.25(va)-.4 G
+(before assigning to it.)2.5 E F2(map\214le)144 501.6 Q F0 1.905
+(returns successfully unless an in)4.405 F -.25(va)-.4 G 1.905
+(lid option or option ar).25 F 1.906(gument is supplied,)-.18 F F1(arr)
+4.406 E(ay)-.15 E F0(is)4.406 E(in)144 513.6 Q -.25(va)-.4 G
(lid or unassignable, or if).25 E F1(arr)2.5 E(ay)-.15 E F0
(is not an inde)2.5 E -.15(xe)-.15 G 2.5(da).15 G(rray)-2.5 E(.)-.65 E
F2(popd)108 530.4 Q F0<5bad>2.5 E F2(n)A F0 2.5(][)C(+)-2.5 E F1(n)A F0
-2.5(][)C<ad>-2.5 E F1(n)A F0(])A(Remo)144 542.4 Q -.15(ve)-.15 G 2.799
-(se).15 G .299(ntries from the directory stack.)-2.799 F -.4(Wi)5.299 G
-.299(th no ar).4 F .299(guments, remo)-.18 F -.15(ve)-.15 G 2.799(st).15
-G .3(he top directory from the)-2.799 F 1.479(stack, and performs a)144
-554.4 R F2(cd)3.979 E F0 1.479(to the ne)3.979 F 3.979(wt)-.25 G 1.479
-(op directory)-3.979 F 6.479(.A)-.65 G -.18(rg)-6.479 G 1.478
-(uments, if supplied, ha).18 F 1.778 -.15(ve t)-.2 H 1.478(he follo).15
+2.5(][)C<ad>-2.5 E F1(n)A F0(])A(Remo)144 542.4 Q -.15(ve)-.15 G 2.8(se)
+.15 G .3(ntries from the directory stack.)-2.8 F -.4(Wi)5.299 G .299
+(th no ar).4 F .299(guments, remo)-.18 F -.15(ve)-.15 G 2.799(st).15 G
+.299(he top directory from the)-2.799 F 1.478(stack, and performs a)144
+554.4 R F2(cd)3.978 E F0 1.479(to the ne)3.978 F 3.979(wt)-.25 G 1.479
+(op directory)-3.979 F 6.479(.A)-.65 G -.18(rg)-6.479 G 1.479
+(uments, if supplied, ha).18 F 1.779 -.15(ve t)-.2 H 1.479(he follo).15
F(wing)-.25 E(meanings:)144 566.4 Q F2<ad6e>144 578.4 Q F0 .551
(Suppresses the normal change of directory when remo)24.74 F .551
(ving directories from the stack, so)-.15 F
614.4 S 2.5(re).15 G(xample:)-2.65 E/F4 10/Courier@0 SF(popd +0)2.5 E F0
(remo)2.5 E -.15(ve)-.15 G 2.5(st).15 G(he \214rst directory)-2.5 E(,)
-.65 E F4(popd +1)2.5 E F0(the second.)2.5 E F2<ad>144 626.4 Q F1(n)A F0
-(Remo)25.3 E -.15(ve)-.15 G 3.759(st).15 G(he)-3.759 E F1(n)3.759 E F0
-1.259(th entry counting from the right of the list sho)B 1.26(wn by)-.25
-F F2(dirs)3.76 E F0 3.76(,s)C 1.26(tarting with)-3.76 F 2.5(zero. F)180
-638.4 R(or e)-.15 E(xample:)-.15 E F4(popd -0)2.5 E F0(remo)2.5 E -.15
-(ve)-.15 G 2.5(st).15 G(he last directory)-2.5 E(,)-.65 E F4(popd -1)2.5
-E F0(the ne)2.5 E(xt to last.)-.15 E .644(If the)144 655.2 R F2(popd)
-3.144 E F0 .644(command is successful, a)3.144 F F2(dirs)3.143 E F0 .643
-(is performed as well, and the return status is 0.)3.143 F F2(popd)5.643
-E F0 .415(returns f)144 667.2 R .415(alse if an in)-.1 F -.25(va)-.4 G
-.415(lid option is encountered, the directory stack is empty).25 F 2.916
-(,an)-.65 G(on-e)-2.916 E .416(xistent direc-)-.15 F
+(Remo)25.3 E -.15(ve)-.15 G 3.76(st).15 G(he)-3.76 E F1(n)3.76 E F0
+1.259(th entry counting from the right of the list sho)B 1.259(wn by)
+-.25 F F2(dirs)3.759 E F0 3.759(,s)C 1.259(tarting with)-3.759 F 2.5
+(zero. F)180 638.4 R(or e)-.15 E(xample:)-.15 E F4(popd -0)2.5 E F0
+(remo)2.5 E -.15(ve)-.15 G 2.5(st).15 G(he last directory)-2.5 E(,)-.65
+E F4(popd -1)2.5 E F0(the ne)2.5 E(xt to last.)-.15 E .643(If the)144
+655.2 R F2(popd)3.143 E F0 .643(command is successful, a)3.143 F F2
+(dirs)3.143 E F0 .644(is performed as well, and the return status is 0.)
+3.143 F F2(popd)5.644 E F0 .416(returns f)144 667.2 R .416
+(alse if an in)-.1 F -.25(va)-.4 G .415
+(lid option is encountered, the directory stack is empty).25 F 2.915
+(,an)-.65 G(on-e)-2.915 E .415(xistent direc-)-.15 F
(tory stack entry is speci\214ed, or the directory change f)144 679.2 Q
(ails.)-.1 E F2(printf)108 696 Q F0([)2.5 E F2<ad76>A F1(var)2.5 E F0(])
-A F1(format)2.5 E F0([)2.5 E F1(ar)A(guments)-.37 E F0(])A 1.437
-(Write the formatted)144 708 R F1(ar)3.937 E(guments)-.37 E F0 1.437
-(to the standard output under the control of the)3.937 F F1(format)3.936
-E F0 6.436(.T)C(he)-6.436 E F2<ad76>3.936 E F0 .126
+A F1(format)2.5 E F0([)2.5 E F1(ar)A(guments)-.37 E F0(])A 1.436
+(Write the formatted)144 708 R F1(ar)3.936 E(guments)-.37 E F0 1.437
+(to the standard output under the control of the)3.936 F F1(format)3.937
+E F0 6.437(.T)C(he)-6.437 E F2<ad76>3.937 E F0 .126
(option causes the output to be assigned to the v)144 720 R(ariable)-.25
E F1(var)2.626 E F0 .126(rather than being printed to the standard)2.626
F(GNU Bash-4.2)72 768 Q(2004 Apr 20)148.735 E(11)198.725 E 0 Cg EP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E(output.)144
-84 Q(The)144 108 Q/F1 10/Times-Italic@0 SF(format)3.018 E F0 .517(is a \
+84 Q(The)144 108 Q/F1 10/Times-Italic@0 SF(format)3.017 E F0 .517(is a \
character string which contains three types of objects: plain character\
-s, which are)3.018 F .704(simply copied to standard output, character e\
-scape sequences, which are con)144 120 R -.15(ve)-.4 G .704
+s, which are)3.017 F .704(simply copied to standard output, character e\
+scape sequences, which are con)144 120 R -.15(ve)-.4 G .703
(rted and copied to).15 F .036(the standard output, and format speci\
-\214cations, each of which causes printing of the ne)144 132 R .036
+\214cations, each of which causes printing of the ne)144 132 R .037
(xt successi)-.15 F -.15(ve)-.25 G F1(ar)144 144 Q(gument)-.37 E F0
-5.531(.I)C 3.031(na)-5.531 G .531(ddition to the standard)-3.031 F F1
+5.532(.I)C 3.032(na)-5.532 G .532(ddition to the standard)-3.032 F F1
(printf)3.032 E F0 .532(\(1\) format speci\214cations,)B/F2 10
-/Times-Bold@0 SF(printf)3.032 E F0 .532(interprets the follo)3.032 F(w-)
+/Times-Bold@0 SF(printf)3.031 E F0 .531(interprets the follo)3.031 F(w-)
-.25 E(ing e)144 156 Q(xtensions:)-.15 E F2(%b)144 168 Q F0(causes)20.44
E F2(printf)5.115 E F0 2.615(to e)5.115 F 2.615
(xpand backslash escape sequences in the corresponding)-.15 F F1(ar)
E F2(printf)2.51 E F0 .01(to output the corresponding)2.51 F F1(ar)2.51
E(gument)-.37 E F0 .01(in a format that can be reused as shell)2.51 F
(input.)180 216 Q F2(%\()144 228 Q F1(datefmt)A F2(\)T)A F0(causes)180
-240 Q F2(printf)4.403 E F0 1.904
-(to output the date-time string resulting from using)4.403 F F1(datefmt)
-4.404 E F0 1.904(as a format)4.404 F .381(string for)180 252 R F1
+240 Q F2(printf)4.404 E F0 1.904
+(to output the date-time string resulting from using)4.404 F F1(datefmt)
+4.404 E F0 1.903(as a format)4.404 F .38(string for)180 252 R F1
(strftime)2.881 E F0 2.881(\(3\). The)B(corresponding)2.881 E F1(ar)
2.881 E(gument)-.37 E F0 .381(is an inte)2.881 F .381
-(ger representing the number)-.15 F .457(of seconds since the epoch.)180
+(ger representing the number)-.15 F .458(of seconds since the epoch.)180
264 R -1 -.8(Tw o)5.458 H .458(special ar)3.758 F .458(gument v)-.18 F
-.458(alues may be used: -1 represents the)-.25 F .848
+.458(alues may be used: -1 represents the)-.25 F .847
(current time, and -2 represents the time the shell w)180 276 R .847
-(as in)-.1 F -.2(vo)-.4 G -.1(ke).2 G 3.347(d. If).1 F .847(no ar)3.347
-F .847(gument is speci-)-.18 F .354(\214ed, con)180 288 R -.15(ve)-.4 G
-.354(rsion beha).15 F -.15(ve)-.2 G 2.854(sa).15 G 2.854(si)-2.854 G
-2.854(f-)-2.854 G 2.854(1h)-2.854 G .354(ad been gi)-2.854 F -.15(ve)
--.25 G 2.854(n. This).15 F .355(is an e)2.854 F .355
-(xception to the usual)-.15 F F2(printf)2.855 E F0(beha)180 300 Q(vior)
--.2 E(.)-.55 E(Ar)144 316.8 Q .464(guments to non-string format speci\
-\214ers are treated as C constants, e)-.18 F .463
-(xcept that a leading plus or)-.15 F 1.258(minus sign is allo)144 328.8
+(as in)-.1 F -.2(vo)-.4 G -.1(ke).2 G 3.348(d. If).1 F .848(no ar)3.348
+F .848(gument is speci-)-.18 F .355(\214ed, con)180 288 R -.15(ve)-.4 G
+.355(rsion beha).15 F -.15(ve)-.2 G 2.855(sa).15 G 2.855(si)-2.855 G
+2.855(f-)-2.855 G 2.855(1h)-2.855 G .354(ad been gi)-2.855 F -.15(ve)
+-.25 G 2.854(n. This).15 F .354(is an e)2.854 F .354
+(xception to the usual)-.15 F F2(printf)2.854 E F0(beha)180 300 Q(vior)
+-.2 E(.)-.55 E(Ar)144 316.8 Q .463(guments to non-string format speci\
+\214ers are treated as C constants, e)-.18 F .464
+(xcept that a leading plus or)-.15 F 1.259(minus sign is allo)144 328.8
R 1.259
(wed, and if the leading character is a single or double quote, the v)
--.25 F 1.259(alue is the)-.25 F(ASCII v)144 340.8 Q(alue of the follo)
--.25 E(wing character)-.25 E(.)-.55 E(The)144 357.6 Q F1(format)3.424 E
-F0 .923(is reused as necessary to consume all of the)3.424 F F1(ar)3.423
+-.25 F 1.258(alue is the)-.25 F(ASCII v)144 340.8 Q(alue of the follo)
+-.25 E(wing character)-.25 E(.)-.55 E(The)144 357.6 Q F1(format)3.423 E
+F0 .923(is reused as necessary to consume all of the)3.423 F F1(ar)3.423
E(guments)-.37 E F0 5.923(.I)C 3.423(ft)-5.923 G(he)-3.423 E F1(format)
-3.423 E F0 .923(requires more)3.423 F F1(ar)144 369.6 Q(guments)-.37 E
-F0 .033(than are supplied, the e)2.533 F .033
+3.423 E F0 .924(requires more)3.424 F F1(ar)144 369.6 Q(guments)-.37 E
+F0 .033(than are supplied, the e)2.534 F .033
(xtra format speci\214cations beha)-.15 F .333 -.15(ve a)-.2 H 2.533(si)
-.15 G 2.533(faz)-2.533 G .033(ero v)-2.533 F .034(alue or null string,)
+.15 G 2.533(faz)-2.533 G .033(ero v)-2.533 F .033(alue or null string,)
-.25 F(as appropriate, had been supplied.)144 381.6 Q(The return v)5 E
(alue is zero on success, non-zero on f)-.25 E(ailure.)-.1 E F2(pushd)
108 398.4 Q F0([)2.5 E F2<ad6e>A F0 2.5(][)C(+)-2.5 E F1(n)A F0 2.5(][)C
<ad>-2.5 E F1(n)A F0(])A F2(pushd)108 410.4 Q F0([)2.5 E F2<ad6e>A F0
-2.5(][)C F1(dir)-2.5 E F0(])A .64(Adds a directory to the top of the di\
-rectory stack, or rotates the stack, making the ne)144 422.4 R 3.139(wt)
--.25 G .639(op of the)-3.139 F 1.315(stack the current w)144 434.4 R
-1.315(orking directory)-.1 F 6.315(.W)-.65 G 1.315(ith no ar)-6.715 F
-1.315(guments, e)-.18 F 1.316(xchanges the top tw)-.15 F 3.816(od)-.1 G
-1.316(irectories and)-3.816 F .872
+2.5(][)C F1(dir)-2.5 E F0(])A .639(Adds a directory to the top of the d\
+irectory stack, or rotates the stack, making the ne)144 422.4 R 3.14(wt)
+-.25 G .64(op of the)-3.14 F 1.316(stack the current w)144 434.4 R 1.316
+(orking directory)-.1 F 6.316(.W)-.65 G 1.315(ith no ar)-6.716 F 1.315
+(guments, e)-.18 F 1.315(xchanges the top tw)-.15 F 3.815(od)-.1 G 1.315
+(irectories and)-3.815 F .871
(returns 0, unless the directory stack is empty)144 446.4 R 5.871(.A)
--.65 G -.18(rg)-5.871 G .871(uments, if supplied, ha).18 F 1.171 -.15
-(ve t)-.2 H .871(he follo).15 F .871(wing mean-)-.25 F(ings:)144 458.4 Q
+-.65 G -.18(rg)-5.871 G .872(uments, if supplied, ha).18 F 1.172 -.15
+(ve t)-.2 H .872(he follo).15 F .872(wing mean-)-.25 F(ings:)144 458.4 Q
F2<ad6e>144 470.4 Q F0 .902(Suppresses the normal change of directory w\
hen adding directories to the stack, so that)24.74 F
(only the stack is manipulated.)180 482.4 Q F2(+)144 494.4 Q F1(n)A F0
-1.268(Rotates the stack so that the)25.3 F F1(n)3.768 E F0 1.267
-(th directory \(counting from the left of the list sho)B 1.267(wn by)
+1.267(Rotates the stack so that the)25.3 F F1(n)3.767 E F0 1.268
+(th directory \(counting from the left of the list sho)B 1.268(wn by)
-.25 F F2(dirs)180 506.4 Q F0 2.5(,s)C
(tarting with zero\) is at the top.)-2.5 E F2<ad>144 518.4 Q F1(n)A F0
.92(Rotates the stack so that the)25.3 F F1(n)3.42 E F0 .92
(th directory \(counting from the right of the list sho)B .92(wn by)-.25
F F2(dirs)180 530.4 Q F0 2.5(,s)C(tarting with zero\) is at the top.)
--2.5 E F1(dir)144.35 542.4 Q F0(Adds)23.98 E F1(dir)3.138 E F0 .288
-(to the directory stack at the top, making it the ne)3.518 F 2.787(wc)
--.25 G .287(urrent w)-2.787 F .287(orking directory as)-.1 F
+-2.5 E F1(dir)144.35 542.4 Q F0(Adds)23.98 E F1(dir)3.137 E F0 .287
+(to the directory stack at the top, making it the ne)3.517 F 2.788(wc)
+-.25 G .288(urrent w)-2.788 F .288(orking directory as)-.1 F
(if it had been supplied as the ar)180 554.4 Q(gument to the)-.18 E F2
-(cd)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .488(If the)144 571.2 R F2(pushd)
-2.988 E F0 .488(command is successful, a)2.988 F F2(dirs)2.988 E F0 .488
-(is performed as well.)2.988 F .489(If the \214rst form is used,)5.488 F
-F2(pushd)2.989 E F0 1.04(returns 0 unless the cd to)144 583.2 R F1(dir)
-3.89 E F0 -.1(fa)4.27 G 3.539(ils. W).1 F 1.039(ith the second form,)-.4
-F F2(pushd)3.539 E F0 1.039(returns 0 unless the directory)3.539 F .846
-(stack is empty)144 595.2 R 3.346(,an)-.65 G(on-e)-3.346 E .847(xistent\
+(cd)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .489(If the)144 571.2 R F2(pushd)
+2.989 E F0 .489(command is successful, a)2.989 F F2(dirs)2.988 E F0 .488
+(is performed as well.)2.988 F .488(If the \214rst form is used,)5.488 F
+F2(pushd)2.988 E F0 1.039(returns 0 unless the cd to)144 583.2 R F1(dir)
+3.889 E F0 -.1(fa)4.269 G 3.539(ils. W).1 F 1.039(ith the second form,)
+-.4 F F2(pushd)3.54 E F0 1.04(returns 0 unless the directory)3.54 F .847
+(stack is empty)144 595.2 R 3.347(,an)-.65 G(on-e)-3.347 E .847(xistent\
directory stack element is speci\214ed, or the directory change to the)
-.15 F(speci\214ed ne)144 607.2 Q 2.5(wc)-.25 G(urrent directory f)-2.5
-E(ails.)-.1 E F2(pwd)108 624 Q F0([)2.5 E F2(\255LP)A F0(])A .845
+E(ails.)-.1 E F2(pwd)108 624 Q F0([)2.5 E F2(\255LP)A F0(])A .844
(Print the absolute pathname of the current w)144 636 R .845
-(orking directory)-.1 F 5.844(.T)-.65 G .844
-(he pathname printed contains no)-5.844 F .181(symbolic links if the)144
+(orking directory)-.1 F 5.845(.T)-.65 G .845
+(he pathname printed contains no)-5.845 F .182(symbolic links if the)144
648 R F2<ad50>2.681 E F0 .181(option is supplied or the)2.681 F F2 .181
(\255o ph)2.681 F(ysical)-.15 E F0 .181(option to the)2.681 F F2(set)
-2.681 E F0 -.2(bu)2.681 G .182(iltin command is).2 F 3.264(enabled. If)
-144 660 R(the)3.264 E F2<ad4c>3.264 E F0 .763
-(option is used, the pathname printed may contain symbolic links.)3.264
-F .763(The return)5.763 F 1.36(status is 0 unless an error occurs while\
+2.681 E F0 -.2(bu)2.681 G .181(iltin command is).2 F 3.263(enabled. If)
+144 660 R(the)3.263 E F2<ad4c>3.263 E F0 .763
+(option is used, the pathname printed may contain symbolic links.)3.263
+F .764(The return)5.764 F 1.36(status is 0 unless an error occurs while\
reading the name of the current directory or an in)144 672 R -.25(va)
-.4 G(lid).25 E(option is supplied.)144 684 Q F2 -.18(re)108 700.8 S(ad)
-.18 E F0([)3.817 E F2(\255ers)A F0 3.817(][)C F2<ad61>-3.817 E F1(aname)
-3.817 E F0 3.817(][)C F2<ad64>-3.817 E F1(delim)3.817 E F0 3.817(][)C F2
-<ad69>-3.817 E F1(te)3.817 E(xt)-.2 E F0 3.817(][)C F2<ad6e>-3.817 E F1
-(nc)3.816 E(har)-.15 E(s)-.1 E F0 3.816(][)C F2<ad4e>-3.816 E F1(nc)
-3.816 E(har)-.15 E(s)-.1 E F0 3.816(][)C F2<ad70>-3.816 E F1(pr)3.816 E
-(ompt)-.45 E F0 3.816(][)C F2<ad74>-3.816 E F1(timeout)3.816 E F0 3.816
-(][)C F2<ad75>-3.816 E F1(fd)3.816 E F0(])A([)108 712.8 Q F1(name)A F0
+.18 E F0([)3.816 E F2(\255ers)A F0 3.816(][)C F2<ad61>-3.816 E F1(aname)
+3.816 E F0 3.816(][)C F2<ad64>-3.816 E F1(delim)3.816 E F0 3.816(][)C F2
+<ad69>-3.816 E F1(te)3.816 E(xt)-.2 E F0 3.816(][)C F2<ad6e>-3.816 E F1
+(nc)3.816 E(har)-.15 E(s)-.1 E F0 3.817(][)C F2<ad4e>-3.817 E F1(nc)
+3.817 E(har)-.15 E(s)-.1 E F0 3.817(][)C F2<ad70>-3.817 E F1(pr)3.817 E
+(ompt)-.45 E F0 3.817(][)C F2<ad74>-3.817 E F1(timeout)3.817 E F0 3.817
+(][)C F2<ad75>-3.817 E F1(fd)3.817 E F0(])A([)108 712.8 Q F1(name)A F0
(...])2.5 E .516(One line is read from the standard input, or from the \
\214le descriptor)144 724.8 R F1(fd)3.016 E F0 .516(supplied as an ar)
-3.016 F .516(gument to)-.18 F(GNU Bash-4.2)72 768 Q(2004 Apr 20)148.735
+3.016 F .517(gument to)-.18 F(GNU Bash-4.2)72 768 Q(2004 Apr 20)148.735
E(12)198.725 E 0 Cg EP
%%Page: 13 13
%%BeginPageSetup
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E(the)144 84 Q
-/F1 10/Times-Bold@0 SF<ad75>2.538 E F0 .038(option, and the \214rst w)
-2.538 F .038(ord is assigned to the \214rst)-.1 F/F2 10/Times-Italic@0
-SF(name)2.539 E F0 2.539(,t).18 G .039(he second w)-2.539 F .039
-(ord to the second)-.1 F F2(name)2.539 E F0(,).18 E .42
+/F1 10/Times-Bold@0 SF<ad75>2.539 E F0 .039(option, and the \214rst w)
+2.539 F .038(ord is assigned to the \214rst)-.1 F/F2 10/Times-Italic@0
+SF(name)2.538 E F0 2.538(,t).18 G .038(he second w)-2.538 F .038
+(ord to the second)-.1 F F2(name)2.538 E F0(,).18 E .42
(and so on, with lefto)144 96 R -.15(ve)-.15 G 2.92(rw).15 G .42
(ords and their interv)-3.02 F .42
(ening separators assigned to the last)-.15 F F2(name)2.92 E F0 5.42(.I)
-.18 G 2.92(ft)-5.42 G(here)-2.92 E .54(are fe)144 108 R .54(wer w)-.25 F
-.541(ords read from the input stream than names, the remaining names ar\
-e assigned empty)-.1 F -.25(va)144 120 S 3.357(lues. The).25 F .857
+.18 G 2.92(ft)-5.42 G(here)-2.92 E .541(are fe)144 108 R .541(wer w)-.25
+F .541(ords read from the input stream than names, the remaining names \
+are assigned empty)-.1 F -.25(va)144 120 S 3.357(lues. The).25 F .857
(characters in)3.357 F/F3 9/Times-Bold@0 SF(IFS)3.357 E F0 .857
(are used to split the line into w)3.107 F .857
-(ords using the same rules the shell)-.1 F .753(uses for e)144 132 R
+(ords using the same rules the shell)-.1 F .754(uses for e)144 132 R
.753(xpansion \(described abo)-.15 F 1.053 -.15(ve u)-.15 H(nder).15 E
F1 -.75(Wo)3.253 G .753(rd Splitting).75 F F0 3.253(\). The)B .753
-(backslash character \()3.253 F F1(\\)A F0 3.253(\)m)C .754(ay be)-3.253
-F .076(used to remo)144 144 R .376 -.15(ve a)-.15 H .376 -.15(ny s).15 H
-.075(pecial meaning for the ne).15 F .075
-(xt character read and for line continuation.)-.15 F(Options,)5.075 E
+(backslash character \()3.253 F F1(\\)A F0 3.253(\)m)C .753(ay be)-3.253
+F .075(used to remo)144 144 R .375 -.15(ve a)-.15 H .375 -.15(ny s).15 H
+.075(pecial meaning for the ne).15 F .076
+(xt character read and for line continuation.)-.15 F(Options,)5.076 E
(if supplied, ha)144 156 Q .3 -.15(ve t)-.2 H(he follo).15 E
-(wing meanings:)-.25 E F1<ad61>144 168 Q F2(aname)2.5 E F0 1.049(The w)
+(wing meanings:)-.25 E F1<ad61>144 168 Q F2(aname)2.5 E F0 1.05(The w)
180 180 R 1.049(ords are assigned to sequential indices of the array v)
--.1 F(ariable)-.25 E F2(aname)3.55 E F0 3.55(,s).18 G 1.05
-(tarting at 0.)-3.55 F F2(aname)180.33 192 Q F0(is unset before an)2.68
+-.1 F(ariable)-.25 E F2(aname)3.549 E F0 3.549(,s).18 G 1.049
+(tarting at 0.)-3.549 F F2(aname)180.33 192 Q F0(is unset before an)2.68
E 2.5(yn)-.15 G .5 -.25(ew va)-2.5 H(lues are assigned.).25 E(Other)5 E
F2(name)2.5 E F0(ar)2.5 E(guments are ignored.)-.18 E F1<ad64>144 204 Q
F2(delim)2.5 E F0(The \214rst character of)180 216 Q F2(delim)2.5 E F0
(is used to terminate the input line, rather than ne)2.5 E(wline.)-.25 E
-F1<ad65>144 228 Q F0 .373
+F1<ad65>144 228 Q F0 .372
(If the standard input is coming from a terminal,)25.86 F F1 -.18(re)
-2.873 G(adline).18 E F0(\(see)2.873 E F3(READLINE)2.872 E F0(abo)2.622 E
--.15(ve)-.15 G 2.872(\)i).15 G 2.872(su)-2.872 G(sed)-2.872 E .218
+2.873 G(adline).18 E F0(\(see)2.873 E F3(READLINE)2.873 E F0(abo)2.623 E
+-.15(ve)-.15 G 2.873(\)i).15 G 2.873(su)-2.873 G(sed)-2.873 E .218
(to obtain the line.)180 240 R .218(Readline uses the current \(or def)
5.218 F .218(ault, if line editing w)-.1 F .218(as not pre)-.1 F
(viously)-.25 E(acti)180 252 Q -.15(ve)-.25 G 2.5(\)e).15 G
(diting settings.)-2.5 E F1<ad69>144 264 Q F2(te)2.5 E(xt)-.2 E F0(If)
-10.78 E F1 -.18(re)2.716 G(adline).18 E F0 .216
-(is being used to read the line,)2.716 F F2(te)2.716 E(xt)-.2 E F0 .216
-(is placed into the editing b)2.716 F(uf)-.2 E .215(fer before edit-)
+10.78 E F1 -.18(re)2.715 G(adline).18 E F0 .216
+(is being used to read the line,)2.715 F F2(te)2.716 E(xt)-.2 E F0 .216
+(is placed into the editing b)2.716 F(uf)-.2 E .216(fer before edit-)
-.25 F(ing be)180 276 Q(gins.)-.15 E F1<ad6e>144 288 Q F2(nc)2.5 E(har)
--.15 E(s)-.1 E F1 -.18(re)180 300 S(ad).18 E F0 1.394
-(returns after reading)3.894 F F2(nc)3.894 E(har)-.15 E(s)-.1 E F0 1.395
-(characters rather than w)3.894 F 1.395(aiting for a complete line of)
+-.15 E(s)-.1 E F1 -.18(re)180 300 S(ad).18 E F0 1.395
+(returns after reading)3.895 F F2(nc)3.895 E(har)-.15 E(s)-.1 E F0 1.395
+(characters rather than w)3.895 F 1.394(aiting for a complete line of)
-.1 F(input, b)180 312 Q(ut honor a delimiter if fe)-.2 E(wer than)-.25
E F2(nc)2.5 E(har)-.15 E(s)-.1 E F0
(characters are read before the delimiter)2.5 E(.)-.55 E F1<ad4e>144 324
Q F2(nc)2.5 E(har)-.15 E(s)-.1 E F1 -.18(re)180 336 S(ad).18 E F0 1.269
-(returns after reading e)3.77 F(xactly)-.15 E F2(nc)3.769 E(har)-.15 E
-(s)-.1 E F0 1.269(characters rather than w)3.769 F 1.269
-(aiting for a complete)-.1 F .274
+(returns after reading e)3.769 F(xactly)-.15 E F2(nc)3.769 E(har)-.15 E
+(s)-.1 E F0 1.269(characters rather than w)3.769 F 1.27
+(aiting for a complete)-.1 F .275
(line of input, unless EOF is encountered or)180 348 R F1 -.18(re)2.775
-G(ad).18 E F0 .275(times out.)2.775 F .275(Delimiter characters encoun-)
-5.275 F 1.003
+G(ad).18 E F0 .274(times out.)2.774 F .274(Delimiter characters encoun-)
+5.274 F 1.002
(tered in the input are not treated specially and do not cause)180 360 R
-F1 -.18(re)3.502 G(ad).18 E F0 1.002(to return until)3.502 F F2(nc)3.502
+F1 -.18(re)3.503 G(ad).18 E F0 1.003(to return until)3.503 F F2(nc)3.503
E(har)-.15 E(s)-.1 E F0(characters are read.)180 372 Q F1<ad70>144 384 Q
-F2(pr)2.5 E(ompt)-.45 E F0(Display)180 396 Q F2(pr)3.66 E(ompt)-.45 E F0
-1.161(on standard error)3.66 F 3.661(,w)-.4 G 1.161
+F2(pr)2.5 E(ompt)-.45 E F0(Display)180 396 Q F2(pr)3.661 E(ompt)-.45 E
+F0 1.161(on standard error)3.661 F 3.661(,w)-.4 G 1.161
(ithout a trailing ne)-3.661 F 1.161(wline, before attempting to read)
-.25 F(an)180 408 Q 2.5(yi)-.15 G 2.5(nput. The)-2.5 F
(prompt is displayed only if input is coming from a terminal.)2.5 E F1
-<ad72>144 420 Q F0 .544(Backslash does not act as an escape character)
-25.86 F 5.543(.T)-.55 G .543(he backslash is considered to be part of)
+<ad72>144 420 Q F0 .543(Backslash does not act as an escape character)
+25.86 F 5.543(.T)-.55 G .544(he backslash is considered to be part of)
-5.543 F(the line.)180 432 Q(In particular)5 E 2.5(,ab)-.4 G
(ackslash-ne)-2.5 E(wline pair may not be used as a line continuation.)
-.25 E F1<ad73>144 444 Q F0(Silent mode.)26.41 E
(If input is coming from a terminal, characters are not echoed.)5 E F1
-<ad74>144 456 Q F2(timeout)2.5 E F0(Cause)180 468 Q F1 -.18(re)2.928 G
-(ad).18 E F0 .428(to time out and return f)2.928 F .428
-(ailure if a complete line of input \(or a speci\214ed num-)-.1 F .561
+<ad74>144 456 Q F2(timeout)2.5 E F0(Cause)180 468 Q F1 -.18(re)2.929 G
+(ad).18 E F0 .428(to time out and return f)2.929 F .428
+(ailure if a complete line of input \(or a speci\214ed num-)-.1 F .56
(ber of characters\) is not read within)180 480 R F2(timeout)3.061 E F0
-(seconds.)3.061 E F2(timeout)5.561 E F0 .56(may be a decimal number)
+(seconds.)3.061 E F2(timeout)5.561 E F0 .561(may be a decimal number)
3.061 F(with a fractional portion follo)180 492 Q
(wing the decimal point.)-.25 E(This option is only ef)5 E(fecti)-.25 E
.3 -.15(ve i)-.25 H(f).15 E F1 -.18(re)2.5 G(ad).18 E F0 .506(is readin\
g input from a terminal, pipe, or other special \214le; it has no ef)180
-504 R .505(fect when reading)-.25 F .589(from re)180 516 R .589
-(gular \214les.)-.15 F(If)5.589 E F1 -.18(re)3.089 G(ad).18 E F0 .589
-(times out,)3.089 F F1 -.18(re)3.089 G(ad).18 E F0(sa)3.089 E -.15(ve)
--.2 G 3.089(sa).15 G .889 -.15(ny p)-3.089 H .59
+504 R .506(fect when reading)-.25 F .59(from re)180 516 R .59
+(gular \214les.)-.15 F(If)5.59 E F1 -.18(re)3.09 G(ad).18 E F0 .589
+(times out,)3.09 F F1 -.18(re)3.089 G(ad).18 E F0(sa)3.089 E -.15(ve)-.2
+G 3.089(sa).15 G .889 -.15(ny p)-3.089 H .589
(artial input read into the speci\214ed).15 F -.25(va)180 528 S(riable)
.25 E F2(name)2.77 E F0 5.27(.I)C(f)-5.27 E F2(timeout)2.77 E F0 .27
(is 0,)2.77 F F1 -.18(re)2.77 G(ad).18 E F0 .27(returns immediately)2.77
.25 F 3.62(,n)-.4 G 1.12(on-zero other)-3.62 F(-)-.2 E 2.5(wise. The)180
552 R -.15(ex)2.5 G(it status is greater than 128 if the timeout is e)
.15 E(xceeded.)-.15 E F1<ad75>144 564 Q F2(fd)2.5 E F0
-(Read input from \214le descriptor)14.46 E F2(fd)2.5 E F0(.)A .192
-(If no)144 580.8 R F2(names)3.052 E F0 .192
-(are supplied, the line read is assigned to the v)2.962 F(ariable)-.25 E
-F3(REPL)2.691 E(Y)-.828 E/F4 9/Times-Roman@0 SF(.)A F0 .191
-(The return code is zero,)4.691 F 1.343
-(unless end-of-\214le is encountered,)144 592.8 R F1 -.18(re)3.843 G(ad)
+(Read input from \214le descriptor)14.46 E F2(fd)2.5 E F0(.)A .191
+(If no)144 580.8 R F2(names)3.051 E F0 .191
+(are supplied, the line read is assigned to the v)2.961 F(ariable)-.25 E
+F3(REPL)2.692 E(Y)-.828 E/F4 9/Times-Roman@0 SF(.)A F0 .192
+(The return code is zero,)4.692 F 1.344
+(unless end-of-\214le is encountered,)144 592.8 R F1 -.18(re)3.844 G(ad)
.18 E F0 1.343
-(times out \(in which case the return code is greater than)3.843 F .872
+(times out \(in which case the return code is greater than)3.844 F .871
(128\), a v)144 604.8 R .871
(ariable assignment error \(such as assigning to a readonly v)-.25 F
-.871(ariable\) occurs, or an in)-.25 F -.25(va)-.4 G(lid).25 E
+.872(ariable\) occurs, or an in)-.25 F -.25(va)-.4 G(lid).25 E
(\214le descriptor is supplied as the ar)144 616.8 Q(gument to)-.18 E F1
<ad75>2.5 E F0(.)A F1 -.18(re)108 633.6 S(adonly).18 E F0([)2.5 E F1
(\255aAf)A F0 2.5(][)C F1<ad70>-2.5 E F0 2.5(][)C F2(name)-2.5 E F0([=)A
F2(wor)A(d)-.37 E F0 2.5(].)C(..])-2.5 E .77(The gi)144 645.6 R -.15(ve)
-.25 G(n).15 E F2(names)3.27 E F0 .77(are mark)3.27 F .77
(ed readonly; the v)-.1 F .77(alues of these)-.25 F F2(names)3.63 E F0
-.77(may not be changed by subse-)3.54 F 1.097(quent assignment.)144
-657.6 R 1.097(If the)6.097 F F1<ad66>3.597 E F0 1.097
-(option is supplied, the functions corresponding to the)3.597 F F2
-(names)3.596 E F0 1.096(are so)3.596 F(mark)144 669.6 Q 3.334(ed. The)
+.77(may not be changed by subse-)3.54 F 1.096(quent assignment.)144
+657.6 R 1.096(If the)6.096 F F1<ad66>3.596 E F0 1.097
+(option is supplied, the functions corresponding to the)3.596 F F2
+(names)3.597 E F0 1.097(are so)3.597 F(mark)144 669.6 Q 3.334(ed. The)
-.1 F F1<ad61>3.334 E F0 .834(option restricts the v)3.334 F .834
(ariables to inde)-.25 F -.15(xe)-.15 G 3.334(da).15 G .834(rrays; the)
-3.334 F F1<ad41>3.334 E F0 .834(option restricts the v)3.334 F(ari-)
--.25 E .777(ables to associati)144 681.6 R 1.077 -.15(ve a)-.25 H 3.277
-(rrays. If).15 F .777(both options are supplied,)3.277 F F1<ad41>3.277 E
-F0(tak)3.277 E .776(es precedence.)-.1 F .776(If no)5.776 F F2(name)
-3.636 E F0(ar)3.456 E(gu-)-.18 E .521(ments are gi)144 693.6 R -.15(ve)
+-.25 E .776(ables to associati)144 681.6 R 1.076 -.15(ve a)-.25 H 3.276
+(rrays. If).15 F .777(both options are supplied,)3.276 F F1<ad41>3.277 E
+F0(tak)3.277 E .777(es precedence.)-.1 F .777(If no)5.777 F F2(name)
+3.637 E F0(ar)3.457 E(gu-)-.18 E .522(ments are gi)144 693.6 R -.15(ve)
-.25 G .521(n, or if the).15 F F1<ad70>3.021 E F0 .521
(option is supplied, a list of all readonly names is printed.)3.021 F
-.522(The other)5.521 F .295(options may be used to restrict the output \
-to a subset of the set of readonly names.)144 705.6 R(The)5.295 E F1
-<ad70>2.795 E F0(option)2.795 E .786
+.521(The other)5.521 F .295(options may be used to restrict the output \
+to a subset of the set of readonly names.)144 705.6 R(The)5.296 E F1
+<ad70>2.796 E F0(option)2.796 E .786
(causes output to be displayed in a format that may be reused as input.)
-144 717.6 R .786(If a v)5.786 F .786(ariable name is fol-)-.25 F(lo)144
-729.6 Q .718(wed by =)-.25 F F2(wor)A(d)-.37 E F0 3.218(,t)C .718(he v)
+144 717.6 R .786(If a v)5.786 F .785(ariable name is fol-)-.25 F(lo)144
+729.6 Q .717(wed by =)-.25 F F2(wor)A(d)-.37 E F0 3.218(,t)C .718(he v)
-3.218 F .718(alue of the v)-.25 F .718(ariable is set to)-.25 F F2(wor)
3.218 E(d)-.37 E F0 5.718(.T)C .718(he return status is 0 unless an in)
-5.718 F -.25(va)-.4 G(lid).25 E(GNU Bash-4.2)72 768 Q(2004 Apr 20)
(ariable name, or)-.25 F/F2 10/Times-Bold@0 SF<ad66>2.76 E F0 .26
(is supplied with a)2.76 F F1(name)144.36 96 Q F0
(that is not a function.)2.68 E F2 -.18(re)108 112.8 S(tur).18 E(n)-.15
-E F0([)2.5 E F1(n)A F0(])A .021(Causes a function to stop e)144 124.8 R
--.15(xe)-.15 G .021(cuting and return the v).15 F .021
-(alue speci\214ed by)-.25 F F1(n)2.88 E F0 .02(to its caller)2.76 F 5.02
-(.I)-.55 G(f)-5.02 E F1(n)2.88 E F0 .02(is omitted,)2.76 F .469
+E F0([)2.5 E F1(n)A F0(])A .02(Causes a function to stop e)144 124.8 R
+-.15(xe)-.15 G .02(cuting and return the v).15 F .021
+(alue speci\214ed by)-.25 F F1(n)2.881 E F0 .021(to its caller)2.761 F
+5.021(.I)-.55 G(f)-5.021 E F1(n)2.881 E F0 .021(is omitted,)2.761 F .469
(the return status is that of the last command e)144 136.8 R -.15(xe)
-.15 G .469(cuted in the function body).15 F 5.469(.I)-.65 G(f)-5.469 E
-F2 -.18(re)2.969 G(tur).18 E(n)-.15 E F0 .469(is used out-)2.969 F .467
-(side a function, b)144 148.8 R .467(ut during e)-.2 F -.15(xe)-.15 G
+F2 -.18(re)2.969 G(tur).18 E(n)-.15 E F0 .468(is used out-)2.969 F .466
+(side a function, b)144 148.8 R .466(ut during e)-.2 F -.15(xe)-.15 G
.467(cution of a script by the).15 F F2(.)2.967 E F0(\()5.467 E F2(sour)
-A(ce)-.18 E F0 2.966(\)c)C .466(ommand, it causes the shell to)-2.966 F
-.087(stop e)144 160.8 R -.15(xe)-.15 G .087
+A(ce)-.18 E F0 2.967(\)c)C .467(ommand, it causes the shell to)-2.967 F
+.088(stop e)144 160.8 R -.15(xe)-.15 G .087
(cuting that script and return either).15 F F1(n)2.947 E F0 .087
(or the e)2.827 F .087(xit status of the last command e)-.15 F -.15(xe)
--.15 G .088(cuted within).15 F .613(the script as the e)144 172.8 R .613
+-.15 G .087(cuted within).15 F .613(the script as the e)144 172.8 R .613
(xit status of the script.)-.15 F(If)5.613 E F1(n)3.113 E F0 .613
(is supplied, the return v)3.113 F .613
-(alue is its least signi\214cant 8)-.25 F 2.51(bits. The)144 184.8 R .01
-(return status is non-zero if)2.51 F F2 -.18(re)2.511 G(tur).18 E(n)-.15
-E F0 .011(is supplied a non-numeric ar)2.511 F .011
-(gument, or is used outside)-.18 F 2.91(af)144 196.8 S .41
-(unction and not during e)-2.91 F -.15(xe)-.15 G .41
+(alue is its least signi\214cant 8)-.25 F 2.511(bits. The)144 184.8 R
+.011(return status is non-zero if)2.511 F F2 -.18(re)2.511 G(tur).18 E
+(n)-.15 E F0 .011(is supplied a non-numeric ar)2.511 F .01
+(gument, or is used outside)-.18 F 2.909(af)144 196.8 S .409
+(unction and not during e)-2.909 F -.15(xe)-.15 G .41
(cution of a script by).15 F F2(.)2.91 E F0(or)3.743 E F2(sour)2.91 E
-(ce)-.18 E F0 5.41(.A)C .71 -.15(ny c)-5.41 H .409
+(ce)-.18 E F0 5.41(.A)C .71 -.15(ny c)-5.41 H .41
(ommand associated with the).15 F F2(RETURN)144 208.8 Q F0(trap is e)2.5
E -.15(xe)-.15 G(cuted before e).15 E -.15(xe)-.15 G
(cution resumes after the function or script.).15 E F2(set)108 225.6 Q
F1(option\255name)2.5 E F0 2.5(][)C F1(ar)-2.5 E(g)-.37 E F0(...])2.5 E
F2(set)108 237.6 Q F0([)2.5 E F2(+abefhkmnptuvxBCEHPT)A F0 2.5(][)C F2
(+o)-2.5 E F1(option\255name)2.5 E F0 2.5(][)C F1(ar)-2.5 E(g)-.37 E F0
-(...])2.5 E -.4(Wi)144 249.6 S .835(thout options, the name and v).4 F
-.835(alue of each shell v)-.25 F .836
+(...])2.5 E -.4(Wi)144 249.6 S .836(thout options, the name and v).4 F
+.835(alue of each shell v)-.25 F .835
(ariable are displayed in a format that can be)-.25 F .784
(reused as input for setting or resetting the currently-set v)144 261.6
-R 3.284(ariables. Read-only)-.25 F -.25(va)3.284 G .783
-(riables cannot be).25 F 2.911(reset. In)144 273.6 R F1(posix)2.911 E F0
+R 3.284(ariables. Read-only)-.25 F -.25(va)3.284 G .784
+(riables cannot be).25 F 2.912(reset. In)144 273.6 R F1(posix)2.912 E F0
.412(mode, only shell v)2.912 F .412(ariables are listed.)-.25 F .412
-(The output is sorted according to the current)5.412 F 3.531
-(locale. When)144 285.6 R 1.031(options are speci\214ed, the)3.531 F
-3.531(ys)-.15 G 1.031(et or unset shell attrib)-3.531 F 3.53(utes. An)
--.2 F 3.53(ya)-.15 G -.18(rg)-3.53 G 1.03(uments remaining).18 F 1.623
-(after option processing are treated as v)144 297.6 R 1.624
+(The output is sorted according to the current)5.412 F 3.53
+(locale. When)144 285.6 R 1.031(options are speci\214ed, the)3.53 F
+3.531(ys)-.15 G 1.031(et or unset shell attrib)-3.531 F 3.531(utes. An)
+-.2 F 3.531(ya)-.15 G -.18(rg)-3.531 G 1.031(uments remaining).18 F
+1.624(after option processing are treated as v)144 297.6 R 1.623
(alues for the positional parameters and are assigned, in)-.25 F(order)
144 309.6 Q 2.5(,t)-.4 G(o)-2.5 E F2($1)2.5 E F0(,)A F2($2)2.5 E F0(,)A
F2 2.5(... $)2.5 F F1(n)A F0 5(.O)C(ptions, if speci\214ed, ha)-5 E .3
-.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F2<ad61>144 321.6 Q
-F0 .54(Automatically mark v)29.3 F .539
-(ariables and functions which are modi\214ed or created for e)-.25 F
-.539(xport to)-.15 F(the en)184 333.6 Q
-(vironment of subsequent commands.)-.4 E F2<ad62>144 345.6 Q F0 .131
+F0 .539(Automatically mark v)29.3 F .539
+(ariables and functions which are modi\214ed or created for e)-.25 F .54
+(xport to)-.15 F(the en)184 333.6 Q(vironment of subsequent commands.)
+-.4 E F2<ad62>144 345.6 Q F0 .132
(Report the status of terminated background jobs immediately)28.74 F
-2.632(,r)-.65 G .132(ather than before the ne)-2.632 F(xt)-.15 E
+2.632(,r)-.65 G .131(ather than before the ne)-2.632 F(xt)-.15 E
(primary prompt.)184 357.6 Q(This is ef)5 E(fecti)-.25 E .3 -.15(ve o)
-.25 H(nly when job control is enabled.).15 E F2<ad65>144 369.6 Q F0
-.088(Exit immediately if a)29.86 F F1(pipeline)2.588 E F0 .087
-(\(which may consist of a single)2.588 F F1 .087(simple command)2.587 F
-F0 .087(\), a)B F1(list)2.587 E F0 2.587(,o)C(r)-2.587 E(a)184 381.6 Q
-F1 1.293(compound command)3.793 F F0(\(see)3.793 E/F3 9/Times-Bold@0 SF
-1.293(SHELL GRAMMAR)3.793 F F0(abo)3.544 E -.15(ve)-.15 G 3.794(\), e)
-.15 F 1.294(xits with a non-zero status.)-.15 F .08
+.087(Exit immediately if a)29.86 F F1(pipeline)2.587 E F0 .087
+(\(which may consist of a single)2.587 F F1 .088(simple command)2.588 F
+F0 .088(\), a)B F1(list)2.588 E F0 2.588(,o)C(r)-2.588 E(a)184 381.6 Q
+F1 1.294(compound command)3.794 F F0(\(see)3.794 E/F3 9/Times-Bold@0 SF
+1.294(SHELL GRAMMAR)3.794 F F0(abo)3.544 E -.15(ve)-.15 G 3.793(\), e)
+.15 F 1.293(xits with a non-zero status.)-.15 F .079
(The shell does not e)184 393.6 R .079(xit if the command that f)-.15 F
-.079(ails is part of the command list immediately)-.1 F(follo)184 405.6
-Q 1.654(wing a)-.25 F F2(while)4.154 E F0(or)4.154 E F2(until)4.154 E F0
--.1(ke)4.154 G(yw)-.05 E 1.655(ord, part of the test follo)-.1 F 1.655
-(wing the)-.25 F F2(if)4.155 E F0(or)4.155 E F2(elif)4.155 E F0(reserv)
-4.155 E(ed)-.15 E -.1(wo)184 417.6 S .582(rds, part of an).1 F 3.082(yc)
--.15 G .582(ommand e)-3.082 F -.15(xe)-.15 G .581(cuted in a).15 F F2
-(&&)3.081 E F0(or)3.081 E F2(||)3.081 E F0 .581(list e)3.081 F .581
-(xcept the command follo)-.15 F(wing)-.25 E .917(the \214nal)184 429.6 R
-F2(&&)3.417 E F0(or)3.417 E F2(||)3.417 E F0 3.417(,a)C 1.217 -.15(ny c)
--3.417 H .918(ommand in a pipeline b).15 F .918
-(ut the last, or if the command')-.2 F 3.418(sr)-.55 G(eturn)-3.418 E
--.25(va)184 441.6 S .661(lue is being in).25 F -.15(ve)-.4 G .661
-(rted with).15 F F2(!)3.161 E F0 5.661(.I)C 3.161(fac)-5.661 G .66
-(ompound command other than a subshell returns a)-3.161 F 1.112
+.08(ails is part of the command list immediately)-.1 F(follo)184 405.6 Q
+1.655(wing a)-.25 F F2(while)4.155 E F0(or)4.155 E F2(until)4.155 E F0
+-.1(ke)4.155 G(yw)-.05 E 1.655(ord, part of the test follo)-.1 F 1.654
+(wing the)-.25 F F2(if)4.154 E F0(or)4.154 E F2(elif)4.154 E F0(reserv)
+4.154 E(ed)-.15 E -.1(wo)184 417.6 S .581(rds, part of an).1 F 3.081(yc)
+-.15 G .581(ommand e)-3.081 F -.15(xe)-.15 G .581(cuted in a).15 F F2
+(&&)3.081 E F0(or)3.081 E F2(||)3.081 E F0 .582(list e)3.082 F .582
+(xcept the command follo)-.15 F(wing)-.25 E .918(the \214nal)184 429.6 R
+F2(&&)3.418 E F0(or)3.418 E F2(||)3.418 E F0 3.418(,a)C 1.218 -.15(ny c)
+-3.418 H .918(ommand in a pipeline b).15 F .917
+(ut the last, or if the command')-.2 F 3.417(sr)-.55 G(eturn)-3.417 E
+-.25(va)184 441.6 S .66(lue is being in).25 F -.15(ve)-.4 G .66
+(rted with).15 F F2(!)3.16 E F0 5.661(.I)C 3.161(fac)-5.661 G .661
+(ompound command other than a subshell returns a)-3.161 F 1.113
(non-zero status because a command f)184 453.6 R 1.112(ailed while)-.1 F
-F2<ad65>3.612 E F0 -.1(wa)3.612 G 3.612(sb).1 G 1.113
-(eing ignored, the shell does)-3.612 F .178(not e)184 465.6 R 2.678
-(xit. A)-.15 F .178(trap on)2.678 F F2(ERR)2.678 E F0 2.678(,i)C 2.678
-(fs)-2.678 G .178(et, is e)-2.678 F -.15(xe)-.15 G .178
-(cuted before the shell e).15 F 2.677(xits. This)-.15 F .177
-(option applies to)2.677 F .617(the shell en)184 477.6 R .617
+F2<ad65>3.612 E F0 -.1(wa)3.612 G 3.612(sb).1 G 1.112
+(eing ignored, the shell does)-3.612 F .177(not e)184 465.6 R 2.677
+(xit. A)-.15 F .177(trap on)2.677 F F2(ERR)2.677 E F0 2.677(,i)C 2.678
+(fs)-2.677 G .178(et, is e)-2.678 F -.15(xe)-.15 G .178
+(cuted before the shell e).15 F 2.678(xits. This)-.15 F .178
+(option applies to)2.678 F .618(the shell en)184 477.6 R .617
(vironment and each subshell en)-.4 F .617(vironment separately \(see)
--.4 F F3 .618(COMMAND EXE-)3.118 F .643(CUTION ENVIR)184 489.6 R(ONMENT)
+-.4 F F3 .617(COMMAND EXE-)3.117 F .642(CUTION ENVIR)184 489.6 R(ONMENT)
-.27 E F0(abo)2.893 E -.15(ve)-.15 G .643
(\), and may cause subshells to e).15 F .643(xit before e)-.15 F -.15
-(xe)-.15 G .642(cuting all).15 F(the commands in the subshell.)184 501.6
+(xe)-.15 G .643(cuting all).15 F(the commands in the subshell.)184 501.6
Q 2.042(If a compound command or shell function e)184 519.6 R -.15(xe)
-.15 G 2.042(cutes in a conte).15 F 2.042(xt where)-.15 F F2<ad65>4.542
-E F0 2.043(is being)4.543 F 1.436(ignored, none of the commands e)184
-531.6 R -.15(xe)-.15 G 1.435
-(cuted within the compound command or function).15 F .193
-(body will be af)184 543.6 R .193(fected by the)-.25 F F2<ad65>2.693 E
+E F0 2.042(is being)4.542 F 1.435(ignored, none of the commands e)184
+531.6 R -.15(xe)-.15 G 1.436
+(cuted within the compound command or function).15 F .194
+(body will be af)184 543.6 R .194(fected by the)-.25 F F2<ad65>2.694 E
F0 .193(setting, e)2.693 F -.15(ve)-.25 G 2.693(ni).15 G(f)-2.693 E F2
-<ad65>2.693 E F0 .194(is set and a command returns a f)2.693 F(ailure)
+<ad65>2.693 E F0 .193(is set and a command returns a f)2.693 F(ailure)
-.1 E 3.39(status. If)184 555.6 R 3.39(ac)3.39 G .89
(ompound command or shell function sets)-3.39 F F2<ad65>3.39 E F0 .89
(while e)3.39 F -.15(xe)-.15 G .89(cuting in a conte).15 F(xt)-.15 E
-(where)184 567.6 Q F2<ad65>3.153 E F0 .653
-(is ignored, that setting will not ha)3.153 F .954 -.15(ve a)-.2 H .954
--.15(ny e).15 H -.25(ff).15 G .654(ect until the compound command).25 F
+(where)184 567.6 Q F2<ad65>3.154 E F0 .654
+(is ignored, that setting will not ha)3.154 F .953 -.15(ve a)-.2 H .953
+-.15(ny e).15 H -.25(ff).15 G .653(ect until the compound command).25 F
(or the command containing the function call completes.)184 579.6 Q F2
<ad66>144 591.6 Q F0(Disable pathname e)30.97 E(xpansion.)-.15 E F2
-<ad68>144 603.6 Q F0 2.239(Remember the location of commands as the)
-28.74 F 4.738(ya)-.15 G 2.238(re look)-4.738 F 2.238(ed up for e)-.1 F
--.15(xe)-.15 G 4.738(cution. This).15 F(is)4.738 E(enabled by def)184
-615.6 Q(ault.)-.1 E F2<ad6b>144 627.6 Q F0 .513(All ar)28.74 F .514
+<ad68>144 603.6 Q F0 2.238(Remember the location of commands as the)
+28.74 F 4.738(ya)-.15 G 2.239(re look)-4.738 F 2.239(ed up for e)-.1 F
+-.15(xe)-.15 G 4.739(cution. This).15 F(is)4.739 E(enabled by def)184
+615.6 Q(ault.)-.1 E F2<ad6b>144 627.6 Q F0 .514(All ar)28.74 F .514
(guments in the form of assignment statements are placed in the en)-.18
-F .514(vironment for a)-.4 F
+F .513(vironment for a)-.4 F
(command, not just those that precede the command name.)184 639.6 Q F2
-<ad6d>144 651.6 Q F0 .149(Monitor mode.)25.97 F .149
-(Job control is enabled.)5.149 F .148(This option is on by def)5.149 F
-.148(ault for interacti)-.1 F .448 -.15(ve s)-.25 H(hells).15 E .65
+<ad6d>144 651.6 Q F0 .148(Monitor mode.)25.97 F .148
+(Job control is enabled.)5.148 F .149(This option is on by def)5.148 F
+.149(ault for interacti)-.1 F .449 -.15(ve s)-.25 H(hells).15 E .651
(on systems that support it \(see)184 663.6 R F3 .651(JOB CONTR)3.151 F
-(OL)-.27 E F0(abo)2.901 E -.15(ve)-.15 G 3.151(\). All).15 F .651
-(processes run in a separate)3.151 F .679(process group.)184 675.6 R
-.678(When a background job completes, the shell prints a line containin\
-g its)5.679 F -.15(ex)184 687.6 S(it status.).15 E F2<ad6e>144 699.6 Q
-F0 .652(Read commands b)28.74 F .652(ut do not e)-.2 F -.15(xe)-.15 G
-.652(cute them.).15 F .653(This may be used to check a shell script for)
-5.652 F(syntax errors.)184 711.6 Q(This is ignored by interacti)5 E .3
+(OL)-.27 E F0(abo)2.901 E -.15(ve)-.15 G 3.151(\). All).15 F .65
+(processes run in a separate)3.151 F .678(process group.)184 675.6 R
+.679(When a background job completes, the shell prints a line containin\
+g its)5.678 F -.15(ex)184 687.6 S(it status.).15 E F2<ad6e>144 699.6 Q
+F0 .653(Read commands b)28.74 F .653(ut do not e)-.2 F -.15(xe)-.15 G
+.653(cute them.).15 F .652(This may be used to check a shell script for)
+5.653 F(syntax errors.)184 711.6 Q(This is ignored by interacti)5 E .3
-.15(ve s)-.25 H(hells.).15 E(GNU Bash-4.2)72 768 Q(2004 Apr 20)148.735
E(14)198.725 E 0 Cg EP
%%Page: 15 15
(errtrace)184 204 Q F0(Same as)5.03 E F1<ad45>2.5 E F0(.)A F1(functrace)
184 216 Q F0(Same as)224 228 Q F1<ad54>2.5 E F0(.)A F1(hashall)184 240 Q
F0(Same as)9.43 E F1<ad68>2.5 E F0(.)A F1(histexpand)184 252 Q F0
-(Same as)224 264 Q F1<ad48>2.5 E F0(.)A F1(history)184 276 Q F0 .587
+(Same as)224 264 Q F1<ad48>2.5 E F0(.)A F1(history)184 276 Q F0 .586
(Enable command history)10 F 3.087(,a)-.65 G 3.087(sd)-3.087 G .587
(escribed abo)-3.087 F .887 -.15(ve u)-.15 H(nder).15 E/F3 9
/Times-Bold@0 SF(HIST)3.087 E(OR)-.162 E(Y)-.315 E/F4 9/Times-Roman@0 SF
(.)A F0 .587(This option is)5.087 F(on by def)224 288 Q
(ault in interacti)-.1 E .3 -.15(ve s)-.25 H(hells.).15 E F1(ignor)184
-300 Q(eeof)-.18 E F0 1.656(The ef)224 312 R 1.656
+300 Q(eeof)-.18 E F0 1.657(The ef)224 312 R 1.657
(fect is as if the shell command)-.25 F/F5 10/Courier@0 SF(IGNOREEOF=10)
-4.157 E F0 1.657(had been e)4.157 F -.15(xe)-.15 G(cuted).15 E(\(see)224
+4.156 E F0 1.656(had been e)4.156 F -.15(xe)-.15 G(cuted).15 E(\(see)224
324 Q F1(Shell V)2.5 E(ariables)-.92 E F0(abo)2.5 E -.15(ve)-.15 G(\).)
.15 E F1 -.1(ke)184 336 S(yw).1 E(ord)-.1 E F0(Same as)224 348 Q F1
<ad6b>2.5 E F0(.)A F1(monitor)184 360 Q F0(Same as)5.56 E F1<ad6d>2.5 E
F1<ad62>2.5 E F0(.)A F1(nounset)184 444 Q F0(Same as)6.66 E F1<ad75>2.5
E F0(.)A F1(onecmd)184 456 Q F0(Same as)6.67 E F1<ad74>2.5 E F0(.)A F1
(ph)184 468 Q(ysical)-.15 E F0(Same as)5.14 E F1<ad50>2.5 E F0(.)A F1
-(pipefail)184 480 Q F0 1.03(If set, the return v)7.77 F 1.029
-(alue of a pipeline is the v)-.25 F 1.029
-(alue of the last \(rightmost\) com-)-.25 F 1.136(mand to e)224 492 R
+(pipefail)184 480 Q F0 1.029(If set, the return v)7.77 F 1.029
+(alue of a pipeline is the v)-.25 F 1.03
+(alue of the last \(rightmost\) com-)-.25 F 1.137(mand to e)224 492 R
1.136
(xit with a non-zero status, or zero if all commands in the pipeline)
-.15 F -.15(ex)224 504 S(it successfully).15 E 5(.T)-.65 G
(his option is disabled by def)-5 E(ault.)-.1 E F1(posix)184 516 Q F0
-2.091(Change the beha)17.77 F 2.091(vior of)-.2 F F1(bash)4.591 E F0
+2.09(Change the beha)17.77 F 2.091(vior of)-.2 F F1(bash)4.591 E F0
2.091(where the def)4.591 F 2.091(ault operation dif)-.1 F 2.091
(fers from the)-.25 F 1.212(POSIX standard to match the standard \()224
528 R F2 1.212(posix mode)B F0 3.712(\). See)B F3 1.212(SEE ALSO)3.712 F
-F0(belo)3.463 E(w)-.25 E 2.307
-(for a reference to a document that details ho)224 540 R 4.806(wp)-.25 G
-2.306(osix mode af)-4.806 F 2.306(fects bash')-.25 F(s)-.55 E(beha)224
+F0(belo)3.462 E(w)-.25 E 2.306
+(for a reference to a document that details ho)224 540 R 4.807(wp)-.25 G
+2.307(osix mode af)-4.807 F 2.307(fects bash')-.25 F(s)-.55 E(beha)224
552 Q(vior)-.2 E(.)-.55 E F1(pri)184 564 Q(vileged)-.1 E F0(Same as)224
576 Q F1<ad70>2.5 E F0(.)A F1 -.1(ve)184 588 S(rbose).1 E F0(Same as)
-7.33 E F1<ad76>2.5 E F0(.)A F1(vi)184 600 Q F0 1.465
-(Use a vi-style command line editing interf)32.22 F 3.966(ace. This)-.1
-F 1.466(also af)3.966 F 1.466(fects the editing)-.25 F(interf)224 612 Q
+7.33 E F1<ad76>2.5 E F0(.)A F1(vi)184 600 Q F0 1.466
+(Use a vi-style command line editing interf)32.22 F 3.965(ace. This)-.1
+F 1.465(also af)3.965 F 1.465(fects the editing)-.25 F(interf)224 612 Q
(ace used for)-.1 E F1 -.18(re)2.5 G(ad \255e).18 E F0(.)A F1(xtrace)184
-624 Q F0(Same as)13.35 E F1<ad78>2.5 E F0(.)A(If)184 642 Q F1<ad6f>3.053
-E F0 .553(is supplied with no)3.053 F F2(option\255name)3.053 E F0 3.053
-(,t)C .553(he v)-3.053 F .552(alues of the current options are printed.)
--.25 F(If)5.552 E F1(+o)184 654 Q F0 1.071(is supplied with no)3.571 F
-F2(option\255name)3.571 E F0 3.571(,as)C 1.071(eries of)-3.571 F F1(set)
-3.572 E F0 1.072(commands to recreate the current)3.572 F
+624 Q F0(Same as)13.35 E F1<ad78>2.5 E F0(.)A(If)184 642 Q F1<ad6f>3.052
+E F0 .552(is supplied with no)3.052 F F2(option\255name)3.053 E F0 3.053
+(,t)C .553(he v)-3.053 F .553(alues of the current options are printed.)
+-.25 F(If)5.553 E F1(+o)184 654 Q F0 1.072(is supplied with no)3.572 F
+F2(option\255name)3.572 E F0 3.572(,a)C 1.071(series of)-.001 F F1(set)
+3.571 E F0 1.071(commands to recreate the current)3.571 F
(option settings is displayed on the standard output.)184 666 Q F1<ad70>
-144 678 Q F0 -.45(Tu)28.74 G 1.072(rn on).45 F F2(privile)4.822 E -.1
-(ge)-.4 G(d).1 E F0 3.572(mode. In)4.342 F 1.072(this mode, the)3.572 F
-F3($ENV)3.572 E F0(and)3.322 E F3($B)3.572 E(ASH_ENV)-.27 E F0 1.071
-(\214les are not pro-)3.322 F 1.5
-(cessed, shell functions are not inherited from the en)184 690 R 1.501
-(vironment, and the)-.4 F F3(SHELLOPTS)4.001 E F4(,)A F3 -.27(BA)184 702
-S(SHOPTS).27 E F4(,)A F3(CDP)2.775 E -.855(AT)-.666 G(H).855 E F4(,)A F0
-(and)2.775 E F3(GLOBIGNORE)3.025 E F0 -.25(va)2.775 G .524
-(riables, if the).25 F 3.024(ya)-.15 G .524(ppear in the en)-3.024 F
-(vironment,)-.4 E .379(are ignored.)184 714 R .379
-(If the shell is started with the ef)5.379 F(fecti)-.25 E .679 -.15
-(ve u)-.25 H .38(ser \(group\) id not equal to the real).15 F 2.196
+144 678 Q F0 -.45(Tu)28.74 G 1.071(rn on).45 F F2(privile)4.821 E -.1
+(ge)-.4 G(d).1 E F0 3.572(mode. In)4.341 F 1.072(this mode, the)3.572 F
+F3($ENV)3.572 E F0(and)3.322 E F3($B)3.572 E(ASH_ENV)-.27 E F0 1.072
+(\214les are not pro-)3.322 F 1.501
+(cessed, shell functions are not inherited from the en)184 690 R 1.5
+(vironment, and the)-.4 F F3(SHELLOPTS)4 E F4(,)A F3 -.27(BA)184 702 S
+(SHOPTS).27 E F4(,)A F3(CDP)2.774 E -.855(AT)-.666 G(H).855 E F4(,)A F0
+(and)2.774 E F3(GLOBIGNORE)3.024 E F0 -.25(va)2.774 G .524
+(riables, if the).25 F 3.025(ya)-.15 G .525(ppear in the en)-3.025 F
+(vironment,)-.4 E .38(are ignored.)184 714 R .38
+(If the shell is started with the ef)5.38 F(fecti)-.25 E .679 -.15(ve u)
+-.25 H .379(ser \(group\) id not equal to the real).15 F 2.196
(user \(group\) id, and the)184 726 R F1<ad70>4.696 E F0 2.196
(option is not supplied, these actions are tak)4.696 F 2.196(en and the)
-.1 F(GNU Bash-4.2)72 768 Q(2004 Apr 20)148.735 E(15)198.725 E 0 Cg EP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E(ef)184 84 Q
-(fecti)-.25 E 1.666 -.15(ve u)-.25 H 1.366
+(fecti)-.25 E 1.667 -.15(ve u)-.25 H 1.367
(ser id is set to the real user id.).15 F 1.367(If the)6.367 F/F1 10
-/Times-Bold@0 SF<ad70>3.867 E F0 1.367
-(option is supplied at startup, the)3.867 F(ef)184 96 Q(fecti)-.25 E
-.709 -.15(ve u)-.25 H .409(ser id is not reset.).15 F -.45(Tu)5.409 G
-.409(rning this option of).45 F 2.909(fc)-.25 G .408(auses the ef)-2.909
-F(fecti)-.25 E .708 -.15(ve u)-.25 H .408(ser and group).15 F
+/Times-Bold@0 SF<ad70>3.867 E F0 1.366
+(option is supplied at startup, the)3.866 F(ef)184 96 Q(fecti)-.25 E
+.708 -.15(ve u)-.25 H .408(ser id is not reset.).15 F -.45(Tu)5.409 G
+.409(rning this option of).45 F 2.909(fc)-.25 G .409(auses the ef)-2.909
+F(fecti)-.25 E .709 -.15(ve u)-.25 H .409(ser and group).15 F
(ids to be set to the real user and group ids.)184 108 Q F1<ad74>144 120
Q F0(Exit after reading and e)30.97 E -.15(xe)-.15 G
-(cuting one command.).15 E F1<ad75>144 132 Q F0 -.35(Tr)28.74 G .043
+(cuting one command.).15 E F1<ad75>144 132 Q F0 -.35(Tr)28.74 G .044
(eat unset v).35 F .044(ariables and parameters other than the special \
-parameters "@" and "*" as an)-.25 F .183
-(error when performing parameter e)184 144 R 2.683(xpansion. If)-.15 F
--.15(ex)2.683 G .182(pansion is attempted on an unset v).15 F(ari-)-.25
+parameters "@" and "*" as an)-.25 F .182
+(error when performing parameter e)184 144 R 2.682(xpansion. If)-.15 F
+-.15(ex)2.682 G .183(pansion is attempted on an unset v).15 F(ari-)-.25
E .746(able or parameter)184 156 R 3.246(,t)-.4 G .746
(he shell prints an error message, and, if not interacti)-3.246 F -.15
(ve)-.25 G 3.246(,e).15 G .746(xits with a)-3.396 F(non-zero status.)184
-.15 G(re read.)-2.5 E F1<ad78>144 192 Q F0 .315(After e)29.3 F .315
(xpanding each)-.15 F/F2 10/Times-Italic@0 SF .315(simple command)2.815
F F0(,)A F1 -.25(fo)2.815 G(r).25 E F0(command,)2.815 E F1(case)2.815 E
-F0(command,)2.815 E F1(select)2.815 E F0(command,)2.815 E 1.235
+F0(command,)2.815 E F1(select)2.815 E F0(command,)2.815 E 1.236
(or arithmetic)184 204 R F1 -.25(fo)3.736 G(r).25 E F0 1.236
(command, display the e)3.736 F 1.236(xpanded v)-.15 F 1.236(alue of)
-.25 F/F3 9/Times-Bold@0 SF(PS4)3.736 E/F4 9/Times-Roman@0 SF(,)A F0
(follo)3.486 E 1.236(wed by the com-)-.25 F(mand and its e)184 216 Q
(xpanded ar)-.15 E(guments or associated w)-.18 E(ord list.)-.1 E F1
-<ad42>144 228 Q F0 2.579(The shell performs brace e)27.63 F 2.578
+<ad42>144 228 Q F0 2.578(The shell performs brace e)27.63 F 2.578
(xpansion \(see)-.15 F F1 2.578(Brace Expansion)5.078 F F0(abo)5.078 E
--.15(ve)-.15 G 5.078(\). This).15 F 2.578(is on by)5.078 F(def)184 240 Q
-(ault.)-.1 E F1<ad43>144 252 Q F0 .213(If set,)27.08 F F1(bash)2.713 E
-F0 .213(does not o)2.713 F -.15(ve)-.15 G .214(rwrite an e).15 F .214
+-.15(ve)-.15 G 5.079(\). This).15 F 2.579(is on by)5.079 F(def)184 240 Q
+(ault.)-.1 E F1<ad43>144 252 Q F0 .214(If set,)27.08 F F1(bash)2.714 E
+F0 .214(does not o)2.714 F -.15(ve)-.15 G .214(rwrite an e).15 F .214
(xisting \214le with the)-.15 F F1(>)2.714 E F0(,)A F1(>&)2.714 E F0
-2.714(,a)C(nd)-2.714 E F1(<>)2.714 E F0 .214(redirection opera-)2.714 F
-3.054(tors. This)184 264 R .553(may be o)3.053 F -.15(ve)-.15 G .553
+2.713(,a)C(nd)-2.713 E F1(<>)2.713 E F0 .213(redirection opera-)2.713 F
+3.053(tors. This)184 264 R .553(may be o)3.053 F -.15(ve)-.15 G .553
(rridden when creating output \214les by using the redirection opera-)
.15 F(tor)184 276 Q F1(>|)2.5 E F0(instead of)2.5 E F1(>)2.5 E F0(.)A F1
-<ad45>144 288 Q F0 .103(If set, an)27.63 F 2.603(yt)-.15 G .103(rap on)
--2.603 F F1(ERR)2.603 E F0 .104
-(is inherited by shell functions, command substitutions, and com-)2.603
-F .839(mands e)184 300 R -.15(xe)-.15 G .839(cuted in a subshell en).15
-F 3.339(vironment. The)-.4 F F1(ERR)3.338 E F0 .838
-(trap is normally not inherited in)3.338 F(such cases.)184 312 Q F1
-<ad48>144 324 Q F0(Enable)26.52 E F1(!)3.031 E F0 .531
-(style history substitution.)5.531 F .531(This option is on by def)5.531
-F .532(ault when the shell is inter)-.1 F(-)-.2 E(acti)184 336 Q -.15
-(ve)-.25 G(.).15 E F1<ad50>144 348 Q F0 .96
+<ad45>144 288 Q F0 .104(If set, an)27.63 F 2.604(yt)-.15 G .104(rap on)
+-2.604 F F1(ERR)2.604 E F0 .103
+(is inherited by shell functions, command substitutions, and com-)2.604
+F .838(mands e)184 300 R -.15(xe)-.15 G .838(cuted in a subshell en).15
+F 3.338(vironment. The)-.4 F F1(ERR)3.338 E F0 .839
+(trap is normally not inherited in)3.339 F(such cases.)184 312 Q F1
+<ad48>144 324 Q F0(Enable)26.52 E F1(!)3.032 E F0 .532
+(style history substitution.)5.532 F .531(This option is on by def)5.532
+F .531(ault when the shell is inter)-.1 F(-)-.2 E(acti)184 336 Q -.15
+(ve)-.25 G(.).15 E F1<ad50>144 348 Q F0 .959
(If set, the shell does not resolv)28.19 F 3.459(es)-.15 G .959
-(ymbolic links when e)-3.459 F -.15(xe)-.15 G .959
-(cuting commands such as).15 F F1(cd)3.459 E F0 2.821
+(ymbolic links when e)-3.459 F -.15(xe)-.15 G .96
+(cuting commands such as).15 F F1(cd)3.46 E F0 2.822
(that change the current w)184 360 R 2.822(orking directory)-.1 F 7.822
-(.I)-.65 G 5.322(tu)-7.822 G 2.822(ses the ph)-5.322 F 2.822
-(ysical directory structure)-.05 F 2.686(instead. By)184 372 R(def)2.686
+(.I)-.65 G 5.322(tu)-7.822 G 2.822(ses the ph)-5.322 F 2.821
+(ysical directory structure)-.05 F 2.685(instead. By)184 372 R(def)2.685
E(ault,)-.1 E F1(bash)2.686 E F0(follo)2.686 E .186
(ws the logical chain of directories when performing com-)-.25 F
(mands which change the current directory)184 384 Q(.)-.65 E F1<ad54>144
(cuted in a subshell en).15 F 4.432(vironment. The)-.4 F F1(DEB)4.432 E
(UG)-.1 E F0(and)4.432 E F1(RETURN)184 420 Q F0
(traps are normally not inherited in such cases.)2.5 E F1<adad>144 432 Q
-F0 .4(If no ar)28.6 F .401(guments follo)-.18 F 2.901(wt)-.25 G .401
+F0 .401(If no ar)28.6 F .401(guments follo)-.18 F 2.901(wt)-.25 G .401
(his option, then the positional parameters are unset.)-2.901 F
-(Otherwise,)5.401 E(the positional parameters are set to the)184 444 Q
-F2(ar)2.5 E(g)-.37 E F0(s, e)A -.15(ve)-.25 G 2.5(ni).15 G 2.5(fs)-2.5 G
+(Otherwise,)5.4 E(the positional parameters are set to the)184 444 Q F2
+(ar)2.5 E(g)-.37 E F0(s, e)A -.15(ve)-.25 G 2.5(ni).15 G 2.5(fs)-2.5 G
(ome of them be)-2.5 E(gin with a)-.15 E F1<ad>2.5 E F0(.)A F1<ad>144
-456 Q F0 1.945(Signal the end of options, cause all remaining)34.3 F F2
-(ar)4.444 E(g)-.37 E F0 4.444(st)C 4.444(ob)-4.444 G 4.444(ea)-4.444 G
-1.944(ssigned to the positional)-4.444 F 3.445(parameters. The)184 468 R
-F1<ad78>3.445 E F0(and)3.445 E F1<ad76>3.445 E F0 .945
-(options are turned of)3.445 F 3.445(f. If)-.25 F .946(there are no)
-3.445 F F2(ar)3.446 E(g)-.37 E F0 .946(s, the positional)B
+456 Q F0 1.944(Signal the end of options, cause all remaining)34.3 F F2
+(ar)4.444 E(g)-.37 E F0 4.444(st)C 4.444(ob)-4.444 G 4.445(ea)-4.444 G
+1.945(ssigned to the positional)-4.445 F 3.446(parameters. The)184 468 R
+F1<ad78>3.446 E F0(and)3.446 E F1<ad76>3.446 E F0 .945
+(options are turned of)3.446 F 3.445(f. If)-.25 F .945(there are no)
+3.445 F F2(ar)3.445 E(g)-.37 E F0 .945(s, the positional)B
(parameters remain unchanged.)184 480 Q .425(The options are of)144
496.8 R 2.925(fb)-.25 G 2.925(yd)-2.925 G(ef)-2.925 E .425
(ault unless otherwise noted.)-.1 F .425
-(Using + rather than \255 causes these options)5.425 F .177
-(to be turned of)144 508.8 R 2.677(f. The)-.25 F .178
+(Using + rather than \255 causes these options)5.425 F .178
+(to be turned of)144 508.8 R 2.678(f. The)-.25 F .178
(options can also be speci\214ed as ar)2.678 F .178(guments to an in)
--.18 F -.2(vo)-.4 G .178(cation of the shell.).2 F(The)5.178 E .066
+-.18 F -.2(vo)-.4 G .177(cation of the shell.).2 F(The)5.177 E .066
(current set of options may be found in)144 520.8 R F1<24ad>2.566 E F0
5.066(.T)C .066(he return status is al)-5.066 F -.1(wa)-.1 G .066
-(ys true unless an in).1 F -.25(va)-.4 G .066(lid option).25 F
+(ys true unless an in).1 F -.25(va)-.4 G .067(lid option).25 F
(is encountered.)144 532.8 Q F1(shift)108 549.6 Q F0([)2.5 E F2(n)A F0
-(])A .428(The positional parameters from)144 561.6 R F2(n)2.928 E F0
-.429(+1 ... are renamed to)B F1 .429($1 ....)2.929 F F0 -.15(Pa)5.429 G
-.429(rameters represented by the num-).15 F(bers)144 573.6 Q F1($#)2.583
-E F0(do)2.583 E .083(wn to)-.25 F F1($#)2.583 E F0<ad>A F2(n)A F0 .083
-(+1 are unset.)B F2(n)5.443 E F0 .083(must be a non-ne)2.823 F -.05(ga)
--.15 G(ti).05 E .382 -.15(ve n)-.25 H .082(umber less than or equal to)
-.15 F F1($#)2.582 E F0 5.082(.I)C(f)-5.082 E F2(n)2.942 E F0 .06
+(])A .429(The positional parameters from)144 561.6 R F2(n)2.929 E F0
+.429(+1 ... are renamed to)B F1 .429($1 ....)2.929 F F0 -.15(Pa)5.428 G
+.428(rameters represented by the num-).15 F(bers)144 573.6 Q F1($#)2.582
+E F0(do)2.582 E .082(wn to)-.25 F F1($#)2.582 E F0<ad>A F2(n)A F0 .082
+(+1 are unset.)B F2(n)5.442 E F0 .082(must be a non-ne)2.822 F -.05(ga)
+-.15 G(ti).05 E .383 -.15(ve n)-.25 H .083(umber less than or equal to)
+.15 F F1($#)2.583 E F0 5.083(.I)C(f)-5.083 E F2(n)2.943 E F0 .06
(is 0, no parameters are changed.)144 585.6 R(If)5.06 E F2(n)2.92 E F0
.06(is not gi)2.8 F -.15(ve)-.25 G .06(n, it is assumed to be 1.).15 F
(If)5.06 E F2(n)2.92 E F0 .06(is greater than)2.8 F F1($#)2.56 E F0 2.56
-(,t)C(he)-2.56 E .144(positional parameters are not changed.)144 597.6 R
-.144(The return status is greater than zero if)5.144 F F2(n)3.003 E F0
-.143(is greater than)2.883 F F1($#)2.643 E F0
+(,t)C(he)-2.56 E .143(positional parameters are not changed.)144 597.6 R
+.144(The return status is greater than zero if)5.143 F F2(n)3.004 E F0
+.144(is greater than)2.884 F F1($#)2.644 E F0
(or less than zero; otherwise 0.)144 609.6 Q F1(shopt)108 626.4 Q F0([)
2.5 E F1(\255pqsu)A F0 2.5(][)C F1<ad6f>-2.5 E F0 2.5(][)C F2(optname)
--2.5 E F0(...])2.5 E -.8(To)144 638.4 S .639(ggle the v).8 F .639
+-2.5 E F0(...])2.5 E -.8(To)144 638.4 S .64(ggle the v).8 F .639
(alues of settings controlling optional shell beha)-.25 F(vior)-.2 E
-5.639(.T)-.55 G .64(he settings can be either those)-5.639 F .375
-(listed belo)144 650.4 R 1.675 -.65(w, o)-.25 H 1.175 -.4(r, i).65 H
-2.875(ft).4 G(he)-2.875 E F1<ad6f>2.875 E F0 .375
+5.639(.T)-.55 G .639(he settings can be either those)-5.639 F .374
+(listed belo)144 650.4 R 1.674 -.65(w, o)-.25 H 1.174 -.4(r, i).65 H
+2.874(ft).4 G(he)-2.874 E F1<ad6f>2.874 E F0 .375
(option is used, those a)2.875 F -.25(va)-.2 G .375(ilable with the).25
-F F1<ad6f>2.875 E F0 .374(option to the)2.875 F F1(set)2.874 E F0 -.2
-(bu)2.874 G .374(iltin com-).2 F 3.325(mand. W)144 662.4 R .825
-(ith no options, or with the)-.4 F F1<ad70>3.325 E F0 .826
-(option, a list of all settable options is displayed, with an)3.325 F
+F F1<ad6f>2.875 E F0 .375(option to the)2.875 F F1(set)2.875 E F0 -.2
+(bu)2.875 G .375(iltin com-).2 F 3.326(mand. W)144 662.4 R .826
+(ith no options, or with the)-.4 F F1<ad70>3.326 E F0 .825
+(option, a list of all settable options is displayed, with an)3.326 F
.945(indication of whether or not each is set.)144 674.4 R(The)5.945 E
F1<ad70>3.445 E F0 .945(option causes output to be displayed in a form)
3.445 F(that may be reused as input.)144 686.4 Q(Other options ha)5 E .3
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
/Times-Bold@0 SF<ad71>144 84 Q F0 .003(Suppresses normal output \(quiet\
mode\); the return status indicates whether the)24.74 F/F2 10
-/Times-Italic@0 SF(optname)2.504 E F0(is)2.504 E .256(set or unset.)180
-96 R .256(If multiple)5.256 F F2(optname)2.756 E F0(ar)2.756 E .256
+/Times-Italic@0 SF(optname)2.503 E F0(is)2.503 E .255(set or unset.)180
+96 R .255(If multiple)5.255 F F2(optname)2.755 E F0(ar)2.755 E .256
(guments are gi)-.18 F -.15(ve)-.25 G 2.756(nw).15 G(ith)-2.756 E F1
-<ad71>2.756 E F0 2.755(,t)C .255(he return status is zero if)-2.755 F
+<ad71>2.756 E F0 2.756(,t)C .256(he return status is zero if)-2.756 F
(all)180 108 Q F2(optnames)2.5 E F0(are enabled; non-zero otherwise.)2.5
E F1<ad6f>144 120 Q F0(Restricts the v)25.3 E(alues of)-.25 E F2
(optname)2.5 E F0(to be those de\214ned for the)2.5 E F1<ad6f>2.5 E F0
-(option to the)2.5 E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .624
-(If either)144 136.8 R F1<ad73>3.124 E F0(or)3.124 E F1<ad75>3.124 E F0
+(option to the)2.5 E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .625
+(If either)144 136.8 R F1<ad73>3.125 E F0(or)3.124 E F1<ad75>3.124 E F0
.624(is used with no)3.124 F F2(optname)3.124 E F0(ar)3.124 E(guments,)
-.18 E F1(shopt)3.124 E F0(sho)3.124 E .624
-(ws only those options which are)-.25 F 2.234(set or unset, respecti)144
+(ws only those options which are)-.25 F 2.233(set or unset, respecti)144
148.8 R -.15(ve)-.25 G(ly).15 E 7.234(.U)-.65 G 2.234
(nless otherwise noted, the)-7.234 F F1(shopt)4.734 E F0 2.234
(options are disabled \(unset\) by)4.734 F(def)144 160.8 Q(ault.)-.1 E
1.544(The return status when listing options is zero if all)144 177.6 R
-F2(optnames)4.044 E F0 1.545(are enabled, non-zero otherwise.)4.045 F
+F2(optnames)4.044 E F0 1.544(are enabled, non-zero otherwise.)4.044 F
.696
(When setting or unsetting options, the return status is zero unless an)
-144 189.6 R F2(optname)3.196 E F0 .696(is not a v)3.196 F .695
+144 189.6 R F2(optname)3.196 E F0 .696(is not a v)3.196 F .696
(alid shell)-.25 F(option.)144 201.6 Q(The list of)144 218.4 Q F1(shopt)
-2.5 E F0(options is:)2.5 E F1(autocd)144 236.4 Q F0 .199
+2.5 E F0(options is:)2.5 E F1(autocd)144 236.4 Q F0 .2
(If set, a command name that is the name of a directory is e)11.11 F
--.15(xe)-.15 G .2(cuted as if it were the ar).15 F(gu-)-.18 E
+-.15(xe)-.15 G .199(cuted as if it were the ar).15 F(gu-)-.18 E
(ment to the)184 248.4 Q F1(cd)2.5 E F0 2.5(command. This)2.5 F
(option is only used by interacti)2.5 E .3 -.15(ve s)-.25 H(hells.).15 E
-F1(cdable_v)144 260.4 Q(ars)-.1 E F0 .156(If set, an ar)184 272.4 R .156
-(gument to the)-.18 F F1(cd)2.656 E F0 -.2(bu)2.656 G .155
+F1(cdable_v)144 260.4 Q(ars)-.1 E F0 .155(If set, an ar)184 272.4 R .155
+(gument to the)-.18 F F1(cd)2.655 E F0 -.2(bu)2.655 G .156
(iltin command that is not a directory is assumed to be the).2 F
(name of a v)184 284.4 Q(ariable whose v)-.25 E
(alue is the directory to change to.)-.25 E F1(cdspell)144 296.4 Q F0
1.055
(If set, minor errors in the spelling of a directory component in a)
-10.55 F F1(cd)3.555 E F0 1.055(command will be)3.555 F 3.988
-(corrected. The)184 308.4 R 1.488(errors check)3.988 F 1.487
-(ed for are transposed characters, a missing character)-.1 F 3.987(,a)
--.4 G(nd)-3.987 E .77(one character too man)184 320.4 R 4.57 -.65(y. I)
+10.55 F F1(cd)3.555 E F0 1.055(command will be)3.555 F 3.987
+(corrected. The)184 308.4 R 1.487(errors check)3.987 F 1.487
+(ed for are transposed characters, a missing character)-.1 F 3.988(,a)
+-.4 G(nd)-3.988 E .77(one character too man)184 320.4 R 4.57 -.65(y. I)
-.15 H 3.27(fac).65 G .77
(orrection is found, the corrected \214lename is printed, and)-3.27 F
(the command proceeds.)184 332.4 Q
(This option is only used by interacti)5 E .3 -.15(ve s)-.25 H(hells.)
-.15 E F1(checkhash)144 344.4 Q F0 2.08(If set,)184 356.4 R F1(bash)4.58
-E F0 2.079(checks that a command found in the hash table e)4.58 F 2.079
-(xists before trying to)-.15 F -.15(exe)184 368.4 S(cute it.).15 E
+.15 E F1(checkhash)144 344.4 Q F0 2.079(If set,)184 356.4 R F1(bash)
+4.579 E F0 2.079(checks that a command found in the hash table e)4.579 F
+2.08(xists before trying to)-.15 F -.15(exe)184 368.4 S(cute it.).15 E
(If a hashed command no longer e)5 E
(xists, a normal path search is performed.)-.15 E F1(checkjobs)144 380.4
-Q F0 .448(If set,)184 392.4 R F1(bash)2.948 E F0 .448
-(lists the status of an)2.948 F 2.949(ys)-.15 G .449
-(topped and running jobs before e)-2.949 F .449(xiting an interacti)-.15
-F -.15(ve)-.25 G 3.439(shell. If)184 404.4 R(an)3.439 E 3.439(yj)-.15 G
-.938(obs are running, this causes the e)-3.439 F .938
-(xit to be deferred until a second e)-.15 F .938(xit is)-.15 F 2.203
+Q F0 .449(If set,)184 392.4 R F1(bash)2.949 E F0 .449
+(lists the status of an)2.949 F 2.949(ys)-.15 G .448
+(topped and running jobs before e)-2.949 F .448(xiting an interacti)-.15
+F -.15(ve)-.25 G 3.438(shell. If)184 404.4 R(an)3.438 E 3.438(yj)-.15 G
+.938(obs are running, this causes the e)-3.438 F .938
+(xit to be deferred until a second e)-.15 F .939(xit is)-.15 F 2.203
(attempted without an interv)184 416.4 R 2.203(ening command \(see)-.15
F/F3 9/Times-Bold@0 SF 2.203(JOB CONTR)4.703 F(OL)-.27 E F0(abo)4.453 E
--.15(ve)-.15 G 4.703(\). The).15 F(shell)4.704 E(al)184 428.4 Q -.1(wa)
+-.15(ve)-.15 G 4.703(\). The).15 F(shell)4.703 E(al)184 428.4 Q -.1(wa)
-.1 G(ys postpones e).1 E(xiting if an)-.15 E 2.5(yj)-.15 G
-(obs are stopped.)-2.5 E F1(checkwinsize)144 440.4 Q F0 .797(If set,)184
-452.4 R F1(bash)3.297 E F0 .797(checks the windo)3.297 F 3.297(ws)-.25 G
-.796(ize after each command and, if necessary)-3.297 F 3.296(,u)-.65 G
-.796(pdates the)-3.296 F -.25(va)184 464.4 S(lues of).25 E F3(LINES)2.5
+(obs are stopped.)-2.5 E F1(checkwinsize)144 440.4 Q F0 .796(If set,)184
+452.4 R F1(bash)3.296 E F0 .796(checks the windo)3.296 F 3.296(ws)-.25 G
+.797(ize after each command and, if necessary)-3.296 F 3.297(,u)-.65 G
+.797(pdates the)-3.297 F -.25(va)184 464.4 S(lues of).25 E F3(LINES)2.5
E F0(and)2.25 E F3(COLUMNS)2.5 E/F4 9/Times-Roman@0 SF(.)A F1(cmdhist)
144 476.4 Q F0 1.202(If set,)6.11 F F1(bash)3.702 E F0 1.202
(attempts to sa)3.702 F 1.502 -.15(ve a)-.2 H 1.202
(ll lines of a multiple-line command in the same history).15 F(entry)184
488.4 Q 5(.T)-.65 G(his allo)-5 E
(ws easy re-editing of multi-line commands.)-.25 E F1(compat31)144 500.4
-Q F0 .42(If set,)184 512.4 R F1(bash)2.92 E F0 .42(changes its beha)2.92
-F .419(vior to that of v)-.2 F .419
-(ersion 3.1 with respect to quoted ar)-.15 F(guments)-.18 E .461(to the)
-184 524.4 R F1([[)2.961 E F0 .462(conditional command')2.962 F(s)-.55 E
+Q F0 .419(If set,)184 512.4 R F1(bash)2.919 E F0 .419(changes its beha)
+2.919 F .419(vior to that of v)-.2 F .42
+(ersion 3.1 with respect to quoted ar)-.15 F(guments)-.18 E .462(to the)
+184 524.4 R F1([[)2.962 E F0 .462(conditional command')2.962 F(s)-.55 E
F1(=~)2.962 E F0 .462
(operator and locale-speci\214c string comparison when)2.962 F .71
(using the)184 536.4 R F1([[)3.21 E F0 .71(conditional command')3.21 F
(s)-.55 E F1(<)3.21 E F0(and)3.21 E F1(>)3.21 E F0 3.21(operators. Bash)
-3.21 F -.15(ve)3.21 G .71(rsions prior to bash-4.1).15 F .82
+3.21 F -.15(ve)3.21 G .71(rsions prior to bash-4.1).15 F .821
(use ASCII collation and)184 548.4 R F2(str)3.321 E(cmp)-.37 E F0 .821
-(\(3\); bash-4.1 and later use the current locale').19 F 3.321(sc)-.55 G
-(ollation)-3.321 E(sequence and)184 560.4 Q F2(str)2.5 E(coll)-.37 E F0
-(\(3\).).51 E F1(compat32)144 572.4 Q F0 1.41(If set,)184 584.4 R F1
-(bash)3.91 E F0 1.41(changes its beha)3.91 F 1.409(vior to that of v)-.2
-F 1.409(ersion 3.2 with respect to locale-speci\214c)-.15 F .422
+(\(3\); bash-4.1 and later use the current locale').19 F 3.32(sc)-.55 G
+(ollation)-3.32 E(sequence and)184 560.4 Q F2(str)2.5 E(coll)-.37 E F0
+(\(3\).).51 E F1(compat32)144 572.4 Q F0 1.409(If set,)184 584.4 R F1
+(bash)3.909 E F0 1.409(changes its beha)3.909 F 1.409(vior to that of v)
+-.2 F 1.41(ersion 3.2 with respect to locale-speci\214c)-.15 F .423
(string comparison when using the)184 596.4 R F1([[)2.922 E F0 .422
(conditional command')2.922 F(s)-.55 E F1(<)2.922 E F0(and)2.922 E F1(>)
-2.923 E F0 .423(operators \(see pre-)2.923 F(vious item\).)184 608.4 Q
-F1(compat40)144 620.4 Q F0 1.41(If set,)184 632.4 R F1(bash)3.91 E F0
-1.41(changes its beha)3.91 F 1.409(vior to that of v)-.2 F 1.409
-(ersion 4.0 with respect to locale-speci\214c)-.15 F 2.007
-(string comparison when using the)184 644.4 R F1([[)4.507 E F0 2.008
-(conditional command')4.507 F(s)-.55 E F1(<)4.508 E F0(and)4.508 E F1(>)
-4.508 E F0 2.008(operators \(see)4.508 F .77(description of)184 656.4 R
-F1(compat31)3.27 E F0 3.269(\)a)C .769(nd the ef)-3.269 F .769
-(fect of interrupting a command list.)-.25 F .769(Bash v)5.769 F
-(ersions)-.15 E .086
-(4.0 and later interrupt the list as if the shell recei)184 668.4 R -.15
-(ve)-.25 G 2.587(dt).15 G .087(he interrupt; pre)-2.587 F .087(vious v)
--.25 F .087(ersions con-)-.15 F(tinue with the ne)184 680.4 Q
-(xt command in the list.)-.15 E F1(compat41)144 692.4 Q F0 1.484
-(If set,)184 704.4 R F1(bash)3.984 E F0 3.984(,w)C 1.484(hen in)-3.984 F
-F2(posix)3.984 E F0 1.483
-(mode, treats a single quote in a double-quoted parameter)3.984 F -.15
-(ex)184 716.4 S .958(pansion as a special character).15 F 5.958(.T)-.55
-G .959(he single quotes must match \(an e)-5.958 F -.15(ve)-.25 G 3.459
-(nn).15 G .959(umber\) and)-3.459 F .59
+2.922 E F0 .422(operators \(see pre-)2.922 F(vious item\).)184 608.4 Q
+F1(compat40)144 620.4 Q F0 1.409(If set,)184 632.4 R F1(bash)3.909 E F0
+1.409(changes its beha)3.909 F 1.409(vior to that of v)-.2 F 1.41
+(ersion 4.0 with respect to locale-speci\214c)-.15 F 2.008
+(string comparison when using the)184 644.4 R F1([[)4.508 E F0 2.007
+(conditional command')4.508 F(s)-.55 E F1(<)4.507 E F0(and)4.507 E F1(>)
+4.507 E F0 2.007(operators \(see)4.507 F .769(description of)184 656.4 R
+F1(compat31)3.269 E F0 3.269(\)a)C .769(nd the ef)-3.269 F .769
+(fect of interrupting a command list.)-.25 F .77(Bash v)5.77 F(ersions)
+-.15 E .087(4.0 and later interrupt the list as if the shell recei)184
+668.4 R -.15(ve)-.25 G 2.586(dt).15 G .086(he interrupt; pre)-2.586 F
+.086(vious v)-.25 F .086(ersions con-)-.15 F(tinue with the ne)184 680.4
+Q(xt command in the list.)-.15 E F1(compat41)144 692.4 Q F0 1.483
+(If set,)184 704.4 R F1(bash)3.983 E F0 3.983(,w)C 1.483(hen in)-3.983 F
+F2(posix)3.983 E F0 1.484
+(mode, treats a single quote in a double-quoted parameter)3.983 F -.15
+(ex)184 716.4 S .959(pansion as a special character).15 F 5.959(.T)-.55
+G .958(he single quotes must match \(an e)-5.959 F -.15(ve)-.25 G 3.458
+(nn).15 G .958(umber\) and)-3.458 F .59
(the characters between the single quotes are considered quoted.)184
728.4 R .59(This is the beha)5.59 F .59(vior of)-.2 F(GNU Bash-4.2)72
768 Q(2004 Apr 20)148.735 E(17)198.725 E 0 Cg EP
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
-(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E .589
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E .59
(posix mode through v)184 84 R .589(ersion 4.1.)-.15 F .589(The def)
-5.589 F .589(ault bash beha)-.1 F .589(vior remains as in pre)-.2 F .59
+5.589 F .589(ault bash beha)-.1 F .589(vior remains as in pre)-.2 F .589
(vious v)-.25 F(er)-.15 E(-)-.2 E(sions.)184 96 Q/F1 10/Times-Bold@0 SF
-(compat42)144 108 Q F0 1.797(If set,)184 120 R F1(bash)4.297 E F0 1.796
+(compat42)144 108 Q F0 1.796(If set,)184 120 R F1(bash)4.296 E F0 1.796
(does not process the replacement string in the pattern substitution w)
4.296 F(ord)-.1 E -.15(ex)184 132 S(pansion using quote remo).15 E -.25
-(va)-.15 G(l.).25 E F1(complete_fullquote)144 144 Q F0 .653(If set,)184
+(va)-.15 G(l.).25 E F1(complete_fullquote)144 144 Q F0 .654(If set,)184
156 R F1(bash)3.153 E F0 .653(quotes all shell metacharacters in \214le\
-names and directory names when per)3.153 F(-)-.2 E 1.525
-(forming completion.)184 168 R 1.524(If not set,)6.525 F F1(bash)4.024 E
+names and directory names when per)3.153 F(-)-.2 E 1.524
+(forming completion.)184 168 R 1.524(If not set,)6.524 F F1(bash)4.024 E
F0(remo)4.024 E -.15(ve)-.15 G 4.024(sm).15 G 1.524
(etacharacters such as the dollar sign)-4.024 F 2.667(from the set of c\
haracters that will be quoted in completed \214lenames when these)184
-180 R .029(metacharacters appear in shell v)184 192 R .028
-(ariable references in w)-.25 F .028(ords to be completed.)-.1 F .028
-(This means)5.028 F 1.072(that dollar signs in v)184 204 R 1.073
+180 R .028(metacharacters appear in shell v)184 192 R .028
+(ariable references in w)-.25 F .029(ords to be completed.)-.1 F .029
+(This means)5.029 F 1.073(that dollar signs in v)184 204 R 1.073
(ariable names that e)-.25 F 1.073
(xpand to directories will not be quoted; ho)-.15 F(w-)-.25 E -2.15 -.25
-(ev e)184 216 T 1.923 -.4(r, a).25 H 1.423 -.15(ny d).4 H 1.123
+(ev e)184 216 T 1.922 -.4(r, a).25 H 1.422 -.15(ny d).4 H 1.123
(ollar signs appearing in \214lenames will not be quoted, either).15 F
-6.123(.T)-.55 G 1.122(his is acti)-6.123 F -.15(ve)-.25 G .59
+6.123(.T)-.55 G 1.123(his is acti)-6.123 F -.15(ve)-.25 G .59
(only when bash is using backslashes to quote completed \214lenames.)184
228 R .59(This v)5.59 F .59(ariable is set)-.25 F(by def)184 240 Q
(ault, which is the def)-.1 E(ault bash beha)-.1 E(vior in v)-.2 E
-(ersions through 4.2.)-.15 E F1(dir)144 252 Q(expand)-.18 E F0 .487
-(If set,)184 264 R F1(bash)2.987 E F0 .486
+(ersions through 4.2.)-.15 E F1(dir)144 252 Q(expand)-.18 E F0 .486
+(If set,)184 264 R F1(bash)2.986 E F0 .486
(replaces directory names with the results of w)2.986 F .486(ord e)-.1 F
-.486(xpansion when perform-)-.15 F .179(ing \214lename completion.)184
-276 R .179(This changes the contents of the readline editing b)5.179 F
-(uf)-.2 E(fer)-.25 E 5.18(.I)-.55 G 2.68(fn)-5.18 G(ot)-2.68 E(set,)184
-288 Q F1(bash)2.5 E F0(attempts to preserv)2.5 E 2.5(ew)-.15 G
-(hat the user typed.)-2.5 E F1(dirspell)144 300 Q F0 .859(If set,)7.77 F
-F1(bash)3.359 E F0 .858
-(attempts spelling correction on directory names during w)3.359 F .858
+.487(xpansion when perform-)-.15 F .18(ing \214lename completion.)184
+276 R .179(This changes the contents of the readline editing b)5.18 F
+(uf)-.2 E(fer)-.25 E 5.179(.I)-.55 G 2.679(fn)-5.179 G(ot)-2.679 E(set,)
+184 288 Q F1(bash)2.5 E F0(attempts to preserv)2.5 E 2.5(ew)-.15 G
+(hat the user typed.)-2.5 E F1(dirspell)144 300 Q F0 .858(If set,)7.77 F
+F1(bash)3.358 E F0 .858
+(attempts spelling correction on directory names during w)3.358 F .859
(ord completion if)-.1 F
(the directory name initially supplied does not e)184 312 Q(xist.)-.15 E
F1(dotglob)144 324 Q F0 .165(If set,)7.77 F F1(bash)2.665 E F0 .165
(includes \214lenames be)2.665 F .165(ginning with a `.)-.15 F 2.665('i)
-.7 G 2.665(nt)-2.665 G .165(he results of pathname e)-2.665 F
-(xpansion.)-.15 E F1(execfail)144 336 Q F0 1.387
-(If set, a non-interacti)7.79 F 1.687 -.15(ve s)-.25 H 1.386
+(xpansion.)-.15 E F1(execfail)144 336 Q F0 1.386
+(If set, a non-interacti)7.79 F 1.686 -.15(ve s)-.25 H 1.386
(hell will not e).15 F 1.386(xit if it cannot e)-.15 F -.15(xe)-.15 G
-1.386(cute the \214le speci\214ed as an).15 F(ar)184 348 Q
+1.387(cute the \214le speci\214ed as an).15 F(ar)184 348 Q
(gument to the)-.18 E F1(exec)2.5 E F0 -.2(bu)2.5 G(iltin command.).2 E
(An interacti)5 E .3 -.15(ve s)-.25 H(hell does not e).15 E(xit if)-.15
E F1(exec)2.5 E F0 -.1(fa)2.5 G(ils.).1 E F1(expand_aliases)144 360 Q F0
-.716(If set, aliases are e)184 372 R .717(xpanded as described abo)-.15
+.717(If set, aliases are e)184 372 R .717(xpanded as described abo)-.15
F 1.017 -.15(ve u)-.15 H(nder).15 E/F2 9/Times-Bold@0 SF(ALIASES)3.217 E
-/F3 9/Times-Roman@0 SF(.)A F0 .717(This option is enabled)5.217 F
+/F3 9/Times-Roman@0 SF(.)A F0 .716(This option is enabled)5.217 F
(by def)184 384 Q(ault for interacti)-.1 E .3 -.15(ve s)-.25 H(hells.)
.15 E F1(extdeb)144 396 Q(ug)-.2 E F0(If set, beha)184 408 Q
(vior intended for use by deb)-.2 E(uggers is enabled:)-.2 E F1(1.)184
-420 Q F0(The)28.5 E F1<ad46>4.251 E F0 1.751(option to the)4.251 F F1
+420 Q F0(The)28.5 E F1<ad46>4.25 E F0 1.75(option to the)4.25 F F1
(declar)4.251 E(e)-.18 E F0 -.2(bu)4.251 G 1.751
(iltin displays the source \214le name and line).2 F
(number corresponding to each function name supplied as an ar)220 432 Q
(gument.)-.18 E F1(2.)184 444 Q F0 1.667(If the command run by the)28.5
F F1(DEB)4.167 E(UG)-.1 E F0 1.667(trap returns a non-zero v)4.167 F
1.667(alue, the ne)-.25 F(xt)-.15 E(command is skipped and not e)220 456
-Q -.15(xe)-.15 G(cuted.).15 E F1(3.)184 468 Q F0 .841
-(If the command run by the)28.5 F F1(DEB)3.341 E(UG)-.1 E F0 .841
-(trap returns a v)3.341 F .84(alue of 2, and the shell is)-.25 F -.15
+Q -.15(xe)-.15 G(cuted.).15 E F1(3.)184 468 Q F0 .84
+(If the command run by the)28.5 F F1(DEB)3.34 E(UG)-.1 E F0 .841
+(trap returns a v)3.341 F .841(alue of 2, and the shell is)-.25 F -.15
(exe)220 480 S .488
(cuting in a subroutine \(a shell function or a shell script e).15 F
-.15(xe)-.15 G .488(cuted by the).15 F F1(.)2.988 E F0(or)2.988 E F1
(sour)220 492 Q(ce)-.18 E F0 -.2(bu)2.5 G(iltins\), a call to).2 E F1
-.18(re)2.5 G(tur).18 E(n)-.15 E F0(is simulated.)2.5 E F1(4.)184 504 Q
-F2 -.27(BA)28.5 G(SH_ARGC).27 E F0(and)3.154 E F2 -.27(BA)3.404 G
+F2 -.27(BA)28.5 G(SH_ARGC).27 E F0(and)3.153 E F2 -.27(BA)3.403 G
(SH_ARGV).27 E F0 .904(are updated as described in their descriptions)
3.154 F(abo)220 516 Q -.15(ve)-.15 G(.).15 E F1(5.)184 528 Q F0 1.359
(Function tracing is enabled:)28.5 F 1.359
540 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F1(\()2.5 E/F4 10
/Times-Italic@0 SF(command)2.5 E F1(\))2.5 E F0(inherit the)2.5 E F1
(DEB)2.5 E(UG)-.1 E F0(and)2.5 E F1(RETURN)2.5 E F0(traps.)2.5 E F1(6.)
-184 552 Q F0 .805(Error tracing is enabled:)28.5 F .804
-(command substitution, shell functions, and subshells)5.805 F(in)220 564
+184 552 Q F0 .804(Error tracing is enabled:)28.5 F .805
+(command substitution, shell functions, and subshells)5.804 F(in)220 564
Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F1(\()2.5 E F4
(command)2.5 E F1(\))2.5 E F0(inherit the)2.5 E F1(ERR)2.5 E F0(trap.)
2.5 E F1(extglob)144 576 Q F0 .4(If set, the e)8.89 F .4
-4.973 F F1(${)4.973 E F4(par)A(ameter)-.15 E F1(})A F0 -.15(ex)4.973 G
(pansions).15 E(enclosed in double quotes.)184 624 Q
(This option is enabled by def)5 E(ault.)-.1 E F1(failglob)144 636 Q F0
-1.424(If set, patterns which f)7.77 F 1.425
-(ail to match \214lenames during pathname e)-.1 F 1.425
+1.425(If set, patterns which f)7.77 F 1.425
+(ail to match \214lenames during pathname e)-.1 F 1.424
(xpansion result in an)-.15 F -.15(ex)184 648 S(pansion error).15 E(.)
-.55 E F1 -.25(fo)144 660 S -.18(rc).25 G(e_\214gnor).18 E(e)-.18 E F0
-.937(If set, the suf)184 672 R<8c78>-.25 E .936(es speci\214ed by the)
+.936(If set, the suf)184 672 R<8c78>-.25 E .936(es speci\214ed by the)
-.15 F F2(FIGNORE)3.436 E F0 .936(shell v)3.186 F .936(ariable cause w)
--.25 F .936(ords to be ignored)-.1 F .32(when performing w)184 684 R .32
+-.25 F .937(ords to be ignored)-.1 F .32(when performing w)184 684 R .32
(ord completion e)-.1 F -.15(ve)-.25 G 2.82(ni).15 G 2.82(ft)-2.82 G .32
-(he ignored w)-2.82 F .32(ords are the only possible com-)-.1 F 2.948
-(pletions. See)184 696 R F2 .448(SHELL V)2.948 F(ARIABLES)-1.215 E F0
-(abo)2.698 E .748 -.15(ve f)-.15 H .448(or a description of).15 F F2
-(FIGNORE)2.947 E F3(.)A F0 .447(This option is)4.947 F(enabled by def)
+(he ignored w)-2.82 F .32(ords are the only possible com-)-.1 F 2.947
+(pletions. See)184 696 R F2 .447(SHELL V)2.947 F(ARIABLES)-1.215 E F0
+(abo)2.697 E .747 -.15(ve f)-.15 H .448(or a description of).15 F F2
+(FIGNORE)2.948 E F3(.)A F0 .448(This option is)4.948 F(enabled by def)
184 708 Q(ault.)-.1 E(GNU Bash-4.2)72 768 Q(2004 Apr 20)148.735 E(18)
198.725 E 0 Cg EP
%%Page: 19 19
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
-/Times-Bold@0 SF(globasciiranges)144 84 Q F0 2.518(If set, range e)184
-96 R 2.519(xpressions used in pattern matching brack)-.15 F 2.519(et e)
--.1 F 2.519(xpressions \(see)-.15 F/F2 9/Times-Bold@0 SF -.09(Pa)5.019 G
-(tter).09 E(n)-.135 E(Matching)184 108 Q F0(abo)2.965 E -.15(ve)-.15 G
-3.215(\)b).15 G(eha)-3.215 E 1.015 -.15(ve a)-.2 H 3.214(si).15 G 3.214
+/Times-Bold@0 SF(globasciiranges)144 84 Q F0 2.519(If set, range e)184
+96 R 2.519(xpressions used in pattern matching brack)-.15 F 2.518(et e)
+-.1 F 2.518(xpressions \(see)-.15 F/F2 9/Times-Bold@0 SF -.09(Pa)5.018 G
+(tter).09 E(n)-.135 E(Matching)184 108 Q F0(abo)2.964 E -.15(ve)-.15 G
+3.214(\)b).15 G(eha)-3.214 E 1.014 -.15(ve a)-.2 H 3.214(si).15 G 3.214
(fi)-3.214 G 3.214(nt)-3.214 G .714
(he traditional C locale when performing comparisons.)-3.214 F 1.02
(That is, the current locale')184 120 R 3.52(sc)-.55 G 1.02
(ollating sequence is not tak)-3.52 F 1.02(en into account, so)-.1 F F1
-(b)3.52 E F0 1.02(will not)3.52 F .957(collate between)184 132 R F1(A)
-3.457 E F0(and)3.457 E F1(B)3.457 E F0 3.457(,a)C .957(nd upper)-3.457 F
-.957(-case and lo)-.2 F(wer)-.25 E .956
+(b)3.52 E F0 1.02(will not)3.52 F .956(collate between)184 132 R F1(A)
+3.456 E F0(and)3.456 E F1(B)3.456 E F0 3.457(,a)C .957(nd upper)-3.457 F
+.957(-case and lo)-.2 F(wer)-.25 E .957
(-case ASCII characters will collate)-.2 F(together)184 144 Q(.)-.55 E
-F1(globstar)144 156 Q F0 .518(If set, the pattern)5 F F1(**)3.018 E F0
-.519(used in a pathname e)3.019 F .519(xpansion conte)-.15 F .519
-(xt will match all \214les and zero)-.15 F .432
+F1(globstar)144 156 Q F0 .519(If set, the pattern)5 F F1(**)3.019 E F0
+.519(used in a pathname e)3.019 F .519(xpansion conte)-.15 F .518
+(xt will match all \214les and zero)-.15 F .431
(or more directories and subdirectories.)184 168 R .431
-(If the pattern is follo)5.432 F .431(wed by a)-.25 F F1(/)2.931 E F0
-2.931(,o)C .431(nly directories)-2.931 F(and subdirectories match.)184
+(If the pattern is follo)5.431 F .432(wed by a)-.25 F F1(/)2.932 E F0
+2.932(,o)C .432(nly directories)-2.932 F(and subdirectories match.)184
180 Q F1(gnu_errfmt)144 192 Q F0(If set, shell error messages are writt\
en in the standard GNU error message format.)184 204 Q F1(histappend)144
216 Q F0 .676
(If set, the history list is appended to the \214le named by the v)184
-228 R .676(alue of the)-.25 F F2(HISTFILE)3.177 E F0 -.25(va)2.927 G
+228 R .676(alue of the)-.25 F F2(HISTFILE)3.176 E F0 -.25(va)2.926 G
(ri-).25 E(able when the shell e)184 240 Q(xits, rather than o)-.15 E
-.15(ve)-.15 G(rwriting the \214le.).15 E F1(histr)144 252 Q(eedit)-.18
-E F0 .576(If set, and)184 264 R F1 -.18(re)3.076 G(adline).18 E F0 .575
-(is being used, a user is gi)3.076 F -.15(ve)-.25 G 3.075(nt).15 G .575
-(he opportunity to re-edit a f)-3.075 F .575(ailed his-)-.1 F
-(tory substitution.)184 276 Q F1(histv)144 288 Q(erify)-.1 E F0 .402
+E F0 .575(If set, and)184 264 R F1 -.18(re)3.075 G(adline).18 E F0 .575
+(is being used, a user is gi)3.075 F -.15(ve)-.25 G 3.075(nt).15 G .576
+(he opportunity to re-edit a f)-3.075 F .576(ailed his-)-.1 F
+(tory substitution.)184 276 Q F1(histv)144 288 Q(erify)-.1 E F0 .403
(If set, and)184 300 R F1 -.18(re)2.903 G(adline).18 E F0 .403
(is being used, the results of history substitution are not immediately)
-2.903 F .662(passed to the shell parser)184 312 R 5.662(.I)-.55 G .661
-(nstead, the resulting line is loaded into the)-5.662 F F1 -.18(re)3.161
-G(adline).18 E F0(editing)3.161 E -.2(bu)184 324 S -.25(ff).2 G(er).25 E
+2.903 F .661(passed to the shell parser)184 312 R 5.661(.I)-.55 G .662
+(nstead, the resulting line is loaded into the)-5.661 F F1 -.18(re)3.162
+G(adline).18 E F0(editing)3.162 E -.2(bu)184 324 S -.25(ff).2 G(er).25 E
2.5(,a)-.4 G(llo)-2.5 E(wing further modi\214cation.)-.25 E F1
-(hostcomplete)144 336 Q F0 1.181(If set, and)184 348 R F1 -.18(re)3.681
-G(adline).18 E F0 1.181(is being used,)3.681 F F1(bash)3.682 E F0 1.182
-(will attempt to perform hostname completion)3.682 F 1.381(when a w)184
-360 R 1.381(ord containing a)-.1 F F1(@)3.881 E F0 1.381
-(is being completed \(see)3.881 F F1(Completing)3.88 E F0(under)3.88 E
-F2(READLINE)3.88 E F0(abo)184 372 Q -.15(ve)-.15 G 2.5(\). This).15 F
+(hostcomplete)144 336 Q F0 1.182(If set, and)184 348 R F1 -.18(re)3.682
+G(adline).18 E F0 1.182(is being used,)3.682 F F1(bash)3.682 E F0 1.181
+(will attempt to perform hostname completion)3.681 F 1.38(when a w)184
+360 R 1.38(ord containing a)-.1 F F1(@)3.881 E F0 1.381
+(is being completed \(see)3.881 F F1(Completing)3.881 E F0(under)3.881 E
+F2(READLINE)3.881 E F0(abo)184 372 Q -.15(ve)-.15 G 2.5(\). This).15 F
(is enabled by def)2.5 E(ault.)-.1 E F1(huponexit)144 384 Q F0(If set,)
184 396 Q F1(bash)2.5 E F0(will send)2.5 E F2(SIGHUP)2.5 E F0
(to all jobs when an interacti)2.25 E .3 -.15(ve l)-.25 H(ogin shell e)
(ord and all remaining characters on)-.1 F .967
(that line to be ignored in an interacti)184 432 R 1.267 -.15(ve s)-.25
H .967(hell \(see).15 F F2(COMMENTS)3.467 E F0(abo)3.217 E -.15(ve)-.15
-G 3.467(\). This).15 F .967(option is)3.467 F(enabled by def)184 444 Q
-(ault.)-.1 E F1(lastpipe)144 456 Q F0 1.211
+G 3.467(\). This).15 F .968(option is)3.468 F(enabled by def)184 444 Q
+(ault.)-.1 E F1(lastpipe)144 456 Q F0 1.212
(If set, and job control is not acti)6.66 F -.15(ve)-.25 G 3.712(,t).15
G 1.212(he shell runs the last command of a pipeline not)-3.712 F -.15
(exe)184 468 S(cuted in the background in the current shell en).15 E
-(vironment.)-.4 E F1(lithist)144 480 Q F0 .655(If set, and the)15.55 F
-F1(cmdhist)3.155 E F0 .654
+(vironment.)-.4 E F1(lithist)144 480 Q F0 .654(If set, and the)15.55 F
+F1(cmdhist)3.154 E F0 .654
(option is enabled, multi-line commands are sa)3.154 F -.15(ve)-.2 G
-3.154(dt).15 G 3.154(ot)-3.154 G .654(he history)-3.154 F
+3.155(dt).15 G 3.155(ot)-3.155 G .655(he history)-3.155 F
(with embedded ne)184 492 Q
(wlines rather than using semicolon separators where possible.)-.25 E F1
(login_shell)144 504 Q F0 .486
(The shell sets this option if it is started as a login shell \(see)184
-516 R F2(INV)2.987 E(OCA)-.405 E(TION)-.855 E F0(abo)2.737 E -.15(ve)
--.15 G 2.987(\). The).15 F -.25(va)184 528 S(lue may not be changed.).25
-E F1(mailwar)144 540 Q(n)-.15 E F0 .815(If set, and a \214le that)184
-552 R F1(bash)3.315 E F0 .814
-(is checking for mail has been accessed since the last time it)3.315 F
+516 R F2(INV)2.986 E(OCA)-.405 E(TION)-.855 E F0(abo)2.736 E -.15(ve)
+-.15 G 2.986(\). The).15 F -.25(va)184 528 S(lue may not be changed.).25
+E F1(mailwar)144 540 Q(n)-.15 E F0 .814(If set, and a \214le that)184
+552 R F1(bash)3.314 E F0 .815
+(is checking for mail has been accessed since the last time it)3.314 F
-.1(wa)184 564 S 2.5(sc).1 G(heck)-2.5 E(ed, the message `)-.1 E
(`The mail in)-.74 E/F3 10/Times-Italic@0 SF(mail\214le)2.5 E F0
(has been read')2.5 E 2.5('i)-.74 G 2.5(sd)-2.5 G(isplayed.)-2.5 E F1
-(no_empty_cmd_completion)144 576 Q F0 .324(If set, and)184 588 R F1 -.18
-(re)2.824 G(adline).18 E F0 .324(is being used,)2.824 F F1(bash)2.824 E
-F0 .324(will not attempt to search the)2.824 F F2 -.666(PA)2.825 G(TH)
--.189 E F0 .325(for possible)2.575 F
+(no_empty_cmd_completion)144 576 Q F0 .325(If set, and)184 588 R F1 -.18
+(re)2.825 G(adline).18 E F0 .325(is being used,)2.825 F F1(bash)2.824 E
+F0 .324(will not attempt to search the)2.824 F F2 -.666(PA)2.824 G(TH)
+-.189 E F0 .324(for possible)2.574 F
(completions when completion is attempted on an empty line.)184 600 Q F1
-(nocaseglob)144 612 Q F0 .437(If set,)184 624 R F1(bash)2.937 E F0 .436
-(matches \214lenames in a case\255insensiti)2.937 F .736 -.15(ve f)-.25
-H .436(ashion when performing pathname).05 F -.15(ex)184 636 S
+(nocaseglob)144 612 Q F0 .436(If set,)184 624 R F1(bash)2.936 E F0 .436
+(matches \214lenames in a case\255insensiti)2.936 F .737 -.15(ve f)-.25
+H .437(ashion when performing pathname).05 F -.15(ex)184 636 S
(pansion \(see).15 E F1 -.1(Pa)2.5 G(thname Expansion).1 E F0(abo)2.5 E
--.15(ve)-.15 G(\).).15 E F1(nocasematch)144 648 Q F0 1.193(If set,)184
-660 R F1(bash)3.693 E F0 1.194(matches patterns in a case\255insensiti)
-3.693 F 1.494 -.15(ve f)-.25 H 1.194(ashion when performing matching).05
+-.15(ve)-.15 G(\).).15 E F1(nocasematch)144 648 Q F0 1.194(If set,)184
+660 R F1(bash)3.694 E F0 1.194(matches patterns in a case\255insensiti)
+3.694 F 1.493 -.15(ve f)-.25 H 1.193(ashion when performing matching).05
F(while e)184 672 Q -.15(xe)-.15 G(cuting).15 E F1(case)2.5 E F0(or)2.5
E F1([[)2.5 E F0(conditional commands.)2.5 E F1(nullglob)144 684 Q F0
-.855(If set,)184 696 R F1(bash)3.355 E F0(allo)3.355 E .855
-(ws patterns which match no \214les \(see)-.25 F F1 -.1(Pa)3.354 G .854
-(thname Expansion).1 F F0(abo)3.354 E -.15(ve)-.15 G 3.354(\)t).15 G(o)
--3.354 E -.15(ex)184 708 S(pand to a null string, rather than themselv)
+.854(If set,)184 696 R F1(bash)3.354 E F0(allo)3.354 E .855
+(ws patterns which match no \214les \(see)-.25 F F1 -.1(Pa)3.355 G .855
+(thname Expansion).1 F F0(abo)3.355 E -.15(ve)-.15 G 3.355(\)t).15 G(o)
+-3.355 E -.15(ex)184 708 S(pand to a null string, rather than themselv)
.15 E(es.)-.15 E(GNU Bash-4.2)72 768 Q(2004 Apr 20)148.735 E(19)198.725
E 0 Cg EP
%%Page: 20 20
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
-/Times-Bold@0 SF(pr)144 84 Q(ogcomp)-.18 E F0 .676
+/Times-Bold@0 SF(pr)144 84 Q(ogcomp)-.18 E F0 .677
(If set, the programmable completion f)184 96 R .677(acilities \(see)-.1
-F F1(Pr)3.177 E .677(ogrammable Completion)-.18 F F0(abo)3.177 E -.15
+F F1(Pr)3.176 E .676(ogrammable Completion)-.18 F F0(abo)3.176 E -.15
(ve)-.15 G(\)).15 E(are enabled.)184 108 Q
(This option is enabled by def)5 E(ault.)-.1 E F1(pr)144 120 Q(omptv)
--.18 E(ars)-.1 E F0 1.448(If set, prompt strings under)184 132 R 1.448
-(go parameter e)-.18 F 1.447(xpansion, command substitution, arithmetic)
--.15 F -.15(ex)184 144 S .17(pansion, and quote remo).15 F -.25(va)-.15
+-.18 E(ars)-.1 E F0 1.447(If set, prompt strings under)184 132 R 1.448
+(go parameter e)-.18 F 1.448(xpansion, command substitution, arithmetic)
+-.15 F -.15(ex)184 144 S .171(pansion, and quote remo).15 F -.25(va)-.15
G 2.67(la).25 G .17(fter being e)-2.67 F .17(xpanded as described in)
--.15 F/F2 9/Times-Bold@0 SF(PR)2.671 E(OMPTING)-.27 E F0(abo)2.421 E
--.15(ve)-.15 G(.).15 E(This option is enabled by def)184 156 Q(ault.)-.1
-E F1 -.18(re)144 168 S(stricted_shell).18 E F0 1.069
+-.15 F/F2 9/Times-Bold@0 SF(PR)2.67 E(OMPTING)-.27 E F0(abo)2.42 E -.15
+(ve)-.15 G(.).15 E(This option is enabled by def)184 156 Q(ault.)-.1 E
+F1 -.18(re)144 168 S(stricted_shell).18 E F0 1.069
(The shell sets this option if it is started in restricted mode \(see)
184 180 R F2 1.069(RESTRICTED SHELL)3.569 F F0(belo)184 192 Q 4.178
(w\). The)-.25 F -.25(va)4.178 G 1.678(lue may not be changed.).25 F
1.678(This is not reset when the startup \214les are)6.678 F -.15(exe)
184 204 S(cuted, allo).15 E(wing the startup \214les to disco)-.25 E
-.15(ve)-.15 G 2.5(rw).15 G(hether or not a shell is restricted.)-2.5 E
-F1(shift_v)144 216 Q(erbose)-.1 E F0 .502(If set, the)184 228 R F1
-(shift)3.002 E F0 -.2(bu)3.002 G .501
-(iltin prints an error message when the shift count e).2 F .501
+F1(shift_v)144 216 Q(erbose)-.1 E F0 .501(If set, the)184 228 R F1
+(shift)3.001 E F0 -.2(bu)3.001 G .501
+(iltin prints an error message when the shift count e).2 F .502
(xceeds the number)-.15 F(of positional parameters.)184 240 Q F1(sour)
-144 252 Q(cepath)-.18 E F0 .77(If set, the)184 264 R F1(sour)3.27 E(ce)
--.18 E F0(\()3.27 E F1(.)A F0 3.27(\)b)C .77(uiltin uses the v)-3.47 F
-.771(alue of)-.25 F F2 -.666(PA)3.271 G(TH)-.189 E F0 .771
-(to \214nd the directory containing the)3.021 F
-(\214le supplied as an ar)184 276 Q 2.5(gument. This)-.18 F
-(option is enabled by def)2.5 E(ault.)-.1 E F1(xpg_echo)144 288 Q F0
-(If set, the)184 300 Q F1(echo)2.5 E F0 -.2(bu)2.5 G(iltin e).2 E
-(xpands backslash-escape sequences by def)-.15 E(ault.)-.1 E F1(suspend)
-108 316.8 Q F0([)2.5 E F1<ad66>A F0(])A 1.002(Suspend the e)144 328.8 R
--.15(xe)-.15 G 1.002(cution of this shell until it recei).15 F -.15(ve)
--.25 G 3.501(sa).15 G F2(SIGCONT)A F0 3.501(signal. A)3.251 F 1.001
-(login shell cannot be)3.501 F .022(suspended; the)144 340.8 R F1<ad66>
-2.522 E F0 .022(option can be used to o)2.522 F -.15(ve)-.15 G .022
-(rride this and force the suspension.).15 F .023(The return status is)
-5.023 F 2.5(0u)144 352.8 S(nless the shell is a login shell and)-2.5 E
+144 252 Q(cepath)-.18 E F0 .771(If set, the)184 264 R F1(sour)3.271 E
+(ce)-.18 E F0(\()3.271 E F1(.)A F0 3.271(\)b)C .771(uiltin uses the v)
+-3.471 F .771(alue of)-.25 F F2 -.666(PA)3.27 G(TH)-.189 E F0 .77
+(to \214nd the directory containing the)3.02 F(\214le supplied as an ar)
+184 276 Q 2.5(gument. This)-.18 F(option is enabled by def)2.5 E(ault.)
+-.1 E F1(xpg_echo)144 288 Q F0(If set, the)184 300 Q F1(echo)2.5 E F0
+-.2(bu)2.5 G(iltin e).2 E(xpands backslash-escape sequences by def)-.15
+E(ault.)-.1 E F1(suspend)108 316.8 Q F0([)2.5 E F1<ad66>A F0(])A 1.001
+(Suspend the e)144 328.8 R -.15(xe)-.15 G 1.001
+(cution of this shell until it recei).15 F -.15(ve)-.25 G 3.501(sa).15 G
+F2(SIGCONT)A F0 3.502(signal. A)3.252 F 1.002(login shell cannot be)
+3.502 F .023(suspended; the)144 340.8 R F1<ad66>2.523 E F0 .023
+(option can be used to o)2.523 F -.15(ve)-.15 G .022
+(rride this and force the suspension.).15 F .022(The return status is)
+5.022 F 2.5(0u)144 352.8 S(nless the shell is a login shell and)-2.5 E
F1<ad66>2.5 E F0(is not supplied, or if job control is not enabled.)2.5
E F1(test)108 369.6 Q/F3 10/Times-Italic@0 SF -.2(ex)2.5 G(pr).2 E F1([)
-108 381.6 Q F3 -.2(ex)2.5 G(pr).2 E F1(])2.5 E F0 .878
-(Return a status of 0 \(true\) or 1 \(f)6.77 F .877
-(alse\) depending on the e)-.1 F -.25(va)-.25 G .877
+108 381.6 Q F3 -.2(ex)2.5 G(pr).2 E F1(])2.5 E F0 .877
+(Return a status of 0 \(true\) or 1 \(f)6.77 F .878
+(alse\) depending on the e)-.1 F -.25(va)-.25 G .878
(luation of the conditional e).25 F(xpression)-.15 E F3 -.2(ex)144 393.6
S(pr).2 E F0 5.53(.E).73 G .53
(ach operator and operand must be a separate ar)-5.53 F 3.03
-(gument. Expressions)-.18 F .53(are composed of the)3.03 F 3.08
-(primaries described abo)144 405.6 R 3.38 -.15(ve u)-.15 H(nder).15 E F2
-(CONDITION)5.58 E 3.079(AL EXPRESSIONS)-.18 F/F4 9/Times-Roman@0 SF(.)A
-F1(test)7.579 E F0 3.079(does not accept an)5.579 F(y)-.15 E
+(gument. Expressions)-.18 F .53(are composed of the)3.03 F 3.079
+(primaries described abo)144 405.6 R 3.379 -.15(ve u)-.15 H(nder).15 E
+F2(CONDITION)5.579 E 3.079(AL EXPRESSIONS)-.18 F/F4 9/Times-Roman@0 SF
+(.)A F1(test)7.579 E F0 3.08(does not accept an)5.58 F(y)-.15 E
(options, nor does it accept and ignore an ar)144 417.6 Q(gument of)-.18
-E F1<adad>2.5 E F0(as signifying the end of options.)2.5 E .785
-(Expressions may be combined using the follo)144 435.6 R .786
-(wing operators, listed in decreasing order of prece-)-.25 F 3.412
-(dence. The)144 447.6 R -.25(eva)3.412 G .912
-(luation depends on the number of ar).25 F .911(guments; see belo)-.18 F
-4.711 -.65(w. O)-.25 H .911(perator precedence is).65 F
+E F1<adad>2.5 E F0(as signifying the end of options.)2.5 E .786
+(Expressions may be combined using the follo)144 435.6 R .785
+(wing operators, listed in decreasing order of prece-)-.25 F 3.411
+(dence. The)144 447.6 R -.25(eva)3.411 G .911
+(luation depends on the number of ar).25 F .912(guments; see belo)-.18 F
+4.712 -.65(w. O)-.25 H .912(perator precedence is).65 F
(used when there are \214v)144 459.6 Q 2.5(eo)-.15 G 2.5(rm)-2.5 G
(ore ar)-2.5 E(guments.)-.18 E F1(!)144 471.6 Q F3 -.2(ex)2.5 G(pr).2 E
F0 -.35(Tr)12.6 G(ue if).35 E F3 -.2(ex)2.5 G(pr).2 E F0(is f)3.23 E
E 2.5(2a)144 626.4 S -.18(rg)-2.5 G(uments).18 E .37(If the \214rst ar)
180 638.4 R .37(gument is)-.18 F F1(!)2.87 E F0 2.87(,t)C .37(he e)-2.87
F .37(xpression is true if and only if the second ar)-.15 F .37
-(gument is null.)-.18 F .379(If the \214rst ar)180 650.4 R .38
-(gument is one of the unary conditional operators listed abo)-.18 F .68
--.15(ve u)-.15 H(nder).15 E F2(CONDI-)2.88 E(TION)180 662.4 Q .553
+(gument is null.)-.18 F .38(If the \214rst ar)180 650.4 R .38
+(gument is one of the unary conditional operators listed abo)-.18 F .679
+-.15(ve u)-.15 H(nder).15 E F2(CONDI-)2.879 E(TION)180 662.4 Q .552
(AL EXPRESSIONS)-.18 F F4(,)A F0 .552(the e)2.802 F .552
(xpression is true if the unary test is true.)-.15 F .552
(If the \214rst ar)5.552 F(gu-)-.18 E(ment is not a v)180 674.4 Q
(If the second ar)5.236 F .236(gument is one of)-.18 F .855
(the binary conditional operators listed abo)180 710.4 R 1.155 -.15
(ve u)-.15 H(nder).15 E F2(CONDITION)3.355 E .855(AL EXPRESSIONS)-.18 F
-F4(,)A F0(the)3.104 E .578(result of the e)180 722.4 R .578(xpression i\
+F4(,)A F0(the)3.105 E .579(result of the e)180 722.4 R .578(xpression i\
s the result of the binary test using the \214rst and third ar)-.15 F
(guments)-.18 E(GNU Bash-4.2)72 768 Q(2004 Apr 20)148.735 E(20)198.725 E
0 Cg EP
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
-(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E 1.333
-(as operands.)180 84 R(The)6.333 E/F1 10/Times-Bold@0 SF<ad61>3.833 E F0
-(and)3.833 E F1<ad6f>3.832 E F0 1.332
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E 1.332
+(as operands.)180 84 R(The)6.332 E/F1 10/Times-Bold@0 SF<ad61>3.832 E F0
+(and)3.832 E F1<ad6f>3.832 E F0 1.333
(operators are considered binary operators when there are)3.832 F .558
(three ar)180 96 R 3.058(guments. If)-.18 F .558(the \214rst ar)3.058 F
.558(gument is)-.18 F F1(!)3.058 E F0 3.058(,t)C .558(he v)-3.058 F .558
(alue is the ne)-.25 F -.05(ga)-.15 G .558(tion of the tw).05 F(o-ar)-.1
-E(gument)-.18 E .521(test using the second and third ar)180 108 R 3.021
-(guments. If)-.18 F .521(the \214rst ar)3.021 F .52(gument is e)-.18 F
-(xactly)-.15 E F1(\()3.02 E F0 .52(and the third)3.02 F(ar)180 120 Q
+E(gument)-.18 E .52(test using the second and third ar)180 108 R 3.021
+(guments. If)-.18 F .521(the \214rst ar)3.021 F .521(gument is e)-.18 F
+(xactly)-.15 E F1(\()3.021 E F0 .521(and the third)3.021 F(ar)180 120 Q
.485(gument is e)-.18 F(xactly)-.15 E F1(\))2.985 E F0 2.985(,t)C .485
(he result is the one-ar)-2.985 F .485(gument test of the second ar)-.18
F 2.985(gument. Other)-.18 F(-)-.2 E(wise, the e)180 132 Q
(xpression is f)-.15 E(alse.)-.1 E 2.5(4a)144 144 S -.18(rg)-2.5 G
-(uments).18 E .385(If the \214rst ar)180 156 R .385(gument is)-.18 F F1
-(!)2.885 E F0 2.885(,t)C .385(he result is the ne)-2.885 F -.05(ga)-.15
-G .384(tion of the three-ar).05 F .384(gument e)-.18 F .384
-(xpression com-)-.15 F 1.647(posed of the remaining ar)180 168 R 4.147
-(guments. Otherwise,)-.18 F 1.647(the e)4.147 F 1.648
+(uments).18 E .384(If the \214rst ar)180 156 R .384(gument is)-.18 F F1
+(!)2.884 E F0 2.885(,t)C .385(he result is the ne)-2.885 F -.05(ga)-.15
+G .385(tion of the three-ar).05 F .385(gument e)-.18 F .385
+(xpression com-)-.15 F 1.648(posed of the remaining ar)180 168 R 4.147
+(guments. Otherwise,)-.18 F 1.647(the e)4.147 F 1.647
(xpression is parsed and e)-.15 F -.25(va)-.25 G(luated).25 E
(according to precedence using the rules listed abo)180 180 Q -.15(ve)
-.15 G(.).15 E 2.5(5o)144 192 S 2.5(rm)-2.5 G(ore ar)-2.5 E(guments)-.18
processes run from the shell.)13.23 F(The return status is 0.)144 262.8
Q F1(trap)108 279.6 Q F0([)2.5 E F1(\255lp)A F0 2.5(][)C([)-2.5 E/F2 10
/Times-Italic@0 SF(ar)A(g)-.37 E F0(])A F2(sigspec)2.5 E F0(...])2.5 E
-.703(The command)144 291.6 R F2(ar)3.533 E(g)-.37 E F0 .703
-(is to be read and e)3.423 F -.15(xe)-.15 G .702
-(cuted when the shell recei).15 F -.15(ve)-.25 G 3.202(ss).15 G
-(ignal\(s\))-3.202 E F2(sigspec)3.202 E F0 5.702(.I).31 G(f)-5.702 E F2
-(ar)3.532 E(g)-.37 E F0(is)3.422 E .608(absent \(and there is a single)
+.702(The command)144 291.6 R F2(ar)3.532 E(g)-.37 E F0 .702
+(is to be read and e)3.422 F -.15(xe)-.15 G .702
+(cuted when the shell recei).15 F -.15(ve)-.25 G 3.203(ss).15 G
+(ignal\(s\))-3.203 E F2(sigspec)3.203 E F0 5.703(.I).31 G(f)-5.703 E F2
+(ar)3.533 E(g)-.37 E F0(is)3.423 E .609(absent \(and there is a single)
144 303.6 R F2(sigspec)3.108 E F0 3.108(\)o)C(r)-3.108 E F1<ad>3.108 E
F0 3.108(,e)C .608
(ach speci\214ed signal is reset to its original disposition)-3.108 F
-.659(\(the v)144 315.6 R .659(alue it had upon entrance to the shell\).)
--.25 F(If)5.658 E F2(ar)3.488 E(g)-.37 E F0 .658
+.658(\(the v)144 315.6 R .658(alue it had upon entrance to the shell\).)
+-.25 F(If)5.658 E F2(ar)3.488 E(g)-.37 E F0 .659
(is the null string the signal speci\214ed by each)3.378 F F2(sigspec)
-144.34 327.6 Q F0 .58(is ignored by the shell and by the commands it in)
-3.39 F -.2(vo)-.4 G -.1(ke).2 G 3.081(s. If).1 F F2(ar)3.411 E(g)-.37 E
-F0 .581(is not present and)3.301 F F1<ad70>3.081 E F0(has)3.081 E 1.215
+144.34 327.6 Q F0 .581
+(is ignored by the shell and by the commands it in)3.391 F -.2(vo)-.4 G
+-.1(ke).2 G 3.08(s. If).1 F F2(ar)3.41 E(g)-.37 E F0 .58
+(is not present and)3.3 F F1<ad70>3.08 E F0(has)3.08 E 1.214
(been supplied, then the trap commands associated with each)144 339.6 R
-F2(sigspec)4.054 E F0 1.214(are displayed.)4.024 F 1.214(If no ar)6.214
+F2(sigspec)4.054 E F0 1.215(are displayed.)4.024 F 1.215(If no ar)6.215
F(gu-)-.18 E .86(ments are supplied or if only)144 351.6 R F1<ad70>3.36
E F0 .86(is gi)3.36 F -.15(ve)-.25 G(n,).15 E F1(trap)3.36 E F0 .86
(prints the list of commands associated with each)3.36 F 2.83
(signal. The)144 363.6 R F1<ad6c>2.83 E F0 .33(option causes the shell \
-to print a list of signal names and their corresponding num-)2.83 F 4.31
-(bers. Each)144 375.6 R F2(sigspec)4.65 E F0 1.811
-(is either a signal name de\214ned in <)4.62 F F2(signal.h)A F0 1.811
-(>, or a signal number)B 6.811(.S)-.55 G(ignal)-6.811 E
+to print a list of signal names and their corresponding num-)2.83 F
+4.311(bers. Each)144 375.6 R F2(sigspec)4.651 E F0 1.811
+(is either a signal name de\214ned in <)4.621 F F2(signal.h)A F0 1.81
+(>, or a signal number)B 6.81(.S)-.55 G(ignal)-6.81 E
(names are case insensiti)144 387.6 Q .3 -.15(ve a)-.25 H(nd the).15 E
-/F3 9/Times-Bold@0 SF(SIG)2.5 E F0(pre\214x is optional.)2.25 E 1.649
-(If a)144 405.6 R F2(sigspec)4.489 E F0(is)4.459 E F3(EXIT)4.149 E F0
-1.649(\(0\) the command)3.899 F F2(ar)4.479 E(g)-.37 E F0 1.649(is e)
-4.369 F -.15(xe)-.15 G 1.649(cuted on e).15 F 1.648(xit from the shell.)
--.15 F 1.648(If a)6.648 F F2(sigspec)4.488 E F0(is)4.458 E F3(DEB)144
-417.6 Q(UG)-.09 E/F4 9/Times-Roman@0 SF(,)A F0 1.167(the command)3.417 F
-F2(ar)3.997 E(g)-.37 E F0 1.167(is e)3.887 F -.15(xe)-.15 G 1.167
-(cuted before e).15 F -.15(ve)-.25 G(ry).15 E F2 1.168(simple command)
-3.667 F F0(,)A F2(for)3.668 E F0(command,)3.668 E F2(case)3.668 E F0
-(com-)3.668 E(mand,)144 429.6 Q F2(select)2.647 E F0 .147(command, e)
-2.647 F -.15(ve)-.25 G .147(ry arithmetic).15 F F2(for)2.647 E F0 .146
-(command, and before the \214rst command e)2.647 F -.15(xe)-.15 G .146
-(cutes in a).15 F .145(shell function \(see)144 441.6 R F3 .145
-(SHELL GRAMMAR)2.645 F F0(abo)2.395 E -.15(ve)-.15 G 2.646(\). Refer).15
-F .146(to the description of the)2.646 F F1(extdeb)2.646 E(ug)-.2 E F0
-.146(option to)2.646 F(the)144 453.6 Q F1(shopt)3.201 E F0 -.2(bu)3.201
-G .7(iltin for details of its ef).2 F .7(fect on the)-.25 F F1(DEB)3.2 E
-(UG)-.1 E F0 3.2(trap. If)3.2 F(a)3.2 E F2(sigspec)3.54 E F0(is)3.51 E
-F3(RETURN)3.2 E F4(,)A F0 .7(the com-)2.95 F(mand)144 465.6 Q F2(ar)
-3.473 E(g)-.37 E F0 .643(is e)3.363 F -.15(xe)-.15 G .643
+/F3 9/Times-Bold@0 SF(SIG)2.5 E F0(pre\214x is optional.)2.25 E 1.648
+(If a)144 405.6 R F2(sigspec)4.488 E F0(is)4.458 E F3(EXIT)4.148 E F0
+1.648(\(0\) the command)3.898 F F2(ar)4.479 E(g)-.37 E F0 1.649(is e)
+4.369 F -.15(xe)-.15 G 1.649(cuted on e).15 F 1.649(xit from the shell.)
+-.15 F 1.649(If a)6.649 F F2(sigspec)4.489 E F0(is)4.459 E F3(DEB)144
+417.6 Q(UG)-.09 E/F4 9/Times-Roman@0 SF(,)A F0 1.168(the command)3.418 F
+F2(ar)3.998 E(g)-.37 E F0 1.168(is e)3.888 F -.15(xe)-.15 G 1.167
+(cuted before e).15 F -.15(ve)-.25 G(ry).15 E F2 1.167(simple command)
+3.667 F F0(,)A F2(for)3.667 E F0(command,)3.667 E F2(case)3.667 E F0
+(com-)3.667 E(mand,)144 429.6 Q F2(select)2.646 E F0 .146(command, e)
+2.646 F -.15(ve)-.25 G .146(ry arithmetic).15 F F2(for)2.646 E F0 .147
+(command, and before the \214rst command e)2.646 F -.15(xe)-.15 G .147
+(cutes in a).15 F .146(shell function \(see)144 441.6 R F3 .146
+(SHELL GRAMMAR)2.646 F F0(abo)2.396 E -.15(ve)-.15 G 2.646(\). Refer).15
+F .146(to the description of the)2.646 F F1(extdeb)2.645 E(ug)-.2 E F0
+.145(option to)2.645 F(the)144 453.6 Q F1(shopt)3.2 E F0 -.2(bu)3.2 G .7
+(iltin for details of its ef).2 F .7(fect on the)-.25 F F1(DEB)3.2 E(UG)
+-.1 E F0 3.2(trap. If)3.2 F(a)3.2 E F2(sigspec)3.54 E F0(is)3.51 E F3
+(RETURN)3.2 E F4(,)A F0 .701(the com-)2.951 F(mand)144 465.6 Q F2(ar)
+3.474 E(g)-.37 E F0 .644(is e)3.364 F -.15(xe)-.15 G .643
(cuted each time a shell function or a script e).15 F -.15(xe)-.15 G
-.644(cuted with the).15 F F1(.)3.144 E F0(or)3.144 E F1(sour)3.144 E(ce)
--.18 E F0 -.2(bu)3.144 G(iltins).2 E(\214nishes e)144 477.6 Q -.15(xe)
--.15 G(cuting.).15 E .522(If a)144 495.6 R F2(sigspec)3.362 E F0(is)
-3.332 E F3(ERR)3.022 E F4(,)A F0 .522(the command)2.772 F F2(ar)3.352 E
+.643(cuted with the).15 F F1(.)3.143 E F0(or)3.143 E F1(sour)3.143 E(ce)
+-.18 E F0 -.2(bu)3.143 G(iltins).2 E(\214nishes e)144 477.6 Q -.15(xe)
+-.15 G(cuting.).15 E .521(If a)144 495.6 R F2(sigspec)3.361 E F0(is)
+3.331 E F3(ERR)3.021 E F4(,)A F0 .522(the command)2.771 F F2(ar)3.352 E
(g)-.37 E F0 .522(is e)3.242 F -.15(xe)-.15 G .522(cuted whene).15 F
--.15(ve)-.25 G 3.022(raap).15 G .521(ipeline \(which may consist of a)
+-.15(ve)-.25 G 3.022(raap).15 G .522(ipeline \(which may consist of a)
-3.022 F .185(single simple command\), a list, or a compound command re\
-turns a non\255zero e)144 507.6 R .185(xit status, subject to)-.15 F
-.452(the follo)144 519.6 R .452(wing conditions.)-.25 F(The)5.452 E F3
-(ERR)2.952 E F0 .451(trap is not e)2.701 F -.15(xe)-.15 G .451
-(cuted if the f).15 F .451(ailed command is part of the com-)-.1 F .387
-(mand list immediately follo)144 531.6 R .387(wing a)-.25 F F1(while)
-2.887 E F0(or)2.887 E F1(until)2.888 E F0 -.1(ke)2.888 G(yw)-.05 E .388
-(ord, part of the test in an)-.1 F F2(if)2.898 E F0 .388
-(statement, part)4.848 F .778(of a command e)144 543.6 R -.15(xe)-.15 G
+turns a non\255zero e)144 507.6 R .184(xit status, subject to)-.15 F
+.451(the follo)144 519.6 R .451(wing conditions.)-.25 F(The)5.451 E F3
+(ERR)2.951 E F0 .451(trap is not e)2.701 F -.15(xe)-.15 G .451
+(cuted if the f).15 F .452(ailed command is part of the com-)-.1 F .388
+(mand list immediately follo)144 531.6 R .388(wing a)-.25 F F1(while)
+2.888 E F0(or)2.888 E F1(until)2.888 E F0 -.1(ke)2.888 G(yw)-.05 E .388
+(ord, part of the test in an)-.1 F F2(if)2.897 E F0 .387
+(statement, part)4.847 F .777(of a command e)144 543.6 R -.15(xe)-.15 G
.778(cuted in a).15 F F1(&&)3.278 E F0(or)3.278 E F1(||)3.278 E F0 .778
(list e)3.278 F .778(xcept the command follo)-.15 F .778
-(wing the \214nal)-.25 F F1(&&)3.278 E F0(or)3.278 E F1(||)3.277 E F0
-3.277(,a)C -.15(ny)-3.277 G 1.28(command in a pipeline b)144 555.6 R
+(wing the \214nal)-.25 F F1(&&)3.278 E F0(or)3.278 E F1(||)3.278 E F0
+3.278(,a)C -.15(ny)-3.278 G 1.28(command in a pipeline b)144 555.6 R
1.28(ut the last, or if the command')-.2 F 3.78(sr)-.55 G 1.28(eturn v)
-3.78 F 1.28(alue is being in)-.25 F -.15(ve)-.4 G 1.28(rted using).15 F
F1(!)3.78 E F0(.)A(These are the same conditions obe)144 567.6 Q
(Signals ignored upon entry to the shell cannot be trapped or reset.)144
585.6 R -.35(Tr)6.095 G 1.095(apped signals that are not).35 F .662
(being ignored are reset to their original v)144 597.6 R .662
-(alues in a subshell or subshell en)-.25 F .662(vironment when one is)
+(alues in a subshell or subshell en)-.25 F .661(vironment when one is)
-.4 F 2.5(created. The)144 609.6 R(return status is f)2.5 E(alse if an)
-.1 E(y)-.15 E F2(sigspec)2.84 E F0(is in)2.81 E -.25(va)-.4 G
(lid; otherwise).25 E F1(trap)2.5 E F0(returns true.)2.5 E F1(type)108
626.4 Q F0([)2.5 E F1(\255aftpP)A F0(])A F2(name)2.5 E F0([)2.5 E F2
-(name)A F0(...])2.5 E -.4(Wi)144 638.4 S .174
-(th no options, indicate ho).4 F 2.674(we)-.25 G(ach)-2.674 E F2(name)
-3.034 E F0 -.1(wo)2.854 G .173
-(uld be interpreted if used as a command name.).1 F .173(If the)5.173 F
-F1<ad74>144 650.4 Q F0 .842(option is used,)3.342 F F1(type)3.342 E F0
+(name)A F0(...])2.5 E -.4(Wi)144 638.4 S .173
+(th no options, indicate ho).4 F 2.673(we)-.25 G(ach)-2.673 E F2(name)
+3.033 E F0 -.1(wo)2.853 G .174
+(uld be interpreted if used as a command name.).1 F .174(If the)5.174 F
+F1<ad74>144 650.4 Q F0 .843(option is used,)3.343 F F1(type)3.343 E F0
.843(prints a string which is one of)3.343 F F2(alias)3.343 E F0(,).27 E
F2 -.1(ke)3.343 G(ywor)-.2 E(d)-.37 E F0(,).77 E F2(function)3.343 E F0
-(,).24 E F2 -.2(bu)3.343 G(iltin).2 E F0 3.343(,o).24 G(r)-3.343 E F2
-(\214le)5.253 E F0(if)3.523 E F2(name)144.36 662.4 Q F0 .087
-(is an alias, shell reserv)2.767 F .087(ed w)-.15 F .087
-(ord, function, b)-.1 F .086(uiltin, or disk \214le, respecti)-.2 F -.15
-(ve)-.25 G(ly).15 E 5.086(.I)-.65 G 2.586(ft)-5.086 G(he)-2.586 E F2
-(name)2.946 E F0 .086(is not)2.766 F .118
+(,).24 E F2 -.2(bu)3.342 G(iltin).2 E F0 3.342(,o).24 G(r)-3.342 E F2
+(\214le)5.252 E F0(if)3.522 E F2(name)144.36 662.4 Q F0 .086
+(is an alias, shell reserv)2.766 F .086(ed w)-.15 F .086
+(ord, function, b)-.1 F .087(uiltin, or disk \214le, respecti)-.2 F -.15
+(ve)-.25 G(ly).15 E 5.087(.I)-.65 G 2.587(ft)-5.087 G(he)-2.587 E F2
+(name)2.947 E F0 .087(is not)2.767 F .119
(found, then nothing is printed, and an e)144 674.4 R .118
-(xit status of f)-.15 F .118(alse is returned.)-.1 F .119(If the)5.119 F
-F1<ad70>2.619 E F0 .119(option is used,)2.619 F F1(type)2.619 E F0 .855
+(xit status of f)-.15 F .118(alse is returned.)-.1 F .118(If the)5.118 F
+F1<ad70>2.618 E F0 .118(option is used,)2.618 F F1(type)2.618 E F0 .855
(either returns the name of the disk \214le that w)144 686.4 R .855
(ould be e)-.1 F -.15(xe)-.15 G .855(cuted if).15 F F2(name)3.715 E F0
-.855(were speci\214ed as a com-)3.535 F .64(mand name, or nothing if)144
-698.4 R/F5 10/Courier@0 SF .64(type -t name)3.14 F F0 -.1(wo)3.14 G .641
-(uld not return).1 F F2(\214le)3.141 E F0 5.641(.T).18 G(he)-5.641 E F1
-<ad50>3.141 E F0 .641(option forces a)3.141 F F3 -.666(PA)3.141 G(TH)
--.189 E F0 .113(search for each)144 710.4 R F2(name)2.613 E F0 2.613(,e)
-C -.15(ve)-2.863 G 2.613(ni).15 G(f)-2.613 E F5 .113(type -t name)2.613
-F F0 -.1(wo)2.613 G .113(uld not return).1 F F2(\214le)2.613 E F0 5.113
-(.I).18 G 2.613(fa)-5.113 G .112(command is hashed,)-.001 F F1<ad70>
-2.612 E F0(and)144 722.4 Q F1<ad50>3.23 E F0 .73(print the hashed v)3.23
-F .731
-(alue, which is not necessarily the \214le that appears \214rst in)-.25
-F F3 -.666(PA)3.231 G(TH)-.189 E F4(.)A F0 .731(If the)5.231 F
+.855(were speci\214ed as a com-)3.535 F .641(mand name, or nothing if)
+144 698.4 R/F5 10/Courier@0 SF .641(type -t name)3.141 F F0 -.1(wo)3.141
+G .641(uld not return).1 F F2(\214le)3.14 E F0 5.64(.T).18 G(he)-5.64 E
+F1<ad50>3.14 E F0 .64(option forces a)3.14 F F3 -.666(PA)3.14 G(TH)-.189
+E F0 .112(search for each)144 710.4 R F2(name)2.612 E F0 2.612(,e)C -.15
+(ve)-2.862 G 2.613(ni).15 G(f)-2.613 E F5 .113(type -t name)2.613 F F0
+-.1(wo)2.613 G .113(uld not return).1 F F2(\214le)2.613 E F0 5.113(.I)
+.18 G 2.613(fac)-5.113 G .113(ommand is hashed,)-2.613 F F1<ad70>2.613 E
+F0(and)144 722.4 Q F1<ad50>3.231 E F0 .731(print the hashed v)3.231 F
+.73(alue, which is not necessarily the \214le that appears \214rst in)
+-.25 F F3 -.666(PA)3.23 G(TH)-.189 E F4(.)A F0 .73(If the)5.23 F
(GNU Bash-4.2)72 768 Q(2004 Apr 20)148.735 E(21)198.725 E 0 Cg EP
%%Page: 22 22
%%BeginPageSetup
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
-/Times-Bold@0 SF<ad61>144 84 Q F0 1.749(option is used,)4.249 F F1(type)
+/Times-Bold@0 SF<ad61>144 84 Q F0 1.748(option is used,)4.248 F F1(type)
4.248 E F0 1.748(prints all of the places that contain an e)4.248 F -.15
-(xe)-.15 G 1.748(cutable named).15 F/F2 10/Times-Italic@0 SF(name)4.248
-E F0 6.748(.T).18 G(his)-6.748 E .744
+(xe)-.15 G 1.748(cutable named).15 F/F2 10/Times-Italic@0 SF(name)4.249
+E F0 6.749(.T).18 G(his)-6.749 E .744
(includes aliases and functions, if and only if the)144 96 R F1<ad70>
-3.244 E F0 .744(option is not also used.)3.244 F .744
+3.244 E F0 .744(option is not also used.)3.244 F .743
(The table of hashed)5.744 F 1.223(commands is not consulted when using)
144 108 R F1<ad61>3.723 E F0 6.223(.T)C(he)-6.223 E F1<ad66>3.723 E F0
-1.223(option suppresses shell function lookup, as)3.723 F .325(with the)
-144 120 R F1(command)2.825 E F0 -.2(bu)2.825 G(iltin.).2 E F1(type)5.325
-E F0 .325(returns true if all of the ar)2.825 F .326
-(guments are found, f)-.18 F .326(alse if an)-.1 F 2.826(ya)-.15 G .326
-(re not)-2.826 F(found.)144 132 Q F1(ulimit)108 148.8 Q F0([)2.5 E F1
+1.223(option suppresses shell function lookup, as)3.723 F .326(with the)
+144 120 R F1(command)2.826 E F0 -.2(bu)2.826 G(iltin.).2 E F1(type)5.326
+E F0 .326(returns true if all of the ar)2.826 F .325
+(guments are found, f)-.18 F .325(alse if an)-.1 F 2.825(ya)-.15 G .325
+(re not)-2.825 F(found.)144 132 Q F1(ulimit)108 148.8 Q F0([)2.5 E F1
(\255HST)A(abcde\214lmnpqrstuvx)-.92 E F0([)2.5 E F2(limit)A F0(]])A
-(Pro)144 160.8 Q .244(vides control o)-.15 F -.15(ve)-.15 G 2.744(rt).15
-G .244(he resources a)-2.744 F -.25(va)-.2 G .244
+(Pro)144 160.8 Q .243(vides control o)-.15 F -.15(ve)-.15 G 2.743(rt).15
+G .243(he resources a)-2.743 F -.25(va)-.2 G .244
(ilable to the shell and to processes started by it, on systems).25 F
-.943(that allo)144 172.8 R 3.443(ws)-.25 G .943(uch control.)-3.443 F
-(The)5.943 E F1<ad48>3.443 E F0(and)3.443 E F1<ad53>3.444 E F0 .944
+.944(that allo)144 172.8 R 3.444(ws)-.25 G .944(uch control.)-3.444 F
+(The)5.944 E F1<ad48>3.444 E F0(and)3.444 E F1<ad53>3.444 E F0 .943
(options specify that the hard or soft limit is set for the)3.444 F(gi)
-144 184.8 Q -.15(ve)-.25 G 2.709(nr).15 G 2.709(esource. A)-2.709 F .208
+144 184.8 Q -.15(ve)-.25 G 2.708(nr).15 G 2.708(esource. A)-2.708 F .208
(hard limit cannot be increased by a non-root user once it is set; a so\
-ft limit may)2.709 F .425(be increased up to the v)144 196.8 R .425
-(alue of the hard limit.)-.25 F .426(If neither)5.425 F F1<ad48>2.926 E
-F0(nor)2.926 E F1<ad53>2.926 E F0 .426
-(is speci\214ed, both the soft and)2.926 F .139(hard limits are set.)144
+ft limit may)2.708 F .426(be increased up to the v)144 196.8 R .426
+(alue of the hard limit.)-.25 F .425(If neither)5.426 F F1<ad48>2.925 E
+F0(nor)2.925 E F1<ad53>2.925 E F0 .425
+(is speci\214ed, both the soft and)2.925 F .139(hard limits are set.)144
208.8 R .139(The v)5.139 F .139(alue of)-.25 F F2(limit)2.729 E F0 .139
(can be a number in the unit speci\214ed for the resource or one)3.319 F
-.741(of the special v)144 220.8 R(alues)-.25 E F1(hard)3.241 E F0(,)A F1
+.742(of the special v)144 220.8 R(alues)-.25 E F1(hard)3.242 E F0(,)A F1
(soft)3.241 E F0 3.241(,o)C(r)-3.241 E F1(unlimited)3.241 E F0 3.241(,w)
C .741(hich stand for the current hard limit, the current)-3.241 F .78
(soft limit, and no limit, respecti)144 232.8 R -.15(ve)-.25 G(ly).15 E
5.78(.I)-.65 G(f)-5.78 E F2(limit)3.37 E F0 .78
(is omitted, the current v)3.96 F .78(alue of the soft limit of the)-.25
-F .498(resource is printed, unless the)144 244.8 R F1<ad48>2.999 E F0
-.499(option is gi)2.999 F -.15(ve)-.25 G 2.999(n. When).15 F .499
+F .499(resource is printed, unless the)144 244.8 R F1<ad48>2.999 E F0
+.499(option is gi)2.999 F -.15(ve)-.25 G 2.999(n. When).15 F .498
(more than one resource is speci\214ed, the)2.999 F
(limit name and unit are printed before the v)144 256.8 Q 2.5
(alue. Other)-.25 F(options are interpreted as follo)2.5 E(ws:)-.25 E F1
(The maximum resident set size \(man)21.97 E 2.5(ys)-.15 G
(ystems do not honor this limit\))-2.5 E F1<ad6e>144 376.8 Q F0 .791(Th\
e maximum number of open \214le descriptors \(most systems do not allo)
-24.74 F 3.29(wt)-.25 G .79(his v)-3.29 F .79(alue to)-.25 F(be set\))180
-388.8 Q F1<ad70>144 400.8 Q F0
+24.74 F 3.291(wt)-.25 G .791(his v)-3.291 F .791(alue to)-.25 F
+(be set\))180 388.8 Q F1<ad70>144 400.8 Q F0
(The pipe size in 512-byte blocks \(this may not be set\))24.74 E F1
<ad71>144 412.8 Q F0
(The maximum number of bytes in POSIX message queues)24.74 E F1<ad72>144
525.6 Q F2(limit)3.058 E F0 .468(is gi)3.648 F -.15(ve)-.25 G .468
(n, and the).15 F F1<ad61>2.968 E F0 .468(option is not used,)2.968 F F2
(limit)2.968 E F0 .468(is the ne)2.968 F 2.968(wv)-.25 G .468
-(alue of the speci\214ed resource.)-3.218 F(If)5.468 E .044
-(no option is gi)144 537.6 R -.15(ve)-.25 G .044(n, then).15 F F1<ad66>
-2.544 E F0 .045(is assumed.)2.545 F -1.11(Va)5.045 G .045
-(lues are in 1024-byte increments, e)1.11 F .045(xcept for)-.15 F F1
-<ad74>2.545 E F0 2.545(,w)C .045(hich is)-2.545 F .403(in seconds;)144
-549.6 R F1<ad70>2.903 E F0 2.903(,w)C .402
-(hich is in units of 512-byte blocks; and)-2.903 F F1<ad54>2.902 E F0(,)
+(alue of the speci\214ed resource.)-3.218 F(If)5.468 E .045
+(no option is gi)144 537.6 R -.15(ve)-.25 G .045(n, then).15 F F1<ad66>
+2.545 E F0 .045(is assumed.)2.545 F -1.11(Va)5.045 G .045
+(lues are in 1024-byte increments, e)1.11 F .044(xcept for)-.15 F F1
+<ad74>2.544 E F0 2.544(,w)C .044(hich is)-2.544 F .402(in seconds;)144
+549.6 R F1<ad70>2.902 E F0 2.902(,w)C .402
+(hich is in units of 512-byte blocks; and)-2.902 F F1<ad54>2.902 E F0(,)
A F1<ad62>2.902 E F0(,)A F1<ad6e>2.902 E F0 2.902(,a)C(nd)-2.902 E F1
-<ad75>2.902 E F0 2.902(,w)C .402(hich are unscaled)-2.902 F -.25(va)144
-561.6 S 3.082(lues. The).25 F .583(return status is 0 unless an in)3.083
+<ad75>2.903 E F0 2.903(,w)C .403(hich are unscaled)-2.903 F -.25(va)144
+561.6 S 3.083(lues. The).25 F .583(return status is 0 unless an in)3.083
F -.25(va)-.4 G .583(lid option or ar).25 F .583
(gument is supplied, or an error occurs)-.18 F(while setting a ne)144
573.6 Q 2.5(wl)-.25 G(imit.)-2.5 E F1(umask)108 590.4 Q F0([)2.5 E F1
(gins with a digit, it is interpreted as an octal)-.15 F .066(number; o\
therwise it is interpreted as a symbolic mode mask similar to that acce\
pted by)144 614.4 R F2 -.15(ch)2.566 G(mod).15 E F0(\(1\).).77 E(If)144
-626.4 Q F2(mode)3.263 E F0 .382(is omitted, the current v)3.063 F .382
+626.4 Q F2(mode)3.262 E F0 .382(is omitted, the current v)3.062 F .382
(alue of the mask is printed.)-.25 F(The)5.382 E F1<ad53>2.882 E F0 .382
(option causes the mask to be)2.882 F .547
(printed in symbolic form; the def)144 638.4 R .547
(ault output is an octal number)-.1 F 5.547(.I)-.55 G 3.047(ft)-5.547 G
(he)-3.047 E F1<ad70>3.047 E F0 .547(option is supplied, and)3.047 F F2
-(mode)144.38 650.4 Q F0 .552
-(is omitted, the output is in a form that may be reused as input.)3.232
-F .551(The return status is 0 if the)5.551 F(mode w)144 662.4 Q
+(mode)144.38 650.4 Q F0 .551
+(is omitted, the output is in a form that may be reused as input.)3.231
+F .552(The return status is 0 if the)5.552 F(mode w)144 662.4 Q
(as successfully changed or if no)-.1 E F2(mode)2.5 E F0(ar)2.5 E
(gument w)-.18 E(as supplied, and f)-.1 E(alse otherwise.)-.1 E F1
(unalias)108 679.2 Q F0<5bad>2.5 E F1(a)A F0 2.5(][)C F2(name)-2.5 E F0
(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
/Times-Bold@0 SF(unset)108 84 Q F0<5bad>2.5 E F1(fv)A F0 2.5(][)C<ad>
-2.5 E F1(n)A F0 2.5(][)C/F2 10/Times-Italic@0 SF(name)-2.5 E F0(...])
-2.5 E -.15(Fo)144 96 S 3.828(re).15 G(ach)-3.828 E F2(name)3.828 E F0
-3.828(,r).18 G(emo)-3.828 E 1.628 -.15(ve t)-.15 H 1.328
+2.5 E -.15(Fo)144 96 S 3.827(re).15 G(ach)-3.827 E F2(name)3.827 E F0
+3.827(,r).18 G(emo)-3.827 E 1.627 -.15(ve t)-.15 H 1.327
(he corresponding v).15 F 1.327(ariable or function.)-.25 F 1.327
-(If the)6.327 F F1<ad76>3.827 E F0 1.327(option is gi)3.827 F -.15(ve)
--.25 G 1.327(n, each).15 F F2(name)144.36 108 Q F0 1.55
-(refers to a shell v)4.23 F 1.551(ariable, and that v)-.25 F 1.551
-(ariable is remo)-.25 F -.15(ve)-.15 G 4.051(d. Read-only).15 F -.25(va)
-4.051 G 1.551(riables may not be).25 F 4.642(unset. If)144 120 R F1
-<ad66>4.642 E F0 2.142(is speci\214ed, each)4.642 F F2(name)5.001 E F0
-2.141(refers to a shell function, and the function de\214nition is)4.821
-F(remo)144 132 Q -.15(ve)-.15 G 2.537(d. If).15 F(the)2.537 E F1<ad6e>
+(If the)6.327 F F1<ad76>3.828 E F0 1.328(option is gi)3.828 F -.15(ve)
+-.25 G 1.328(n, each).15 F F2(name)144.36 108 Q F0 1.551
+(refers to a shell v)4.231 F 1.551(ariable, and that v)-.25 F 1.551
+(ariable is remo)-.25 F -.15(ve)-.15 G 4.05(d. Read-only).15 F -.25(va)
+4.05 G 1.55(riables may not be).25 F 4.641(unset. If)144 120 R F1<ad66>
+4.641 E F0 2.141(is speci\214ed, each)4.641 F F2(name)5.001 E F0 2.141
+(refers to a shell function, and the function de\214nition is)4.821 F
+(remo)144 132 Q -.15(ve)-.15 G 2.538(d. If).15 F(the)2.537 E F1<ad6e>
2.537 E F0 .037(option is supplied, and)2.537 F F2(name)2.537 E F0 .037
(is a v)2.537 F .037(ariable with the)-.25 F F2(namer)2.537 E(ef)-.37 E
-F0(attrib)2.537 E(ute,)-.2 E F2(name)2.537 E F0(will)2.538 E .492
+F0(attrib)2.537 E(ute,)-.2 E F2(name)2.537 E F0(will)2.537 E .492
(be unset rather than the v)144 144 R .492(ariable it references.)-.25 F
F1<ad6e>5.492 E F0 .492(has no ef)2.992 F .492(fect if the)-.25 F F1
-<ad66>2.992 E F0 .492(option is supplied.)2.992 F .492(If no)5.492 F .22
-(options are supplied, each)144 156 R F2(name)2.72 E F0 .22
-(refers to a v)2.72 F .221(ariable; if there is no v)-.25 F .221
-(ariable by that name, an)-.25 F 2.721(yf)-.15 G(unc-)-2.721 E 1.189
+<ad66>2.992 E F0 .492(option is supplied.)2.992 F .493(If no)5.493 F
+.221(options are supplied, each)144 156 R F2(name)2.721 E F0 .221
+(refers to a v)2.721 F .22(ariable; if there is no v)-.25 F .22
+(ariable by that name, an)-.25 F 2.72(yf)-.15 G(unc-)-2.72 E 1.188
(tion with that name is unset.)144 168 R 1.189(Each unset v)6.189 F
-1.189(ariable or function is remo)-.25 F -.15(ve)-.15 G 3.688(df).15 G
-1.188(rom the en)-3.688 F(vironment)-.4 E 3.205
+1.189(ariable or function is remo)-.25 F -.15(ve)-.15 G 3.689(df).15 G
+1.189(rom the en)-3.689 F(vironment)-.4 E 3.206
(passed to subsequent commands.)144 180 R 3.206(If an)8.206 F 5.706(yo)
-.15 G(f)-5.706 E/F3 9/Times-Bold@0 SF(COMP_W)5.706 E(ORDBREAKS)-.09 E
-/F4 9/Times-Roman@0 SF(,)A F3(RANDOM)5.456 E F4(,)A F3(SECONDS)5.456 E
-F4(,)A F3(LINENO)144 192 Q F4(,)A F3(HISTCMD)4.348 E F4(,)A F3(FUNCN)
-4.348 E(AME)-.18 E F4(,)A F3(GR)4.348 E(OUPS)-.27 E F4(,)A F0(or)4.348 E
+/F4 9/Times-Roman@0 SF(,)A F3(RANDOM)5.455 E F4(,)A F3(SECONDS)5.455 E
+F4(,)A F3(LINENO)144 192 Q F4(,)A F3(HISTCMD)4.347 E F4(,)A F3(FUNCN)
+4.347 E(AME)-.18 E F4(,)A F3(GR)4.347 E(OUPS)-.27 E F4(,)A F0(or)4.348 E
F3(DIRST)4.598 E -.495(AC)-.81 G(K).495 E F0 2.098(are unset, the)4.348
-F 4.597(yl)-.15 G 2.097(ose their special)-4.597 F(properties, e)144 204
+F 4.598(yl)-.15 G 2.098(ose their special)-4.598 F(properties, e)144 204
Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(ft)-2.5 G(he)-2.5 E 2.5(ya)-.15 G
(re subsequently reset.)-2.5 E(The e)5 E(xit status is true unless a)
-.15 E F2(name)2.86 E F0(is readonly)2.68 E(.)-.65 E F1(wait)108 220.8 Q
F0([)2.5 E F1<ad6e>A F0 2.5(][)C F2 2.5(n.)-2.5 G(..)-2.5 E F0(])A -.8
-(Wa)144 232.8 S .026(it for each speci\214ed child process and return i\
-ts termination status.).8 F(Each)5.027 E F2(n)2.887 E F0 .027
-(may be a process ID)2.767 F .256
+(Wa)144 232.8 S .027(it for each speci\214ed child process and return i\
+ts termination status.).8 F(Each)5.026 E F2(n)2.886 E F0 .026
+(may be a process ID)2.766 F .256
(or a job speci\214cation; if a job spec is gi)144 244.8 R -.15(ve)-.25
G .256(n, all processes in that job').15 F 2.756(sp)-.55 G .256
(ipeline are w)-2.756 F .256(aited for)-.1 F 5.256(.I)-.55 G(f)-5.256 E
-F2(n)3.116 E F0 .317(is not gi)144 256.8 R -.15(ve)-.25 G .317
+F2(n)3.116 E F0 .318(is not gi)144 256.8 R -.15(ve)-.25 G .318
(n, all currently acti).15 F .618 -.15(ve c)-.25 H .318
(hild processes are w).15 F .318(aited for)-.1 F 2.818(,a)-.4 G .318
-(nd the return status is zero.)-2.818 F .318(If the)5.318 F F1<ad6e>144
-268.8 Q F0 .362(option is supplied,)2.862 F F1(wait)2.862 E F0 -.1(wa)
-2.862 G .362(its for an).1 F 2.862(yj)-.15 G .362
-(ob to terminate and returns its e)-2.862 F .361(xit status.)-.15 F(If)
-5.361 E F2(n)3.221 E F0(speci\214es)3.101 E 2.595(an)144 280.8 S(on-e)
--2.595 E .095(xistent process or job, the return status is 127.)-.15 F
-.096(Otherwise, the return status is the e)5.095 F .096(xit status)-.15
+(nd the return status is zero.)-2.818 F .317(If the)5.317 F F1<ad6e>144
+268.8 Q F0 .361(option is supplied,)2.861 F F1(wait)2.861 E F0 -.1(wa)
+2.861 G .361(its for an).1 F 2.862(yj)-.15 G .362
+(ob to terminate and returns its e)-2.862 F .362(xit status.)-.15 F(If)
+5.362 E F2(n)3.222 E F0(speci\214es)3.102 E 2.596(an)144 280.8 S(on-e)
+-2.596 E .096(xistent process or job, the return status is 127.)-.15 F
+.095(Otherwise, the return status is the e)5.095 F .095(xit status)-.15
F(of the last process or job w)144 292.8 Q(aited for)-.1 E(.)-.55 E/F5
10.95/Times-Bold@0 SF(SEE ALSO)72 309.6 Q F0(bash\(1\), sh\(1\))108
321.6 Q(GNU Bash-4.2)72 768 Q(2004 Apr 20)148.735 E(23)198.725 E 0 Cg EP
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
-%%CreationDate: Wed Sep 11 09:17:46 2013
+%%CreationDate: Tue Oct 22 11:07:52 2013
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.19 2
#include "error.h"
#include "externs.h"
#include "quit.h"
+#include "trap.h"
#if !defined (errno)
extern int errno;
if (sh_unset_nodelay_mode (fileno (stream)) < 0)
{
sys_error (_("cannot reset nodelay mode for fd %d"), fileno (stream));
+ local_index = local_bufused = 0;
return EOF;
}
continue;
}
else if (errno != EINTR)
{
- local_index = 0;
+ local_index = local_bufused = 0;
return EOF;
}
}
--- /dev/null
+/* input.c -- functions to perform buffered input with synchronization. */
+
+/* Copyright (C) 1992-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+#include "filecntl.h"
+#include "posixstat.h"
+#include <stdio.h>
+#include <errno.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+#include "bashintl.h"
+
+#include "command.h"
+#include "general.h"
+#include "input.h"
+#include "error.h"
+#include "externs.h"
+#include "quit.h"
+#include "trap.h"
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+#if defined (EAGAIN)
+# define X_EAGAIN EAGAIN
+#else
+# define X_EAGAIN -99
+#endif
+
+#if defined (EWOULDBLOCK)
+# define X_EWOULDBLOCK EWOULDBLOCK
+#else
+# define X_EWOULDBLOCK -99
+#endif
+
+extern void termsig_handler __P((int));
+
+/* Functions to handle reading input on systems that don't restart read(2)
+ if a signal is received. */
+
+static char localbuf[128];
+static int local_index = 0, local_bufused = 0;
+
+/* Posix and USG systems do not guarantee to restart read () if it is
+ interrupted by a signal. We do the read ourselves, and restart it
+ if it returns EINTR. */
+int
+getc_with_restart (stream)
+ FILE *stream;
+{
+ unsigned char uc;
+
+ CHECK_TERMSIG;
+
+ /* Try local buffering to reduce the number of read(2) calls. */
+ if (local_index == local_bufused || local_bufused == 0)
+ {
+ while (1)
+ {
+ QUIT;
+ run_pending_traps ();
+
+ local_bufused = read (fileno (stream), localbuf, sizeof(localbuf));
+ if (local_bufused > 0)
+ break;
+ else if (local_bufused == 0)
+ {
+ local_index = 0;
+ return EOF;
+ }
+ else if (errno == X_EAGAIN || errno == X_EWOULDBLOCK)
+ {
+ if (sh_unset_nodelay_mode (fileno (stream)) < 0)
+ {
+ sys_error (_("cannot reset nodelay mode for fd %d"), fileno (stream));
+ return EOF;
+ }
+ continue;
+ }
+ else if (errno != EINTR)
+ {
+ local_index = 0;
+ return EOF;
+ }
+ }
+ local_index = 0;
+ }
+ uc = localbuf[local_index++];
+ return uc;
+}
+
+int
+ungetc_with_restart (c, stream)
+ int c;
+ FILE *stream;
+{
+ if (local_index == 0 || c == EOF)
+ return EOF;
+ localbuf[--local_index] = c;
+ return c;
+}
+
+#if defined (BUFFERED_INPUT)
+
+/* A facility similar to stdio, but input-only. */
+
+#if defined (USING_BASH_MALLOC)
+# define MAX_INPUT_BUFFER_SIZE 8176
+#else
+# define MAX_INPUT_BUFFER_SIZE 8192
+#endif
+
+#if !defined (SEEK_CUR)
+# define SEEK_CUR 1
+#endif /* !SEEK_CUR */
+
+#ifdef max
+# undef max
+#endif
+#define max(a, b) (((a) > (b)) ? (a) : (b))
+#ifdef min
+# undef min
+#endif
+#define min(a, b) ((a) > (b) ? (b) : (a))
+
+extern int interactive_shell;
+
+int bash_input_fd_changed;
+
+/* This provides a way to map from a file descriptor to the buffer
+ associated with that file descriptor, rather than just the other
+ way around. This is needed so that buffers are managed properly
+ in constructs like 3<&4. buffers[x]->b_fd == x -- that is how the
+ correspondence is maintained. */
+static BUFFERED_STREAM **buffers = (BUFFERED_STREAM **)NULL;
+static int nbuffers;
+
+#define ALLOCATE_BUFFERS(n) \
+ do { if ((n) >= nbuffers) allocate_buffers (n); } while (0)
+
+/* Make sure `buffers' has at least N elements. */
+static void
+allocate_buffers (n)
+ int n;
+{
+ register int i, orig_nbuffers;
+
+ orig_nbuffers = nbuffers;
+ nbuffers = n + 20;
+ buffers = (BUFFERED_STREAM **)xrealloc
+ (buffers, nbuffers * sizeof (BUFFERED_STREAM *));
+
+ /* Zero out the new buffers. */
+ for (i = orig_nbuffers; i < nbuffers; i++)
+ buffers[i] = (BUFFERED_STREAM *)NULL;
+}
+
+/* Construct and return a BUFFERED_STREAM corresponding to file descriptor
+ FD, using BUFFER. */
+static BUFFERED_STREAM *
+make_buffered_stream (fd, buffer, bufsize)
+ int fd;
+ char *buffer;
+ size_t bufsize;
+{
+ BUFFERED_STREAM *bp;
+
+ bp = (BUFFERED_STREAM *)xmalloc (sizeof (BUFFERED_STREAM));
+ ALLOCATE_BUFFERS (fd);
+ buffers[fd] = bp;
+ bp->b_fd = fd;
+ bp->b_buffer = buffer;
+ bp->b_size = bufsize;
+ bp->b_used = bp->b_inputp = bp->b_flag = 0;
+ if (bufsize == 1)
+ bp->b_flag |= B_UNBUFF;
+ if (O_TEXT && (fcntl (fd, F_GETFL) & O_TEXT) != 0)
+ bp->b_flag |= O_TEXT;
+ return (bp);
+}
+
+/* Allocate a new BUFFERED_STREAM, copy BP to it, and return the new copy. */
+static BUFFERED_STREAM *
+copy_buffered_stream (bp)
+ BUFFERED_STREAM *bp;
+{
+ BUFFERED_STREAM *nbp;
+
+ if (!bp)
+ return ((BUFFERED_STREAM *)NULL);
+
+ nbp = (BUFFERED_STREAM *)xmalloc (sizeof (BUFFERED_STREAM));
+ xbcopy ((char *)bp, (char *)nbp, sizeof (BUFFERED_STREAM));
+ return (nbp);
+}
+
+int
+set_bash_input_fd (fd)
+ int fd;
+{
+ if (bash_input.type == st_bstream)
+ bash_input.location.buffered_fd = fd;
+ else if (interactive_shell == 0)
+ default_buffered_input = fd;
+ return 0;
+}
+
+int
+fd_is_bash_input (fd)
+ int fd;
+{
+ if (bash_input.type == st_bstream && bash_input.location.buffered_fd == fd)
+ return 1;
+ else if (interactive_shell == 0 && default_buffered_input == fd)
+ return 1;
+ return 0;
+}
+
+/* Save the buffered stream corresponding to file descriptor FD (which bash
+ is using to read input) to a buffered stream associated with NEW_FD. If
+ NEW_FD is -1, a new file descriptor is allocated with fcntl. The new
+ file descriptor is returned on success, -1 on error. */
+int
+save_bash_input (fd, new_fd)
+ int fd, new_fd;
+{
+ int nfd;
+
+ /* Sync the stream so we can re-read from the new file descriptor. We
+ might be able to avoid this by copying the buffered stream verbatim
+ to the new file descriptor. */
+ if (buffers[fd])
+ sync_buffered_stream (fd);
+
+ /* Now take care of duplicating the file descriptor that bash is
+ using for input, so we can reinitialize it later. */
+ nfd = (new_fd == -1) ? fcntl (fd, F_DUPFD, 10) : new_fd;
+ if (nfd == -1)
+ {
+ if (fcntl (fd, F_GETFD, 0) == 0)
+ sys_error (_("cannot allocate new file descriptor for bash input from fd %d"), fd);
+ return -1;
+ }
+
+ if (buffers[nfd])
+ {
+ /* What's this? A stray buffer without an associated open file
+ descriptor? Free up the buffer and report the error. */
+ internal_error (_("save_bash_input: buffer already exists for new fd %d"), nfd);
+ free_buffered_stream (buffers[nfd]);
+ }
+
+ /* Reinitialize bash_input.location. */
+ if (bash_input.type == st_bstream)
+ {
+ bash_input.location.buffered_fd = nfd;
+ fd_to_buffered_stream (nfd);
+ close_buffered_fd (fd); /* XXX */
+ }
+ else
+ /* If the current input type is not a buffered stream, but the shell
+ is not interactive and therefore using a buffered stream to read
+ input (e.g. with an `eval exec 3>output' inside a script), note
+ that the input fd has been changed. pop_stream() looks at this
+ value and adjusts the input fd to the new value of
+ default_buffered_input accordingly. */
+ bash_input_fd_changed++;
+
+ if (default_buffered_input == fd)
+ default_buffered_input = nfd;
+
+ SET_CLOSE_ON_EXEC (nfd);
+ return nfd;
+}
+
+/* Check that file descriptor FD is not the one that bash is currently
+ using to read input from a script. FD is about to be duplicated onto,
+ which means that the kernel will close it for us. If FD is the bash
+ input file descriptor, we need to seek backwards in the script (if
+ possible and necessary -- scripts read from stdin are still unbuffered),
+ allocate a new file descriptor to use for bash input, and re-initialize
+ the buffered stream. Make sure the file descriptor used to save bash
+ input is set close-on-exec. Returns 0 on success, -1 on failure. This
+ works only if fd is > 0 -- if fd == 0 and bash is reading input from
+ fd 0, sync_buffered_stream is used instead, to cooperate with input
+ redirection (look at redir.c:add_undo_redirect()). */
+int
+check_bash_input (fd)
+ int fd;
+{
+ if (fd_is_bash_input (fd))
+ {
+ if (fd > 0)
+ return ((save_bash_input (fd, -1) == -1) ? -1 : 0);
+ else if (fd == 0)
+ return ((sync_buffered_stream (fd) == -1) ? -1 : 0);
+ }
+ return 0;
+}
+
+/* This is the buffered stream analogue of dup2(fd1, fd2). The
+ BUFFERED_STREAM corresponding to fd2 is deallocated, if one exists.
+ BUFFERS[fd1] is copied to BUFFERS[fd2]. This is called by the
+ redirect code for constructs like 4<&0 and 3</etc/rc.local. */
+int
+duplicate_buffered_stream (fd1, fd2)
+ int fd1, fd2;
+{
+ int is_bash_input, m;
+
+ if (fd1 == fd2)
+ return 0;
+
+ m = max (fd1, fd2);
+ ALLOCATE_BUFFERS (m);
+
+ /* If FD2 is the file descriptor bash is currently using for shell input,
+ we need to do some extra work to make sure that the buffered stream
+ actually exists (it might not if fd1 was not active, and the copy
+ didn't actually do anything). */
+ is_bash_input = (bash_input.type == st_bstream) &&
+ (bash_input.location.buffered_fd == fd2);
+
+ if (buffers[fd2])
+ {
+ /* If the two objects share the same b_buffer, don't free it. */
+ if (buffers[fd1] && buffers[fd1]->b_buffer && buffers[fd1]->b_buffer == buffers[fd2]->b_buffer)
+ buffers[fd2] = (BUFFERED_STREAM *)NULL;
+ else
+ free_buffered_stream (buffers[fd2]);
+ }
+ buffers[fd2] = copy_buffered_stream (buffers[fd1]);
+ if (buffers[fd2])
+ buffers[fd2]->b_fd = fd2;
+
+ if (is_bash_input)
+ {
+ if (!buffers[fd2])
+ fd_to_buffered_stream (fd2);
+ buffers[fd2]->b_flag |= B_WASBASHINPUT;
+ }
+
+ return (fd2);
+}
+
+/* Return 1 if a seek on FD will succeed. */
+#define fd_is_seekable(fd) (lseek ((fd), 0L, SEEK_CUR) >= 0)
+
+/* Take FD, a file descriptor, and create and return a buffered stream
+ corresponding to it. If something is wrong and the file descriptor
+ is invalid, return a NULL stream. */
+BUFFERED_STREAM *
+fd_to_buffered_stream (fd)
+ int fd;
+{
+ char *buffer;
+ size_t size;
+ struct stat sb;
+
+ if (fstat (fd, &sb) < 0)
+ {
+ close (fd);
+ return ((BUFFERED_STREAM *)NULL);
+ }
+
+ size = (fd_is_seekable (fd)) ? min (sb.st_size, MAX_INPUT_BUFFER_SIZE) : 1;
+ if (size == 0)
+ size = 1;
+ buffer = (char *)xmalloc (size);
+
+ return (make_buffered_stream (fd, buffer, size));
+}
+
+/* Return a buffered stream corresponding to FILE, a file name. */
+BUFFERED_STREAM *
+open_buffered_stream (file)
+ char *file;
+{
+ int fd;
+
+ fd = open (file, O_RDONLY);
+ return ((fd >= 0) ? fd_to_buffered_stream (fd) : (BUFFERED_STREAM *)NULL);
+}
+
+/* Deallocate a buffered stream and free up its resources. Make sure we
+ zero out the slot in BUFFERS that points to BP. */
+void
+free_buffered_stream (bp)
+ BUFFERED_STREAM *bp;
+{
+ int n;
+
+ if (!bp)
+ return;
+
+ n = bp->b_fd;
+ if (bp->b_buffer)
+ free (bp->b_buffer);
+ free (bp);
+ buffers[n] = (BUFFERED_STREAM *)NULL;
+}
+
+/* Close the file descriptor associated with BP, a buffered stream, and free
+ up the stream. Return the status of closing BP's file descriptor. */
+int
+close_buffered_stream (bp)
+ BUFFERED_STREAM *bp;
+{
+ int fd;
+
+ if (!bp)
+ return (0);
+ fd = bp->b_fd;
+ free_buffered_stream (bp);
+ return (close (fd));
+}
+
+/* Deallocate the buffered stream associated with file descriptor FD, and
+ close FD. Return the status of the close on FD. */
+int
+close_buffered_fd (fd)
+ int fd;
+{
+ if (fd < 0)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ if (fd >= nbuffers || !buffers || !buffers[fd])
+ return (close (fd));
+ return (close_buffered_stream (buffers[fd]));
+}
+
+/* Make the BUFFERED_STREAM associated with buffers[FD] be BP, and return
+ the old BUFFERED_STREAM. */
+BUFFERED_STREAM *
+set_buffered_stream (fd, bp)
+ int fd;
+ BUFFERED_STREAM *bp;
+{
+ BUFFERED_STREAM *ret;
+
+ ret = buffers[fd];
+ buffers[fd] = bp;
+ return ret;
+}
+
+/* Read a buffer full of characters from BP, a buffered stream. */
+static int
+b_fill_buffer (bp)
+ BUFFERED_STREAM *bp;
+{
+ ssize_t nr;
+ off_t o;
+
+ CHECK_TERMSIG;
+ /* In an environment where text and binary files are treated differently,
+ compensate for lseek() on text files returning an offset different from
+ the count of characters read() returns. Text-mode streams have to be
+ treated as unbuffered. */
+ if ((bp->b_flag & (B_TEXT | B_UNBUFF)) == B_TEXT)
+ {
+ o = lseek (bp->b_fd, 0, SEEK_CUR);
+ nr = zread (bp->b_fd, bp->b_buffer, bp->b_size);
+ if (nr > 0 && nr < lseek (bp->b_fd, 0, SEEK_CUR) - o)
+ {
+ lseek (bp->b_fd, o, SEEK_SET);
+ bp->b_flag |= B_UNBUFF;
+ bp->b_size = 1;
+ nr = zread (bp->b_fd, bp->b_buffer, bp->b_size);
+ }
+ }
+ else
+ nr = zread (bp->b_fd, bp->b_buffer, bp->b_size);
+ if (nr <= 0)
+ {
+ bp->b_used = 0;
+ bp->b_buffer[0] = 0;
+ if (nr == 0)
+ bp->b_flag |= B_EOF;
+ else
+ bp->b_flag |= B_ERROR;
+ return (EOF);
+ }
+
+ bp->b_used = nr;
+ bp->b_inputp = 0;
+ return (bp->b_buffer[bp->b_inputp++] & 0xFF);
+}
+
+/* Get a character from buffered stream BP. */
+#define bufstream_getc(bp) \
+ (bp->b_inputp == bp->b_used || !bp->b_used) \
+ ? b_fill_buffer (bp) \
+ : bp->b_buffer[bp->b_inputp++] & 0xFF
+
+/* Push C back onto buffered stream BP. */
+static int
+bufstream_ungetc(c, bp)
+ int c;
+ BUFFERED_STREAM *bp;
+{
+ if (c == EOF || bp->b_inputp == 0)
+ return (EOF);
+
+ bp->b_buffer[--bp->b_inputp] = c;
+ return (c);
+}
+
+/* Seek backwards on file BFD to synchronize what we've read so far
+ with the underlying file pointer. */
+int
+sync_buffered_stream (bfd)
+ int bfd;
+{
+ BUFFERED_STREAM *bp;
+ off_t chars_left;
+
+ if (buffers == 0 || (bp = buffers[bfd]) == 0)
+ return (-1);
+
+ chars_left = bp->b_used - bp->b_inputp;
+ if (chars_left)
+ lseek (bp->b_fd, -chars_left, SEEK_CUR);
+ bp->b_used = bp->b_inputp = 0;
+ return (0);
+}
+
+int
+buffered_getchar ()
+{
+ CHECK_TERMSIG;
+
+#if !defined (DJGPP)
+ return (bufstream_getc (buffers[bash_input.location.buffered_fd]));
+#else
+ /* On DJGPP, ignore \r. */
+ int ch;
+ while ((ch = bufstream_getc (buffers[bash_input.location.buffered_fd])) == '\r')
+ ;
+ return ch;
+#endif
+}
+
+int
+buffered_ungetchar (c)
+ int c;
+{
+ return (bufstream_ungetc (c, buffers[bash_input.location.buffered_fd]));
+}
+
+/* Make input come from file descriptor BFD through a buffered stream. */
+void
+with_input_from_buffered_stream (bfd, name)
+ int bfd;
+ char *name;
+{
+ INPUT_STREAM location;
+ BUFFERED_STREAM *bp;
+
+ location.buffered_fd = bfd;
+ /* Make sure the buffered stream exists. */
+ bp = fd_to_buffered_stream (bfd);
+ init_yy_io (bp == 0 ? return_EOF : buffered_getchar,
+ buffered_ungetchar, st_bstream, name, location);
+}
+
+#if defined (TEST)
+void *
+xmalloc(s)
+int s;
+{
+ return (malloc (s));
+}
+
+void *
+xrealloc(s, size)
+char *s;
+int size;
+{
+ if (!s)
+ return(malloc (size));
+ else
+ return(realloc (s, size));
+}
+
+void
+init_yy_io ()
+{
+}
+
+process(bp)
+BUFFERED_STREAM *bp;
+{
+ int c;
+
+ while ((c = bufstream_getc(bp)) != EOF)
+ putchar(c);
+}
+
+BASH_INPUT bash_input;
+
+struct stat dsb; /* can be used from gdb */
+
+/* imitate /bin/cat */
+main(argc, argv)
+int argc;
+char **argv;
+{
+ register int i;
+ BUFFERED_STREAM *bp;
+
+ if (argc == 1) {
+ bp = fd_to_buffered_stream (0);
+ process(bp);
+ exit(0);
+ }
+ for (i = 1; i < argc; i++) {
+ if (argv[i][0] == '-' && argv[i][1] == '\0') {
+ bp = fd_to_buffered_stream (0);
+ if (!bp)
+ continue;
+ process(bp);
+ free_buffered_stream (bp);
+ } else {
+ bp = open_buffered_stream (argv[i]);
+ if (!bp)
+ continue;
+ process(bp);
+ close_buffered_stream (bp);
+ }
+ }
+ exit(0);
+}
+#endif /* TEST */
+#endif /* BUFFERED_INPUT */
int flags;
{
#if EXTENDED_GLOB
- if (extglob_pattern (pat)) /* XXX */
+ if (extglob_pattern_p (pat)) /* XXX */
return (extglob_skipname (pat, dname, flags));
#endif
ext = 0;
#if EXTENDED_GLOB
- ext = extglob_pattern (pat);
+ ext = extglob_pattern_p (pat);
#endif
pat_wc = dn_wc = (wchar_t *)NULL;
--- /dev/null
+/* glob.c -- file-name wildcard pattern matching for Bash.
+
+ Copyright (C) 1985-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne-Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* To whomever it may concern: I have never seen the code which most
+ Unix programs use to perform this function. I wrote this from scratch
+ based on specifications for the pattern matching. --RMS. */
+
+#include <config.h>
+
+#if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX)
+ #pragma alloca
+#endif /* _AIX && RISC6000 && !__GNUC__ */
+
+#include "bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+#include "posixdir.h"
+#include "posixstat.h"
+#include "shmbutil.h"
+#include "xmalloc.h"
+
+#include "filecntl.h"
+#if !defined (F_OK)
+# define F_OK 0
+#endif
+
+#include "stdc.h"
+#include "memalloc.h"
+
+#include <signal.h>
+
+#include "shell.h"
+
+#include "glob.h"
+#include "strmatch.h"
+
+#if !defined (HAVE_BCOPY) && !defined (bcopy)
+# define bcopy(s, d, n) ((void) memcpy ((d), (s), (n)))
+#endif /* !HAVE_BCOPY && !bcopy */
+
+#if !defined (NULL)
+# if defined (__STDC__)
+# define NULL ((void *) 0)
+# else
+# define NULL 0x0
+# endif /* __STDC__ */
+#endif /* !NULL */
+
+#if !defined (FREE)
+# define FREE(x) if (x) free (x)
+#endif
+
+/* Don't try to alloca() more than this much memory for `struct globval'
+ in glob_vector() */
+#ifndef ALLOCA_MAX
+# define ALLOCA_MAX 100000
+#endif
+
+struct globval
+ {
+ struct globval *next;
+ char *name;
+ };
+
+extern void throw_to_top_level __P((void));
+extern int sh_eaccess __P((char *, int));
+extern char *sh_makepath __P((const char *, const char *, int));
+extern int signal_is_pending __P((int));
+extern void run_pending_traps __P((void));
+
+extern int extended_glob;
+
+/* Global variable which controls whether or not * matches .*.
+ Non-zero means don't match .*. */
+int noglob_dot_filenames = 1;
+
+/* Global variable which controls whether or not filename globbing
+ is done without regard to case. */
+int glob_ignore_case = 0;
+
+/* Global variable to return to signify an error in globbing. */
+char *glob_error_return;
+
+static struct globval finddirs_error_return;
+
+/* Some forward declarations. */
+static int skipname __P((char *, char *, int));
+#if HANDLE_MULTIBYTE
+static int mbskipname __P((char *, char *, int));
+#endif
+#if HANDLE_MULTIBYTE
+static void udequote_pathname __P((char *));
+static void wdequote_pathname __P((char *));
+#else
+# define dequote_pathname udequote_pathname
+#endif
+static void dequote_pathname __P((char *));
+static int glob_testdir __P((char *));
+static char **glob_dir_to_array __P((char *, char **, int));
+
+/* Make sure these names continue to agree with what's in smatch.c */
+extern char *glob_patscan __P((char *, char *, int));
+extern wchar_t *glob_patscan_wc __P((wchar_t *, wchar_t *, int));
+
+/* Compile `glob_loop.c' for single-byte characters. */
+#define CHAR unsigned char
+#define INT int
+#define L(CS) CS
+#define INTERNAL_GLOB_PATTERN_P internal_glob_pattern_p
+#include "glob_loop.c"
+
+/* Compile `glob_loop.c' again for multibyte characters. */
+#if HANDLE_MULTIBYTE
+
+#define CHAR wchar_t
+#define INT wint_t
+#define L(CS) L##CS
+#define INTERNAL_GLOB_PATTERN_P internal_glob_wpattern_p
+#include "glob_loop.c"
+
+#endif /* HANDLE_MULTIBYTE */
+
+/* And now a function that calls either the single-byte or multibyte version
+ of internal_glob_pattern_p. */
+int
+glob_pattern_p (pattern)
+ const char *pattern;
+{
+#if HANDLE_MULTIBYTE
+ size_t n;
+ wchar_t *wpattern;
+ int r;
+
+ if (MB_CUR_MAX == 1)
+ return (internal_glob_pattern_p ((unsigned char *)pattern));
+
+ /* Convert strings to wide chars, and call the multibyte version. */
+ n = xdupmbstowcs (&wpattern, NULL, pattern);
+ if (n == (size_t)-1)
+ /* Oops. Invalid multibyte sequence. Try it as single-byte sequence. */
+ return (internal_glob_pattern_p ((unsigned char *)pattern));
+
+ r = internal_glob_wpattern_p (wpattern);
+ free (wpattern);
+
+ return r;
+#else
+ return (internal_glob_pattern_p (pattern));
+#endif
+}
+
+#if EXTENDED_GLOB
+/* Return 1 if all subpatterns in the extended globbing pattern PAT indicate
+ that the name should be skipped. XXX - doesn't handle pattern negation,
+ not sure if it should */
+static int
+extglob_skipname (pat, dname, flags)
+ char *pat, *dname;
+ int flags;
+{
+ char *pp, *pe, *t;
+ int n, r;
+
+ pp = pat + 2;
+ pe = pp + strlen (pp) - 1; /*(*/
+ if (*pe != ')')
+ return 0;
+ if ((t = strchr (pp, '|')) == 0) /* easy case first */
+ {
+ *pe = '\0';
+ r = skipname (pp, dname, flags); /*(*/
+ *pe = ')';
+ return r;
+ }
+ while (t = glob_patscan (pp, pe, '|'))
+ {
+ n = t[-1];
+ t[-1] = '\0';
+ r = skipname (pp, dname, flags);
+ t[-1] = n;
+ if (r == 0) /* if any pattern says not skip, we don't skip */
+ return r;
+ pp = t;
+ } /*(*/
+
+ if (pp == pe) /* glob_patscan might find end of pattern */
+ return r;
+
+ *pe = '\0';
+# if defined (HANDLE_MULTIBYTE)
+ r = mbskipname (pp, dname, flags); /*(*/
+# else
+ r = skipname (pp, dname, flags); /*(*/
+# endif
+ *pe = ')';
+ return r;
+}
+#endif
+
+/* Return 1 if DNAME should be skipped according to PAT. Mostly concerned
+ with matching leading `.'. */
+static int
+skipname (pat, dname, flags)
+ char *pat;
+ char *dname;
+ int flags;
+{
+#if EXTENDED_GLOB
+ if (extglob_pattern_p (pat)) /* XXX */
+ return (extglob_skipname (pat, dname, flags));
+#endif
+
+ /* If a leading dot need not be explicitly matched, and the pattern
+ doesn't start with a `.', don't match `.' or `..' */
+ if (noglob_dot_filenames == 0 && pat[0] != '.' &&
+ (pat[0] != '\\' || pat[1] != '.') &&
+ (dname[0] == '.' &&
+ (dname[1] == '\0' || (dname[1] == '.' && dname[2] == '\0'))))
+ return 1;
+
+ /* If a dot must be explicitly matched, check to see if they do. */
+ else if (noglob_dot_filenames && dname[0] == '.' && pat[0] != '.' &&
+ (pat[0] != '\\' || pat[1] != '.'))
+ return 1;
+
+ return 0;
+}
+
+#if HANDLE_MULTIBYTE
+
+static int
+wchkname (pat_wc, dn_wc)
+ wchar_t *pat_wc, *dn_wc;
+{
+ /* If a leading dot need not be explicitly matched, and the
+ pattern doesn't start with a `.', don't match `.' or `..' */
+ if (noglob_dot_filenames == 0 && pat_wc[0] != L'.' &&
+ (pat_wc[0] != L'\\' || pat_wc[1] != L'.') &&
+ (dn_wc[0] == L'.' &&
+ (dn_wc[1] == L'\0' || (dn_wc[1] == L'.' && dn_wc[2] == L'\0'))))
+ return 1;
+
+ /* If a leading dot must be explicitly matched, check to see if the
+ pattern and dirname both have one. */
+ else if (noglob_dot_filenames && dn_wc[0] == L'.' &&
+ pat_wc[0] != L'.' &&
+ (pat_wc[0] != L'\\' || pat_wc[1] != L'.'))
+ return 1;
+
+ return 0;
+}
+
+static int
+wextglob_skipname (pat, dname, flags)
+ wchar_t *pat, *dname;
+ int flags;
+{
+#if EXTENDED_GLOB
+ wchar_t *pp, *pe, *t, n;
+ int r;
+
+ pp = pat + 2;
+ pe = pp + wcslen (pp) - 1; /*(*/
+ if (*pe != L')')
+ return 0;
+ if ((t = wcschr (pp, L'|')) == 0)
+ {
+ *pe = L'\0';
+ r = wchkname (pp, dname); /*(*/
+ *pe = L')';
+ return r;
+ }
+ while (t = glob_patscan_wc (pp, pe, '|'))
+ {
+ n = t[-1];
+ t[-1] = L'\0';
+ r = wchkname (pp, dname);
+ t[-1] = n;
+ if (r == 0)
+ return 0;
+ pp = t;
+ }
+
+ if (pp == pe) /* glob_patscan_wc might find end of pattern */
+ return r;
+
+ *pe = L'\0';
+ r = wchkname (pp, dname); /*(*/
+ *pe = L')';
+ return r;
+#else
+ return (wchkname (pat, dname));
+#endif
+}
+
+/* Return 1 if DNAME should be skipped according to PAT. Handles multibyte
+ characters in PAT and DNAME. Mostly concerned with matching leading `.'. */
+static int
+mbskipname (pat, dname, flags)
+ char *pat, *dname;
+ int flags;
+{
+ int ret, ext;
+ wchar_t *pat_wc, *dn_wc;
+ size_t pat_n, dn_n;
+
+ if (mbsmbchar (dname) == 0 && mbsmbchar (pat) == 0)
+ return (skipname (pat, dname, flags));
+
+ ext = 0;
+#if EXTENDED_GLOB
+ ext = extglob_pattern_p (pat);
+#endif
+
+ pat_wc = dn_wc = (wchar_t *)NULL;
+
+ pat_n = xdupmbstowcs (&pat_wc, NULL, pat);
+ if (pat_n != (size_t)-1)
+ dn_n = xdupmbstowcs (&dn_wc, NULL, dname);
+
+ ret = 0;
+ if (pat_n != (size_t)-1 && dn_n !=(size_t)-1)
+ ret = ext ? wextglob_skipname (pat_wc, dn_wc, flags) : wchkname (pat_wc, dn_wc);
+ else
+ ret = skipname (pat, dname, flags);
+
+ FREE (pat_wc);
+ FREE (dn_wc);
+
+ return ret;
+}
+#endif /* HANDLE_MULTIBYTE */
+
+/* Remove backslashes quoting characters in PATHNAME by modifying PATHNAME. */
+static void
+udequote_pathname (pathname)
+ char *pathname;
+{
+ register int i, j;
+
+ for (i = j = 0; pathname && pathname[i]; )
+ {
+ if (pathname[i] == '\\')
+ i++;
+
+ pathname[j++] = pathname[i++];
+
+ if (pathname[i - 1] == 0)
+ break;
+ }
+ if (pathname)
+ pathname[j] = '\0';
+}
+
+#if HANDLE_MULTIBYTE
+/* Remove backslashes quoting characters in PATHNAME by modifying PATHNAME. */
+static void
+wdequote_pathname (pathname)
+ char *pathname;
+{
+ mbstate_t ps;
+ size_t len, n;
+ wchar_t *wpathname;
+ int i, j;
+ wchar_t *orig_wpathname;
+
+ len = strlen (pathname);
+ /* Convert the strings into wide characters. */
+ n = xdupmbstowcs (&wpathname, NULL, pathname);
+ if (n == (size_t) -1)
+ {
+ /* Something wrong. Fall back to single-byte */
+ udequote_pathname (pathname);
+ return;
+ }
+ orig_wpathname = wpathname;
+
+ for (i = j = 0; wpathname && wpathname[i]; )
+ {
+ if (wpathname[i] == L'\\')
+ i++;
+
+ wpathname[j++] = wpathname[i++];
+
+ if (wpathname[i - 1] == L'\0')
+ break;
+ }
+ if (wpathname)
+ wpathname[j] = L'\0';
+
+ /* Convert the wide character string into unibyte character set. */
+ memset (&ps, '\0', sizeof(mbstate_t));
+ n = wcsrtombs(pathname, (const wchar_t **)&wpathname, len, &ps);
+ pathname[len] = '\0';
+
+ /* Can't just free wpathname here; wcsrtombs changes it in many cases. */
+ free (orig_wpathname);
+}
+
+static void
+dequote_pathname (pathname)
+ char *pathname;
+{
+ if (MB_CUR_MAX > 1)
+ wdequote_pathname (pathname);
+ else
+ udequote_pathname (pathname);
+}
+#endif /* HANDLE_MULTIBYTE */
+
+/* Test whether NAME exists. */
+
+#if defined (HAVE_LSTAT)
+# define GLOB_TESTNAME(name) (lstat (name, &finfo))
+#else /* !HAVE_LSTAT */
+# if !defined (AFS)
+# define GLOB_TESTNAME(name) (sh_eaccess (name, F_OK))
+# else /* AFS */
+# define GLOB_TESTNAME(name) (access (name, F_OK))
+# endif /* AFS */
+#endif /* !HAVE_LSTAT */
+
+/* Return 0 if DIR is a directory, -1 otherwise. */
+static int
+glob_testdir (dir)
+ char *dir;
+{
+ struct stat finfo;
+
+/*itrace("glob_testdir: testing %s", dir);*/
+ if (stat (dir, &finfo) < 0)
+ return (-1);
+
+ if (S_ISDIR (finfo.st_mode) == 0)
+ return (-1);
+
+ return (0);
+}
+
+/* Recursively scan SDIR for directories matching PAT (PAT is always `**').
+ FLAGS is simply passed down to the recursive call to glob_vector. Returns
+ a list of matching directory names. EP, if non-null, is set to the last
+ element of the returned list. NP, if non-null, is set to the number of
+ directories in the returned list. These two variables exist for the
+ convenience of the caller (always glob_vector). */
+static struct globval *
+finddirs (pat, sdir, flags, ep, np)
+ char *pat;
+ char *sdir;
+ int flags;
+ struct globval **ep;
+ int *np;
+{
+ char **r, *n;
+ int ndirs;
+ struct globval *ret, *e, *g;
+
+/*itrace("finddirs: pat = `%s' sdir = `%s' flags = 0x%x", pat, sdir, flags);*/
+ e = ret = 0;
+ r = glob_vector (pat, sdir, flags);
+ if (r == 0 || r[0] == 0)
+ {
+ if (np)
+ *np = 0;
+ if (ep)
+ *ep = 0;
+ if (r && r != &glob_error_return)
+ free (r);
+ return (struct globval *)0;
+ }
+ for (ndirs = 0; r[ndirs] != 0; ndirs++)
+ {
+ g = (struct globval *) malloc (sizeof (struct globval));
+ if (g == 0)
+ {
+ while (ret) /* free list built so far */
+ {
+ g = ret->next;
+ free (ret);
+ ret = g;
+ }
+
+ free (r);
+ if (np)
+ *np = 0;
+ if (ep)
+ *ep = 0;
+ return (&finddirs_error_return);
+ }
+ if (e == 0)
+ e = g;
+
+ g->next = ret;
+ ret = g;
+
+ g->name = r[ndirs];
+ }
+
+ free (r);
+ if (ep)
+ *ep = e;
+ if (np)
+ *np = ndirs;
+
+ return ret;
+}
+
+/* Return a vector of names of files in directory DIR
+ whose names match glob pattern PAT.
+ The names are not in any particular order.
+ Wildcards at the beginning of PAT do not match an initial period.
+
+ The vector is terminated by an element that is a null pointer.
+
+ To free the space allocated, first free the vector's elements,
+ then free the vector.
+
+ Return 0 if cannot get enough memory to hold the pointer
+ and the names.
+
+ Return -1 if cannot access directory DIR.
+ Look in errno for more information. */
+
+char **
+glob_vector (pat, dir, flags)
+ char *pat;
+ char *dir;
+ int flags;
+{
+ DIR *d;
+ register struct dirent *dp;
+ struct globval *lastlink, *e, *dirlist;
+ register struct globval *nextlink;
+ register char *nextname, *npat, *subdir;
+ unsigned int count;
+ int lose, skip, ndirs, isdir, sdlen, add_current, patlen;
+ register char **name_vector;
+ register unsigned int i;
+ int mflags; /* Flags passed to strmatch (). */
+ int pflags; /* flags passed to sh_makepath () */
+ int nalloca;
+ struct globval *firstmalloc, *tmplink;
+ char *convfn;
+
+ lastlink = 0;
+ count = lose = skip = add_current = 0;
+
+ firstmalloc = 0;
+ nalloca = 0;
+
+/*itrace("glob_vector: pat = `%s' dir = `%s' flags = 0x%x", pat, dir, flags);*/
+ /* If PAT is empty, skip the loop, but return one (empty) filename. */
+ if (pat == 0 || *pat == '\0')
+ {
+ if (glob_testdir (dir) < 0)
+ return ((char **) &glob_error_return);
+
+ nextlink = (struct globval *)alloca (sizeof (struct globval));
+ if (nextlink == NULL)
+ return ((char **) NULL);
+
+ nextlink->next = (struct globval *)0;
+ nextname = (char *) malloc (1);
+ if (nextname == 0)
+ lose = 1;
+ else
+ {
+ lastlink = nextlink;
+ nextlink->name = nextname;
+ nextname[0] = '\0';
+ count = 1;
+ }
+
+ skip = 1;
+ }
+
+ patlen = (pat && *pat) ? strlen (pat) : 0;
+
+ /* If the filename pattern (PAT) does not contain any globbing characters,
+ we can dispense with reading the directory, and just see if there is
+ a filename `DIR/PAT'. If there is, and we can access it, just make the
+ vector to return and bail immediately. */
+ if (skip == 0 && glob_pattern_p (pat) == 0)
+ {
+ int dirlen;
+ struct stat finfo;
+
+ if (glob_testdir (dir) < 0)
+ return ((char **) &glob_error_return);
+
+ dirlen = strlen (dir);
+ nextname = (char *)malloc (dirlen + patlen + 2);
+ npat = (char *)malloc (patlen + 1);
+ if (nextname == 0 || npat == 0)
+ {
+ FREE (nextname);
+ FREE (npat);
+ lose = 1;
+ }
+ else
+ {
+ strcpy (npat, pat);
+ dequote_pathname (npat);
+
+ strcpy (nextname, dir);
+ nextname[dirlen++] = '/';
+ strcpy (nextname + dirlen, npat);
+
+ if (GLOB_TESTNAME (nextname) >= 0)
+ {
+ free (nextname);
+ nextlink = (struct globval *)alloca (sizeof (struct globval));
+ if (nextlink)
+ {
+ nextlink->next = (struct globval *)0;
+ lastlink = nextlink;
+ nextlink->name = npat;
+ count = 1;
+ }
+ else
+ {
+ free (npat);
+ lose = 1;
+ }
+ }
+ else
+ {
+ free (nextname);
+ free (npat);
+ }
+ }
+
+ skip = 1;
+ }
+
+ if (skip == 0)
+ {
+ /* Open the directory, punting immediately if we cannot. If opendir
+ is not robust (i.e., it opens non-directories successfully), test
+ that DIR is a directory and punt if it's not. */
+#if defined (OPENDIR_NOT_ROBUST)
+ if (glob_testdir (dir) < 0)
+ return ((char **) &glob_error_return);
+#endif
+
+ d = opendir (dir);
+ if (d == NULL)
+ return ((char **) &glob_error_return);
+
+ /* Compute the flags that will be passed to strmatch(). We don't
+ need to do this every time through the loop. */
+ mflags = (noglob_dot_filenames ? FNM_PERIOD : 0) | FNM_PATHNAME;
+
+#ifdef FNM_CASEFOLD
+ if (glob_ignore_case)
+ mflags |= FNM_CASEFOLD;
+#endif
+
+ if (extended_glob)
+ mflags |= FNM_EXTMATCH;
+
+ add_current = ((flags & (GX_ALLDIRS|GX_ADDCURDIR)) == (GX_ALLDIRS|GX_ADDCURDIR));
+
+ /* Scan the directory, finding all names that match.
+ For each name that matches, allocate a struct globval
+ on the stack and store the name in it.
+ Chain those structs together; lastlink is the front of the chain. */
+ while (1)
+ {
+ /* Make globbing interruptible in the shell. */
+ if (interrupt_state || terminating_signal)
+ {
+ lose = 1;
+ break;
+ }
+ else if (signal_is_pending (SIGINT)) /* XXX - make SIGINT traps responsive */
+ {
+ lose = 1;
+ break;
+ }
+
+ dp = readdir (d);
+ if (dp == NULL)
+ break;
+
+ /* If this directory entry is not to be used, try again. */
+ if (REAL_DIR_ENTRY (dp) == 0)
+ continue;
+
+#if 0
+ if (dp->d_name == 0 || *dp->d_name == 0)
+ continue;
+#endif
+
+#if HANDLE_MULTIBYTE
+ if (MB_CUR_MAX > 1 && mbskipname (pat, dp->d_name, flags))
+ continue;
+ else
+#endif
+ if (skipname (pat, dp->d_name, flags))
+ continue;
+
+ /* If we're only interested in directories, don't bother with files */
+ if (flags & (GX_MATCHDIRS|GX_ALLDIRS))
+ {
+ pflags = (flags & GX_ALLDIRS) ? MP_RMDOT : 0;
+ if (flags & GX_NULLDIR)
+ pflags |= MP_IGNDOT;
+ subdir = sh_makepath (dir, dp->d_name, pflags);
+ isdir = glob_testdir (subdir);
+ if (isdir < 0 && (flags & GX_MATCHDIRS))
+ {
+ free (subdir);
+ continue;
+ }
+ }
+
+ if (flags & GX_ALLDIRS)
+ {
+ if (isdir == 0)
+ {
+ dirlist = finddirs (pat, subdir, (flags & ~GX_ADDCURDIR), &e, &ndirs);
+ if (dirlist == &finddirs_error_return)
+ {
+ free (subdir);
+ lose = 1;
+ break;
+ }
+ if (ndirs) /* add recursive directories to list */
+ {
+ if (firstmalloc == 0)
+ firstmalloc = e;
+ e->next = lastlink;
+ lastlink = dirlist;
+ count += ndirs;
+ }
+ }
+
+ nextlink = (struct globval *) malloc (sizeof (struct globval));
+ if (firstmalloc == 0)
+ firstmalloc = nextlink;
+ sdlen = strlen (subdir);
+ nextname = (char *) malloc (sdlen + 1);
+ if (nextlink == 0 || nextname == 0)
+ {
+ FREE (nextlink);
+ FREE (nextname);
+ free (subdir);
+ lose = 1;
+ break;
+ }
+ nextlink->next = lastlink;
+ lastlink = nextlink;
+ nextlink->name = nextname;
+ bcopy (subdir, nextname, sdlen + 1);
+ free (subdir);
+ ++count;
+ continue;
+ }
+ else if (flags & GX_MATCHDIRS)
+ free (subdir);
+
+ convfn = fnx_fromfs (dp->d_name, D_NAMLEN (dp));
+ if (strmatch (pat, convfn, mflags) != FNM_NOMATCH)
+ {
+ if (nalloca < ALLOCA_MAX)
+ {
+ nextlink = (struct globval *) alloca (sizeof (struct globval));
+ nalloca += sizeof (struct globval);
+ }
+ else
+ {
+ nextlink = (struct globval *) malloc (sizeof (struct globval));
+ if (firstmalloc == 0)
+ firstmalloc = nextlink;
+ }
+
+ nextname = (char *) malloc (D_NAMLEN (dp) + 1);
+ if (nextlink == 0 || nextname == 0)
+ {
+ FREE (nextlink);
+ FREE (nextname);
+ lose = 1;
+ break;
+ }
+ nextlink->next = lastlink;
+ lastlink = nextlink;
+ nextlink->name = nextname;
+ bcopy (dp->d_name, nextname, D_NAMLEN (dp) + 1);
+ ++count;
+ }
+ }
+
+ (void) closedir (d);
+ }
+
+ /* compat: if GX_ADDCURDIR, add the passed directory also. Add an empty
+ directory name as a placeholder if GX_NULLDIR (in which case the passed
+ directory name is "."). */
+ if (add_current)
+ {
+ sdlen = strlen (dir);
+ nextname = (char *)malloc (sdlen + 1);
+ nextlink = (struct globval *) malloc (sizeof (struct globval));
+ if (nextlink == 0 || nextname == 0)
+ {
+ FREE (nextlink);
+ FREE (nextname);
+ lose = 1;
+ }
+ else
+ {
+ nextlink->name = nextname;
+ nextlink->next = lastlink;
+ lastlink = nextlink;
+ if (flags & GX_NULLDIR)
+ nextname[0] = '\0';
+ else
+ bcopy (dir, nextname, sdlen + 1);
+ ++count;
+ }
+ }
+
+ if (lose == 0)
+ {
+ name_vector = (char **) malloc ((count + 1) * sizeof (char *));
+ lose |= name_vector == NULL;
+ }
+
+ /* Have we run out of memory? */
+ if (lose)
+ {
+ tmplink = 0;
+
+ /* Here free the strings we have got. */
+ while (lastlink)
+ {
+ /* Since we build the list in reverse order, the first N entries
+ will be allocated with malloc, if firstmalloc is set, from
+ lastlink to firstmalloc. */
+ if (firstmalloc)
+ {
+ if (lastlink == firstmalloc)
+ firstmalloc = 0;
+ tmplink = lastlink;
+ }
+ else
+ tmplink = 0;
+ free (lastlink->name);
+ lastlink = lastlink->next;
+ FREE (tmplink);
+ }
+
+ /* Don't call QUIT; here; let higher layers deal with it. */
+
+ return ((char **)NULL);
+ }
+
+ /* Copy the name pointers from the linked list into the vector. */
+ for (tmplink = lastlink, i = 0; i < count; ++i)
+ {
+ name_vector[i] = tmplink->name;
+ tmplink = tmplink->next;
+ }
+
+ name_vector[count] = NULL;
+
+ /* If we allocated some of the struct globvals, free them now. */
+ if (firstmalloc)
+ {
+ tmplink = 0;
+ while (lastlink)
+ {
+ tmplink = lastlink;
+ if (lastlink == firstmalloc)
+ lastlink = firstmalloc = 0;
+ else
+ lastlink = lastlink->next;
+ free (tmplink);
+ }
+ }
+
+ return (name_vector);
+}
+
+/* Return a new array which is the concatenation of each string in ARRAY
+ to DIR. This function expects you to pass in an allocated ARRAY, and
+ it takes care of free()ing that array. Thus, you might think of this
+ function as side-effecting ARRAY. This should handle GX_MARKDIRS. */
+static char **
+glob_dir_to_array (dir, array, flags)
+ char *dir, **array;
+ int flags;
+{
+ register unsigned int i, l;
+ int add_slash;
+ char **result, *new;
+ struct stat sb;
+
+ l = strlen (dir);
+ if (l == 0)
+ {
+ if (flags & GX_MARKDIRS)
+ for (i = 0; array[i]; i++)
+ {
+ if ((stat (array[i], &sb) == 0) && S_ISDIR (sb.st_mode))
+ {
+ l = strlen (array[i]);
+ new = (char *)realloc (array[i], l + 2);
+ if (new == 0)
+ return NULL;
+ new[l] = '/';
+ new[l+1] = '\0';
+ array[i] = new;
+ }
+ }
+ return (array);
+ }
+
+ add_slash = dir[l - 1] != '/';
+
+ i = 0;
+ while (array[i] != NULL)
+ ++i;
+
+ result = (char **) malloc ((i + 1) * sizeof (char *));
+ if (result == NULL)
+ return (NULL);
+
+ for (i = 0; array[i] != NULL; i++)
+ {
+ /* 3 == 1 for NUL, 1 for slash at end of DIR, 1 for GX_MARKDIRS */
+ result[i] = (char *) malloc (l + strlen (array[i]) + 3);
+
+ if (result[i] == NULL)
+ {
+ int ind;
+ for (ind = 0; ind < i; ind++)
+ free (result[ind]);
+ free (result);
+ return (NULL);
+ }
+
+ strcpy (result[i], dir);
+ if (add_slash)
+ result[i][l] = '/';
+ strcpy (result[i] + l + add_slash, array[i]);
+ if (flags & GX_MARKDIRS)
+ {
+ if ((stat (result[i], &sb) == 0) && S_ISDIR (sb.st_mode))
+ {
+ size_t rlen;
+ rlen = strlen (result[i]);
+ result[i][rlen] = '/';
+ result[i][rlen+1] = '\0';
+ }
+ }
+ }
+ result[i] = NULL;
+
+ /* Free the input array. */
+ for (i = 0; array[i] != NULL; i++)
+ free (array[i]);
+ free ((char *) array);
+
+ return (result);
+}
+
+/* Do globbing on PATHNAME. Return an array of pathnames that match,
+ marking the end of the array with a null-pointer as an element.
+ If no pathnames match, then the array is empty (first element is null).
+ If there isn't enough memory, then return NULL.
+ If a file system error occurs, return -1; `errno' has the error code. */
+char **
+glob_filename (pathname, flags)
+ char *pathname;
+ int flags;
+{
+ char **result;
+ unsigned int result_size;
+ char *directory_name, *filename, *dname;
+ unsigned int directory_len;
+ int free_dirname; /* flag */
+ int dflags;
+
+ result = (char **) malloc (sizeof (char *));
+ result_size = 1;
+ if (result == NULL)
+ return (NULL);
+
+ result[0] = NULL;
+
+ directory_name = NULL;
+
+ /* Find the filename. */
+ filename = strrchr (pathname, '/');
+ if (filename == NULL)
+ {
+ filename = pathname;
+ directory_name = "";
+ directory_len = 0;
+ free_dirname = 0;
+ }
+ else
+ {
+ directory_len = (filename - pathname) + 1;
+ directory_name = (char *) malloc (directory_len + 1);
+
+ if (directory_name == 0) /* allocation failed? */
+ return (NULL);
+
+ bcopy (pathname, directory_name, directory_len);
+ directory_name[directory_len] = '\0';
+ ++filename;
+ free_dirname = 1;
+ }
+
+ /* If directory_name contains globbing characters, then we
+ have to expand the previous levels. Just recurse. */
+ if (directory_len > 0 && glob_pattern_p (directory_name))
+ {
+ char **directories, *d, *p;
+ register unsigned int i;
+ int all_starstar, last_starstar;
+
+ all_starstar = last_starstar = 0;
+ d = directory_name;
+ dflags = flags & ~GX_MARKDIRS;
+ /* Collapse a sequence of ** patterns separated by one or more slashes
+ to a single ** terminated by a slash or NUL */
+ if ((flags & GX_GLOBSTAR) && d[0] == '*' && d[1] == '*' && (d[2] == '/' || d[2] == '\0'))
+ {
+ p = d;
+ while (d[0] == '*' && d[1] == '*' && (d[2] == '/' || d[2] == '\0'))
+ {
+ p = d;
+ if (d[2])
+ {
+ d += 3;
+ while (*d == '/')
+ d++;
+ if (*d == 0)
+ break;
+ }
+ }
+ if (*d == 0)
+ all_starstar = 1;
+ d = p;
+ dflags |= GX_ALLDIRS|GX_ADDCURDIR;
+ directory_len = strlen (d);
+ }
+
+ /* If there is a non [star][star]/ component in directory_name, we
+ still need to collapse trailing sequences of [star][star]/ into
+ a single one and note that the directory name ends with [star][star],
+ so we can compensate if filename is [star][star] */
+ if ((flags & GX_GLOBSTAR) && all_starstar == 0)
+ {
+ int dl, prev;
+ prev = dl = directory_len;
+ while (dl >= 4 && d[dl - 1] == '/' &&
+ d[dl - 2] == '*' &&
+ d[dl - 3] == '*' &&
+ d[dl - 4] == '/')
+ prev = dl, dl -= 3;
+ if (dl != directory_len)
+ last_starstar = 1;
+ directory_len = prev;
+ }
+
+ /* If the directory name ends in [star][star]/ but the filename is
+ [star][star], just remove the final [star][star] from the directory
+ so we don't have to scan everything twice. */
+ if (last_starstar && directory_len > 4 &&
+ filename[0] == '*' && filename[1] == '*' && filename[2] == 0)
+ {
+ directory_len -= 3;
+ }
+
+ if (d[directory_len - 1] == '/')
+ d[directory_len - 1] = '\0';
+
+ directories = glob_filename (d, dflags);
+
+ if (free_dirname)
+ {
+ free (directory_name);
+ directory_name = NULL;
+ }
+
+ if (directories == NULL)
+ goto memory_error;
+ else if (directories == (char **)&glob_error_return)
+ {
+ free ((char *) result);
+ return ((char **) &glob_error_return);
+ }
+ else if (*directories == NULL)
+ {
+ free ((char *) directories);
+ free ((char *) result);
+ return ((char **) &glob_error_return);
+ }
+
+ /* If we have something like [star][star]/[star][star], it's no use to
+ glob **, then do it again, and throw half the results away. */
+ if (all_starstar && filename[0] == '*' && filename[1] == '*' && filename[2] == 0)
+ {
+ free ((char *) directories);
+ free (directory_name);
+ directory_name = NULL;
+ directory_len = 0;
+ goto only_filename;
+ }
+
+ /* We have successfully globbed the preceding directory name.
+ For each name in DIRECTORIES, call glob_vector on it and
+ FILENAME. Concatenate the results together. */
+ for (i = 0; directories[i] != NULL; ++i)
+ {
+ char **temp_results;
+ int shouldbreak;
+
+ shouldbreak = 0;
+ /* XXX -- we've recursively scanned any directories resulting from
+ a `**', so turn off the flag. We turn it on again below if
+ filename is `**' */
+ /* Scan directory even on a NULL filename. That way, `*h/'
+ returns only directories ending in `h', instead of all
+ files ending in `h' with a `/' appended. */
+ dname = directories[i];
+ dflags = flags & ~(GX_MARKDIRS|GX_ALLDIRS|GX_ADDCURDIR);
+ if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
+ dflags |= GX_ALLDIRS|GX_ADDCURDIR;
+ if (dname[0] == '\0' && filename[0])
+ {
+ dflags |= GX_NULLDIR;
+ dname = "."; /* treat null directory name and non-null filename as current directory */
+ }
+ temp_results = glob_vector (filename, dname, dflags);
+
+ /* Handle error cases. */
+ if (temp_results == NULL)
+ goto memory_error;
+ else if (temp_results == (char **)&glob_error_return)
+ /* This filename is probably not a directory. Ignore it. */
+ ;
+ else
+ {
+ char **array;
+ register unsigned int l;
+
+ /* If we're expanding **, we don't need to glue the directory
+ name to the results; we've already done it in glob_vector */
+ if ((dflags & GX_ALLDIRS) && filename[0] == '*' && filename[1] == '*' && (filename[2] == '\0' || filename[2] == '/'))
+ {
+ /* When do we remove null elements from temp_results? And
+ how to avoid duplicate elements in the final result? */
+ /* If (dflags & GX_NULLDIR) glob_filename potentially left a
+ NULL placeholder in the temp results just in case
+ glob_vector/glob_dir_to_array did something with it, but
+ if it didn't, and we're not supposed to be passing them
+ through for some reason ((flags & GX_NULLDIR) == 0) we
+ need to remove all the NULL elements from the beginning
+ of TEMP_RESULTS. */
+ /* If we have a null directory name and ** as the filename,
+ we have just searched for everything from the current
+ directory on down. Break now (shouldbreak = 1) to avoid
+ duplicate entries in the final result. */
+#define NULL_PLACEHOLDER(x) ((x) && *(x) && **(x) == 0)
+ if ((dflags & GX_NULLDIR) && (flags & GX_NULLDIR) == 0 &&
+ NULL_PLACEHOLDER (temp_results))
+#undef NULL_PLACEHOLDER
+ {
+ register int i, n;
+ for (n = 0; temp_results[n] && *temp_results[n] == 0; n++)
+ ;
+ i = n;
+ do
+ temp_results[i - n] = temp_results[i];
+ while (temp_results[i++] != 0);
+ array = temp_results;
+ shouldbreak = 1;
+ }
+ else
+ array = temp_results;
+ }
+ else
+ array = glob_dir_to_array (directories[i], temp_results, flags);
+ l = 0;
+ while (array[l] != NULL)
+ ++l;
+
+ result =
+ (char **)realloc (result, (result_size + l) * sizeof (char *));
+
+ if (result == NULL)
+ goto memory_error;
+
+ for (l = 0; array[l] != NULL; ++l)
+ result[result_size++ - 1] = array[l];
+
+ result[result_size - 1] = NULL;
+
+ /* Note that the elements of ARRAY are not freed. */
+ if (array != temp_results)
+ free ((char *) array);
+ else if ((dflags & GX_ALLDIRS) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
+ free (temp_results); /* expanding ** case above */
+
+ if (shouldbreak)
+ break;
+ }
+ }
+ /* Free the directories. */
+ for (i = 0; directories[i]; i++)
+ free (directories[i]);
+
+ free ((char *) directories);
+
+ return (result);
+ }
+
+only_filename:
+ /* If there is only a directory name, return it. */
+ if (*filename == '\0')
+ {
+ result = (char **) realloc ((char *) result, 2 * sizeof (char *));
+ if (result == NULL)
+ return (NULL);
+ /* Handle GX_MARKDIRS here. */
+ result[0] = (char *) malloc (directory_len + 1);
+ if (result[0] == NULL)
+ goto memory_error;
+ bcopy (directory_name, result[0], directory_len + 1);
+ if (free_dirname)
+ free (directory_name);
+ result[1] = NULL;
+ return (result);
+ }
+ else
+ {
+ char **temp_results;
+
+ /* There are no unquoted globbing characters in DIRECTORY_NAME.
+ Dequote it before we try to open the directory since there may
+ be quoted globbing characters which should be treated verbatim. */
+ if (directory_len > 0)
+ dequote_pathname (directory_name);
+
+ /* We allocated a small array called RESULT, which we won't be using.
+ Free that memory now. */
+ free (result);
+
+ /* Just return what glob_vector () returns appended to the
+ directory name. */
+ /* If flags & GX_ALLDIRS, we're called recursively */
+ dflags = flags & ~GX_MARKDIRS;
+ if (directory_len == 0)
+ dflags |= GX_NULLDIR;
+ if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
+ {
+ dflags |= GX_ALLDIRS|GX_ADDCURDIR;
+#if 0
+ /* If we want all directories (dflags & GX_ALLDIRS) and we're not
+ being called recursively as something like `echo [star][star]/[star].o'
+ ((flags & GX_ALLDIRS) == 0), we want to prevent glob_vector from
+ adding a null directory name to the front of the temp_results
+ array. We turn off ADDCURDIR if not called recursively and
+ dlen == 0 */
+#endif
+ if (directory_len == 0 && (flags & GX_ALLDIRS) == 0)
+ dflags &= ~GX_ADDCURDIR;
+ }
+ temp_results = glob_vector (filename,
+ (directory_len == 0 ? "." : directory_name),
+ dflags);
+
+ if (temp_results == NULL || temp_results == (char **)&glob_error_return)
+ {
+ if (free_dirname)
+ free (directory_name);
+ QUIT; /* XXX - shell */
+ run_pending_traps ();
+ return (temp_results);
+ }
+
+ result = glob_dir_to_array ((dflags & GX_ALLDIRS) ? "" : directory_name, temp_results, flags);
+
+ if (free_dirname)
+ free (directory_name);
+ return (result);
+ }
+
+ /* We get to memory_error if the program has run out of memory, or
+ if this is the shell, and we have been interrupted. */
+ memory_error:
+ if (result != NULL)
+ {
+ register unsigned int i;
+ for (i = 0; result[i] != NULL; ++i)
+ free (result[i]);
+ free ((char *) result);
+ }
+
+ if (free_dirname && directory_name)
+ free (directory_name);
+
+ QUIT;
+ run_pending_traps ();
+
+ return (NULL);
+}
+
+#if defined (TEST)
+
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ unsigned int i;
+
+ for (i = 1; i < argc; ++i)
+ {
+ char **value = glob_filename (argv[i], 0);
+ if (value == NULL)
+ puts ("Out of memory.");
+ else if (value == &glob_error_return)
+ perror (argv[i]);
+ else
+ for (i = 0; value[i] != NULL; i++)
+ puts (value[i]);
+ }
+
+ exit (0);
+}
+#endif /* TEST. */
extern char **glob_vector __P((char *, char *, int));
extern char **glob_filename __P((char *, int));
+extern int extglob_pattern_p __P((const char *));
+
extern char *glob_error_return;
extern int noglob_dot_filenames;
extern int glob_ignore_case;
--- /dev/null
+/* File-name wildcard pattern matching for GNU.
+ Copyright (C) 1985, 1988, 1989, 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne-Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _GLOB_H_
+#define _GLOB_H_
+
+#include "stdc.h"
+
+#define GX_MARKDIRS 0x001 /* mark directory names with trailing `/' */
+#define GX_NOCASE 0x002 /* ignore case */
+#define GX_MATCHDOT 0x004 /* match `.' literally */
+#define GX_MATCHDIRS 0x008 /* match only directory names */
+#define GX_ALLDIRS 0x010 /* match all directory names, no others */
+#define GX_NULLDIR 0x100 /* internal -- no directory preceding pattern */
+#define GX_ADDCURDIR 0x200 /* internal -- add passed directory name */
+#define GX_GLOBSTAR 0x400 /* turn on special handling of ** */
+
+extern int glob_pattern_p __P((const char *));
+extern char **glob_vector __P((char *, char *, int));
+extern char **glob_filename __P((char *, int));
+
+extern char *glob_error_return;
+extern int noglob_dot_filenames;
+extern int glob_ignore_case;
+
+#endif /* _GLOB_H_ */
#endif
int
-extglob_pattern (pat)
+extglob_pattern_p (pat)
char *pat;
{
switch (pat[0])
--- /dev/null
+/* gmisc.c -- miscellaneous pattern matching utility functions for Bash.
+
+ Copyright (C) 2010 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne-Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include "bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+#include "shmbutil.h"
+
+#include "stdc.h"
+
+#ifndef LPAREN
+# define LPAREN '('
+#endif
+#ifndef RPAREN
+# define RPAREN ')'
+#endif
+
+#if defined (HANDLE_MULTIBYTE)
+#define WLPAREN L'('
+#define WRPAREN L')'
+
+/* Return 1 of the first character of WSTRING could match the first
+ character of pattern WPAT. Wide character version. */
+int
+match_pattern_wchar (wpat, wstring)
+ wchar_t *wpat, *wstring;
+{
+ wchar_t wc;
+
+ if (*wstring == 0)
+ return (0);
+
+ switch (wc = *wpat++)
+ {
+ default:
+ return (*wstring == wc);
+ case L'\\':
+ return (*wstring == *wpat);
+ case L'?':
+ return (*wpat == WLPAREN ? 1 : (*wstring != L'\0'));
+ case L'*':
+ return (1);
+ case L'+':
+ case L'!':
+ case L'@':
+ return (*wpat == WLPAREN ? 1 : (*wstring == wc));
+ case L'[':
+ return (*wstring != L'\0');
+ }
+}
+
+int
+wmatchlen (wpat, wmax)
+ wchar_t *wpat;
+ size_t wmax;
+{
+ wchar_t wc;
+ int matlen, bracklen, t, in_cclass, in_collsym, in_equiv;
+
+ if (*wpat == 0)
+ return (0);
+
+ matlen = in_cclass = in_collsym = in_equiv = 0;
+ while (wc = *wpat++)
+ {
+ switch (wc)
+ {
+ default:
+ matlen++;
+ break;
+ case L'\\':
+ if (*wpat == 0)
+ return ++matlen;
+ else
+ {
+ matlen++;
+ wpat++;
+ }
+ break;
+ case L'?':
+ if (*wpat == WLPAREN)
+ return (matlen = -1); /* XXX for now */
+ else
+ matlen++;
+ break;
+ case L'*':
+ return (matlen = -1);
+ case L'+':
+ case L'!':
+ case L'@':
+ if (*wpat == WLPAREN)
+ return (matlen = -1); /* XXX for now */
+ else
+ matlen++;
+ break;
+ case L'[':
+ /* scan for ending `]', skipping over embedded [:...:] */
+ bracklen = 1;
+ wc = *wpat++;
+ do
+ {
+ if (wc == 0)
+ {
+ wpat--; /* back up to NUL */
+ matlen += bracklen;
+ goto bad_bracket;
+ }
+ else if (wc == L'\\')
+ {
+ /* *wpat == backslash-escaped character */
+ bracklen++;
+ /* If the backslash or backslash-escape ends the string,
+ bail. The ++wpat skips over the backslash escape */
+ if (*wpat == 0 || *++wpat == 0)
+ {
+ matlen += bracklen;
+ goto bad_bracket;
+ }
+ }
+ else if (wc == L'[' && *wpat == L':') /* character class */
+ {
+ wpat++;
+ bracklen++;
+ in_cclass = 1;
+ }
+ else if (in_cclass && wc == L':' && *wpat == L']')
+ {
+ wpat++;
+ bracklen++;
+ in_cclass = 0;
+ }
+ else if (wc == L'[' && *wpat == L'.') /* collating symbol */
+ {
+ wpat++;
+ bracklen++;
+ if (*wpat == L']') /* right bracket can appear as collating symbol */
+ {
+ wpat++;
+ bracklen++;
+ }
+ in_collsym = 1;
+ }
+ else if (in_collsym && wc == L'.' && *wpat == L']')
+ {
+ wpat++;
+ bracklen++;
+ in_collsym = 0;
+ }
+ else if (wc == L'[' && *wpat == L'=') /* equivalence class */
+ {
+ wpat++;
+ bracklen++;
+ if (*wpat == L']') /* right bracket can appear as equivalence class */
+ {
+ wpat++;
+ bracklen++;
+ }
+ in_equiv = 1;
+ }
+ else if (in_equiv && wc == L'=' && *wpat == L']')
+ {
+ wpat++;
+ bracklen++;
+ in_equiv = 0;
+ }
+ else
+ bracklen++;
+ }
+ while ((wc = *wpat++) != L']');
+ matlen++; /* bracket expression can only match one char */
+bad_bracket:
+ break;
+ }
+ }
+
+ return matlen;
+}
+#endif
+
+int
+extglob_pattern (pat)
+ char *pat;
+{
+ switch (pat[0])
+ {
+ case '*':
+ case '+':
+ case '!':
+ case '@':
+ return (pat[1] == LPAREN);
+ default:
+ return 0;
+ }
+
+ return 0;
+}
+
+/* Return 1 of the first character of STRING could match the first
+ character of pattern PAT. Used to avoid n2 calls to strmatch(). */
+int
+match_pattern_char (pat, string)
+ char *pat, *string;
+{
+ char c;
+
+ if (*string == 0)
+ return (0);
+
+ switch (c = *pat++)
+ {
+ default:
+ return (*string == c);
+ case '\\':
+ return (*string == *pat);
+ case '?':
+ return (*pat == LPAREN ? 1 : (*string != '\0'));
+ case '*':
+ return (1);
+ case '+':
+ case '!':
+ case '@':
+ return (*pat == LPAREN ? 1 : (*string == c));
+ case '[':
+ return (*string != '\0');
+ }
+}
+
+int
+umatchlen (pat, max)
+ char *pat;
+ size_t max;
+{
+ char c;
+ int matlen, bracklen, t, in_cclass, in_collsym, in_equiv;
+
+ if (*pat == 0)
+ return (0);
+
+ matlen = in_cclass = in_collsym = in_equiv = 0;
+ while (c = *pat++)
+ {
+ switch (c)
+ {
+ default:
+ matlen++;
+ break;
+ case '\\':
+ if (*pat == 0)
+ return ++matlen;
+ else
+ {
+ matlen++;
+ pat++;
+ }
+ break;
+ case '?':
+ if (*pat == LPAREN)
+ return (matlen = -1); /* XXX for now */
+ else
+ matlen++;
+ break;
+ case '*':
+ return (matlen = -1);
+ case '+':
+ case '!':
+ case '@':
+ if (*pat == LPAREN)
+ return (matlen = -1); /* XXX for now */
+ else
+ matlen++;
+ break;
+ case '[':
+ /* scan for ending `]', skipping over embedded [:...:] */
+ bracklen = 1;
+ c = *pat++;
+ do
+ {
+ if (c == 0)
+ {
+ pat--; /* back up to NUL */
+ matlen += bracklen;
+ goto bad_bracket;
+ }
+ else if (c == '\\')
+ {
+ /* *pat == backslash-escaped character */
+ bracklen++;
+ /* If the backslash or backslash-escape ends the string,
+ bail. The ++pat skips over the backslash escape */
+ if (*pat == 0 || *++pat == 0)
+ {
+ matlen += bracklen;
+ goto bad_bracket;
+ }
+ }
+ else if (c == '[' && *pat == ':') /* character class */
+ {
+ pat++;
+ bracklen++;
+ in_cclass = 1;
+ }
+ else if (in_cclass && c == ':' && *pat == ']')
+ {
+ pat++;
+ bracklen++;
+ in_cclass = 0;
+ }
+ else if (c == '[' && *pat == '.') /* collating symbol */
+ {
+ pat++;
+ bracklen++;
+ if (*pat == ']') /* right bracket can appear as collating symbol */
+ {
+ pat++;
+ bracklen++;
+ }
+ in_collsym = 1;
+ }
+ else if (in_collsym && c == '.' && *pat == ']')
+ {
+ pat++;
+ bracklen++;
+ in_collsym = 0;
+ }
+ else if (c == '[' && *pat == '=') /* equivalence class */
+ {
+ pat++;
+ bracklen++;
+ if (*pat == ']') /* right bracket can appear as equivalence class */
+ {
+ pat++;
+ bracklen++;
+ }
+ in_equiv = 1;
+ }
+ else if (in_equiv && c == '=' && *pat == ']')
+ {
+ pat++;
+ bracklen++;
+ in_equiv = 0;
+ }
+ else
+ bracklen++;
+ }
+ while ((c = *pat++) != ']');
+ matlen++; /* bracket expression can only match one char */
+bad_bracket:
+ break;
+ }
+ }
+
+ return matlen;
+}
$(RM) $@
$(DVIPS) history.dvi
+# can also use:
+# $(MAKEINFO) --html --no-split
+# in place of
+# $(TEXI2HTML) -menu -monolithic
+
readline.html: ${RLSRC}
$(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texi
sed -e 's:rlman.html:readline.html:' rlman.html > readline.html
--- /dev/null
+# Derived by hand from the generated readline-src/doc/Makefile
+# This makefile for Readline library documentation is in -*- text -*- mode.
+# Emacs likes it that way.
+
+# Copyright (C) 1996-2002 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+topdir = .
+srcdir = .
+VPATH = .
+
+prefix = /usr/local
+infodir = ${prefix}/info
+
+mandir = ${prefix}/man
+manpfx = man
+
+man1ext = 1
+man1dir = $(mandir)/$(manpfx)$(man1ext)
+man3ext = 3
+man3dir = $(mandir)/$(manpfx)$(man3ext)
+
+SHELL = /bin/sh
+RM = rm -f
+
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+
+BUILD_DIR = .
+TEXINPUTDIR = $(srcdir)
+
+MAKEINFO = LANGUAGE= makeinfo
+TEXI2DVI = $(srcdir)/texi2dvi
+TEXI2HTML = $(srcdir)/texi2html
+QUIETPS = #set this to -q to shut up dvips
+PSDPI = 600
+DVIPS = dvips -D ${PSDPI} $(QUIETPS) -o $@ # tricky
+DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE}
+PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@
+
+RLSRC = $(srcdir)/rlman.texi $(srcdir)/rluser.texi \
+ $(srcdir)/rltech.texi $(srcdir)/version.texi \
+ $(srcdir)/rluserman.texi
+HISTSRC = $(srcdir)/history.texi $(srcdir)/hsuser.texi \
+ $(srcdir)/hstech.texi $(srcdir)/version.texi
+
+# This should be a program that converts troff to an ascii-readable format
+NROFF = groff -Tascii
+
+# This should be a program that converts troff to postscript
+GROFF = groff
+
+DVIOBJ = readline.dvi history.dvi rluserman.dvi
+INFOOBJ = readline.info history.info rluserman.info
+PSOBJ = readline.ps history.ps rluserman.ps
+HTMLOBJ = readline.html history.html rluserman.html
+PDFOBJ = readline.pdf history.pdf rluserman.pdf
+
+INTERMEDIATE_OBJ = rlman.dvi
+
+CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ) $(PDFOBJ)
+
+.SUFFIXES: .ps .txt .dvi .html .pdf
+
+.ps.pdf:
+ $(RM) $@
+ -${PSPDF} $<
+
+.dvi.pdf:
+ $(RM) $@
+ -${DVIPDF} $<
+
+all: info dvi html ps
+nodvi: info html
+pdf: $(PDFOBJ)
+
+readline.dvi: $(RLSRC)
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texi
+ mv rlman.dvi readline.dvi
+
+readline.info: $(RLSRC)
+ $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texi
+
+rluserman.dvi: $(RLSRC)
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texi
+
+rluserman.info: $(RLSRC)
+ $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texi
+
+history.dvi: ${HISTSRC}
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/history.texi
+
+history.info: ${HISTSRC}
+ $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/history.texi
+
+readline.ps: readline.dvi
+ $(RM) $@
+ $(DVIPS) readline.dvi
+
+rluserman.ps: rluserman.dvi
+ $(RM) $@
+ $(DVIPS) rluserman.dvi
+
+history.ps: history.dvi
+ $(RM) $@
+ $(DVIPS) history.dvi
+
+readline.html: ${RLSRC}
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texi
+ sed -e 's:rlman.html:readline.html:' rlman.html > readline.html
+ $(RM) rlman.html
+
+rluserman.html: ${RLSRC}
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texi
+
+history.html: ${HISTSRC}
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/history.texi
+
+info: $(INFOOBJ)
+dvi: $(DVIOBJ)
+ps: $(PSOBJ)
+html: $(HTMLOBJ)
+
+readline.pdf: readline.dvi
+history.pdf: history.dvi
+rluserman.pdf: rluserman.dvi
+
+clean:
+ $(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \
+ *.fns *.kys *.tps *.vrs *.bt *.bts *.o core *.core
+
+distclean: clean
+ $(RM) $(CREATED_DOCS)
+ $(RM) $(INTERMEDIATE_OBJ)
+ $(RM) Makefile
+
+mostlyclean: clean
+
+maintainer-clean: clean
+ $(RM) $(CREATED_DOCS)
+ $(RM) $(INTERMEDIATE_OBJ)
+ $(RM) Makefile
+
+install:
+ @echo "This documentation should not be installed."
+
+uninstall:
extern void _rl_free_history_entry PARAMS((HIST_ENTRY *));
+#if defined (COLOR_SUPPORT)
+extern void _rl_parse_colors PARAMS((void)); /* XXX */
+#endif
+
+
/* Forward declarations used in this file. */
static char *readline_internal PARAMS((void));
static void readline_initialize_everything PARAMS((void));
--- /dev/null
+/* readline.c -- a general facility for reading lines of input
+ with emacs style editing and completion. */
+
+/* Copyright (C) 1987-2013 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include "posixstat.h"
+#include <fcntl.h>
+#if defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif /* HAVE_SYS_FILE_H */
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#if defined (HAVE_LOCALE_H)
+# include <locale.h>
+#endif
+
+#include <stdio.h>
+#include "posixjmp.h"
+#include <errno.h>
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+#include "rlmbutil.h"
+
+#if defined (__EMX__)
+# define INCL_DOSPROCESS
+# include <os2.h>
+#endif /* __EMX__ */
+
+/* Some standard library routines. */
+#include "readline.h"
+#include "history.h"
+
+#include "rlprivate.h"
+#include "rlshell.h"
+#include "xmalloc.h"
+
+#ifndef RL_LIBRARY_VERSION
+# define RL_LIBRARY_VERSION "5.1"
+#endif
+
+#ifndef RL_READLINE_VERSION
+# define RL_READLINE_VERSION 0x0501
+#endif
+
+extern void _rl_free_history_entry PARAMS((HIST_ENTRY *));
+
+/* Forward declarations used in this file. */
+static char *readline_internal PARAMS((void));
+static void readline_initialize_everything PARAMS((void));
+
+static void bind_arrow_keys_internal PARAMS((Keymap));
+static void bind_arrow_keys PARAMS((void));
+
+static void readline_default_bindings PARAMS((void));
+static void reset_default_bindings PARAMS((void));
+
+static int _rl_subseq_result PARAMS((int, Keymap, int, int));
+static int _rl_subseq_getchar PARAMS((int));
+
+/* **************************************************************** */
+/* */
+/* Line editing input utility */
+/* */
+/* **************************************************************** */
+
+const char *rl_library_version = RL_LIBRARY_VERSION;
+
+int rl_readline_version = RL_READLINE_VERSION;
+
+/* True if this is `real' readline as opposed to some stub substitute. */
+int rl_gnu_readline_p = 1;
+
+/* A pointer to the keymap that is currently in use.
+ By default, it is the standard emacs keymap. */
+Keymap _rl_keymap = emacs_standard_keymap;
+
+/* The current style of editing. */
+int rl_editing_mode = emacs_mode;
+
+/* The current insert mode: input (the default) or overwrite */
+int rl_insert_mode = RL_IM_DEFAULT;
+
+/* Non-zero if we called this function from _rl_dispatch(). It's present
+ so functions can find out whether they were called from a key binding
+ or directly from an application. */
+int rl_dispatching;
+
+/* Non-zero if the previous command was a kill command. */
+int _rl_last_command_was_kill = 0;
+
+/* The current value of the numeric argument specified by the user. */
+int rl_numeric_arg = 1;
+
+/* Non-zero if an argument was typed. */
+int rl_explicit_arg = 0;
+
+/* Temporary value used while generating the argument. */
+int rl_arg_sign = 1;
+
+/* Non-zero means we have been called at least once before. */
+static int rl_initialized;
+
+#if 0
+/* If non-zero, this program is running in an EMACS buffer. */
+static int running_in_emacs;
+#endif
+
+/* Flags word encapsulating the current readline state. */
+int rl_readline_state = RL_STATE_NONE;
+
+/* The current offset in the current input line. */
+int rl_point;
+
+/* Mark in the current input line. */
+int rl_mark;
+
+/* Length of the current input line. */
+int rl_end;
+
+/* Make this non-zero to return the current input_line. */
+int rl_done;
+
+/* The last function executed by readline. */
+rl_command_func_t *rl_last_func = (rl_command_func_t *)NULL;
+
+/* Top level environment for readline_internal (). */
+procenv_t _rl_top_level;
+
+/* The streams we interact with. */
+FILE *_rl_in_stream, *_rl_out_stream;
+
+/* The names of the streams that we do input and output to. */
+FILE *rl_instream = (FILE *)NULL;
+FILE *rl_outstream = (FILE *)NULL;
+
+/* Non-zero means echo characters as they are read. Defaults to no echo;
+ set to 1 if there is a controlling terminal, we can get its attributes,
+ and the attributes include `echo'. Look at rltty.c:prepare_terminal_settings
+ for the code that sets it. */
+int _rl_echoing_p = 0;
+
+/* Current prompt. */
+char *rl_prompt = (char *)NULL;
+int rl_visible_prompt_length = 0;
+
+/* Set to non-zero by calling application if it has already printed rl_prompt
+ and does not want readline to do it the first time. */
+int rl_already_prompted = 0;
+
+/* The number of characters read in order to type this complete command. */
+int rl_key_sequence_length = 0;
+
+/* If non-zero, then this is the address of a function to call just
+ before readline_internal_setup () prints the first prompt. */
+rl_hook_func_t *rl_startup_hook = (rl_hook_func_t *)NULL;
+
+/* If non-zero, this is the address of a function to call just before
+ readline_internal_setup () returns and readline_internal starts
+ reading input characters. */
+rl_hook_func_t *rl_pre_input_hook = (rl_hook_func_t *)NULL;
+
+/* What we use internally. You should always refer to RL_LINE_BUFFER. */
+static char *the_line;
+
+/* The character that can generate an EOF. Really read from
+ the terminal driver... just defaulted here. */
+int _rl_eof_char = CTRL ('D');
+
+/* Non-zero makes this the next keystroke to read. */
+int rl_pending_input = 0;
+
+/* Pointer to a useful terminal name. */
+const char *rl_terminal_name = (const char *)NULL;
+
+/* Non-zero means to always use horizontal scrolling in line display. */
+int _rl_horizontal_scroll_mode = 0;
+
+/* Non-zero means to display an asterisk at the starts of history lines
+ which have been modified. */
+int _rl_mark_modified_lines = 0;
+
+/* The style of `bell' notification preferred. This can be set to NO_BELL,
+ AUDIBLE_BELL, or VISIBLE_BELL. */
+int _rl_bell_preference = AUDIBLE_BELL;
+
+/* String inserted into the line by rl_insert_comment (). */
+char *_rl_comment_begin;
+
+/* Keymap holding the function currently being executed. */
+Keymap rl_executing_keymap;
+
+/* Keymap we're currently using to dispatch. */
+Keymap _rl_dispatching_keymap;
+
+/* Non-zero means to erase entire line, including prompt, on empty input lines. */
+int rl_erase_empty_line = 0;
+
+/* Non-zero means to read only this many characters rather than up to a
+ character bound to accept-line. */
+int rl_num_chars_to_read;
+
+/* Line buffer and maintenance. */
+char *rl_line_buffer = (char *)NULL;
+int rl_line_buffer_len = 0;
+
+/* Key sequence `contexts' */
+_rl_keyseq_cxt *_rl_kscxt = 0;
+
+int rl_executing_key;
+char *rl_executing_keyseq = 0;
+int _rl_executing_keyseq_size = 0;
+
+/* Timeout (specified in milliseconds) when reading characters making up an
+ ambiguous multiple-key sequence */
+int _rl_keyseq_timeout = 500;
+
+#define RESIZE_KEYSEQ_BUFFER() \
+ do \
+ { \
+ if (rl_key_sequence_length + 2 >= _rl_executing_keyseq_size) \
+ { \
+ _rl_executing_keyseq_size += 16; \
+ rl_executing_keyseq = xrealloc (rl_executing_keyseq, _rl_executing_keyseq_size); \
+ } \
+ } \
+ while (0);
+
+/* Forward declarations used by the display, termcap, and history code. */
+
+/* **************************************************************** */
+/* */
+/* `Forward' declarations */
+/* */
+/* **************************************************************** */
+
+/* Non-zero means do not parse any lines other than comments and
+ parser directives. */
+unsigned char _rl_parsing_conditionalized_out = 0;
+
+/* Non-zero means to convert characters with the meta bit set to
+ escape-prefixed characters so we can indirect through
+ emacs_meta_keymap or vi_escape_keymap. */
+int _rl_convert_meta_chars_to_ascii = 1;
+
+/* Non-zero means to output characters with the meta bit set directly
+ rather than as a meta-prefixed escape sequence. */
+int _rl_output_meta_chars = 0;
+
+/* Non-zero means to look at the termios special characters and bind
+ them to equivalent readline functions at startup. */
+int _rl_bind_stty_chars = 1;
+
+/* Non-zero means to go through the history list at every newline (or
+ whenever rl_done is set and readline returns) and revert each line to
+ its initial state. */
+int _rl_revert_all_at_newline = 0;
+
+/* Non-zero means to honor the termios ECHOCTL bit and echo control
+ characters corresponding to keyboard-generated signals. */
+int _rl_echo_control_chars = 1;
+
+/* Non-zero means to prefix the displayed prompt with a character indicating
+ the editing mode: @ for emacs, : for vi-command, + for vi-insert. */
+int _rl_show_mode_in_prompt = 0;
+
+/* **************************************************************** */
+/* */
+/* Top Level Functions */
+/* */
+/* **************************************************************** */
+
+/* Non-zero means treat 0200 bit in terminal input as Meta bit. */
+int _rl_meta_flag = 0; /* Forward declaration */
+
+/* Set up the prompt and expand it. Called from readline() and
+ rl_callback_handler_install (). */
+int
+rl_set_prompt (prompt)
+ const char *prompt;
+{
+ FREE (rl_prompt);
+ rl_prompt = prompt ? savestring (prompt) : (char *)NULL;
+ rl_display_prompt = rl_prompt ? rl_prompt : "";
+
+ rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
+ return 0;
+}
+
+/* Read a line of input. Prompt with PROMPT. An empty PROMPT means
+ none. A return value of NULL means that EOF was encountered. */
+char *
+readline (prompt)
+ const char *prompt;
+{
+ char *value;
+#if 0
+ int in_callback;
+#endif
+
+ /* If we are at EOF return a NULL string. */
+ if (rl_pending_input == EOF)
+ {
+ rl_clear_pending_input ();
+ return ((char *)NULL);
+ }
+
+#if 0
+ /* If readline() is called after installing a callback handler, temporarily
+ turn off the callback state to avoid ensuing messiness. Patch supplied
+ by the gdb folks. XXX -- disabled. This can be fooled and readline
+ left in a strange state by a poorly-timed longjmp. */
+ if (in_callback = RL_ISSTATE (RL_STATE_CALLBACK))
+ RL_UNSETSTATE (RL_STATE_CALLBACK);
+#endif
+
+ rl_set_prompt (prompt);
+
+ rl_initialize ();
+ if (rl_prep_term_function)
+ (*rl_prep_term_function) (_rl_meta_flag);
+
+#if defined (HANDLE_SIGNALS)
+ rl_set_signals ();
+#endif
+
+ value = readline_internal ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
+
+#if defined (HANDLE_SIGNALS)
+ rl_clear_signals ();
+#endif
+
+#if 0
+ if (in_callback)
+ RL_SETSTATE (RL_STATE_CALLBACK);
+#endif
+
+#if HAVE_DECL_AUDIT_TTY && defined (ENABLE_TTY_AUDIT_SUPPORT)
+ if (value)
+ _rl_audit_tty (value);
+#endif
+
+ return (value);
+}
+
+#if defined (READLINE_CALLBACKS)
+# define STATIC_CALLBACK
+#else
+# define STATIC_CALLBACK static
+#endif
+
+STATIC_CALLBACK void
+readline_internal_setup ()
+{
+ char *nprompt;
+
+ _rl_in_stream = rl_instream;
+ _rl_out_stream = rl_outstream;
+
+ /* Enable the meta key only for the duration of readline(), if this
+ terminal has one and the terminal has been initialized */
+ if (_rl_enable_meta & RL_ISSTATE (RL_STATE_TERMPREPPED))
+ _rl_enable_meta_key ();
+
+ if (rl_startup_hook)
+ (*rl_startup_hook) ();
+
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ rl_vi_insertion_mode (1, 'i'); /* don't want to reset last */
+#endif /* VI_MODE */
+
+ /* If we're not echoing, we still want to at least print a prompt, because
+ rl_redisplay will not do it for us. If the calling application has a
+ custom redisplay function, though, let that function handle it. */
+ if (_rl_echoing_p == 0 && rl_redisplay_function == rl_redisplay)
+ {
+ if (rl_prompt && rl_already_prompted == 0)
+ {
+ nprompt = _rl_strip_prompt (rl_prompt);
+ fprintf (_rl_out_stream, "%s", nprompt);
+ fflush (_rl_out_stream);
+ xfree (nprompt);
+ }
+ }
+ else
+ {
+ if (rl_prompt && rl_already_prompted)
+ rl_on_new_line_with_prompt ();
+ else
+ rl_on_new_line ();
+ (*rl_redisplay_function) ();
+ }
+
+ if (rl_pre_input_hook)
+ (*rl_pre_input_hook) ();
+
+ RL_CHECK_SIGNALS ();
+}
+
+STATIC_CALLBACK char *
+readline_internal_teardown (eof)
+ int eof;
+{
+ char *temp;
+ HIST_ENTRY *entry;
+
+ RL_CHECK_SIGNALS ();
+
+ /* Restore the original of this history line, iff the line that we
+ are editing was originally in the history, AND the line has changed. */
+ entry = current_history ();
+
+ if (entry && rl_undo_list)
+ {
+ temp = savestring (the_line);
+ rl_revert_line (1, 0);
+ entry = replace_history_entry (where_history (), the_line, (histdata_t)NULL);
+ _rl_free_history_entry (entry);
+
+ strcpy (the_line, temp);
+ xfree (temp);
+ }
+
+ if (_rl_revert_all_at_newline)
+ _rl_revert_all_lines ();
+
+ /* At any rate, it is highly likely that this line has an undo list. Get
+ rid of it now. */
+ if (rl_undo_list)
+ rl_free_undo_list ();
+
+ /* Disable the meta key, if this terminal has one and we were told to use it.
+ The check whether or not we sent the enable string is in
+ _rl_disable_meta_key(); the flag is set in _rl_enable_meta_key */
+ _rl_disable_meta_key ();
+
+ /* Restore normal cursor, if available. */
+ _rl_set_insert_mode (RL_IM_INSERT, 0);
+
+ return (eof ? (char *)NULL : savestring (the_line));
+}
+
+void
+_rl_internal_char_cleanup ()
+{
+#if defined (VI_MODE)
+ /* In vi mode, when you exit insert mode, the cursor moves back
+ over the previous character. We explicitly check for that here. */
+ if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap)
+ rl_vi_check ();
+#endif /* VI_MODE */
+
+ if (rl_num_chars_to_read && rl_end >= rl_num_chars_to_read)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ rl_newline (1, '\n');
+ }
+
+ if (rl_done == 0)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ }
+
+ /* If the application writer has told us to erase the entire line if
+ the only character typed was something bound to rl_newline, do so. */
+ if (rl_erase_empty_line && rl_done && rl_last_func == rl_newline &&
+ rl_point == 0 && rl_end == 0)
+ _rl_erase_entire_line ();
+}
+
+STATIC_CALLBACK int
+#if defined (READLINE_CALLBACKS)
+readline_internal_char ()
+#else
+readline_internal_charloop ()
+#endif
+{
+ static int lastc, eof_found;
+ int c, code, lk;
+
+ lastc = -1;
+ eof_found = 0;
+
+#if !defined (READLINE_CALLBACKS)
+ while (rl_done == 0)
+ {
+#endif
+ lk = _rl_last_command_was_kill;
+
+#if defined (HAVE_POSIX_SIGSETJMP)
+ code = sigsetjmp (_rl_top_level, 0);
+#else
+ code = setjmp (_rl_top_level);
+#endif
+
+ if (code)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ /* If we get here, we're not being called from something dispatched
+ from _rl_callback_read_char(), which sets up its own value of
+ _rl_top_level (saving and restoring the old, of course), so
+ we can just return here. */
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ return (0);
+ }
+
+ if (rl_pending_input == 0)
+ {
+ /* Then initialize the argument and number of keys read. */
+ _rl_reset_argument ();
+ rl_key_sequence_length = 0;
+ rl_executing_keyseq[0] = 0;
+ }
+
+ RL_SETSTATE(RL_STATE_READCMD);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_READCMD);
+
+ /* look at input.c:rl_getc() for the circumstances under which this will
+ be returned; punt immediately on read error without converting it to
+ a newline; assume that rl_read_key has already called the signal
+ handler. */
+ if (c == READERR)
+ {
+#if defined (READLINE_CALLBACKS)
+ RL_SETSTATE(RL_STATE_DONE);
+ return (rl_done = 1);
+#else
+ eof_found = 1;
+ break;
+#endif
+ }
+
+ /* EOF typed to a non-blank line is a <NL>. If we want to change this,
+ to force any existing line to be ignored when read(2) reads EOF,
+ for example, this is the place to change. */
+ if (c == EOF && rl_end)
+ c = NEWLINE;
+
+ /* The character _rl_eof_char typed to blank line, and not as the
+ previous character is interpreted as EOF. */
+ if (((c == _rl_eof_char && lastc != c) || c == EOF) && !rl_end)
+ {
+#if defined (READLINE_CALLBACKS)
+ RL_SETSTATE(RL_STATE_DONE);
+ return (rl_done = 1);
+#else
+ eof_found = 1;
+ break;
+#endif
+ }
+
+ lastc = c;
+ _rl_dispatch ((unsigned char)c, _rl_keymap);
+ RL_CHECK_SIGNALS ();
+
+ /* If there was no change in _rl_last_command_was_kill, then no kill
+ has taken place. Note that if input is pending we are reading
+ a prefix command, so nothing has changed yet. */
+ if (rl_pending_input == 0 && lk == _rl_last_command_was_kill)
+ _rl_last_command_was_kill = 0;
+
+ _rl_internal_char_cleanup ();
+
+#if defined (READLINE_CALLBACKS)
+ return 0;
+#else
+ }
+
+ return (eof_found);
+#endif
+}
+
+#if defined (READLINE_CALLBACKS)
+static int
+readline_internal_charloop ()
+{
+ int eof = 1;
+
+ while (rl_done == 0)
+ eof = readline_internal_char ();
+ return (eof);
+}
+#endif /* READLINE_CALLBACKS */
+
+/* Read a line of input from the global rl_instream, doing output on
+ the global rl_outstream.
+ If rl_prompt is non-null, then that is our prompt. */
+static char *
+readline_internal ()
+{
+ int eof;
+
+ readline_internal_setup ();
+ eof = readline_internal_charloop ();
+ return (readline_internal_teardown (eof));
+}
+
+void
+_rl_init_line_state ()
+{
+ rl_point = rl_end = rl_mark = 0;
+ the_line = rl_line_buffer;
+ the_line[0] = 0;
+}
+
+void
+_rl_set_the_line ()
+{
+ the_line = rl_line_buffer;
+}
+
+#if defined (READLINE_CALLBACKS)
+_rl_keyseq_cxt *
+_rl_keyseq_cxt_alloc ()
+{
+ _rl_keyseq_cxt *cxt;
+
+ cxt = (_rl_keyseq_cxt *)xmalloc (sizeof (_rl_keyseq_cxt));
+
+ cxt->flags = cxt->subseq_arg = cxt->subseq_retval = 0;
+
+ cxt->okey = 0;
+ cxt->ocxt = _rl_kscxt;
+ cxt->childval = 42; /* sentinel value */
+
+ return cxt;
+}
+
+void
+_rl_keyseq_cxt_dispose (cxt)
+ _rl_keyseq_cxt *cxt;
+{
+ xfree (cxt);
+}
+
+void
+_rl_keyseq_chain_dispose ()
+{
+ _rl_keyseq_cxt *cxt;
+
+ while (_rl_kscxt)
+ {
+ cxt = _rl_kscxt;
+ _rl_kscxt = _rl_kscxt->ocxt;
+ _rl_keyseq_cxt_dispose (cxt);
+ }
+}
+#endif
+
+static int
+_rl_subseq_getchar (key)
+ int key;
+{
+ int k;
+
+ if (key == ESC)
+ RL_SETSTATE(RL_STATE_METANEXT);
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ k = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ if (key == ESC)
+ RL_UNSETSTATE(RL_STATE_METANEXT);
+
+ return k;
+}
+
+#if defined (READLINE_CALLBACKS)
+int
+_rl_dispatch_callback (cxt)
+ _rl_keyseq_cxt *cxt;
+{
+ int nkey, r;
+
+ /* For now */
+ /* The first time this context is used, we want to read input and dispatch
+ on it. When traversing the chain of contexts back `up', we want to use
+ the value from the next context down. We're simulating recursion using
+ a chain of contexts. */
+ if ((cxt->flags & KSEQ_DISPATCHED) == 0)
+ {
+ nkey = _rl_subseq_getchar (cxt->okey);
+ if (nkey < 0)
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+ r = _rl_dispatch_subseq (nkey, cxt->dmap, cxt->subseq_arg);
+ cxt->flags |= KSEQ_DISPATCHED;
+ }
+ else
+ r = cxt->childval;
+
+ /* For now */
+ if (r != -3) /* don't do this if we indicate there will be other matches */
+ r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
+
+ RL_CHECK_SIGNALS ();
+ if (r == 0) /* success! */
+ {
+ _rl_keyseq_chain_dispose ();
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);
+ return r;
+ }
+
+ if (r != -3) /* magic value that says we added to the chain */
+ _rl_kscxt = cxt->ocxt;
+ if (_rl_kscxt)
+ _rl_kscxt->childval = r;
+ if (r != -3)
+ _rl_keyseq_cxt_dispose (cxt);
+
+ return r;
+}
+#endif /* READLINE_CALLBACKS */
+
+/* Do the command associated with KEY in MAP.
+ If the associated command is really a keymap, then read
+ another key, and dispatch into that map. */
+int
+_rl_dispatch (key, map)
+ register int key;
+ Keymap map;
+{
+ _rl_dispatching_keymap = map;
+ return _rl_dispatch_subseq (key, map, 0);
+}
+
+int
+_rl_dispatch_subseq (key, map, got_subseq)
+ register int key;
+ Keymap map;
+ int got_subseq;
+{
+ int r, newkey;
+ char *macro;
+ rl_command_func_t *func;
+#if defined (READLINE_CALLBACKS)
+ _rl_keyseq_cxt *cxt;
+#endif
+
+ if (META_CHAR (key) && _rl_convert_meta_chars_to_ascii)
+ {
+ if (map[ESC].type == ISKMAP)
+ {
+ if (RL_ISSTATE (RL_STATE_MACRODEF))
+ _rl_add_macro_char (ESC);
+ RESIZE_KEYSEQ_BUFFER ();
+ rl_executing_keyseq[rl_key_sequence_length++] = ESC;
+ map = FUNCTION_TO_KEYMAP (map, ESC);
+ key = UNMETA (key);
+ return (_rl_dispatch (key, map));
+ }
+ else
+ rl_ding ();
+ return 0;
+ }
+
+ if (RL_ISSTATE (RL_STATE_MACRODEF))
+ _rl_add_macro_char (key);
+
+ r = 0;
+ switch (map[key].type)
+ {
+ case ISFUNC:
+ func = map[key].function;
+ if (func)
+ {
+ /* Special case rl_do_lowercase_version (). */
+ if (func == rl_do_lowercase_version)
+ /* Should we do anything special if key == ANYOTHERKEY? */
+ return (_rl_dispatch (_rl_to_lower (key), map));
+
+ rl_executing_keymap = map;
+ rl_executing_key = key;
+
+ RESIZE_KEYSEQ_BUFFER();
+ rl_executing_keyseq[rl_key_sequence_length++] = key;
+ rl_executing_keyseq[rl_key_sequence_length] = '\0';
+
+ rl_dispatching = 1;
+ RL_SETSTATE(RL_STATE_DISPATCHING);
+ r = (*func) (rl_numeric_arg * rl_arg_sign, key);
+ RL_UNSETSTATE(RL_STATE_DISPATCHING);
+ rl_dispatching = 0;
+
+ /* If we have input pending, then the last command was a prefix
+ command. Don't change the state of rl_last_func. Otherwise,
+ remember the last command executed in this variable. */
+ if (rl_pending_input == 0 && map[key].function != rl_digit_argument)
+ rl_last_func = map[key].function;
+
+ RL_CHECK_SIGNALS ();
+ }
+ else if (map[ANYOTHERKEY].function)
+ {
+ /* OK, there's no function bound in this map, but there is a
+ shadow function that was overridden when the current keymap
+ was created. Return -2 to note that. */
+ if (RL_ISSTATE (RL_STATE_MACROINPUT))
+ _rl_prev_macro_key ();
+ else
+ _rl_unget_char (key);
+ return -2;
+ }
+ else if (got_subseq)
+ {
+ /* Return -1 to note that we're in a subsequence, but we don't
+ have a matching key, nor was one overridden. This means
+ we need to back up the recursion chain and find the last
+ subsequence that is bound to a function. */
+ if (RL_ISSTATE (RL_STATE_MACROINPUT))
+ _rl_prev_macro_key ();
+ else
+ _rl_unget_char (key);
+ return -1;
+ }
+ else
+ {
+#if defined (READLINE_CALLBACKS)
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);
+ _rl_keyseq_chain_dispose ();
+#endif
+ _rl_abort_internal ();
+ return -1;
+ }
+ break;
+
+ case ISKMAP:
+ if (map[key].function != 0)
+ {
+#if defined (VI_MODE)
+ /* The only way this test will be true is if a subsequence has been
+ bound starting with ESC, generally the arrow keys. What we do is
+ check whether there's input in the queue, which there generally
+ will be if an arrow key has been pressed, and, if there's not,
+ just dispatch to (what we assume is) rl_vi_movement_mode right
+ away. This is essentially an input test with a zero timeout (by
+ default) or a timeout determined by the value of `keyseq-timeout' */
+ /* _rl_keyseq_timeout specified in milliseconds; _rl_input_queued
+ takes microseconds, so multiply by 1000 */
+ if (rl_editing_mode == vi_mode && key == ESC && map == vi_insertion_keymap
+ && _rl_input_queued ((_rl_keyseq_timeout > 0) ? _rl_keyseq_timeout*1000 : 0) == 0)
+ return (_rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key)));
+#endif
+
+ RESIZE_KEYSEQ_BUFFER ();
+ rl_executing_keyseq[rl_key_sequence_length++] = key;
+ _rl_dispatching_keymap = FUNCTION_TO_KEYMAP (map, key);
+
+ /* Allocate new context here. Use linked contexts (linked through
+ cxt->ocxt) to simulate recursion */
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ /* Return 0 only the first time, to indicate success to
+ _rl_callback_read_char. The rest of the time, we're called
+ from _rl_dispatch_callback, so we return -3 to indicate
+ special handling is necessary. */
+ r = RL_ISSTATE (RL_STATE_MULTIKEY) ? -3 : 0;
+ cxt = _rl_keyseq_cxt_alloc ();
+
+ if (got_subseq)
+ cxt->flags |= KSEQ_SUBSEQ;
+ cxt->okey = key;
+ cxt->oldmap = map;
+ cxt->dmap = _rl_dispatching_keymap;
+ cxt->subseq_arg = got_subseq || cxt->dmap[ANYOTHERKEY].function;
+
+ RL_SETSTATE (RL_STATE_MULTIKEY);
+ _rl_kscxt = cxt;
+
+ return r; /* don't indicate immediate success */
+ }
+#endif
+
+ /* Tentative inter-character timeout for potential multi-key
+ sequences? If no input within timeout, abort sequence and
+ act as if we got non-matching input. */
+ /* _rl_keyseq_timeout specified in milliseconds; _rl_input_queued
+ takes microseconds, so multiply by 1000 */
+ if (_rl_keyseq_timeout > 0 &&
+ (RL_ISSTATE (RL_STATE_INPUTPENDING|RL_STATE_MACROINPUT) == 0) &&
+ _rl_pushed_input_available () == 0 &&
+ _rl_dispatching_keymap[ANYOTHERKEY].function &&
+ _rl_input_queued (_rl_keyseq_timeout*1000) == 0)
+ return (_rl_subseq_result (-2, map, key, got_subseq));
+
+ newkey = _rl_subseq_getchar (key);
+ if (newkey < 0)
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+
+ r = _rl_dispatch_subseq (newkey, _rl_dispatching_keymap, got_subseq || map[ANYOTHERKEY].function);
+ return _rl_subseq_result (r, map, key, got_subseq);
+ }
+ else
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+ break;
+
+ case ISMACR:
+ if (map[key].function != 0)
+ {
+ rl_executing_keyseq[rl_key_sequence_length] = '\0';
+ macro = savestring ((char *)map[key].function);
+ _rl_with_macro_input (macro);
+ return 0;
+ }
+ break;
+ }
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
+ key != ANYOTHERKEY &&
+ rl_key_sequence_length == 1 && /* XXX */
+ _rl_vi_textmod_command (key))
+ _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
+#endif
+
+ return (r);
+}
+
+static int
+_rl_subseq_result (r, map, key, got_subseq)
+ int r;
+ Keymap map;
+ int key, got_subseq;
+{
+ Keymap m;
+ int type, nt;
+ rl_command_func_t *func, *nf;
+
+ if (r == -2)
+ /* We didn't match anything, and the keymap we're indexed into
+ shadowed a function previously bound to that prefix. Call
+ the function. The recursive call to _rl_dispatch_subseq has
+ already taken care of pushing any necessary input back onto
+ the input queue with _rl_unget_char. */
+ {
+ m = _rl_dispatching_keymap;
+ type = m[ANYOTHERKEY].type;
+ func = m[ANYOTHERKEY].function;
+ if (type == ISFUNC && func == rl_do_lowercase_version)
+ r = _rl_dispatch (_rl_to_lower (key), map);
+ else if (type == ISFUNC && func == rl_insert)
+ {
+ /* If the function that was shadowed was self-insert, we
+ somehow need a keymap with map[key].func == self-insert.
+ Let's use this one. */
+ nt = m[key].type;
+ nf = m[key].function;
+
+ m[key].type = type;
+ m[key].function = func;
+ r = _rl_dispatch (key, m);
+ m[key].type = nt;
+ m[key].function = nf;
+ }
+ else
+ r = _rl_dispatch (ANYOTHERKEY, m);
+ }
+ else if (r && map[ANYOTHERKEY].function)
+ {
+ /* We didn't match (r is probably -1), so return something to
+ tell the caller that it should try ANYOTHERKEY for an
+ overridden function. */
+ if (RL_ISSTATE (RL_STATE_MACROINPUT))
+ _rl_prev_macro_key ();
+ else
+ _rl_unget_char (key);
+ _rl_dispatching_keymap = map;
+ return -2;
+ }
+ else if (r && got_subseq)
+ {
+ /* OK, back up the chain. */
+ if (RL_ISSTATE (RL_STATE_MACROINPUT))
+ _rl_prev_macro_key ();
+ else
+ _rl_unget_char (key);
+ _rl_dispatching_keymap = map;
+ return -1;
+ }
+
+ return r;
+}
+
+/* **************************************************************** */
+/* */
+/* Initializations */
+/* */
+/* **************************************************************** */
+
+/* Initialize readline (and terminal if not already). */
+int
+rl_initialize ()
+{
+ /* If we have never been called before, initialize the
+ terminal and data structures. */
+ if (!rl_initialized)
+ {
+ RL_SETSTATE(RL_STATE_INITIALIZING);
+ readline_initialize_everything ();
+ RL_UNSETSTATE(RL_STATE_INITIALIZING);
+ rl_initialized++;
+ RL_SETSTATE(RL_STATE_INITIALIZED);
+ }
+
+ /* Initialize the current line information. */
+ _rl_init_line_state ();
+
+ /* We aren't done yet. We haven't even gotten started yet! */
+ rl_done = 0;
+ RL_UNSETSTATE(RL_STATE_DONE);
+
+ /* Tell the history routines what is going on. */
+ _rl_start_using_history ();
+
+ /* Make the display buffer match the state of the line. */
+ rl_reset_line_state ();
+
+ /* No such function typed yet. */
+ rl_last_func = (rl_command_func_t *)NULL;
+
+ /* Parsing of key-bindings begins in an enabled state. */
+ _rl_parsing_conditionalized_out = 0;
+
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ _rl_vi_initialize_line ();
+#endif
+
+ /* Each line starts in insert mode (the default). */
+ _rl_set_insert_mode (RL_IM_DEFAULT, 1);
+
+ return 0;
+}
+
+#if 0
+#if defined (__EMX__)
+static void
+_emx_build_environ ()
+{
+ TIB *tibp;
+ PIB *pibp;
+ char *t, **tp;
+ int c;
+
+ DosGetInfoBlocks (&tibp, &pibp);
+ t = pibp->pib_pchenv;
+ for (c = 1; *t; c++)
+ t += strlen (t) + 1;
+ tp = environ = (char **)xmalloc ((c + 1) * sizeof (char *));
+ t = pibp->pib_pchenv;
+ while (*t)
+ {
+ *tp++ = t;
+ t += strlen (t) + 1;
+ }
+ *tp = 0;
+}
+#endif /* __EMX__ */
+#endif
+
+/* Initialize the entire state of the world. */
+static void
+readline_initialize_everything ()
+{
+#if 0
+#if defined (__EMX__)
+ if (environ == 0)
+ _emx_build_environ ();
+#endif
+#endif
+
+#if 0
+ /* Find out if we are running in Emacs -- UNUSED. */
+ running_in_emacs = sh_get_env_value ("EMACS") != (char *)0;
+#endif
+
+ /* Set up input and output if they are not already set up. */
+ if (!rl_instream)
+ rl_instream = stdin;
+
+ if (!rl_outstream)
+ rl_outstream = stdout;
+
+ /* Bind _rl_in_stream and _rl_out_stream immediately. These values
+ may change, but they may also be used before readline_internal ()
+ is called. */
+ _rl_in_stream = rl_instream;
+ _rl_out_stream = rl_outstream;
+
+ /* Allocate data structures. */
+ if (rl_line_buffer == 0)
+ rl_line_buffer = (char *)xmalloc (rl_line_buffer_len = DEFAULT_BUFFER_SIZE);
+
+ /* Initialize the terminal interface. */
+ if (rl_terminal_name == 0)
+ rl_terminal_name = sh_get_env_value ("TERM");
+ _rl_init_terminal_io (rl_terminal_name);
+
+ /* Bind tty characters to readline functions. */
+ readline_default_bindings ();
+
+ /* Initialize the function names. */
+ rl_initialize_funmap ();
+
+ /* Decide whether we should automatically go into eight-bit mode. */
+ _rl_init_eightbit ();
+
+ /* Read in the init file. */
+ rl_read_init_file ((char *)NULL);
+
+ /* XXX */
+ if (_rl_horizontal_scroll_mode && _rl_term_autowrap)
+ {
+ _rl_screenwidth--;
+ _rl_screenchars -= _rl_screenheight;
+ }
+
+ /* Override the effect of any `set keymap' assignments in the
+ inputrc file. */
+ rl_set_keymap_from_edit_mode ();
+
+ /* Try to bind a common arrow key prefix, if not already bound. */
+ bind_arrow_keys ();
+
+ /* If the completion parser's default word break characters haven't
+ been set yet, then do so now. */
+ if (rl_completer_word_break_characters == (char *)NULL)
+ rl_completer_word_break_characters = (char *)rl_basic_word_break_characters;
+
+#if defined (COLOR_SUPPORT)
+ if (_rl_colored_stats)
+ _rl_parse_colors ();
+#endif
+
+ rl_executing_keyseq = malloc (_rl_executing_keyseq_size = 16);
+ if (rl_executing_keyseq)
+ rl_executing_keyseq[0] = '\0';
+}
+
+/* If this system allows us to look at the values of the regular
+ input editing characters, then bind them to their readline
+ equivalents, iff the characters are not bound to keymaps. */
+static void
+readline_default_bindings ()
+{
+ if (_rl_bind_stty_chars)
+ rl_tty_set_default_bindings (_rl_keymap);
+}
+
+/* Reset the default bindings for the terminal special characters we're
+ interested in back to rl_insert and read the new ones. */
+static void
+reset_default_bindings ()
+{
+ if (_rl_bind_stty_chars)
+ {
+ rl_tty_unset_default_bindings (_rl_keymap);
+ rl_tty_set_default_bindings (_rl_keymap);
+ }
+}
+
+/* Bind some common arrow key sequences in MAP. */
+static void
+bind_arrow_keys_internal (map)
+ Keymap map;
+{
+ Keymap xkeymap;
+
+ xkeymap = _rl_keymap;
+ _rl_keymap = map;
+
+#if defined (__MSDOS__)
+ rl_bind_keyseq_if_unbound ("\033[0A", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\033[0B", rl_backward_char);
+ rl_bind_keyseq_if_unbound ("\033[0C", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\033[0D", rl_get_next_history);
+#endif
+
+ rl_bind_keyseq_if_unbound ("\033[A", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\033[B", rl_get_next_history);
+ rl_bind_keyseq_if_unbound ("\033[C", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\033[D", rl_backward_char);
+ rl_bind_keyseq_if_unbound ("\033[H", rl_beg_of_line);
+ rl_bind_keyseq_if_unbound ("\033[F", rl_end_of_line);
+
+ rl_bind_keyseq_if_unbound ("\033OA", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\033OB", rl_get_next_history);
+ rl_bind_keyseq_if_unbound ("\033OC", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\033OD", rl_backward_char);
+ rl_bind_keyseq_if_unbound ("\033OH", rl_beg_of_line);
+ rl_bind_keyseq_if_unbound ("\033OF", rl_end_of_line);
+
+#if defined (__MINGW32__)
+ rl_bind_keyseq_if_unbound ("\340H", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\340P", rl_get_next_history);
+ rl_bind_keyseq_if_unbound ("\340M", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\340K", rl_backward_char);
+ rl_bind_keyseq_if_unbound ("\340G", rl_beg_of_line);
+ rl_bind_keyseq_if_unbound ("\340O", rl_end_of_line);
+ rl_bind_keyseq_if_unbound ("\340S", rl_delete);
+ rl_bind_keyseq_if_unbound ("\340R", rl_overwrite_mode);
+
+ /* These may or may not work because of the embedded NUL. */
+ rl_bind_keyseq_if_unbound ("\\000H", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\\000P", rl_get_next_history);
+ rl_bind_keyseq_if_unbound ("\\000M", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\\000K", rl_backward_char);
+ rl_bind_keyseq_if_unbound ("\\000G", rl_beg_of_line);
+ rl_bind_keyseq_if_unbound ("\\000O", rl_end_of_line);
+ rl_bind_keyseq_if_unbound ("\\000S", rl_delete);
+ rl_bind_keyseq_if_unbound ("\\000R", rl_overwrite_mode);
+#endif
+
+ _rl_keymap = xkeymap;
+}
+
+/* Try and bind the common arrow key prefixes after giving termcap and
+ the inputrc file a chance to bind them and create `real' keymaps
+ for the arrow key prefix. */
+static void
+bind_arrow_keys ()
+{
+ bind_arrow_keys_internal (emacs_standard_keymap);
+
+#if defined (VI_MODE)
+ bind_arrow_keys_internal (vi_movement_keymap);
+ /* Unbind vi_movement_keymap[ESC] to allow users to repeatedly hit ESC
+ in vi command mode while still allowing the arrow keys to work. */
+ if (vi_movement_keymap[ESC].type == ISKMAP)
+ rl_bind_keyseq_in_map ("\033", (rl_command_func_t *)NULL, vi_movement_keymap);
+ bind_arrow_keys_internal (vi_insertion_keymap);
+#endif
+}
+
+/* **************************************************************** */
+/* */
+/* Saving and Restoring Readline's state */
+/* */
+/* **************************************************************** */
+
+int
+rl_save_state (sp)
+ struct readline_state *sp;
+{
+ if (sp == 0)
+ return -1;
+
+ sp->point = rl_point;
+ sp->end = rl_end;
+ sp->mark = rl_mark;
+ sp->buffer = rl_line_buffer;
+ sp->buflen = rl_line_buffer_len;
+ sp->ul = rl_undo_list;
+ sp->prompt = rl_prompt;
+
+ sp->rlstate = rl_readline_state;
+ sp->done = rl_done;
+ sp->kmap = _rl_keymap;
+
+ sp->lastfunc = rl_last_func;
+ sp->insmode = rl_insert_mode;
+ sp->edmode = rl_editing_mode;
+ sp->kseqlen = rl_key_sequence_length;
+ sp->inf = rl_instream;
+ sp->outf = rl_outstream;
+ sp->pendingin = rl_pending_input;
+ sp->macro = rl_executing_macro;
+
+ sp->catchsigs = rl_catch_signals;
+ sp->catchsigwinch = rl_catch_sigwinch;
+
+ return (0);
+}
+
+int
+rl_restore_state (sp)
+ struct readline_state *sp;
+{
+ if (sp == 0)
+ return -1;
+
+ rl_point = sp->point;
+ rl_end = sp->end;
+ rl_mark = sp->mark;
+ the_line = rl_line_buffer = sp->buffer;
+ rl_line_buffer_len = sp->buflen;
+ rl_undo_list = sp->ul;
+ rl_prompt = sp->prompt;
+
+ rl_readline_state = sp->rlstate;
+ rl_done = sp->done;
+ _rl_keymap = sp->kmap;
+
+ rl_last_func = sp->lastfunc;
+ rl_insert_mode = sp->insmode;
+ rl_editing_mode = sp->edmode;
+ rl_key_sequence_length = sp->kseqlen;
+ rl_instream = sp->inf;
+ rl_outstream = sp->outf;
+ rl_pending_input = sp->pendingin;
+ rl_executing_macro = sp->macro;
+
+ rl_catch_signals = sp->catchsigs;
+ rl_catch_sigwinch = sp->catchsigwinch;
+
+ return (0);
+}
/* search.c - code for non-incremental searching in emacs and vi modes. */
-/* Copyright (C) 1992-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2013 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
rl_end = rl_point = 0;
p = _rl_make_prompt_for_search (pchar ? pchar : ':');
- rl_message ("%s", p, 0);
+ rl_message ("%s", p);
xfree (p);
RL_SETSTATE(RL_STATE_NSEARCH);
--- /dev/null
+/* search.c - code for non-incremental searching in emacs and vi modes. */
+
+/* Copyright (C) 1992-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <stdio.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif
+
+#include "rldefs.h"
+#include "rlmbutil.h"
+
+#include "readline.h"
+#include "history.h"
+#include "histlib.h"
+
+#include "rlprivate.h"
+#include "xmalloc.h"
+
+#ifdef abs
+# undef abs
+#endif
+#define abs(x) (((x) >= 0) ? (x) : -(x))
+
+_rl_search_cxt *_rl_nscxt = 0;
+
+extern HIST_ENTRY *_rl_saved_line_for_history;
+
+/* Functions imported from the rest of the library. */
+extern int _rl_free_history_entry PARAMS((HIST_ENTRY *));
+
+static char *noninc_search_string = (char *) NULL;
+static int noninc_history_pos;
+
+static char *prev_line_found = (char *) NULL;
+
+static int rl_history_search_len;
+static int rl_history_search_pos;
+static int rl_history_search_flags;
+
+static char *history_search_string;
+static int history_string_size;
+
+static void make_history_line_current PARAMS((HIST_ENTRY *));
+static int noninc_search_from_pos PARAMS((char *, int, int));
+static int noninc_dosearch PARAMS((char *, int));
+static int noninc_search PARAMS((int, int));
+static int rl_history_search_internal PARAMS((int, int));
+static void rl_history_search_reinit PARAMS((int));
+
+static _rl_search_cxt *_rl_nsearch_init PARAMS((int, int));
+static int _rl_nsearch_cleanup PARAMS((_rl_search_cxt *, int));
+static void _rl_nsearch_abort PARAMS((_rl_search_cxt *));
+static int _rl_nsearch_dispatch PARAMS((_rl_search_cxt *, int));
+
+/* Make the data from the history entry ENTRY be the contents of the
+ current line. This doesn't do anything with rl_point; the caller
+ must set it. */
+static void
+make_history_line_current (entry)
+ HIST_ENTRY *entry;
+{
+ _rl_replace_text (entry->line, 0, rl_end);
+ _rl_fix_point (1);
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ /* POSIX.2 says that the `U' command doesn't affect the copy of any
+ command lines to the edit line. We're going to implement that by
+ making the undo list start after the matching line is copied to the
+ current editing buffer. */
+ rl_free_undo_list ();
+#endif
+
+ if (_rl_saved_line_for_history)
+ _rl_free_history_entry (_rl_saved_line_for_history);
+ _rl_saved_line_for_history = (HIST_ENTRY *)NULL;
+}
+
+/* Search the history list for STRING starting at absolute history position
+ POS. If STRING begins with `^', the search must match STRING at the
+ beginning of a history line, otherwise a full substring match is performed
+ for STRING. DIR < 0 means to search backwards through the history list,
+ DIR >= 0 means to search forward. */
+static int
+noninc_search_from_pos (string, pos, dir)
+ char *string;
+ int pos, dir;
+{
+ int ret, old;
+
+ if (pos < 0)
+ return -1;
+
+ old = where_history ();
+ if (history_set_pos (pos) == 0)
+ return -1;
+
+ RL_SETSTATE(RL_STATE_SEARCH);
+ if (*string == '^')
+ ret = history_search_prefix (string + 1, dir);
+ else
+ ret = history_search (string, dir);
+ RL_UNSETSTATE(RL_STATE_SEARCH);
+
+ if (ret != -1)
+ ret = where_history ();
+
+ history_set_pos (old);
+ return (ret);
+}
+
+/* Search for a line in the history containing STRING. If DIR is < 0, the
+ search is backwards through previous entries, else through subsequent
+ entries. Returns 1 if the search was successful, 0 otherwise. */
+static int
+noninc_dosearch (string, dir)
+ char *string;
+ int dir;
+{
+ int oldpos, pos;
+ HIST_ENTRY *entry;
+
+ if (string == 0 || *string == '\0' || noninc_history_pos < 0)
+ {
+ rl_ding ();
+ return 0;
+ }
+
+ pos = noninc_search_from_pos (string, noninc_history_pos + dir, dir);
+ if (pos == -1)
+ {
+ /* Search failed, current history position unchanged. */
+ rl_maybe_unsave_line ();
+ rl_clear_message ();
+ rl_point = 0;
+ rl_ding ();
+ return 0;
+ }
+
+ noninc_history_pos = pos;
+
+ oldpos = where_history ();
+ history_set_pos (noninc_history_pos);
+ entry = current_history ();
+#if defined (VI_MODE)
+ if (rl_editing_mode != vi_mode)
+#endif
+ history_set_pos (oldpos);
+
+ make_history_line_current (entry);
+
+ rl_point = 0;
+ rl_mark = rl_end;
+
+ rl_clear_message ();
+ return 1;
+}
+
+static _rl_search_cxt *
+_rl_nsearch_init (dir, pchar)
+ int dir, pchar;
+{
+ _rl_search_cxt *cxt;
+ char *p;
+
+ cxt = _rl_scxt_alloc (RL_SEARCH_NSEARCH, 0);
+ if (dir < 0)
+ cxt->sflags |= SF_REVERSE; /* not strictly needed */
+
+ cxt->direction = dir;
+ cxt->history_pos = cxt->save_line;
+
+ rl_maybe_save_line ();
+
+ /* Clear the undo list, since reading the search string should create its
+ own undo list, and the whole list will end up being freed when we
+ finish reading the search string. */
+ rl_undo_list = 0;
+
+ /* Use the line buffer to read the search string. */
+ rl_line_buffer[0] = 0;
+ rl_end = rl_point = 0;
+
+ p = _rl_make_prompt_for_search (pchar ? pchar : ':');
+ rl_message ("%s", p);
+ xfree (p);
+
+ RL_SETSTATE(RL_STATE_NSEARCH);
+
+ _rl_nscxt = cxt;
+
+ return cxt;
+}
+
+static int
+_rl_nsearch_cleanup (cxt, r)
+ _rl_search_cxt *cxt;
+ int r;
+{
+ _rl_scxt_dispose (cxt, 0);
+ _rl_nscxt = 0;
+
+ RL_UNSETSTATE(RL_STATE_NSEARCH);
+
+ return (r != 1);
+}
+
+static void
+_rl_nsearch_abort (cxt)
+ _rl_search_cxt *cxt;
+{
+ rl_maybe_unsave_line ();
+ rl_clear_message ();
+ rl_point = cxt->save_point;
+ rl_mark = cxt->save_mark;
+ rl_restore_prompt ();
+
+ RL_UNSETSTATE (RL_STATE_NSEARCH);
+}
+
+/* Process just-read character C according to search context CXT. Return -1
+ if the caller should abort the search, 0 if we should break out of the
+ loop, and 1 if we should continue to read characters. */
+static int
+_rl_nsearch_dispatch (cxt, c)
+ _rl_search_cxt *cxt;
+ int c;
+{
+ switch (c)
+ {
+ case CTRL('W'):
+ rl_unix_word_rubout (1, c);
+ break;
+
+ case CTRL('U'):
+ rl_unix_line_discard (1, c);
+ break;
+
+ case RETURN:
+ case NEWLINE:
+ return 0;
+
+ case CTRL('H'):
+ case RUBOUT:
+ if (rl_point == 0)
+ {
+ _rl_nsearch_abort (cxt);
+ return -1;
+ }
+ _rl_rubout_char (1, c);
+ break;
+
+ case CTRL('C'):
+ case CTRL('G'):
+ rl_ding ();
+ _rl_nsearch_abort (cxt);
+ return -1;
+
+ default:
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_insert_text (cxt->mb);
+ else
+#endif
+ _rl_insert_char (1, c);
+ break;
+ }
+
+ (*rl_redisplay_function) ();
+ return 1;
+}
+
+/* Perform one search according to CXT, using NONINC_SEARCH_STRING. Return
+ -1 if the search should be aborted, any other value means to clean up
+ using _rl_nsearch_cleanup (). Returns 1 if the search was successful,
+ 0 otherwise. */
+static int
+_rl_nsearch_dosearch (cxt)
+ _rl_search_cxt *cxt;
+{
+ rl_mark = cxt->save_mark;
+
+ /* If rl_point == 0, we want to re-use the previous search string and
+ start from the saved history position. If there's no previous search
+ string, punt. */
+ if (rl_point == 0)
+ {
+ if (noninc_search_string == 0)
+ {
+ rl_ding ();
+ rl_restore_prompt ();
+ RL_UNSETSTATE (RL_STATE_NSEARCH);
+ return -1;
+ }
+ }
+ else
+ {
+ /* We want to start the search from the current history position. */
+ noninc_history_pos = cxt->save_line;
+ FREE (noninc_search_string);
+ noninc_search_string = savestring (rl_line_buffer);
+
+ /* If we don't want the subsequent undo list generated by the search
+ matching a history line to include the contents of the search string,
+ we need to clear rl_line_buffer here. For now, we just clear the
+ undo list generated by reading the search string. (If the search
+ fails, the old undo list will be restored by rl_maybe_unsave_line.) */
+ rl_free_undo_list ();
+ }
+
+ rl_restore_prompt ();
+ return (noninc_dosearch (noninc_search_string, cxt->direction));
+}
+
+/* Search non-interactively through the history list. DIR < 0 means to
+ search backwards through the history of previous commands; otherwise
+ the search is for commands subsequent to the current position in the
+ history list. PCHAR is the character to use for prompting when reading
+ the search string; if not specified (0), it defaults to `:'. */
+static int
+noninc_search (dir, pchar)
+ int dir;
+ int pchar;
+{
+ _rl_search_cxt *cxt;
+ int c, r;
+
+ cxt = _rl_nsearch_init (dir, pchar);
+
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ return (0);
+
+ /* Read the search string. */
+ r = 0;
+ while (1)
+ {
+ c = _rl_search_getchar (cxt);
+
+ if (c == 0)
+ break;
+
+ r = _rl_nsearch_dispatch (cxt, c);
+ if (r < 0)
+ return 1;
+ else if (r == 0)
+ break;
+ }
+
+ r = _rl_nsearch_dosearch (cxt);
+ return ((r >= 0) ? _rl_nsearch_cleanup (cxt, r) : (r != 1));
+}
+
+/* Search forward through the history list for a string. If the vi-mode
+ code calls this, KEY will be `?'. */
+int
+rl_noninc_forward_search (count, key)
+ int count, key;
+{
+ return noninc_search (1, (key == '?') ? '?' : 0);
+}
+
+/* Reverse search the history list for a string. If the vi-mode code
+ calls this, KEY will be `/'. */
+int
+rl_noninc_reverse_search (count, key)
+ int count, key;
+{
+ return noninc_search (-1, (key == '/') ? '/' : 0);
+}
+
+/* Search forward through the history list for the last string searched
+ for. If there is no saved search string, abort. */
+int
+rl_noninc_forward_search_again (count, key)
+ int count, key;
+{
+ int r;
+
+ if (!noninc_search_string)
+ {
+ rl_ding ();
+ return (-1);
+ }
+ r = noninc_dosearch (noninc_search_string, 1);
+ return (r != 1);
+}
+
+/* Reverse search in the history list for the last string searched
+ for. If there is no saved search string, abort. */
+int
+rl_noninc_reverse_search_again (count, key)
+ int count, key;
+{
+ int r;
+
+ if (!noninc_search_string)
+ {
+ rl_ding ();
+ return (-1);
+ }
+ r = noninc_dosearch (noninc_search_string, -1);
+ return (r != 1);
+}
+
+#if defined (READLINE_CALLBACKS)
+int
+_rl_nsearch_callback (cxt)
+ _rl_search_cxt *cxt;
+{
+ int c, r;
+
+ c = _rl_search_getchar (cxt);
+ r = _rl_nsearch_dispatch (cxt, c);
+ if (r != 0)
+ return 1;
+
+ r = _rl_nsearch_dosearch (cxt);
+ return ((r >= 0) ? _rl_nsearch_cleanup (cxt, r) : (r != 1));
+}
+#endif
+
+static int
+rl_history_search_internal (count, dir)
+ int count, dir;
+{
+ HIST_ENTRY *temp;
+ int ret, oldpos;
+ char *t;
+
+ rl_maybe_save_line ();
+ temp = (HIST_ENTRY *)NULL;
+
+ /* Search COUNT times through the history for a line matching
+ history_search_string. If history_search_string[0] == '^', the
+ line must match from the start; otherwise any substring can match.
+ When this loop finishes, TEMP, if non-null, is the history line to
+ copy into the line buffer. */
+ while (count)
+ {
+ RL_CHECK_SIGNALS ();
+ ret = noninc_search_from_pos (history_search_string, rl_history_search_pos + dir, dir);
+ if (ret == -1)
+ break;
+
+ /* Get the history entry we found. */
+ rl_history_search_pos = ret;
+ oldpos = where_history ();
+ history_set_pos (rl_history_search_pos);
+ temp = current_history ();
+ history_set_pos (oldpos);
+
+ /* Don't find multiple instances of the same line. */
+ if (prev_line_found && STREQ (prev_line_found, temp->line))
+ continue;
+ prev_line_found = temp->line;
+ count--;
+ }
+
+ /* If we didn't find anything at all, return. */
+ if (temp == 0)
+ {
+ rl_maybe_unsave_line ();
+ rl_ding ();
+ /* If you don't want the saved history line (last match) to show up
+ in the line buffer after the search fails, change the #if 0 to
+ #if 1 */
+#if 0
+ if (rl_point > rl_history_search_len)
+ {
+ rl_point = rl_end = rl_history_search_len;
+ rl_line_buffer[rl_end] = '\0';
+ rl_mark = 0;
+ }
+#else
+ rl_point = rl_history_search_len; /* rl_maybe_unsave_line changes it */
+ rl_mark = rl_end;
+#endif
+ return 1;
+ }
+
+ /* Copy the line we found into the current line buffer. */
+ make_history_line_current (temp);
+
+ if (rl_history_search_flags & ANCHORED_SEARCH)
+ rl_point = rl_history_search_len; /* easy case */
+ else
+ {
+ t = strstr (rl_line_buffer, history_search_string);
+ rl_point = t ? (int)(t - rl_line_buffer) + rl_history_search_len : rl_end;
+ }
+ rl_mark = rl_end;
+
+ return 0;
+}
+
+static void
+rl_history_search_reinit (flags)
+ int flags;
+{
+ int sind;
+
+ rl_history_search_pos = where_history ();
+ rl_history_search_len = rl_point;
+ rl_history_search_flags = flags;
+
+ prev_line_found = (char *)NULL;
+ if (rl_point)
+ {
+ /* Allocate enough space for anchored and non-anchored searches */
+ if (rl_history_search_len >= history_string_size - 2)
+ {
+ history_string_size = rl_history_search_len + 2;
+ history_search_string = (char *)xrealloc (history_search_string, history_string_size);
+ }
+ sind = 0;
+ if (flags & ANCHORED_SEARCH)
+ history_search_string[sind++] = '^';
+ strncpy (history_search_string + sind, rl_line_buffer, rl_point);
+ history_search_string[rl_point + sind] = '\0';
+ }
+ _rl_free_saved_history_line ();
+}
+
+/* Search forward in the history for the string of characters
+ from the start of the line to rl_point. This is a non-incremental
+ search. The search is anchored to the beginning of the history line. */
+int
+rl_history_search_forward (count, ignore)
+ int count, ignore;
+{
+ if (count == 0)
+ return (0);
+
+ if (rl_last_func != rl_history_search_forward &&
+ rl_last_func != rl_history_search_backward)
+ rl_history_search_reinit (ANCHORED_SEARCH);
+
+ if (rl_history_search_len == 0)
+ return (rl_get_next_history (count, ignore));
+ return (rl_history_search_internal (abs (count), (count > 0) ? 1 : -1));
+}
+
+/* Search backward through the history for the string of characters
+ from the start of the line to rl_point. This is a non-incremental
+ search. */
+int
+rl_history_search_backward (count, ignore)
+ int count, ignore;
+{
+ if (count == 0)
+ return (0);
+
+ if (rl_last_func != rl_history_search_forward &&
+ rl_last_func != rl_history_search_backward)
+ rl_history_search_reinit (ANCHORED_SEARCH);
+
+ if (rl_history_search_len == 0)
+ return (rl_get_previous_history (count, ignore));
+ return (rl_history_search_internal (abs (count), (count > 0) ? -1 : 1));
+}
+
+/* Search forward in the history for the string of characters
+ from the start of the line to rl_point. This is a non-incremental
+ search. The search succeeds if the search string is present anywhere
+ in the history line. */
+int
+rl_history_substr_search_forward (count, ignore)
+ int count, ignore;
+{
+ if (count == 0)
+ return (0);
+
+ if (rl_last_func != rl_history_substr_search_forward &&
+ rl_last_func != rl_history_substr_search_backward)
+ rl_history_search_reinit (NON_ANCHORED_SEARCH);
+
+ if (rl_history_search_len == 0)
+ return (rl_get_next_history (count, ignore));
+ return (rl_history_search_internal (abs (count), (count > 0) ? 1 : -1));
+}
+
+/* Search backward through the history for the string of characters
+ from the start of the line to rl_point. This is a non-incremental
+ search. */
+int
+rl_history_substr_search_backward (count, ignore)
+ int count, ignore;
+{
+ if (count == 0)
+ return (0);
+
+ if (rl_last_func != rl_history_substr_search_forward &&
+ rl_last_func != rl_history_substr_search_backward)
+ rl_history_search_reinit (NON_ANCHORED_SEARCH);
+
+ if (rl_history_search_len == 0)
+ return (rl_get_previous_history (count, ignore));
+ return (rl_history_search_internal (abs (count), (count > 0) ? -1 : 1));
+}
MAKEDOT();
}
else if ((flags & MP_IGNDOT) && path[0] == '.' && (path[1] == '\0' ||
- path[1] == '/' && path[2] == '\0'))
+ (path[1] == '/' && path[2] == '\0')))
{
xpath = nullpath;
pathlen = 0;
--- /dev/null
+/* makepath.c - glue PATH and DIR together into a full pathname. */
+
+/* Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <bashansi.h>
+#include "shell.h"
+
+#include <tilde/tilde.h>
+
+#ifndef NULL
+# define NULL 0
+#endif
+
+/* MAKE SURE THESE AGREE WITH ../../externs.h. */
+
+#ifndef MP_DOTILDE
+# define MP_DOTILDE 0x01
+# define MP_DOCWD 0x02
+# define MP_RMDOT 0x04
+# define MP_IGNDOT 0x08
+#endif
+
+extern char *get_working_directory __P((char *));
+
+static char *nullpath = "";
+
+/* Take PATH, an element from, e.g., $CDPATH, and DIR, a directory name,
+ and paste them together into PATH/DIR. Tilde expansion is performed on
+ PATH if (flags & MP_DOTILDE) is non-zero. If PATH is NULL or the empty
+ string, it is converted to the current directory. A full pathname is
+ used if (flags & MP_DOCWD) is non-zero, otherwise `./' is used. If
+ (flags & MP_RMDOT) is non-zero, any `./' is removed from the beginning
+ of DIR. If (flags & MP_IGNDOT) is non-zero, a PATH that is "." or "./"
+ is ignored. */
+
+#define MAKEDOT() \
+ do { \
+ xpath = (char *)xmalloc (2); \
+ xpath[0] = '.'; \
+ xpath[1] = '\0'; \
+ pathlen = 1; \
+ } while (0)
+
+char *
+sh_makepath (path, dir, flags)
+ const char *path, *dir;
+ int flags;
+{
+ int dirlen, pathlen;
+ char *ret, *xpath, *xdir, *r, *s;
+
+ if (path == 0 || *path == '\0')
+ {
+ if (flags & MP_DOCWD)
+ {
+ xpath = get_working_directory ("sh_makepath");
+ if (xpath == 0)
+ {
+ ret = get_string_value ("PWD");
+ if (ret)
+ xpath = savestring (ret);
+ }
+ if (xpath == 0)
+ MAKEDOT();
+ else
+ pathlen = strlen (xpath);
+ }
+ else
+ MAKEDOT();
+ }
+ else if ((flags & MP_IGNDOT) && path[0] == '.' && (path[1] == '\0' ||
+ path[1] == '/' && path[2] == '\0'))
+ {
+ xpath = nullpath;
+ pathlen = 0;
+ }
+ else
+ {
+ xpath = ((flags & MP_DOTILDE) && *path == '~') ? bash_tilde_expand (path, 0) : (char *)path;
+ pathlen = strlen (xpath);
+ }
+
+ xdir = (char *)dir;
+ dirlen = strlen (xdir);
+ if ((flags & MP_RMDOT) && dir[0] == '.' && dir[1] == '/')
+ {
+ xdir += 2;
+ dirlen -= 2;
+ }
+
+ r = ret = (char *)xmalloc (2 + dirlen + pathlen);
+ s = xpath;
+ while (*s)
+ *r++ = *s++;
+ if (s > xpath && s[-1] != '/')
+ *r++ = '/';
+ s = xdir;
+ while (*r++ = *s++)
+ ;
+ if (xpath != path && xpath != nullpath)
+ free (xpath);
+ return (ret);
+}
#if !defined (HAVE_DEV_FD)
/* Open the named pipe in the child. */
- fd = open (pathname, open_for_read_in_child ? O_RDONLY|O_NONBLOCK : O_WRONLY);
+ fd = open (pathname, open_for_read_in_child ? O_RDONLY : O_WRONLY);
if (fd < 0)
{
/* Two separate strings for ease of translation. */
SCOPY_CHAR_I (twochars, CTLESC, c, string, sindex, string_size);
}
/* This is the fix for " $@\ " */
- else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && ((sh_syntaxtab[c] & tflag) == 0) & isexp == 0 && isifs (c))
+ else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && ((sh_syntaxtab[c] & tflag) == 0) && isexp == 0 && isifs (c))
{
RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size,
DEFAULT_ARRAY_SIZE);
--- /dev/null
+/* subst.c -- The part of the shell that does parameter, command, arithmetic,
+ and globbing substitutions. */
+
+/* ``Have a little faith, there's magic in the night. You ain't a
+ beauty, but, hey, you're alright.'' */
+
+/* Copyright (C) 1987-2013 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+#include <stdio.h>
+#include "chartypes.h"
+#if defined (HAVE_PWD_H)
+# include <pwd.h>
+#endif
+#include <signal.h>
+#include <errno.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+#include "posixstat.h"
+#include "bashintl.h"
+
+#include "shell.h"
+#include "parser.h"
+#include "flags.h"
+#include "jobs.h"
+#include "execute_cmd.h"
+#include "filecntl.h"
+#include "trap.h"
+#include "pathexp.h"
+#include "mailcheck.h"
+
+#include "shmbutil.h"
+#include "typemax.h"
+
+#include "builtins/getopt.h"
+#include "builtins/common.h"
+
+#include "builtins/builtext.h"
+
+#include <tilde/tilde.h>
+#include <glob/strmatch.h>
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+/* The size that strings change by. */
+#define DEFAULT_INITIAL_ARRAY_SIZE 112
+#define DEFAULT_ARRAY_SIZE 128
+
+/* Variable types. */
+#define VT_VARIABLE 0
+#define VT_POSPARMS 1
+#define VT_ARRAYVAR 2
+#define VT_ARRAYMEMBER 3
+#define VT_ASSOCVAR 4
+
+#define VT_STARSUB 128 /* $* or ${array[*]} -- used to split */
+
+/* Flags for quoted_strchr */
+#define ST_BACKSL 0x01
+#define ST_CTLESC 0x02
+#define ST_SQUOTE 0x04 /* unused yet */
+#define ST_DQUOTE 0x08 /* unused yet */
+
+/* Flags for the `pflags' argument to param_expand() */
+#define PF_NOCOMSUB 0x01 /* Do not perform command substitution */
+#define PF_IGNUNBOUND 0x02 /* ignore unbound vars even if -u set */
+#define PF_NOSPLIT2 0x04 /* same as W_NOSPLIT2 */
+#define PF_ASSIGNRHS 0x08 /* same as W_ASSIGNRHS */
+
+/* These defs make it easier to use the editor. */
+#define LBRACE '{'
+#define RBRACE '}'
+#define LPAREN '('
+#define RPAREN ')'
+
+#if defined (HANDLE_MULTIBYTE)
+#define WLPAREN L'('
+#define WRPAREN L')'
+#endif
+
+/* Evaluates to 1 if C is one of the shell's special parameters whose length
+ can be taken, but is also one of the special expansion characters. */
+#define VALID_SPECIAL_LENGTH_PARAM(c) \
+ ((c) == '-' || (c) == '?' || (c) == '#')
+
+/* Evaluates to 1 if C is one of the shell's special parameters for which an
+ indirect variable reference may be made. */
+#define VALID_INDIR_PARAM(c) \
+ ((posixly_correct == 0 && (c) == '#') || (posixly_correct == 0 && (c) == '?') || (c) == '@' || (c) == '*')
+
+/* Evaluates to 1 if C is one of the OP characters that follows the parameter
+ in ${parameter[:]OPword}. */
+#define VALID_PARAM_EXPAND_CHAR(c) (sh_syntaxtab[(unsigned char)c] & CSUBSTOP)
+
+/* Evaluates to 1 if this is one of the shell's special variables. */
+#define SPECIAL_VAR(name, wi) \
+ ((DIGIT (*name) && all_digits (name)) || \
+ (name[1] == '\0' && (sh_syntaxtab[(unsigned char)*name] & CSPECVAR)) || \
+ (wi && name[2] == '\0' && VALID_INDIR_PARAM (name[1])))
+
+/* An expansion function that takes a string and a quoted flag and returns
+ a WORD_LIST *. Used as the type of the third argument to
+ expand_string_if_necessary(). */
+typedef WORD_LIST *EXPFUNC __P((char *, int));
+
+/* Process ID of the last command executed within command substitution. */
+pid_t last_command_subst_pid = NO_PID;
+pid_t current_command_subst_pid = NO_PID;
+
+/* Variables used to keep track of the characters in IFS. */
+SHELL_VAR *ifs_var;
+char *ifs_value;
+unsigned char ifs_cmap[UCHAR_MAX + 1];
+int ifs_is_set, ifs_is_null;
+
+#if defined (HANDLE_MULTIBYTE)
+unsigned char ifs_firstc[MB_LEN_MAX];
+size_t ifs_firstc_len;
+#else
+unsigned char ifs_firstc;
+#endif
+
+/* Sentinel to tell when we are performing variable assignments preceding a
+ command name and putting them into the environment. Used to make sure
+ we use the temporary environment when looking up variable values. */
+int assigning_in_environment;
+
+/* Used to hold a list of variable assignments preceding a command. Global
+ so the SIGCHLD handler in jobs.c can unwind-protect it when it runs a
+ SIGCHLD trap and so it can be saved and restored by the trap handlers. */
+WORD_LIST *subst_assign_varlist = (WORD_LIST *)NULL;
+
+/* Extern functions and variables from different files. */
+extern int last_command_exit_value, last_command_exit_signal;
+extern int subshell_environment, line_number;
+extern int subshell_level, parse_and_execute_level, sourcelevel;
+extern int eof_encountered;
+extern int return_catch_flag, return_catch_value;
+extern pid_t dollar_dollar_pid;
+extern int posixly_correct;
+extern char *this_command_name;
+extern struct fd_bitmap *current_fds_to_close;
+extern int wordexp_only;
+extern int expanding_redir;
+extern int tempenv_assign_error;
+extern int builtin_ignoring_errexit;
+
+#if !defined (HAVE_WCSDUP) && defined (HANDLE_MULTIBYTE)
+extern wchar_t *wcsdup __P((const wchar_t *));
+#endif
+
+/* Non-zero means to allow unmatched globbed filenames to expand to
+ a null file. */
+int allow_null_glob_expansion;
+
+/* Non-zero means to throw an error when globbing fails to match anything. */
+int fail_glob_expansion;
+
+#if 0
+/* Variables to keep track of which words in an expanded word list (the
+ output of expand_word_list_internal) are the result of globbing
+ expansions. GLOB_ARGV_FLAGS is used by execute_cmd.c.
+ (CURRENTLY UNUSED). */
+char *glob_argv_flags;
+static int glob_argv_flags_size;
+#endif
+
+static WORD_LIST expand_word_error, expand_word_fatal;
+static WORD_DESC expand_wdesc_error, expand_wdesc_fatal;
+static char expand_param_error, expand_param_fatal;
+static char extract_string_error, extract_string_fatal;
+
+/* Tell the expansion functions to not longjmp back to top_level on fatal
+ errors. Enabled when doing completion and prompt string expansion. */
+static int no_longjmp_on_fatal_error = 0;
+
+/* Set by expand_word_unsplit; used to inhibit splitting and re-joining
+ $* on $IFS, primarily when doing assignment statements. */
+static int expand_no_split_dollar_star = 0;
+
+/* A WORD_LIST of words to be expanded by expand_word_list_internal,
+ without any leading variable assignments. */
+static WORD_LIST *garglist = (WORD_LIST *)NULL;
+
+static char *quoted_substring __P((char *, int, int));
+static int quoted_strlen __P((char *));
+static char *quoted_strchr __P((char *, int, int));
+
+static char *expand_string_if_necessary __P((char *, int, EXPFUNC *));
+static inline char *expand_string_to_string_internal __P((char *, int, EXPFUNC *));
+static WORD_LIST *call_expand_word_internal __P((WORD_DESC *, int, int, int *, int *));
+static WORD_LIST *expand_string_internal __P((char *, int));
+static WORD_LIST *expand_string_leave_quoted __P((char *, int));
+static WORD_LIST *expand_string_for_rhs __P((char *, int, int *, int *));
+
+static WORD_LIST *list_quote_escapes __P((WORD_LIST *));
+static char *make_quoted_char __P((int));
+static WORD_LIST *quote_list __P((WORD_LIST *));
+
+static int unquoted_substring __P((char *, char *));
+static int unquoted_member __P((int, char *));
+
+#if defined (ARRAY_VARS)
+static SHELL_VAR *do_compound_assignment __P((char *, char *, int));
+#endif
+static int do_assignment_internal __P((const WORD_DESC *, int));
+
+static char *string_extract_verbatim __P((char *, size_t, int *, char *, int));
+static char *string_extract __P((char *, int *, char *, int));
+static char *string_extract_double_quoted __P((char *, int *, int));
+static inline char *string_extract_single_quoted __P((char *, int *));
+static inline int skip_single_quoted __P((const char *, size_t, int));
+static int skip_double_quoted __P((char *, size_t, int));
+static char *extract_delimited_string __P((char *, int *, char *, char *, char *, int));
+static char *extract_dollar_brace_string __P((char *, int *, int, int));
+static int skip_matched_pair __P((const char *, int, int, int, int));
+
+static char *pos_params __P((char *, int, int, int));
+
+static unsigned char *mb_getcharlens __P((char *, int));
+
+static char *remove_upattern __P((char *, char *, int));
+#if defined (HANDLE_MULTIBYTE)
+static wchar_t *remove_wpattern __P((wchar_t *, size_t, wchar_t *, int));
+#endif
+static char *remove_pattern __P((char *, char *, int));
+
+static int match_upattern __P((char *, char *, int, char **, char **));
+#if defined (HANDLE_MULTIBYTE)
+static int match_wpattern __P((wchar_t *, char **, size_t, wchar_t *, int, char **, char **));
+#endif
+static int match_pattern __P((char *, char *, int, char **, char **));
+static int getpatspec __P((int, char *));
+static char *getpattern __P((char *, int, int));
+static char *variable_remove_pattern __P((char *, char *, int, int));
+static char *list_remove_pattern __P((WORD_LIST *, char *, int, int, int));
+static char *parameter_list_remove_pattern __P((int, char *, int, int));
+#ifdef ARRAY_VARS
+static char *array_remove_pattern __P((SHELL_VAR *, char *, int, char *, int));
+#endif
+static char *parameter_brace_remove_pattern __P((char *, char *, int, char *, int, int, int));
+
+static char *process_substitute __P((char *, int));
+
+static char *read_comsub __P((int, int, int *));
+
+#ifdef ARRAY_VARS
+static arrayind_t array_length_reference __P((char *));
+#endif
+
+static int valid_brace_expansion_word __P((char *, int));
+static int chk_atstar __P((char *, int, int *, int *));
+static int chk_arithsub __P((const char *, int));
+
+static WORD_DESC *parameter_brace_expand_word __P((char *, int, int, int, arrayind_t *));
+static char *parameter_brace_find_indir __P((char *, int, int, int));
+static WORD_DESC *parameter_brace_expand_indir __P((char *, int, int, int *, int *));
+static WORD_DESC *parameter_brace_expand_rhs __P((char *, char *, int, int, int *, int *));
+static void parameter_brace_expand_error __P((char *, char *));
+
+static int valid_length_expression __P((char *));
+static intmax_t parameter_brace_expand_length __P((char *));
+
+static char *skiparith __P((char *, int));
+static int verify_substring_values __P((SHELL_VAR *, char *, char *, int, intmax_t *, intmax_t *));
+static int get_var_and_type __P((char *, char *, arrayind_t, int, int, SHELL_VAR **, char **));
+static char *mb_substring __P((char *, int, int));
+static char *parameter_brace_substring __P((char *, char *, int, char *, int, int));
+
+static int shouldexp_replacement __P((char *));
+
+static char *pos_params_pat_subst __P((char *, char *, char *, int));
+
+static char *parameter_brace_patsub __P((char *, char *, int, char *, int, int));
+
+static char *pos_params_casemod __P((char *, char *, int, int));
+static char *parameter_brace_casemod __P((char *, char *, int, int, char *, int, int));
+
+static WORD_DESC *parameter_brace_expand __P((char *, int *, int, int, int *, int *));
+static WORD_DESC *param_expand __P((char *, int *, int, int *, int *, int *, int *, int));
+
+static WORD_LIST *expand_word_internal __P((WORD_DESC *, int, int, int *, int *));
+
+static WORD_LIST *word_list_split __P((WORD_LIST *));
+
+static void exp_jump_to_top_level __P((int));
+
+static WORD_LIST *separate_out_assignments __P((WORD_LIST *));
+static WORD_LIST *glob_expand_word_list __P((WORD_LIST *, int));
+#ifdef BRACE_EXPANSION
+static WORD_LIST *brace_expand_word_list __P((WORD_LIST *, int));
+#endif
+#if defined (ARRAY_VARS)
+static int make_internal_declare __P((char *, char *));
+#endif
+static WORD_LIST *shell_expand_word_list __P((WORD_LIST *, int));
+static WORD_LIST *expand_word_list_internal __P((WORD_LIST *, int));
+
+/* **************************************************************** */
+/* */
+/* Utility Functions */
+/* */
+/* **************************************************************** */
+
+#if defined (DEBUG)
+void
+dump_word_flags (flags)
+ int flags;
+{
+ int f;
+
+ f = flags;
+ fprintf (stderr, "%d -> ", f);
+ if (f & W_ASSIGNASSOC)
+ {
+ f &= ~W_ASSIGNASSOC;
+ fprintf (stderr, "W_ASSIGNASSOC%s", f ? "|" : "");
+ }
+ if (f & W_ASSIGNARRAY)
+ {
+ f &= ~W_ASSIGNARRAY;
+ fprintf (stderr, "W_ASSIGNARRAY%s", f ? "|" : "");
+ }
+ if (f & W_HASCTLESC)
+ {
+ f &= ~W_HASCTLESC;
+ fprintf (stderr, "W_HASCTLESC%s", f ? "|" : "");
+ }
+ if (f & W_NOPROCSUB)
+ {
+ f &= ~W_NOPROCSUB;
+ fprintf (stderr, "W_NOPROCSUB%s", f ? "|" : "");
+ }
+ if (f & W_DQUOTE)
+ {
+ f &= ~W_DQUOTE;
+ fprintf (stderr, "W_DQUOTE%s", f ? "|" : "");
+ }
+ if (f & W_HASQUOTEDNULL)
+ {
+ f &= ~W_HASQUOTEDNULL;
+ fprintf (stderr, "W_HASQUOTEDNULL%s", f ? "|" : "");
+ }
+ if (f & W_ASSIGNARG)
+ {
+ f &= ~W_ASSIGNARG;
+ fprintf (stderr, "W_ASSIGNARG%s", f ? "|" : "");
+ }
+ if (f & W_ASSNBLTIN)
+ {
+ f &= ~W_ASSNBLTIN;
+ fprintf (stderr, "W_ASSNBLTIN%s", f ? "|" : "");
+ }
+ if (f & W_ASSNGLOBAL)
+ {
+ f &= ~W_ASSNGLOBAL;
+ fprintf (stderr, "W_ASSNGLOBAL%s", f ? "|" : "");
+ }
+ if (f & W_ASSIGNINT)
+ {
+ f &= ~W_ASSIGNINT;
+ fprintf (stderr, "W_ASSIGNINT%s", f ? "|" : "");
+ }
+ if (f & W_COMPASSIGN)
+ {
+ f &= ~W_COMPASSIGN;
+ fprintf (stderr, "W_COMPASSIGN%s", f ? "|" : "");
+ }
+ if (f & W_NOEXPAND)
+ {
+ f &= ~W_NOEXPAND;
+ fprintf (stderr, "W_NOEXPAND%s", f ? "|" : "");
+ }
+ if (f & W_ITILDE)
+ {
+ f &= ~W_ITILDE;
+ fprintf (stderr, "W_ITILDE%s", f ? "|" : "");
+ }
+ if (f & W_NOTILDE)
+ {
+ f &= ~W_NOTILDE;
+ fprintf (stderr, "W_NOTILDE%s", f ? "|" : "");
+ }
+ if (f & W_ASSIGNRHS)
+ {
+ f &= ~W_ASSIGNRHS;
+ fprintf (stderr, "W_ASSIGNRHS%s", f ? "|" : "");
+ }
+ if (f & W_NOCOMSUB)
+ {
+ f &= ~W_NOCOMSUB;
+ fprintf (stderr, "W_NOCOMSUB%s", f ? "|" : "");
+ }
+ if (f & W_DOLLARSTAR)
+ {
+ f &= ~W_DOLLARSTAR;
+ fprintf (stderr, "W_DOLLARSTAR%s", f ? "|" : "");
+ }
+ if (f & W_DOLLARAT)
+ {
+ f &= ~W_DOLLARAT;
+ fprintf (stderr, "W_DOLLARAT%s", f ? "|" : "");
+ }
+ if (f & W_TILDEEXP)
+ {
+ f &= ~W_TILDEEXP;
+ fprintf (stderr, "W_TILDEEXP%s", f ? "|" : "");
+ }
+ if (f & W_NOSPLIT2)
+ {
+ f &= ~W_NOSPLIT2;
+ fprintf (stderr, "W_NOSPLIT2%s", f ? "|" : "");
+ }
+ if (f & W_NOSPLIT)
+ {
+ f &= ~W_NOSPLIT;
+ fprintf (stderr, "W_NOSPLIT%s", f ? "|" : "");
+ }
+ if (f & W_NOBRACE)
+ {
+ f &= ~W_NOBRACE;
+ fprintf (stderr, "W_NOBRACE%s", f ? "|" : "");
+ }
+ if (f & W_NOGLOB)
+ {
+ f &= ~W_NOGLOB;
+ fprintf (stderr, "W_NOGLOB%s", f ? "|" : "");
+ }
+ if (f & W_SPLITSPACE)
+ {
+ f &= ~W_SPLITSPACE;
+ fprintf (stderr, "W_SPLITSPACE%s", f ? "|" : "");
+ }
+ if (f & W_ASSIGNMENT)
+ {
+ f &= ~W_ASSIGNMENT;
+ fprintf (stderr, "W_ASSIGNMENT%s", f ? "|" : "");
+ }
+ if (f & W_QUOTED)
+ {
+ f &= ~W_QUOTED;
+ fprintf (stderr, "W_QUOTED%s", f ? "|" : "");
+ }
+ if (f & W_HASDOLLAR)
+ {
+ f &= ~W_HASDOLLAR;
+ fprintf (stderr, "W_HASDOLLAR%s", f ? "|" : "");
+ }
+ fprintf (stderr, "\n");
+ fflush (stderr);
+}
+#endif
+
+#ifdef INCLUDE_UNUSED
+static char *
+quoted_substring (string, start, end)
+ char *string;
+ int start, end;
+{
+ register int len, l;
+ register char *result, *s, *r;
+
+ len = end - start;
+
+ /* Move to string[start], skipping quoted characters. */
+ for (s = string, l = 0; *s && l < start; )
+ {
+ if (*s == CTLESC)
+ {
+ s++;
+ continue;
+ }
+ l++;
+ if (*s == 0)
+ break;
+ }
+
+ r = result = (char *)xmalloc (2*len + 1); /* save room for quotes */
+
+ /* Copy LEN characters, including quote characters. */
+ s = string + l;
+ for (l = 0; l < len; s++)
+ {
+ if (*s == CTLESC)
+ *r++ = *s++;
+ *r++ = *s;
+ l++;
+ if (*s == 0)
+ break;
+ }
+ *r = '\0';
+ return result;
+}
+#endif
+
+#ifdef INCLUDE_UNUSED
+/* Return the length of S, skipping over quoted characters */
+static int
+quoted_strlen (s)
+ char *s;
+{
+ register char *p;
+ int i;
+
+ i = 0;
+ for (p = s; *p; p++)
+ {
+ if (*p == CTLESC)
+ {
+ p++;
+ if (*p == 0)
+ return (i + 1);
+ }
+ i++;
+ }
+
+ return i;
+}
+#endif
+
+/* Find the first occurrence of character C in string S, obeying shell
+ quoting rules. If (FLAGS & ST_BACKSL) is non-zero, backslash-escaped
+ characters are skipped. If (FLAGS & ST_CTLESC) is non-zero, characters
+ escaped with CTLESC are skipped. */
+static char *
+quoted_strchr (s, c, flags)
+ char *s;
+ int c, flags;
+{
+ register char *p;
+
+ for (p = s; *p; p++)
+ {
+ if (((flags & ST_BACKSL) && *p == '\\')
+ || ((flags & ST_CTLESC) && *p == CTLESC))
+ {
+ p++;
+ if (*p == '\0')
+ return ((char *)NULL);
+ continue;
+ }
+ else if (*p == c)
+ return p;
+ }
+ return ((char *)NULL);
+}
+
+/* Return 1 if CHARACTER appears in an unquoted portion of
+ STRING. Return 0 otherwise. CHARACTER must be a single-byte character. */
+static int
+unquoted_member (character, string)
+ int character;
+ char *string;
+{
+ size_t slen;
+ int sindex, c;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ sindex = 0;
+ while (c = string[sindex])
+ {
+ if (c == character)
+ return (1);
+
+ switch (c)
+ {
+ default:
+ ADVANCE_CHAR (string, slen, sindex);
+ break;
+
+ case '\\':
+ sindex++;
+ if (string[sindex])
+ ADVANCE_CHAR (string, slen, sindex);
+ break;
+
+ case '\'':
+ sindex = skip_single_quoted (string, slen, ++sindex);
+ break;
+
+ case '"':
+ sindex = skip_double_quoted (string, slen, ++sindex);
+ break;
+ }
+ }
+ return (0);
+}
+
+/* Return 1 if SUBSTR appears in an unquoted portion of STRING. */
+static int
+unquoted_substring (substr, string)
+ char *substr, *string;
+{
+ size_t slen;
+ int sindex, c, sublen;
+ DECLARE_MBSTATE;
+
+ if (substr == 0 || *substr == '\0')
+ return (0);
+
+ slen = strlen (string);
+ sublen = strlen (substr);
+ for (sindex = 0; c = string[sindex]; )
+ {
+ if (STREQN (string + sindex, substr, sublen))
+ return (1);
+
+ switch (c)
+ {
+ case '\\':
+ sindex++;
+ if (string[sindex])
+ ADVANCE_CHAR (string, slen, sindex);
+ break;
+
+ case '\'':
+ sindex = skip_single_quoted (string, slen, ++sindex);
+ break;
+
+ case '"':
+ sindex = skip_double_quoted (string, slen, ++sindex);
+ break;
+
+ default:
+ ADVANCE_CHAR (string, slen, sindex);
+ break;
+ }
+ }
+ return (0);
+}
+
+/* Most of the substitutions must be done in parallel. In order
+ to avoid using tons of unclear goto's, I have some functions
+ for manipulating malloc'ed strings. They all take INDX, a
+ pointer to an integer which is the offset into the string
+ where manipulation is taking place. They also take SIZE, a
+ pointer to an integer which is the current length of the
+ character array for this string. */
+
+/* Append SOURCE to TARGET at INDEX. SIZE is the current amount
+ of space allocated to TARGET. SOURCE can be NULL, in which
+ case nothing happens. Gets rid of SOURCE by freeing it.
+ Returns TARGET in case the location has changed. */
+INLINE char *
+sub_append_string (source, target, indx, size)
+ char *source, *target;
+ int *indx, *size;
+{
+ if (source)
+ {
+ int srclen, n;
+
+ srclen = STRLEN (source);
+ if (srclen >= (int)(*size - *indx))
+ {
+ n = srclen + *indx;
+ n = (n + DEFAULT_ARRAY_SIZE) - (n % DEFAULT_ARRAY_SIZE);
+ target = (char *)xrealloc (target, (*size = n));
+ }
+
+ FASTCOPY (source, target + *indx, srclen);
+ *indx += srclen;
+ target[*indx] = '\0';
+
+ free (source);
+ }
+ return (target);
+}
+
+#if 0
+/* UNUSED */
+/* Append the textual representation of NUMBER to TARGET.
+ INDX and SIZE are as in SUB_APPEND_STRING. */
+char *
+sub_append_number (number, target, indx, size)
+ intmax_t number;
+ int *indx, *size;
+ char *target;
+{
+ char *temp;
+
+ temp = itos (number);
+ return (sub_append_string (temp, target, indx, size));
+}
+#endif
+
+/* Extract a substring from STRING, starting at SINDEX and ending with
+ one of the characters in CHARLIST. Don't make the ending character
+ part of the string. Leave SINDEX pointing at the ending character.
+ Understand about backslashes in the string. If (flags & SX_VARNAME)
+ is non-zero, and array variables have been compiled into the shell,
+ everything between a `[' and a corresponding `]' is skipped over.
+ If (flags & SX_NOALLOC) is non-zero, don't return the substring, just
+ update SINDEX. If (flags & SX_REQMATCH) is non-zero, the string must
+ contain a closing character from CHARLIST. */
+static char *
+string_extract (string, sindex, charlist, flags)
+ char *string;
+ int *sindex;
+ char *charlist;
+ int flags;
+{
+ register int c, i;
+ int found;
+ size_t slen;
+ char *temp;
+ DECLARE_MBSTATE;
+
+ slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 0;
+ i = *sindex;
+ found = 0;
+ while (c = string[i])
+ {
+ if (c == '\\')
+ {
+ if (string[i + 1])
+ i++;
+ else
+ break;
+ }
+#if defined (ARRAY_VARS)
+ else if ((flags & SX_VARNAME) && c == '[')
+ {
+ int ni;
+ /* If this is an array subscript, skip over it and continue. */
+ ni = skipsubscript (string, i, 0);
+ if (string[ni] == ']')
+ i = ni;
+ }
+#endif
+ else if (MEMBER (c, charlist))
+ {
+ found = 1;
+ break;
+ }
+
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ /* If we had to have a matching delimiter and didn't find one, return an
+ error and let the caller deal with it. */
+ if ((flags & SX_REQMATCH) && found == 0)
+ {
+ *sindex = i;
+ return (&extract_string_error);
+ }
+
+ temp = (flags & SX_NOALLOC) ? (char *)NULL : substring (string, *sindex, i);
+ *sindex = i;
+
+ return (temp);
+}
+
+/* Extract the contents of STRING as if it is enclosed in double quotes.
+ SINDEX, when passed in, is the offset of the character immediately
+ following the opening double quote; on exit, SINDEX is left pointing after
+ the closing double quote. If STRIPDQ is non-zero, unquoted double
+ quotes are stripped and the string is terminated by a null byte.
+ Backslashes between the embedded double quotes are processed. If STRIPDQ
+ is zero, an unquoted `"' terminates the string. */
+static char *
+string_extract_double_quoted (string, sindex, stripdq)
+ char *string;
+ int *sindex, stripdq;
+{
+ size_t slen;
+ char *send;
+ int j, i, t;
+ unsigned char c;
+ char *temp, *ret; /* The new string we return. */
+ int pass_next, backquote, si; /* State variables for the machine. */
+ int dquote;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string + *sindex) + *sindex;
+ send = string + slen;
+
+ pass_next = backquote = dquote = 0;
+ temp = (char *)xmalloc (1 + slen - *sindex);
+
+ j = 0;
+ i = *sindex;
+ while (c = string[i])
+ {
+ /* Process a character that was quoted by a backslash. */
+ if (pass_next)
+ {
+ /* XXX - take another look at this in light of Interp 221 */
+ /* Posix.2 sez:
+
+ ``The backslash shall retain its special meaning as an escape
+ character only when followed by one of the characters:
+ $ ` " \ <newline>''.
+
+ If STRIPDQ is zero, we handle the double quotes here and let
+ expand_word_internal handle the rest. If STRIPDQ is non-zero,
+ we have already been through one round of backslash stripping,
+ and want to strip these backslashes only if DQUOTE is non-zero,
+ indicating that we are inside an embedded double-quoted string. */
+
+ /* If we are in an embedded quoted string, then don't strip
+ backslashes before characters for which the backslash
+ retains its special meaning, but remove backslashes in
+ front of other characters. If we are not in an
+ embedded quoted string, don't strip backslashes at all.
+ This mess is necessary because the string was already
+ surrounded by double quotes (and sh has some really weird
+ quoting rules).
+ The returned string will be run through expansion as if
+ it were double-quoted. */
+ if ((stripdq == 0 && c != '"') ||
+ (stripdq && ((dquote && (sh_syntaxtab[c] & CBSDQUOTE)) || dquote == 0)))
+ temp[j++] = '\\';
+ pass_next = 0;
+
+add_one_character:
+ COPY_CHAR_I (temp, j, string, send, i);
+ continue;
+ }
+
+ /* A backslash protects the next character. The code just above
+ handles preserving the backslash in front of any character but
+ a double quote. */
+ if (c == '\\')
+ {
+ pass_next++;
+ i++;
+ continue;
+ }
+
+ /* Inside backquotes, ``the portion of the quoted string from the
+ initial backquote and the characters up to the next backquote
+ that is not preceded by a backslash, having escape characters
+ removed, defines that command''. */
+ if (backquote)
+ {
+ if (c == '`')
+ backquote = 0;
+ temp[j++] = c;
+ i++;
+ continue;
+ }
+
+ if (c == '`')
+ {
+ temp[j++] = c;
+ backquote++;
+ i++;
+ continue;
+ }
+
+ /* Pass everything between `$(' and the matching `)' or a quoted
+ ${ ... } pair through according to the Posix.2 specification. */
+ if (c == '$' && ((string[i + 1] == LPAREN) || (string[i + 1] == LBRACE)))
+ {
+ int free_ret = 1;
+
+ si = i + 2;
+ if (string[i + 1] == LPAREN)
+ ret = extract_command_subst (string, &si, 0);
+ else
+ ret = extract_dollar_brace_string (string, &si, Q_DOUBLE_QUOTES, 0);
+
+ temp[j++] = '$';
+ temp[j++] = string[i + 1];
+
+ /* Just paranoia; ret will not be 0 unless no_longjmp_on_fatal_error
+ is set. */
+ if (ret == 0 && no_longjmp_on_fatal_error)
+ {
+ free_ret = 0;
+ ret = string + i + 2;
+ }
+
+ for (t = 0; ret[t]; t++, j++)
+ temp[j] = ret[t];
+ temp[j] = string[si];
+
+ if (string[si])
+ {
+ j++;
+ i = si + 1;
+ }
+ else
+ i = si;
+
+ if (free_ret)
+ free (ret);
+ continue;
+ }
+
+ /* Add any character but a double quote to the quoted string we're
+ accumulating. */
+ if (c != '"')
+ goto add_one_character;
+
+ /* c == '"' */
+ if (stripdq)
+ {
+ dquote ^= 1;
+ i++;
+ continue;
+ }
+
+ break;
+ }
+ temp[j] = '\0';
+
+ /* Point to after the closing quote. */
+ if (c)
+ i++;
+ *sindex = i;
+
+ return (temp);
+}
+
+/* This should really be another option to string_extract_double_quoted. */
+static int
+skip_double_quoted (string, slen, sind)
+ char *string;
+ size_t slen;
+ int sind;
+{
+ int c, i;
+ char *ret;
+ int pass_next, backquote, si;
+ DECLARE_MBSTATE;
+
+ pass_next = backquote = 0;
+ i = sind;
+ while (c = string[i])
+ {
+ if (pass_next)
+ {
+ pass_next = 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if (c == '\\')
+ {
+ pass_next++;
+ i++;
+ continue;
+ }
+ else if (backquote)
+ {
+ if (c == '`')
+ backquote = 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if (c == '`')
+ {
+ backquote++;
+ i++;
+ continue;
+ }
+ else if (c == '$' && ((string[i + 1] == LPAREN) || (string[i + 1] == LBRACE)))
+ {
+ si = i + 2;
+ if (string[i + 1] == LPAREN)
+ ret = extract_command_subst (string, &si, SX_NOALLOC);
+ else
+ ret = extract_dollar_brace_string (string, &si, Q_DOUBLE_QUOTES, SX_NOALLOC);
+
+ i = si + 1;
+ continue;
+ }
+ else if (c != '"')
+ {
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else
+ break;
+ }
+
+ if (c)
+ i++;
+
+ return (i);
+}
+
+/* Extract the contents of STRING as if it is enclosed in single quotes.
+ SINDEX, when passed in, is the offset of the character immediately
+ following the opening single quote; on exit, SINDEX is left pointing after
+ the closing single quote. */
+static inline char *
+string_extract_single_quoted (string, sindex)
+ char *string;
+ int *sindex;
+{
+ register int i;
+ size_t slen;
+ char *t;
+ DECLARE_MBSTATE;
+
+ /* Don't need slen for ADVANCE_CHAR unless multibyte chars possible. */
+ slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 0;
+ i = *sindex;
+ while (string[i] && string[i] != '\'')
+ ADVANCE_CHAR (string, slen, i);
+
+ t = substring (string, *sindex, i);
+
+ if (string[i])
+ i++;
+ *sindex = i;
+
+ return (t);
+}
+
+static inline int
+skip_single_quoted (string, slen, sind)
+ const char *string;
+ size_t slen;
+ int sind;
+{
+ register int c;
+ DECLARE_MBSTATE;
+
+ c = sind;
+ while (string[c] && string[c] != '\'')
+ ADVANCE_CHAR (string, slen, c);
+
+ if (string[c])
+ c++;
+ return c;
+}
+
+/* Just like string_extract, but doesn't hack backslashes or any of
+ that other stuff. Obeys CTLESC quoting. Used to do splitting on $IFS. */
+static char *
+string_extract_verbatim (string, slen, sindex, charlist, flags)
+ char *string;
+ size_t slen;
+ int *sindex;
+ char *charlist;
+ int flags;
+{
+ register int i;
+#if defined (HANDLE_MULTIBYTE)
+ size_t clen;
+ wchar_t *wcharlist;
+#endif
+ int c;
+ char *temp;
+ DECLARE_MBSTATE;
+
+ if (charlist[0] == '\'' && charlist[1] == '\0')
+ {
+ temp = string_extract_single_quoted (string, sindex);
+ --*sindex; /* leave *sindex at separator character */
+ return temp;
+ }
+
+ i = *sindex;
+#if 0
+ /* See how the MBLEN and ADVANCE_CHAR macros work to understand why we need
+ this only if MB_CUR_MAX > 1. */
+ slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 1;
+#endif
+#if defined (HANDLE_MULTIBYTE)
+ clen = strlen (charlist);
+ wcharlist = 0;
+#endif
+ while (c = string[i])
+ {
+#if defined (HANDLE_MULTIBYTE)
+ size_t mblength;
+#endif
+ if ((flags & SX_NOCTLESC) == 0 && c == CTLESC)
+ {
+ i += 2;
+ continue;
+ }
+ /* Even if flags contains SX_NOCTLESC, we let CTLESC quoting CTLNUL
+ through, to protect the CTLNULs from later calls to
+ remove_quoted_nulls. */
+ else if ((flags & SX_NOESCCTLNUL) == 0 && c == CTLESC && string[i+1] == CTLNUL)
+ {
+ i += 2;
+ continue;
+ }
+
+#if defined (HANDLE_MULTIBYTE)
+ mblength = MBLEN (string + i, slen - i);
+ if (mblength > 1)
+ {
+ wchar_t wc;
+ mblength = mbtowc (&wc, string + i, slen - i);
+ if (MB_INVALIDCH (mblength))
+ {
+ if (MEMBER (c, charlist))
+ break;
+ }
+ else
+ {
+ if (wcharlist == 0)
+ {
+ size_t len;
+ len = mbstowcs (wcharlist, charlist, 0);
+ if (len == -1)
+ len = 0;
+ wcharlist = (wchar_t *)xmalloc (sizeof (wchar_t) * (len + 1));
+ mbstowcs (wcharlist, charlist, len + 1);
+ }
+
+ if (wcschr (wcharlist, wc))
+ break;
+ }
+ }
+ else
+#endif
+ if (MEMBER (c, charlist))
+ break;
+
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+#if defined (HANDLE_MULTIBYTE)
+ FREE (wcharlist);
+#endif
+
+ temp = substring (string, *sindex, i);
+ *sindex = i;
+
+ return (temp);
+}
+
+/* Extract the $( construct in STRING, and return a new string.
+ Start extracting at (SINDEX) as if we had just seen "$(".
+ Make (SINDEX) get the position of the matching ")". )
+ XFLAGS is additional flags to pass to other extraction functions. */
+char *
+extract_command_subst (string, sindex, xflags)
+ char *string;
+ int *sindex;
+ int xflags;
+{
+ if (string[*sindex] == LPAREN)
+ return (extract_delimited_string (string, sindex, "$(", "(", ")", xflags|SX_COMMAND)); /*)*/
+ else
+ {
+ xflags |= (no_longjmp_on_fatal_error ? SX_NOLONGJMP : 0);
+ return (xparse_dolparen (string, string+*sindex, sindex, xflags));
+ }
+}
+
+/* Extract the $[ construct in STRING, and return a new string. (])
+ Start extracting at (SINDEX) as if we had just seen "$[".
+ Make (SINDEX) get the position of the matching "]". */
+char *
+extract_arithmetic_subst (string, sindex)
+ char *string;
+ int *sindex;
+{
+ return (extract_delimited_string (string, sindex, "$[", "[", "]", 0)); /*]*/
+}
+
+#if defined (PROCESS_SUBSTITUTION)
+/* Extract the <( or >( construct in STRING, and return a new string.
+ Start extracting at (SINDEX) as if we had just seen "<(".
+ Make (SINDEX) get the position of the matching ")". */ /*))*/
+char *
+extract_process_subst (string, starter, sindex)
+ char *string;
+ char *starter;
+ int *sindex;
+{
+ return (extract_delimited_string (string, sindex, starter, "(", ")", SX_COMMAND));
+}
+#endif /* PROCESS_SUBSTITUTION */
+
+#if defined (ARRAY_VARS)
+/* This can be fooled by unquoted right parens in the passed string. If
+ each caller verifies that the last character in STRING is a right paren,
+ we don't even need to call extract_delimited_string. */
+char *
+extract_array_assignment_list (string, sindex)
+ char *string;
+ int *sindex;
+{
+ int slen;
+ char *ret;
+
+ slen = strlen (string); /* ( */
+ if (string[slen - 1] == ')')
+ {
+ ret = substring (string, *sindex, slen - 1);
+ *sindex = slen - 1;
+ return ret;
+ }
+ return 0;
+}
+#endif
+
+/* Extract and create a new string from the contents of STRING, a
+ character string delimited with OPENER and CLOSER. SINDEX is
+ the address of an int describing the current offset in STRING;
+ it should point to just after the first OPENER found. On exit,
+ SINDEX gets the position of the last character of the matching CLOSER.
+ If OPENER is more than a single character, ALT_OPENER, if non-null,
+ contains a character string that can also match CLOSER and thus
+ needs to be skipped. */
+static char *
+extract_delimited_string (string, sindex, opener, alt_opener, closer, flags)
+ char *string;
+ int *sindex;
+ char *opener, *alt_opener, *closer;
+ int flags;
+{
+ int i, c, si;
+ size_t slen;
+ char *t, *result;
+ int pass_character, nesting_level, in_comment;
+ int len_closer, len_opener, len_alt_opener;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string + *sindex) + *sindex;
+ len_opener = STRLEN (opener);
+ len_alt_opener = STRLEN (alt_opener);
+ len_closer = STRLEN (closer);
+
+ pass_character = in_comment = 0;
+
+ nesting_level = 1;
+ i = *sindex;
+
+ while (nesting_level)
+ {
+ c = string[i];
+
+ if (c == 0)
+ break;
+
+ if (in_comment)
+ {
+ if (c == '\n')
+ in_comment = 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+
+ if (pass_character) /* previous char was backslash */
+ {
+ pass_character = 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+
+ /* Not exactly right yet; should handle shell metacharacters and
+ multibyte characters, too. See COMMENT_BEGIN define in parse.y */
+ if ((flags & SX_COMMAND) && c == '#' && (i == 0 || string[i - 1] == '\n' || shellblank (string[i - 1])))
+ {
+ in_comment = 1;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+
+ if (c == CTLESC || c == '\\')
+ {
+ pass_character++;
+ i++;
+ continue;
+ }
+
+ /* Process a nested command substitution, but only if we're parsing an
+ arithmetic substitution. */
+ if ((flags & SX_COMMAND) && string[i] == '$' && string[i+1] == LPAREN)
+ {
+ si = i + 2;
+ t = extract_command_subst (string, &si, flags|SX_NOALLOC);
+ i = si + 1;
+ continue;
+ }
+
+ /* Process a nested OPENER. */
+ if (STREQN (string + i, opener, len_opener))
+ {
+ si = i + len_opener;
+ t = extract_delimited_string (string, &si, opener, alt_opener, closer, flags|SX_NOALLOC);
+ i = si + 1;
+ continue;
+ }
+
+ /* Process a nested ALT_OPENER */
+ if (len_alt_opener && STREQN (string + i, alt_opener, len_alt_opener))
+ {
+ si = i + len_alt_opener;
+ t = extract_delimited_string (string, &si, alt_opener, alt_opener, closer, flags|SX_NOALLOC);
+ i = si + 1;
+ continue;
+ }
+
+ /* If the current substring terminates the delimited string, decrement
+ the nesting level. */
+ if (STREQN (string + i, closer, len_closer))
+ {
+ i += len_closer - 1; /* move to last byte of the closer */
+ nesting_level--;
+ if (nesting_level == 0)
+ break;
+ }
+
+ /* Pass old-style command substitution through verbatim. */
+ if (c == '`')
+ {
+ si = i + 1;
+ t = string_extract (string, &si, "`", flags|SX_NOALLOC);
+ i = si + 1;
+ continue;
+ }
+
+ /* Pass single-quoted and double-quoted strings through verbatim. */
+ if (c == '\'' || c == '"')
+ {
+ si = i + 1;
+ i = (c == '\'') ? skip_single_quoted (string, slen, si)
+ : skip_double_quoted (string, slen, si);
+ continue;
+ }
+
+ /* move past this character, which was not special. */
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ if (c == 0 && nesting_level)
+ {
+ if (no_longjmp_on_fatal_error == 0)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ report_error (_("bad substitution: no closing `%s' in %s"), closer, string);
+ exp_jump_to_top_level (DISCARD);
+ }
+ else
+ {
+ *sindex = i;
+ return (char *)NULL;
+ }
+ }
+
+ si = i - *sindex - len_closer + 1;
+ if (flags & SX_NOALLOC)
+ result = (char *)NULL;
+ else
+ {
+ result = (char *)xmalloc (1 + si);
+ strncpy (result, string + *sindex, si);
+ result[si] = '\0';
+ }
+ *sindex = i;
+
+ return (result);
+}
+
+/* Extract a parameter expansion expression within ${ and } from STRING.
+ Obey the Posix.2 rules for finding the ending `}': count braces while
+ skipping over enclosed quoted strings and command substitutions.
+ SINDEX is the address of an int describing the current offset in STRING;
+ it should point to just after the first `{' found. On exit, SINDEX
+ gets the position of the matching `}'. QUOTED is non-zero if this
+ occurs inside double quotes. */
+/* XXX -- this is very similar to extract_delimited_string -- XXX */
+static char *
+extract_dollar_brace_string (string, sindex, quoted, flags)
+ char *string;
+ int *sindex, quoted, flags;
+{
+ register int i, c;
+ size_t slen;
+ int pass_character, nesting_level, si, dolbrace_state;
+ char *result, *t;
+ DECLARE_MBSTATE;
+
+ pass_character = 0;
+ nesting_level = 1;
+ slen = strlen (string + *sindex) + *sindex;
+
+ /* The handling of dolbrace_state needs to agree with the code in parse.y:
+ parse_matched_pair(). The different initial value is to handle the
+ case where this function is called to parse the word in
+ ${param op word} (SX_WORD). */
+ dolbrace_state = (flags & SX_WORD) ? DOLBRACE_WORD : DOLBRACE_PARAM;
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && (flags & SX_POSIXEXP))
+ dolbrace_state = DOLBRACE_QUOTE;
+
+ i = *sindex;
+ while (c = string[i])
+ {
+ if (pass_character)
+ {
+ pass_character = 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+
+ /* CTLESCs and backslashes quote the next character. */
+ if (c == CTLESC || c == '\\')
+ {
+ pass_character++;
+ i++;
+ continue;
+ }
+
+ if (string[i] == '$' && string[i+1] == LBRACE)
+ {
+ nesting_level++;
+ i += 2;
+ continue;
+ }
+
+ if (c == RBRACE)
+ {
+ nesting_level--;
+ if (nesting_level == 0)
+ break;
+ i++;
+ continue;
+ }
+
+ /* Pass the contents of old-style command substitutions through
+ verbatim. */
+ if (c == '`')
+ {
+ si = i + 1;
+ t = string_extract (string, &si, "`", flags|SX_NOALLOC);
+ i = si + 1;
+ continue;
+ }
+
+ /* Pass the contents of new-style command substitutions and
+ arithmetic substitutions through verbatim. */
+ if (string[i] == '$' && string[i+1] == LPAREN)
+ {
+ si = i + 2;
+ t = extract_command_subst (string, &si, flags|SX_NOALLOC);
+ i = si + 1;
+ continue;
+ }
+
+ /* Pass the contents of double-quoted strings through verbatim. */
+ if (c == '"')
+ {
+ si = i + 1;
+ i = skip_double_quoted (string, slen, si);
+ /* skip_XXX_quoted leaves index one past close quote */
+ continue;
+ }
+
+ if (c == '\'')
+ {
+/*itrace("extract_dollar_brace_string: c == single quote flags = %d quoted = %d dolbrace_state = %d", flags, quoted, dolbrace_state);*/
+ if (posixly_correct && shell_compatibility_level > 42 && dolbrace_state != DOLBRACE_QUOTE && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ADVANCE_CHAR (string, slen, i);
+ else
+ {
+ si = i + 1;
+ i = skip_single_quoted (string, slen, si);
+ }
+
+ continue;
+ }
+
+ /* move past this character, which was not special. */
+ ADVANCE_CHAR (string, slen, i);
+
+ /* This logic must agree with parse.y:parse_matched_pair, since they
+ share the same defines. */
+ if (dolbrace_state == DOLBRACE_PARAM && c == '%' && (i - *sindex) > 1)
+ dolbrace_state = DOLBRACE_QUOTE;
+ else if (dolbrace_state == DOLBRACE_PARAM && c == '#' && (i - *sindex) > 1)
+ dolbrace_state = DOLBRACE_QUOTE;
+ else if (dolbrace_state == DOLBRACE_PARAM && c == '/' && (i - *sindex) > 1)
+ dolbrace_state = DOLBRACE_QUOTE2; /* XXX */
+ else if (dolbrace_state == DOLBRACE_PARAM && c == '^' && (i - *sindex) > 1)
+ dolbrace_state = DOLBRACE_QUOTE;
+ else if (dolbrace_state == DOLBRACE_PARAM && c == ',' && (i - *sindex) > 1)
+ dolbrace_state = DOLBRACE_QUOTE;
+ else if (dolbrace_state == DOLBRACE_PARAM && strchr ("#%^,~:-=?+/", c) != 0)
+ dolbrace_state = DOLBRACE_OP;
+ else if (dolbrace_state == DOLBRACE_OP && strchr ("#%^,~:-=?+/", c) == 0)
+ dolbrace_state = DOLBRACE_WORD;
+ }
+
+ if (c == 0 && nesting_level)
+ {
+ if (no_longjmp_on_fatal_error == 0)
+ { /* { */
+ last_command_exit_value = EXECUTION_FAILURE;
+ report_error (_("bad substitution: no closing `%s' in %s"), "}", string);
+ exp_jump_to_top_level (DISCARD);
+ }
+ else
+ {
+ *sindex = i;
+ return ((char *)NULL);
+ }
+ }
+
+ result = (flags & SX_NOALLOC) ? (char *)NULL : substring (string, *sindex, i);
+ *sindex = i;
+
+ return (result);
+}
+
+/* Remove backslashes which are quoting backquotes from STRING. Modifies
+ STRING, and returns a pointer to it. */
+char *
+de_backslash (string)
+ char *string;
+{
+ register size_t slen;
+ register int i, j, prev_i;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ i = j = 0;
+
+ /* Loop copying string[i] to string[j], i >= j. */
+ while (i < slen)
+ {
+ if (string[i] == '\\' && (string[i + 1] == '`' || string[i + 1] == '\\' ||
+ string[i + 1] == '$'))
+ i++;
+ prev_i = i;
+ ADVANCE_CHAR (string, slen, i);
+ if (j < prev_i)
+ do string[j++] = string[prev_i++]; while (prev_i < i);
+ else
+ j = i;
+ }
+ string[j] = '\0';
+
+ return (string);
+}
+
+#if 0
+/*UNUSED*/
+/* Replace instances of \! in a string with !. */
+void
+unquote_bang (string)
+ char *string;
+{
+ register int i, j;
+ register char *temp;
+
+ temp = (char *)xmalloc (1 + strlen (string));
+
+ for (i = 0, j = 0; (temp[j] = string[i]); i++, j++)
+ {
+ if (string[i] == '\\' && string[i + 1] == '!')
+ {
+ temp[j] = '!';
+ i++;
+ }
+ }
+ strcpy (string, temp);
+ free (temp);
+}
+#endif
+
+#define CQ_RETURN(x) do { no_longjmp_on_fatal_error = 0; return (x); } while (0)
+
+/* This function assumes s[i] == open; returns with s[ret] == close; used to
+ parse array subscripts. FLAGS & 1 means to not attempt to skip over
+ matched pairs of quotes or backquotes, or skip word expansions; it is
+ intended to be used after expansion has been performed and during final
+ assignment parsing (see arrayfunc.c:assign_compound_array_list()). */
+static int
+skip_matched_pair (string, start, open, close, flags)
+ const char *string;
+ int start, open, close, flags;
+{
+ int i, pass_next, backq, si, c, count;
+ size_t slen;
+ char *temp, *ss;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string + start) + start;
+ no_longjmp_on_fatal_error = 1;
+
+ i = start + 1; /* skip over leading bracket */
+ count = 1;
+ pass_next = backq = 0;
+ ss = (char *)string;
+ while (c = string[i])
+ {
+ if (pass_next)
+ {
+ pass_next = 0;
+ if (c == 0)
+ CQ_RETURN(i);
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if (c == '\\')
+ {
+ pass_next = 1;
+ i++;
+ continue;
+ }
+ else if (backq)
+ {
+ if (c == '`')
+ backq = 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if ((flags & 1) == 0 && c == '`')
+ {
+ backq = 1;
+ i++;
+ continue;
+ }
+ else if ((flags & 1) == 0 && c == open)
+ {
+ count++;
+ i++;
+ continue;
+ }
+ else if (c == close)
+ {
+ count--;
+ if (count == 0)
+ break;
+ i++;
+ continue;
+ }
+ else if ((flags & 1) == 0 && (c == '\'' || c == '"'))
+ {
+ i = (c == '\'') ? skip_single_quoted (ss, slen, ++i)
+ : skip_double_quoted (ss, slen, ++i);
+ /* no increment, the skip functions increment past the closing quote. */
+ }
+ else if ((flags&1) == 0 && c == '$' && (string[i+1] == LPAREN || string[i+1] == LBRACE))
+ {
+ si = i + 2;
+ if (string[si] == '\0')
+ CQ_RETURN(si);
+
+ if (string[i+1] == LPAREN)
+ temp = extract_delimited_string (ss, &si, "$(", "(", ")", SX_NOALLOC|SX_COMMAND); /* ) */
+ else
+ temp = extract_dollar_brace_string (ss, &si, 0, SX_NOALLOC);
+ i = si;
+ if (string[i] == '\0') /* don't increment i past EOS in loop */
+ break;
+ i++;
+ continue;
+ }
+ else
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ CQ_RETURN(i);
+}
+
+#if defined (ARRAY_VARS)
+int
+skipsubscript (string, start, flags)
+ const char *string;
+ int start, flags;
+{
+ return (skip_matched_pair (string, start, '[', ']', flags));
+}
+#endif
+
+/* Skip characters in STRING until we find a character in DELIMS, and return
+ the index of that character. START is the index into string at which we
+ begin. This is similar in spirit to strpbrk, but it returns an index into
+ STRING and takes a starting index. This little piece of code knows quite
+ a lot of shell syntax. It's very similar to skip_double_quoted and other
+ functions of that ilk. */
+int
+skip_to_delim (string, start, delims, flags)
+ char *string;
+ int start;
+ char *delims;
+ int flags;
+{
+ int i, pass_next, backq, si, c, invert, skipquote, skipcmd;
+ size_t slen;
+ char *temp, open[3];
+ DECLARE_MBSTATE;
+
+ slen = strlen (string + start) + start;
+ if (flags & SD_NOJMP)
+ no_longjmp_on_fatal_error = 1;
+ invert = (flags & SD_INVERT);
+ skipcmd = (flags & SD_NOSKIPCMD) == 0;
+
+ i = start;
+ pass_next = backq = 0;
+ while (c = string[i])
+ {
+ /* If this is non-zero, we should not let quote characters be delimiters
+ and the current character is a single or double quote. We should not
+ test whether or not it's a delimiter until after we skip single- or
+ double-quoted strings. */
+ skipquote = ((flags & SD_NOQUOTEDELIM) && (c == '\'' || c =='"'));
+ if (pass_next)
+ {
+ pass_next = 0;
+ if (c == 0)
+ CQ_RETURN(i);
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if (c == '\\')
+ {
+ pass_next = 1;
+ i++;
+ continue;
+ }
+ else if (backq)
+ {
+ if (c == '`')
+ backq = 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if (c == '`')
+ {
+ backq = 1;
+ i++;
+ continue;
+ }
+ else if (skipquote == 0 && invert == 0 && member (c, delims))
+ break;
+ else if (c == '\'' || c == '"')
+ {
+ i = (c == '\'') ? skip_single_quoted (string, slen, ++i)
+ : skip_double_quoted (string, slen, ++i);
+ /* no increment, the skip functions increment past the closing quote. */
+ }
+ else if (c == '$' && ((skipcmd && string[i+1] == LPAREN) || string[i+1] == LBRACE))
+ {
+ si = i + 2;
+ if (string[si] == '\0')
+ CQ_RETURN(si);
+
+ if (string[i+1] == LPAREN)
+ temp = extract_delimited_string (string, &si, "$(", "(", ")", SX_NOALLOC|SX_COMMAND); /* ) */
+ else
+ temp = extract_dollar_brace_string (string, &si, 0, SX_NOALLOC);
+ i = si;
+ if (string[i] == '\0') /* don't increment i past EOS in loop */
+ break;
+ i++;
+ continue;
+ }
+#if defined (PROCESS_SUBSTITUTION)
+ else if (skipcmd && (c == '<' || c == '>') && string[i+1] == LPAREN)
+ {
+ si = i + 2;
+ if (string[si] == '\0')
+ CQ_RETURN(si);
+ temp = extract_process_subst (string, (c == '<') ? "<(" : ">(", &si);
+ free (temp); /* no SX_ALLOC here */
+ i = si;
+ if (string[i] == '\0')
+ break;
+ i++;
+ continue;
+ }
+#endif /* PROCESS_SUBSTITUTION */
+#if defined (EXTENDED_GLOB)
+ else if ((flags & SD_EXTGLOB) && extended_glob && string[i+1] == LPAREN && member (c, "?*+!@"))
+ {
+ si = i + 2;
+ if (string[si] == '\0')
+ CQ_RETURN(si);
+
+ open[0] = c;
+ open[1] = LPAREN;
+ open[2] = '\0';
+ temp = extract_delimited_string (string, &si, open, "(", ")", SX_NOALLOC); /* ) */
+
+ i = si;
+ if (string[i] == '\0') /* don't increment i past EOS in loop */
+ break;
+ i++;
+ continue;
+ }
+#endif
+ else if ((skipquote || invert) && (member (c, delims) == 0))
+ break;
+ else
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ CQ_RETURN(i);
+}
+
+#if defined (READLINE)
+/* Return 1 if the portion of STRING ending at EINDEX is quoted (there is
+ an unclosed quoted string), or if the character at EINDEX is quoted
+ by a backslash. NO_LONGJMP_ON_FATAL_ERROR is used to flag that the various
+ single and double-quoted string parsing functions should not return an
+ error if there are unclosed quotes or braces. The characters that this
+ recognizes need to be the same as the contents of
+ rl_completer_quote_characters. */
+
+int
+char_is_quoted (string, eindex)
+ char *string;
+ int eindex;
+{
+ int i, pass_next, c;
+ size_t slen;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ no_longjmp_on_fatal_error = 1;
+ i = pass_next = 0;
+ while (i <= eindex)
+ {
+ c = string[i];
+
+ if (pass_next)
+ {
+ pass_next = 0;
+ if (i >= eindex) /* XXX was if (i >= eindex - 1) */
+ CQ_RETURN(1);
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if (c == '\\')
+ {
+ pass_next = 1;
+ i++;
+ continue;
+ }
+ else if (c == '\'' || c == '"')
+ {
+ i = (c == '\'') ? skip_single_quoted (string, slen, ++i)
+ : skip_double_quoted (string, slen, ++i);
+ if (i > eindex)
+ CQ_RETURN(1);
+ /* no increment, the skip_xxx functions go one past end */
+ }
+ else
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ CQ_RETURN(0);
+}
+
+int
+unclosed_pair (string, eindex, openstr)
+ char *string;
+ int eindex;
+ char *openstr;
+{
+ int i, pass_next, openc, olen;
+ size_t slen;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ olen = strlen (openstr);
+ i = pass_next = openc = 0;
+ while (i <= eindex)
+ {
+ if (pass_next)
+ {
+ pass_next = 0;
+ if (i >= eindex) /* XXX was if (i >= eindex - 1) */
+ return 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if (string[i] == '\\')
+ {
+ pass_next = 1;
+ i++;
+ continue;
+ }
+ else if (STREQN (string + i, openstr, olen))
+ {
+ openc = 1 - openc;
+ i += olen;
+ }
+ else if (string[i] == '\'' || string[i] == '"')
+ {
+ i = (string[i] == '\'') ? skip_single_quoted (string, slen, i)
+ : skip_double_quoted (string, slen, i);
+ if (i > eindex)
+ return 0;
+ }
+ else
+ ADVANCE_CHAR (string, slen, i);
+ }
+ return (openc);
+}
+
+/* Split STRING (length SLEN) at DELIMS, and return a WORD_LIST with the
+ individual words. If DELIMS is NULL, the current value of $IFS is used
+ to split the string, and the function follows the shell field splitting
+ rules. SENTINEL is an index to look for. NWP, if non-NULL,
+ gets the number of words in the returned list. CWP, if non-NULL, gets
+ the index of the word containing SENTINEL. Non-whitespace chars in
+ DELIMS delimit separate fields. */
+WORD_LIST *
+split_at_delims (string, slen, delims, sentinel, flags, nwp, cwp)
+ char *string;
+ int slen;
+ char *delims;
+ int sentinel, flags;
+ int *nwp, *cwp;
+{
+ int ts, te, i, nw, cw, ifs_split, dflags;
+ char *token, *d, *d2;
+ WORD_LIST *ret, *tl;
+
+ if (string == 0 || *string == '\0')
+ {
+ if (nwp)
+ *nwp = 0;
+ if (cwp)
+ *cwp = 0;
+ return ((WORD_LIST *)NULL);
+ }
+
+ d = (delims == 0) ? ifs_value : delims;
+ ifs_split = delims == 0;
+
+ /* Make d2 the non-whitespace characters in delims */
+ d2 = 0;
+ if (delims)
+ {
+ size_t slength;
+#if defined (HANDLE_MULTIBYTE)
+ size_t mblength = 1;
+#endif
+ DECLARE_MBSTATE;
+
+ slength = strlen (delims);
+ d2 = (char *)xmalloc (slength + 1);
+ i = ts = 0;
+ while (delims[i])
+ {
+#if defined (HANDLE_MULTIBYTE)
+ mbstate_t state_bak;
+ state_bak = state;
+ mblength = MBRLEN (delims + i, slength, &state);
+ if (MB_INVALIDCH (mblength))
+ state = state_bak;
+ else if (mblength > 1)
+ {
+ memcpy (d2 + ts, delims + i, mblength);
+ ts += mblength;
+ i += mblength;
+ slength -= mblength;
+ continue;
+ }
+#endif
+ if (whitespace (delims[i]) == 0)
+ d2[ts++] = delims[i];
+
+ i++;
+ slength--;
+ }
+ d2[ts] = '\0';
+ }
+
+ ret = (WORD_LIST *)NULL;
+
+ /* Remove sequences of whitespace characters at the start of the string, as
+ long as those characters are delimiters. */
+ for (i = 0; member (string[i], d) && spctabnl (string[i]); i++)
+ ;
+ if (string[i] == '\0')
+ return (ret);
+
+ ts = i;
+ nw = 0;
+ cw = -1;
+ dflags = flags|SD_NOJMP;
+ while (1)
+ {
+ te = skip_to_delim (string, ts, d, dflags);
+
+ /* If we have a non-whitespace delimiter character, use it to make a
+ separate field. This is just about what $IFS splitting does and
+ is closer to the behavior of the shell parser. */
+ if (ts == te && d2 && member (string[ts], d2))
+ {
+ te = ts + 1;
+ /* If we're using IFS splitting, the non-whitespace delimiter char
+ and any additional IFS whitespace delimits a field. */
+ if (ifs_split)
+ while (member (string[te], d) && spctabnl (string[te]))
+ te++;
+ else
+ while (member (string[te], d2))
+ te++;
+ }
+
+ token = substring (string, ts, te);
+
+ ret = add_string_to_list (token, ret);
+ free (token);
+ nw++;
+
+ if (sentinel >= ts && sentinel <= te)
+ cw = nw;
+
+ /* If the cursor is at whitespace just before word start, set the
+ sentinel word to the current word. */
+ if (cwp && cw == -1 && sentinel == ts-1)
+ cw = nw;
+
+ /* If the cursor is at whitespace between two words, make a new, empty
+ word, add it before (well, after, since the list is in reverse order)
+ the word we just added, and set the current word to that one. */
+ if (cwp && cw == -1 && sentinel < ts)
+ {
+ tl = make_word_list (make_word (""), ret->next);
+ ret->next = tl;
+ cw = nw;
+ nw++;
+ }
+
+ if (string[te] == 0)
+ break;
+
+ i = te;
+ while (member (string[i], d) && (ifs_split || spctabnl(string[i])))
+ i++;
+
+ if (string[i])
+ ts = i;
+ else
+ break;
+ }
+
+ /* Special case for SENTINEL at the end of STRING. If we haven't found
+ the word containing SENTINEL yet, and the index we're looking for is at
+ the end of STRING (or past the end of the previously-found token,
+ possible if the end of the line is composed solely of IFS whitespace)
+ add an additional null argument and set the current word pointer to that. */
+ if (cwp && cw == -1 && (sentinel >= slen || sentinel >= te))
+ {
+ if (whitespace (string[sentinel - 1]))
+ {
+ token = "";
+ ret = add_string_to_list (token, ret);
+ nw++;
+ }
+ cw = nw;
+ }
+
+ if (nwp)
+ *nwp = nw;
+ if (cwp)
+ *cwp = cw;
+
+ FREE (d2);
+
+ return (REVERSE_LIST (ret, WORD_LIST *));
+}
+#endif /* READLINE */
+
+#if 0
+/* UNUSED */
+/* Extract the name of the variable to bind to from the assignment string. */
+char *
+assignment_name (string)
+ char *string;
+{
+ int offset;
+ char *temp;
+
+ offset = assignment (string, 0);
+ if (offset == 0)
+ return (char *)NULL;
+ temp = substring (string, 0, offset);
+ return (temp);
+}
+#endif
+
+/* **************************************************************** */
+/* */
+/* Functions to convert strings to WORD_LISTs and vice versa */
+/* */
+/* **************************************************************** */
+
+/* Return a single string of all the words in LIST. SEP is the separator
+ to put between individual elements of LIST in the output string. */
+char *
+string_list_internal (list, sep)
+ WORD_LIST *list;
+ char *sep;
+{
+ register WORD_LIST *t;
+ char *result, *r;
+ int word_len, sep_len, result_size;
+
+ if (list == 0)
+ return ((char *)NULL);
+
+ /* Short-circuit quickly if we don't need to separate anything. */
+ if (list->next == 0)
+ return (savestring (list->word->word));
+
+ /* This is nearly always called with either sep[0] == 0 or sep[1] == 0. */
+ sep_len = STRLEN (sep);
+ result_size = 0;
+
+ for (t = list; t; t = t->next)
+ {
+ if (t != list)
+ result_size += sep_len;
+ result_size += strlen (t->word->word);
+ }
+
+ r = result = (char *)xmalloc (result_size + 1);
+
+ for (t = list; t; t = t->next)
+ {
+ if (t != list && sep_len)
+ {
+ if (sep_len > 1)
+ {
+ FASTCOPY (sep, r, sep_len);
+ r += sep_len;
+ }
+ else
+ *r++ = sep[0];
+ }
+
+ word_len = strlen (t->word->word);
+ FASTCOPY (t->word->word, r, word_len);
+ r += word_len;
+ }
+
+ *r = '\0';
+ return (result);
+}
+
+/* Return a single string of all the words present in LIST, separating
+ each word with a space. */
+char *
+string_list (list)
+ WORD_LIST *list;
+{
+ return (string_list_internal (list, " "));
+}
+
+/* An external interface that can be used by the rest of the shell to
+ obtain a string containing the first character in $IFS. Handles all
+ the multibyte complications. If LENP is non-null, it is set to the
+ length of the returned string. */
+char *
+ifs_firstchar (lenp)
+ int *lenp;
+{
+ char *ret;
+ int len;
+
+ ret = xmalloc (MB_LEN_MAX + 1);
+#if defined (HANDLE_MULTIBYTE)
+ if (ifs_firstc_len == 1)
+ {
+ ret[0] = ifs_firstc[0];
+ ret[1] = '\0';
+ len = ret[0] ? 1 : 0;
+ }
+ else
+ {
+ memcpy (ret, ifs_firstc, ifs_firstc_len);
+ ret[len = ifs_firstc_len] = '\0';
+ }
+#else
+ ret[0] = ifs_firstc;
+ ret[1] = '\0';
+ len = ret[0] ? 0 : 1;
+#endif
+
+ if (lenp)
+ *lenp = len;
+
+ return ret;
+}
+
+/* Return a single string of all the words present in LIST, obeying the
+ quoting rules for "$*", to wit: (P1003.2, draft 11, 3.5.2) "If the
+ expansion [of $*] appears within a double quoted string, it expands
+ to a single field with the value of each parameter separated by the
+ first character of the IFS variable, or by a <space> if IFS is unset." */
+char *
+string_list_dollar_star (list)
+ WORD_LIST *list;
+{
+ char *ret;
+#if defined (HANDLE_MULTIBYTE)
+# if defined (__GNUC__)
+ char sep[MB_CUR_MAX + 1];
+# else
+ char *sep = 0;
+# endif
+#else
+ char sep[2];
+#endif
+
+#if defined (HANDLE_MULTIBYTE)
+# if !defined (__GNUC__)
+ sep = (char *)xmalloc (MB_CUR_MAX + 1);
+# endif /* !__GNUC__ */
+ if (ifs_firstc_len == 1)
+ {
+ sep[0] = ifs_firstc[0];
+ sep[1] = '\0';
+ }
+ else
+ {
+ memcpy (sep, ifs_firstc, ifs_firstc_len);
+ sep[ifs_firstc_len] = '\0';
+ }
+#else
+ sep[0] = ifs_firstc;
+ sep[1] = '\0';
+#endif
+
+ ret = string_list_internal (list, sep);
+#if defined (HANDLE_MULTIBYTE) && !defined (__GNUC__)
+ free (sep);
+#endif
+ return ret;
+}
+
+/* Turn $@ into a string. If (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ is non-zero, the $@ appears within double quotes, and we should quote
+ the list before converting it into a string. If IFS is unset, and the
+ word is not quoted, we just need to quote CTLESC and CTLNUL characters
+ in the words in the list, because the default value of $IFS is
+ <space><tab><newline>, IFS characters in the words in the list should
+ also be split. If IFS is null, and the word is not quoted, we need
+ to quote the words in the list to preserve the positional parameters
+ exactly. */
+char *
+string_list_dollar_at (list, quoted)
+ WORD_LIST *list;
+ int quoted;
+{
+ char *ifs, *ret;
+#if defined (HANDLE_MULTIBYTE)
+# if defined (__GNUC__)
+ char sep[MB_CUR_MAX + 1];
+# else
+ char *sep = 0;
+# endif /* !__GNUC__ */
+#else
+ char sep[2];
+#endif
+ WORD_LIST *tlist;
+
+ /* XXX this could just be ifs = ifs_value; */
+ ifs = ifs_var ? value_cell (ifs_var) : (char *)0;
+
+#if defined (HANDLE_MULTIBYTE)
+# if !defined (__GNUC__)
+ sep = (char *)xmalloc (MB_CUR_MAX + 1);
+# endif /* !__GNUC__ */
+ if (ifs && *ifs)
+ {
+ if (ifs_firstc_len == 1)
+ {
+ sep[0] = ifs_firstc[0];
+ sep[1] = '\0';
+ }
+ else
+ {
+ memcpy (sep, ifs_firstc, ifs_firstc_len);
+ sep[ifs_firstc_len] = '\0';
+ }
+ }
+ else
+ {
+ sep[0] = ' ';
+ sep[1] = '\0';
+ }
+#else
+ sep[0] = (ifs == 0 || *ifs == 0) ? ' ' : *ifs;
+ sep[1] = '\0';
+#endif
+
+ /* XXX -- why call quote_list if ifs == 0? we can get away without doing
+ it now that quote_escapes quotes spaces */
+ tlist = (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES|Q_PATQUOTE))
+ ? quote_list (list)
+ : list_quote_escapes (list);
+
+ ret = string_list_internal (tlist, sep);
+#if defined (HANDLE_MULTIBYTE) && !defined (__GNUC__)
+ free (sep);
+#endif
+ return ret;
+}
+
+/* Turn the positional parameters into a string, understanding quoting and
+ the various subtleties of using the first character of $IFS as the
+ separator. Calls string_list_dollar_at, string_list_dollar_star, and
+ string_list as appropriate. */
+char *
+string_list_pos_params (pchar, list, quoted)
+ int pchar;
+ WORD_LIST *list;
+ int quoted;
+{
+ char *ret;
+ WORD_LIST *tlist;
+
+ if (pchar == '*' && (quoted & Q_DOUBLE_QUOTES))
+ {
+ tlist = quote_list (list);
+ word_list_remove_quoted_nulls (tlist);
+ ret = string_list_dollar_star (tlist);
+ }
+ else if (pchar == '*' && (quoted & Q_HERE_DOCUMENT))
+ {
+ tlist = quote_list (list);
+ word_list_remove_quoted_nulls (tlist);
+ ret = string_list (tlist);
+ }
+ else if (pchar == '*')
+ {
+ /* Even when unquoted, string_list_dollar_star does the right thing
+ making sure that the first character of $IFS is used as the
+ separator. */
+ ret = string_list_dollar_star (list);
+ }
+ else if (pchar == '@' && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ /* We use string_list_dollar_at, but only if the string is quoted, since
+ that quotes the escapes if it's not, which we don't want. We could
+ use string_list (the old code did), but that doesn't do the right
+ thing if the first character of $IFS is not a space. We use
+ string_list_dollar_star if the string is unquoted so we make sure that
+ the elements of $@ are separated by the first character of $IFS for
+ later splitting. */
+ ret = string_list_dollar_at (list, quoted);
+ else if (pchar == '@')
+ ret = string_list_dollar_star (list);
+ else
+ ret = string_list ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? quote_list (list) : list);
+
+ return ret;
+}
+
+/* Return the list of words present in STRING. Separate the string into
+ words at any of the characters found in SEPARATORS. If QUOTED is
+ non-zero then word in the list will have its quoted flag set, otherwise
+ the quoted flag is left as make_word () deemed fit.
+
+ This obeys the P1003.2 word splitting semantics. If `separators' is
+ exactly <space><tab><newline>, then the splitting algorithm is that of
+ the Bourne shell, which treats any sequence of characters from `separators'
+ as a delimiter. If IFS is unset, which results in `separators' being set
+ to "", no splitting occurs. If separators has some other value, the
+ following rules are applied (`IFS white space' means zero or more
+ occurrences of <space>, <tab>, or <newline>, as long as those characters
+ are in `separators'):
+
+ 1) IFS white space is ignored at the start and the end of the
+ string.
+ 2) Each occurrence of a character in `separators' that is not
+ IFS white space, along with any adjacent occurrences of
+ IFS white space delimits a field.
+ 3) Any nonzero-length sequence of IFS white space delimits a field.
+ */
+
+/* BEWARE! list_string strips null arguments. Don't call it twice and
+ expect to have "" preserved! */
+
+/* This performs word splitting and quoted null character removal on
+ STRING. */
+#define issep(c) \
+ (((separators)[0]) ? ((separators)[1] ? isifs(c) \
+ : (c) == (separators)[0]) \
+ : 0)
+
+WORD_LIST *
+list_string (string, separators, quoted)
+ register char *string, *separators;
+ int quoted;
+{
+ WORD_LIST *result;
+ WORD_DESC *t;
+ char *current_word, *s;
+ int sindex, sh_style_split, whitesep, xflags;
+ size_t slen;
+
+ if (!string || !*string)
+ return ((WORD_LIST *)NULL);
+
+ sh_style_split = separators && separators[0] == ' ' &&
+ separators[1] == '\t' &&
+ separators[2] == '\n' &&
+ separators[3] == '\0';
+ for (xflags = 0, s = ifs_value; s && *s; s++)
+ {
+ if (*s == CTLESC) xflags |= SX_NOCTLESC;
+ else if (*s == CTLNUL) xflags |= SX_NOESCCTLNUL;
+ }
+
+ slen = 0;
+ /* Remove sequences of whitespace at the beginning of STRING, as
+ long as those characters appear in IFS. Do not do this if
+ STRING is quoted or if there are no separator characters. */
+ if (!quoted || !separators || !*separators)
+ {
+ for (s = string; *s && spctabnl (*s) && issep (*s); s++);
+
+ if (!*s)
+ return ((WORD_LIST *)NULL);
+
+ string = s;
+ }
+
+ /* OK, now STRING points to a word that does not begin with white space.
+ The splitting algorithm is:
+ extract a word, stopping at a separator
+ skip sequences of spc, tab, or nl as long as they are separators
+ This obeys the field splitting rules in Posix.2. */
+ slen = (MB_CUR_MAX > 1) ? strlen (string) : 1;
+ for (result = (WORD_LIST *)NULL, sindex = 0; string[sindex]; )
+ {
+ /* Don't need string length in ADVANCE_CHAR or string_extract_verbatim
+ unless multibyte chars are possible. */
+ current_word = string_extract_verbatim (string, slen, &sindex, separators, xflags);
+ if (current_word == 0)
+ break;
+
+ /* If we have a quoted empty string, add a quoted null argument. We
+ want to preserve the quoted null character iff this is a quoted
+ empty string; otherwise the quoted null characters are removed
+ below. */
+ if (QUOTED_NULL (current_word))
+ {
+ t = alloc_word_desc ();
+ t->word = make_quoted_char ('\0');
+ t->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ result = make_word_list (t, result);
+ }
+ else if (current_word[0] != '\0')
+ {
+ /* If we have something, then add it regardless. However,
+ perform quoted null character removal on the current word. */
+ remove_quoted_nulls (current_word);
+ result = add_string_to_list (current_word, result);
+ result->word->flags &= ~W_HASQUOTEDNULL; /* just to be sure */
+ if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
+ result->word->flags |= W_QUOTED;
+ }
+
+ /* If we're not doing sequences of separators in the traditional
+ Bourne shell style, then add a quoted null argument. */
+ else if (!sh_style_split && !spctabnl (string[sindex]))
+ {
+ t = alloc_word_desc ();
+ t->word = make_quoted_char ('\0');
+ t->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ result = make_word_list (t, result);
+ }
+
+ free (current_word);
+
+ /* Note whether or not the separator is IFS whitespace, used later. */
+ whitesep = string[sindex] && spctabnl (string[sindex]);
+
+ /* Move past the current separator character. */
+ if (string[sindex])
+ {
+ DECLARE_MBSTATE;
+ ADVANCE_CHAR (string, slen, sindex);
+ }
+
+ /* Now skip sequences of space, tab, or newline characters if they are
+ in the list of separators. */
+ while (string[sindex] && spctabnl (string[sindex]) && issep (string[sindex]))
+ sindex++;
+
+ /* If the first separator was IFS whitespace and the current character
+ is a non-whitespace IFS character, it should be part of the current
+ field delimiter, not a separate delimiter that would result in an
+ empty field. Look at POSIX.2, 3.6.5, (3)(b). */
+ if (string[sindex] && whitesep && issep (string[sindex]) && !spctabnl (string[sindex]))
+ {
+ sindex++;
+ /* An IFS character that is not IFS white space, along with any
+ adjacent IFS white space, shall delimit a field. (SUSv3) */
+ while (string[sindex] && spctabnl (string[sindex]) && isifs (string[sindex]))
+ sindex++;
+ }
+ }
+ return (REVERSE_LIST (result, WORD_LIST *));
+}
+
+/* Parse a single word from STRING, using SEPARATORS to separate fields.
+ ENDPTR is set to the first character after the word. This is used by
+ the `read' builtin. This is never called with SEPARATORS != $IFS;
+ it should be simplified.
+
+ XXX - this function is very similar to list_string; they should be
+ combined - XXX */
+char *
+get_word_from_string (stringp, separators, endptr)
+ char **stringp, *separators, **endptr;
+{
+ register char *s;
+ char *current_word;
+ int sindex, sh_style_split, whitesep, xflags;
+ size_t slen;
+
+ if (!stringp || !*stringp || !**stringp)
+ return ((char *)NULL);
+
+ sh_style_split = separators && separators[0] == ' ' &&
+ separators[1] == '\t' &&
+ separators[2] == '\n' &&
+ separators[3] == '\0';
+ for (xflags = 0, s = ifs_value; s && *s; s++)
+ {
+ if (*s == CTLESC) xflags |= SX_NOCTLESC;
+ if (*s == CTLNUL) xflags |= SX_NOESCCTLNUL;
+ }
+
+ s = *stringp;
+ slen = 0;
+
+ /* Remove sequences of whitespace at the beginning of STRING, as
+ long as those characters appear in IFS. */
+ if (sh_style_split || !separators || !*separators)
+ {
+ for (; *s && spctabnl (*s) && isifs (*s); s++);
+
+ /* If the string is nothing but whitespace, update it and return. */
+ if (!*s)
+ {
+ *stringp = s;
+ if (endptr)
+ *endptr = s;
+ return ((char *)NULL);
+ }
+ }
+
+ /* OK, S points to a word that does not begin with white space.
+ Now extract a word, stopping at a separator, save a pointer to
+ the first character after the word, then skip sequences of spc,
+ tab, or nl as long as they are separators.
+
+ This obeys the field splitting rules in Posix.2. */
+ sindex = 0;
+ /* Don't need string length in ADVANCE_CHAR or string_extract_verbatim
+ unless multibyte chars are possible. */
+ slen = (MB_CUR_MAX > 1) ? strlen (s) : 1;
+ current_word = string_extract_verbatim (s, slen, &sindex, separators, xflags);
+
+ /* Set ENDPTR to the first character after the end of the word. */
+ if (endptr)
+ *endptr = s + sindex;
+
+ /* Note whether or not the separator is IFS whitespace, used later. */
+ whitesep = s[sindex] && spctabnl (s[sindex]);
+
+ /* Move past the current separator character. */
+ if (s[sindex])
+ {
+ DECLARE_MBSTATE;
+ ADVANCE_CHAR (s, slen, sindex);
+ }
+
+ /* Now skip sequences of space, tab, or newline characters if they are
+ in the list of separators. */
+ while (s[sindex] && spctabnl (s[sindex]) && isifs (s[sindex]))
+ sindex++;
+
+ /* If the first separator was IFS whitespace and the current character is
+ a non-whitespace IFS character, it should be part of the current field
+ delimiter, not a separate delimiter that would result in an empty field.
+ Look at POSIX.2, 3.6.5, (3)(b). */
+ if (s[sindex] && whitesep && isifs (s[sindex]) && !spctabnl (s[sindex]))
+ {
+ sindex++;
+ /* An IFS character that is not IFS white space, along with any adjacent
+ IFS white space, shall delimit a field. */
+ while (s[sindex] && spctabnl (s[sindex]) && isifs (s[sindex]))
+ sindex++;
+ }
+
+ /* Update STRING to point to the next field. */
+ *stringp = s + sindex;
+ return (current_word);
+}
+
+/* Remove IFS white space at the end of STRING. Start at the end
+ of the string and walk backwards until the beginning of the string
+ or we find a character that's not IFS white space and not CTLESC.
+ Only let CTLESC escape a white space character if SAW_ESCAPE is
+ non-zero. */
+char *
+strip_trailing_ifs_whitespace (string, separators, saw_escape)
+ char *string, *separators;
+ int saw_escape;
+{
+ char *s;
+
+ s = string + STRLEN (string) - 1;
+ while (s > string && ((spctabnl (*s) && isifs (*s)) ||
+ (saw_escape && *s == CTLESC && spctabnl (s[1]))))
+ s--;
+ *++s = '\0';
+ return string;
+}
+
+#if 0
+/* UNUSED */
+/* Split STRING into words at whitespace. Obeys shell-style quoting with
+ backslashes, single and double quotes. */
+WORD_LIST *
+list_string_with_quotes (string)
+ char *string;
+{
+ WORD_LIST *list;
+ char *token, *s;
+ size_t s_len;
+ int c, i, tokstart, len;
+
+ for (s = string; s && *s && spctabnl (*s); s++)
+ ;
+ if (s == 0 || *s == 0)
+ return ((WORD_LIST *)NULL);
+
+ s_len = strlen (s);
+ tokstart = i = 0;
+ list = (WORD_LIST *)NULL;
+ while (1)
+ {
+ c = s[i];
+ if (c == '\\')
+ {
+ i++;
+ if (s[i])
+ i++;
+ }
+ else if (c == '\'')
+ i = skip_single_quoted (s, s_len, ++i);
+ else if (c == '"')
+ i = skip_double_quoted (s, s_len, ++i);
+ else if (c == 0 || spctabnl (c))
+ {
+ /* We have found the end of a token. Make a word out of it and
+ add it to the word list. */
+ token = substring (s, tokstart, i);
+ list = add_string_to_list (token, list);
+ free (token);
+ while (spctabnl (s[i]))
+ i++;
+ if (s[i])
+ tokstart = i;
+ else
+ break;
+ }
+ else
+ i++; /* normal character */
+ }
+ return (REVERSE_LIST (list, WORD_LIST *));
+}
+#endif
+
+/********************************************************/
+/* */
+/* Functions to perform assignment statements */
+/* */
+/********************************************************/
+
+#if defined (ARRAY_VARS)
+static SHELL_VAR *
+do_compound_assignment (name, value, flags)
+ char *name, *value;
+ int flags;
+{
+ SHELL_VAR *v;
+ int mklocal, mkassoc, mkglobal;
+ WORD_LIST *list;
+
+ mklocal = flags & ASS_MKLOCAL;
+ mkassoc = flags & ASS_MKASSOC;
+ mkglobal = flags & ASS_MKGLOBAL;
+
+ if (mklocal && variable_context)
+ {
+ v = find_variable (name);
+ list = expand_compound_array_assignment (v, value, flags);
+ if (mkassoc)
+ v = make_local_assoc_variable (name);
+ else if (v == 0 || (array_p (v) == 0 && assoc_p (v) == 0) || v->context != variable_context)
+ v = make_local_array_variable (name, 0);
+ if (v)
+ assign_compound_array_list (v, list, flags);
+ }
+ /* In a function but forcing assignment in global context */
+ else if (mkglobal && variable_context)
+ {
+ v = find_global_variable (name);
+ list = expand_compound_array_assignment (v, value, flags);
+ if (v == 0 && mkassoc)
+ v = make_new_assoc_variable (name);
+ else if (v && mkassoc && assoc_p (v) == 0)
+ v = convert_var_to_assoc (v);
+ else if (v == 0)
+ v = make_new_array_variable (name);
+ else if (v && mkassoc == 0 && array_p (v) == 0)
+ v = convert_var_to_array (v);
+ if (v)
+ assign_compound_array_list (v, list, flags);
+ }
+ else
+ v = assign_array_from_string (name, value, flags);
+
+ return (v);
+}
+#endif
+
+/* Given STRING, an assignment string, get the value of the right side
+ of the `=', and bind it to the left side. If EXPAND is true, then
+ perform parameter expansion, command substitution, and arithmetic
+ expansion on the right-hand side. Perform tilde expansion in any
+ case. Do not perform word splitting on the result of expansion. */
+static int
+do_assignment_internal (word, expand)
+ const WORD_DESC *word;
+ int expand;
+{
+ int offset, appendop, assign_list, aflags, retval;
+ char *name, *value, *temp;
+ SHELL_VAR *entry;
+#if defined (ARRAY_VARS)
+ char *t;
+ int ni;
+#endif
+ const char *string;
+
+ if (word == 0 || word->word == 0)
+ return 0;
+
+ appendop = assign_list = aflags = 0;
+ string = word->word;
+ offset = assignment (string, 0);
+ name = savestring (string);
+ value = (char *)NULL;
+
+ if (name[offset] == '=')
+ {
+ if (name[offset - 1] == '+')
+ {
+ appendop = 1;
+ name[offset - 1] = '\0';
+ }
+
+ name[offset] = 0; /* might need this set later */
+ temp = name + offset + 1;
+
+#if defined (ARRAY_VARS)
+ if (expand && (word->flags & W_COMPASSIGN))
+ {
+ assign_list = ni = 1;
+ value = extract_array_assignment_list (temp, &ni);
+ }
+ else
+#endif
+ if (expand && temp[0])
+ value = expand_string_if_necessary (temp, 0, expand_string_assignment);
+ else
+ value = savestring (temp);
+ }
+
+ if (value == 0)
+ {
+ value = (char *)xmalloc (1);
+ value[0] = '\0';
+ }
+
+ if (echo_command_at_execute)
+ {
+ if (appendop)
+ name[offset - 1] = '+';
+ xtrace_print_assignment (name, value, assign_list, 1);
+ if (appendop)
+ name[offset - 1] = '\0';
+ }
+
+#define ASSIGN_RETURN(r) do { FREE (value); free (name); return (r); } while (0)
+
+ if (appendop)
+ aflags |= ASS_APPEND;
+
+#if defined (ARRAY_VARS)
+ if (t = mbschr (name, '[')) /*]*/
+ {
+ if (assign_list)
+ {
+ report_error (_("%s: cannot assign list to array member"), name);
+ ASSIGN_RETURN (0);
+ }
+ entry = assign_array_element (name, value, aflags);
+ if (entry == 0)
+ ASSIGN_RETURN (0);
+ }
+ else if (assign_list)
+ {
+ if ((word->flags & W_ASSIGNARG) && (word->flags & W_ASSNGLOBAL) == 0)
+ aflags |= ASS_MKLOCAL;
+ if ((word->flags & W_ASSIGNARG) && (word->flags & W_ASSNGLOBAL))
+ aflags |= ASS_MKGLOBAL;
+ if (word->flags & W_ASSIGNASSOC)
+ aflags |= ASS_MKASSOC;
+ entry = do_compound_assignment (name, value, aflags);
+ }
+ else
+#endif /* ARRAY_VARS */
+ entry = bind_variable (name, value, aflags);
+
+ stupidly_hack_special_variables (name);
+
+ /* Return 1 if the assignment seems to have been performed correctly. */
+ if (entry == 0 || readonly_p (entry))
+ retval = 0; /* assignment failure */
+ else if (noassign_p (entry))
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ retval = 1; /* error status, but not assignment failure */
+ }
+ else
+ retval = 1;
+
+ if (entry && retval != 0 && noassign_p (entry) == 0)
+ VUNSETATTR (entry, att_invisible);
+
+ ASSIGN_RETURN (retval);
+}
+
+/* Perform the assignment statement in STRING, and expand the
+ right side by doing tilde, command and parameter expansion. */
+int
+do_assignment (string)
+ char *string;
+{
+ WORD_DESC td;
+
+ td.flags = W_ASSIGNMENT;
+ td.word = string;
+
+ return do_assignment_internal (&td, 1);
+}
+
+int
+do_word_assignment (word, flags)
+ WORD_DESC *word;
+ int flags;
+{
+ return do_assignment_internal (word, 1);
+}
+
+/* Given STRING, an assignment string, get the value of the right side
+ of the `=', and bind it to the left side. Do not perform any word
+ expansions on the right hand side. */
+int
+do_assignment_no_expand (string)
+ char *string;
+{
+ WORD_DESC td;
+
+ td.flags = W_ASSIGNMENT;
+ td.word = string;
+
+ return (do_assignment_internal (&td, 0));
+}
+
+/***************************************************
+ * *
+ * Functions to manage the positional parameters *
+ * *
+ ***************************************************/
+
+/* Return the word list that corresponds to `$*'. */
+WORD_LIST *
+list_rest_of_args ()
+{
+ register WORD_LIST *list, *args;
+ int i;
+
+ /* Break out of the loop as soon as one of the dollar variables is null. */
+ for (i = 1, list = (WORD_LIST *)NULL; i < 10 && dollar_vars[i]; i++)
+ list = make_word_list (make_bare_word (dollar_vars[i]), list);
+
+ for (args = rest_of_args; args; args = args->next)
+ list = make_word_list (make_bare_word (args->word->word), list);
+
+ return (REVERSE_LIST (list, WORD_LIST *));
+}
+
+int
+number_of_args ()
+{
+ register WORD_LIST *list;
+ int n;
+
+ for (n = 0; n < 9 && dollar_vars[n+1]; n++)
+ ;
+ for (list = rest_of_args; list; list = list->next)
+ n++;
+ return n;
+}
+
+/* Return the value of a positional parameter. This handles values > 10. */
+char *
+get_dollar_var_value (ind)
+ intmax_t ind;
+{
+ char *temp;
+ WORD_LIST *p;
+
+ if (ind < 10)
+ temp = dollar_vars[ind] ? savestring (dollar_vars[ind]) : (char *)NULL;
+ else /* We want something like ${11} */
+ {
+ ind -= 10;
+ for (p = rest_of_args; p && ind--; p = p->next)
+ ;
+ temp = p ? savestring (p->word->word) : (char *)NULL;
+ }
+ return (temp);
+}
+
+/* Make a single large string out of the dollar digit variables,
+ and the rest_of_args. If DOLLAR_STAR is 1, then obey the special
+ case of "$*" with respect to IFS. */
+char *
+string_rest_of_args (dollar_star)
+ int dollar_star;
+{
+ register WORD_LIST *list;
+ char *string;
+
+ list = list_rest_of_args ();
+ string = dollar_star ? string_list_dollar_star (list) : string_list (list);
+ dispose_words (list);
+ return (string);
+}
+
+/* Return a string containing the positional parameters from START to
+ END, inclusive. If STRING[0] == '*', we obey the rules for $*,
+ which only makes a difference if QUOTED is non-zero. If QUOTED includes
+ Q_HERE_DOCUMENT or Q_DOUBLE_QUOTES, this returns a quoted list, otherwise
+ no quoting chars are added. */
+static char *
+pos_params (string, start, end, quoted)
+ char *string;
+ int start, end, quoted;
+{
+ WORD_LIST *save, *params, *h, *t;
+ char *ret;
+ int i;
+
+ /* see if we can short-circuit. if start == end, we want 0 parameters. */
+ if (start == end)
+ return ((char *)NULL);
+
+ save = params = list_rest_of_args ();
+ if (save == 0)
+ return ((char *)NULL);
+
+ if (start == 0) /* handle ${@:0[:x]} specially */
+ {
+ t = make_word_list (make_word (dollar_vars[0]), params);
+ save = params = t;
+ }
+
+ for (i = start ? 1 : 0; params && i < start; i++)
+ params = params->next;
+ if (params == 0)
+ return ((char *)NULL);
+ for (h = t = params; params && i < end; i++)
+ {
+ t = params;
+ params = params->next;
+ }
+
+ t->next = (WORD_LIST *)NULL;
+
+ ret = string_list_pos_params (string[0], h, quoted);
+
+ if (t != params)
+ t->next = params;
+
+ dispose_words (save);
+ return (ret);
+}
+
+/******************************************************************/
+/* */
+/* Functions to expand strings to strings or WORD_LISTs */
+/* */
+/******************************************************************/
+
+#if defined (PROCESS_SUBSTITUTION)
+#define EXP_CHAR(s) (s == '$' || s == '`' || s == '<' || s == '>' || s == CTLESC || s == '~')
+#else
+#define EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC || s == '~')
+#endif
+
+/* If there are any characters in STRING that require full expansion,
+ then call FUNC to expand STRING; otherwise just perform quote
+ removal if necessary. This returns a new string. */
+static char *
+expand_string_if_necessary (string, quoted, func)
+ char *string;
+ int quoted;
+ EXPFUNC *func;
+{
+ WORD_LIST *list;
+ size_t slen;
+ int i, saw_quote;
+ char *ret;
+ DECLARE_MBSTATE;
+
+ /* Don't need string length for ADVANCE_CHAR unless multibyte chars possible. */
+ slen = (MB_CUR_MAX > 1) ? strlen (string) : 0;
+ i = saw_quote = 0;
+ while (string[i])
+ {
+ if (EXP_CHAR (string[i]))
+ break;
+ else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"')
+ saw_quote = 1;
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ if (string[i])
+ {
+ list = (*func) (string, quoted);
+ if (list)
+ {
+ ret = string_list (list);
+ dispose_words (list);
+ }
+ else
+ ret = (char *)NULL;
+ }
+ else if (saw_quote && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0))
+ ret = string_quote_removal (string, quoted);
+ else
+ ret = savestring (string);
+
+ return ret;
+}
+
+static inline char *
+expand_string_to_string_internal (string, quoted, func)
+ char *string;
+ int quoted;
+ EXPFUNC *func;
+{
+ WORD_LIST *list;
+ char *ret;
+
+ if (string == 0 || *string == '\0')
+ return ((char *)NULL);
+
+ list = (*func) (string, quoted);
+ if (list)
+ {
+ ret = string_list (list);
+ dispose_words (list);
+ }
+ else
+ ret = (char *)NULL;
+
+ return (ret);
+}
+
+char *
+expand_string_to_string (string, quoted)
+ char *string;
+ int quoted;
+{
+ return (expand_string_to_string_internal (string, quoted, expand_string));
+}
+
+char *
+expand_string_unsplit_to_string (string, quoted)
+ char *string;
+ int quoted;
+{
+ return (expand_string_to_string_internal (string, quoted, expand_string_unsplit));
+}
+
+char *
+expand_assignment_string_to_string (string, quoted)
+ char *string;
+ int quoted;
+{
+ return (expand_string_to_string_internal (string, quoted, expand_string_assignment));
+}
+
+char *
+expand_arith_string (string, quoted)
+ char *string;
+ int quoted;
+{
+ WORD_DESC td;
+ WORD_LIST *list, *tlist;
+ size_t slen;
+ int i, saw_quote;
+ char *ret;
+ DECLARE_MBSTATE;
+
+ /* Don't need string length for ADVANCE_CHAR unless multibyte chars possible. */
+ slen = (MB_CUR_MAX > 1) ? strlen (string) : 0;
+ i = saw_quote = 0;
+ while (string[i])
+ {
+ if (EXP_CHAR (string[i]))
+ break;
+ else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"')
+ saw_quote = 1;
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ if (string[i])
+ {
+ /* This is expanded version of expand_string_internal as it's called by
+ expand_string_leave_quoted */
+ td.flags = W_NOPROCSUB; /* don't want process substitution */
+ td.word = savestring (string);
+ list = call_expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL);
+ /* This takes care of the calls from expand_string_leave_quoted and
+ expand_string */
+ if (list)
+ {
+ tlist = word_list_split (list);
+ dispose_words (list);
+ list = tlist;
+ if (list)
+ dequote_list (list);
+ }
+ /* This comes from expand_string_if_necessary */
+ if (list)
+ {
+ ret = string_list (list);
+ dispose_words (list);
+ }
+ else
+ ret = (char *)NULL;
+ FREE (td.word);
+ }
+ else if (saw_quote && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0))
+ ret = string_quote_removal (string, quoted);
+ else
+ ret = savestring (string);
+
+ return ret;
+}
+
+#if defined (COND_COMMAND)
+/* Just remove backslashes in STRING. Returns a new string. */
+char *
+remove_backslashes (string)
+ char *string;
+{
+ char *r, *ret, *s;
+
+ r = ret = (char *)xmalloc (strlen (string) + 1);
+ for (s = string; s && *s; )
+ {
+ if (*s == '\\')
+ s++;
+ if (*s == 0)
+ break;
+ *r++ = *s++;
+ }
+ *r = '\0';
+ return ret;
+}
+
+/* This needs better error handling. */
+/* Expand W for use as an argument to a unary or binary operator in a
+ [[...]] expression. If SPECIAL is 1, this is the rhs argument
+ to the != or == operator, and should be treated as a pattern. In
+ this case, we quote the string specially for the globbing code. If
+ SPECIAL is 2, this is an rhs argument for the =~ operator, and should
+ be quoted appropriately for regcomp/regexec. The caller is responsible
+ for removing the backslashes if the unquoted word is needed later. */
+char *
+cond_expand_word (w, special)
+ WORD_DESC *w;
+ int special;
+{
+ char *r, *p;
+ WORD_LIST *l;
+ int qflags;
+
+ if (w->word == 0 || w->word[0] == '\0')
+ return ((char *)NULL);
+
+ w->flags |= W_NOSPLIT2;
+ l = call_expand_word_internal (w, 0, 0, (int *)0, (int *)0);
+ if (l)
+ {
+ if (special == 0)
+ {
+ dequote_list (l);
+ r = string_list (l);
+ }
+ else
+ {
+ qflags = QGLOB_CVTNULL;
+ if (special == 2)
+ qflags |= QGLOB_REGEXP;
+ p = string_list (l);
+ r = quote_string_for_globbing (p, qflags);
+ free (p);
+ }
+ dispose_words (l);
+ }
+ else
+ r = (char *)NULL;
+
+ return r;
+}
+#endif
+
+/* Call expand_word_internal to expand W and handle error returns.
+ A convenience function for functions that don't want to handle
+ any errors or free any memory before aborting. */
+static WORD_LIST *
+call_expand_word_internal (w, q, i, c, e)
+ WORD_DESC *w;
+ int q, i, *c, *e;
+{
+ WORD_LIST *result;
+
+ result = expand_word_internal (w, q, i, c, e);
+ if (result == &expand_word_error || result == &expand_word_fatal)
+ {
+ /* By convention, each time this error is returned, w->word has
+ already been freed (it sometimes may not be in the fatal case,
+ but that doesn't result in a memory leak because we're going
+ to exit in most cases). */
+ w->word = (char *)NULL;
+ last_command_exit_value = EXECUTION_FAILURE;
+ exp_jump_to_top_level ((result == &expand_word_error) ? DISCARD : FORCE_EOF);
+ /* NOTREACHED */
+ return (NULL);
+ }
+ else
+ return (result);
+}
+
+/* Perform parameter expansion, command substitution, and arithmetic
+ expansion on STRING, as if it were a word. Leave the result quoted.
+ Since this does not perform word splitting, it leaves quoted nulls
+ in the result. */
+static WORD_LIST *
+expand_string_internal (string, quoted)
+ char *string;
+ int quoted;
+{
+ WORD_DESC td;
+ WORD_LIST *tresult;
+
+ if (string == 0 || *string == 0)
+ return ((WORD_LIST *)NULL);
+
+ td.flags = 0;
+ td.word = savestring (string);
+
+ tresult = call_expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL);
+
+ FREE (td.word);
+ return (tresult);
+}
+
+/* Expand STRING by performing parameter expansion, command substitution,
+ and arithmetic expansion. Dequote the resulting WORD_LIST before
+ returning it, but do not perform word splitting. The call to
+ remove_quoted_nulls () is in here because word splitting normally
+ takes care of quote removal. */
+WORD_LIST *
+expand_string_unsplit (string, quoted)
+ char *string;
+ int quoted;
+{
+ WORD_LIST *value;
+
+ if (string == 0 || *string == '\0')
+ return ((WORD_LIST *)NULL);
+
+ expand_no_split_dollar_star = 1;
+ value = expand_string_internal (string, quoted);
+ expand_no_split_dollar_star = 0;
+
+ if (value)
+ {
+ if (value->word)
+ {
+ remove_quoted_nulls (value->word->word);
+ value->word->flags &= ~W_HASQUOTEDNULL;
+ }
+ dequote_list (value);
+ }
+ return (value);
+}
+
+/* Expand the rhs of an assignment statement */
+WORD_LIST *
+expand_string_assignment (string, quoted)
+ char *string;
+ int quoted;
+{
+ WORD_DESC td;
+ WORD_LIST *value;
+
+ if (string == 0 || *string == '\0')
+ return ((WORD_LIST *)NULL);
+
+ expand_no_split_dollar_star = 1;
+
+ td.flags = W_ASSIGNRHS;
+ td.word = savestring (string);
+ value = call_expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL);
+ FREE (td.word);
+
+ expand_no_split_dollar_star = 0;
+
+ if (value)
+ {
+ if (value->word)
+ {
+ remove_quoted_nulls (value->word->word);
+ value->word->flags &= ~W_HASQUOTEDNULL;
+ }
+ dequote_list (value);
+ }
+ return (value);
+}
+
+
+/* Expand one of the PS? prompt strings. This is a sort of combination of
+ expand_string_unsplit and expand_string_internal, but returns the
+ passed string when an error occurs. Might want to trap other calls
+ to jump_to_top_level here so we don't endlessly loop. */
+WORD_LIST *
+expand_prompt_string (string, quoted, wflags)
+ char *string;
+ int quoted;
+ int wflags;
+{
+ WORD_LIST *value;
+ WORD_DESC td;
+
+ if (string == 0 || *string == 0)
+ return ((WORD_LIST *)NULL);
+
+ td.flags = wflags;
+ td.word = savestring (string);
+
+ no_longjmp_on_fatal_error = 1;
+ value = expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL);
+ no_longjmp_on_fatal_error = 0;
+
+ if (value == &expand_word_error || value == &expand_word_fatal)
+ {
+ value = make_word_list (make_bare_word (string), (WORD_LIST *)NULL);
+ return value;
+ }
+ FREE (td.word);
+ if (value)
+ {
+ if (value->word)
+ {
+ remove_quoted_nulls (value->word->word);
+ value->word->flags &= ~W_HASQUOTEDNULL;
+ }
+ dequote_list (value);
+ }
+ return (value);
+}
+
+/* Expand STRING just as if you were expanding a word, but do not dequote
+ the resultant WORD_LIST. This is called only from within this file,
+ and is used to correctly preserve quoted characters when expanding
+ things like ${1+"$@"}. This does parameter expansion, command
+ substitution, arithmetic expansion, and word splitting. */
+static WORD_LIST *
+expand_string_leave_quoted (string, quoted)
+ char *string;
+ int quoted;
+{
+ WORD_LIST *tlist;
+ WORD_LIST *tresult;
+
+ if (string == 0 || *string == '\0')
+ return ((WORD_LIST *)NULL);
+
+ tlist = expand_string_internal (string, quoted);
+
+ if (tlist)
+ {
+ tresult = word_list_split (tlist);
+ dispose_words (tlist);
+ return (tresult);
+ }
+ return ((WORD_LIST *)NULL);
+}
+
+/* This does not perform word splitting or dequote the WORD_LIST
+ it returns. */
+static WORD_LIST *
+expand_string_for_rhs (string, quoted, dollar_at_p, has_dollar_at)
+ char *string;
+ int quoted, *dollar_at_p, *has_dollar_at;
+{
+ WORD_DESC td;
+ WORD_LIST *tresult;
+
+ if (string == 0 || *string == '\0')
+ return (WORD_LIST *)NULL;
+
+ td.flags = W_NOSPLIT2; /* no splitting, remove "" and '' */
+ td.word = string;
+ tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at);
+ return (tresult);
+}
+
+/* Expand STRING just as if you were expanding a word. This also returns
+ a list of words. Note that filename globbing is *NOT* done for word
+ or string expansion, just when the shell is expanding a command. This
+ does parameter expansion, command substitution, arithmetic expansion,
+ and word splitting. Dequote the resultant WORD_LIST before returning. */
+WORD_LIST *
+expand_string (string, quoted)
+ char *string;
+ int quoted;
+{
+ WORD_LIST *result;
+
+ if (string == 0 || *string == '\0')
+ return ((WORD_LIST *)NULL);
+
+ result = expand_string_leave_quoted (string, quoted);
+ return (result ? dequote_list (result) : result);
+}
+
+/***************************************************
+ * *
+ * Functions to handle quoting chars *
+ * *
+ ***************************************************/
+
+/* Conventions:
+
+ A string with s[0] == CTLNUL && s[1] == 0 is a quoted null string.
+ The parser passes CTLNUL as CTLESC CTLNUL. */
+
+/* Quote escape characters in string s, but no other characters. This is
+ used to protect CTLESC and CTLNUL in variable values from the rest of
+ the word expansion process after the variable is expanded (word splitting
+ and filename generation). If IFS is null, we quote spaces as well, just
+ in case we split on spaces later (in the case of unquoted $@, we will
+ eventually attempt to split the entire word on spaces). Corresponding
+ code exists in dequote_escapes. Even if we don't end up splitting on
+ spaces, quoting spaces is not a problem. This should never be called on
+ a string that is quoted with single or double quotes or part of a here
+ document (effectively double-quoted). */
+char *
+quote_escapes (string)
+ char *string;
+{
+ register char *s, *t;
+ size_t slen;
+ char *result, *send;
+ int quote_spaces, skip_ctlesc, skip_ctlnul;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ send = string + slen;
+
+ quote_spaces = (ifs_value && *ifs_value == 0);
+
+ for (skip_ctlesc = skip_ctlnul = 0, s = ifs_value; s && *s; s++)
+ skip_ctlesc |= *s == CTLESC, skip_ctlnul |= *s == CTLNUL;
+
+ t = result = (char *)xmalloc ((slen * 2) + 1);
+ s = string;
+
+ while (*s)
+ {
+ if ((skip_ctlesc == 0 && *s == CTLESC) || (skip_ctlnul == 0 && *s == CTLNUL) || (quote_spaces && *s == ' '))
+ *t++ = CTLESC;
+ COPY_CHAR_P (t, s, send);
+ }
+ *t = '\0';
+ return (result);
+}
+
+static WORD_LIST *
+list_quote_escapes (list)
+ WORD_LIST *list;
+{
+ register WORD_LIST *w;
+ char *t;
+
+ for (w = list; w; w = w->next)
+ {
+ t = w->word->word;
+ w->word->word = quote_escapes (t);
+ free (t);
+ }
+ return list;
+}
+
+/* Inverse of quote_escapes; remove CTLESC protecting CTLESC or CTLNUL.
+
+ The parser passes us CTLESC as CTLESC CTLESC and CTLNUL as CTLESC CTLNUL.
+ This is necessary to make unquoted CTLESC and CTLNUL characters in the
+ data stream pass through properly.
+
+ We need to remove doubled CTLESC characters inside quoted strings before
+ quoting the entire string, so we do not double the number of CTLESC
+ characters.
+
+ Also used by parts of the pattern substitution code. */
+char *
+dequote_escapes (string)
+ char *string;
+{
+ register char *s, *t, *s1;
+ size_t slen;
+ char *result, *send;
+ int quote_spaces;
+ DECLARE_MBSTATE;
+
+ if (string == 0)
+ return string;
+
+ slen = strlen (string);
+ send = string + slen;
+
+ t = result = (char *)xmalloc (slen + 1);
+
+ if (strchr (string, CTLESC) == 0)
+ return (strcpy (result, string));
+
+ quote_spaces = (ifs_value && *ifs_value == 0);
+
+ s = string;
+ while (*s)
+ {
+ if (*s == CTLESC && (s[1] == CTLESC || s[1] == CTLNUL || (quote_spaces && s[1] == ' ')))
+ {
+ s++;
+ if (*s == '\0')
+ break;
+ }
+ COPY_CHAR_P (t, s, send);
+ }
+ *t = '\0';
+ return result;
+}
+
+/* Return a new string with the quoted representation of character C.
+ This turns "" into QUOTED_NULL, so the W_HASQUOTEDNULL flag needs to be
+ set in any resultant WORD_DESC where this value is the word. */
+static char *
+make_quoted_char (c)
+ int c;
+{
+ char *temp;
+
+ temp = (char *)xmalloc (3);
+ if (c == 0)
+ {
+ temp[0] = CTLNUL;
+ temp[1] = '\0';
+ }
+ else
+ {
+ temp[0] = CTLESC;
+ temp[1] = c;
+ temp[2] = '\0';
+ }
+ return (temp);
+}
+
+/* Quote STRING, returning a new string. This turns "" into QUOTED_NULL, so
+ the W_HASQUOTEDNULL flag needs to be set in any resultant WORD_DESC where
+ this value is the word. */
+char *
+quote_string (string)
+ char *string;
+{
+ register char *t;
+ size_t slen;
+ char *result, *send;
+
+ if (*string == 0)
+ {
+ result = (char *)xmalloc (2);
+ result[0] = CTLNUL;
+ result[1] = '\0';
+ }
+ else
+ {
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ send = string + slen;
+
+ result = (char *)xmalloc ((slen * 2) + 1);
+
+ for (t = result; string < send; )
+ {
+ *t++ = CTLESC;
+ COPY_CHAR_P (t, string, send);
+ }
+ *t = '\0';
+ }
+ return (result);
+}
+
+/* De-quote quoted characters in STRING. */
+char *
+dequote_string (string)
+ char *string;
+{
+ register char *s, *t;
+ size_t slen;
+ char *result, *send;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+
+ t = result = (char *)xmalloc (slen + 1);
+
+ if (QUOTED_NULL (string))
+ {
+ result[0] = '\0';
+ return (result);
+ }
+
+ /* If no character in the string can be quoted, don't bother examining
+ each character. Just return a copy of the string passed to us. */
+ if (strchr (string, CTLESC) == NULL)
+ return (strcpy (result, string));
+
+ send = string + slen;
+ s = string;
+ while (*s)
+ {
+ if (*s == CTLESC)
+ {
+ s++;
+ if (*s == '\0')
+ break;
+ }
+ COPY_CHAR_P (t, s, send);
+ }
+
+ *t = '\0';
+ return (result);
+}
+
+/* Quote the entire WORD_LIST list. */
+static WORD_LIST *
+quote_list (list)
+ WORD_LIST *list;
+{
+ register WORD_LIST *w;
+ char *t;
+
+ for (w = list; w; w = w->next)
+ {
+ t = w->word->word;
+ w->word->word = quote_string (t);
+ if (*t == 0)
+ w->word->flags |= W_HASQUOTEDNULL; /* XXX - turn on W_HASQUOTEDNULL here? */
+ w->word->flags |= W_QUOTED;
+ free (t);
+ }
+ return list;
+}
+
+/* De-quote quoted characters in each word in LIST. */
+WORD_LIST *
+dequote_list (list)
+ WORD_LIST *list;
+{
+ register char *s;
+ register WORD_LIST *tlist;
+
+ for (tlist = list; tlist; tlist = tlist->next)
+ {
+ s = dequote_string (tlist->word->word);
+ if (QUOTED_NULL (tlist->word->word))
+ tlist->word->flags &= ~W_HASQUOTEDNULL;
+ free (tlist->word->word);
+ tlist->word->word = s;
+ }
+ return list;
+}
+
+/* Remove CTLESC protecting a CTLESC or CTLNUL in place. Return the passed
+ string. */
+char *
+remove_quoted_escapes (string)
+ char *string;
+{
+ char *t;
+
+ if (string)
+ {
+ t = dequote_escapes (string);
+ strcpy (string, t);
+ free (t);
+ }
+
+ return (string);
+}
+
+/* Perform quoted null character removal on STRING. We don't allow any
+ quoted null characters in the middle or at the ends of strings because
+ of how expand_word_internal works. remove_quoted_nulls () turns
+ STRING into an empty string iff it only consists of a quoted null,
+ and removes all unquoted CTLNUL characters. */
+char *
+remove_quoted_nulls (string)
+ char *string;
+{
+ register size_t slen;
+ register int i, j, prev_i;
+ DECLARE_MBSTATE;
+
+ if (strchr (string, CTLNUL) == 0) /* XXX */
+ return string; /* XXX */
+
+ slen = strlen (string);
+ i = j = 0;
+
+ while (i < slen)
+ {
+ if (string[i] == CTLESC)
+ {
+ /* Old code had j++, but we cannot assume that i == j at this
+ point -- what if a CTLNUL has already been removed from the
+ string? We don't want to drop the CTLESC or recopy characters
+ that we've already copied down. */
+ i++; string[j++] = CTLESC;
+ if (i == slen)
+ break;
+ }
+ else if (string[i] == CTLNUL)
+ {
+ i++;
+ continue;
+ }
+
+ prev_i = i;
+ ADVANCE_CHAR (string, slen, i);
+ if (j < prev_i)
+ {
+ do string[j++] = string[prev_i++]; while (prev_i < i);
+ }
+ else
+ j = i;
+ }
+ string[j] = '\0';
+
+ return (string);
+}
+
+/* Perform quoted null character removal on each element of LIST.
+ This modifies LIST. */
+void
+word_list_remove_quoted_nulls (list)
+ WORD_LIST *list;
+{
+ register WORD_LIST *t;
+
+ for (t = list; t; t = t->next)
+ {
+ remove_quoted_nulls (t->word->word);
+ t->word->flags &= ~W_HASQUOTEDNULL;
+ }
+}
+
+/* **************************************************************** */
+/* */
+/* Functions for Matching and Removing Patterns */
+/* */
+/* **************************************************************** */
+
+#if defined (HANDLE_MULTIBYTE)
+#if 0 /* Currently unused */
+static unsigned char *
+mb_getcharlens (string, len)
+ char *string;
+ int len;
+{
+ int i, offset, last;
+ unsigned char *ret;
+ char *p;
+ DECLARE_MBSTATE;
+
+ i = offset = 0;
+ last = 0;
+ ret = (unsigned char *)xmalloc (len);
+ memset (ret, 0, len);
+ while (string[last])
+ {
+ ADVANCE_CHAR (string, len, offset);
+ ret[last] = offset - last;
+ last = offset;
+ }
+ return ret;
+}
+#endif
+#endif
+
+/* Remove the portion of PARAM matched by PATTERN according to OP, where OP
+ can have one of 4 values:
+ RP_LONG_LEFT remove longest matching portion at start of PARAM
+ RP_SHORT_LEFT remove shortest matching portion at start of PARAM
+ RP_LONG_RIGHT remove longest matching portion at end of PARAM
+ RP_SHORT_RIGHT remove shortest matching portion at end of PARAM
+*/
+
+#define RP_LONG_LEFT 1
+#define RP_SHORT_LEFT 2
+#define RP_LONG_RIGHT 3
+#define RP_SHORT_RIGHT 4
+
+/* Returns its first argument if nothing matched; new memory otherwise */
+static char *
+remove_upattern (param, pattern, op)
+ char *param, *pattern;
+ int op;
+{
+ register int len;
+ register char *end;
+ register char *p, *ret, c;
+
+ len = STRLEN (param);
+ end = param + len;
+
+ switch (op)
+ {
+ case RP_LONG_LEFT: /* remove longest match at start */
+ for (p = end; p >= param; p--)
+ {
+ c = *p; *p = '\0';
+ if (strmatch (pattern, param, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ *p = c;
+ return (savestring (p));
+ }
+ *p = c;
+
+ }
+ break;
+
+ case RP_SHORT_LEFT: /* remove shortest match at start */
+ for (p = param; p <= end; p++)
+ {
+ c = *p; *p = '\0';
+ if (strmatch (pattern, param, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ *p = c;
+ return (savestring (p));
+ }
+ *p = c;
+ }
+ break;
+
+ case RP_LONG_RIGHT: /* remove longest match at end */
+ for (p = param; p <= end; p++)
+ {
+ if (strmatch (pattern, p, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ c = *p; *p = '\0';
+ ret = savestring (param);
+ *p = c;
+ return (ret);
+ }
+ }
+ break;
+
+ case RP_SHORT_RIGHT: /* remove shortest match at end */
+ for (p = end; p >= param; p--)
+ {
+ if (strmatch (pattern, p, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ c = *p; *p = '\0';
+ ret = savestring (param);
+ *p = c;
+ return (ret);
+ }
+ }
+ break;
+ }
+
+ return (param); /* no match, return original string */
+}
+
+#if defined (HANDLE_MULTIBYTE)
+/* Returns its first argument if nothing matched; new memory otherwise */
+static wchar_t *
+remove_wpattern (wparam, wstrlen, wpattern, op)
+ wchar_t *wparam;
+ size_t wstrlen;
+ wchar_t *wpattern;
+ int op;
+{
+ wchar_t wc, *ret;
+ int n;
+
+ switch (op)
+ {
+ case RP_LONG_LEFT: /* remove longest match at start */
+ for (n = wstrlen; n >= 0; n--)
+ {
+ wc = wparam[n]; wparam[n] = L'\0';
+ if (wcsmatch (wpattern, wparam, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ wparam[n] = wc;
+ return (wcsdup (wparam + n));
+ }
+ wparam[n] = wc;
+ }
+ break;
+
+ case RP_SHORT_LEFT: /* remove shortest match at start */
+ for (n = 0; n <= wstrlen; n++)
+ {
+ wc = wparam[n]; wparam[n] = L'\0';
+ if (wcsmatch (wpattern, wparam, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ wparam[n] = wc;
+ return (wcsdup (wparam + n));
+ }
+ wparam[n] = wc;
+ }
+ break;
+
+ case RP_LONG_RIGHT: /* remove longest match at end */
+ for (n = 0; n <= wstrlen; n++)
+ {
+ if (wcsmatch (wpattern, wparam + n, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ wc = wparam[n]; wparam[n] = L'\0';
+ ret = wcsdup (wparam);
+ wparam[n] = wc;
+ return (ret);
+ }
+ }
+ break;
+
+ case RP_SHORT_RIGHT: /* remove shortest match at end */
+ for (n = wstrlen; n >= 0; n--)
+ {
+ if (wcsmatch (wpattern, wparam + n, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ wc = wparam[n]; wparam[n] = L'\0';
+ ret = wcsdup (wparam);
+ wparam[n] = wc;
+ return (ret);
+ }
+ }
+ break;
+ }
+
+ return (wparam); /* no match, return original string */
+}
+#endif /* HANDLE_MULTIBYTE */
+
+static char *
+remove_pattern (param, pattern, op)
+ char *param, *pattern;
+ int op;
+{
+ char *xret;
+
+ if (param == NULL)
+ return (param);
+ if (*param == '\0' || pattern == NULL || *pattern == '\0') /* minor optimization */
+ return (savestring (param));
+
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1)
+ {
+ wchar_t *ret, *oret;
+ size_t n;
+ wchar_t *wparam, *wpattern;
+ mbstate_t ps;
+
+ n = xdupmbstowcs (&wpattern, NULL, pattern);
+ if (n == (size_t)-1)
+ {
+ xret = remove_upattern (param, pattern, op);
+ return ((xret == param) ? savestring (param) : xret);
+ }
+ n = xdupmbstowcs (&wparam, NULL, param);
+
+ if (n == (size_t)-1)
+ {
+ free (wpattern);
+ xret = remove_upattern (param, pattern, op);
+ return ((xret == param) ? savestring (param) : xret);
+ }
+ oret = ret = remove_wpattern (wparam, n, wpattern, op);
+ /* Don't bother to convert wparam back to multibyte string if nothing
+ matched; just return copy of original string */
+ if (ret == wparam)
+ {
+ free (wparam);
+ free (wpattern);
+ return (savestring (param));
+ }
+
+ free (wparam);
+ free (wpattern);
+
+ n = strlen (param);
+ xret = (char *)xmalloc (n + 1);
+ memset (&ps, '\0', sizeof (mbstate_t));
+ n = wcsrtombs (xret, (const wchar_t **)&ret, n, &ps);
+ xret[n] = '\0'; /* just to make sure */
+ free (oret);
+ return xret;
+ }
+ else
+#endif
+ {
+ xret = remove_upattern (param, pattern, op);
+ return ((xret == param) ? savestring (param) : xret);
+ }
+}
+
+/* Match PAT anywhere in STRING and return the match boundaries.
+ This returns 1 in case of a successful match, 0 otherwise. SP
+ and EP are pointers into the string where the match begins and
+ ends, respectively. MTYPE controls what kind of match is attempted.
+ MATCH_BEG and MATCH_END anchor the match at the beginning and end
+ of the string, respectively. The longest match is returned. */
+static int
+match_upattern (string, pat, mtype, sp, ep)
+ char *string, *pat;
+ int mtype;
+ char **sp, **ep;
+{
+ int c, len, mlen;
+ register char *p, *p1, *npat;
+ char *end;
+ int n1;
+
+ /* If the pattern doesn't match anywhere in the string, go ahead and
+ short-circuit right away. A minor optimization, saves a bunch of
+ unnecessary calls to strmatch (up to N calls for a string of N
+ characters) if the match is unsuccessful. To preserve the semantics
+ of the substring matches below, we make sure that the pattern has
+ `*' as first and last character, making a new pattern if necessary. */
+ /* XXX - check this later if I ever implement `**' with special meaning,
+ since this will potentially result in `**' at the beginning or end */
+ len = STRLEN (pat);
+ if (pat[0] != '*' || (pat[0] == '*' && pat[1] == LPAREN && extended_glob) || pat[len - 1] != '*')
+ {
+ p = npat = (char *)xmalloc (len + 3);
+ p1 = pat;
+ if (*p1 != '*' || (*p1 == '*' && p1[1] == LPAREN && extended_glob))
+ *p++ = '*';
+ while (*p1)
+ *p++ = *p1++;
+ if (p1[-1] != '*' || p[-2] == '\\')
+ *p++ = '*';
+ *p = '\0';
+ }
+ else
+ npat = pat;
+ c = strmatch (npat, string, FNMATCH_EXTFLAG);
+ if (npat != pat)
+ free (npat);
+ if (c == FNM_NOMATCH)
+ return (0);
+
+ len = STRLEN (string);
+ end = string + len;
+
+ mlen = umatchlen (pat, len);
+
+ switch (mtype)
+ {
+ case MATCH_ANY:
+ for (p = string; p <= end; p++)
+ {
+ if (match_pattern_char (pat, p))
+ {
+ p1 = (mlen == -1) ? end : p + mlen;
+ /* p1 - p = length of portion of string to be considered
+ p = current position in string
+ mlen = number of characters consumed by match (-1 for entire string)
+ end = end of string
+ we want to break immediately if the potential match len
+ is greater than the number of characters remaining in the
+ string
+ */
+ if (p1 > end)
+ break;
+ for ( ; p1 >= p; p1--)
+ {
+ c = *p1; *p1 = '\0';
+ if (strmatch (pat, p, FNMATCH_EXTFLAG) == 0)
+ {
+ *p1 = c;
+ *sp = p;
+ *ep = p1;
+ return 1;
+ }
+ *p1 = c;
+#if 1
+ /* If MLEN != -1, we have a fixed length pattern. */
+ if (mlen != -1)
+ break;
+#endif
+ }
+ }
+ }
+
+ return (0);
+
+ case MATCH_BEG:
+ if (match_pattern_char (pat, string) == 0)
+ return (0);
+
+ for (p = (mlen == -1) ? end : string + mlen; p >= string; p--)
+ {
+ c = *p; *p = '\0';
+ if (strmatch (pat, string, FNMATCH_EXTFLAG) == 0)
+ {
+ *p = c;
+ *sp = string;
+ *ep = p;
+ return 1;
+ }
+ *p = c;
+ /* If MLEN != -1, we have a fixed length pattern. */
+ if (mlen != -1)
+ break;
+ }
+
+ return (0);
+
+ case MATCH_END:
+ for (p = end - ((mlen == -1) ? len : mlen); p <= end; p++)
+ {
+ if (strmatch (pat, p, FNMATCH_EXTFLAG) == 0)
+ {
+ *sp = p;
+ *ep = end;
+ return 1;
+ }
+ /* If MLEN != -1, we have a fixed length pattern. */
+ if (mlen != -1)
+ break;
+ }
+
+ return (0);
+ }
+
+ return (0);
+}
+
+#if defined (HANDLE_MULTIBYTE)
+/* Match WPAT anywhere in WSTRING and return the match boundaries.
+ This returns 1 in case of a successful match, 0 otherwise. Wide
+ character version. */
+static int
+match_wpattern (wstring, indices, wstrlen, wpat, mtype, sp, ep)
+ wchar_t *wstring;
+ char **indices;
+ size_t wstrlen;
+ wchar_t *wpat;
+ int mtype;
+ char **sp, **ep;
+{
+ wchar_t wc, *wp, *nwpat, *wp1;
+ size_t len;
+ int mlen;
+ int n, n1, n2, simple;
+
+ simple = (wpat[0] != L'\\' && wpat[0] != L'*' && wpat[0] != L'?' && wpat[0] != L'[');
+#if defined (EXTENDED_GLOB)
+ if (extended_glob)
+ simple &= (wpat[1] != L'(' || (wpat[0] != L'*' && wpat[0] != L'?' && wpat[0] != L'+' && wpat[0] != L'!' && wpat[0] != L'@')); /*)*/
+#endif
+
+ /* If the pattern doesn't match anywhere in the string, go ahead and
+ short-circuit right away. A minor optimization, saves a bunch of
+ unnecessary calls to strmatch (up to N calls for a string of N
+ characters) if the match is unsuccessful. To preserve the semantics
+ of the substring matches below, we make sure that the pattern has
+ `*' as first and last character, making a new pattern if necessary. */
+ len = wcslen (wpat);
+ if (wpat[0] != L'*' || (wpat[0] == L'*' && wpat[1] == WLPAREN && extended_glob) || wpat[len - 1] != L'*')
+ {
+ wp = nwpat = (wchar_t *)xmalloc ((len + 3) * sizeof (wchar_t));
+ wp1 = wpat;
+ if (*wp1 != L'*' || (*wp1 == '*' && wp1[1] == WLPAREN && extended_glob))
+ *wp++ = L'*';
+ while (*wp1 != L'\0')
+ *wp++ = *wp1++;
+ if (wp1[-1] != L'*' || wp1[-2] == L'\\')
+ *wp++ = L'*';
+ *wp = '\0';
+ }
+ else
+ nwpat = wpat;
+ len = wcsmatch (nwpat, wstring, FNMATCH_EXTFLAG);
+ if (nwpat != wpat)
+ free (nwpat);
+ if (len == FNM_NOMATCH)
+ return (0);
+
+ mlen = wmatchlen (wpat, wstrlen);
+
+/* itrace("wmatchlen (%ls) -> %d", wpat, mlen); */
+ switch (mtype)
+ {
+ case MATCH_ANY:
+ for (n = 0; n <= wstrlen; n++)
+ {
+ n2 = simple ? (*wpat == wstring[n]) : match_pattern_wchar (wpat, wstring + n);
+ if (n2)
+ {
+ n1 = (mlen == -1) ? wstrlen : n + mlen;
+ if (n1 > wstrlen)
+ break;
+
+ for ( ; n1 >= n; n1--)
+ {
+ wc = wstring[n1]; wstring[n1] = L'\0';
+ if (wcsmatch (wpat, wstring + n, FNMATCH_EXTFLAG) == 0)
+ {
+ wstring[n1] = wc;
+ *sp = indices[n];
+ *ep = indices[n1];
+ return 1;
+ }
+ wstring[n1] = wc;
+ /* If MLEN != -1, we have a fixed length pattern. */
+ if (mlen != -1)
+ break;
+ }
+ }
+ }
+
+ return (0);
+
+ case MATCH_BEG:
+ if (match_pattern_wchar (wpat, wstring) == 0)
+ return (0);
+
+ for (n = (mlen == -1) ? wstrlen : mlen; n >= 0; n--)
+ {
+ wc = wstring[n]; wstring[n] = L'\0';
+ if (wcsmatch (wpat, wstring, FNMATCH_EXTFLAG) == 0)
+ {
+ wstring[n] = wc;
+ *sp = indices[0];
+ *ep = indices[n];
+ return 1;
+ }
+ wstring[n] = wc;
+ /* If MLEN != -1, we have a fixed length pattern. */
+ if (mlen != -1)
+ break;
+ }
+
+ return (0);
+
+ case MATCH_END:
+ for (n = wstrlen - ((mlen == -1) ? wstrlen : mlen); n <= wstrlen; n++)
+ {
+ if (wcsmatch (wpat, wstring + n, FNMATCH_EXTFLAG) == 0)
+ {
+ *sp = indices[n];
+ *ep = indices[wstrlen];
+ return 1;
+ }
+ /* If MLEN != -1, we have a fixed length pattern. */
+ if (mlen != -1)
+ break;
+ }
+
+ return (0);
+ }
+
+ return (0);
+}
+#endif /* HANDLE_MULTIBYTE */
+
+static int
+match_pattern (string, pat, mtype, sp, ep)
+ char *string, *pat;
+ int mtype;
+ char **sp, **ep;
+{
+#if defined (HANDLE_MULTIBYTE)
+ int ret;
+ size_t n;
+ wchar_t *wstring, *wpat;
+ char **indices;
+ size_t slen, plen, mslen, mplen;
+#endif
+
+ if (string == 0 || *string == 0 || pat == 0 || *pat == 0)
+ return (0);
+
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1)
+ {
+ if (mbsmbchar (string) == 0 && mbsmbchar (pat) == 0)
+ return (match_upattern (string, pat, mtype, sp, ep));
+
+ n = xdupmbstowcs (&wpat, NULL, pat);
+ if (n == (size_t)-1)
+ return (match_upattern (string, pat, mtype, sp, ep));
+ n = xdupmbstowcs (&wstring, &indices, string);
+ if (n == (size_t)-1)
+ {
+ free (wpat);
+ return (match_upattern (string, pat, mtype, sp, ep));
+ }
+ ret = match_wpattern (wstring, indices, n, wpat, mtype, sp, ep);
+
+ free (wpat);
+ free (wstring);
+ free (indices);
+
+ return (ret);
+ }
+ else
+#endif
+ return (match_upattern (string, pat, mtype, sp, ep));
+}
+
+static int
+getpatspec (c, value)
+ int c;
+ char *value;
+{
+ if (c == '#')
+ return ((*value == '#') ? RP_LONG_LEFT : RP_SHORT_LEFT);
+ else /* c == '%' */
+ return ((*value == '%') ? RP_LONG_RIGHT : RP_SHORT_RIGHT);
+}
+
+/* Posix.2 says that the WORD should be run through tilde expansion,
+ parameter expansion, command substitution and arithmetic expansion.
+ This leaves the result quoted, so quote_string_for_globbing () has
+ to be called to fix it up for strmatch (). If QUOTED is non-zero,
+ it means that the entire expression was enclosed in double quotes.
+ This means that quoting characters in the pattern do not make any
+ special pattern characters quoted. For example, the `*' in the
+ following retains its special meaning: "${foo#'*'}". */
+static char *
+getpattern (value, quoted, expandpat)
+ char *value;
+ int quoted, expandpat;
+{
+ char *pat, *tword;
+ WORD_LIST *l;
+#if 0
+ int i;
+#endif
+ /* There is a problem here: how to handle single or double quotes in the
+ pattern string when the whole expression is between double quotes?
+ POSIX.2 says that enclosing double quotes do not cause the pattern to
+ be quoted, but does that leave us a problem with @ and array[@] and their
+ expansions inside a pattern? */
+#if 0
+ if (expandpat && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && *tword)
+ {
+ i = 0;
+ pat = string_extract_double_quoted (tword, &i, 1);
+ free (tword);
+ tword = pat;
+ }
+#endif
+
+ /* expand_string_for_rhs () leaves WORD quoted and does not perform
+ word splitting. */
+ l = *value ? expand_string_for_rhs (value,
+ (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? Q_PATQUOTE : quoted,
+ (int *)NULL, (int *)NULL)
+ : (WORD_LIST *)0;
+ pat = string_list (l);
+ dispose_words (l);
+ if (pat)
+ {
+ tword = quote_string_for_globbing (pat, QGLOB_CVTNULL);
+ free (pat);
+ pat = tword;
+ }
+ return (pat);
+}
+
+#if 0
+/* Handle removing a pattern from a string as a result of ${name%[%]value}
+ or ${name#[#]value}. */
+static char *
+variable_remove_pattern (value, pattern, patspec, quoted)
+ char *value, *pattern;
+ int patspec, quoted;
+{
+ char *tword;
+
+ tword = remove_pattern (value, pattern, patspec);
+
+ return (tword);
+}
+#endif
+
+static char *
+list_remove_pattern (list, pattern, patspec, itype, quoted)
+ WORD_LIST *list;
+ char *pattern;
+ int patspec, itype, quoted;
+{
+ WORD_LIST *new, *l;
+ WORD_DESC *w;
+ char *tword;
+
+ for (new = (WORD_LIST *)NULL, l = list; l; l = l->next)
+ {
+ tword = remove_pattern (l->word->word, pattern, patspec);
+ w = alloc_word_desc ();
+ w->word = tword ? tword : savestring ("");
+ new = make_word_list (w, new);
+ }
+
+ l = REVERSE_LIST (new, WORD_LIST *);
+ tword = string_list_pos_params (itype, l, quoted);
+ dispose_words (l);
+
+ return (tword);
+}
+
+static char *
+parameter_list_remove_pattern (itype, pattern, patspec, quoted)
+ int itype;
+ char *pattern;
+ int patspec, quoted;
+{
+ char *ret;
+ WORD_LIST *list;
+
+ list = list_rest_of_args ();
+ if (list == 0)
+ return ((char *)NULL);
+ ret = list_remove_pattern (list, pattern, patspec, itype, quoted);
+ dispose_words (list);
+ return (ret);
+}
+
+#if defined (ARRAY_VARS)
+static char *
+array_remove_pattern (var, pattern, patspec, varname, quoted)
+ SHELL_VAR *var;
+ char *pattern;
+ int patspec;
+ char *varname; /* so we can figure out how it's indexed */
+ int quoted;
+{
+ ARRAY *a;
+ HASH_TABLE *h;
+ int itype;
+ char *ret;
+ WORD_LIST *list;
+ SHELL_VAR *v;
+
+ /* compute itype from varname here */
+ v = array_variable_part (varname, &ret, 0);
+
+ /* XXX */
+ if (v && invisible_p (var))
+ return ((char *)NULL);
+
+ itype = ret[0];
+
+ a = (v && array_p (v)) ? array_cell (v) : 0;
+ h = (v && assoc_p (v)) ? assoc_cell (v) : 0;
+
+ list = a ? array_to_word_list (a) : (h ? assoc_to_word_list (h) : 0);
+ if (list == 0)
+ return ((char *)NULL);
+ ret = list_remove_pattern (list, pattern, patspec, itype, quoted);
+ dispose_words (list);
+
+ return ret;
+}
+#endif /* ARRAY_VARS */
+
+static char *
+parameter_brace_remove_pattern (varname, value, ind, patstr, rtype, quoted, flags)
+ char *varname, *value;
+ int ind;
+ char *patstr;
+ int rtype, quoted, flags;
+{
+ int vtype, patspec, starsub;
+ char *temp1, *val, *pattern;
+ SHELL_VAR *v;
+
+ if (value == 0)
+ return ((char *)NULL);
+
+ this_command_name = varname;
+
+ vtype = get_var_and_type (varname, value, ind, quoted, flags, &v, &val);
+ if (vtype == -1)
+ return ((char *)NULL);
+
+ starsub = vtype & VT_STARSUB;
+ vtype &= ~VT_STARSUB;
+
+ patspec = getpatspec (rtype, patstr);
+ if (patspec == RP_LONG_LEFT || patspec == RP_LONG_RIGHT)
+ patstr++;
+
+ /* Need to pass getpattern newly-allocated memory in case of expansion --
+ the expansion code will free the passed string on an error. */
+ temp1 = savestring (patstr);
+ pattern = getpattern (temp1, quoted, 1);
+ free (temp1);
+
+ temp1 = (char *)NULL; /* shut up gcc */
+ switch (vtype)
+ {
+ case VT_VARIABLE:
+ case VT_ARRAYMEMBER:
+ temp1 = remove_pattern (val, pattern, patspec);
+ if (vtype == VT_VARIABLE)
+ FREE (val);
+ if (temp1)
+ {
+ val = (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ ? quote_string (temp1)
+ : quote_escapes (temp1);
+ free (temp1);
+ temp1 = val;
+ }
+ break;
+#if defined (ARRAY_VARS)
+ case VT_ARRAYVAR:
+ temp1 = array_remove_pattern (v, pattern, patspec, varname, quoted);
+ if (temp1 && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0))
+ {
+ val = quote_escapes (temp1);
+ free (temp1);
+ temp1 = val;
+ }
+ break;
+#endif
+ case VT_POSPARMS:
+ temp1 = parameter_list_remove_pattern (varname[0], pattern, patspec, quoted);
+ if (temp1 && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0))
+ {
+ val = quote_escapes (temp1);
+ free (temp1);
+ temp1 = val;
+ }
+ break;
+ }
+
+ FREE (pattern);
+ return temp1;
+}
+
+/*******************************************
+ * *
+ * Functions to expand WORD_DESCs *
+ * *
+ *******************************************/
+
+/* Expand WORD, performing word splitting on the result. This does
+ parameter expansion, command substitution, arithmetic expansion,
+ word splitting, and quote removal. */
+
+WORD_LIST *
+expand_word (word, quoted)
+ WORD_DESC *word;
+ int quoted;
+{
+ WORD_LIST *result, *tresult;
+
+ tresult = call_expand_word_internal (word, quoted, 0, (int *)NULL, (int *)NULL);
+ result = word_list_split (tresult);
+ dispose_words (tresult);
+ return (result ? dequote_list (result) : result);
+}
+
+/* Expand WORD, but do not perform word splitting on the result. This
+ does parameter expansion, command substitution, arithmetic expansion,
+ and quote removal. */
+WORD_LIST *
+expand_word_unsplit (word, quoted)
+ WORD_DESC *word;
+ int quoted;
+{
+ WORD_LIST *result;
+
+ expand_no_split_dollar_star = 1;
+#if defined (HANDLE_MULTIBYTE)
+ if (ifs_firstc[0] == 0)
+#else
+ if (ifs_firstc == 0)
+#endif
+ word->flags |= W_NOSPLIT;
+ word->flags |= W_NOSPLIT2;
+ result = call_expand_word_internal (word, quoted, 0, (int *)NULL, (int *)NULL);
+ expand_no_split_dollar_star = 0;
+
+ return (result ? dequote_list (result) : result);
+}
+
+/* Perform shell expansions on WORD, but do not perform word splitting or
+ quote removal on the result. Virtually identical to expand_word_unsplit;
+ could be combined if implementations don't diverge. */
+WORD_LIST *
+expand_word_leave_quoted (word, quoted)
+ WORD_DESC *word;
+ int quoted;
+{
+ WORD_LIST *result;
+
+ expand_no_split_dollar_star = 1;
+#if defined (HANDLE_MULTIBYTE)
+ if (ifs_firstc[0] == 0)
+#else
+ if (ifs_firstc == 0)
+#endif
+ word->flags |= W_NOSPLIT;
+ word->flags |= W_NOSPLIT2;
+ result = call_expand_word_internal (word, quoted, 0, (int *)NULL, (int *)NULL);
+ expand_no_split_dollar_star = 0;
+
+ return result;
+}
+
+#if defined (PROCESS_SUBSTITUTION)
+
+/*****************************************************************/
+/* */
+/* Hacking Process Substitution */
+/* */
+/*****************************************************************/
+
+#if !defined (HAVE_DEV_FD)
+/* Named pipes must be removed explicitly with `unlink'. This keeps a list
+ of FIFOs the shell has open. unlink_fifo_list will walk the list and
+ unlink all of them. add_fifo_list adds the name of an open FIFO to the
+ list. NFIFO is a count of the number of FIFOs in the list. */
+#define FIFO_INCR 20
+
+struct temp_fifo {
+ char *file;
+ pid_t proc;
+};
+
+static struct temp_fifo *fifo_list = (struct temp_fifo *)NULL;
+static int nfifo;
+static int fifo_list_size;
+
+char *
+copy_fifo_list (sizep)
+ int *sizep;
+{
+ if (sizep)
+ *sizep = 0;
+ return (char *)NULL;
+}
+
+static void
+add_fifo_list (pathname)
+ char *pathname;
+{
+ if (nfifo >= fifo_list_size - 1)
+ {
+ fifo_list_size += FIFO_INCR;
+ fifo_list = (struct temp_fifo *)xrealloc (fifo_list,
+ fifo_list_size * sizeof (struct temp_fifo));
+ }
+
+ fifo_list[nfifo].file = savestring (pathname);
+ nfifo++;
+}
+
+void
+unlink_fifo (i)
+ int i;
+{
+ if ((fifo_list[i].proc == -1) || (kill(fifo_list[i].proc, 0) == -1))
+ {
+ unlink (fifo_list[i].file);
+ free (fifo_list[i].file);
+ fifo_list[i].file = (char *)NULL;
+ fifo_list[i].proc = -1;
+ }
+}
+
+void
+unlink_fifo_list ()
+{
+ int saved, i, j;
+
+ if (nfifo == 0)
+ return;
+
+ for (i = saved = 0; i < nfifo; i++)
+ {
+ if ((fifo_list[i].proc == -1) || (kill(fifo_list[i].proc, 0) == -1))
+ {
+ unlink (fifo_list[i].file);
+ free (fifo_list[i].file);
+ fifo_list[i].file = (char *)NULL;
+ fifo_list[i].proc = -1;
+ }
+ else
+ saved++;
+ }
+
+ /* If we didn't remove some of the FIFOs, compact the list. */
+ if (saved)
+ {
+ for (i = j = 0; i < nfifo; i++)
+ if (fifo_list[i].file)
+ {
+ fifo_list[j].file = fifo_list[i].file;
+ fifo_list[j].proc = fifo_list[i].proc;
+ j++;
+ }
+ nfifo = j;
+ }
+ else
+ nfifo = 0;
+}
+
+/* Take LIST, which is a bitmap denoting active FIFOs in fifo_list
+ from some point in the past, and close all open FIFOs in fifo_list
+ that are not marked as active in LIST. If LIST is NULL, close
+ everything in fifo_list. LSIZE is the number of elements in LIST, in
+ case it's larger than fifo_list_size (size of fifo_list). */
+void
+close_new_fifos (list, lsize)
+ char *list;
+ int lsize;
+{
+ int i;
+
+ if (list == 0)
+ {
+ unlink_fifo_list ();
+ return;
+ }
+
+ for (i = 0; i < lsize; i++)
+ if (list[i] == 0 && i < fifo_list_size && fifo_list[i].proc != -1)
+ unlink_fifo (i);
+
+ for (i = lsize; i < fifo_list_size; i++)
+ unlink_fifo (i);
+}
+
+int
+fifos_pending ()
+{
+ return nfifo;
+}
+
+int
+num_fifos ()
+{
+ return nfifo;
+}
+
+static char *
+make_named_pipe ()
+{
+ char *tname;
+
+ tname = sh_mktmpname ("sh-np", MT_USERANDOM|MT_USETMPDIR);
+ if (mkfifo (tname, 0600) < 0)
+ {
+ free (tname);
+ return ((char *)NULL);
+ }
+
+ add_fifo_list (tname);
+ return (tname);
+}
+
+#else /* HAVE_DEV_FD */
+
+/* DEV_FD_LIST is a bitmap of file descriptors attached to pipes the shell
+ has open to children. NFDS is a count of the number of bits currently
+ set in DEV_FD_LIST. TOTFDS is a count of the highest possible number
+ of open files. */
+static char *dev_fd_list = (char *)NULL;
+static int nfds;
+static int totfds; /* The highest possible number of open files. */
+
+char *
+copy_fifo_list (sizep)
+ int *sizep;
+{
+ char *ret;
+
+ if (nfds == 0 || totfds == 0)
+ {
+ if (sizep)
+ *sizep = 0;
+ return (char *)NULL;
+ }
+
+ if (sizep)
+ *sizep = totfds;
+ ret = (char *)xmalloc (totfds);
+ return (memcpy (ret, dev_fd_list, totfds));
+}
+
+static void
+add_fifo_list (fd)
+ int fd;
+{
+ if (dev_fd_list == 0 || fd >= totfds)
+ {
+ int ofds;
+
+ ofds = totfds;
+ totfds = getdtablesize ();
+ if (totfds < 0 || totfds > 256)
+ totfds = 256;
+ if (fd >= totfds)
+ totfds = fd + 2;
+
+ dev_fd_list = (char *)xrealloc (dev_fd_list, totfds);
+ memset (dev_fd_list + ofds, '\0', totfds - ofds);
+ }
+
+ dev_fd_list[fd] = 1;
+ nfds++;
+}
+
+int
+fifos_pending ()
+{
+ return 0; /* used for cleanup; not needed with /dev/fd */
+}
+
+int
+num_fifos ()
+{
+ return nfds;
+}
+
+void
+unlink_fifo (fd)
+ int fd;
+{
+ if (dev_fd_list[fd])
+ {
+ close (fd);
+ dev_fd_list[fd] = 0;
+ nfds--;
+ }
+}
+
+void
+unlink_fifo_list ()
+{
+ register int i;
+
+ if (nfds == 0)
+ return;
+
+ for (i = 0; nfds && i < totfds; i++)
+ unlink_fifo (i);
+
+ nfds = 0;
+}
+
+/* Take LIST, which is a snapshot copy of dev_fd_list from some point in
+ the past, and close all open fds in dev_fd_list that are not marked
+ as open in LIST. If LIST is NULL, close everything in dev_fd_list.
+ LSIZE is the number of elements in LIST, in case it's larger than
+ totfds (size of dev_fd_list). */
+void
+close_new_fifos (list, lsize)
+ char *list;
+ int lsize;
+{
+ int i;
+
+ if (list == 0)
+ {
+ unlink_fifo_list ();
+ return;
+ }
+
+ for (i = 0; i < lsize; i++)
+ if (list[i] == 0 && i < totfds && dev_fd_list[i])
+ unlink_fifo (i);
+
+ for (i = lsize; i < totfds; i++)
+ unlink_fifo (i);
+}
+
+#if defined (NOTDEF)
+print_dev_fd_list ()
+{
+ register int i;
+
+ fprintf (stderr, "pid %ld: dev_fd_list:", (long)getpid ());
+ fflush (stderr);
+
+ for (i = 0; i < totfds; i++)
+ {
+ if (dev_fd_list[i])
+ fprintf (stderr, " %d", i);
+ }
+ fprintf (stderr, "\n");
+}
+#endif /* NOTDEF */
+
+static char *
+make_dev_fd_filename (fd)
+ int fd;
+{
+ char *ret, intbuf[INT_STRLEN_BOUND (int) + 1], *p;
+
+ ret = (char *)xmalloc (sizeof (DEV_FD_PREFIX) + 8);
+
+ strcpy (ret, DEV_FD_PREFIX);
+ p = inttostr (fd, intbuf, sizeof (intbuf));
+ strcpy (ret + sizeof (DEV_FD_PREFIX) - 1, p);
+
+ add_fifo_list (fd);
+ return (ret);
+}
+
+#endif /* HAVE_DEV_FD */
+
+/* Return a filename that will open a connection to the process defined by
+ executing STRING. HAVE_DEV_FD, if defined, means open a pipe and return
+ a filename in /dev/fd corresponding to a descriptor that is one of the
+ ends of the pipe. If not defined, we use named pipes on systems that have
+ them. Systems without /dev/fd and named pipes are out of luck.
+
+ OPEN_FOR_READ_IN_CHILD, if 1, means open the named pipe for reading or
+ use the read end of the pipe and dup that file descriptor to fd 0 in
+ the child. If OPEN_FOR_READ_IN_CHILD is 0, we open the named pipe for
+ writing or use the write end of the pipe in the child, and dup that
+ file descriptor to fd 1 in the child. The parent does the opposite. */
+
+static char *
+process_substitute (string, open_for_read_in_child)
+ char *string;
+ int open_for_read_in_child;
+{
+ char *pathname;
+ int fd, result;
+ pid_t old_pid, pid;
+#if defined (HAVE_DEV_FD)
+ int parent_pipe_fd, child_pipe_fd;
+ int fildes[2];
+#endif /* HAVE_DEV_FD */
+#if defined (JOB_CONTROL)
+ pid_t old_pipeline_pgrp;
+#endif
+
+ if (!string || !*string || wordexp_only)
+ return ((char *)NULL);
+
+#if !defined (HAVE_DEV_FD)
+ pathname = make_named_pipe ();
+#else /* HAVE_DEV_FD */
+ if (pipe (fildes) < 0)
+ {
+ sys_error (_("cannot make pipe for process substitution"));
+ return ((char *)NULL);
+ }
+ /* If OPEN_FOR_READ_IN_CHILD == 1, we want to use the write end of
+ the pipe in the parent, otherwise the read end. */
+ parent_pipe_fd = fildes[open_for_read_in_child];
+ child_pipe_fd = fildes[1 - open_for_read_in_child];
+ /* Move the parent end of the pipe to some high file descriptor, to
+ avoid clashes with FDs used by the script. */
+ parent_pipe_fd = move_to_high_fd (parent_pipe_fd, 1, 64);
+
+ pathname = make_dev_fd_filename (parent_pipe_fd);
+#endif /* HAVE_DEV_FD */
+
+ if (pathname == 0)
+ {
+ sys_error (_("cannot make pipe for process substitution"));
+ return ((char *)NULL);
+ }
+
+ old_pid = last_made_pid;
+
+#if defined (JOB_CONTROL)
+ old_pipeline_pgrp = pipeline_pgrp;
+ pipeline_pgrp = shell_pgrp;
+ save_pipeline (1);
+#endif /* JOB_CONTROL */
+
+ pid = make_child ((char *)NULL, 1);
+ if (pid == 0)
+ {
+ reset_terminating_signals (); /* XXX */
+ free_pushed_string_input ();
+ /* Cancel traps, in trap.c. */
+ restore_original_signals (); /* XXX - what about special builtins? bash-4.2 */
+ setup_async_signals ();
+ subshell_environment |= SUBSHELL_COMSUB|SUBSHELL_PROCSUB;
+ }
+
+#if defined (JOB_CONTROL)
+ set_sigchld_handler ();
+ stop_making_children ();
+ /* XXX - should we only do this in the parent? (as in command subst) */
+ pipeline_pgrp = old_pipeline_pgrp;
+#endif /* JOB_CONTROL */
+
+ if (pid < 0)
+ {
+ sys_error (_("cannot make child for process substitution"));
+ free (pathname);
+#if defined (HAVE_DEV_FD)
+ close (parent_pipe_fd);
+ close (child_pipe_fd);
+#endif /* HAVE_DEV_FD */
+ return ((char *)NULL);
+ }
+
+ if (pid > 0)
+ {
+#if defined (JOB_CONTROL)
+ restore_pipeline (1);
+#endif
+
+#if !defined (HAVE_DEV_FD)
+ fifo_list[nfifo-1].proc = pid;
+#endif
+
+ last_made_pid = old_pid;
+
+#if defined (JOB_CONTROL) && defined (PGRP_PIPE)
+ close_pgrp_pipe ();
+#endif /* JOB_CONTROL && PGRP_PIPE */
+
+#if defined (HAVE_DEV_FD)
+ close (child_pipe_fd);
+#endif /* HAVE_DEV_FD */
+
+ return (pathname);
+ }
+
+ set_sigint_handler ();
+
+#if defined (JOB_CONTROL)
+ set_job_control (0);
+#endif /* JOB_CONTROL */
+
+#if !defined (HAVE_DEV_FD)
+ /* Open the named pipe in the child. */
+ fd = open (pathname, open_for_read_in_child ? O_RDONLY|O_NONBLOCK : O_WRONLY);
+ if (fd < 0)
+ {
+ /* Two separate strings for ease of translation. */
+ if (open_for_read_in_child)
+ sys_error (_("cannot open named pipe %s for reading"), pathname);
+ else
+ sys_error (_("cannot open named pipe %s for writing"), pathname);
+
+ exit (127);
+ }
+ if (open_for_read_in_child)
+ {
+ if (sh_unset_nodelay_mode (fd) < 0)
+ {
+ sys_error (_("cannot reset nodelay mode for fd %d"), fd);
+ exit (127);
+ }
+ }
+#else /* HAVE_DEV_FD */
+ fd = child_pipe_fd;
+#endif /* HAVE_DEV_FD */
+
+ if (dup2 (fd, open_for_read_in_child ? 0 : 1) < 0)
+ {
+ sys_error (_("cannot duplicate named pipe %s as fd %d"), pathname,
+ open_for_read_in_child ? 0 : 1);
+ exit (127);
+ }
+
+ if (fd != (open_for_read_in_child ? 0 : 1))
+ close (fd);
+
+ /* Need to close any files that this process has open to pipes inherited
+ from its parent. */
+ if (current_fds_to_close)
+ {
+ close_fd_bitmap (current_fds_to_close);
+ current_fds_to_close = (struct fd_bitmap *)NULL;
+ }
+
+#if defined (HAVE_DEV_FD)
+ /* Make sure we close the parent's end of the pipe and clear the slot
+ in the fd list so it is not closed later, if reallocated by, for
+ instance, pipe(2). */
+ close (parent_pipe_fd);
+ dev_fd_list[parent_pipe_fd] = 0;
+#endif /* HAVE_DEV_FD */
+
+ /* subshells shouldn't have this flag, which controls using the temporary
+ environment for variable lookups. */
+ expanding_redir = 0;
+
+ result = parse_and_execute (string, "process substitution", (SEVAL_NONINT|SEVAL_NOHIST));
+
+#if !defined (HAVE_DEV_FD)
+ /* Make sure we close the named pipe in the child before we exit. */
+ close (open_for_read_in_child ? 0 : 1);
+#endif /* !HAVE_DEV_FD */
+
+ last_command_exit_value = result;
+ result = run_exit_trap ();
+ exit (result);
+ /*NOTREACHED*/
+}
+#endif /* PROCESS_SUBSTITUTION */
+
+/***********************************/
+/* */
+/* Command Substitution */
+/* */
+/***********************************/
+
+static char *
+read_comsub (fd, quoted, rflag)
+ int fd, quoted;
+ int *rflag;
+{
+ char *istring, buf[128], *bufp, *s;
+ int istring_index, istring_size, c, tflag, skip_ctlesc, skip_ctlnul;
+ ssize_t bufn;
+
+ istring = (char *)NULL;
+ istring_index = istring_size = bufn = tflag = 0;
+
+ for (skip_ctlesc = skip_ctlnul = 0, s = ifs_value; s && *s; s++)
+ skip_ctlesc |= *s == CTLESC, skip_ctlnul |= *s == CTLNUL;
+
+ /* Read the output of the command through the pipe. This may need to be
+ changed to understand multibyte characters in the future. */
+ while (1)
+ {
+ if (fd < 0)
+ break;
+ if (--bufn <= 0)
+ {
+ bufn = zread (fd, buf, sizeof (buf));
+ if (bufn <= 0)
+ break;
+ bufp = buf;
+ }
+ c = *bufp++;
+
+ if (c == 0)
+ {
+#if 0
+ internal_warning ("read_comsub: ignored null byte in input");
+#endif
+ continue;
+ }
+
+ /* Add the character to ISTRING, possibly after resizing it. */
+ RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size, DEFAULT_ARRAY_SIZE);
+
+ /* This is essentially quote_string inline */
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) /* || c == CTLESC || c == CTLNUL */)
+ istring[istring_index++] = CTLESC;
+ /* Escape CTLESC and CTLNUL in the output to protect those characters
+ from the rest of the word expansions (word splitting and globbing.)
+ This is essentially quote_escapes inline. */
+ else if (skip_ctlesc == 0 && c == CTLESC)
+ {
+ tflag |= W_HASCTLESC;
+ istring[istring_index++] = CTLESC;
+ }
+ else if ((skip_ctlnul == 0 && c == CTLNUL) || (c == ' ' && (ifs_value && *ifs_value == 0)))
+ istring[istring_index++] = CTLESC;
+
+ istring[istring_index++] = c;
+
+#if 0
+#if defined (__CYGWIN__)
+ if (c == '\n' && istring_index > 1 && istring[istring_index - 2] == '\r')
+ {
+ istring_index--;
+ istring[istring_index - 1] = '\n';
+ }
+#endif
+#endif
+ }
+
+ if (istring)
+ istring[istring_index] = '\0';
+
+ /* If we read no output, just return now and save ourselves some
+ trouble. */
+ if (istring_index == 0)
+ {
+ FREE (istring);
+ if (rflag)
+ *rflag = tflag;
+ return (char *)NULL;
+ }
+
+ /* Strip trailing newlines from the output of the command. */
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ {
+ while (istring_index > 0)
+ {
+ if (istring[istring_index - 1] == '\n')
+ {
+ --istring_index;
+
+ /* If the newline was quoted, remove the quoting char. */
+ if (istring[istring_index - 1] == CTLESC)
+ --istring_index;
+ }
+ else
+ break;
+ }
+ istring[istring_index] = '\0';
+ }
+ else
+ strip_trailing (istring, istring_index - 1, 1);
+
+ if (rflag)
+ *rflag = tflag;
+ return istring;
+}
+
+/* Perform command substitution on STRING. This returns a WORD_DESC * with the
+ contained string possibly quoted. */
+WORD_DESC *
+command_substitute (string, quoted)
+ char *string;
+ int quoted;
+{
+ pid_t pid, old_pid, old_pipeline_pgrp, old_async_pid;
+ char *istring;
+ int result, fildes[2], function_value, pflags, rc, tflag;
+ WORD_DESC *ret;
+
+ istring = (char *)NULL;
+
+ /* Don't fork () if there is no need to. In the case of no command to
+ run, just return NULL. */
+ if (!string || !*string || (string[0] == '\n' && !string[1]))
+ return ((WORD_DESC *)NULL);
+
+ if (wordexp_only && read_but_dont_execute)
+ {
+ last_command_exit_value = EX_WEXPCOMSUB;
+ jump_to_top_level (EXITPROG);
+ }
+
+ /* We're making the assumption here that the command substitution will
+ eventually run a command from the file system. Since we'll run
+ maybe_make_export_env in this subshell before executing that command,
+ the parent shell and any other shells it starts will have to remake
+ the environment. If we make it before we fork, other shells won't
+ have to. Don't bother if we have any temporary variable assignments,
+ though, because the export environment will be remade after this
+ command completes anyway, but do it if all the words to be expanded
+ are variable assignments. */
+ if (subst_assign_varlist == 0 || garglist == 0)
+ maybe_make_export_env (); /* XXX */
+
+ /* Flags to pass to parse_and_execute() */
+ pflags = (interactive && sourcelevel == 0) ? SEVAL_RESETLINE : 0;
+
+ /* Pipe the output of executing STRING into the current shell. */
+ if (pipe (fildes) < 0)
+ {
+ sys_error (_("cannot make pipe for command substitution"));
+ goto error_exit;
+ }
+
+ old_pid = last_made_pid;
+#if defined (JOB_CONTROL)
+ old_pipeline_pgrp = pipeline_pgrp;
+ /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline. */
+ if ((subshell_environment & SUBSHELL_PIPE) == 0)
+ pipeline_pgrp = shell_pgrp;
+ cleanup_the_pipeline ();
+#endif /* JOB_CONTROL */
+
+ old_async_pid = last_asynchronous_pid;
+ pid = make_child ((char *)NULL, subshell_environment&SUBSHELL_ASYNC);
+ last_asynchronous_pid = old_async_pid;
+
+ if (pid == 0)
+ {
+ /* Reset the signal handlers in the child, but don't free the
+ trap strings. Set a flag noting that we have to free the
+ trap strings if we run trap to change a signal disposition. */
+ reset_signal_handlers ();
+ subshell_environment |= SUBSHELL_RESETTRAP;
+ }
+
+#if defined (JOB_CONTROL)
+ /* XXX DO THIS ONLY IN PARENT ? XXX */
+ set_sigchld_handler ();
+ stop_making_children ();
+ if (pid != 0)
+ pipeline_pgrp = old_pipeline_pgrp;
+#else
+ stop_making_children ();
+#endif /* JOB_CONTROL */
+
+ if (pid < 0)
+ {
+ sys_error (_("cannot make child for command substitution"));
+ error_exit:
+
+ last_made_pid = old_pid;
+
+ FREE (istring);
+ close (fildes[0]);
+ close (fildes[1]);
+ return ((WORD_DESC *)NULL);
+ }
+
+ if (pid == 0)
+ {
+ set_sigint_handler (); /* XXX */
+
+ free_pushed_string_input ();
+
+ if (dup2 (fildes[1], 1) < 0)
+ {
+ sys_error (_("command_substitute: cannot duplicate pipe as fd 1"));
+ exit (EXECUTION_FAILURE);
+ }
+
+ /* If standard output is closed in the parent shell
+ (such as after `exec >&-'), file descriptor 1 will be
+ the lowest available file descriptor, and end up in
+ fildes[0]. This can happen for stdin and stderr as well,
+ but stdout is more important -- it will cause no output
+ to be generated from this command. */
+ if ((fildes[1] != fileno (stdin)) &&
+ (fildes[1] != fileno (stdout)) &&
+ (fildes[1] != fileno (stderr)))
+ close (fildes[1]);
+
+ if ((fildes[0] != fileno (stdin)) &&
+ (fildes[0] != fileno (stdout)) &&
+ (fildes[0] != fileno (stderr)))
+ close (fildes[0]);
+
+#ifdef __CYGWIN__
+ /* Let stdio know the fd may have changed from text to binary mode, and
+ make sure to preserve stdout line buffering. */
+ freopen (NULL, "w", stdout);
+ sh_setlinebuf (stdout);
+#endif /* __CYGWIN__ */
+
+ /* The currently executing shell is not interactive. */
+ interactive = 0;
+
+ /* This is a subshell environment. */
+ subshell_environment |= SUBSHELL_COMSUB;
+
+ /* When not in POSIX mode, command substitution does not inherit
+ the -e flag. */
+ if (posixly_correct == 0)
+ {
+ builtin_ignoring_errexit = 0;
+ change_flag ('e', FLAG_OFF);
+ set_shellopts ();
+ }
+
+ remove_quoted_escapes (string);
+
+ startup_state = 2; /* see if we can avoid a fork */
+ /* Give command substitution a place to jump back to on failure,
+ so we don't go back up to main (). */
+ result = setjmp_nosigs (top_level);
+
+ /* If we're running a command substitution inside a shell function,
+ trap `return' so we don't return from the function in the subshell
+ and go off to never-never land. */
+ if (result == 0 && return_catch_flag)
+ function_value = setjmp_nosigs (return_catch);
+ else
+ function_value = 0;
+
+ if (result == ERREXIT)
+ rc = last_command_exit_value;
+ else if (result == EXITPROG)
+ rc = last_command_exit_value;
+ else if (result)
+ rc = EXECUTION_FAILURE;
+ else if (function_value)
+ rc = return_catch_value;
+ else
+ {
+ subshell_level++;
+ rc = parse_and_execute (string, "command substitution", pflags|SEVAL_NOHIST);
+ subshell_level--;
+ }
+
+ last_command_exit_value = rc;
+ rc = run_exit_trap ();
+#if defined (PROCESS_SUBSTITUTION)
+ unlink_fifo_list ();
+#endif
+ exit (rc);
+ }
+ else
+ {
+#if defined (JOB_CONTROL) && defined (PGRP_PIPE)
+ close_pgrp_pipe ();
+#endif /* JOB_CONTROL && PGRP_PIPE */
+
+ close (fildes[1]);
+
+ tflag = 0;
+ istring = read_comsub (fildes[0], quoted, &tflag);
+
+ close (fildes[0]);
+
+ current_command_subst_pid = pid;
+ last_command_exit_value = wait_for (pid);
+ last_command_subst_pid = pid;
+ last_made_pid = old_pid;
+
+#if defined (JOB_CONTROL)
+ /* If last_command_exit_value > 128, then the substituted command
+ was terminated by a signal. If that signal was SIGINT, then send
+ SIGINT to ourselves. This will break out of loops, for instance. */
+ if (last_command_exit_value == (128 + SIGINT) && last_command_exit_signal == SIGINT)
+ kill (getpid (), SIGINT);
+
+ /* wait_for gives the terminal back to shell_pgrp. If some other
+ process group should have it, give it away to that group here.
+ pipeline_pgrp is non-zero only while we are constructing a
+ pipeline, so what we are concerned about is whether or not that
+ pipeline was started in the background. A pipeline started in
+ the background should never get the tty back here. */
+ if (interactive && pipeline_pgrp != (pid_t)0 && (subshell_environment & SUBSHELL_ASYNC) == 0)
+ give_terminal_to (pipeline_pgrp, 0);
+#endif /* JOB_CONTROL */
+
+ ret = alloc_word_desc ();
+ ret->word = istring;
+ ret->flags = tflag;
+
+ return ret;
+ }
+}
+
+/********************************************************
+ * *
+ * Utility functions for parameter expansion *
+ * *
+ ********************************************************/
+
+#if defined (ARRAY_VARS)
+
+static arrayind_t
+array_length_reference (s)
+ char *s;
+{
+ int len;
+ arrayind_t ind;
+ char *akey;
+ char *t, c;
+ ARRAY *array;
+ HASH_TABLE *h;
+ SHELL_VAR *var;
+
+ var = array_variable_part (s, &t, &len);
+
+ /* If unbound variables should generate an error, report one and return
+ failure. */
+ if ((var == 0 || invisible_p (var) || (assoc_p (var) == 0 && array_p (var) == 0)) && unbound_vars_is_error)
+ {
+ c = *--t;
+ *t = '\0';
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (s);
+ *t = c;
+ return (-1);
+ }
+ else if (var == 0 || invisible_p (var))
+ return 0;
+
+ /* We support a couple of expansions for variables that are not arrays.
+ We'll return the length of the value for v[0], and 1 for v[@] or
+ v[*]. Return 0 for everything else. */
+
+ array = array_p (var) ? array_cell (var) : (ARRAY *)NULL;
+ h = assoc_p (var) ? assoc_cell (var) : (HASH_TABLE *)NULL;
+
+ if (ALL_ELEMENT_SUB (t[0]) && t[1] == ']')
+ {
+ if (assoc_p (var))
+ return (h ? assoc_num_elements (h) : 0);
+ else if (array_p (var))
+ return (array ? array_num_elements (array) : 0);
+ else
+ return (var_isset (var) ? 1 : 0);
+ }
+
+ if (assoc_p (var))
+ {
+ t[len - 1] = '\0';
+ akey = expand_assignment_string_to_string (t, 0); /* [ */
+ t[len - 1] = ']';
+ if (akey == 0 || *akey == 0)
+ {
+ err_badarraysub (t);
+ FREE (akey);
+ return (-1);
+ }
+ t = assoc_reference (assoc_cell (var), akey);
+ free (akey);
+ }
+ else
+ {
+ ind = array_expand_index (var, t, len);
+ /* negative subscripts to indexed arrays count back from end */
+ if (var && array_p (var) && ind < 0)
+ ind = array_max_index (array_cell (var)) + 1 + ind;
+ if (ind < 0)
+ {
+ err_badarraysub (t);
+ return (-1);
+ }
+ if (array_p (var))
+ t = array_reference (array, ind);
+ else
+ t = (ind == 0) ? value_cell (var) : (char *)NULL;
+ }
+
+ len = MB_STRLEN (t);
+ return (len);
+}
+#endif /* ARRAY_VARS */
+
+static int
+valid_brace_expansion_word (name, var_is_special)
+ char *name;
+ int var_is_special;
+{
+ if (DIGIT (*name) && all_digits (name))
+ return 1;
+ else if (var_is_special)
+ return 1;
+#if defined (ARRAY_VARS)
+ else if (valid_array_reference (name))
+ return 1;
+#endif /* ARRAY_VARS */
+ else if (legal_identifier (name))
+ return 1;
+ else
+ return 0;
+}
+
+static int
+chk_atstar (name, quoted, quoted_dollar_atp, contains_dollar_at)
+ char *name;
+ int quoted;
+ int *quoted_dollar_atp, *contains_dollar_at;
+{
+ char *temp1;
+
+ if (name == 0)
+ {
+ if (quoted_dollar_atp)
+ *quoted_dollar_atp = 0;
+ if (contains_dollar_at)
+ *contains_dollar_at = 0;
+ return 0;
+ }
+
+ /* check for $@ and $* */
+ if (name[0] == '@' && name[1] == 0)
+ {
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
+ *quoted_dollar_atp = 1;
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+ return 1;
+ }
+ else if (name[0] == '*' && name[1] == '\0' && quoted == 0)
+ {
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+ return 1;
+ }
+
+ /* Now check for ${array[@]} and ${array[*]} */
+#if defined (ARRAY_VARS)
+ else if (valid_array_reference (name))
+ {
+ temp1 = mbschr (name, '[');
+ if (temp1 && temp1[1] == '@' && temp1[2] == ']')
+ {
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
+ *quoted_dollar_atp = 1;
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+ return 1;
+ } /* [ */
+ /* ${array[*]}, when unquoted, should be treated like ${array[@]},
+ which should result in separate words even when IFS is unset. */
+ if (temp1 && temp1[1] == '*' && temp1[2] == ']' && quoted == 0)
+ {
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+ return 1;
+ }
+ }
+#endif
+ return 0;
+}
+
+/* Parameter expand NAME, and return a new string which is the expansion,
+ or NULL if there was no expansion.
+ VAR_IS_SPECIAL is non-zero if NAME is one of the special variables in
+ the shell, e.g., "@", "$", "*", etc. QUOTED, if non-zero, means that
+ NAME was found inside of a double-quoted expression. */
+static WORD_DESC *
+parameter_brace_expand_word (name, var_is_special, quoted, pflags, indp)
+ char *name;
+ int var_is_special, quoted, pflags;
+ arrayind_t *indp;
+{
+ WORD_DESC *ret;
+ char *temp, *tt;
+ intmax_t arg_index;
+ SHELL_VAR *var;
+ int atype, rflags;
+ arrayind_t ind;
+
+ ret = 0;
+ temp = 0;
+ rflags = 0;
+
+ if (indp)
+ *indp = INTMAX_MIN;
+
+ /* Handle multiple digit arguments, as in ${11}. */
+ if (legal_number (name, &arg_index))
+ {
+ tt = get_dollar_var_value (arg_index);
+ if (tt)
+ temp = (*tt && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ ? quote_string (tt)
+ : quote_escapes (tt);
+ else
+ temp = (char *)NULL;
+ FREE (tt);
+ }
+ else if (var_is_special) /* ${@} */
+ {
+ int sindex;
+ tt = (char *)xmalloc (2 + strlen (name));
+ tt[sindex = 0] = '$';
+ strcpy (tt + 1, name);
+
+ ret = param_expand (tt, &sindex, quoted, (int *)NULL, (int *)NULL,
+ (int *)NULL, (int *)NULL, pflags);
+ free (tt);
+ }
+#if defined (ARRAY_VARS)
+ else if (valid_array_reference (name))
+ {
+expand_arrayref:
+ /* XXX - does this leak if name[@] or name[*]? */
+ if (pflags & PF_ASSIGNRHS)
+ {
+ temp = array_variable_name (name, &tt, (int *)0);
+ if (ALL_ELEMENT_SUB (tt[0]) && tt[1] == ']')
+ temp = array_value (name, quoted|Q_DOUBLE_QUOTES, 0, &atype, &ind);
+ else
+ temp = array_value (name, quoted, 0, &atype, &ind);
+ }
+ else
+ temp = array_value (name, quoted, 0, &atype, &ind);
+ if (atype == 0 && temp)
+ {
+ temp = (*temp && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ ? quote_string (temp)
+ : quote_escapes (temp);
+ rflags |= W_ARRAYIND;
+ if (indp)
+ *indp = ind;
+ }
+ else if (atype == 1 && temp && QUOTED_NULL (temp) && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ rflags |= W_HASQUOTEDNULL;
+ }
+#endif
+ else if (var = find_variable (name))
+ {
+ if (var_isset (var) && invisible_p (var) == 0)
+ {
+#if defined (ARRAY_VARS)
+ if (assoc_p (var))
+ temp = assoc_reference (assoc_cell (var), "0");
+ else if (array_p (var))
+ temp = array_reference (array_cell (var), 0);
+ else
+ temp = value_cell (var);
+#else
+ temp = value_cell (var);
+#endif
+
+ if (temp)
+ temp = (*temp && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ ? quote_string (temp)
+ : quote_escapes (temp);
+ }
+ else
+ temp = (char *)NULL;
+ }
+ else if (var = find_variable_last_nameref (name))
+ {
+ temp = nameref_cell (var);
+#if defined (ARRAY_VARS)
+ /* Handle expanding nameref whose value is x[n] */
+ if (temp && *temp && valid_array_reference (temp))
+ {
+ name = temp;
+ goto expand_arrayref;
+ }
+ else
+#endif
+ /* y=2 ; typeset -n x=y; echo ${x} is not the same as echo ${2} in ksh */
+ if (temp && *temp && legal_identifier (temp) == 0)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ report_error (_("%s: invalid variable name for name reference"), temp);
+ temp = &expand_param_error;
+ }
+ else
+ temp = (char *)NULL;
+ }
+ else
+ temp = (char *)NULL;
+
+ if (ret == 0)
+ {
+ ret = alloc_word_desc ();
+ ret->word = temp;
+ ret->flags |= rflags;
+ }
+ return ret;
+}
+
+static char *
+parameter_brace_find_indir (name, var_is_special, quoted, find_nameref)
+ char *name;
+ int var_is_special, quoted, find_nameref;
+{
+ char *temp, *t;
+ WORD_DESC *w;
+ SHELL_VAR *v;
+
+ if (find_nameref && var_is_special == 0 && (v = find_variable_last_nameref (name)) &&
+ nameref_p (v) && (t = nameref_cell (v)) && *t)
+ return (savestring (t));
+
+ /* If var_is_special == 0, and name is not an array reference, this does
+ more expansion than necessary. It should really look up the variable's
+ value and not try to expand it. */
+ w = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND, 0);
+ t = w->word;
+ /* Have to dequote here if necessary */
+ if (t)
+ {
+ temp = (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
+ ? dequote_string (t)
+ : dequote_escapes (t);
+ free (t);
+ t = temp;
+ }
+ dispose_word_desc (w);
+
+ return t;
+}
+
+/* Expand an indirect reference to a variable: ${!NAME} expands to the
+ value of the variable whose name is the value of NAME. */
+static WORD_DESC *
+parameter_brace_expand_indir (name, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at)
+ char *name;
+ int var_is_special, quoted;
+ int *quoted_dollar_atp, *contains_dollar_at;
+{
+ char *temp, *t;
+ WORD_DESC *w;
+ SHELL_VAR *v;
+
+ /* See if it's a nameref first, behave in ksh93-compatible fashion.
+ There is at least one incompatibility: given ${!foo[0]} where foo=bar,
+ bash performs an indirect lookup on foo[0] and expands the result;
+ ksh93 expands bar[0]. We could do that here -- there are enough usable
+ primitives to do that -- but do not at this point. */
+ if (var_is_special == 0 && (v = find_variable_last_nameref (name)))
+ {
+ if (nameref_p (v) && (t = nameref_cell (v)) && *t)
+ {
+ w = alloc_word_desc ();
+ w->word = savestring (t);
+ w->flags = 0;
+ return w;
+ }
+ }
+
+ t = parameter_brace_find_indir (name, var_is_special, quoted, 0);
+
+ chk_atstar (t, quoted, quoted_dollar_atp, contains_dollar_at);
+ if (t == 0)
+ return (WORD_DESC *)NULL;
+
+ w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted, 0, 0);
+ free (t);
+
+ return w;
+}
+
+/* Expand the right side of a parameter expansion of the form ${NAMEcVALUE},
+ depending on the value of C, the separating character. C can be one of
+ "-", "+", or "=". QUOTED is true if the entire brace expression occurs
+ between double quotes. */
+static WORD_DESC *
+parameter_brace_expand_rhs (name, value, c, quoted, qdollaratp, hasdollarat)
+ char *name, *value;
+ int c, quoted, *qdollaratp, *hasdollarat;
+{
+ WORD_DESC *w;
+ WORD_LIST *l;
+ char *t, *t1, *temp;
+ int hasdol;
+
+ /* If the entire expression is between double quotes, we want to treat
+ the value as a double-quoted string, with the exception that we strip
+ embedded unescaped double quotes (for sh backwards compatibility). */
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && *value)
+ {
+ hasdol = 0;
+ temp = string_extract_double_quoted (value, &hasdol, 1);
+ }
+ else
+ temp = value;
+
+ w = alloc_word_desc ();
+ hasdol = 0;
+ /* XXX was 0 not quoted */
+ l = *temp ? expand_string_for_rhs (temp, quoted, &hasdol, (int *)NULL)
+ : (WORD_LIST *)0;
+ if (hasdollarat)
+ *hasdollarat = hasdol || (l && l->next);
+ if (temp != value)
+ free (temp);
+ if (l)
+ {
+ /* The expansion of TEMP returned something. We need to treat things
+ slightly differently if HASDOL is non-zero. If we have "$@", the
+ individual words have already been quoted. We need to turn them
+ into a string with the words separated by the first character of
+ $IFS without any additional quoting, so string_list_dollar_at won't
+ do the right thing. We use string_list_dollar_star instead. */
+ temp = (hasdol || l->next) ? string_list_dollar_star (l) : string_list (l);
+
+ /* If l->next is not null, we know that TEMP contained "$@", since that
+ is the only expansion that creates more than one word. */
+ if (qdollaratp && ((hasdol && quoted) || l->next))
+ *qdollaratp = 1;
+ /* If we have a quoted null result (QUOTED_NULL(temp)) and the word is
+ a quoted null (l->next == 0 && QUOTED_NULL(l->word->word)), the
+ flags indicate it (l->word->flags & W_HASQUOTEDNULL), and the
+ expansion is quoted (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ (which is more paranoia than anything else), we need to return the
+ quoted null string and set the flags to indicate it. */
+ if (l->next == 0 && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && QUOTED_NULL (temp) && QUOTED_NULL (l->word->word) && (l->word->flags & W_HASQUOTEDNULL))
+ {
+ w->flags |= W_HASQUOTEDNULL;
+ }
+ dispose_words (l);
+ }
+ else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && hasdol)
+ {
+ /* The brace expansion occurred between double quotes and there was
+ a $@ in TEMP. It does not matter if the $@ is quoted, as long as
+ it does not expand to anything. In this case, we want to return
+ a quoted empty string. */
+ temp = make_quoted_char ('\0');
+ w->flags |= W_HASQUOTEDNULL;
+ }
+ else
+ temp = (char *)NULL;
+
+ if (c == '-' || c == '+')
+ {
+ w->word = temp;
+ return w;
+ }
+
+ /* c == '=' */
+ t = temp ? savestring (temp) : savestring ("");
+ t1 = dequote_string (t);
+ free (t);
+#if defined (ARRAY_VARS)
+ if (valid_array_reference (name))
+ assign_array_element (name, t1, 0);
+ else
+#endif /* ARRAY_VARS */
+ bind_variable (name, t1, 0);
+#if 0
+ if (STREQ (name, "IFS") == 0)
+#endif
+ stupidly_hack_special_variables (name);
+
+ /* From Posix group discussion Feb-March 2010. Issue 7 0000221 */
+ free (temp);
+
+ w->word = t1;
+ return w;
+}
+
+/* Deal with the right hand side of a ${name:?value} expansion in the case
+ that NAME is null or not set. If VALUE is non-null it is expanded and
+ used as the error message to print, otherwise a standard message is
+ printed. */
+static void
+parameter_brace_expand_error (name, value)
+ char *name, *value;
+{
+ WORD_LIST *l;
+ char *temp;
+
+ last_command_exit_value = EXECUTION_FAILURE; /* ensure it's non-zero */
+ if (value && *value)
+ {
+ l = expand_string (value, 0);
+ temp = string_list (l);
+ report_error ("%s: %s", name, temp ? temp : ""); /* XXX was value not "" */
+ FREE (temp);
+ dispose_words (l);
+ }
+ else
+ report_error (_("%s: parameter null or not set"), name);
+
+ /* Free the data we have allocated during this expansion, since we
+ are about to longjmp out. */
+ free (name);
+ FREE (value);
+}
+
+/* Return 1 if NAME is something for which parameter_brace_expand_length is
+ OK to do. */
+static int
+valid_length_expression (name)
+ char *name;
+{
+ return (name[1] == '\0' || /* ${#} */
+ ((sh_syntaxtab[(unsigned char) name[1]] & CSPECVAR) && name[2] == '\0') || /* special param */
+ (DIGIT (name[1]) && all_digits (name + 1)) || /* ${#11} */
+#if defined (ARRAY_VARS)
+ valid_array_reference (name + 1) || /* ${#a[7]} */
+#endif
+ legal_identifier (name + 1)); /* ${#PS1} */
+}
+
+/* Handle the parameter brace expansion that requires us to return the
+ length of a parameter. */
+static intmax_t
+parameter_brace_expand_length (name)
+ char *name;
+{
+ char *t, *newname;
+ intmax_t number, arg_index;
+ WORD_LIST *list;
+#if defined (ARRAY_VARS)
+ SHELL_VAR *var;
+#endif
+
+ if (name[1] == '\0') /* ${#} */
+ number = number_of_args ();
+ else if ((name[1] == '@' || name[1] == '*') && name[2] == '\0') /* ${#@}, ${#*} */
+ number = number_of_args ();
+ else if ((sh_syntaxtab[(unsigned char) name[1]] & CSPECVAR) && name[2] == '\0')
+ {
+ /* Take the lengths of some of the shell's special parameters. */
+ switch (name[1])
+ {
+ case '-':
+ t = which_set_flags ();
+ break;
+ case '?':
+ t = itos (last_command_exit_value);
+ break;
+ case '$':
+ t = itos (dollar_dollar_pid);
+ break;
+ case '!':
+ if (last_asynchronous_pid == NO_PID)
+ t = (char *)NULL; /* XXX - error if set -u set? */
+ else
+ t = itos (last_asynchronous_pid);
+ break;
+ case '#':
+ t = itos (number_of_args ());
+ break;
+ }
+ number = STRLEN (t);
+ FREE (t);
+ }
+#if defined (ARRAY_VARS)
+ else if (valid_array_reference (name + 1))
+ number = array_length_reference (name + 1);
+#endif /* ARRAY_VARS */
+ else
+ {
+ number = 0;
+
+ if (legal_number (name + 1, &arg_index)) /* ${#1} */
+ {
+ t = get_dollar_var_value (arg_index);
+ if (t == 0 && unbound_vars_is_error)
+ return INTMAX_MIN;
+ number = MB_STRLEN (t);
+ FREE (t);
+ }
+#if defined (ARRAY_VARS)
+ else if ((var = find_variable (name + 1)) && (invisible_p (var) == 0) && (array_p (var) || assoc_p (var)))
+ {
+ if (assoc_p (var))
+ t = assoc_reference (assoc_cell (var), "0");
+ else
+ t = array_reference (array_cell (var), 0);
+ if (t == 0 && unbound_vars_is_error)
+ return INTMAX_MIN;
+ number = MB_STRLEN (t);
+ }
+#endif
+ else /* ${#PS1} */
+ {
+ newname = savestring (name);
+ newname[0] = '$';
+ list = expand_string (newname, Q_DOUBLE_QUOTES);
+ t = list ? string_list (list) : (char *)NULL;
+ free (newname);
+ if (list)
+ dispose_words (list);
+
+ number = t ? MB_STRLEN (t) : 0;
+ FREE (t);
+ }
+ }
+
+ return (number);
+}
+
+/* Skip characters in SUBSTR until DELIM. SUBSTR is an arithmetic expression,
+ so we do some ad-hoc parsing of an arithmetic expression to find
+ the first DELIM, instead of using strchr(3). Two rules:
+ 1. If the substring contains a `(', read until closing `)'.
+ 2. If the substring contains a `?', read past one `:' for each `?'.
+*/
+
+static char *
+skiparith (substr, delim)
+ char *substr;
+ int delim;
+{
+ size_t sublen;
+ int skipcol, pcount, i;
+ DECLARE_MBSTATE;
+
+ sublen = strlen (substr);
+ i = skipcol = pcount = 0;
+ while (substr[i])
+ {
+ /* Balance parens */
+ if (substr[i] == LPAREN)
+ {
+ pcount++;
+ i++;
+ continue;
+ }
+ if (substr[i] == RPAREN && pcount)
+ {
+ pcount--;
+ i++;
+ continue;
+ }
+ if (pcount)
+ {
+ ADVANCE_CHAR (substr, sublen, i);
+ continue;
+ }
+
+ /* Skip one `:' for each `?' */
+ if (substr[i] == ':' && skipcol)
+ {
+ skipcol--;
+ i++;
+ continue;
+ }
+ if (substr[i] == delim)
+ break;
+ if (substr[i] == '?')
+ {
+ skipcol++;
+ i++;
+ continue;
+ }
+ ADVANCE_CHAR (substr, sublen, i);
+ }
+
+ return (substr + i);
+}
+
+/* Verify and limit the start and end of the desired substring. If
+ VTYPE == 0, a regular shell variable is being used; if it is 1,
+ then the positional parameters are being used; if it is 2, then
+ VALUE is really a pointer to an array variable that should be used.
+ Return value is 1 if both values were OK, 0 if there was a problem
+ with an invalid expression, or -1 if the values were out of range. */
+static int
+verify_substring_values (v, value, substr, vtype, e1p, e2p)
+ SHELL_VAR *v;
+ char *value, *substr;
+ int vtype;
+ intmax_t *e1p, *e2p;
+{
+ char *t, *temp1, *temp2;
+ arrayind_t len;
+ int expok;
+#if defined (ARRAY_VARS)
+ ARRAY *a;
+ HASH_TABLE *h;
+#endif
+
+ /* duplicate behavior of strchr(3) */
+ t = skiparith (substr, ':');
+ if (*t && *t == ':')
+ *t = '\0';
+ else
+ t = (char *)0;
+
+ temp1 = expand_arith_string (substr, Q_DOUBLE_QUOTES);
+ *e1p = evalexp (temp1, &expok);
+ free (temp1);
+ if (expok == 0)
+ return (0);
+
+ len = -1; /* paranoia */
+ switch (vtype)
+ {
+ case VT_VARIABLE:
+ case VT_ARRAYMEMBER:
+ len = MB_STRLEN (value);
+ break;
+ case VT_POSPARMS:
+ len = number_of_args () + 1;
+ if (*e1p == 0)
+ len++; /* add one arg if counting from $0 */
+ break;
+#if defined (ARRAY_VARS)
+ case VT_ARRAYVAR:
+ /* For arrays, the first value deals with array indices. Negative
+ offsets count from one past the array's maximum index. Associative
+ arrays treat the number of elements as the maximum index. */
+ if (assoc_p (v))
+ {
+ h = assoc_cell (v);
+ len = assoc_num_elements (h) + (*e1p < 0);
+ }
+ else
+ {
+ a = (ARRAY *)value;
+ len = array_max_index (a) + (*e1p < 0); /* arrays index from 0 to n - 1 */
+ }
+ break;
+#endif
+ }
+
+ if (len == -1) /* paranoia */
+ return -1;
+
+ if (*e1p < 0) /* negative offsets count from end */
+ *e1p += len;
+
+ if (*e1p > len || *e1p < 0)
+ return (-1);
+
+#if defined (ARRAY_VARS)
+ /* For arrays, the second offset deals with the number of elements. */
+ if (vtype == VT_ARRAYVAR)
+ len = assoc_p (v) ? assoc_num_elements (h) : array_num_elements (a);
+#endif
+
+ if (t)
+ {
+ t++;
+ temp2 = savestring (t);
+ temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES);
+ free (temp2);
+ t[-1] = ':';
+ *e2p = evalexp (temp1, &expok);
+ free (temp1);
+ if (expok == 0)
+ return (0);
+#if 1
+ if ((vtype == VT_ARRAYVAR || vtype == VT_POSPARMS) && *e2p < 0)
+#else
+ /* bash-4.3: allow positional parameter length < 0 to count backwards
+ from end of positional parameters */
+ if (vtype == VT_ARRAYVAR && *e2p < 0)
+#endif
+ {
+ internal_error (_("%s: substring expression < 0"), t);
+ return (0);
+ }
+#if defined (ARRAY_VARS)
+ /* In order to deal with sparse arrays, push the intelligence about how
+ to deal with the number of elements desired down to the array-
+ specific functions. */
+ if (vtype != VT_ARRAYVAR)
+#endif
+ {
+ if (*e2p < 0)
+ {
+ *e2p += len;
+ if (*e2p < 0 || *e2p < *e1p)
+ {
+ internal_error (_("%s: substring expression < 0"), t);
+ return (0);
+ }
+ }
+ else
+ *e2p += *e1p; /* want E2 chars starting at E1 */
+ if (*e2p > len)
+ *e2p = len;
+ }
+ }
+ else
+ *e2p = len;
+
+ return (1);
+}
+
+/* Return the type of variable specified by VARNAME (simple variable,
+ positional param, or array variable). Also return the value specified
+ by VARNAME (value of a variable or a reference to an array element).
+ QUOTED is the standard description of quoting state, using Q_* defines.
+ FLAGS is currently a set of flags to pass to array_value. If IND is
+ non-null and not INTMAX_MIN, and FLAGS includes AV_USEIND, IND is
+ passed to array_value so the array index is not computed again.
+ If this returns VT_VARIABLE, the caller assumes that CTLESC and CTLNUL
+ characters in the value are quoted with CTLESC and takes appropriate
+ steps. For convenience, *VALP is set to the dequoted VALUE. */
+static int
+get_var_and_type (varname, value, ind, quoted, flags, varp, valp)
+ char *varname, *value;
+ arrayind_t ind;
+ int quoted, flags;
+ SHELL_VAR **varp;
+ char **valp;
+{
+ int vtype, want_indir;
+ char *temp, *vname;
+ WORD_DESC *wd;
+#if defined (ARRAY_VARS)
+ SHELL_VAR *v;
+#endif
+ arrayind_t lind;
+
+ want_indir = *varname == '!' &&
+ (legal_variable_starter ((unsigned char)varname[1]) || DIGIT (varname[1])
+ || VALID_INDIR_PARAM (varname[1]));
+ if (want_indir)
+ vname = parameter_brace_find_indir (varname+1, SPECIAL_VAR (varname, 1), quoted, 1);
+ else
+ vname = varname;
+
+ /* This sets vtype to VT_VARIABLE or VT_POSPARMS */
+ vtype = (vname[0] == '@' || vname[0] == '*') && vname[1] == '\0';
+ if (vtype == VT_POSPARMS && vname[0] == '*')
+ vtype |= VT_STARSUB;
+ *varp = (SHELL_VAR *)NULL;
+
+#if defined (ARRAY_VARS)
+ if (valid_array_reference (vname))
+ {
+ v = array_variable_part (vname, &temp, (int *)0);
+ /* If we want to signal array_value to use an already-computed index,
+ set LIND to that index */
+ lind = (ind != INTMAX_MIN && (flags & AV_USEIND)) ? ind : 0;
+ if (v && invisible_p (v))
+ {
+ vtype = VT_ARRAYMEMBER;
+ *varp = (SHELL_VAR *)NULL;
+ *valp = (char *)NULL;
+ }
+ if (v && (array_p (v) || assoc_p (v)))
+ { /* [ */
+ if (ALL_ELEMENT_SUB (temp[0]) && temp[1] == ']')
+ {
+ /* Callers have to differentiate between indexed and associative */
+ vtype = VT_ARRAYVAR;
+ if (temp[0] == '*')
+ vtype |= VT_STARSUB;
+ *valp = array_p (v) ? (char *)array_cell (v) : (char *)assoc_cell (v);
+ }
+ else
+ {
+ vtype = VT_ARRAYMEMBER;
+ *valp = array_value (vname, Q_DOUBLE_QUOTES, flags, (int *)NULL, &lind);
+ }
+ *varp = v;
+ }
+ else if (v && (ALL_ELEMENT_SUB (temp[0]) && temp[1] == ']'))
+ {
+ vtype = VT_VARIABLE;
+ *varp = v;
+ if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
+ *valp = dequote_string (value);
+ else
+ *valp = dequote_escapes (value);
+ }
+ else
+ {
+ vtype = VT_ARRAYMEMBER;
+ *varp = v;
+ *valp = array_value (vname, Q_DOUBLE_QUOTES, flags, (int *)NULL, &lind);
+ }
+ }
+ else if ((v = find_variable (vname)) && (invisible_p (v) == 0) && (assoc_p (v) || array_p (v)))
+ {
+ vtype = VT_ARRAYMEMBER;
+ *varp = v;
+ *valp = assoc_p (v) ? assoc_reference (assoc_cell (v), "0") : array_reference (array_cell (v), 0);
+ }
+ else
+#endif
+ {
+ if (value && vtype == VT_VARIABLE)
+ {
+ if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
+ *valp = dequote_string (value);
+ else
+ *valp = dequote_escapes (value);
+ }
+ else
+ *valp = value;
+ }
+
+ if (want_indir)
+ free (vname);
+
+ return vtype;
+}
+
+/******************************************************/
+/* */
+/* Functions to extract substrings of variable values */
+/* */
+/******************************************************/
+
+#if defined (HANDLE_MULTIBYTE)
+/* Character-oriented rather than strictly byte-oriented substrings. S and
+ E, rather being strict indices into STRING, indicate character (possibly
+ multibyte character) positions that require calculation.
+ Used by the ${param:offset[:length]} expansion. */
+static char *
+mb_substring (string, s, e)
+ char *string;
+ int s, e;
+{
+ char *tt;
+ int start, stop, i, slen;
+ DECLARE_MBSTATE;
+
+ start = 0;
+ /* Don't need string length in ADVANCE_CHAR unless multibyte chars possible. */
+ slen = (MB_CUR_MAX > 1) ? STRLEN (string) : 0;
+
+ i = s;
+ while (string[start] && i--)
+ ADVANCE_CHAR (string, slen, start);
+ stop = start;
+ i = e - s;
+ while (string[stop] && i--)
+ ADVANCE_CHAR (string, slen, stop);
+ tt = substring (string, start, stop);
+ return tt;
+}
+#endif
+
+/* Process a variable substring expansion: ${name:e1[:e2]}. If VARNAME
+ is `@', use the positional parameters; otherwise, use the value of
+ VARNAME. If VARNAME is an array variable, use the array elements. */
+
+static char *
+parameter_brace_substring (varname, value, ind, substr, quoted, flags)
+ char *varname, *value;
+ int ind;
+ char *substr;
+ int quoted, flags;
+{
+ intmax_t e1, e2;
+ int vtype, r, starsub;
+ char *temp, *val, *tt, *oname;
+ SHELL_VAR *v;
+
+ if (value == 0)
+ return ((char *)NULL);
+
+ oname = this_command_name;
+ this_command_name = varname;
+
+ vtype = get_var_and_type (varname, value, ind, quoted, flags, &v, &val);
+ if (vtype == -1)
+ {
+ this_command_name = oname;
+ return ((char *)NULL);
+ }
+
+ starsub = vtype & VT_STARSUB;
+ vtype &= ~VT_STARSUB;
+
+ r = verify_substring_values (v, val, substr, vtype, &e1, &e2);
+ this_command_name = oname;
+ if (r <= 0)
+ {
+ if (vtype == VT_VARIABLE)
+ FREE (val);
+ return ((r == 0) ? &expand_param_error : (char *)NULL);
+ }
+
+ switch (vtype)
+ {
+ case VT_VARIABLE:
+ case VT_ARRAYMEMBER:
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1)
+ tt = mb_substring (val, e1, e2);
+ else
+#endif
+ tt = substring (val, e1, e2);
+
+ if (vtype == VT_VARIABLE)
+ FREE (val);
+ if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
+ temp = quote_string (tt);
+ else
+ temp = tt ? quote_escapes (tt) : (char *)NULL;
+ FREE (tt);
+ break;
+ case VT_POSPARMS:
+ tt = pos_params (varname, e1, e2, quoted);
+ if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) == 0)
+ {
+ temp = tt ? quote_escapes (tt) : (char *)NULL;
+ FREE (tt);
+ }
+ else
+ temp = tt;
+ break;
+#if defined (ARRAY_VARS)
+ case VT_ARRAYVAR:
+ if (assoc_p (v))
+ /* we convert to list and take first e2 elements starting at e1th
+ element -- officially undefined for now */
+ temp = assoc_subrange (assoc_cell (v), e1, e2, starsub, quoted);
+ else
+ /* We want E2 to be the number of elements desired (arrays can be sparse,
+ so verify_substring_values just returns the numbers specified and we
+ rely on array_subrange to understand how to deal with them). */
+ temp = array_subrange (array_cell (v), e1, e2, starsub, quoted);
+ /* array_subrange now calls array_quote_escapes as appropriate, so the
+ caller no longer needs to. */
+ break;
+#endif
+ default:
+ temp = (char *)NULL;
+ }
+
+ return temp;
+}
+
+/****************************************************************/
+/* */
+/* Functions to perform pattern substitution on variable values */
+/* */
+/****************************************************************/
+
+static int
+shouldexp_replacement (s)
+ char *s;
+{
+ register char *p;
+
+ for (p = s; p && *p; p++)
+ {
+ if (*p == '\\')
+ p++;
+ else if (*p == '&')
+ return 1;
+ }
+ return 0;
+}
+
+char *
+pat_subst (string, pat, rep, mflags)
+ char *string, *pat, *rep;
+ int mflags;
+{
+ char *ret, *s, *e, *str, *rstr, *mstr;
+ int rsize, rptr, l, replen, mtype, rxpand, rslen, mlen;
+
+ if (string == 0)
+ return (savestring (""));
+
+ mtype = mflags & MATCH_TYPEMASK;
+
+#if 0 /* bash-4.2 ? */
+ rxpand = (rep && *rep) ? shouldexp_replacement (rep) : 0;
+#else
+ rxpand = 0;
+#endif
+
+ /* Special cases:
+ * 1. A null pattern with mtype == MATCH_BEG means to prefix STRING
+ * with REP and return the result.
+ * 2. A null pattern with mtype == MATCH_END means to append REP to
+ * STRING and return the result.
+ * These don't understand or process `&' in the replacement string.
+ */
+ if ((pat == 0 || *pat == 0) && (mtype == MATCH_BEG || mtype == MATCH_END))
+ {
+ replen = STRLEN (rep);
+ l = STRLEN (string);
+ ret = (char *)xmalloc (replen + l + 2);
+ if (replen == 0)
+ strcpy (ret, string);
+ else if (mtype == MATCH_BEG)
+ {
+ strcpy (ret, rep);
+ strcpy (ret + replen, string);
+ }
+ else
+ {
+ strcpy (ret, string);
+ strcpy (ret + l, rep);
+ }
+ return (ret);
+ }
+
+ ret = (char *)xmalloc (rsize = 64);
+ ret[0] = '\0';
+
+ for (replen = STRLEN (rep), rptr = 0, str = string;;)
+ {
+ if (match_pattern (str, pat, mtype, &s, &e) == 0)
+ break;
+ l = s - str;
+
+ if (rxpand)
+ {
+ int x;
+ mlen = e - s;
+ mstr = xmalloc (mlen + 1);
+ for (x = 0; x < mlen; x++)
+ mstr[x] = s[x];
+ mstr[mlen] = '\0';
+ rstr = strcreplace (rep, '&', mstr, 0);
+ rslen = strlen (rstr);
+ }
+ else
+ {
+ rstr = rep;
+ rslen = replen;
+ }
+
+ RESIZE_MALLOCED_BUFFER (ret, rptr, (l + rslen), rsize, 64);
+
+ /* OK, now copy the leading unmatched portion of the string (from
+ str to s) to ret starting at rptr (the current offset). Then copy
+ the replacement string at ret + rptr + (s - str). Increment
+ rptr (if necessary) and str and go on. */
+ if (l)
+ {
+ strncpy (ret + rptr, str, l);
+ rptr += l;
+ }
+ if (replen)
+ {
+ strncpy (ret + rptr, rstr, rslen);
+ rptr += rslen;
+ }
+ str = e; /* e == end of match */
+
+ if (rstr != rep)
+ free (rstr);
+
+ if (((mflags & MATCH_GLOBREP) == 0) || mtype != MATCH_ANY)
+ break;
+
+ if (s == e)
+ {
+ /* On a zero-length match, make sure we copy one character, since
+ we increment one character to avoid infinite recursion. */
+ RESIZE_MALLOCED_BUFFER (ret, rptr, 1, rsize, 64);
+ ret[rptr++] = *str++;
+ e++; /* avoid infinite recursion on zero-length match */
+ }
+ }
+
+ /* Now copy the unmatched portion of the input string */
+ if (str && *str)
+ {
+ RESIZE_MALLOCED_BUFFER (ret, rptr, STRLEN(str) + 1, rsize, 64);
+ strcpy (ret + rptr, str);
+ }
+ else
+ ret[rptr] = '\0';
+
+ return ret;
+}
+
+/* Do pattern match and replacement on the positional parameters. */
+static char *
+pos_params_pat_subst (string, pat, rep, mflags)
+ char *string, *pat, *rep;
+ int mflags;
+{
+ WORD_LIST *save, *params;
+ WORD_DESC *w;
+ char *ret;
+ int pchar, qflags;
+
+ save = params = list_rest_of_args ();
+ if (save == 0)
+ return ((char *)NULL);
+
+ for ( ; params; params = params->next)
+ {
+ ret = pat_subst (params->word->word, pat, rep, mflags);
+ w = alloc_word_desc ();
+ w->word = ret ? ret : savestring ("");
+ dispose_word (params->word);
+ params->word = w;
+ }
+
+ pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@';
+ qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0;
+
+ ret = string_list_pos_params (pchar, save, qflags);
+
+ dispose_words (save);
+
+ return (ret);
+}
+
+/* Perform pattern substitution on VALUE, which is the expansion of
+ VARNAME. PATSUB is an expression supplying the pattern to match
+ and the string to substitute. QUOTED is a flags word containing
+ the type of quoting currently in effect. */
+static char *
+parameter_brace_patsub (varname, value, ind, patsub, quoted, flags)
+ char *varname, *value;
+ int ind;
+ char *patsub;
+ int quoted, flags;
+{
+ int vtype, mflags, starsub, delim;
+ char *val, *temp, *pat, *rep, *p, *lpatsub, *tt;
+ SHELL_VAR *v;
+
+ if (value == 0)
+ return ((char *)NULL);
+
+ this_command_name = varname;
+
+ vtype = get_var_and_type (varname, value, ind, quoted, flags, &v, &val);
+ if (vtype == -1)
+ return ((char *)NULL);
+
+ starsub = vtype & VT_STARSUB;
+ vtype &= ~VT_STARSUB;
+
+ mflags = 0;
+ /* PATSUB is never NULL when this is called. */
+ if (*patsub == '/')
+ {
+ mflags |= MATCH_GLOBREP;
+ patsub++;
+ }
+
+ /* Malloc this because expand_string_if_necessary or one of the expansion
+ functions in its call chain may free it on a substitution error. */
+ lpatsub = savestring (patsub);
+
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ mflags |= MATCH_QUOTED;
+
+ if (starsub)
+ mflags |= MATCH_STARSUB;
+
+ /* If the pattern starts with a `/', make sure we skip over it when looking
+ for the replacement delimiter. */
+ delim = skip_to_delim (lpatsub, ((*patsub == '/') ? 1 : 0), "/", 0);
+ if (lpatsub[delim] == '/')
+ {
+ lpatsub[delim] = 0;
+ rep = lpatsub + delim + 1;
+ }
+ else
+ rep = (char *)NULL;
+
+ if (rep && *rep == '\0')
+ rep = (char *)NULL;
+
+ /* Perform the same expansions on the pattern as performed by the
+ pattern removal expansions. */
+ pat = getpattern (lpatsub, quoted, 1);
+
+ if (rep)
+ {
+ /* We want to perform quote removal on the expanded replacement even if
+ the entire expansion is double-quoted because the parser and string
+ extraction functions treated quotes in the replacement string as
+ special. THIS IS NOT BACKWARDS COMPATIBLE WITH BASH-4.2. */
+ if (shell_compatibility_level > 42)
+ rep = expand_string_if_necessary (rep, quoted & ~(Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT), expand_string_unsplit);
+ /* This is the bash-4.2 code. */
+ else if ((mflags & MATCH_QUOTED) == 0)
+ rep = expand_string_if_necessary (rep, quoted, expand_string_unsplit);
+ else
+ rep = expand_string_to_string_internal (rep, quoted, expand_string_unsplit);
+ }
+
+ /* ksh93 doesn't allow the match specifier to be a part of the expanded
+ pattern. This is an extension. Make sure we don't anchor the pattern
+ at the beginning or end of the string if we're doing global replacement,
+ though. */
+ p = pat;
+ if (mflags & MATCH_GLOBREP)
+ mflags |= MATCH_ANY;
+ else if (pat && pat[0] == '#')
+ {
+ mflags |= MATCH_BEG;
+ p++;
+ }
+ else if (pat && pat[0] == '%')
+ {
+ mflags |= MATCH_END;
+ p++;
+ }
+ else
+ mflags |= MATCH_ANY;
+
+ /* OK, we now want to substitute REP for PAT in VAL. If
+ flags & MATCH_GLOBREP is non-zero, the substitution is done
+ everywhere, otherwise only the first occurrence of PAT is
+ replaced. The pattern matching code doesn't understand
+ CTLESC quoting CTLESC and CTLNUL so we use the dequoted variable
+ values passed in (VT_VARIABLE) so the pattern substitution
+ code works right. We need to requote special chars after
+ we're done for VT_VARIABLE and VT_ARRAYMEMBER, and for the
+ other cases if QUOTED == 0, since the posparams and arrays
+ indexed by * or @ do special things when QUOTED != 0. */
+
+ switch (vtype)
+ {
+ case VT_VARIABLE:
+ case VT_ARRAYMEMBER:
+ temp = pat_subst (val, p, rep, mflags);
+ if (vtype == VT_VARIABLE)
+ FREE (val);
+ if (temp)
+ {
+ tt = (mflags & MATCH_QUOTED) ? quote_string (temp) : quote_escapes (temp);
+ free (temp);
+ temp = tt;
+ }
+ break;
+ case VT_POSPARMS:
+ temp = pos_params_pat_subst (val, p, rep, mflags);
+ if (temp && (mflags & MATCH_QUOTED) == 0)
+ {
+ tt = quote_escapes (temp);
+ free (temp);
+ temp = tt;
+ }
+ break;
+#if defined (ARRAY_VARS)
+ case VT_ARRAYVAR:
+ temp = assoc_p (v) ? assoc_patsub (assoc_cell (v), p, rep, mflags)
+ : array_patsub (array_cell (v), p, rep, mflags);
+ /* Don't call quote_escapes anymore; array_patsub calls
+ array_quote_escapes as appropriate before adding the
+ space separators; ditto for assoc_patsub. */
+ break;
+#endif
+ }
+
+ FREE (pat);
+ FREE (rep);
+ free (lpatsub);
+
+ return temp;
+}
+
+/****************************************************************/
+/* */
+/* Functions to perform case modification on variable values */
+/* */
+/****************************************************************/
+
+/* Do case modification on the positional parameters. */
+
+static char *
+pos_params_modcase (string, pat, modop, mflags)
+ char *string, *pat;
+ int modop;
+ int mflags;
+{
+ WORD_LIST *save, *params;
+ WORD_DESC *w;
+ char *ret;
+ int pchar, qflags;
+
+ save = params = list_rest_of_args ();
+ if (save == 0)
+ return ((char *)NULL);
+
+ for ( ; params; params = params->next)
+ {
+ ret = sh_modcase (params->word->word, pat, modop);
+ w = alloc_word_desc ();
+ w->word = ret ? ret : savestring ("");
+ dispose_word (params->word);
+ params->word = w;
+ }
+
+ pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@';
+ qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0;
+
+ ret = string_list_pos_params (pchar, save, qflags);
+ dispose_words (save);
+
+ return (ret);
+}
+
+/* Perform case modification on VALUE, which is the expansion of
+ VARNAME. MODSPEC is an expression supplying the type of modification
+ to perform. QUOTED is a flags word containing the type of quoting
+ currently in effect. */
+static char *
+parameter_brace_casemod (varname, value, ind, modspec, patspec, quoted, flags)
+ char *varname, *value;
+ int ind, modspec;
+ char *patspec;
+ int quoted, flags;
+{
+ int vtype, starsub, modop, mflags, x;
+ char *val, *temp, *pat, *p, *lpat, *tt;
+ SHELL_VAR *v;
+
+ if (value == 0)
+ return ((char *)NULL);
+
+ this_command_name = varname;
+
+ vtype = get_var_and_type (varname, value, ind, quoted, flags, &v, &val);
+ if (vtype == -1)
+ return ((char *)NULL);
+
+ starsub = vtype & VT_STARSUB;
+ vtype &= ~VT_STARSUB;
+
+ modop = 0;
+ mflags = 0;
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ mflags |= MATCH_QUOTED;
+ if (starsub)
+ mflags |= MATCH_STARSUB;
+
+ p = patspec;
+ if (modspec == '^')
+ {
+ x = p && p[0] == modspec;
+ modop = x ? CASE_UPPER : CASE_UPFIRST;
+ p += x;
+ }
+ else if (modspec == ',')
+ {
+ x = p && p[0] == modspec;
+ modop = x ? CASE_LOWER : CASE_LOWFIRST;
+ p += x;
+ }
+ else if (modspec == '~')
+ {
+ x = p && p[0] == modspec;
+ modop = x ? CASE_TOGGLEALL : CASE_TOGGLE;
+ p += x;
+ }
+
+ lpat = p ? savestring (p) : 0;
+ /* Perform the same expansions on the pattern as performed by the
+ pattern removal expansions. FOR LATER */
+ pat = lpat ? getpattern (lpat, quoted, 1) : 0;
+
+ /* OK, now we do the case modification. */
+ switch (vtype)
+ {
+ case VT_VARIABLE:
+ case VT_ARRAYMEMBER:
+ temp = sh_modcase (val, pat, modop);
+ if (vtype == VT_VARIABLE)
+ FREE (val);
+ if (temp)
+ {
+ tt = (mflags & MATCH_QUOTED) ? quote_string (temp) : quote_escapes (temp);
+ free (temp);
+ temp = tt;
+ }
+ break;
+
+ case VT_POSPARMS:
+ temp = pos_params_modcase (val, pat, modop, mflags);
+ if (temp && (mflags & MATCH_QUOTED) == 0)
+ {
+ tt = quote_escapes (temp);
+ free (temp);
+ temp = tt;
+ }
+ break;
+
+#if defined (ARRAY_VARS)
+ case VT_ARRAYVAR:
+ temp = assoc_p (v) ? assoc_modcase (assoc_cell (v), pat, modop, mflags)
+ : array_modcase (array_cell (v), pat, modop, mflags);
+ /* Don't call quote_escapes; array_modcase calls array_quote_escapes
+ as appropriate before adding the space separators; ditto for
+ assoc_modcase. */
+ break;
+#endif
+ }
+
+ FREE (pat);
+ free (lpat);
+
+ return temp;
+}
+
+/* Check for unbalanced parens in S, which is the contents of $(( ... )). If
+ any occur, this must be a nested command substitution, so return 0.
+ Otherwise, return 1. A valid arithmetic expression must always have a
+ ( before a matching ), so any cases where there are more right parens
+ means that this must not be an arithmetic expression, though the parser
+ will not accept it without a balanced total number of parens. */
+static int
+chk_arithsub (s, len)
+ const char *s;
+ int len;
+{
+ int i, count;
+ DECLARE_MBSTATE;
+
+ i = count = 0;
+ while (i < len)
+ {
+ if (s[i] == LPAREN)
+ count++;
+ else if (s[i] == RPAREN)
+ {
+ count--;
+ if (count < 0)
+ return 0;
+ }
+
+ switch (s[i])
+ {
+ default:
+ ADVANCE_CHAR (s, len, i);
+ break;
+
+ case '\\':
+ i++;
+ if (s[i])
+ ADVANCE_CHAR (s, len, i);
+ break;
+
+ case '\'':
+ i = skip_single_quoted (s, len, ++i);
+ break;
+
+ case '"':
+ i = skip_double_quoted ((char *)s, len, ++i);
+ break;
+ }
+ }
+
+ return (count == 0);
+}
+
+/****************************************************************/
+/* */
+/* Functions to perform parameter expansion on a string */
+/* */
+/****************************************************************/
+
+/* ${[#][!]name[[:][^[^]][,[,]]#[#]%[%]-=?+[word][:e1[:e2]]]} */
+static WORD_DESC *
+parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, contains_dollar_at)
+ char *string;
+ int *indexp, quoted, *quoted_dollar_atp, *contains_dollar_at, pflags;
+{
+ int check_nullness, var_is_set, var_is_null, var_is_special;
+ int want_substring, want_indir, want_patsub, want_casemod;
+ char *name, *value, *temp, *temp1;
+ WORD_DESC *tdesc, *ret;
+ int t_index, sindex, c, tflag, modspec;
+ intmax_t number;
+ arrayind_t ind;
+
+ temp = temp1 = value = (char *)NULL;
+ var_is_set = var_is_null = var_is_special = check_nullness = 0;
+ want_substring = want_indir = want_patsub = want_casemod = 0;
+
+ sindex = *indexp;
+ t_index = ++sindex;
+ /* ${#var} doesn't have any of the other parameter expansions on it. */
+ if (string[t_index] == '#' && legal_variable_starter (string[t_index+1])) /* {{ */
+ name = string_extract (string, &t_index, "}", SX_VARNAME);
+ else
+#if defined (CASEMOD_EXPANSIONS)
+ /* To enable case-toggling expansions using the `~' operator character
+ change the 1 to 0. */
+# if defined (CASEMOD_CAPCASE)
+ name = string_extract (string, &t_index, "#%^,~:-=?+/}", SX_VARNAME);
+# else
+ name = string_extract (string, &t_index, "#%^,:-=?+/}", SX_VARNAME);
+# endif /* CASEMOD_CAPCASE */
+#else
+ name = string_extract (string, &t_index, "#%:-=?+/}", SX_VARNAME);
+#endif /* CASEMOD_EXPANSIONS */
+
+ ret = 0;
+ tflag = 0;
+
+ ind = INTMAX_MIN;
+
+ /* If the name really consists of a special variable, then make sure
+ that we have the entire name. We don't allow indirect references
+ to special variables except `#', `?', `@' and `*'. */
+ if ((sindex == t_index && VALID_SPECIAL_LENGTH_PARAM (string[t_index])) ||
+ (sindex == t_index - 1 && string[sindex] == '!' && VALID_INDIR_PARAM (string[t_index])))
+ {
+ t_index++;
+ temp1 = string_extract (string, &t_index, "#%:-=?+/}", 0);
+ name = (char *)xrealloc (name, 3 + (strlen (temp1)));
+ *name = string[sindex];
+ if (string[sindex] == '!')
+ {
+ /* indirect reference of $#, $?, $@, or $* */
+ name[1] = string[sindex + 1];
+ strcpy (name + 2, temp1);
+ }
+ else
+ strcpy (name + 1, temp1);
+ free (temp1);
+ }
+ sindex = t_index;
+
+ /* Find out what character ended the variable name. Then
+ do the appropriate thing. */
+ if (c = string[sindex])
+ sindex++;
+
+ /* If c is followed by one of the valid parameter expansion
+ characters, move past it as normal. If not, assume that
+ a substring specification is being given, and do not move
+ past it. */
+ if (c == ':' && VALID_PARAM_EXPAND_CHAR (string[sindex]))
+ {
+ check_nullness++;
+ if (c = string[sindex])
+ sindex++;
+ }
+ else if (c == ':' && string[sindex] != RBRACE)
+ want_substring = 1;
+ else if (c == '/' /* && string[sindex] != RBRACE */) /* XXX */
+ want_patsub = 1;
+#if defined (CASEMOD_EXPANSIONS)
+ else if (c == '^' || c == ',' || c == '~')
+ {
+ modspec = c;
+ want_casemod = 1;
+ }
+#endif
+
+ /* Catch the valid and invalid brace expressions that made it through the
+ tests above. */
+ /* ${#-} is a valid expansion and means to take the length of $-.
+ Similarly for ${#?} and ${##}... */
+ if (name[0] == '#' && name[1] == '\0' && check_nullness == 0 &&
+ VALID_SPECIAL_LENGTH_PARAM (c) && string[sindex] == RBRACE)
+ {
+ name = (char *)xrealloc (name, 3);
+ name[1] = c;
+ name[2] = '\0';
+ c = string[sindex++];
+ }
+
+ /* ...but ${#%}, ${#:}, ${#=}, ${#+}, and ${#/} are errors. */
+ if (name[0] == '#' && name[1] == '\0' && check_nullness == 0 &&
+ member (c, "%:=+/") && string[sindex] == RBRACE)
+ {
+ temp = (char *)NULL;
+ goto bad_substitution;
+ }
+
+ /* Indirect expansion begins with a `!'. A valid indirect expansion is
+ either a variable name, one of the positional parameters or a special
+ variable that expands to one of the positional parameters. */
+ want_indir = *name == '!' &&
+ (legal_variable_starter ((unsigned char)name[1]) || DIGIT (name[1])
+ || VALID_INDIR_PARAM (name[1]));
+
+ /* Determine the value of this variable. */
+
+ /* Check for special variables, directly referenced. */
+ if (SPECIAL_VAR (name, want_indir))
+ var_is_special++;
+
+ /* Check for special expansion things, like the length of a parameter */
+ if (*name == '#' && name[1])
+ {
+ /* If we are not pointing at the character just after the
+ closing brace, then we haven't gotten all of the name.
+ Since it begins with a special character, this is a bad
+ substitution. Also check NAME for validity before trying
+ to go on. */
+ if (string[sindex - 1] != RBRACE || (valid_length_expression (name) == 0))
+ {
+ temp = (char *)NULL;
+ goto bad_substitution;
+ }
+
+ number = parameter_brace_expand_length (name);
+ if (number == INTMAX_MIN && unbound_vars_is_error)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (name+1);
+ free (name);
+ return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
+ free (name);
+
+ *indexp = sindex;
+ if (number < 0)
+ return (&expand_wdesc_error);
+ else
+ {
+ ret = alloc_word_desc ();
+ ret->word = itos (number);
+ return ret;
+ }
+ }
+
+ /* ${@} is identical to $@. */
+ if (name[0] == '@' && name[1] == '\0')
+ {
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
+ *quoted_dollar_atp = 1;
+
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+
+ tflag |= W_DOLLARAT;
+ }
+
+ /* Process ${!PREFIX*} expansion. */
+ if (want_indir && string[sindex - 1] == RBRACE &&
+ (string[sindex - 2] == '*' || string[sindex - 2] == '@') &&
+ legal_variable_starter ((unsigned char) name[1]))
+ {
+ char **x;
+ WORD_LIST *xlist;
+
+ temp1 = savestring (name + 1);
+ number = strlen (temp1);
+ temp1[number - 1] = '\0';
+ x = all_variables_matching_prefix (temp1);
+ xlist = strvec_to_word_list (x, 0, 0);
+ if (string[sindex - 2] == '*')
+ temp = string_list_dollar_star (xlist);
+ else
+ {
+ temp = string_list_dollar_at (xlist, quoted);
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
+ *quoted_dollar_atp = 1;
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+
+ tflag |= W_DOLLARAT;
+ }
+ free (x);
+ dispose_words (xlist);
+ free (temp1);
+ *indexp = sindex;
+
+ free (name);
+
+ ret = alloc_word_desc ();
+ ret->word = temp;
+ ret->flags = tflag; /* XXX */
+ return ret;
+ }
+
+#if defined (ARRAY_VARS)
+ /* Process ${!ARRAY[@]} and ${!ARRAY[*]} expansion. */ /* [ */
+ if (want_indir && string[sindex - 1] == RBRACE &&
+ string[sindex - 2] == ']' && valid_array_reference (name+1))
+ {
+ char *x, *x1;
+
+ temp1 = savestring (name + 1);
+ x = array_variable_name (temp1, &x1, (int *)0); /* [ */
+ FREE (x);
+ if (ALL_ELEMENT_SUB (x1[0]) && x1[1] == ']')
+ {
+ temp = array_keys (temp1, quoted); /* handles assoc vars too */
+ if (x1[0] == '@')
+ {
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
+ *quoted_dollar_atp = 1;
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+
+ tflag |= W_DOLLARAT;
+ }
+
+ free (temp1);
+ *indexp = sindex;
+
+ ret = alloc_word_desc ();
+ ret->word = temp;
+ ret->flags = tflag; /* XXX */
+ return ret;
+ }
+
+ free (temp1);
+ }
+#endif /* ARRAY_VARS */
+
+ /* Make sure that NAME is valid before trying to go on. */
+ if (valid_brace_expansion_word (want_indir ? name + 1 : name,
+ var_is_special) == 0)
+ {
+ temp = (char *)NULL;
+ goto bad_substitution;
+ }
+
+ if (want_indir)
+ tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at);
+ else
+ tdesc = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND|(pflags&(PF_NOSPLIT2|PF_ASSIGNRHS)), &ind);
+
+ if (tdesc)
+ {
+ temp = tdesc->word;
+ tflag = tdesc->flags;
+ dispose_word_desc (tdesc);
+ }
+ else
+ temp = (char *)0;
+
+ if (temp == &expand_param_error || temp == &expand_param_fatal)
+ {
+ FREE (name);
+ FREE (value);
+ return (temp == &expand_param_error ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
+
+#if defined (ARRAY_VARS)
+ if (valid_array_reference (name))
+ chk_atstar (name, quoted, quoted_dollar_atp, contains_dollar_at);
+#endif
+
+ var_is_set = temp != (char *)0;
+ var_is_null = check_nullness && (var_is_set == 0 || *temp == 0);
+ /* XXX - this may not need to be restricted to special variables */
+ if (check_nullness)
+ var_is_null |= var_is_set && var_is_special && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && QUOTED_NULL (temp);
+
+ /* Get the rest of the stuff inside the braces. */
+ if (c && c != RBRACE)
+ {
+ /* Extract the contents of the ${ ... } expansion
+ according to the Posix.2 rules. */
+ value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#' || c =='/' || c == '^' || c == ',' || c ==':') ? SX_POSIXEXP|SX_WORD : SX_WORD);
+ if (string[sindex] == RBRACE)
+ sindex++;
+ else
+ goto bad_substitution;
+ }
+ else
+ value = (char *)NULL;
+
+ *indexp = sindex;
+
+ /* All the cases where an expansion can possibly generate an unbound
+ variable error. */
+ if (want_substring || want_patsub || want_casemod || c == '#' || c == '%' || c == RBRACE)
+ {
+ if (var_is_set == 0 && unbound_vars_is_error && ((name[0] != '@' && name[0] != '*') || name[1]))
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (name);
+ FREE (value);
+ FREE (temp);
+ free (name);
+ return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
+ }
+
+ /* If this is a substring spec, process it and add the result. */
+ if (want_substring)
+ {
+ temp1 = parameter_brace_substring (name, temp, ind, value, quoted, (tflag & W_ARRAYIND) ? AV_USEIND : 0);
+ FREE (name);
+ FREE (value);
+ FREE (temp);
+
+ if (temp1 == &expand_param_error)
+ return (&expand_wdesc_error);
+ else if (temp1 == &expand_param_fatal)
+ return (&expand_wdesc_fatal);
+
+ ret = alloc_word_desc ();
+ ret->word = temp1;
+ if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ return ret;
+ }
+ else if (want_patsub)
+ {
+ temp1 = parameter_brace_patsub (name, temp, ind, value, quoted, (tflag & W_ARRAYIND) ? AV_USEIND : 0);
+ FREE (name);
+ FREE (value);
+ FREE (temp);
+
+ if (temp1 == &expand_param_error)
+ return (&expand_wdesc_error);
+ else if (temp1 == &expand_param_fatal)
+ return (&expand_wdesc_fatal);
+
+ ret = alloc_word_desc ();
+ ret->word = temp1;
+ if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ return ret;
+ }
+#if defined (CASEMOD_EXPANSIONS)
+ else if (want_casemod)
+ {
+ temp1 = parameter_brace_casemod (name, temp, ind, modspec, value, quoted, (tflag & W_ARRAYIND) ? AV_USEIND : 0);
+ FREE (name);
+ FREE (value);
+ FREE (temp);
+
+ if (temp1 == &expand_param_error)
+ return (&expand_wdesc_error);
+ else if (temp1 == &expand_param_fatal)
+ return (&expand_wdesc_fatal);
+
+ ret = alloc_word_desc ();
+ ret->word = temp1;
+ if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ return ret;
+ }
+#endif
+
+ /* Do the right thing based on which character ended the variable name. */
+ switch (c)
+ {
+ default:
+ case '\0':
+ bad_substitution:
+ last_command_exit_value = EXECUTION_FAILURE;
+ report_error (_("%s: bad substitution"), string ? string : "??");
+ FREE (value);
+ FREE (temp);
+ free (name);
+ return &expand_wdesc_error;
+
+ case RBRACE:
+ break;
+
+ case '#': /* ${param#[#]pattern} */
+ case '%': /* ${param%[%]pattern} */
+ if (value == 0 || *value == '\0' || temp == 0 || *temp == '\0')
+ {
+ FREE (value);
+ break;
+ }
+ temp1 = parameter_brace_remove_pattern (name, temp, ind, value, c, quoted, (tflag & W_ARRAYIND) ? AV_USEIND : 0);
+ free (temp);
+ free (value);
+ free (name);
+
+ ret = alloc_word_desc ();
+ ret->word = temp1;
+ if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ return ret;
+
+ case '-':
+ case '=':
+ case '?':
+ case '+':
+ if (var_is_set && var_is_null == 0)
+ {
+ /* If the operator is `+', we don't want the value of the named
+ variable for anything, just the value of the right hand side. */
+ if (c == '+')
+ {
+ /* XXX -- if we're double-quoted and the named variable is "$@",
+ we want to turn off any special handling of "$@" --
+ we're not using it, so whatever is on the rhs applies. */
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
+ *quoted_dollar_atp = 0;
+ if (contains_dollar_at)
+ *contains_dollar_at = 0;
+
+ FREE (temp);
+ if (value)
+ {
+ /* From Posix discussion on austin-group list. Issue 221
+ requires that backslashes escaping `}' inside
+ double-quoted ${...} be removed. */
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ quoted |= Q_DOLBRACE;
+ ret = parameter_brace_expand_rhs (name, value, c,
+ quoted,
+ quoted_dollar_atp,
+ contains_dollar_at);
+ /* XXX - fix up later, esp. noting presence of
+ W_HASQUOTEDNULL in ret->flags */
+ free (value);
+ }
+ else
+ temp = (char *)NULL;
+ }
+ else
+ {
+ FREE (value);
+ }
+ /* Otherwise do nothing; just use the value in TEMP. */
+ }
+ else /* VAR not set or VAR is NULL. */
+ {
+ FREE (temp);
+ temp = (char *)NULL;
+ if (c == '=' && var_is_special)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ report_error (_("$%s: cannot assign in this way"), name);
+ free (name);
+ free (value);
+ return &expand_wdesc_error;
+ }
+ else if (c == '?')
+ {
+ parameter_brace_expand_error (name, value);
+ return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
+ else if (c != '+')
+ {
+ /* XXX -- if we're double-quoted and the named variable is "$@",
+ we want to turn off any special handling of "$@" --
+ we're not using it, so whatever is on the rhs applies. */
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
+ *quoted_dollar_atp = 0;
+ if (contains_dollar_at)
+ *contains_dollar_at = 0;
+
+ /* From Posix discussion on austin-group list. Issue 221 requires
+ that backslashes escaping `}' inside double-quoted ${...} be
+ removed. */
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ quoted |= Q_DOLBRACE;
+ ret = parameter_brace_expand_rhs (name, value, c, quoted,
+ quoted_dollar_atp,
+ contains_dollar_at);
+ /* XXX - fix up later, esp. noting presence of
+ W_HASQUOTEDNULL in tdesc->flags */
+ }
+ free (value);
+ }
+
+ break;
+ }
+ free (name);
+
+ if (ret == 0)
+ {
+ ret = alloc_word_desc ();
+ ret->flags = tflag;
+ ret->word = temp;
+ }
+ return (ret);
+}
+
+/* Expand a single ${xxx} expansion. The braces are optional. When
+ the braces are used, parameter_brace_expand() does the work,
+ possibly calling param_expand recursively. */
+static WORD_DESC *
+param_expand (string, sindex, quoted, expanded_something,
+ contains_dollar_at, quoted_dollar_at_p, had_quoted_null_p,
+ pflags)
+ char *string;
+ int *sindex, quoted, *expanded_something, *contains_dollar_at;
+ int *quoted_dollar_at_p, *had_quoted_null_p, pflags;
+{
+ char *temp, *temp1, uerror[3];
+ int zindex, t_index, expok;
+ unsigned char c;
+ intmax_t number;
+ SHELL_VAR *var;
+ WORD_LIST *list;
+ WORD_DESC *tdesc, *ret;
+ int tflag;
+
+ zindex = *sindex;
+ c = string[++zindex];
+
+ temp = (char *)NULL;
+ ret = tdesc = (WORD_DESC *)NULL;
+ tflag = 0;
+
+ /* Do simple cases first. Switch on what follows '$'. */
+ switch (c)
+ {
+ /* $0 .. $9? */
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ temp1 = dollar_vars[TODIGIT (c)];
+ if (unbound_vars_is_error && temp1 == (char *)NULL)
+ {
+ uerror[0] = '$';
+ uerror[1] = c;
+ uerror[2] = '\0';
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (uerror);
+ return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
+ if (temp1)
+ temp = (*temp1 && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ? quote_string (temp1)
+ : quote_escapes (temp1);
+ else
+ temp = (char *)NULL;
+
+ break;
+
+ /* $$ -- pid of the invoking shell. */
+ case '$':
+ temp = itos (dollar_dollar_pid);
+ break;
+
+ /* $# -- number of positional parameters. */
+ case '#':
+ temp = itos (number_of_args ());
+ break;
+
+ /* $? -- return value of the last synchronous command. */
+ case '?':
+ temp = itos (last_command_exit_value);
+ break;
+
+ /* $- -- flags supplied to the shell on invocation or by `set'. */
+ case '-':
+ temp = which_set_flags ();
+ break;
+
+ /* $! -- Pid of the last asynchronous command. */
+ case '!':
+ /* If no asynchronous pids have been created, expand to nothing.
+ If `set -u' has been executed, and no async processes have
+ been created, this is an expansion error. */
+ if (last_asynchronous_pid == NO_PID)
+ {
+ if (expanded_something)
+ *expanded_something = 0;
+ temp = (char *)NULL;
+ if (unbound_vars_is_error)
+ {
+ uerror[0] = '$';
+ uerror[1] = c;
+ uerror[2] = '\0';
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (uerror);
+ return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
+ }
+ else
+ temp = itos (last_asynchronous_pid);
+ break;
+
+ /* The only difference between this and $@ is when the arg is quoted. */
+ case '*': /* `$*' */
+ list = list_rest_of_args ();
+
+#if 0
+ /* According to austin-group posix proposal by Geoff Clare in
+ <20090505091501.GA10097@squonk.masqnet> of 5 May 2009:
+
+ "The shell shall write a message to standard error and
+ immediately exit when it tries to expand an unset parameter
+ other than the '@' and '*' special parameters."
+ */
+
+ if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0)
+ {
+ uerror[0] = '$';
+ uerror[1] = '*';
+ uerror[2] = '\0';
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (uerror);
+ return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
+#endif
+
+ /* If there are no command-line arguments, this should just
+ disappear if there are other characters in the expansion,
+ even if it's quoted. */
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && list == 0)
+ temp = (char *)NULL;
+ else if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES|Q_PATQUOTE))
+ {
+ /* If we have "$*" we want to make a string of the positional
+ parameters, separated by the first character of $IFS, and
+ quote the whole string, including the separators. If IFS
+ is unset, the parameters are separated by ' '; if $IFS is
+ null, the parameters are concatenated. */
+ temp = (quoted & (Q_DOUBLE_QUOTES|Q_PATQUOTE)) ? string_list_dollar_star (list) : string_list (list);
+ if (temp)
+ {
+ temp1 = quote_string (temp);
+ if (*temp == 0)
+ tflag |= W_HASQUOTEDNULL;
+ free (temp);
+ temp = temp1;
+ }
+ }
+ else
+ {
+ /* We check whether or not we're eventually going to split $* here,
+ for example when IFS is empty and we are processing the rhs of
+ an assignment statement. In that case, we don't separate the
+ arguments at all. Otherwise, if the $* is not quoted it is
+ identical to $@ */
+# if defined (HANDLE_MULTIBYTE)
+ if (expand_no_split_dollar_star && ifs_firstc[0] == 0)
+# else
+ if (expand_no_split_dollar_star && ifs_firstc == 0)
+# endif
+ temp = string_list_dollar_star (list);
+ else
+ {
+ temp = string_list_dollar_at (list, quoted);
+ if (quoted == 0 && (ifs_is_set == 0 || ifs_is_null))
+ tflag |= W_SPLITSPACE;
+ }
+
+ if (expand_no_split_dollar_star == 0 && contains_dollar_at)
+ *contains_dollar_at = 1;
+ }
+
+ dispose_words (list);
+ break;
+
+ /* When we have "$@" what we want is "$1" "$2" "$3" ... This
+ means that we have to turn quoting off after we split into
+ the individually quoted arguments so that the final split
+ on the first character of $IFS is still done. */
+ case '@': /* `$@' */
+ list = list_rest_of_args ();
+
+#if 0
+ /* According to austin-group posix proposal by Geoff Clare in
+ <20090505091501.GA10097@squonk.masqnet> of 5 May 2009:
+
+ "The shell shall write a message to standard error and
+ immediately exit when it tries to expand an unset parameter
+ other than the '@' and '*' special parameters."
+ */
+
+ if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0)
+ {
+ uerror[0] = '$';
+ uerror[1] = '@';
+ uerror[2] = '\0';
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (uerror);
+ return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
+#endif
+
+ /* We want to flag the fact that we saw this. We can't turn
+ off quoting entirely, because other characters in the
+ string might need it (consider "\"$@\""), but we need some
+ way to signal that the final split on the first character
+ of $IFS should be done, even though QUOTED is 1. */
+ /* XXX - should this test include Q_PATQUOTE? */
+ if (quoted_dollar_at_p && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ *quoted_dollar_at_p = 1;
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+
+ /* We want to separate the positional parameters with the first
+ character of $IFS in case $IFS is something other than a space.
+ We also want to make sure that splitting is done no matter what --
+ according to POSIX.2, this expands to a list of the positional
+ parameters no matter what IFS is set to. */
+ temp = string_list_dollar_at (list, (pflags & PF_ASSIGNRHS) ? (quoted|Q_DOUBLE_QUOTES) : quoted);
+
+ tflag |= W_DOLLARAT;
+ dispose_words (list);
+ break;
+
+ case LBRACE:
+ tdesc = parameter_brace_expand (string, &zindex, quoted, pflags,
+ quoted_dollar_at_p,
+ contains_dollar_at);
+
+ if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal)
+ return (tdesc);
+ temp = tdesc ? tdesc->word : (char *)0;
+
+ /* XXX */
+ /* Quoted nulls should be removed if there is anything else
+ in the string. */
+ /* Note that we saw the quoted null so we can add one back at
+ the end of this function if there are no other characters
+ in the string, discard TEMP, and go on. The exception to
+ this is when we have "${@}" and $1 is '', since $@ needs
+ special handling. */
+ if (tdesc && tdesc->word && (tdesc->flags & W_HASQUOTEDNULL) && QUOTED_NULL (temp))
+ {
+ if (had_quoted_null_p)
+ *had_quoted_null_p = 1;
+ if (*quoted_dollar_at_p == 0)
+ {
+ free (temp);
+ tdesc->word = temp = (char *)NULL;
+ }
+
+ }
+
+ ret = tdesc;
+ goto return0;
+
+ /* Do command or arithmetic substitution. */
+ case LPAREN:
+ /* We have to extract the contents of this paren substitution. */
+ t_index = zindex + 1;
+ temp = extract_command_subst (string, &t_index, 0);
+ zindex = t_index;
+
+ /* For Posix.2-style `$(( ))' arithmetic substitution,
+ extract the expression and pass it to the evaluator. */
+ if (temp && *temp == LPAREN)
+ {
+ char *temp2;
+ temp1 = temp + 1;
+ temp2 = savestring (temp1);
+ t_index = strlen (temp2) - 1;
+
+ if (temp2[t_index] != RPAREN)
+ {
+ free (temp2);
+ goto comsub;
+ }
+
+ /* Cut off ending `)' */
+ temp2[t_index] = '\0';
+
+ if (chk_arithsub (temp2, t_index) == 0)
+ {
+ free (temp2);
+#if 0
+ internal_warning (_("future versions of the shell will force evaluation as an arithmetic substitution"));
+#endif
+ goto comsub;
+ }
+
+ /* Expand variables found inside the expression. */
+ temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES);
+ free (temp2);
+
+arithsub:
+ /* No error messages. */
+ this_command_name = (char *)NULL;
+ number = evalexp (temp1, &expok);
+ free (temp);
+ free (temp1);
+ if (expok == 0)
+ {
+ if (interactive_shell == 0 && posixly_correct)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ return (&expand_wdesc_fatal);
+ }
+ else
+ return (&expand_wdesc_error);
+ }
+ temp = itos (number);
+ break;
+ }
+
+comsub:
+ if (pflags & PF_NOCOMSUB)
+ /* we need zindex+1 because string[zindex] == RPAREN */
+ temp1 = substring (string, *sindex, zindex+1);
+ else
+ {
+ tdesc = command_substitute (temp, quoted);
+ temp1 = tdesc ? tdesc->word : (char *)NULL;
+ if (tdesc)
+ dispose_word_desc (tdesc);
+ }
+ FREE (temp);
+ temp = temp1;
+ break;
+
+ /* Do POSIX.2d9-style arithmetic substitution. This will probably go
+ away in a future bash release. */
+ case '[':
+ /* Extract the contents of this arithmetic substitution. */
+ t_index = zindex + 1;
+ temp = extract_arithmetic_subst (string, &t_index);
+ zindex = t_index;
+ if (temp == 0)
+ {
+ temp = savestring (string);
+ if (expanded_something)
+ *expanded_something = 0;
+ goto return0;
+ }
+
+ /* Do initial variable expansion. */
+ temp1 = expand_arith_string (temp, Q_DOUBLE_QUOTES);
+
+ goto arithsub;
+
+ default:
+ /* Find the variable in VARIABLE_LIST. */
+ temp = (char *)NULL;
+
+ for (t_index = zindex; (c = string[zindex]) && legal_variable_char (c); zindex++)
+ ;
+ temp1 = (zindex > t_index) ? substring (string, t_index, zindex) : (char *)NULL;
+
+ /* If this isn't a variable name, then just output the `$'. */
+ if (temp1 == 0 || *temp1 == '\0')
+ {
+ FREE (temp1);
+ temp = (char *)xmalloc (2);
+ temp[0] = '$';
+ temp[1] = '\0';
+ if (expanded_something)
+ *expanded_something = 0;
+ goto return0;
+ }
+
+ /* If the variable exists, return its value cell. */
+ var = find_variable (temp1);
+
+ if (var && invisible_p (var) == 0 && var_isset (var))
+ {
+#if defined (ARRAY_VARS)
+ if (assoc_p (var) || array_p (var))
+ {
+ temp = array_p (var) ? array_reference (array_cell (var), 0)
+ : assoc_reference (assoc_cell (var), "0");
+ if (temp)
+ temp = (*temp && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ? quote_string (temp)
+ : quote_escapes (temp);
+ else if (unbound_vars_is_error)
+ goto unbound_variable;
+ }
+ else
+#endif
+ {
+ temp = value_cell (var);
+
+ temp = (*temp && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ? quote_string (temp)
+ : quote_escapes (temp);
+ }
+
+ free (temp1);
+
+ goto return0;
+ }
+ else if (var = find_variable_last_nameref (temp1))
+ {
+ temp = nameref_cell (var);
+#if defined (ARRAY_VARS)
+ if (temp && *temp && valid_array_reference (temp))
+ {
+ tdesc = parameter_brace_expand_word (temp, SPECIAL_VAR (temp, 0), quoted, pflags, (arrayind_t *)NULL);
+ if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal)
+ return (tdesc);
+ ret = tdesc;
+ goto return0;
+ }
+ else
+#endif
+ /* y=2 ; typeset -n x=y; echo $x is not the same as echo $2 in ksh */
+ if (temp && *temp && legal_identifier (temp) == 0)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ report_error (_("%s: invalid variable name for name reference"), temp);
+ return (&expand_wdesc_error); /* XXX */
+ }
+ else
+ temp = (char *)NULL;
+ }
+
+ temp = (char *)NULL;
+
+unbound_variable:
+ if (unbound_vars_is_error)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (temp1);
+ }
+ else
+ {
+ free (temp1);
+ goto return0;
+ }
+
+ free (temp1);
+ last_command_exit_value = EXECUTION_FAILURE;
+ return ((unbound_vars_is_error && interactive_shell == 0)
+ ? &expand_wdesc_fatal
+ : &expand_wdesc_error);
+ }
+
+ if (string[zindex])
+ zindex++;
+
+return0:
+ *sindex = zindex;
+
+ if (ret == 0)
+ {
+ ret = alloc_word_desc ();
+ ret->flags = tflag; /* XXX */
+ ret->word = temp;
+ }
+ return ret;
+}
+
+/* Make a word list which is the result of parameter and variable
+ expansion, command substitution, arithmetic substitution, and
+ quote removal of WORD. Return a pointer to a WORD_LIST which is
+ the result of the expansion. If WORD contains a null word, the
+ word list returned is also null.
+
+ QUOTED contains flag values defined in shell.h.
+
+ ISEXP is used to tell expand_word_internal that the word should be
+ treated as the result of an expansion. This has implications for
+ how IFS characters in the word are treated.
+
+ CONTAINS_DOLLAR_AT and EXPANDED_SOMETHING are return values; when non-null
+ they point to an integer value which receives information about expansion.
+ CONTAINS_DOLLAR_AT gets non-zero if WORD contained "$@", else zero.
+ EXPANDED_SOMETHING get non-zero if WORD contained any parameter expansions,
+ else zero.
+
+ This only does word splitting in the case of $@ expansion. In that
+ case, we split on ' '. */
+
+/* Values for the local variable quoted_state. */
+#define UNQUOTED 0
+#define PARTIALLY_QUOTED 1
+#define WHOLLY_QUOTED 2
+
+static WORD_LIST *
+expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_something)
+ WORD_DESC *word;
+ int quoted, isexp;
+ int *contains_dollar_at;
+ int *expanded_something;
+{
+ WORD_LIST *list;
+ WORD_DESC *tword;
+
+ /* The intermediate string that we build while expanding. */
+ char *istring;
+
+ /* The current size of the above object. */
+ int istring_size;
+
+ /* Index into ISTRING. */
+ int istring_index;
+
+ /* Temporary string storage. */
+ char *temp, *temp1;
+
+ /* The text of WORD. */
+ register char *string;
+
+ /* The size of STRING. */
+ size_t string_size;
+
+ /* The index into STRING. */
+ int sindex;
+
+ /* This gets 1 if we see a $@ while quoted. */
+ int quoted_dollar_at;
+
+ /* One of UNQUOTED, PARTIALLY_QUOTED, or WHOLLY_QUOTED, depending on
+ whether WORD contains no quoting characters, a partially quoted
+ string (e.g., "xx"ab), or is fully quoted (e.g., "xxab"). */
+ int quoted_state;
+
+ /* State flags */
+ int had_quoted_null;
+ int has_dollar_at, temp_has_dollar_at;
+ int split_on_spaces;
+ int tflag;
+ int pflags; /* flags passed to param_expand */
+
+ int assignoff; /* If assignment, offset of `=' */
+
+ register unsigned char c; /* Current character. */
+ int t_index; /* For calls to string_extract_xxx. */
+
+ char twochars[2];
+
+ DECLARE_MBSTATE;
+
+ istring = (char *)xmalloc (istring_size = DEFAULT_INITIAL_ARRAY_SIZE);
+ istring[istring_index = 0] = '\0';
+ quoted_dollar_at = had_quoted_null = has_dollar_at = 0;
+ split_on_spaces = 0;
+ quoted_state = UNQUOTED;
+
+ string = word->word;
+ if (string == 0)
+ goto finished_with_string;
+ /* Don't need the string length for the SADD... and COPY_ macros unless
+ multibyte characters are possible. */
+ string_size = (MB_CUR_MAX > 1) ? strlen (string) : 1;
+
+ if (contains_dollar_at)
+ *contains_dollar_at = 0;
+
+ assignoff = -1;
+
+ /* Begin the expansion. */
+
+ for (sindex = 0; ;)
+ {
+ c = string[sindex];
+
+ /* Case on top-level character. */
+ switch (c)
+ {
+ case '\0':
+ goto finished_with_string;
+
+ case CTLESC:
+ sindex++;
+#if HANDLE_MULTIBYTE
+ if (MB_CUR_MAX > 1 && string[sindex])
+ {
+ SADD_MBQCHAR_BODY(temp, string, sindex, string_size);
+ }
+ else
+#endif
+ {
+ temp = (char *)xmalloc (3);
+ temp[0] = CTLESC;
+ temp[1] = c = string[sindex];
+ temp[2] = '\0';
+ }
+
+dollar_add_string:
+ if (string[sindex])
+ sindex++;
+
+add_string:
+ if (temp)
+ {
+ istring = sub_append_string (temp, istring, &istring_index, &istring_size);
+ temp = (char *)0;
+ }
+
+ break;
+
+#if defined (PROCESS_SUBSTITUTION)
+ /* Process substitution. */
+ case '<':
+ case '>':
+ {
+ if (string[++sindex] != LPAREN || (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (word->flags & (W_DQUOTE|W_NOPROCSUB)) || posixly_correct)
+ {
+ sindex--; /* add_character: label increments sindex */
+ goto add_character;
+ }
+ else
+ t_index = sindex + 1; /* skip past both '<' and LPAREN */
+
+ temp1 = extract_process_subst (string, (c == '<') ? "<(" : ">(", &t_index); /*))*/
+ sindex = t_index;
+
+ /* If the process substitution specification is `<()', we want to
+ open the pipe for writing in the child and produce output; if
+ it is `>()', we want to open the pipe for reading in the child
+ and consume input. */
+ temp = temp1 ? process_substitute (temp1, (c == '>')) : (char *)0;
+
+ FREE (temp1);
+
+ goto dollar_add_string;
+ }
+#endif /* PROCESS_SUBSTITUTION */
+
+ case '=':
+ /* Posix.2 section 3.6.1 says that tildes following `=' in words
+ which are not assignment statements are not expanded. If the
+ shell isn't in posix mode, though, we perform tilde expansion
+ on `likely candidate' unquoted assignment statements (flags
+ include W_ASSIGNMENT but not W_QUOTED). A likely candidate
+ contains an unquoted :~ or =~. Something to think about: we
+ now have a flag that says to perform tilde expansion on arguments
+ to `assignment builtins' like declare and export that look like
+ assignment statements. We now do tilde expansion on such words
+ even in POSIX mode. */
+ if (word->flags & (W_ASSIGNRHS|W_NOTILDE))
+ {
+ if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c))
+ goto add_ifs_character;
+ else
+ goto add_character;
+ }
+ /* If we're not in posix mode or forcing assignment-statement tilde
+ expansion, note where the `=' appears in the word and prepare to
+ do tilde expansion following the first `='. */
+ if ((word->flags & W_ASSIGNMENT) &&
+ (posixly_correct == 0 || (word->flags & W_TILDEEXP)) &&
+ assignoff == -1 && sindex > 0)
+ assignoff = sindex;
+ if (sindex == assignoff && string[sindex+1] == '~') /* XXX */
+ word->flags |= W_ITILDE;
+#if 0
+ else if ((word->flags & W_ASSIGNMENT) &&
+ (posixly_correct == 0 || (word->flags & W_TILDEEXP)) &&
+ string[sindex+1] == '~')
+ word->flags |= W_ITILDE;
+#endif
+ if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c))
+ goto add_ifs_character;
+ else
+ goto add_character;
+
+ case ':':
+ if (word->flags & W_NOTILDE)
+ {
+ if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c))
+ goto add_ifs_character;
+ else
+ goto add_character;
+ }
+
+ if ((word->flags & (W_ASSIGNMENT|W_ASSIGNRHS|W_TILDEEXP)) &&
+ string[sindex+1] == '~')
+ word->flags |= W_ITILDE;
+
+ if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c))
+ goto add_ifs_character;
+ else
+ goto add_character;
+
+ case '~':
+ /* If the word isn't supposed to be tilde expanded, or we're not
+ at the start of a word or after an unquoted : or = in an
+ assignment statement, we don't do tilde expansion. */
+ if ((word->flags & (W_NOTILDE|W_DQUOTE)) ||
+ (sindex > 0 && ((word->flags & W_ITILDE) == 0)) ||
+ (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ {
+ word->flags &= ~W_ITILDE;
+ if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c) && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) == 0)
+ goto add_ifs_character;
+ else
+ goto add_character;
+ }
+
+ if (word->flags & W_ASSIGNRHS)
+ tflag = 2;
+ else if (word->flags & (W_ASSIGNMENT|W_TILDEEXP))
+ tflag = 1;
+ else
+ tflag = 0;
+
+ temp = bash_tilde_find_word (string + sindex, tflag, &t_index);
+
+ word->flags &= ~W_ITILDE;
+
+ if (temp && *temp && t_index > 0)
+ {
+ temp1 = bash_tilde_expand (temp, tflag);
+ if (temp1 && *temp1 == '~' && STREQ (temp, temp1))
+ {
+ FREE (temp);
+ FREE (temp1);
+ goto add_character; /* tilde expansion failed */
+ }
+ free (temp);
+ temp = temp1;
+ sindex += t_index;
+ goto add_quoted_string; /* XXX was add_string */
+ }
+ else
+ {
+ FREE (temp);
+ goto add_character;
+ }
+
+ case '$':
+ if (expanded_something)
+ *expanded_something = 1;
+
+ temp_has_dollar_at = 0;
+ pflags = (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0;
+ if (word->flags & W_NOSPLIT2)
+ pflags |= PF_NOSPLIT2;
+ if (word->flags & W_ASSIGNRHS)
+ pflags |= PF_ASSIGNRHS;
+ tword = param_expand (string, &sindex, quoted, expanded_something,
+ &temp_has_dollar_at, "ed_dollar_at,
+ &had_quoted_null, pflags);
+ has_dollar_at += temp_has_dollar_at;
+ split_on_spaces += (tword->flags & W_SPLITSPACE);
+
+ if (tword == &expand_wdesc_error || tword == &expand_wdesc_fatal)
+ {
+ free (string);
+ free (istring);
+ return ((tword == &expand_wdesc_error) ? &expand_word_error
+ : &expand_word_fatal);
+ }
+ if (contains_dollar_at && has_dollar_at)
+ *contains_dollar_at = 1;
+
+ if (tword && (tword->flags & W_HASQUOTEDNULL))
+ had_quoted_null = 1;
+
+ temp = tword ? tword->word : (char *)NULL;
+ dispose_word_desc (tword);
+
+ /* Kill quoted nulls; we will add them back at the end of
+ expand_word_internal if nothing else in the string */
+ if (had_quoted_null && temp && QUOTED_NULL (temp))
+ {
+ FREE (temp);
+ temp = (char *)NULL;
+ }
+
+ goto add_string;
+ break;
+
+ case '`': /* Backquoted command substitution. */
+ {
+ t_index = sindex++;
+
+ temp = string_extract (string, &sindex, "`", SX_REQMATCH);
+ /* The test of sindex against t_index is to allow bare instances of
+ ` to pass through, for backwards compatibility. */
+ if (temp == &extract_string_error || temp == &extract_string_fatal)
+ {
+ if (sindex - 1 == t_index)
+ {
+ sindex = t_index;
+ goto add_character;
+ }
+ last_command_exit_value = EXECUTION_FAILURE;
+ report_error (_("bad substitution: no closing \"`\" in %s") , string+t_index);
+ free (string);
+ free (istring);
+ return ((temp == &extract_string_error) ? &expand_word_error
+ : &expand_word_fatal);
+ }
+
+ if (expanded_something)
+ *expanded_something = 1;
+
+ if (word->flags & W_NOCOMSUB)
+ /* sindex + 1 because string[sindex] == '`' */
+ temp1 = substring (string, t_index, sindex + 1);
+ else
+ {
+ de_backslash (temp);
+ tword = command_substitute (temp, quoted);
+ temp1 = tword ? tword->word : (char *)NULL;
+ if (tword)
+ dispose_word_desc (tword);
+ }
+ FREE (temp);
+ temp = temp1;
+ goto dollar_add_string;
+ }
+
+ case '\\':
+ if (string[sindex + 1] == '\n')
+ {
+ sindex += 2;
+ continue;
+ }
+
+ c = string[++sindex];
+
+ if (quoted & Q_HERE_DOCUMENT)
+ tflag = CBSHDOC;
+ else if (quoted & Q_DOUBLE_QUOTES)
+ tflag = CBSDQUOTE;
+ else
+ tflag = 0;
+
+ /* From Posix discussion on austin-group list: Backslash escaping
+ a } in ${...} is removed. Issue 0000221 */
+ if ((quoted & Q_DOLBRACE) && c == RBRACE)
+ {
+ SCOPY_CHAR_I (twochars, CTLESC, c, string, sindex, string_size);
+ }
+ /* This is the fix for " $@\ " */
+ else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && ((sh_syntaxtab[c] & tflag) == 0) && isexp == 0 && isifs (c))
+ {
+ RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size,
+ DEFAULT_ARRAY_SIZE);
+ istring[istring_index++] = CTLESC;
+ istring[istring_index++] = '\\';
+ istring[istring_index] = '\0';
+
+ SCOPY_CHAR_I (twochars, CTLESC, c, string, sindex, string_size);
+ }
+ else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && ((sh_syntaxtab[c] & tflag) == 0))
+ {
+ SCOPY_CHAR_I (twochars, '\\', c, string, sindex, string_size);
+ }
+ else if (c == 0)
+ {
+ c = CTLNUL;
+ sindex--; /* add_character: label increments sindex */
+ goto add_character;
+ }
+ else
+ {
+ SCOPY_CHAR_I (twochars, CTLESC, c, string, sindex, string_size);
+ }
+
+ sindex++;
+add_twochars:
+ /* BEFORE jumping here, we need to increment sindex if appropriate */
+ RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size,
+ DEFAULT_ARRAY_SIZE);
+ istring[istring_index++] = twochars[0];
+ istring[istring_index++] = twochars[1];
+ istring[istring_index] = '\0';
+
+ break;
+
+ case '"':
+ if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ goto add_character;
+
+ t_index = ++sindex;
+ temp = string_extract_double_quoted (string, &sindex, 0);
+
+ /* If the quotes surrounded the entire string, then the
+ whole word was quoted. */
+ quoted_state = (t_index == 1 && string[sindex] == '\0')
+ ? WHOLLY_QUOTED
+ : PARTIALLY_QUOTED;
+
+ if (temp && *temp)
+ {
+ tword = alloc_word_desc ();
+ tword->word = temp;
+
+ temp = (char *)NULL;
+
+ temp_has_dollar_at = 0; /* XXX */
+ /* Need to get W_HASQUOTEDNULL flag through this function. */
+ list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &temp_has_dollar_at, (int *)NULL);
+ has_dollar_at += temp_has_dollar_at;
+
+ if (list == &expand_word_error || list == &expand_word_fatal)
+ {
+ free (istring);
+ free (string);
+ /* expand_word_internal has already freed temp_word->word
+ for us because of the way it prints error messages. */
+ tword->word = (char *)NULL;
+ dispose_word (tword);
+ return list;
+ }
+
+ dispose_word (tword);
+
+ /* "$@" (a double-quoted dollar-at) expands into nothing,
+ not even a NULL word, when there are no positional
+ parameters. */
+ if (list == 0 && has_dollar_at)
+ {
+ quoted_dollar_at++;
+ break;
+ }
+
+ /* If we get "$@", we know we have expanded something, so we
+ need to remember it for the final split on $IFS. This is
+ a special case; it's the only case where a quoted string
+ can expand into more than one word. It's going to come back
+ from the above call to expand_word_internal as a list with
+ a single word, in which all characters are quoted and
+ separated by blanks. What we want to do is to turn it back
+ into a list for the next piece of code. */
+ if (list)
+ dequote_list (list);
+
+ if (list && list->word && (list->word->flags & W_HASQUOTEDNULL))
+ had_quoted_null = 1; /* XXX */
+
+ if (has_dollar_at)
+ {
+ quoted_dollar_at++;
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+ if (expanded_something)
+ *expanded_something = 1;
+ }
+ }
+ else
+ {
+ /* What we have is "". This is a minor optimization. */
+ FREE (temp);
+ list = (WORD_LIST *)NULL;
+ }
+
+ /* The code above *might* return a list (consider the case of "$@",
+ where it returns "$1", "$2", etc.). We can't throw away the
+ rest of the list, and we have to make sure each word gets added
+ as quoted. We test on tresult->next: if it is non-NULL, we
+ quote the whole list, save it to a string with string_list, and
+ add that string. We don't need to quote the results of this
+ (and it would be wrong, since that would quote the separators
+ as well), so we go directly to add_string. */
+ if (list)
+ {
+ if (list->next)
+ {
+ /* Testing quoted_dollar_at makes sure that "$@" is
+ split correctly when $IFS does not contain a space. */
+ temp = quoted_dollar_at
+ ? string_list_dollar_at (list, Q_DOUBLE_QUOTES)
+ : string_list (quote_list (list));
+ dispose_words (list);
+ goto add_string;
+ }
+ else
+ {
+ temp = savestring (list->word->word);
+ tflag = list->word->flags;
+ dispose_words (list);
+
+ /* If the string is not a quoted null string, we want
+ to remove any embedded unquoted CTLNUL characters.
+ We do not want to turn quoted null strings back into
+ the empty string, though. We do this because we
+ want to remove any quoted nulls from expansions that
+ contain other characters. For example, if we have
+ x"$*"y or "x$*y" and there are no positional parameters,
+ the $* should expand into nothing. */
+ /* We use the W_HASQUOTEDNULL flag to differentiate the
+ cases: a quoted null character as above and when
+ CTLNUL is contained in the (non-null) expansion
+ of some variable. We use the had_quoted_null flag to
+ pass the value through this function to its caller. */
+ if ((tflag & W_HASQUOTEDNULL) && QUOTED_NULL (temp) == 0)
+ remove_quoted_nulls (temp); /* XXX */
+ }
+ }
+ else
+ temp = (char *)NULL;
+
+ /* We do not want to add quoted nulls to strings that are only
+ partially quoted; we can throw them away. The exception to
+ this is when we are going to be performing word splitting,
+ since we have to preserve a null argument if the next character
+ will cause word splitting. */
+ if (temp == 0 && quoted_state == PARTIALLY_QUOTED && (word->flags & (W_NOSPLIT|W_NOSPLIT2)))
+ continue;
+
+ add_quoted_string:
+
+ if (temp)
+ {
+ temp1 = temp;
+ temp = quote_string (temp);
+ free (temp1);
+ goto add_string;
+ }
+ else
+ {
+ /* Add NULL arg. */
+ c = CTLNUL;
+ sindex--; /* add_character: label increments sindex */
+ goto add_character;
+ }
+
+ /* break; */
+
+ case '\'':
+ if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ goto add_character;
+
+ t_index = ++sindex;
+ temp = string_extract_single_quoted (string, &sindex);
+
+ /* If the entire STRING was surrounded by single quotes,
+ then the string is wholly quoted. */
+ quoted_state = (t_index == 1 && string[sindex] == '\0')
+ ? WHOLLY_QUOTED
+ : PARTIALLY_QUOTED;
+
+ /* If all we had was '', it is a null expansion. */
+ if (*temp == '\0')
+ {
+ free (temp);
+ temp = (char *)NULL;
+ }
+ else
+ remove_quoted_escapes (temp); /* ??? */
+
+ /* We do not want to add quoted nulls to strings that are only
+ partially quoted; such nulls are discarded. */
+ if (temp == 0 && (quoted_state == PARTIALLY_QUOTED))
+ continue;
+
+ /* If we have a quoted null expansion, add a quoted NULL to istring. */
+ if (temp == 0)
+ {
+ c = CTLNUL;
+ sindex--; /* add_character: label increments sindex */
+ goto add_character;
+ }
+ else
+ goto add_quoted_string;
+
+ /* break; */
+
+ default:
+ /* This is the fix for " $@ " */
+ add_ifs_character:
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (isexp == 0 && isifs (c)))
+ {
+ if (string[sindex]) /* from old goto dollar_add_string */
+ sindex++;
+ if (c == 0)
+ {
+ c = CTLNUL;
+ goto add_character;
+ }
+ else
+ {
+#if HANDLE_MULTIBYTE
+ if (MB_CUR_MAX > 1)
+ sindex--;
+
+ if (MB_CUR_MAX > 1)
+ {
+ SADD_MBQCHAR_BODY(temp, string, sindex, string_size);
+ }
+ else
+#endif
+ {
+ twochars[0] = CTLESC;
+ twochars[1] = c;
+ goto add_twochars;
+ }
+ }
+ }
+
+ SADD_MBCHAR (temp, string, sindex, string_size);
+
+ add_character:
+ RESIZE_MALLOCED_BUFFER (istring, istring_index, 1, istring_size,
+ DEFAULT_ARRAY_SIZE);
+ istring[istring_index++] = c;
+ istring[istring_index] = '\0';
+
+ /* Next character. */
+ sindex++;
+ }
+ }
+
+finished_with_string:
+ /* OK, we're ready to return. If we have a quoted string, and
+ quoted_dollar_at is not set, we do no splitting at all; otherwise
+ we split on ' '. The routines that call this will handle what to
+ do if nothing has been expanded. */
+
+ /* Partially and wholly quoted strings which expand to the empty
+ string are retained as an empty arguments. Unquoted strings
+ which expand to the empty string are discarded. The single
+ exception is the case of expanding "$@" when there are no
+ positional parameters. In that case, we discard the expansion. */
+
+ /* Because of how the code that handles "" and '' in partially
+ quoted strings works, we need to make ISTRING into a QUOTED_NULL
+ if we saw quoting characters, but the expansion was empty.
+ "" and '' are tossed away before we get to this point when
+ processing partially quoted strings. This makes "" and $xxx""
+ equivalent when xxx is unset. We also look to see whether we
+ saw a quoted null from a ${} expansion and add one back if we
+ need to. */
+
+ /* If we expand to nothing and there were no single or double quotes
+ in the word, we throw it away. Otherwise, we return a NULL word.
+ The single exception is for $@ surrounded by double quotes when
+ there are no positional parameters. In that case, we also throw
+ the word away. */
+
+ if (*istring == '\0')
+ {
+ if (quoted_dollar_at == 0 && (had_quoted_null || quoted_state == PARTIALLY_QUOTED))
+ {
+ istring[0] = CTLNUL;
+ istring[1] = '\0';
+ tword = make_bare_word (istring);
+ tword->flags |= W_HASQUOTEDNULL; /* XXX */
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ tword->flags |= W_QUOTED;
+ }
+ /* According to sh, ksh, and Posix.2, if a word expands into nothing
+ and a double-quoted "$@" appears anywhere in it, then the entire
+ word is removed. */
+ else if (quoted_state == UNQUOTED || quoted_dollar_at)
+ list = (WORD_LIST *)NULL;
+#if 0
+ else
+ {
+ tword = make_bare_word (istring);
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ tword->flags |= W_QUOTED;
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+ }
+#else
+ else
+ list = (WORD_LIST *)NULL;
+#endif
+ }
+ else if (word->flags & W_NOSPLIT)
+ {
+ tword = make_bare_word (istring);
+ if (word->flags & W_ASSIGNMENT)
+ tword->flags |= W_ASSIGNMENT; /* XXX */
+ if (word->flags & W_COMPASSIGN)
+ tword->flags |= W_COMPASSIGN; /* XXX */
+ if (word->flags & W_NOGLOB)
+ tword->flags |= W_NOGLOB; /* XXX */
+ if (word->flags & W_NOBRACE)
+ tword->flags |= W_NOBRACE; /* XXX */
+ if (word->flags & W_NOEXPAND)
+ tword->flags |= W_NOEXPAND; /* XXX */
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ tword->flags |= W_QUOTED;
+ if (had_quoted_null && QUOTED_NULL (istring))
+ tword->flags |= W_HASQUOTEDNULL;
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+ }
+ else
+ {
+ char *ifs_chars;
+
+ ifs_chars = (quoted_dollar_at || has_dollar_at) ? ifs_value : (char *)NULL;
+
+ /* If we have $@, we need to split the results no matter what. If
+ IFS is unset or NULL, string_list_dollar_at has separated the
+ positional parameters with a space, so we split on space (we have
+ set ifs_chars to " \t\n" above if ifs is unset). If IFS is set,
+ string_list_dollar_at has separated the positional parameters
+ with the first character of $IFS, so we split on $IFS. If
+ SPLIT_ON_SPACES is set, we expanded $* (unquoted) with IFS either
+ unset or null, and we want to make sure that we split on spaces
+ regardless of what else has happened to IFS since the expansion. */
+ if (split_on_spaces)
+ list = list_string (istring, " ", 1); /* XXX quoted == 1? */
+ else if (has_dollar_at && ifs_chars)
+ list = list_string (istring, *ifs_chars ? ifs_chars : " ", 1);
+ else
+ {
+ tword = make_bare_word (istring);
+ if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) || (quoted_state == WHOLLY_QUOTED))
+ tword->flags |= W_QUOTED;
+ if (word->flags & W_ASSIGNMENT)
+ tword->flags |= W_ASSIGNMENT;
+ if (word->flags & W_COMPASSIGN)
+ tword->flags |= W_COMPASSIGN;
+ if (word->flags & W_NOGLOB)
+ tword->flags |= W_NOGLOB;
+ if (word->flags & W_NOBRACE)
+ tword->flags |= W_NOBRACE;
+ if (word->flags & W_NOEXPAND)
+ tword->flags |= W_NOEXPAND;
+ if (had_quoted_null && QUOTED_NULL (istring))
+ tword->flags |= W_HASQUOTEDNULL; /* XXX */
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+ }
+ }
+
+ free (istring);
+ return (list);
+}
+
+/* **************************************************************** */
+/* */
+/* Functions for Quote Removal */
+/* */
+/* **************************************************************** */
+
+/* Perform quote removal on STRING. If QUOTED > 0, assume we are obeying the
+ backslash quoting rules for within double quotes or a here document. */
+char *
+string_quote_removal (string, quoted)
+ char *string;
+ int quoted;
+{
+ size_t slen;
+ char *r, *result_string, *temp, *send;
+ int sindex, tindex, dquote;
+ unsigned char c;
+ DECLARE_MBSTATE;
+
+ /* The result can be no longer than the original string. */
+ slen = strlen (string);
+ send = string + slen;
+
+ r = result_string = (char *)xmalloc (slen + 1);
+
+ for (dquote = sindex = 0; c = string[sindex];)
+ {
+ switch (c)
+ {
+ case '\\':
+ c = string[++sindex];
+ if (c == 0)
+ {
+ *r++ = '\\';
+ break;
+ }
+ if (((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || dquote) && (sh_syntaxtab[c] & CBSDQUOTE) == 0)
+ *r++ = '\\';
+ /* FALLTHROUGH */
+
+ default:
+ SCOPY_CHAR_M (r, string, send, sindex);
+ break;
+
+ case '\'':
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || dquote)
+ {
+ *r++ = c;
+ sindex++;
+ break;
+ }
+ tindex = sindex + 1;
+ temp = string_extract_single_quoted (string, &tindex);
+ if (temp)
+ {
+ strcpy (r, temp);
+ r += strlen (r);
+ free (temp);
+ }
+ sindex = tindex;
+ break;
+
+ case '"':
+ dquote = 1 - dquote;
+ sindex++;
+ break;
+ }
+ }
+ *r = '\0';
+ return (result_string);
+}
+
+#if 0
+/* UNUSED */
+/* Perform quote removal on word WORD. This allocates and returns a new
+ WORD_DESC *. */
+WORD_DESC *
+word_quote_removal (word, quoted)
+ WORD_DESC *word;
+ int quoted;
+{
+ WORD_DESC *w;
+ char *t;
+
+ t = string_quote_removal (word->word, quoted);
+ w = alloc_word_desc ();
+ w->word = t ? t : savestring ("");
+ return (w);
+}
+
+/* Perform quote removal on all words in LIST. If QUOTED is non-zero,
+ the members of the list are treated as if they are surrounded by
+ double quotes. Return a new list, or NULL if LIST is NULL. */
+WORD_LIST *
+word_list_quote_removal (list, quoted)
+ WORD_LIST *list;
+ int quoted;
+{
+ WORD_LIST *result, *t, *tresult, *e;
+
+ for (t = list, result = (WORD_LIST *)NULL; t; t = t->next)
+ {
+ tresult = make_word_list (word_quote_removal (t->word, quoted), (WORD_LIST *)NULL);
+#if 0
+ result = (WORD_LIST *) list_append (result, tresult);
+#else
+ if (result == 0)
+ result = e = tresult;
+ else
+ {
+ e->next = tresult;
+ while (e->next)
+ e = e->next;
+ }
+#endif
+ }
+ return (result);
+}
+#endif
+
+/*******************************************
+ * *
+ * Functions to perform word splitting *
+ * *
+ *******************************************/
+
+void
+setifs (v)
+ SHELL_VAR *v;
+{
+ char *t;
+ unsigned char uc;
+
+ ifs_var = v;
+ ifs_value = (v && value_cell (v)) ? value_cell (v) : " \t\n";
+
+ ifs_is_set = ifs_var != 0;
+ ifs_is_null = ifs_is_set && (*ifs_value == 0);
+
+ /* Should really merge ifs_cmap with sh_syntaxtab. XXX - doesn't yet
+ handle multibyte chars in IFS */
+ memset (ifs_cmap, '\0', sizeof (ifs_cmap));
+ for (t = ifs_value ; t && *t; t++)
+ {
+ uc = *t;
+ ifs_cmap[uc] = 1;
+ }
+
+#if defined (HANDLE_MULTIBYTE)
+ if (ifs_value == 0)
+ {
+ ifs_firstc[0] = '\0';
+ ifs_firstc_len = 1;
+ }
+ else
+ {
+ size_t ifs_len;
+ ifs_len = strnlen (ifs_value, MB_CUR_MAX);
+ ifs_firstc_len = MBLEN (ifs_value, ifs_len);
+ if (ifs_firstc_len == 1 || ifs_firstc_len == 0 || MB_INVALIDCH (ifs_firstc_len))
+ {
+ ifs_firstc[0] = ifs_value[0];
+ ifs_firstc[1] = '\0';
+ ifs_firstc_len = 1;
+ }
+ else
+ memcpy (ifs_firstc, ifs_value, ifs_firstc_len);
+ }
+#else
+ ifs_firstc = ifs_value ? *ifs_value : 0;
+#endif
+}
+
+char *
+getifs ()
+{
+ return ifs_value;
+}
+
+/* This splits a single word into a WORD LIST on $IFS, but only if the word
+ is not quoted. list_string () performs quote removal for us, even if we
+ don't do any splitting. */
+WORD_LIST *
+word_split (w, ifs_chars)
+ WORD_DESC *w;
+ char *ifs_chars;
+{
+ WORD_LIST *result;
+
+ if (w)
+ {
+ char *xifs;
+
+ xifs = ((w->flags & W_QUOTED) || ifs_chars == 0) ? "" : ifs_chars;
+ result = list_string (w->word, xifs, w->flags & W_QUOTED);
+ }
+ else
+ result = (WORD_LIST *)NULL;
+
+ return (result);
+}
+
+/* Perform word splitting on LIST and return the RESULT. It is possible
+ to return (WORD_LIST *)NULL. */
+static WORD_LIST *
+word_list_split (list)
+ WORD_LIST *list;
+{
+ WORD_LIST *result, *t, *tresult, *e;
+
+ for (t = list, result = (WORD_LIST *)NULL; t; t = t->next)
+ {
+ tresult = word_split (t->word, ifs_value);
+ if (result == 0)
+ result = e = tresult;
+ else
+ {
+ e->next = tresult;
+ while (e->next)
+ e = e->next;
+ }
+ }
+ return (result);
+}
+
+/**************************************************
+ * *
+ * Functions to expand an entire WORD_LIST *
+ * *
+ **************************************************/
+
+/* Do any word-expansion-specific cleanup and jump to top_level */
+static void
+exp_jump_to_top_level (v)
+ int v;
+{
+ set_pipestatus_from_exit (last_command_exit_value);
+
+ /* Cleanup code goes here. */
+ expand_no_split_dollar_star = 0; /* XXX */
+ expanding_redir = 0;
+ assigning_in_environment = 0;
+
+ if (parse_and_execute_level == 0)
+ top_level_cleanup (); /* from sig.c */
+
+ jump_to_top_level (v);
+}
+
+/* Put NLIST (which is a WORD_LIST * of only one element) at the front of
+ ELIST, and set ELIST to the new list. */
+#define PREPEND_LIST(nlist, elist) \
+ do { nlist->next = elist; elist = nlist; } while (0)
+
+/* Separate out any initial variable assignments from TLIST. If set -k has
+ been executed, remove all assignment statements from TLIST. Initial
+ variable assignments and other environment assignments are placed
+ on SUBST_ASSIGN_VARLIST. */
+static WORD_LIST *
+separate_out_assignments (tlist)
+ WORD_LIST *tlist;
+{
+ register WORD_LIST *vp, *lp;
+
+ if (tlist == 0)
+ return ((WORD_LIST *)NULL);
+
+ if (subst_assign_varlist)
+ dispose_words (subst_assign_varlist); /* Clean up after previous error */
+
+ subst_assign_varlist = (WORD_LIST *)NULL;
+ vp = lp = tlist;
+
+ /* Separate out variable assignments at the start of the command.
+ Loop invariant: vp->next == lp
+ Loop postcondition:
+ lp = list of words left after assignment statements skipped
+ tlist = original list of words
+ */
+ while (lp && (lp->word->flags & W_ASSIGNMENT))
+ {
+ vp = lp;
+ lp = lp->next;
+ }
+
+ /* If lp != tlist, we have some initial assignment statements.
+ We make SUBST_ASSIGN_VARLIST point to the list of assignment
+ words and TLIST point to the remaining words. */
+ if (lp != tlist)
+ {
+ subst_assign_varlist = tlist;
+ /* ASSERT(vp->next == lp); */
+ vp->next = (WORD_LIST *)NULL; /* terminate variable list */
+ tlist = lp; /* remainder of word list */
+ }
+
+ /* vp == end of variable list */
+ /* tlist == remainder of original word list without variable assignments */
+ if (!tlist)
+ /* All the words in tlist were assignment statements */
+ return ((WORD_LIST *)NULL);
+
+ /* ASSERT(tlist != NULL); */
+ /* ASSERT((tlist->word->flags & W_ASSIGNMENT) == 0); */
+
+ /* If the -k option is in effect, we need to go through the remaining
+ words, separate out the assignment words, and place them on
+ SUBST_ASSIGN_VARLIST. */
+ if (place_keywords_in_env)
+ {
+ WORD_LIST *tp; /* tp == running pointer into tlist */
+
+ tp = tlist;
+ lp = tlist->next;
+
+ /* Loop Invariant: tp->next == lp */
+ /* Loop postcondition: tlist == word list without assignment statements */
+ while (lp)
+ {
+ if (lp->word->flags & W_ASSIGNMENT)
+ {
+ /* Found an assignment statement, add this word to end of
+ subst_assign_varlist (vp). */
+ if (!subst_assign_varlist)
+ subst_assign_varlist = vp = lp;
+ else
+ {
+ vp->next = lp;
+ vp = lp;
+ }
+
+ /* Remove the word pointed to by LP from TLIST. */
+ tp->next = lp->next;
+ /* ASSERT(vp == lp); */
+ lp->next = (WORD_LIST *)NULL;
+ lp = tp->next;
+ }
+ else
+ {
+ tp = lp;
+ lp = lp->next;
+ }
+ }
+ }
+ return (tlist);
+}
+
+#define WEXP_VARASSIGN 0x001
+#define WEXP_BRACEEXP 0x002
+#define WEXP_TILDEEXP 0x004
+#define WEXP_PARAMEXP 0x008
+#define WEXP_PATHEXP 0x010
+
+/* All of the expansions, including variable assignments at the start of
+ the list. */
+#define WEXP_ALL (WEXP_VARASSIGN|WEXP_BRACEEXP|WEXP_TILDEEXP|WEXP_PARAMEXP|WEXP_PATHEXP)
+
+/* All of the expansions except variable assignments at the start of
+ the list. */
+#define WEXP_NOVARS (WEXP_BRACEEXP|WEXP_TILDEEXP|WEXP_PARAMEXP|WEXP_PATHEXP)
+
+/* All of the `shell expansions': brace expansion, tilde expansion, parameter
+ expansion, command substitution, arithmetic expansion, word splitting, and
+ quote removal. */
+#define WEXP_SHELLEXP (WEXP_BRACEEXP|WEXP_TILDEEXP|WEXP_PARAMEXP)
+
+/* Take the list of words in LIST and do the various substitutions. Return
+ a new list of words which is the expanded list, and without things like
+ variable assignments. */
+
+WORD_LIST *
+expand_words (list)
+ WORD_LIST *list;
+{
+ return (expand_word_list_internal (list, WEXP_ALL));
+}
+
+/* Same as expand_words (), but doesn't hack variable or environment
+ variables. */
+WORD_LIST *
+expand_words_no_vars (list)
+ WORD_LIST *list;
+{
+ return (expand_word_list_internal (list, WEXP_NOVARS));
+}
+
+WORD_LIST *
+expand_words_shellexp (list)
+ WORD_LIST *list;
+{
+ return (expand_word_list_internal (list, WEXP_SHELLEXP));
+}
+
+static WORD_LIST *
+glob_expand_word_list (tlist, eflags)
+ WORD_LIST *tlist;
+ int eflags;
+{
+ char **glob_array, *temp_string;
+ register int glob_index;
+ WORD_LIST *glob_list, *output_list, *disposables, *next;
+ WORD_DESC *tword;
+
+ output_list = disposables = (WORD_LIST *)NULL;
+ glob_array = (char **)NULL;
+ while (tlist)
+ {
+ /* For each word, either globbing is attempted or the word is
+ added to orig_list. If globbing succeeds, the results are
+ added to orig_list and the word (tlist) is added to the list
+ of disposable words. If globbing fails and failed glob
+ expansions are left unchanged (the shell default), the
+ original word is added to orig_list. If globbing fails and
+ failed glob expansions are removed, the original word is
+ added to the list of disposable words. orig_list ends up
+ in reverse order and requires a call to REVERSE_LIST to
+ be set right. After all words are examined, the disposable
+ words are freed. */
+ next = tlist->next;
+
+ /* If the word isn't an assignment and contains an unquoted
+ pattern matching character, then glob it. */
+ if ((tlist->word->flags & W_NOGLOB) == 0 &&
+ unquoted_glob_pattern_p (tlist->word->word))
+ {
+ glob_array = shell_glob_filename (tlist->word->word);
+
+ /* Handle error cases.
+ I don't think we should report errors like "No such file
+ or directory". However, I would like to report errors
+ like "Read failed". */
+
+ if (glob_array == 0 || GLOB_FAILED (glob_array))
+ {
+ glob_array = (char **)xmalloc (sizeof (char *));
+ glob_array[0] = (char *)NULL;
+ }
+
+ /* Dequote the current word in case we have to use it. */
+ if (glob_array[0] == NULL)
+ {
+ temp_string = dequote_string (tlist->word->word);
+ free (tlist->word->word);
+ tlist->word->word = temp_string;
+ }
+
+ /* Make the array into a word list. */
+ glob_list = (WORD_LIST *)NULL;
+ for (glob_index = 0; glob_array[glob_index]; glob_index++)
+ {
+ tword = make_bare_word (glob_array[glob_index]);
+ glob_list = make_word_list (tword, glob_list);
+ }
+
+ if (glob_list)
+ {
+ output_list = (WORD_LIST *)list_append (glob_list, output_list);
+ PREPEND_LIST (tlist, disposables);
+ }
+ else if (fail_glob_expansion != 0)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ report_error (_("no match: %s"), tlist->word->word);
+ exp_jump_to_top_level (DISCARD);
+ }
+ else if (allow_null_glob_expansion == 0)
+ {
+ /* Failed glob expressions are left unchanged. */
+ PREPEND_LIST (tlist, output_list);
+ }
+ else
+ {
+ /* Failed glob expressions are removed. */
+ PREPEND_LIST (tlist, disposables);
+ }
+ }
+ else
+ {
+ /* Dequote the string. */
+ temp_string = dequote_string (tlist->word->word);
+ free (tlist->word->word);
+ tlist->word->word = temp_string;
+ PREPEND_LIST (tlist, output_list);
+ }
+
+ strvec_dispose (glob_array);
+ glob_array = (char **)NULL;
+
+ tlist = next;
+ }
+
+ if (disposables)
+ dispose_words (disposables);
+
+ if (output_list)
+ output_list = REVERSE_LIST (output_list, WORD_LIST *);
+
+ return (output_list);
+}
+
+#if defined (BRACE_EXPANSION)
+static WORD_LIST *
+brace_expand_word_list (tlist, eflags)
+ WORD_LIST *tlist;
+ int eflags;
+{
+ register char **expansions;
+ char *temp_string;
+ WORD_LIST *disposables, *output_list, *next;
+ WORD_DESC *w;
+ int eindex;
+
+ for (disposables = output_list = (WORD_LIST *)NULL; tlist; tlist = next)
+ {
+ next = tlist->next;
+
+ if (tlist->word->flags & W_NOBRACE)
+ {
+/*itrace("brace_expand_word_list: %s: W_NOBRACE", tlist->word->word);*/
+ PREPEND_LIST (tlist, output_list);
+ continue;
+ }
+
+ if ((tlist->word->flags & (W_COMPASSIGN|W_ASSIGNARG)) == (W_COMPASSIGN|W_ASSIGNARG))
+ {
+/*itrace("brace_expand_word_list: %s: W_COMPASSIGN|W_ASSIGNARG", tlist->word->word);*/
+ PREPEND_LIST (tlist, output_list);
+ continue;
+ }
+
+ /* Only do brace expansion if the word has a brace character. If
+ not, just add the word list element to BRACES and continue. In
+ the common case, at least when running shell scripts, this will
+ degenerate to a bunch of calls to `mbschr', and then what is
+ basically a reversal of TLIST into BRACES, which is corrected
+ by a call to REVERSE_LIST () on BRACES when the end of TLIST
+ is reached. */
+ if (mbschr (tlist->word->word, LBRACE))
+ {
+ expansions = brace_expand (tlist->word->word);
+
+ for (eindex = 0; temp_string = expansions[eindex]; eindex++)
+ {
+ w = alloc_word_desc ();
+ w->word = temp_string;
+
+ /* If brace expansion didn't change the word, preserve
+ the flags. We may want to preserve the flags
+ unconditionally someday -- XXX */
+ if (STREQ (temp_string, tlist->word->word))
+ w->flags = tlist->word->flags;
+ else
+ w = make_word_flags (w, temp_string);
+
+ output_list = make_word_list (w, output_list);
+ }
+ free (expansions);
+
+ /* Add TLIST to the list of words to be freed after brace
+ expansion has been performed. */
+ PREPEND_LIST (tlist, disposables);
+ }
+ else
+ PREPEND_LIST (tlist, output_list);
+ }
+
+ if (disposables)
+ dispose_words (disposables);
+
+ if (output_list)
+ output_list = REVERSE_LIST (output_list, WORD_LIST *);
+
+ return (output_list);
+}
+#endif
+
+#if defined (ARRAY_VARS)
+/* Take WORD, a compound associative array assignment, and internally run
+ 'declare -A w', where W is the variable name portion of WORD. */
+static int
+make_internal_declare (word, option)
+ char *word;
+ char *option;
+{
+ int t;
+ WORD_LIST *wl;
+ WORD_DESC *w;
+
+ w = make_word (word);
+
+ t = assignment (w->word, 0);
+ w->word[t] = '\0';
+
+ wl = make_word_list (w, (WORD_LIST *)NULL);
+ wl = make_word_list (make_word (option), wl);
+
+ return (declare_builtin (wl));
+}
+#endif
+
+static WORD_LIST *
+shell_expand_word_list (tlist, eflags)
+ WORD_LIST *tlist;
+ int eflags;
+{
+ WORD_LIST *expanded, *orig_list, *new_list, *next, *temp_list;
+ int expanded_something, has_dollar_at;
+ char *temp_string;
+
+ /* We do tilde expansion all the time. This is what 1003.2 says. */
+ new_list = (WORD_LIST *)NULL;
+ for (orig_list = tlist; tlist; tlist = next)
+ {
+ temp_string = tlist->word->word;
+
+ next = tlist->next;
+
+#if defined (ARRAY_VARS)
+ /* If this is a compound array assignment to a builtin that accepts
+ such assignments (e.g., `declare'), take the assignment and perform
+ it separately, handling the semantics of declarations inside shell
+ functions. This avoids the double-evaluation of such arguments,
+ because `declare' does some evaluation of compound assignments on
+ its own. */
+ if ((tlist->word->flags & (W_COMPASSIGN|W_ASSIGNARG)) == (W_COMPASSIGN|W_ASSIGNARG))
+ {
+ int t;
+ char opts[8], opti;
+
+ opti = 0;
+ if (tlist->word->flags & (W_ASSIGNASSOC|W_ASSNGLOBAL|W_ASSIGNARRAY))
+ opts[opti++] = '-';
+
+ if ((tlist->word->flags & (W_ASSIGNASSOC|W_ASSNGLOBAL)) == (W_ASSIGNASSOC|W_ASSNGLOBAL))
+ {
+ opts[opti++] = 'g';
+ opts[opti++] = 'A';
+ }
+ else if (tlist->word->flags & W_ASSIGNASSOC)
+ opts[opti++] = 'A';
+ else if ((tlist->word->flags & (W_ASSIGNARRAY|W_ASSNGLOBAL)) == (W_ASSIGNARRAY|W_ASSNGLOBAL))
+ {
+ opts[opti++] = 'g';
+ opts[opti++] = 'a';
+ }
+ else if (tlist->word->flags & W_ASSIGNARRAY)
+ opts[opti++] = 'a';
+ else if (tlist->word->flags & W_ASSNGLOBAL)
+ opts[opti++] = 'g';
+
+#if 0
+ /* If we have special handling note the integer attribute */
+ if (opti > 0 && (tlist->word->flags & W_ASSIGNINT))
+ opts[opti++] = 'i';
+#endif
+
+ opts[opti] = '\0';
+ if (opti > 0)
+ make_internal_declare (tlist->word->word, opts);
+
+ t = do_word_assignment (tlist->word, 0);
+ if (t == 0)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ exp_jump_to_top_level (DISCARD);
+ }
+
+ /* Now transform the word as ksh93 appears to do and go on */
+ t = assignment (tlist->word->word, 0);
+ tlist->word->word[t] = '\0';
+ tlist->word->flags &= ~(W_ASSIGNMENT|W_NOSPLIT|W_COMPASSIGN|W_ASSIGNARG|W_ASSIGNASSOC|W_ASSIGNARRAY);
+ }
+#endif
+
+ expanded_something = 0;
+ expanded = expand_word_internal
+ (tlist->word, 0, 0, &has_dollar_at, &expanded_something);
+
+ if (expanded == &expand_word_error || expanded == &expand_word_fatal)
+ {
+ /* By convention, each time this error is returned,
+ tlist->word->word has already been freed. */
+ tlist->word->word = (char *)NULL;
+
+ /* Dispose our copy of the original list. */
+ dispose_words (orig_list);
+ /* Dispose the new list we're building. */
+ dispose_words (new_list);
+
+ last_command_exit_value = EXECUTION_FAILURE;
+ if (expanded == &expand_word_error)
+ exp_jump_to_top_level (DISCARD);
+ else
+ exp_jump_to_top_level (FORCE_EOF);
+ }
+
+ /* Don't split words marked W_NOSPLIT. */
+ if (expanded_something && (tlist->word->flags & W_NOSPLIT) == 0)
+ {
+ temp_list = word_list_split (expanded);
+ dispose_words (expanded);
+ }
+ else
+ {
+ /* If no parameter expansion, command substitution, process
+ substitution, or arithmetic substitution took place, then
+ do not do word splitting. We still have to remove quoted
+ null characters from the result. */
+ word_list_remove_quoted_nulls (expanded);
+ temp_list = expanded;
+ }
+
+ expanded = REVERSE_LIST (temp_list, WORD_LIST *);
+ new_list = (WORD_LIST *)list_append (expanded, new_list);
+ }
+
+ if (orig_list)
+ dispose_words (orig_list);
+
+ if (new_list)
+ new_list = REVERSE_LIST (new_list, WORD_LIST *);
+
+ return (new_list);
+}
+
+/* The workhorse for expand_words () and expand_words_no_vars ().
+ First arg is LIST, a WORD_LIST of words.
+ Second arg EFLAGS is a flags word controlling which expansions are
+ performed.
+
+ This does all of the substitutions: brace expansion, tilde expansion,
+ parameter expansion, command substitution, arithmetic expansion,
+ process substitution, word splitting, and pathname expansion, according
+ to the bits set in EFLAGS. Words with the W_QUOTED or W_NOSPLIT bits
+ set, or for which no expansion is done, do not undergo word splitting.
+ Words with the W_NOGLOB bit set do not undergo pathname expansion; words
+ with W_NOBRACE set do not undergo brace expansion (see
+ brace_expand_word_list above). */
+static WORD_LIST *
+expand_word_list_internal (list, eflags)
+ WORD_LIST *list;
+ int eflags;
+{
+ WORD_LIST *new_list, *temp_list;
+ int tint;
+
+ tempenv_assign_error = 0;
+ if (list == 0)
+ return ((WORD_LIST *)NULL);
+
+ garglist = new_list = copy_word_list (list);
+ if (eflags & WEXP_VARASSIGN)
+ {
+ garglist = new_list = separate_out_assignments (new_list);
+ if (new_list == 0)
+ {
+ if (subst_assign_varlist)
+ {
+ /* All the words were variable assignments, so they are placed
+ into the shell's environment. */
+ for (temp_list = subst_assign_varlist; temp_list; temp_list = temp_list->next)
+ {
+ this_command_name = (char *)NULL; /* no arithmetic errors */
+ tint = do_word_assignment (temp_list->word, 0);
+ /* Variable assignment errors in non-interactive shells
+ running in Posix.2 mode cause the shell to exit. */
+ if (tint == 0)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ if (interactive_shell == 0 && posixly_correct)
+ exp_jump_to_top_level (FORCE_EOF);
+ else
+ exp_jump_to_top_level (DISCARD);
+ }
+ }
+ dispose_words (subst_assign_varlist);
+ subst_assign_varlist = (WORD_LIST *)NULL;
+ }
+ return ((WORD_LIST *)NULL);
+ }
+ }
+
+ /* Begin expanding the words that remain. The expansions take place on
+ things that aren't really variable assignments. */
+
+#if defined (BRACE_EXPANSION)
+ /* Do brace expansion on this word if there are any brace characters
+ in the string. */
+ if ((eflags & WEXP_BRACEEXP) && brace_expansion && new_list)
+ new_list = brace_expand_word_list (new_list, eflags);
+#endif /* BRACE_EXPANSION */
+
+ /* Perform the `normal' shell expansions: tilde expansion, parameter and
+ variable substitution, command substitution, arithmetic expansion,
+ and word splitting. */
+ new_list = shell_expand_word_list (new_list, eflags);
+
+ /* Okay, we're almost done. Now let's just do some filename
+ globbing. */
+ if (new_list)
+ {
+ if ((eflags & WEXP_PATHEXP) && disallow_filename_globbing == 0)
+ /* Glob expand the word list unless globbing has been disabled. */
+ new_list = glob_expand_word_list (new_list, eflags);
+ else
+ /* Dequote the words, because we're not performing globbing. */
+ new_list = dequote_list (new_list);
+ }
+
+ if ((eflags & WEXP_VARASSIGN) && subst_assign_varlist)
+ {
+ sh_wassign_func_t *assign_func;
+ int is_special_builtin, is_builtin_or_func;
+
+ /* If the remainder of the words expand to nothing, Posix.2 requires
+ that the variable and environment assignments affect the shell's
+ environment. */
+ assign_func = new_list ? assign_in_env : do_word_assignment;
+ tempenv_assign_error = 0;
+
+ is_builtin_or_func = (new_list && new_list->word && (find_shell_builtin (new_list->word->word) || find_function (new_list->word->word)));
+ /* Posix says that special builtins exit if a variable assignment error
+ occurs in an assignment preceding it. */
+ is_special_builtin = (posixly_correct && new_list && new_list->word && find_special_builtin (new_list->word->word));
+
+ for (temp_list = subst_assign_varlist; temp_list; temp_list = temp_list->next)
+ {
+ this_command_name = (char *)NULL;
+ assigning_in_environment = (assign_func == assign_in_env);
+ tint = (*assign_func) (temp_list->word, is_builtin_or_func);
+ assigning_in_environment = 0;
+ /* Variable assignment errors in non-interactive shells running
+ in Posix.2 mode cause the shell to exit. */
+ if (tint == 0)
+ {
+ if (assign_func == do_word_assignment)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ if (interactive_shell == 0 && posixly_correct && is_special_builtin)
+ exp_jump_to_top_level (FORCE_EOF);
+ else
+ exp_jump_to_top_level (DISCARD);
+ }
+ else
+ tempenv_assign_error++;
+ }
+ }
+
+ dispose_words (subst_assign_varlist);
+ subst_assign_varlist = (WORD_LIST *)NULL;
+ }
+
+ return (new_list);
+}