extend assoc_expand_once to indexed arrays; rename to array_expand_once, keeping old name as a synonym; udpate shopt documentation

This commit is contained in:
Chet Ramey
2023-06-13 11:44:33 -04:00
parent d44a45afbc
commit 76112093ec
35 changed files with 1389 additions and 1157 deletions
+45
View File
@@ -6569,3 +6569,48 @@ shell.c
the shell decides it's being run by ssh and runs bashrc (only if
SSH_SOURCE_BASHRC is defined). Non-zero while the startup files
are being run. Not used by any other part of the shell yet.
6/12
----
arrayfunc.h
- new inline functions to convert between assignment flags (ASS_*),
array value flags (AV_*), and valid array flags (VA_*)
shell.h
- include arrayfunc.h after subst.h and variables.h so all the values
for the new inline functions are available
variables.c
- bind_int_variable: use convert_assign_flags_to_validarray_flags and
convert_assign_flags_to_arrayval flags instead of inline assignments
builtins/common.c
- builtin_bind_variable: use convert_assign_flags_to_validarray_flags
instead of inline assignments
arrayfunc.c
- assign_array_element: use convert_assign_flags_to_arrayval_flags
instead of inline code
- assign_array_element_internal: use convert_assign_flags_to_arrayval_flags
to pass the right values to array_expand_index
- assign_array_var_from_string: since expand_compound_array_assignment
performs one round of expansion on the subscripts, make sure to add
ASS_NOEXPAND (if assoc_expand_once is set) and ASS_ALLOWALLSUB to the
flags we pass to assign_compound_array_list
- unbind_array_index: use convert_validarray_flags_to_array_value_flags
to pass the right values to array_expand_index
- array_expand_index: uncomment code tagged for bash-5.3 that checks
AV_NOEXPAND and suppresses call to expand_arith_string if it's set.
This set of changes extends assoc_expand_once to indexed arrays
arrayfunc.[ch],execute_cmd.c,expr.c,test.c,builtins/common.c,builtins/mkbuiltins.c
builtins/declare.def,builtins/set.def,builtins/shopt.def
- array_expand_once: new name for internal assoc_expand_once variable
6/13
----
builtins/shopt.def
- array_expand_once: new option, replaces assoc_expand_once
doc/bash.1,doc/bashref.texi
- array_expand_once: document new shopt option
+1
View File
@@ -948,6 +948,7 @@ tests/array28.sub f
tests/array29.sub f
tests/array30.sub f
tests/array31.sub f
tests/array32.sub f
tests/array-at-star f
tests/array2.right f
tests/assoc.tests f
+38 -18
View File
@@ -45,11 +45,8 @@
# define RBRACK ']'
#endif
/* This variable means to not expand associative array subscripts more than
once, when performing variable expansion. */
int assoc_expand_once = 0;
/* Ditto for indexed array subscripts -- currently unused */
/* This variable means to not expand associative or indexed array subscripts
more than once, when performing variable expansion. */
int array_expand_once = 0;
static SHELL_VAR *bind_array_var_internal (SHELL_VAR *, arrayind_t, char *, const char *, int);
@@ -317,11 +314,7 @@ assign_array_element (const char *name, const char *value, int flags, array_elts
int sublen, isassoc, avflags;
SHELL_VAR *entry;
avflags = 0;
if (flags & ASS_NOEXPAND)
avflags |= AV_NOEXPAND;
if (flags & ASS_ONEWORD)
avflags |= AV_ONEWORD;
avflags = convert_assign_flags_to_arrayval_flags (flags);
vname = array_variable_name (name, avflags, &sub, &sublen);
if (vname == 0)
@@ -358,6 +351,10 @@ assign_array_element (const char *name, const char *value, int flags, array_elts
return entry;
}
/* Assign VALUE to the index computed from SUB of length SUBLEN of array
VNAME. NAME is the complete variable reference. FLAGS are ASS_ assignment
flags. ENTRY is the SHELL_VAR corresponding to VNAME. The caller
initializes ESTATEP, and we set it to the values we compute. */
static SHELL_VAR *
assign_array_element_internal (SHELL_VAR *entry, const char *name, char *vname,
char *sub, int sublen, const char *value,
@@ -395,7 +392,11 @@ assign_array_element_internal (SHELL_VAR *entry, const char *name, char *vname,
}
else
{
ind = array_expand_index (entry, sub, sublen, 0);
/* convert ASS_ flags to AV_FLAGS here */
int avflags;
avflags = convert_assign_flags_to_arrayval_flags (flags);
ind = array_expand_index (entry, sub, sublen, avflags);
/* negative subscripts to indexed arrays count back from end */
if (entry && ind < 0)
ind = (array_p (entry) ? array_max_index (array_cell (entry)) : 0) + 1 + ind;
@@ -745,7 +746,11 @@ assign_compound_array_list (SHELL_VAR *var, WORD_LIST *nlist, int flags)
if (array_p (var))
{
ind = array_expand_index (var, w + 1, len, 0);
int avflags;
/* convert ASS_ FLAGS to AV_ flags here */
avflags = convert_assign_flags_to_arrayval_flags (flags);
ind = array_expand_index (var, w + 1, len, avflags);
/* negative subscripts to indexed arrays count back from end */
if (ind < 0)
ind = array_max_index (array_cell (var)) + 1 + ind;
@@ -829,17 +834,23 @@ assign_compound_array_list (SHELL_VAR *var, WORD_LIST *nlist, int flags)
}
/* Perform a compound array assignment: VAR->name=( VALUE ). The
VALUE has already had the parentheses stripped. */
VALUE has already had the parentheses stripped. FLAGS are ASS_
assignment flags. */
SHELL_VAR *
assign_array_var_from_string (SHELL_VAR *var, char *value, int flags)
{
WORD_LIST *nlist;
int aflags;
if (value == 0)
return var;
nlist = expand_compound_array_assignment (var, value, flags);
assign_compound_array_list (var, nlist, flags);
/* This is were we set ASS_NOEXPAND and ASS_ONEWORD if we need to, since
expand_compound_array_assignment performs word expansions. Honors
array_expand_once; allows @ and * as associative array keys. */
aflags = flags | (array_expand_once ? ASS_NOEXPAND : 0) | ASS_ALLOWALLSUB;
assign_compound_array_list (var, nlist, aflags);
if (nlist)
dispose_words (nlist);
@@ -1062,6 +1073,7 @@ unbind_array_element (SHELL_VAR *var, char *sub, int flags)
arrayind_t ind;
char *akey;
ARRAY_ELEMENT *ae;
int avflags;
/* Assume that the caller (unset_builtin) passes us a null-terminated SUB,
so we don't have to use VA_ONEWORD or parse the subscript again with
@@ -1118,7 +1130,9 @@ unbind_array_element (SHELL_VAR *var, char *sub, int flags)
}
/* Fall through for behavior 3 */
}
ind = array_expand_index (var, sub, strlen (sub) + 1, 0);
avflags = convert_validarray_flags_to_arrayval_flags (flags);
ind = array_expand_index (var, sub, strlen (sub) + 1, avflags);
/* negative subscripts to indexed arrays count back from end */
if (ind < 0)
ind = array_max_index (array_cell (var)) + 1 + ind;
@@ -1134,7 +1148,8 @@ unbind_array_element (SHELL_VAR *var, char *sub, int flags)
else /* array_p (var) == 0 && assoc_p (var) == 0 */
{
akey = this_command_name;
ind = array_expand_index (var, sub, strlen (sub) + 1, 0);
avflags = convert_validarray_flags_to_arrayval_flags (flags);
ind = array_expand_index (var, sub, strlen (sub) + 1, avflags);
this_command_name = akey;
if (ind == 0)
{
@@ -1265,7 +1280,8 @@ valid_array_reference (const char *name, int flags)
return tokenize_array_reference (name, flags, (char **)NULL);
}
/* Expand the array index beginning at S and extending LEN characters. */
/* Expand the array index beginning at S and extending LEN characters. FLAGS
are AV_ flags saying how to compute the array value. */
arrayind_t
array_expand_index (SHELL_VAR *var, const char *s, int len, int flags)
{
@@ -1276,8 +1292,12 @@ array_expand_index (SHELL_VAR *var, const char *s, int len, int flags)
exp = (char *)xmalloc (len);
strncpy (exp, s, len - 1);
exp[len - 1] = '\0';
#if 0 /* TAG: maybe bash-5.2 */
#if 1 /* TAG: bash-5.3 */
#if 0
if (shell_compatibility_level <= 52 || (flags & AV_NOEXPAND) == 0)
#else
if ((flags & AV_NOEXPAND) == 0)
#endif
t = expand_arith_string (exp, Q_DOUBLE_QUOTES|Q_ARITH|Q_ARRAYSUB); /* XXX - Q_ARRAYSUB for future use */
else
t = exp;
+56 -5
View File
@@ -48,11 +48,8 @@ typedef struct element_state
#if defined (ARRAY_VARS)
/* This variable means to not expand associative array subscripts more than
once, when performing variable expansion. */
extern int assoc_expand_once;
/* The analog for indexed array subscripts */
/* This variable means to not expand associative or indexed array subscripts
more than once, when performing variable expansion. */
extern int array_expand_once;
/* Flags for array_value_internal and callers array_value/get_array_value; also
@@ -137,4 +134,58 @@ extern void flush_eltstate (array_eltstate_t *);
#endif
/* Functions to convert from other flag values to AV_ array variable flags */
#if defined (ASS_NOEXPAND)
static inline int
convert_assign_flags_to_arrayval_flags (int aflags)
{
int avflags;
avflags = 0;
if (aflags & ASS_NOEXPAND)
avflags |= AV_NOEXPAND;
if (aflags & ASS_ONEWORD)
avflags |= AV_ONEWORD;
if (aflags & ASS_NOEVAL)
avflags |= AV_NOEXPAND;
if (aflags & ASS_ALLOWALLSUB)
avflags |= AV_ATSTARKEYS;
return avflags;
}
#endif
#if defined (VA_NOEXPAND)
static inline int
convert_validarray_flags_to_arrayval_flags (int vflags)
{
int avflags;
if (vflags & VA_NOEXPAND)
avflags |= AV_NOEXPAND;
if (vflags & VA_ONEWORD)
avflags |= AV_ONEWORD;
if (vflags & VA_ALLOWALL)
avflags |= AV_ATSTARKEYS;
return avflags;
}
#endif
#if defined (ASS_NOEXPAND)
static inline int
convert_assign_flags_to_validarray_flags (int flags)
{
int vflags;
vflags = 0;
if (flags & ASS_NOEXPAND)
vflags |= VA_NOEXPAND;
if (flags & ASS_ONEWORD)
vflags |= VA_ONEWORD;
if (flags & ASS_ALLOWALLSUB)
vflags |= VA_ALLOWALL;
return vflags;
}
#endif
#endif /* !_ARRAYFUNC_H_ */
+10 -11
View File
@@ -932,12 +932,11 @@ builtin_bind_variable (char *name, char *value, int flags)
#if defined (ARRAY_VARS)
/* Callers are responsible for calling this with array references that have
already undergone valid_array_reference checks (read, printf). */
vflags = assoc_expand_once ? (VA_NOEXPAND|VA_ONEWORD) : 0;
bindflags = flags | (assoc_expand_once ? ASS_NOEXPAND : 0) | ASS_ALLOWALLSUB;
if (flags & ASS_NOEXPAND)
vflags |= VA_NOEXPAND;
if (flags & ASS_ONEWORD)
vflags |= VA_ONEWORD;
/* XXX - should we unconditionally set ASS_NOEXPAND if the shell
compatibility level is > 52? */
bindflags = flags | (array_expand_once ? ASS_NOEXPAND : 0) | ASS_ALLOWALLSUB;
vflags = convert_assign_flags_to_validarray_flags (flags);
vflags |= array_expand_once ? (VA_NOEXPAND|VA_ONEWORD) : 0;
if (valid_array_reference (name, vflags) == 0)
v = bind_variable (name, value, flags);
@@ -1022,7 +1021,7 @@ builtin_arrayref_flags (WORD_DESC *w, int baseflags)
vflags = baseflags;
/* Don't require assoc_expand_once if we have an argument that's already
/* Don't require array_expand_once if we have an argument that's already
passed through valid_array_reference and been expanded once. That
doesn't protect it from normal expansions like word splitting, so
proper quoting is still required. */
@@ -1031,7 +1030,7 @@ builtin_arrayref_flags (WORD_DESC *w, int baseflags)
# if 0
/* This is a little sketchier but handles quoted arguments. */
if (assoc_expand_once && (t = strchr (w->word, '[')) && t[strlen(t) - 1] == ']')
if (array_expand_once && (t = strchr (w->word, '[')) && t[strlen(t) - 1] == ']')
vflags |= VA_ONEWORD|VA_NOEXPAND;
# endif
@@ -1050,12 +1049,12 @@ set_expand_once (int nval, int uwp)
{
int oa;
oa = assoc_expand_once;
oa = array_expand_once;
if (shell_compatibility_level > 51) /* XXX - internal */
{
if (uwp)
unwind_protect_int (assoc_expand_once);
assoc_expand_once = nval;
unwind_protect_int (array_expand_once);
array_expand_once = nval;
}
return oa;
}
+3 -3
View File
@@ -275,9 +275,9 @@ extern int wait_intr_flag;
#if defined (ARRAY_VARS)
#define SET_VFLAGS(wordflags, vflags, bindflags) \
do { \
vflags = assoc_expand_once ? VA_NOEXPAND : 0; \
bindflags = assoc_expand_once ? ASS_NOEXPAND : 0; \
if (assoc_expand_once && (wordflags & W_ARRAYREF)) \
vflags = array_expand_once ? VA_NOEXPAND : 0; \
bindflags = array_expand_once ? ASS_NOEXPAND : 0; \
if (array_expand_once && (wordflags & W_ARRAYREF)) \
vflags |= VA_ONEWORD|VA_NOEXPAND; \
if (vflags & VA_NOEXPAND) \
bindflags |= ASS_NOEXPAND; \
+1 -1
View File
@@ -393,7 +393,7 @@ declare_internal (WORD_LIST *list, int local_var)
name = savestring (list->word->word);
wflags = list->word->flags;
#if defined (ARRAY_VARS)
assoc_noexpand = assoc_expand_once && (wflags & W_ASSIGNMENT);
assoc_noexpand = array_expand_once && (wflags & W_ASSIGNMENT);
#else
assoc_noexpand = 0;
#endif
+1 -1
View File
@@ -178,7 +178,7 @@ char *posix_builtins[] =
};
/* The builtin commands that can take array references as arguments and pay
attention to `assoc_expand_once'. These are the ones that don't assign
attention to `array_expand_once'. These are the ones that don't assign
values, but need to avoid double expansions. */
char *arrayvar_builtins[] =
{
+1 -1
View File
@@ -866,7 +866,7 @@ unset_builtin (WORD_LIST *list)
nameref = 0;
#if defined (ARRAY_VARS)
base_vflags = assoc_expand_once ? VA_NOEXPAND : 0;
base_vflags = array_expand_once ? VA_NOEXPAND : 0;
#endif
while (list)
+6 -6
View File
@@ -122,7 +122,6 @@ extern int debugging_mode;
#endif
#if defined (ARRAY_VARS)
extern int assoc_expand_once;
extern int array_expand_once;
int expand_once_flag;
#endif
@@ -146,7 +145,7 @@ static int shopt_set_complete_direxpand (char *, int);
#endif
#if defined (ARRAY_VARS)
static int set_assoc_expand (char *, int);
static int set_array_expand (char *, int);
#endif
#if defined (EXTENDED_GLOB)
@@ -180,7 +179,8 @@ static struct {
} shopt_vars[] = {
{ "autocd", &autocd, (shopt_set_func_t *)NULL },
#if defined (ARRAY_VARS)
{ "assoc_expand_once", &expand_once_flag, set_assoc_expand },
{ "array_expand_once", &expand_once_flag, set_array_expand },
{ "assoc_expand_once", &expand_once_flag, set_array_expand },
#endif
{ "cdable_vars", &cdable_vars, (shopt_set_func_t *)NULL },
{ "cdspell", &cdspelling, (shopt_set_func_t *)NULL },
@@ -386,7 +386,7 @@ reset_shopt_options (void)
glob_always_skip_dot_and_dotdot = 1; /* new default as of bash-5.2 */
#if defined (ARRAY_VARS)
expand_once_flag = assoc_expand_once = 0;
expand_once_flag = array_expand_once = 0;
#endif
#if defined (HISTORY)
@@ -914,12 +914,12 @@ initialize_bashopts (int no_bashopts)
#if defined (ARRAY_VARS)
static int
set_assoc_expand (char *option_name, int mode)
set_array_expand (char *option_name, int mode)
{
#if 0 /* leave this disabled */
if (shell_compatibility_level <= 51)
#endif
assoc_expand_once = expand_once_flag;
array_expand_once = expand_once_flag;
return 0;
}
#endif
+8 -6
View File
@@ -5901,12 +5901,14 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
The list of sshhoopptt options is:
aassssoocc__eexxppaanndd__oonnccee
aarrrraayy__eexxppaanndd__oonnccee
If set, the shell suppresses multiple evaluation of as-
sociative array subscripts during arithmetic expression
evaluation, while executing builtins that can perform
variable assignments, and while executing builtins that
perform array dereferencing.
sociative and indexed array subscripts during arithmetic
expression evaluation, while executing builtins that can
perform variable assignments, and while executing
builtins that perform array dereferencing.
aassssoocc__eexxppaanndd__oonnccee
Deprecated; a synonym for aarrrraayy__eexxppaanndd__oonnccee.
aauuttooccdd If set, a command name that is the name of a directory
is executed as if it were the argument to the ccdd com-
mand. This option is only used by interactive shells.
@@ -6778,4 +6780,4 @@ BBUUGGSS
GNU Bash 5.2 2023 May 23 BASH(1)
GNU Bash 5.2 2023 June 13 BASH(1)
+9 -5
View File
@@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
.\" Last Change: Tue May 23 11:29:30 EDT 2023
.\" Last Change: Tue Jun 13 10:33:46 EDT 2023
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2023 May 23" "GNU Bash 5.2"
.TH BASH 1 "2023 June 13" "GNU Bash 5.2"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -10385,12 +10385,16 @@ The list of \fBshopt\fP options is:
.if n .sp 1v
.PD 0
.TP 8
.B assoc_expand_once
If set, the shell suppresses multiple evaluation of associative array
subscripts during arithmetic expression evaluation, while executing
.B array_expand_once
If set, the shell suppresses multiple evaluation of
associative and indexed array subscripts
during arithmetic expression evaluation, while executing
builtins that can perform variable assignments,
and while executing builtins that perform array dereferencing.
.TP 8
.B assoc_expand_once
Deprecated; a synonym for \fBarray_expand_once\fP.
.TP 8
.B autocd
If set, a command name that is the name of a directory is executed as if
it were the argument to the \fBcd\fP command.
+13 -8
View File
@@ -3,7 +3,7 @@
</HEAD>
<BODY><TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2023 May 23<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2023 June 13<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<BR><A HREF="#index">Index</A>
@@ -13061,13 +13061,18 @@ The list of <B>shopt</B> options is:
<DL COMPACT>
<DT><B>array_expand_once</B>
<DD>
If set, the shell suppresses multiple evaluation of
associative and indexed array subscripts
during arithmetic expression evaluation, while executing
builtins that can perform variable assignments,
and while executing builtins that perform array dereferencing.
<DT><B>assoc_expand_once</B>
<DD>
If set, the shell suppresses multiple evaluation of associative array
subscripts during arithmetic expression evaluation, while executing
builtins that can perform variable assignments,
and while executing builtins that perform array dereferencing.
Deprecated; a synonym for <B>array_expand_once</B>.
<DT><B>autocd</B>
<DD>
@@ -14999,7 +15004,7 @@ There may be only one active coprocess at a time.
<HR>
<TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>GNU Bash 5.2<TH ALIGN=CENTER width=33%>2023 May 23<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>GNU Bash 5.2<TH ALIGN=CENTER width=33%>2023 June 13<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<HR>
@@ -15105,7 +15110,7 @@ There may be only one active coprocess at a time.
<DT><A HREF="#lbDI">BUGS</A><DD>
</DL>
<HR>
This document was created by man2html from /usr/local/src/bash/bash-20230522/doc/bash.1.<BR>
Time: 23 May 2023 11:31:51 EDT
This document was created by man2html from /usr/local/src/bash/bash-20230612/doc/bash.1.<BR>
Time: 13 June 2023 10:42:12 EDT
</BODY>
</HTML>
+144 -141
View File
@@ -1,9 +1,9 @@
This is bash.info, produced by makeinfo version 6.8 from bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.2, 23 May 2023).
Bash shell (version 5.2, 13 June 2023).
This is Edition 5.2, last updated 23 May 2023, of 'The GNU Bash
This is Edition 5.2, last updated 13 June 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Copyright (C) 1988-2023 Free Software Foundation, Inc.
@@ -26,10 +26,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
Bash shell (version 5.2, 23 May 2023). The Bash home page is
Bash shell (version 5.2, 13 June 2023). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.2, last updated 23 May 2023, of 'The GNU Bash
This is Edition 5.2, last updated 13 June 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Bash contains features that appear in other popular shells, and some
@@ -4846,12 +4846,15 @@ This builtin allows you to change additional shell optional behavior.
The list of 'shopt' options is:
'assoc_expand_once'
'array_expand_once'
If set, the shell suppresses multiple evaluation of
associative array subscripts during arithmetic expression
evaluation, while executing builtins that can perform variable
assignments, and while executing builtins that perform array
dereferencing.
associative and indexed array subscripts during arithmetic
expression evaluation, while executing builtins that can
perform variable assignments, and while executing builtins
that perform array dereferencing.
'assoc_expand_once'
Deprecated; a synonym for 'array_expand_once'.
'autocd'
If set, a command name that is the name of a directory is
@@ -12767,138 +12770,138 @@ D.5 Concept Index

Tag Table:
Node: Top884
Node: Introduction2791
Node: What is Bash?3004
Node: What is a shell?4115
Node: Definitions6650
Node: Basic Shell Features9598
Node: Shell Syntax10814
Node: Shell Operation11837
Node: Quoting13127
Node: Escape Character14428
Node: Single Quotes14910
Node: Double Quotes15255
Node: ANSI-C Quoting16530
Node: Locale Translation17839
Node: Creating Internationalized Scripts19147
Node: Comments23261
Node: Shell Commands23876
Node: Reserved Words24811
Node: Simple Commands25564
Node: Pipelines26215
Node: Lists29211
Node: Compound Commands31003
Node: Looping Constructs32012
Node: Conditional Constructs34504
Node: Command Grouping48989
Node: Coprocesses50464
Node: GNU Parallel53124
Node: Shell Functions54038
Node: Shell Parameters61920
Node: Positional Parameters66305
Node: Special Parameters67204
Node: Shell Expansions70415
Node: Brace Expansion72539
Node: Tilde Expansion75270
Node: Shell Parameter Expansion77888
Node: Command Substitution96287
Node: Arithmetic Expansion99748
Node: Process Substitution100713
Node: Word Splitting101830
Node: Filename Expansion103875
Node: Pattern Matching106805
Node: Quote Removal111804
Node: Redirections112096
Node: Executing Commands121786
Node: Simple Command Expansion122453
Node: Command Search and Execution124560
Node: Command Execution Environment126944
Node: Environment129976
Node: Exit Status131636
Node: Signals133417
Node: Shell Scripts136863
Node: Shell Builtin Commands139887
Node: Bourne Shell Builtins141922
Node: Bash Builtins164253
Node: Modifying Shell Behavior196249
Node: The Set Builtin196591
Node: The Shopt Builtin207186
Node: Special Builtins223095
Node: Shell Variables224071
Node: Bourne Shell Variables224505
Node: Bash Variables226606
Node: Bash Features260668
Node: Invoking Bash261678
Node: Bash Startup Files267688
Node: Interactive Shells272816
Node: What is an Interactive Shell?273224
Node: Is this Shell Interactive?273870
Node: Interactive Shell Behavior274682
Node: Bash Conditional Expressions278308
Node: Shell Arithmetic282947
Node: Aliases285905
Node: Arrays288796
Node: The Directory Stack295356
Node: Directory Stack Builtins296137
Node: Controlling the Prompt300394
Node: The Restricted Shell303356
Node: Bash POSIX Mode305963
Node: Shell Compatibility Mode321753
Node: Job Control329994
Node: Job Control Basics330451
Node: Job Control Builtins335450
Node: Job Control Variables341242
Node: Command Line Editing342395
Node: Introduction and Notation344063
Node: Readline Interaction345683
Node: Readline Bare Essentials346871
Node: Readline Movement Commands348657
Node: Readline Killing Commands349614
Node: Readline Arguments351532
Node: Searching352573
Node: Readline Init File354756
Node: Readline Init File Syntax356014
Node: Conditional Init Constructs379802
Node: Sample Init File383995
Node: Bindable Readline Commands387116
Node: Commands For Moving388317
Node: Commands For History390365
Node: Commands For Text395356
Node: Commands For Killing399002
Node: Numeric Arguments402032
Node: Commands For Completion403168
Node: Keyboard Macros407356
Node: Miscellaneous Commands408041
Node: Readline vi Mode414076
Node: Programmable Completion414980
Node: Programmable Completion Builtins422757
Node: A Programmable Completion Example433742
Node: Using History Interactively438987
Node: Bash History Facilities439668
Node: Bash History Builtins442670
Node: History Interaction447691
Node: Event Designators451308
Node: Word Designators452659
Node: Modifiers454416
Node: Installing Bash456221
Node: Basic Installation457355
Node: Compilers and Options461074
Node: Compiling For Multiple Architectures461812
Node: Installation Names463501
Node: Specifying the System Type465607
Node: Sharing Defaults466321
Node: Operation Controls466991
Node: Optional Features467946
Node: Reporting Bugs479162
Node: Major Differences From The Bourne Shell480493
Node: GNU Free Documentation License497339
Node: Indexes522513
Node: Builtin Index522964
Node: Reserved Word Index530062
Node: Variable Index532507
Node: Function Index549492
Node: Concept Index563273
Node: Top886
Node: Introduction2795
Node: What is Bash?3008
Node: What is a shell?4119
Node: Definitions6654
Node: Basic Shell Features9602
Node: Shell Syntax10818
Node: Shell Operation11841
Node: Quoting13131
Node: Escape Character14432
Node: Single Quotes14914
Node: Double Quotes15259
Node: ANSI-C Quoting16534
Node: Locale Translation17843
Node: Creating Internationalized Scripts19151
Node: Comments23265
Node: Shell Commands23880
Node: Reserved Words24815
Node: Simple Commands25568
Node: Pipelines26219
Node: Lists29215
Node: Compound Commands31007
Node: Looping Constructs32016
Node: Conditional Constructs34508
Node: Command Grouping48993
Node: Coprocesses50468
Node: GNU Parallel53128
Node: Shell Functions54042
Node: Shell Parameters61924
Node: Positional Parameters66309
Node: Special Parameters67208
Node: Shell Expansions70419
Node: Brace Expansion72543
Node: Tilde Expansion75274
Node: Shell Parameter Expansion77892
Node: Command Substitution96291
Node: Arithmetic Expansion99752
Node: Process Substitution100717
Node: Word Splitting101834
Node: Filename Expansion103879
Node: Pattern Matching106809
Node: Quote Removal111808
Node: Redirections112100
Node: Executing Commands121790
Node: Simple Command Expansion122457
Node: Command Search and Execution124564
Node: Command Execution Environment126948
Node: Environment129980
Node: Exit Status131640
Node: Signals133421
Node: Shell Scripts136867
Node: Shell Builtin Commands139891
Node: Bourne Shell Builtins141926
Node: Bash Builtins164257
Node: Modifying Shell Behavior196253
Node: The Set Builtin196595
Node: The Shopt Builtin207190
Node: Special Builtins223194
Node: Shell Variables224170
Node: Bourne Shell Variables224604
Node: Bash Variables226705
Node: Bash Features260767
Node: Invoking Bash261777
Node: Bash Startup Files267787
Node: Interactive Shells272915
Node: What is an Interactive Shell?273323
Node: Is this Shell Interactive?273969
Node: Interactive Shell Behavior274781
Node: Bash Conditional Expressions278407
Node: Shell Arithmetic283046
Node: Aliases286004
Node: Arrays288895
Node: The Directory Stack295455
Node: Directory Stack Builtins296236
Node: Controlling the Prompt300493
Node: The Restricted Shell303455
Node: Bash POSIX Mode306062
Node: Shell Compatibility Mode321852
Node: Job Control330093
Node: Job Control Basics330550
Node: Job Control Builtins335549
Node: Job Control Variables341341
Node: Command Line Editing342494
Node: Introduction and Notation344162
Node: Readline Interaction345782
Node: Readline Bare Essentials346970
Node: Readline Movement Commands348756
Node: Readline Killing Commands349713
Node: Readline Arguments351631
Node: Searching352672
Node: Readline Init File354855
Node: Readline Init File Syntax356113
Node: Conditional Init Constructs379901
Node: Sample Init File384094
Node: Bindable Readline Commands387215
Node: Commands For Moving388416
Node: Commands For History390464
Node: Commands For Text395455
Node: Commands For Killing399101
Node: Numeric Arguments402131
Node: Commands For Completion403267
Node: Keyboard Macros407455
Node: Miscellaneous Commands408140
Node: Readline vi Mode414175
Node: Programmable Completion415079
Node: Programmable Completion Builtins422856
Node: A Programmable Completion Example433841
Node: Using History Interactively439086
Node: Bash History Facilities439767
Node: Bash History Builtins442769
Node: History Interaction447790
Node: Event Designators451407
Node: Word Designators452758
Node: Modifiers454515
Node: Installing Bash456320
Node: Basic Installation457454
Node: Compilers and Options461173
Node: Compiling For Multiple Architectures461911
Node: Installation Names463600
Node: Specifying the System Type465706
Node: Sharing Defaults466420
Node: Operation Controls467090
Node: Optional Features468045
Node: Reporting Bugs479261
Node: Major Differences From The Bourne Shell480592
Node: GNU Free Documentation License497438
Node: Indexes522612
Node: Builtin Index523063
Node: Reserved Word Index530161
Node: Variable Index532606
Node: Function Index549591
Node: Concept Index563372

End Tag Table
BIN
View File
Binary file not shown.
+112 -109
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.22.4
%%CreationDate: Tue May 23 11:31:59 2023
%%CreationDate: Tue Jun 13 10:41:52 2023
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
@@ -340,7 +340,7 @@ F .475(xtended deb)-.15 F(ug-)-.2 E
(~/.bashr)3.598 E(c)-.37 E F0 1.598(if the)4.408 F(shell is interacti)
144 710.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 5.2)72 768 Q
(2023 May 23)148.175 E(1)202.335 E 0 Cg EP
(2023 June 13)148.175 E(1)202.335 E 0 Cg EP
%%Page: 2 2
%%BeginPageSetup
BP
@@ -463,8 +463,8 @@ F2(~/.bashr)108 691.2 Q(c)-.37 E F0 2.535(,i)C 2.535(ft)-2.535 G .035
Q F1(bash)5.306 E F0 2.806(is started non-interacti)5.306 F -.15(ve)-.25
G(ly).15 E 5.306(,t)-.65 G 5.306(or)-5.306 G 2.806
(un a shell script, for e)-5.306 F 2.805(xample, it looks for the v)-.15
F(ariable)-.25 E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(2)202.335 E
0 Cg EP
F(ariable)-.25 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(2)202.335
E 0 Cg EP
%%Page: 3 3
%%BeginPageSetup
BP
@@ -595,7 +595,7 @@ F2(case)3.144 E F0(or)3.144 E F2(select)3.143 E F0 .643(command \(only)
669.6 R F6(SHELL GRAMMAR)72 686.4 Q F0
(This section describes the syntax of the v)108 698.4 Q
(arious forms of shell commands.)-.25 E(GNU Bash 5.2)72 768 Q
(2023 May 23)148.175 E(3)202.335 E 0 Cg EP
(2023 June 13)148.175 E(3)202.335 E 0 Cg EP
%%Page: 4 4
%%BeginPageSetup
BP
@@ -718,7 +718,7 @@ or more pipelines separated by the)108 650.4 R F1(&&)2.671 E F0(and)
G(cuted if, and only if,).15 E F2(command1)2.7 E F0(returns an e)2.5 E
(xit status of zero \(success\).)-.15 E(An OR list has the form)108
712.8 Q F2(command1)144 729.6 Q F1(||)2.5 E F2(command2)2.5 E F0
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(4)202.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(4)202.335 E 0 Cg EP
%%Page: 5 5
%%BeginPageSetup
BP
@@ -854,7 +854,7 @@ ormal quoting and pattern characters lose their meanings between brack)
.583(with inde)144 720 R 3.083(x0)-.15 G .582
(contains the portion of the string matching the entire re)-.001 F .582
(gular e)-.15 F 3.082(xpression. Substrings)-.15 F(GNU Bash 5.2)72 768 Q
(2023 May 23)148.175 E(5)202.335 E 0 Cg EP
(2023 June 13)148.175 E(5)202.335 E 0 Cg EP
%%Page: 6 6
%%BeginPageSetup
BP
@@ -998,7 +998,7 @@ F0 .254(in place of)2.754 F F3(;;)2.754 E F0 .254(causes e)2.754 F -.15
(Using)144 720 Q F3(;;&)3.378 E F0 .878(in place of)3.378 F F3(;;)3.378
E F0 .878(causes the shell to test the ne)3.378 F .878
(xt pattern list in the statement, if an)-.15 F 2.178 -.65(y, a)-.15 H
(nd).65 E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(6)202.335 E 0 Cg
(nd).65 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(6)202.335 E 0 Cg
EP
%%Page: 7 7
%%BeginPageSetup
@@ -1124,7 +1124,7 @@ Q F0 2.698(As)108 691.2 S .198
(cutes a compound command with).15 F 2.5(an)108 703.2 S .5 -.25(ew s)
-2.5 H(et of positional parameters.).25 E
(Shell functions are declared as follo)5 E(ws:)-.25 E(GNU Bash 5.2)72
768 Q(2023 May 23)148.175 E(7)202.335 E 0 Cg EP
768 Q(2023 June 13)148.175 E(7)202.335 E 0 Cg EP
%%Page: 8 8
%%BeginPageSetup
BP
@@ -1257,7 +1257,7 @@ E F2(@)2.5 E F0(ha)2.5 E .3 -.15(ve s)-.2 H
(replaced as speci\214ed by the ANSI C standard.)3.027 F
(Backslash escape sequences, if present, are decoded as follo)108 684 Q
(ws:)-.25 E F2(\\a)144 696 Q F0(alert \(bell\))180 696 Q F2(\\b)144 708
Q F0(backspace)180 708 Q(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(8)
Q F0(backspace)180 708 Q(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(8)
202.335 E 0 Cg EP
%%Page: 9 9
%%BeginPageSetup
@@ -1373,7 +1373,7 @@ F0 2.664(commands\). When)2.664 F .164(+= is)2.664 F .132
(sion and added to the v)108 722.4 R(ariable')-.25 E 3.726(sc)-.55 G
1.227(urrent v)-3.726 F 1.227(alue, which is also e)-.25 F -.25(va)-.25
G 3.727(luated. When).25 F 1.227(+= is applied to an array)3.727 F
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(9)202.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(9)202.335 E 0 Cg EP
%%Page: 10 10
%%BeginPageSetup
BP
@@ -1515,7 +1515,7 @@ E(ground pipeline.)-.15 E F1<ad>108 703.2 Q F0 .882
R -.2(vo)-.4 G .881(cation, by the).2 F F1(set)3.381 E F0 -.2(bu)3.381 G
.881(iltin command, or).2 F(those set by the shell itself \(such as the)
144 715.2 Q F1<ad69>2.5 E F0(option\).)2.5 E(GNU Bash 5.2)72 768 Q
(2023 May 23)148.175 E(10)197.335 E 0 Cg EP
(2023 June 13)148.175 E(10)197.335 E 0 Cg EP
%%Page: 11 11
%%BeginPageSetup
BP
@@ -1643,7 +1643,7 @@ F F1($0)2.751 E F0 2.751(;s)C(ee)-2.751 E .041
(f)-5.216 E F1 -.3(BA)2.716 G(SH_ARGV0).3 E F0 .216
(is unset, it loses its special properties, e)2.716 F -.15(ve)-.25 G
2.716(ni).15 G(f)-2.716 E(it is subsequently reset.)144 705.6 Q
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(11)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(11)197.335 E 0 Cg EP
%%Page: 12 12
%%BeginPageSetup
BP
@@ -1748,7 +1748,7 @@ H(he current completion function.).1 E F1(COMP_LINE)108 690 Q F0 1.208
(yt)-3.537 G 1.037(he programmable completion f)-3.537 F 1.037
(acilities \(see)-.1 F F1(Pr)3.537 E 1.037(ogrammable Completion)-.18 F
F0(be-)3.537 E(lo)144 726 Q(w\).)-.25 E(GNU Bash 5.2)72 768 Q
(2023 May 23)148.175 E(12)197.335 E 0 Cg EP
(2023 June 13)148.175 E(12)197.335 E 0 Cg EP
%%Page: 13 13
%%BeginPageSetup
BP
@@ -1871,8 +1871,8 @@ F1(]})A F0 -.1(wa)2.512 G 2.512(sc).1 G .012(alled from the \214le)
(at line number)144 702 R F1(${B)3.684 E(ASH_LINENO[)-.3 E F2($i)A F1
(]})A F0 6.184(.T)C(he)-6.184 E F1(caller)3.683 E F0 -.2(bu)3.683 G
1.183(iltin displays the current call stack using).2 F
(this information.)144 714 Q(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E
(13)197.335 E 0 Cg EP
(this information.)144 714 Q(GNU Bash 5.2)72 768 Q(2023 June 13)148.175
E(13)197.335 E 0 Cg EP
%%Page: 14 14
%%BeginPageSetup
BP
@@ -1966,7 +1966,7 @@ F0 1.547(line b)4.047 F(uf)-.2 E(fer)-.25 E 4.047(,f)-.4 G 1.547
3.517 F(UIL)-.09 E 1.017(TIN COMMANDS)-.828 F F0(belo)3.267 E 3.516
(w\). The)-.25 F 1.016(characters between the insertion point and the)
3.516 F(mark are often called the)144 720 Q F3 -.37(re)2.5 G(gion)-.03 E
F0(.)A(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(14)197.335 E 0 Cg EP
F0(.)A(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(14)197.335 E 0 Cg EP
%%Page: 15 15
%%BeginPageSetup
BP
@@ -2089,8 +2089,8 @@ E F0 3.748(command. This)3.748 F 1.247
(is a colon-separated list of directories in which the)3.748 F 3.795
(shell looks for destination directories speci\214ed by the)144 729.6 R
F1(cd)6.295 E F0 6.296(command. A)6.296 F 3.796(sample v)6.296 F 3.796
(alue is)-.25 F(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(15)197.335 E
0 Cg EP
(alue is)-.25 F(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(15)197.335
E 0 Cg EP
%%Page: 16 16
%%BeginPageSetup
BP
@@ -2205,7 +2205,7 @@ F F5(nosort)3.464 E F0(disables)3.464 E .497
F5(-)2.96 E F0 .46(sorts by name in descending order)2.96 F 5.46(.A)-.55
G .76 -.15(ny i)-5.46 H -1.95 -.4(nv a).15 H .46(lid v).4 F .46
(alue restores the historical sorting be-)-.25 F(ha)144 696 Q(vior)-.2 E
(.)-.55 E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(16)197.335 E 0 Cg
(.)-.55 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(16)197.335 E 0 Cg
EP
%%Page: 17 17
%%BeginPageSetup
@@ -2337,7 +2337,7 @@ F0 .503(Controls the action of an interacti)144 708 R .803 -.15(ve s)
144 720 R .426(alue is the number of consecuti)-.25 F -.15(ve)-.25 G F3
(EOF)3.076 E F0 .426
(characters which must be typed as the \214rst characters)2.676 F
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(17)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(17)197.335 E 0 Cg EP
%%Page: 18 18
%%BeginPageSetup
BP
@@ -2440,7 +2440,7 @@ ser mail \214les that it uses is system dependent \(e.g., /v)144 576 Q
-.1 F(administrator who installs)144 684 Q F1(bash)2.5 E F0 5(.A)C
(common v)-2.5 E(alue is)-.25 E/F5 10/Courier@0 SF
(/usr/local/bin:/usr/lo-)2.5 E(cal/sbin:/usr/bin:/usr/sbin:/bin:/sbin)
144 696 Q F0(.)A(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(18)197.335
144 696 Q F0(.)A(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(18)197.335
E 0 Cg EP
%%Page: 19 19
%%BeginPageSetup
@@ -2555,8 +2555,8 @@ G(iltin.).2 E(The)144 680.4 Q F1(select)2.81 E F0 .31
S 1.05(it for a line of input after issuing the primary prompt.).1 F F1
(Bash)6.05 E F0 1.05(terminates after w)3.55 F 1.05(aiting for that)-.1
F(number of seconds if a complete line of input does not arri)144 716.4
Q -.15(ve)-.25 G(.).15 E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(19)
197.335 E 0 Cg EP
Q -.15(ve)-.25 G(.).15 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E
(19)197.335 E 0 Cg EP
%%Page: 20 20
%%BeginPageSetup
BP
@@ -2704,7 +2704,7 @@ F 3.133(wt)-.25 G .633(he remaining w)-3.133 F .633(ords are inter)-.1 F
(syntax introduced abo)6.22 F -.15(ve)-.15 G 8.72(.W).15 G 3.72
(hen assigning to an inde)-8.72 F -.15(xe)-.15 G 6.22(da).15 G(rray)
-6.22 E 6.22(,i)-.65 G(f)-6.22 E F2(name)6.58 E F0(is)6.4 E
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(20)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(20)197.335 E 0 Cg EP
%%Page: 21 21
%%BeginPageSetup
BP
@@ -2858,8 +2858,8 @@ E(formed at the same time as tilde, parameter)108 688.8 Q 2.5(,v)-.4 G
-.15 F .003(ord are remo)-.1 F -.15(ve)-.15 G 2.503(du).15 G .003
(nless the)-2.503 F(y)-.15 E(ha)108 717.6 Q .3 -.15(ve b)-.2 H
(een quoted themselv).15 E(es \()-.15 E F1(quote r)A(emo)-.37 E(val)-.1
E F0(\).)A(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(21)197.335 E 0 Cg
EP
E F0(\).)A(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(21)197.335 E 0
Cg EP
%%Page: 22 22
%%BeginPageSetup
BP
@@ -2995,7 +2995,7 @@ with the speci\214ed login name.)108 679.2 Q .092
(tilde in the tilde-pre\214x consist of a number)108 720 R F2(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(GNU Bash 5.2)72
768 Q(2023 May 23)148.175 E(22)197.335 E 0 Cg EP
768 Q(2023 June 13)148.175 E(22)197.335 E 0 Cg EP
%%Page: 23 23
%%BeginPageSetup
BP
@@ -3122,7 +3122,7 @@ F F4(pa-)4.561 E -.15(ra)144 612 S(meter).15 E F0 5.741(.T).73 G .741
(alue)-.92 E F0 5.745(.I)C(f)-5.745 E F4(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 708 Q F4(wor)2.84 E(d)-.37 E F0
(is substituted.)3.27 E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(23)
(is substituted.)3.27 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(23)
197.335 E 0 Cg EP
%%Page: 24 24
%%BeginPageSetup
@@ -3254,7 +3254,7 @@ F0(belo)3.132 E 4.432 -.65(w. I)-.25 H 3.132(ft).65 G .632
(then the result of the e)144 727.2 R 1.151(xpansion is the e)-.15 F
1.151(xpanded v)-.15 F 1.151(alue of)-.25 F F1(par)4.901 E(ameter)-.15 E
F0 1.151(with the shortest matching)4.381 F(GNU Bash 5.2)72 768 Q
(2023 May 23)148.175 E(24)197.335 E 0 Cg EP
(2023 June 13)148.175 E(24)197.335 E 0 Cg EP
%%Page: 25 25
%%BeginPageSetup
BP
@@ -3386,7 +3386,7 @@ E F0(or)3.236 E F1(*)3.236 E F0 3.236(,t)C .736
2.847(,t)C .348(he substitution operation is applied to each member of \
the array in turn,)-2.847 F(and the e)144 681.6 Q
(xpansion is the resultant list.)-.15 E(${)108 698.4 Q F2(par)A(ameter)
-.15 E F1(^)A F2(pattern)A F0(})A(GNU Bash 5.2)72 768 Q(2023 May 23)
-.15 E F1(^)A F2(pattern)A F0(})A(GNU Bash 5.2)72 768 Q(2023 June 13)
148.175 E(25)197.335 E 0 Cg EP
%%Page: 26 26
%%BeginPageSetup
@@ -3503,7 +3503,7 @@ Q F2($\()144 679.2 Q F1(command)A F2(\))1.666 E F0(or \(deprecated\))108
F0 .089(performs the e)2.589 F .089(xpansion by e)-.15 F -.15(xe)-.15 G
(cuting).15 E F1(command)2.589 E F0 .088(in a subshell en)2.589 F .088
(vironment and replacing the command)-.4 F(GNU Bash 5.2)72 768 Q
(2023 May 23)148.175 E(26)197.335 E 0 Cg EP
(2023 June 13)148.175 E(26)197.335 E 0 Cg EP
%%Page: 27 27
%%BeginPageSetup
BP
@@ -3628,7 +3628,7 @@ F0 .56(form is used, writing to the \214le will pro)108 684 R .56
(method of naming open \214les.)2.5 E .897(When a)108 724.8 R -.25(va)
-.2 G .896(ilable, process substitution is performed simultaneously wit\
h parameter and v).25 F .896(ariable e)-.25 F(xpansion,)-.15 E
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(27)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(27)197.335 E 0 Cg EP
%%Page: 28 28
%%BeginPageSetup
BP
@@ -3780,7 +3780,7 @@ F1 -.63(``)3.684 G -.55(.').63 G(')-.08 E F0 3.684(,m)C(ak)-3.684 E(e)
(T)-.36 E F0 -.25(va)2.25 G(riable controls ho).25 E 2.5(wt)-.25 G
(he results of pathname e)-2.5 E(xpansion are sorted, as described abo)
-.15 E -.15(ve)-.15 G(.).15 E F1 -.1(Pa)108 720 S(tter).1 E 2.5(nM)-.15
G(atching)-2.5 E F0(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(28)
G(atching)-2.5 E F0(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(28)
197.335 E 0 Cg EP
%%Page: 29 29
%%BeginPageSetup
@@ -3896,7 +3896,7 @@ F0 .988
1.392(ginning with `)-.15 F(`.)-.74 E -.74('')-.7 G 3.892(,b).74 G 1.392
(ut `)-4.092 F(`.)-.74 E 2.872 -.74('' a)-.7 H 1.392(nd `).74 F(`..)-.74
E 2.872 -.74('' m)-.7 H 1.392(ust be).74 F(GNU Bash 5.2)72 768 Q
(2023 May 23)148.175 E(29)197.335 E 0 Cg EP
(2023 June 13)148.175 E(29)197.335 E 0 Cg EP
%%Page: 30 30
%%BeginPageSetup
BP
@@ -4003,7 +4003,7 @@ E F3(fd)A F0(If)180 614.4 Q F3(fd)2.5 E F0(is a v)2.5 E(alid inte)-.25 E
(is an inte)2.997 F .497(ger port number or ser)-.15 F(-)-.2 E
(vice name,)180 722.4 Q F1(bash)2.5 E F0
(attempts to open the corresponding TCP sock)2.5 E(et.)-.1 E
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(30)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(30)197.335 E 0 Cg EP
%%Page: 31 31
%%BeginPageSetup
BP
@@ -4091,7 +4091,7 @@ F1(Duplicating File Descriptors)2.5 E F0(belo)2.5 E
(The format for appending standard output and standard error is:)108 672
Q F1(&>>)144 688.8 Q F2(wor)A(d)-.37 E F0(This is semantically equi)108
705.6 Q -.25(va)-.25 G(lent to).25 E F1(>>)144 722.4 Q F2(wor)A(d)-.37 E
F0(2)2.5 E F1(>&)A F0(1)A(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E
F0(2)2.5 E F1(>&)A F0(1)A(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E
(31)197.335 E 0 Cg EP
%%Page: 32 32
%%BeginPageSetup
@@ -4189,7 +4189,7 @@ F0 2.65<2c8c>C .15(le descriptor)-2.65 F F2(n)3.01 E F0 .15(is closed.)
4.17(st).15 G 1.67(he \214le descriptor)-4.17 F F2(digit)4.17 E F0 1.67
(to \214le descriptor)4.17 F F2(n)4.53 E F0 4.17(,o).24 G 4.17(rt)-4.17
G 1.67(he standard output \(\214le descriptor 1\) if)-4.17 F F2(n)4.17 E
F0 1.67(is not)4.17 F(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(32)
F0 1.67(is not)4.17 F(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(32)
197.335 E 0 Cg EP
%%Page: 33 33
%%BeginPageSetup
@@ -4322,7 +4322,7 @@ R F1(#)3.032 E F0 .532(is updated to re\215ect the change.)3.032 F .532
2.92 E(e)-.162 E F0 -.2(bu)2.67 G .42(iltin belo).2 F .42(w\) or the)
-.25 F F1 .42(\255o functrace)2.92 F F0 .42
(shell option has been enabled with the)2.92 F F1(set)2.921 E F0
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(33)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(33)197.335 E 0 Cg EP
%%Page: 34 34
%%BeginPageSetup
BP
@@ -4465,7 +4465,7 @@ G(r\215o).15 E 2.357 -.65(w, t)-.25 H 1.057(hough di).65 F 1.057
-.15(ve)-.25 G .439(ls of equal-precedence operators.).15 F .439(The le)
5.439 F -.15(ve)-.25 G .439(ls are listed in order).15 F
(of decreasing precedence.)108 724.8 Q(GNU Bash 5.2)72 768 Q
(2023 May 23)148.175 E(34)197.335 E 0 Cg EP
(2023 June 13)148.175 E(34)197.335 E 0 Cg EP
%%Page: 35 35
%%BeginPageSetup
BP
@@ -4567,7 +4567,7 @@ m internally with this beha)108 672 R .345(vior: If an)-.2 F(y)-.15 E F1
(ly).15 E 2.5(,i)-.65 G 2.5(sc)-2.5 G(heck)-2.5 E(ed.)-.1 E .722
(Unless otherwise speci\214ed, primaries that operate on \214les follo)
108 724.8 R 3.221(ws)-.25 G .721(ymbolic links and operate on the tar)
-3.221 F(get)-.18 E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(35)
-3.221 F(get)-.18 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(35)
197.335 E 0 Cg EP
%%Page: 36 36
%%BeginPageSetup
@@ -4661,8 +4661,8 @@ E F0(is set \(has been assigned a v)2.68 E(alue\).)-.25 E F1<ad52>108
(ue if the strings are not equal.).35 E F2(string1)108 704.4 Q F1(<)2.5
E F2(string2)2.5 E F0 -.35(Tr)144 716.4 S(ue if).35 E F2(string1)2.5 E
F0(sorts before)2.5 E F2(string2)2.5 E F0(le)2.5 E(xicographically)-.15
E(.)-.65 E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(36)197.335 E 0 Cg
EP
E(.)-.65 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(36)197.335 E 0
Cg EP
%%Page: 37 37
%%BeginPageSetup
BP
@@ -4783,7 +4783,7 @@ ful, or if the command name contains one or more slashes, the shell e)
(n, and the remain-).15 F(ing ar)108 722.4 Q
(guments to the command are set to the ar)-.18 E(guments gi)-.18 E -.15
(ve)-.25 G(n, if an).15 E -.65(y.)-.15 G(GNU Bash 5.2)72 768 Q
(2023 May 23)148.175 E(37)197.335 E 0 Cg EP
(2023 June 13)148.175 E(37)197.335 E 0 Cg EP
%%Page: 38 38
%%BeginPageSetup
BP
@@ -4890,7 +4890,7 @@ F2<ad65>3.877 E F0 1.377(option from the parent)3.877 F 2.5(shell. When)
(If a command is follo)108 722.4 R .405(wed by a)-.25 F F2(&)2.905 E F0
.404(and job control is not acti)2.905 F -.15(ve)-.25 G 2.904(,t).15 G
.404(he def)-2.904 F .404(ault standard input for the command)-.1 F
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(38)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(38)197.335 E 0 Cg EP
%%Page: 39 39
%%BeginPageSetup
BP
@@ -5023,7 +5023,7 @@ E F4(SIGTSTP)2.5 E F5(.)A F0(Non-b)108 643.2 Q 1.064
F5(.)A F0 2.53 -.8(To p)5.43 H(re).8 E -.15(ve)-.25 G .93(nt the shell \
from sending the signal to a particular job, it should be remo).15 F
-.15(ve)-.15 G 3.429(df).15 G .929(rom the)-3.429 F(GNU Bash 5.2)72 768
Q(2023 May 23)148.175 E(39)197.335 E 0 Cg EP
Q(2023 June 13)148.175 E(39)197.335 E 0 Cg EP
%%Page: 40 40
%%BeginPageSetup
BP
@@ -5157,7 +5157,7 @@ F1(bg)3.392 E F0 .892(command to continue it in the)3.392 F .17
(tak)2.67 E .17(es ef-)-.1 F 2.679(fect immediately)108 729.6 R 5.179
(,a)-.65 G 2.679(nd has the additional side ef)-5.179 F 2.68
(fect of causing pending output and typeahead to be)-.25 F(GNU Bash 5.2)
72 768 Q(2023 May 23)148.175 E(40)197.335 E 0 Cg EP
72 768 Q(2023 June 13)148.175 E(40)197.335 E 0 Cg EP
%%Page: 41 41
%%BeginPageSetup
BP
@@ -5279,7 +5279,7 @@ Q F0(the hostname)180 592.8 Q F1(\\j)144 604.8 Q F0
688.8 Q F0(the current time in 12-hour am/pm format)180 688.8 Q F1(\\A)
144 700.8 Q F0(the current time in 24-hour HH:MM format)180 700.8 Q F1
(\\u)144 712.8 Q F0(the username of the current user)180 712.8 Q
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(41)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(41)197.335 E 0 Cg EP
%%Page: 42 42
%%BeginPageSetup
BP
@@ -5414,7 +5414,7 @@ F -.1(ke)108 700.8 S 2.5(yb)-.05 G(indings and v)-2.5 E
-.15(ey)-.1 G .987(-bindings may be changed with an).15 F F3(inputr)
3.497 E(c)-.37 E F0 3.487(\214le. Other)3.797 F .987
(programs that use this library may)3.487 F(add their o)108 729.6 Q
(wn commands and bindings.)-.25 E(GNU Bash 5.2)72 768 Q(2023 May 23)
(wn commands and bindings.)-.25 E(GNU Bash 5.2)72 768 Q(2023 June 13)
148.175 E(42)197.335 E 0 Cg EP
%%Page: 43 43
%%BeginPageSetup
@@ -5498,8 +5498,8 @@ equences, a second set of backslash escapes is a)108 612 Q -.25(va)-.2 G
(\\f)144 660 Q F0(form feed)180 660 Q F2(\\n)144 672 Q F0(ne)180 672 Q
(wline)-.25 E F2(\\r)144 684 Q F0(carriage return)180 684 Q F2(\\t)144
696 Q F0(horizontal tab)180 696 Q F2(\\v)144 708 Q F0 -.15(ve)180 708 S
(rtical tab).15 E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(43)197.335
E 0 Cg EP
(rtical tab).15 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(43)
197.335 E 0 Cg EP
%%Page: 44 44
%%BeginPageSetup
BP
@@ -5625,7 +5625,7 @@ ored-completion-pre\214x", readline uses this color for the common pre\
(ferent colors to indicate their \214le)-.25 F 2.5(type. The)144 724.8 R
(color de\214nitions are tak)2.5 E(en from the v)-.1 E(alue of the)-.25
E F1(LS_COLORS)2.5 E F0(en)2.5 E(vironment v)-.4 E(ariable.)-.25 E
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(44)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(44)197.335 E 0 Cg EP
%%Page: 45 45
%%BeginPageSetup
BP
@@ -5740,7 +5740,7 @@ F .098(gion as)-.15 F F2(active)2.598 E F0 5.098(.W)C .098(hen the re)
res the terminal to insert each paste into the editing b)-3.34 F(uf)-.2
E .841(fer as a)-.25 F 2.101(single string of characters, instead of tr\
eating each character as if it had been read from the)144 720 R
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(45)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(45)197.335 E 0 Cg EP
%%Page: 46 46
%%BeginPageSetup
BP
@@ -5856,7 +5856,7 @@ E F2 -.37(re)2.551 G(adline).37 E F0 .051(will w)2.551 F .051
(ompleted names which are symbolic links to directories ha)-2.675 F .475
-.15(ve a s)-.2 H .175(lash appended \(sub-).15 F(ject to the v)144 708
Q(alue of)-.25 E F1(mark\255dir)2.5 E(ectories)-.18 E F0(\).)A
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(46)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(46)197.335 E 0 Cg EP
%%Page: 47 47
%%BeginPageSetup
BP
@@ -5965,7 +5965,7 @@ F .186(last line of the primary prompt when vi editing mode is acti)144
-.2 G 2.745(ilable. Use).25 F .244(the \\1 and \\2 escapes to be)2.745 F
.244(gin and end sequences of non-printing)-.15 F(characters, which can\
be used to embed a terminal control sequence into the mode string.)144
720 Q(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(47)197.335 E 0 Cg EP
720 Q(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(47)197.335 E 0 Cg EP
%%Page: 48 48
%%BeginPageSetup
BP
@@ -6065,7 +6065,7 @@ Q F0 .356(This directi)144 684 R .656 -.15(ve t)-.25 H(ak).15 E .356
144 696 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 F1
($include)144 720 Q F2(/etc/inputr)5.833 E(c)-.37 E F0(GNU Bash 5.2)72
768 Q(2023 May 23)148.175 E(48)197.335 E 0 Cg EP
768 Q(2023 June 13)148.175 E(48)197.335 E 0 Cg EP
%%Page: 49 49
%%BeginPageSetup
BP
@@ -6169,7 +6169,7 @@ een width.)-.05 E F1(next\255scr)108 700.8 Q(een\255line)-.18 E F0 .638
144 724.8 R .494 -.15(ve t)-.2 H .194(he desired ef).15 F .194
(fect if the current readline line does not tak)-.25 F 2.695(eu)-.1 G
2.695(pm)-2.695 G .195(ore than one ph)-2.695 F(ysical)-.05 E
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(49)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(49)197.335 E 0 Cg EP
%%Page: 50 50
%%BeginPageSetup
BP
@@ -6253,7 +6253,7 @@ etween the start of the current)-.1 F(line and the point.)144 652.8 Q
144 688.8 R/F3 10/Times-Italic@0 SF(point)2.507 E F0 2.507(\). The)B
.007(search string may match an)2.507 F .007(ywhere in a history)-.15 F
2.5(line. This)144 700.8 R(is a non-incremental search.)2.5 E
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(50)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(50)197.335 E 0 Cg EP
%%Page: 51 51
%%BeginPageSetup
BP
@@ -6360,7 +6360,7 @@ R .799(xample, by)-.15 F/F5 10/Courier@0 SF(stty)3.299 E F0 5.799(.I)C
(Delete the character under the cursor)144 700.8 R 2.973(,u)-.4 G .474
(nless the cursor is at the end of the line, in which case the)-2.973 F
(character behind the cursor is deleted.)144 712.8 Q(GNU Bash 5.2)72 768
Q(2023 May 23)148.175 E(51)197.335 E 0 Cg EP
Q(2023 June 13)148.175 E(51)197.335 E 0 Cg EP
%%Page: 52 52
%%BeginPageSetup
BP
@@ -6454,7 +6454,8 @@ R .729(ord, or if between w)-.1 F .729(ords, to the end of the ne)-.1 F
(ord behind point, using white space as a w)-.1 F .365(ord boundary)-.1
F 5.365(.T)-.65 G .365(he killed te)-5.365 F .365(xt is sa)-.15 F -.15
(ve)-.2 G 2.865(do).15 G 2.865(nt)-2.865 G(he)-2.865 E(kill-ring.)144
712.8 Q(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(52)197.335 E 0 Cg EP
712.8 Q(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(52)197.335 E 0 Cg
EP
%%Page: 53 53
%%BeginPageSetup
BP
@@ -6553,7 +6554,7 @@ E(through the list.)144 669.6 Q(This command is intended to be bound to)
(menu\255complete)144 705.6 Q F0(had been gi)2.5 E -.15(ve)-.25 G 2.5
(nan).15 G -2.25 -.15(eg a)-2.5 H(ti).15 E .3 -.15(ve a)-.25 H -.18(rg)
.15 G 2.5(ument. This).18 F(command is unbound by def)2.5 E(ault.)-.1 E
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(53)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(53)197.335 E 0 Cg EP
%%Page: 54 54
%%BeginPageSetup
BP
@@ -6637,7 +6638,7 @@ F0(Print the last k)144 616.8 Q -.15(ey)-.1 G
669.6 Q F1(abort \(C\255g\))108 681.6 Q F0 3.248
(Abort the current editing command and ring the terminal')144 693.6 R
5.749(sb)-.55 G 3.249(ell \(subject to the setting of)-5.749 F F1
(bell\255style)144 705.6 Q F0(\).)A(GNU Bash 5.2)72 768 Q(2023 May 23)
(bell\255style)144 705.6 Q F0(\).)A(GNU Bash 5.2)72 768 Q(2023 June 13)
148.175 E(54)197.335 E 0 Cg EP
%%Page: 55 55
%%BeginPageSetup
@@ -6741,8 +6742,8 @@ ssible completions.)2.5 E F1(glob\255expand\255w)108 612 Q
.872(the line is redra)144 684 R 3.372(wn. If)-.15 F 3.372(an)3.372 G
.872(umeric ar)-3.372 F .872
(gument is supplied, an asterisk is appended before pathname)-.18 F -.15
(ex)144 696 S(pansion.).15 E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E
(55)197.335 E 0 Cg EP
(ex)144 696 S(pansion.).15 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175
E(55)197.335 E 0 Cg EP
%%Page: 56 56
%%BeginPageSetup
BP
@@ -6872,7 +6873,7 @@ tion or command has complete free-)-.1 F(dom in generating the matches.)
(compgen)2.957 E F0 -.2(bu)2.957 G .457(iltin described belo).2 F 1.756
-.65(w, t)-.25 H 2.956(og).65 G .456(enerate the matches.)-2.956 F .456
(It must put the possible completions in the)5.456 F(GNU Bash 5.2)72 768
Q(2023 May 23)148.175 E(56)197.335 E 0 Cg EP
Q(2023 June 13)148.175 E(56)197.335 E 0 Cg EP
%%Page: 57 57
%%BeginPageSetup
BP
@@ -7000,7 +7001,7 @@ E F5(~/.bash_history)2.583 E F0(\).)A .315(The \214le named by the v)108
729.6 R .315(alue of)-.25 F F1(HISTFILE)2.815 E F0 .315
(is truncated, if necessary)2.565 F 2.815(,t)-.65 G 2.815(oc)-2.815 G
.315(ontain no more than the number of)-2.815 F(GNU Bash 5.2)72 768 Q
(2023 May 23)148.175 E(57)197.335 E 0 Cg EP
(2023 June 13)148.175 E(57)197.335 E 0 Cg EP
%%Page: 58 58
%%BeginPageSetup
BP
@@ -7150,7 +7151,7 @@ Q(eedit)-.18 E F0 1.202(shell option is enabled, a f)3.702 F 1.202
1.161(er for correction.).25 F(The)6.161 E F3<ad70>3.661 E F0 1.161
(option to the)3.661 F F3(history)3.661 E F0 -.2(bu)3.661 G 1.16
(iltin command may be used to see what a history).2 F(GNU Bash 5.2)72
768 Q(2023 May 23)148.175 E(58)197.335 E 0 Cg EP
768 Q(2023 June 13)148.175 E(58)197.335 E 0 Cg EP
%%Page: 59 59
%%BeginPageSetup
BP
@@ -7257,7 +7258,7 @@ E(If a w)108 616.8 Q(ord designator is supplied without an e)-.1 E -.15
(\214x of the form)-.25 E F2(.xxx)2.5 E F0 2.5(,l)C(ea)-2.5 E
(ving the basename.)-.2 E F1(e)108 710.4 Q F0(Remo)144 710.4 Q .3 -.15
(ve a)-.15 H(ll b).15 E(ut the trailing suf)-.2 E(\214x.)-.25 E
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(59)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(59)197.335 E 0 Cg EP
%%Page: 60 60
%%BeginPageSetup
BP
@@ -7405,7 +7406,7 @@ F0 5.744(.I)C(f)-5.744 E F2(job-)4.984 E(spec)144 697.2 Q F0 .671
(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 721.2 Q(as started without job control.)-.1
E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(60)197.335 E 0 Cg EP
E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(60)197.335 E 0 Cg EP
%%Page: 61 61
%%BeginPageSetup
BP
@@ -7525,7 +7526,7 @@ F .771(xit status.)-.15 F .771(This is useful)5.771 F .616
722.4 R .57(uiltin within the function.)-.2 F(The)5.57 E F1(cd)3.07 E F0
-.2(bu)3.07 G .57(iltin is commonly rede\214ned this w).2 F(ay)-.1 E
5.57(.T)-.65 G .57(he return status)-5.57 F(GNU Bash 5.2)72 768 Q
(2023 May 23)148.175 E(61)197.335 E 0 Cg EP
(2023 June 13)148.175 E(61)197.335 E 0 Cg EP
%%Page: 62 62
%%BeginPageSetup
BP
@@ -7670,7 +7671,7 @@ em directly from a completion speci\214cation with the same \215ags.)144
(will be displayed.)2.5 E(The return v)144 715.2 Q
(alue is true unless an in)-.25 E -.25(va)-.4 G
(lid option is supplied, or no matches were generated.).25 E
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(62)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(62)197.335 E 0 Cg EP
%%Page: 63 63
%%BeginPageSetup
BP
@@ -7773,7 +7774,7 @@ Q F1<ad41>144 648 Q F2(action)2.5 E F0(The)184 660 Q F2(action)2.5 E F0
2.5 E F0(.)A F1(arrayv)184 684 Q(ar)-.1 E F0(Array v)224 696 Q
(ariable names.)-.25 E F1(binding)184 708 Q(Readline)224 708 Q F0 -.1
(ke)2.5 G 2.5(yb)-.05 G(inding names.)-2.5 E(GNU Bash 5.2)72 768 Q
(2023 May 23)148.175 E(63)197.335 E 0 Cg EP
(2023 June 13)148.175 E(63)197.335 E 0 Cg EP
%%Page: 64 64
%%BeginPageSetup
BP
@@ -7861,7 +7862,7 @@ Q F3(\214lterpat)2.5 E(\214lterpat)184 708 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 720 R 1.596
(guments, and each completion)-.18 F(GNU Bash 5.2)72 768 Q(2023 May 23)
(guments, and each completion)-.18 F(GNU Bash 5.2)72 768 Q(2023 June 13)
148.175 E(64)197.335 E 0 Cg EP
%%Page: 65 65
%%BeginPageSetup
@@ -8007,7 +8008,7 @@ Q F0(Gi)180 691.2 Q 1.619 -.15(ve e)-.25 H(ach).15 E F1(name)3.819 E F0
3.282 E .782(ute itself, are)-.2 F .809(performed on the v)180 727.2 R
.809(ariable referenced by)-.25 F F1(name)3.308 E F0 1.908 -.55('s v)D
3.308(alue. The).3 F .808(nameref attrib)3.308 F .808(ute cannot be)-.2
F(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(65)197.335 E 0 Cg EP
F(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(65)197.335 E 0 Cg EP
%%Page: 66 66
%%BeginPageSetup
BP
@@ -8138,7 +8139,7 @@ F F1(echo)3.101 E F0 -.15(ex)3.101 G .601(pands these).15 F .658
(does not interpret)3.159 F F1<adad>3.159 E F0 .659
(to mean the end of options.)3.159 F F1(echo)5.659 E F0(inter)3.159 E(-)
-.2 E(prets the follo)144 720 Q(wing escape sequences:)-.25 E
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(66)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(66)197.335 E 0 Cg EP
%%Page: 67 67
%%BeginPageSetup
BP
@@ -8263,7 +8264,7 @@ F -.15(xe)-.15 G 3.32(cuted. A).15 F .82(subshell e)3.32 F .82
(is omitted, the e)2.835 F .096(xit status is that of the last command)
-.15 F -.15(exe)144 715.2 S 2.5(cuted. A).15 F(trap on)2.5 E F3(EXIT)2.5
E F0(is e)2.25 E -.15(xe)-.15 G(cuted before the shell terminates.).15 E
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(67)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(67)197.335 E 0 Cg EP
%%Page: 68 68
%%BeginPageSetup
BP
@@ -8406,7 +8407,7 @@ F1(getopts)108 619.2 Q F2(optstring name)2.5 E F0([)2.5 E F2(ar)A 2.5
(between multiple calls to)144 727.2 R F1(getopts)2.89 E F0 .39
(within the same shell in)2.89 F -.2(vo)-.4 G .389(cation if a ne).2 F
2.889(ws)-.25 G .389(et of parameters is to)-2.889 F(GNU Bash 5.2)72 768
Q(2023 May 23)148.175 E(68)197.335 E 0 Cg EP
Q(2023 June 13)148.175 E(68)197.335 E 0 Cg EP
%%Page: 69 69
%%BeginPageSetup
BP
@@ -8515,7 +8516,7 @@ F3(n)3.24 E F0 .38(lists only the last)3.12 F F3(n)3.24 E F0 2.88
(ciated with each displayed history entry)144 727.2 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(GNU Bash 5.2)72 768
Q(2023 May 23)148.175 E(69)197.335 E 0 Cg EP
Q(2023 June 13)148.175 E(69)197.335 E 0 Cg EP
%%Page: 70 70
%%BeginPageSetup
BP
@@ -8640,7 +8641,7 @@ G .962(lent to).25 F F3<ad6c>3.462 E F0(.)A F3(kill)5.962 E F0 .962
(returns true if at least one signal w)3.462 F(as)-.1 E
(successfully sent, or f)144 720 Q(alse if an error occurs or an in)-.1
E -.25(va)-.4 G(lid option is encountered.).25 E(GNU Bash 5.2)72 768 Q
(2023 May 23)148.175 E(70)197.335 E 0 Cg EP
(2023 June 13)148.175 E(70)197.335 E 0 Cg EP
%%Page: 71 71
%%BeginPageSetup
BP
@@ -8782,8 +8783,8 @@ E F0 .196(returns a non-)2.696 F(zero v)144 710.4 Q(alue.)-.25 E
(Otherwise,)144 727.2 Q F1(popd)2.67 E F0 .17(returns f)2.67 F .17
(alse if an in)-.1 F -.25(va)-.4 G .171
(lid option is encountered, the directory stack is empty).25 F 2.671(,o)
-.65 G 2.671(ra)-2.671 G(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(71)
197.335 E 0 Cg EP
-.65 G 2.671(ra)-2.671 G(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E
(71)197.335 E 0 Cg EP
%%Page: 72 72
%%BeginPageSetup
BP
@@ -8893,7 +8894,7 @@ g or adding directories to the)180 674.4 R
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 710.4 Q F0 2.5(,s)C
(tarting with zero\) is at the top.)-2.5 E(GNU Bash 5.2)72 768 Q
(2023 May 23)148.175 E(72)197.335 E 0 Cg EP
(2023 June 13)148.175 E(72)197.335 E 0 Cg EP
%%Page: 73 73
%%BeginPageSetup
BP
@@ -9016,7 +9017,7 @@ E(har)-.15 E(s)-.1 E F0 .609(characters are read.)180 648 R .608
(wline, before attempting to read)-.25 F(an)180 708 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
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(73)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(73)197.335 E 0 Cg EP
%%Page: 74 74
%%BeginPageSetup
BP
@@ -9154,7 +9155,7 @@ G -.18(rg)-3.08 G .58(uments remaining after op-).18 F .16
2.661(,t)-.4 G(o)-2.661 E F1($1)2.661 E F0(,)A F1($2)144 715.2 Q 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(GNU Bash 5.2)72 768
Q(2023 May 23)148.175 E(74)197.335 E 0 Cg EP
Q(2023 June 13)148.175 E(74)197.335 E 0 Cg EP
%%Page: 75 75
%%BeginPageSetup
BP
@@ -9261,7 +9262,7 @@ H(nder).15 E F3(HIST)3.087 E(OR)-.162 E(Y)-.315 E/F4 9/Times-Roman@0 SF
(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
726 Q F1(Shell V)2.5 E(ariables)-.92 E F0(abo)2.5 E -.15(ve)-.15 G(\).)
.15 E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(75)197.335 E 0 Cg EP
.15 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(75)197.335 E 0 Cg EP
%%Page: 76 76
%%BeginPageSetup
BP
@@ -9363,7 +9364,7 @@ E F1<ad42>144 642 Q F0 1.206(The shell performs brace e)184 642 R 1.206
F .839(mands e)184 714 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 726 Q
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(76)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(76)197.335 E 0 Cg EP
%%Page: 77 77
%%BeginPageSetup
BP
@@ -9469,20 +9470,22 @@ R F2(optnames)4.044 E F0 1.544(are enabled, non-zero otherwise.)4.044 F
(When setting or unsetting options, the return status is zero unless an)
144 600 R F2(optname)3.196 E F0 .696(is not a v)3.196 F .696(alid shell)
-.25 F(option.)144 612 Q(The list of)144 628.8 Q F1(shopt)2.5 E F0
(options is:)2.5 E F1(assoc_expand_once)144 646.8 Q F0 1.945
(options is:)2.5 E F1(array_expand_once)144 646.8 Q F0 1.832
(If set, the shell suppresses multiple e)184 658.8 R -.25(va)-.25 G
1.944(luation of associati).25 F 2.244 -.15(ve a)-.25 H 1.944
(rray subscripts during).15 F .885(arithmetic e)184 670.8 R .885
(xpression e)-.15 F -.25(va)-.25 G .885(luation, while e).25 F -.15(xe)
-.15 G .885(cuting b).15 F .885(uiltins that can perform v)-.2 F .885
(ariable as-)-.25 F(signments, and while e)184 682.8 Q -.15(xe)-.15 G
(cuting b).15 E(uiltins that perform array dereferencing.)-.2 E F1
(autocd)144 694.8 Q F0 .2
(If set, a command name that is the name of a directory is e)184 694.8 R
1.832(luation of associati).25 F 2.131 -.15(ve a)-.25 H 1.831(nd inde)
.15 F -.15(xe)-.15 G 4.331(da).15 G 1.831(rray sub-)-4.331 F .025
(scripts during arithmetic e)184 670.8 R .025(xpression e)-.15 F -.25
(va)-.25 G .025(luation, while e).25 F -.15(xe)-.15 G .025(cuting b).15
F .025(uiltins that can perform)-.2 F -.25(va)184 682.8 S
(riable assignments, and while e).25 E -.15(xe)-.15 G(cuting b).15 E
(uiltins that perform array dereferencing.)-.2 E F1(assoc_expand_once)
144 694.8 Q F0(Deprecated; a synon)184 706.8 Q(ym for)-.15 E F1
(array_expand_once)2.5 E F0(.)A F1(autocd)144 718.8 Q F0 .2
(If set, a command name that is the name of a directory is e)184 718.8 R
-.15(xe)-.15 G .199(cuted as if it were the ar).15 F(gu-)-.18 E
(ment to the)184 706.8 Q F1(cd)2.5 E F0 2.5(command. This)2.5 F
(ment to the)184 730.8 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
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(77)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(77)197.335 E 0 Cg EP
%%Page: 78 78
%%BeginPageSetup
BP
@@ -9582,7 +9585,7 @@ E F1(dotglob)144 679.2 Q F0 .165(If set,)184 679.2 R F1(bash)2.665 E F0
(cute the \214le speci\214ed as an ar).15 F(-)-.2 E(gument to the)184
720 Q 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(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(78)
-.1(fa)2.5 G(ils.).1 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(78)
197.335 E 0 Cg EP
%%Page: 79 79
%%BeginPageSetup
@@ -9678,7 +9681,7 @@ E F1(globstar)144 643.2 Q F0 .519(If set, the pattern)184 643.2 R F1(**)
2.932(,o)C .432(nly directories)-2.932 F(and subdirectories match.)184
667.2 Q F1(gnu_errfmt)144 684 Q F0(If set, shell error messages are wri\
tten in the standard GNU error message format.)184 696 Q(GNU Bash 5.2)72
768 Q(2023 May 23)148.175 E(79)197.335 E 0 Cg EP
768 Q(2023 June 13)148.175 E(79)197.335 E 0 Cg EP
%%Page: 80 80
%%BeginPageSetup
BP
@@ -9763,8 +9766,8 @@ F1(nocaseglob)144 679.2 Q F0 .437(If set,)184 691.2 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 703.2 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(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(80)
197.335 E 0 Cg EP
-.15(ve)-.15 G(\).).15 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E
(80)197.335 E 0 Cg EP
%%Page: 81 81
%%BeginPageSetup
BP
@@ -9847,7 +9850,7 @@ F .771(alue of)-.25 F F2 -.666(PA)3.271 G(TH)-.189 E F0 .771
.753(rride this and).15 F .107(force the suspension.)144 693.6 R .107(T\
he return status is 0 unless the shell is a login shell or job control \
is not en-)5.107 F(abled and)144 705.6 Q F1<ad66>2.5 E F0
(is not supplied.)2.5 E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(81)
(is not supplied.)2.5 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(81)
197.335 E 0 Cg EP
%%Page: 82 82
%%BeginPageSetup
@@ -9962,7 +9965,7 @@ F2(sigspec)2.605 E F0 2.605(\)o)C(r)-2.605 E F1<ad>2.605 E F0 2.605(,e)C
3.456 E F0 .626(is the null string the signal speci-)3.366 F
(\214ed by each)144 728.4 Q F2(sigspec)2.84 E F0
(is ignored by the shell and by the commands it in)2.81 E -.2(vo)-.4 G
-.1(ke).2 G(s.).1 E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(82)
-.1(ke).2 G(s.).1 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(82)
197.335 E 0 Cg EP
%%Page: 83 83
%%BeginPageSetup
@@ -10119,7 +10122,7 @@ E F0([)2.5 E F2(limit)A F0(]])A(Pro)144 698.4 Q .243(vides control o)
(options specify that the hard or soft limit is set for the)3.444 F(gi)
144 722.4 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.708 F(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(83)
ft limit may)2.708 F(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(83)
197.335 E 0 Cg EP
%%Page: 84 84
%%BeginPageSetup
@@ -10239,7 +10242,7 @@ F0 .404(option is supplied, and)2.904 F F2(name)2.904 E F0 .404(is a v)
.719(rather than the v)144 727.2 R .719(ariable it references.)-.25 F F1
<ad6e>5.719 E F0 .719(has no ef)3.219 F .719(fect if the)-.25 F F1<ad66>
3.22 E F0 .72(option is supplied.)3.22 F .72(If no options)5.72 F
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(84)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(84)197.335 E 0 Cg EP
%%Page: 85 85
%%BeginPageSetup
BP
@@ -10388,7 +10391,7 @@ G 3.002(rb).15 G .502(ash-4.3 and later v)-3.002 F .502(ersions, the)
-.15 F F2 -.27(BA)3.002 G(SH_COMP).27 E -.855(AT)-.666 G F0 -.25(va)
3.607 G .502(riable is preferred, and it).25 F
(is required for bash-5.1 and later v)108 722.4 Q(ersions.)-.15 E
(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E(85)197.335 E 0 Cg EP
(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E(85)197.335 E 0 Cg EP
%%Page: 86 86
%%BeginPageSetup
BP
@@ -10492,7 +10495,7 @@ F 1.321(tional message to that ef)180 693.6 R 1.321(fect, e)-.25 F -.15
(ve)-.25 G 3.821(nw).15 G 1.321
(hen producing output that can be reused as input.)-3.821 F
(Bash-5.1 suppresses that message when the)180 705.6 Q F1<ad6c>2.5 E F0
(option is supplied.)2.5 E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E
(option is supplied.)2.5 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E
(86)197.335 E 0 Cg EP
%%Page: 87 87
%%BeginPageSetup
@@ -10577,7 +10580,7 @@ E F0(The personal initialization \214le, e)144 667.2 Q -.15(xe)-.15 G
(-shell startup \214le).15 E F5(~/.bash_lo)109.666 703.2 Q(gout)-.1 E F0
(The indi)144 715.2 Q(vidual login shell cleanup \214le, e)-.25 E -.15
(xe)-.15 G(cuted when a login shell e).15 E(xits)-.15 E(GNU Bash 5.2)72
768 Q(2023 May 23)148.175 E(87)197.335 E 0 Cg EP
768 Q(2023 June 13)148.175 E(87)197.335 E 0 Cg EP
%%Page: 88 88
%%BeginPageSetup
BP
@@ -10640,7 +10643,7 @@ place the sequence of commands between parentheses to force it into a)
-.25 F(subshell, which may be stopped as a unit.)108 542.4 Q(Array v)108
559.2 Q(ariables may not \(yet\) be e)-.25 E(xported.)-.15 E
(There may be only one acti)108 576 Q .3 -.15(ve c)-.25 H
(oprocess at a time.).15 E(GNU Bash 5.2)72 768 Q(2023 May 23)148.175 E
(oprocess at a time.).15 E(GNU Bash 5.2)72 768 Q(2023 June 13)148.175 E
(88)197.335 E 0 Cg EP
%%Trailer
end
BIN
View File
Binary file not shown.
+12 -7
View File
@@ -4,9 +4,9 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This text is a brief description of the features that are present in
the Bash shell (version 5.2, 23 May 2023).
the Bash shell (version 5.2, 13 June 2023).
This is Edition 5.2, last updated 23 May 2023,
This is Edition 5.2, last updated 13 June 2023,
of The GNU Bash Reference Manual,
for Bash, Version 5.2.
@@ -77,10 +77,10 @@ Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Previou
<span id="Bash-Features-1"></span><h1 class="top">Bash Features</h1>
<p>This text is a brief description of the features that are present in
the Bash shell (version 5.2, 23 May 2023).
the Bash shell (version 5.2, 13 June 2023).
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 5.2, last updated 23 May 2023,
<p>This is Edition 5.2, last updated 13 June 2023,
of <cite>The GNU Bash Reference Manual</cite>,
for <code>Bash</code>, Version 5.2.
</p>
@@ -6374,13 +6374,18 @@ option.
</p>
<p>The list of <code>shopt</code> options is:
</p><dl compact="compact">
<dt><span><code>assoc_expand_once</code></span></dt>
<dd><p>If set, the shell suppresses multiple evaluation of associative array
subscripts during arithmetic expression evaluation, while executing
<dt><span><code>array_expand_once</code></span></dt>
<dd><p>If set, the shell suppresses multiple evaluation of
associative and indexed array subscripts
during arithmetic expression evaluation, while executing
builtins that can perform variable assignments,
and while executing builtins that perform array dereferencing.
</p>
</dd>
<dt><span><code>assoc_expand_once</code></span></dt>
<dd><p>Deprecated; a synonym for <code>array_expand_once</code>.
</p>
</dd>
<dt><span><code>autocd</code></span></dt>
<dd><p>If set, a command name that is the name of a directory is executed as if
it were the argument to the <code>cd</code> command.
+144 -141
View File
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 6.8 from
bashref.texi.
This text is a brief description of the features that are present in the
Bash shell (version 5.2, 23 May 2023).
Bash shell (version 5.2, 13 June 2023).
This is Edition 5.2, last updated 23 May 2023, of 'The GNU Bash
This is Edition 5.2, last updated 13 June 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Copyright (C) 1988-2023 Free Software Foundation, Inc.
@@ -27,10 +27,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
Bash shell (version 5.2, 23 May 2023). The Bash home page is
Bash shell (version 5.2, 13 June 2023). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.2, last updated 23 May 2023, of 'The GNU Bash
This is Edition 5.2, last updated 13 June 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Bash contains features that appear in other popular shells, and some
@@ -4847,12 +4847,15 @@ This builtin allows you to change additional shell optional behavior.
The list of 'shopt' options is:
'assoc_expand_once'
'array_expand_once'
If set, the shell suppresses multiple evaluation of
associative array subscripts during arithmetic expression
evaluation, while executing builtins that can perform variable
assignments, and while executing builtins that perform array
dereferencing.
associative and indexed array subscripts during arithmetic
expression evaluation, while executing builtins that can
perform variable assignments, and while executing builtins
that perform array dereferencing.
'assoc_expand_once'
Deprecated; a synonym for 'array_expand_once'.
'autocd'
If set, a command name that is the name of a directory is
@@ -12768,138 +12771,138 @@ D.5 Concept Index

Tag Table:
Node: Top887
Node: Introduction2797
Node: What is Bash?3013
Node: What is a shell?4127
Node: Definitions6665
Node: Basic Shell Features9616
Node: Shell Syntax10835
Node: Shell Operation11861
Node: Quoting13154
Node: Escape Character14458
Node: Single Quotes14943
Node: Double Quotes15291
Node: ANSI-C Quoting16569
Node: Locale Translation17881
Node: Creating Internationalized Scripts19192
Node: Comments23309
Node: Shell Commands23927
Node: Reserved Words24865
Node: Simple Commands25621
Node: Pipelines26275
Node: Lists29274
Node: Compound Commands31069
Node: Looping Constructs32081
Node: Conditional Constructs34576
Node: Command Grouping49064
Node: Coprocesses50542
Node: GNU Parallel53205
Node: Shell Functions54122
Node: Shell Parameters62007
Node: Positional Parameters66395
Node: Special Parameters67297
Node: Shell Expansions70511
Node: Brace Expansion72638
Node: Tilde Expansion75372
Node: Shell Parameter Expansion77993
Node: Command Substitution96395
Node: Arithmetic Expansion99859
Node: Process Substitution100827
Node: Word Splitting101947
Node: Filename Expansion103995
Node: Pattern Matching106928
Node: Quote Removal111930
Node: Redirections112225
Node: Executing Commands121918
Node: Simple Command Expansion122588
Node: Command Search and Execution124698
Node: Command Execution Environment127085
Node: Environment130120
Node: Exit Status131783
Node: Signals133567
Node: Shell Scripts137016
Node: Shell Builtin Commands140043
Node: Bourne Shell Builtins142081
Node: Bash Builtins164415
Node: Modifying Shell Behavior196414
Node: The Set Builtin196759
Node: The Shopt Builtin207357
Node: Special Builtins223269
Node: Shell Variables224248
Node: Bourne Shell Variables224685
Node: Bash Variables226789
Node: Bash Features260854
Node: Invoking Bash261867
Node: Bash Startup Files267880
Node: Interactive Shells273011
Node: What is an Interactive Shell?273422
Node: Is this Shell Interactive?274071
Node: Interactive Shell Behavior274886
Node: Bash Conditional Expressions278515
Node: Shell Arithmetic283157
Node: Aliases286118
Node: Arrays289012
Node: The Directory Stack295575
Node: Directory Stack Builtins296359
Node: Controlling the Prompt300619
Node: The Restricted Shell303584
Node: Bash POSIX Mode306194
Node: Shell Compatibility Mode321987
Node: Job Control330231
Node: Job Control Basics330691
Node: Job Control Builtins335693
Node: Job Control Variables341488
Node: Command Line Editing342644
Node: Introduction and Notation344315
Node: Readline Interaction345938
Node: Readline Bare Essentials347129
Node: Readline Movement Commands348918
Node: Readline Killing Commands349878
Node: Readline Arguments351799
Node: Searching352843
Node: Readline Init File355029
Node: Readline Init File Syntax356290
Node: Conditional Init Constructs380081
Node: Sample Init File384277
Node: Bindable Readline Commands387401
Node: Commands For Moving388605
Node: Commands For History390656
Node: Commands For Text395650
Node: Commands For Killing399299
Node: Numeric Arguments402332
Node: Commands For Completion403471
Node: Keyboard Macros407662
Node: Miscellaneous Commands408350
Node: Readline vi Mode414388
Node: Programmable Completion415295
Node: Programmable Completion Builtins423075
Node: A Programmable Completion Example434063
Node: Using History Interactively439311
Node: Bash History Facilities439995
Node: Bash History Builtins443000
Node: History Interaction448024
Node: Event Designators451644
Node: Word Designators452998
Node: Modifiers454758
Node: Installing Bash456566
Node: Basic Installation457703
Node: Compilers and Options461425
Node: Compiling For Multiple Architectures462166
Node: Installation Names463858
Node: Specifying the System Type465967
Node: Sharing Defaults466684
Node: Operation Controls467357
Node: Optional Features468315
Node: Reporting Bugs479534
Node: Major Differences From The Bourne Shell480868
Node: GNU Free Documentation License497717
Node: Indexes522894
Node: Builtin Index523348
Node: Reserved Word Index530449
Node: Variable Index532897
Node: Function Index549885
Node: Concept Index563669
Node: Top889
Node: Introduction2801
Node: What is Bash?3017
Node: What is a shell?4131
Node: Definitions6669
Node: Basic Shell Features9620
Node: Shell Syntax10839
Node: Shell Operation11865
Node: Quoting13158
Node: Escape Character14462
Node: Single Quotes14947
Node: Double Quotes15295
Node: ANSI-C Quoting16573
Node: Locale Translation17885
Node: Creating Internationalized Scripts19196
Node: Comments23313
Node: Shell Commands23931
Node: Reserved Words24869
Node: Simple Commands25625
Node: Pipelines26279
Node: Lists29278
Node: Compound Commands31073
Node: Looping Constructs32085
Node: Conditional Constructs34580
Node: Command Grouping49068
Node: Coprocesses50546
Node: GNU Parallel53209
Node: Shell Functions54126
Node: Shell Parameters62011
Node: Positional Parameters66399
Node: Special Parameters67301
Node: Shell Expansions70515
Node: Brace Expansion72642
Node: Tilde Expansion75376
Node: Shell Parameter Expansion77997
Node: Command Substitution96399
Node: Arithmetic Expansion99863
Node: Process Substitution100831
Node: Word Splitting101951
Node: Filename Expansion103999
Node: Pattern Matching106932
Node: Quote Removal111934
Node: Redirections112229
Node: Executing Commands121922
Node: Simple Command Expansion122592
Node: Command Search and Execution124702
Node: Command Execution Environment127089
Node: Environment130124
Node: Exit Status131787
Node: Signals133571
Node: Shell Scripts137020
Node: Shell Builtin Commands140047
Node: Bourne Shell Builtins142085
Node: Bash Builtins164419
Node: Modifying Shell Behavior196418
Node: The Set Builtin196763
Node: The Shopt Builtin207361
Node: Special Builtins223368
Node: Shell Variables224347
Node: Bourne Shell Variables224784
Node: Bash Variables226888
Node: Bash Features260953
Node: Invoking Bash261966
Node: Bash Startup Files267979
Node: Interactive Shells273110
Node: What is an Interactive Shell?273521
Node: Is this Shell Interactive?274170
Node: Interactive Shell Behavior274985
Node: Bash Conditional Expressions278614
Node: Shell Arithmetic283256
Node: Aliases286217
Node: Arrays289111
Node: The Directory Stack295674
Node: Directory Stack Builtins296458
Node: Controlling the Prompt300718
Node: The Restricted Shell303683
Node: Bash POSIX Mode306293
Node: Shell Compatibility Mode322086
Node: Job Control330330
Node: Job Control Basics330790
Node: Job Control Builtins335792
Node: Job Control Variables341587
Node: Command Line Editing342743
Node: Introduction and Notation344414
Node: Readline Interaction346037
Node: Readline Bare Essentials347228
Node: Readline Movement Commands349017
Node: Readline Killing Commands349977
Node: Readline Arguments351898
Node: Searching352942
Node: Readline Init File355128
Node: Readline Init File Syntax356389
Node: Conditional Init Constructs380180
Node: Sample Init File384376
Node: Bindable Readline Commands387500
Node: Commands For Moving388704
Node: Commands For History390755
Node: Commands For Text395749
Node: Commands For Killing399398
Node: Numeric Arguments402431
Node: Commands For Completion403570
Node: Keyboard Macros407761
Node: Miscellaneous Commands408449
Node: Readline vi Mode414487
Node: Programmable Completion415394
Node: Programmable Completion Builtins423174
Node: A Programmable Completion Example434162
Node: Using History Interactively439410
Node: Bash History Facilities440094
Node: Bash History Builtins443099
Node: History Interaction448123
Node: Event Designators451743
Node: Word Designators453097
Node: Modifiers454857
Node: Installing Bash456665
Node: Basic Installation457802
Node: Compilers and Options461524
Node: Compiling For Multiple Architectures462265
Node: Installation Names463957
Node: Specifying the System Type466066
Node: Sharing Defaults466783
Node: Operation Controls467456
Node: Optional Features468414
Node: Reporting Bugs479633
Node: Major Differences From The Bourne Shell480967
Node: GNU Free Documentation License497816
Node: Indexes522993
Node: Builtin Index523447
Node: Reserved Word Index530548
Node: Variable Index532996
Node: Function Index549984
Node: Concept Index563768

End Tag Table
+23 -47
View File
@@ -1,11 +1,12 @@
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/MacPorts 2021.58693_0) (preloaded format=pdfetex 2021.8.30) 23 MAY 2023 11:32
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/MacPorts 2021.58693_0) (preloaded format=etex 2021.8.30) 13 JUN 2023 10:42
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
**\input /usr/local/src/bash/bash-20230522/doc/bashref.texi
(/usr/local/src/bash/bash-20230522/doc/bashref.texi
(/usr/local/src/bash/bash-20230522/doc/texinfo.tex
**\nonstopmode \input /usr/local/src/bash/bash-20230612/doc/bashref.texi \input
/usr/local/src/bash/bash-20230612/doc/bashref.texi
(/usr/local/src/bash/bash-20230612/doc/bashref.texi
(/usr/local/src/bash/bash-20230612/doc/texinfo.tex
Loading texinfo [version 2015-11-22.14]:
\outerhsize=\dimen16
\outervsize=\dimen17
@@ -161,23 +162,20 @@ This is `epsf.tex' v2.7.4 <14 February 2011>
texinfo.tex: doing @include of version.texi
(/usr/local/src/bash/bash-20230522/doc/version.texi) [1{/opt/local/var/db/texmf
/fonts/map/pdftex/updmap/pdftex.map}] [2]
(/usr/local/build/bash/bash-20230522/doc/bashref.toc [-1] [-2] [-3]) [-4]
(/usr/local/build/bash/bash-20230522/doc/bashref.toc)
(/usr/local/build/bash/bash-20230522/doc/bashref.toc) Chapter 1
(/usr/local/src/bash/bash-20230612/doc/version.texi) [1] [2]
(/usr/local/build/bash/bash-20230612/doc/bashref.toc [-1] [-2] [-3]) [-4]
Chapter 1
\openout0 = `bashref.toc'.
(/usr/local/build/bash/bash-20230522/doc/bashref.aux)
(/usr/local/build/bash/bash-20230612/doc/bashref.aux)
\openout1 = `bashref.aux'.
Chapter 2 [1] [2]
Chapter 2
[1] [2]
@cpindfile=@write2
\openout2 = `bashref.cp'.
[3] Chapter 3 [4] [5] [6] [7]
[3] Chapter 3 [4] [5] [6] [7]
@vrindfile=@write3
\openout3 = `bashref.vr'.
@@ -261,7 +259,7 @@ Overfull \hbox (38.26585pt too wide) in paragraph at lines 5359--5359
[118] [119]
texinfo.tex: doing @include of rluser.texi
(/usr/local/src/bash/bash-20230522/lib/readline/doc/rluser.texi
(/usr/local/src/bash/bash-20230612/lib/readline/doc/rluser.texi
Chapter 8 [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130]
[131]
Underfull \hbox (badness 7540) in paragraph at lines 874--880
@@ -311,10 +309,10 @@ gnored[]
texinfo.tex: doing @include of hsuser.texi
(/usr/local/src/bash/bash-20230522/lib/readline/doc/hsuser.texi Chapter 9
(/usr/local/src/bash/bash-20230612/lib/readline/doc/hsuser.texi Chapter 9
[155] [156] [157] [158] [159] [160]) Chapter 10 [161] [162] [163] [164]
[165]
Underfull \hbox (badness 10000) in paragraph at lines 9638--9647
Underfull \hbox (badness 10000) in paragraph at lines 9642--9651
[]@textrm All of the fol-low-ing op-tions ex-cept for `@texttt alt-array-implem
entation[]@textrm '[],
@@ -327,7 +325,7 @@ entation[]@textrm '[],
.etc.
Underfull \hbox (badness 10000) in paragraph at lines 9638--9647
Underfull \hbox (badness 10000) in paragraph at lines 9642--9651
@textrm `@texttt disabled-builtins[]@textrm '[], `@texttt direxpand-default[]@t
extrm '[], `@texttt strict-posix-default[]@textrm '[], and
@@ -343,38 +341,16 @@ extrm '[], `@texttt strict-posix-default[]@textrm '[], and
[175] [176] Appendix C [177]
texinfo.tex: doing @include of fdl.texi
(/usr/local/src/bash/bash-20230522/doc/fdl.texi
(/usr/local/src/bash/bash-20230612/doc/fdl.texi
[178] [179] [180] [181] [182] [183] [184]) Appendix D [185] [186] [187]
[188] [189] [190] [191] [192] [193] [194] )
Here is how much of TeX's memory you used:
4101 strings out of 497086
47605 string characters out of 6206517
141996 words of memory out of 5000000
4869 multiletter control sequences out of 15000+600000
3531 strings out of 497096
40273 string characters out of 6206923
87714 words of memory out of 5000000
4700 multiletter control sequences out of 15000+600000
34315 words of font info for 116 fonts, out of 8000000 for 9000
51 hyphenation exceptions out of 8191
16i,6n,16p,331b,983s stack positions out of 5000i,500n,10000p,200000b,80000s
{/opt/local/share/texmf-texlive/font
s/enc/dvips/cm-super/cm-super-t1.enc}</opt/local/share/texmf-texlive/fonts/type
1/public/amsfonts/cm/cmbx12.pfb></opt/local/share/texmf-texlive/fonts/type1/pub
lic/amsfonts/cm/cmcsc10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/
amsfonts/cm/cmmi10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfo
nts/cm/cmmi12.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/c
m/cmmi9.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr1
0.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr9.pfb><
/opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsl10.pfb></opt/
local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsltt10.pfb></opt/loc
al/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsy10.pfb></opt/local/sh
are/texmf-texlive/fonts/type1/public/amsfonts/cm/cmti10.pfb></opt/local/share/t
exmf-texlive/fonts/type1/public/amsfonts/cm/cmtt10.pfb></opt/local/share/texmf-
texlive/fonts/type1/public/amsfonts/cm/cmtt12.pfb></opt/local/share/texmf-texli
ve/fonts/type1/public/amsfonts/cm/cmtt9.pfb></opt/local/share/texmf-texlive/fon
ts/type1/public/cm-super/sfrm1095.pfb></opt/local/share/texmf-texlive/fonts/typ
e1/public/cm-super/sfrm1440.pfb>
Output written on bashref.pdf (200 pages, 807513 bytes).
PDF statistics:
2799 PDF objects out of 2984 (max. 8388607)
2552 compressed objects within 26 object streams
328 named destinations out of 1000 (max. 500000)
1157 words of extra memory for PDF output out of 10000 (max. 10000000)
16i,6n,16p,402b,942s stack positions out of 5000i,500n,10000p,200000b,80000s
Output written on bashref.dvi (200 pages, 840512 bytes).
+119 -125
View File
@@ -1,7 +1,7 @@
%!PS-Adobe-2.0
%%Creator: dvips(k) 2022.1 (TeX Live 2022) Copyright 2022 Radical Eye Software
%%Creator: dvips(k) 2021.1 Copyright 2021 Radical Eye Software
%%Title: bashref.dvi
%%CreationDate: Mon May 22 13:42:16 2023
%%CreationDate: Tue Jun 13 14:42:21 2023
%%Pages: 200
%%PageOrder: Ascend
%%BoundingBox: 0 0 612 792
@@ -12,7 +12,7 @@
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips -D 600 -t letter -o bashref.ps bashref.dvi
%DVIPSParameters: dpi=600
%DVIPSSource: TeX output 2023.05.22:0942
%DVIPSSource: TeX output 2023.06.13:1042
%%BeginProcSet: tex.pro 0 0
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
@@ -7614,7 +7614,7 @@ ifelse
TeXDict begin 1 0 bop 150 1318 a Fv(Bash)64 b(Reference)j(Man)-5
b(ual)p 150 1385 3600 34 v 2361 1481 a Fu(Reference)31
b(Do)s(cumen)m(tation)i(for)d(Bash)2428 1589 y(Edition)h(5.2,)g(for)f
Ft(Bash)g Fu(V)-8 b(ersion)31 b(5.2.)3364 1697 y(Ma)m(y)g(2023)150
Ft(Bash)g Fu(V)-8 b(ersion)31 b(5.2.)3350 1697 y(June)e(2023)150
4927 y Fs(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
@@ -7622,16 +7622,15 @@ b(oundation)p 150 5141 3600 17 v eop end
%%Page: 2 2
TeXDict begin 2 1 bop 150 4279 a Fu(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(5.2,)c(14)f(Ma)m(y)g
(2023\).)150 4523 y(This)k(is)h(Edition)f(5.2,)k(last)d(up)s(dated)e
(14)j(Ma)m(y)g(2023,)i(of)c Fr(The)h(GNU)g(Bash)g(Reference)g(Man)m
(ual)p Fu(,)i(for)150 4633 y Ft(Bash)p Fu(,)29 b(V)-8
b(ersion)31 b(5.2.)150 4767 y(Cop)m(yrigh)m(t)602 4764
y(c)577 4767 y Fq(\015)f Fu(1988{2023)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
(the)h(Bash)f(shell)h(\(v)m(ersion)150 4389 y(5.2,)c(13)f(June)e
(2023\).)150 4523 y(This)34 b(is)h(Edition)g(5.2,)i(last)e(up)s(dated)f
(13)h(June)f(2023,)k(of)d Fr(The)f(GNU)i(Bash)f(Reference)g(Man)m(ual)p
Fu(,)i(for)150 4633 y Ft(Bash)p Fu(,)29 b(V)-8 b(ersion)31
b(5.2.)150 4767 y(Cop)m(yrigh)m(t)602 4764 y(c)577 4767
y Fq(\015)f Fu(1988{2023)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(1.3)g(or)f(an)m(y)h(later)g(v)m(ersion)390 5121 y(published)43
b(b)m(y)h(the)h(F)-8 b(ree)46 b(Soft)m(w)m(are)g(F)-8
@@ -10598,99 +10597,92 @@ h(command;)h(none)f(are)h(treated)g(sp)s(ecially)-8 b(.)275
Ft(;)e(})150 4044 y Fu(whic)m(h)38 b(executes)i Fr(command)i
Fu(in)d(the)g(curren)m(t)f(execution)i(en)m(vironmen)m(t)f(and)f
(captures)h(its)g(output,)150 4153 y(again)31 b(with)f(trailing)i
(newlines)e(remo)m(v)m(ed.)275 4293 y(The)g(c)m(haracter)j
Fr(c)k Fu(follo)m(wing)c(the)e(op)s(en)g(brace)g(m)m(ust)g(b)s(e)g(a)g
(space,)h(tab,)g(newline,)g(`)p Ft(\()p Fu(',)g(or)f(`)p
Ft(|)p Fu(',)h(and)150 4403 y(the)39 b(close)i(brace)e(m)m(ust)g(b)s(e)
g(in)g(a)g(p)s(osition)h(where)e(a)i(reserv)m(ed)f(w)m(ord)g(ma)m(y)h
(app)s(ear)e(\(i.e.,)43 b(preceded)150 4512 y(b)m(y)32
b(a)g(command)g(terminator)h(suc)m(h)e(as)h(semicolon\).)47
b(Bash)32 b(allo)m(ws)i(the)e(close)h(brace)f(to)h(b)s(e)e(joined)h(to)
150 4622 y(the)f(remaining)g(c)m(haracters)h(in)e(the)h(w)m(ord)f
(without)h(b)s(eing)f(follo)m(w)m(ed)i(b)m(y)f(a)g(shell)f(metac)m
(haracter)k(as)d(a)150 4732 y(reserv)m(ed)g(w)m(ord)f(w)m(ould)g
(usually)g(require.)275 4871 y(An)m(y)j(side)h(e\013ects)h(of)e
Fr(command)k Fu(tak)m(e)e(e\013ect)h(immediately)e(in)g(the)f(curren)m
(t)h(execution)h(en)m(viron-)150 4981 y(men)m(t)d(and)g(p)s(ersist)f
(in)g(the)h(curren)m(t)g(en)m(vironmen)m(t)h(after)f(the)g(command)g
(completes)h(\(e.g.,)h(the)e Ft(exit)150 5091 y Fu(builtin)e(will)h
(exit)g(the)g(shell\).)275 5230 y(This)g(t)m(yp)s(e)i(of)g(command)f
(substitution)g(sup)s(er\014cially)g(resem)m(bles)h(executing)h(an)f
(unnamed)e(shell)150 5340 y(function:)42 b(lo)s(cal)33
b(v)-5 b(ariables)32 b(are)g(created)g(as)g(when)e(a)i(shell)g
(function)f(is)g(executing,)i(and)e(the)h Ft(return)p
eop end
(newlines)e(remo)m(v)m(ed.)275 4293 y(The)40 b(c)m(haracter)i
Fr(c)47 b Fu(follo)m(wing)42 b(the)f(op)s(en)g(brace)g(m)m(ust)f(b)s(e)
h(a)g(space,)j(tab,)g(newline,)g(or)d(`)p Ft(|)p Fu(',)j(and)150
4403 y(the)39 b(close)i(brace)e(m)m(ust)g(b)s(e)g(in)g(a)g(p)s(osition)
h(where)e(a)i(reserv)m(ed)f(w)m(ord)g(ma)m(y)h(app)s(ear)e(\(i.e.,)43
b(preceded)150 4512 y(b)m(y)32 b(a)g(command)g(terminator)h(suc)m(h)e
(as)h(semicolon\).)47 b(Bash)32 b(allo)m(ws)i(the)e(close)h(brace)f(to)
h(b)s(e)e(joined)h(to)150 4622 y(the)f(remaining)g(c)m(haracters)h(in)e
(the)h(w)m(ord)f(without)h(b)s(eing)f(follo)m(w)m(ed)i(b)m(y)f(a)g
(shell)f(metac)m(haracter)k(as)d(a)150 4732 y(reserv)m(ed)g(w)m(ord)f
(w)m(ould)g(usually)g(require.)275 4871 y(An)m(y)j(side)h(e\013ects)h
(of)e Fr(command)k Fu(tak)m(e)e(e\013ect)h(immediately)e(in)g(the)f
(curren)m(t)h(execution)h(en)m(viron-)150 4981 y(men)m(t)d(and)g(p)s
(ersist)f(in)g(the)h(curren)m(t)g(en)m(vironmen)m(t)h(after)f(the)g
(command)g(completes)h(\(e.g.,)h(the)e Ft(exit)150 5091
y Fu(builtin)e(will)h(exit)g(the)g(shell\).)275 5230
y(This)g(t)m(yp)s(e)i(of)g(command)f(substitution)g(sup)s(er\014cially)
g(resem)m(bles)h(executing)h(an)f(unnamed)e(shell)150
5340 y(function:)42 b(lo)s(cal)33 b(v)-5 b(ariables)32
b(are)g(created)g(as)g(when)e(a)i(shell)g(function)f(is)g(executing,)i
(and)e(the)h Ft(return)p eop end
%%Page: 35 41
TeXDict begin 35 40 bop 150 -116 a Fu(Chapter)30 b(3:)41
b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(35)150 299
y(builtin)36 b(forces)i Fr(command)i Fu(to)e(complete;)j(ho)m(w)m(ev)m
(er,)f(the)d(rest)g(of)g(the)h(execution)g(en)m(vironmen)m(t,)h(in-)150
408 y(cluding)30 b(the)h(p)s(ositional)g(parameters,)g(is)f(shared)g
(with)g(the)h(caller.)275 539 y(If)24 b(the)h(\014rst)f(c)m(haracter)j
(follo)m(wing)f(the)f(op)s(en)f(brace)h(is)g(a)h(`)p
Ft(\()p Fu(',)g Fr(command)i Fu(is)d(executed)h(in)e(a)i(subshell,)150
648 y(and)33 b Fr(command)k Fu(m)m(ust)d(b)s(e)f(terminated)h(b)m(y)g
(a)g(`)p Ft(\))p Fu('.)51 b(This)32 b(is)i(similar)g(to)h(the)f
Ft(\()f Fu(comp)s(ound)f(command)150 758 y(\(see)44 b(Section)g
(3.2.5.3)h([Command)e(Grouping],)j(page)d(17\).)80 b(If)43
b(the)g(\014rst)f(c)m(haracter)j(is)e(a)g(`)p Ft(|)p
Fu(',)k(the)150 868 y(construct)26 b(expands)f(to)i(the)e(v)-5
b(alue)27 b(of)f(the)g Ft(REPLY)e Fu(shell)i(v)-5 b(ariable)26
b(after)h Fr(command)i Fu(executes,)f(without)150 977
y(remo)m(ving)i(an)m(y)g(trailing)h(newlines,)f(and)f(the)g(standard)g
(output)g(of)h Fr(command)j Fu(remains)c(the)h(same)g(as)150
1087 y(in)h(the)g(calling)i(shell.)42 b(Bash)32 b(creates)g
Ft(REPLY)e Fu(as)h(an)g(initially-unset)h(lo)s(cal)h(v)-5
b(ariable)32 b(when)e Fr(command)150 1196 y Fu(executes,)44
b(and)39 b(restores)i Ft(REPLY)d Fu(to)j(the)f(v)-5 b(alue)41
b(it)g(had)e(b)s(efore)h(the)g(command)g(substitution)f(after)150
1306 y Fr(command)34 b Fu(completes,)e(as)e(with)g(an)m(y)h(lo)s(cal)h
(v)-5 b(ariable.)275 1436 y(F)d(or)23 b(example,)i(this)e(construct)g
(with)g(the)h(caller.)275 545 y(If)26 b(the)g(\014rst)g(c)m(haracter)i
(follo)m(wing)g(the)f(op)s(en)f(brace)h(is)f(a)h(`)p
Ft(|)p Fu(',)h(the)f(construct)g(expands)e(to)j(the)e(v)-5
b(alue)150 654 y(of)24 b(the)g Ft(REPLY)e Fu(shell)i(v)-5
b(ariable)24 b(after)g Fr(command)j Fu(executes,)g(without)d(remo)m
(ving)g(an)m(y)g(trailing)h(newlines,)150 764 y(and)h(the)g(standard)f
(output)h(of)g Fr(command)k Fu(remains)c(the)g(same)h(as)f(in)g(the)g
(calling)i(shell.)39 b(Bash)27 b(creates)150 873 y Ft(REPLY)33
b Fu(as)j(an)e(initially-unset)j(lo)s(cal)f(v)-5 b(ariable)35
b(when)f Fr(command)39 b Fu(executes,)e(and)d(restores)i
Ft(REPLY)d Fu(to)150 983 y(the)i(v)-5 b(alue)34 b(it)h(had)f(b)s(efore)
g(the)h(command)f(substitution)g(after)h Fr(command)j
Fu(completes,)f(as)d(with)h(an)m(y)150 1093 y(lo)s(cal)d(v)-5
b(ariable.)275 1229 y(F)d(or)23 b(example,)i(this)e(construct)g
(expands)f(to)i(`)p Ft(12345)p Fu(',)f(and)f(lea)m(v)m(es)j(the)e
(shell)g(v)-5 b(ariable)24 b Ft(X)e Fu(unc)m(hanged)150
1546 y(in)30 b(the)h(curren)m(t)f(execution)h(en)m(vironmen)m(t:)390
1676 y Ft(${)47 b(local)g(X=12345)e(;)j(echo)e($X;)h(})150
1806 y Fu(\(not)28 b(declaring)g Ft(X)f Fu(as)g(lo)s(cal)i(w)m(ould)e
1339 y(in)30 b(the)h(curren)m(t)f(execution)h(en)m(vironmen)m(t:)390
1584 y Ft(${)47 b(local)g(X=12345)e(;)j(echo)e($X;)h(})150
1721 y Fu(\(not)28 b(declaring)g Ft(X)f Fu(as)g(lo)s(cal)i(w)m(ould)e
(mo)s(dify)f(its)i(v)-5 b(alue)27 b(in)g(the)h(curren)m(t)f(en)m
(vironmen)m(t,)i(as)e(with)g(normal)150 1916 y(shell)38
(vironmen)m(t,)i(as)e(with)g(normal)150 1830 y(shell)38
b(function)g(execution\),)43 b(while)38 b(this)g(construct)h(do)s(es)f
(not)g(require)g(an)m(y)h(output)f(to)h(expand)e(to)150
2026 y(`)p Ft(12345)p Fu(':)390 2156 y Ft(${|)47 b(REPLY=12345;)d(})150
2286 y Fu(and)30 b(restores)h Ft(REPLY)e Fu(to)i(the)f(v)-5
1940 y(`)p Ft(12345)p Fu(':)390 2076 y Ft(${|)47 b(REPLY=12345;)d(})150
2212 y Fu(and)30 b(restores)h Ft(REPLY)e Fu(to)i(the)f(v)-5
b(alue)31 b(it)g(had)f(b)s(efore)g(the)g(command)g(substitution.)275
2416 y(Command)22 b(substitutions)g(ma)m(y)i(b)s(e)e(nested.)39
2349 y(Command)22 b(substitutions)g(ma)m(y)i(b)s(e)e(nested.)39
b(T)-8 b(o)23 b(nest)g(when)f(using)h(the)g(bac)m(kquoted)h(form,)g
(escap)s(e)150 2526 y(the)31 b(inner)e(bac)m(kquotes)j(with)e(bac)m
(kslashes.)275 2656 y(If)g(the)h(substitution)g(app)s(ears)f(within)h
(escap)s(e)150 2458 y(the)31 b(inner)e(bac)m(kquotes)j(with)e(bac)m
(kslashes.)275 2594 y(If)g(the)h(substitution)g(app)s(ears)f(within)h
(double)f(quotes,)i(Bash)f(do)s(es)g(not)g(p)s(erform)f(w)m(ord)g
(splitting)150 2766 y(and)g(\014lename)g(expansion)h(on)f(the)g
(results.)150 2957 y Fk(3.5.5)63 b(Arithmetic)40 b(Expansion)150
3104 y Fu(Arithmetic)25 b(expansion)g(allo)m(ws)g(the)g(ev)-5
(splitting)150 2704 y(and)g(\014lename)g(expansion)h(on)f(the)g
(results.)150 2905 y Fk(3.5.5)63 b(Arithmetic)40 b(Expansion)150
3052 y Fu(Arithmetic)25 b(expansion)g(allo)m(ws)g(the)g(ev)-5
b(aluation)26 b(of)f(an)f(arithmetic)i(expression)e(and)g(the)g
(substitution)150 3213 y(of)31 b(the)f(result.)41 b(The)30
b(format)g(for)g(arithmetic)i(expansion)e(is:)390 3344
y Ft($\(\()47 b Fj(expression)e Ft(\)\))275 3474 y Fu(The)34
(substitution)150 3162 y(of)31 b(the)f(result.)41 b(The)30
b(format)g(for)g(arithmetic)i(expansion)e(is:)390 3298
y Ft($\(\()47 b Fj(expression)e Ft(\)\))275 3434 y Fu(The)34
b Fr(expression)h Fu(undergo)s(es)f(the)h(same)h(expansions)e(as)i(if)f
(it)g(w)m(ere)h(within)e(double)h(quotes,)i(but)150 3584
(it)g(w)m(ere)h(within)e(double)h(quotes,)i(but)150 3544
y(double)g(quote)g(c)m(haracters)i(in)d Fr(expression)h
Fu(are)g(not)g(treated)h(sp)s(ecially)g(and)f(are)g(remo)m(v)m(ed.)61
b(All)38 b(to-)150 3693 y(k)m(ens)c(in)f(the)h(expression)f(undergo)g
b(All)38 b(to-)150 3653 y(k)m(ens)c(in)f(the)h(expression)f(undergo)g
(parameter)h(and)f(v)-5 b(ariable)34 b(expansion,)h(command)e
(substitution,)150 3803 y(and)41 b(quote)i(remo)m(v)-5
(substitution,)150 3763 y(and)41 b(quote)i(remo)m(v)-5
b(al.)76 b(The)41 b(result)h(is)g(treated)h(as)f(the)g(arithmetic)h
(expression)f(to)g(b)s(e)f(ev)-5 b(aluated.)150 3912
(expression)f(to)g(b)s(e)f(ev)-5 b(aluated.)150 3872
y(Arithmetic)31 b(expansions)f(ma)m(y)h(b)s(e)f(nested.)275
4043 y(The)k(ev)-5 b(aluation)37 b(is)f(p)s(erformed)e(according)i(to)g
4009 y(The)k(ev)-5 b(aluation)37 b(is)f(p)s(erformed)e(according)i(to)g
(the)g(rules)f(listed)h(b)s(elo)m(w)g(\(see)g(Section)g(6.5)h([Shell)
150 4152 y(Arithmetic],)29 b(page)e(100\).)41 b(If)27
150 4118 y(Arithmetic],)29 b(page)e(100\).)41 b(If)27
b(the)f(expression)h(is)f(in)m(v)-5 b(alid,)29 b(Bash)d(prin)m(ts)g(a)i
(message)f(indicating)h(failure)150 4262 y(to)j(the)g(standard)e(error)
h(and)g(no)g(substitution)g(o)s(ccurs.)150 4453 y Fk(3.5.6)63
b(Pro)s(cess)42 b(Substitution)150 4600 y Fu(Pro)s(cess)33
(message)f(indicating)h(failure)150 4228 y(to)j(the)g(standard)e(error)
h(and)g(no)g(substitution)g(o)s(ccurs.)150 4429 y Fk(3.5.6)63
b(Pro)s(cess)42 b(Substitution)150 4576 y Fu(Pro)s(cess)33
b(substitution)g(allo)m(ws)i(a)e(pro)s(cess's)g(input)f(or)h(output)g
(to)h(b)s(e)f(referred)f(to)i(using)f(a)g(\014lename.)150
4709 y(It)d(tak)m(es)i(the)f(form)f(of)390 4839 y Ft(<\()p
Fj(list)p Ft(\))150 4970 y Fu(or)390 5100 y Ft(>\()p
4685 y(It)d(tak)m(es)i(the)f(form)f(of)390 4822 y Ft(<\()p
Fj(list)p Ft(\))150 4958 y Fu(or)390 5094 y Ft(>\()p
Fj(list)p Ft(\))150 5230 y Fu(The)e(pro)s(cess)h Fr(list)j
Fu(is)d(run)e(async)m(hronously)-8 b(,)30 b(and)e(its)i(input)e(or)h
(output)f(app)s(ears)h(as)g(a)g(\014lename.)41 b(This)150
@@ -13459,70 +13451,72 @@ Fu(is)g(set)h(to)g(N.)630 4848 y(The)f(return)f(status)i(is)f(alw)m(a)m
%%Page: 73 79
TeXDict begin 73 78 bop 150 -116 a Fu(Chapter)30 b(4:)41
b(Shell)30 b(Builtin)h(Commands)2069 b(73)870 299 y Ft(shopt)46
b([-pqsu])g([-o])h([)p Fj(optname)e Ft(...])630 438 y
b([-pqsu])g([-o])h([)p Fj(optname)e Ft(...])630 427 y
Fu(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 548 y(can)24 b(b)s(e)g(either)h(those)f(listed)h(b)s
b(settings)630 536 y(can)24 b(b)s(e)g(either)h(those)f(listed)h(b)s
(elo)m(w,)h(or,)f(if)g(the)f Ft(-o)f Fu(option)i(is)f(used,)h(those)g
(a)m(v)-5 b(ailable)26 b(with)630 658 y(the)k Ft(-o)f
(a)m(v)-5 b(ailable)26 b(with)630 646 y(the)k Ft(-o)f
Fu(option)i(to)f(the)g Ft(set)f Fu(builtin)h(command)f(\(see)i(Section)
g(4.3.1)g([The)f(Set)g(Builtin],)630 767 y(page)i(68\).)45
g(4.3.1)g([The)f(Set)g(Builtin],)630 756 y(page)i(68\).)45
b(With)32 b(no)f(options,)h(or)g(with)f(the)g Ft(-p)g
Fu(option,)h(a)g(list)g(of)f(all)i(settable)g(options)630
877 y(is)g(displa)m(y)m(ed,)i(with)e(an)g(indication)h(of)f(whether)g
865 y(is)g(displa)m(y)m(ed,)i(with)e(an)g(indication)h(of)f(whether)g
(or)g(not)g(eac)m(h)h(is)g(set;)h(if)e Fr(optname)5 b
Fu(s)34 b(are)630 986 y(supplied,)25 b(the)g(output)g(is)g(restricted)g
Fu(s)34 b(are)630 975 y(supplied,)25 b(the)g(output)g(is)g(restricted)g
(to)h(those)g(options.)39 b(The)24 b Ft(-p)h Fu(option)g(causes)g
(output)630 1096 y(to)30 b(b)s(e)f(displa)m(y)m(ed)g(in)g(a)h(form)f
(output)630 1084 y(to)30 b(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.)39 b(Other)29
b(options)g(ha)m(v)m(e)i(the)630 1205 y(follo)m(wing)h(meanings:)630
1375 y Ft(-s)384 b Fu(Enable)30 b(\(set\))i(eac)m(h)f
Fr(optname)p Fu(.)630 1544 y Ft(-u)384 b Fu(Disable)31
b(\(unset\))g(eac)m(h)h Fr(optname)p Fu(.)630 1714 y
b(options)g(ha)m(v)m(e)i(the)630 1194 y(follo)m(wing)h(meanings:)630
1340 y Ft(-s)384 b Fu(Enable)30 b(\(set\))i(eac)m(h)f
Fr(optname)p Fu(.)630 1486 y Ft(-u)384 b Fu(Disable)31
b(\(unset\))g(eac)m(h)h Fr(optname)p Fu(.)630 1632 y
Ft(-q)384 b Fu(Suppresses)28 b(normal)h(output;)h(the)g(return)e
(status)i(indicates)h(whether)e(the)1110 1823 y Fr(optname)37
(status)i(indicates)h(whether)e(the)1110 1742 y Fr(optname)37
b Fu(is)31 b(set)h(or)f(unset.)43 b(If)31 b(m)m(ultiple)h
Fr(optname)37 b Fu(argumen)m(ts)31 b(are)h(giv)m(en)1110
1933 y(with)d Ft(-q)p Fu(,)f(the)i(return)d(status)j(is)f(zero)g(if)g
1851 y(with)d Ft(-q)p Fu(,)f(the)i(return)d(status)j(is)f(zero)g(if)g
(all)h Fr(optname)5 b Fu(s)29 b(are)h(enabled;)f(non-)1110
2042 y(zero)i(otherwise.)630 2212 y Ft(-o)384 b Fu(Restricts)22
1961 y(zero)i(otherwise.)630 2107 y Ft(-o)384 b Fu(Restricts)22
b(the)f(v)-5 b(alues)22 b(of)f Fr(optname)27 b Fu(to)22
b(b)s(e)e(those)i(de\014ned)e(for)h(the)g Ft(-o)f Fu(option)1110
2321 y(to)31 b(the)g Ft(set)e Fu(builtin)h(\(see)h(Section)h(4.3.1)g
([The)e(Set)g(Builtin],)i(page)f(68\).)630 2491 y(If)e(either)i
2217 y(to)31 b(the)g Ft(set)e Fu(builtin)h(\(see)h(Section)h(4.3.1)g
([The)e(Set)g(Builtin],)i(page)f(68\).)630 2363 y(If)e(either)i
Ft(-s)e Fu(or)h Ft(-u)f Fu(is)h(used)f(with)g(no)h Fr(optname)35
b Fu(argumen)m(ts,)c Ft(shopt)d Fu(sho)m(ws)h(only)h(those)630
2600 y(options)h(whic)m(h)f(are)h(set)f(or)h(unset,)f(resp)s(ectiv)m
(ely)-8 b(.)630 2740 y(Unless)30 b(otherwise)h(noted,)g(the)g
2472 y(options)h(whic)m(h)f(are)h(set)f(or)h(unset,)f(resp)s(ectiv)m
(ely)-8 b(.)630 2600 y(Unless)30 b(otherwise)h(noted,)g(the)g
Ft(shopt)d Fu(options)j(are)g(disabled)f(\(o\013)7 b(\))32
b(b)m(y)e(default.)630 2879 y(The)d(return)f(status)i(when)e(listing)j
b(b)m(y)e(default.)630 2728 y(The)d(return)f(status)i(when)e(listing)j
(options)e(is)h(zero)g(if)f(all)i Fr(optname)5 b Fu(s)27
b(are)h(enabled,)g(non-)630 2989 y(zero)40 b(otherwise.)66
b(are)h(enabled,)g(non-)630 2838 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 3098 y(unless)30 b(an)g Fr(optname)36
(status)h(is)g(zero)630 2947 y(unless)30 b(an)g Fr(optname)36
b Fu(is)30 b(not)h(a)g(v)-5 b(alid)30 b(shell)h(option.)630
3238 y(The)f(list)h(of)f Ft(shopt)f Fu(options)i(is:)630
3407 y Ft(assoc_expand_once)1110 3517 y Fu(If)h(set,)i(the)e(shell)h
(suppresses)e(m)m(ultiple)i(ev)-5 b(aluation)34 b(of)e(asso)s(ciativ)m
(e)j(arra)m(y)1110 3626 y(subscripts)24 b(during)h(arithmetic)h
(expression)g(ev)-5 b(aluation,)28 b(while)e(executing)1110
3736 y(builtins)c(that)i(can)f(p)s(erform)f(v)-5 b(ariable)24
b(assignmen)m(ts,)h(and)e(while)g(executing)1110 3846
y(builtins)30 b(that)h(p)s(erform)e(arra)m(y)i(dereferencing.)630
4015 y Ft(autocd)192 b Fu(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
4125 y(as)j(if)f(it)h(w)m(ere)f(the)h(argumen)m(t)g(to)g(the)f
Ft(cd)g Fu(command.)40 b(This)29 b(option)g(is)h(only)1110
4234 y(used)g(b)m(y)g(in)m(teractiv)m(e)j(shells.)630
4403 y Ft(cdable_vars)1110 4513 y Fu(If)h(this)h(is)g(set,)i(an)e
(argumen)m(t)g(to)h(the)f Ft(cd)f Fu(builtin)h(command)f(that)i(is)f
(not)1110 4623 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 4732 y(the)g(directory)f(to)i(c)m(hange)f(to.)630
4902 y Ft(cdspell)144 b Fu(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
Ft(cd)1110 5011 y Fu(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
3075 y(The)f(list)h(of)f Ft(shopt)f Fu(options)i(is:)630
3221 y Ft(array_expand_once)1110 3331 y Fu(If)39 b(set,)j(the)d(shell)g
(suppresses)e(m)m(ultiple)j(ev)-5 b(aluation)41 b(of)e(asso)s(ciativ)m
(e)j(and)1110 3440 y(indexed)37 b(arra)m(y)h(subscripts)e(during)g
(arithmetic)j(expression)e(ev)-5 b(aluation,)1110 3550
y(while)23 b(executing)h(builtins)f(that)g(can)h(p)s(erform)d(v)-5
b(ariable)24 b(assignmen)m(ts,)i(and)1110 3660 y(while)k(executing)i
(builtins)e(that)h(p)s(erform)e(arra)m(y)i(dereferencing.)630
3806 y Ft(assoc_expand_once)1110 3915 y Fu(Deprecated;)h(a)f(synon)m
(ym)f(for)g Ft(array_expand_once)p Fu(.)630 4061 y Ft(autocd)192
b Fu(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 4171 y(as)j(if)f(it)h(w)m(ere)f
(the)h(argumen)m(t)g(to)g(the)f Ft(cd)g Fu(command.)40
b(This)29 b(option)g(is)h(only)1110 4281 y(used)g(b)m(y)g(in)m
(teractiv)m(e)j(shells.)630 4427 y Ft(cdable_vars)1110
4536 y Fu(If)h(this)h(is)g(set,)i(an)e(argumen)m(t)g(to)h(the)f
Ft(cd)f Fu(builtin)h(command)f(that)i(is)f(not)1110 4646
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 4756
y(the)g(directory)f(to)i(c)m(hange)f(to.)630 4902 y Ft(cdspell)144
b Fu(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 Ft(cd)1110 5011
y Fu(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
5121 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 5230 y(correction)25 b(is)e(found,)g(the)h(corrected)g
+7 -3
View File
@@ -5700,12 +5700,16 @@ option.
The list of @code{shopt} options is:
@table @code
@item assoc_expand_once
If set, the shell suppresses multiple evaluation of associative array
subscripts during arithmetic expression evaluation, while executing
@item array_expand_once
If set, the shell suppresses multiple evaluation of
associative and indexed array subscripts
during arithmetic expression evaluation, while executing
builtins that can perform variable assignments,
and while executing builtins that perform array dereferencing.
@item assoc_expand_once
Deprecated; a synonym for @code{array_expand_once}.
@item autocd
If set, a command name that is the name of a directory is executed as if
it were the argument to the @code{cd} command.
+7 -5
View File
@@ -1377,12 +1377,14 @@ BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
The list of sshhoopptt options is:
aassssoocc__eexxppaanndd__oonnccee
aarrrraayy__eexxppaanndd__oonnccee
If set, the shell suppresses multiple evaluation of as-
sociative array subscripts during arithmetic expression
evaluation, while executing builtins that can perform
variable assignments, and while executing builtins that
perform array dereferencing.
sociative and indexed array subscripts during arithmetic
expression evaluation, while executing builtins that can
perform variable assignments, and while executing
builtins that perform array dereferencing.
aassssoocc__eexxppaanndd__oonnccee
Deprecated; a synonym for aarrrraayy__eexxppaanndd__oonnccee.
aauuttooccdd If set, a command name that is the name of a directory
is executed as if it were the argument to the ccdd com-
mand. This option is only used by interactive shells.
+496 -493
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.22.4
%%CreationDate: Mon May 22 09:42:13 2023
%%CreationDate: Tue Jun 13 10:42:36 2023
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.22 4
+3 -3
View File
@@ -2,10 +2,10 @@
Copyright (C) 1988-2023 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Tue May 23 11:29:48 EDT 2023
@set LASTCHANGE Tue Jun 13 10:36:04 EDT 2023
@set EDITION 5.2
@set VERSION 5.2
@set UPDATED 23 May 2023
@set UPDATED-MONTH May 2023
@set UPDATED 13 June 2023
@set UPDATED-MONTH June 2023
+2 -2
View File
@@ -3900,7 +3900,7 @@ execute_cond_node (COND_COM *cond)
result = unary_test (cond->op->word, arg1, varflag) ? EXECUTION_SUCCESS : EXECUTION_FAILURE;
#if defined (ARRAY_VARS)
if (varop)
assoc_expand_once = oa;
array_expand_once = oa;
#endif
if (arg1 != nullstr)
free (arg1);
@@ -4217,7 +4217,7 @@ fix_assignment_words (WORD_LIST *words)
#if defined (ARRAY_VARS)
/* Set W_ARRAYREF on words that are valid array references to a builtin that
accepts them. This is intended to completely replace assoc_expand_once in
accepts them. This is intended to completely replace array_expand_once in
time. */
static void
fix_arrayref_words (WORD_LIST *words)
+4 -4
View File
@@ -330,7 +330,7 @@ expr_bind_variable (const char *lhs, const char *rhs)
return; /* XXX */
#if defined (ARRAY_VARS)
aflags = (assoc_expand_once && already_expanded) ? ASS_NOEXPAND : 0;
aflags = (array_expand_once && already_expanded) ? ASS_NOEXPAND : 0;
aflags |= ASS_ALLOWALLSUB; /* allow assoc[@]=value */
#else
aflags = 0;
@@ -352,13 +352,13 @@ expr_skipsubscript (char *vp, char *cp)
isassoc = 0;
entry = 0;
if (assoc_expand_once & already_expanded)
if (array_expand_once & already_expanded)
{
*cp = '\0';
isassoc = legal_identifier (vp) && (entry = find_variable (vp)) && assoc_p (entry);
*cp = '['; /* ] */
}
flags = (isassoc && assoc_expand_once && already_expanded) ? VA_NOEXPAND : 0;
flags = (isassoc && array_expand_once && already_expanded) ? VA_NOEXPAND : 0;
return (skipsubscript (cp, 0, flags));
}
@@ -1150,7 +1150,7 @@ expr_streval (char *tok, int e, struct lvalue *lvalue)
initial_depth = expr_depth;
#if defined (ARRAY_VARS)
tflag = (assoc_expand_once && already_expanded) ? AV_NOEXPAND : 0; /* for a start */
tflag = (array_expand_once && already_expanded) ? AV_NOEXPAND : 0; /* for a start */
#endif
/* [[[[[ */
+1 -1
View File
@@ -29,7 +29,6 @@
#include "general.h"
#include "error.h"
#include "variables.h"
#include "arrayfunc.h"
#include "quit.h"
#include "maxpath.h"
#include "unwind_prot.h"
@@ -37,6 +36,7 @@
#include "make_cmd.h"
#include "ocache.h"
#include "subst.h"
#include "arrayfunc.h"
#include "sig.h"
#include "pathnames.h"
#include "externs.h"
+1 -1
View File
@@ -617,7 +617,7 @@ unary_test (char *op, char *arg, int flags)
case 'v':
#if defined (ARRAY_VARS)
aflags = assoc_expand_once ? AV_NOEXPAND : 0;
aflags = array_expand_once ? AV_NOEXPAND : 0;
if (valid_array_reference (arg, aflags))
{
char *t;
+29
View File
@@ -793,3 +793,32 @@ declare -a aa=([0]="/homes/cj/Desktop:/homes/cj/Library:/homes/cj/Documents")
declare -a aa=([0]="/homes/cj/Desktop:/homes/cj/Library:/homes/cj/Documents")
declare -a aa=([0]="/homes/cj/Desktop:/homes/cj/Library:/homes/cj/Documents" [1]="/homes/cj/Applications")
declare -a aa=([0]="/homes/cj/Desktop:/homes/cj/Library:/homes/cj/Documents" [1]="/homes/cj/Applications")
./array32.sub: line 7: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
./array32.sub: line 8: declare: a: not found
./array32.sub: line 11: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
./array32.sub: line 12: declare: a: not found
./array32.sub: line 16: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
declare -a a=([0]="hi")
./array32.sub: line 22: declare: a: not found
./array32.sub: line 25: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
./array32.sub: line 26: declare: a: not found
./array32.sub: line 29: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
declare -a a
./array32.sub: line 37: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
declare -a a
./array32.sub: line 44: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
declare -ai a
./array32.sub: line 52: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
./array32.sub: line 53: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
./array32.sub: line 55: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
./array32.sub: line 62: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
declare -a a
./array32.sub: line 64: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
declare -a a
./array32.sub: line 67: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
declare -a a
./array32.sub: line 72: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
./array32.sub: line 78: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
declare -a a=()
./array32.sub: line 82: $(echo INJECTION! >&2 ; echo 0): arithmetic syntax error: operand expected (error token is "$(echo INJECTION! >&2 ; echo 0)")
declare -a a=()
+1
View File
@@ -428,3 +428,4 @@ ${THIS_SH} ./array28.sub
${THIS_SH} ./array29.sub
${THIS_SH} ./array30.sub
${THIS_SH} ./array31.sub
${THIS_SH} ./array32.sub
+86
View File
@@ -0,0 +1,86 @@
# change behavior of shell builtins to extend assoc_expand_once to indexed
# arrays
export subscript='$(echo INJECTION! >&2 ; echo 0)'
shopt -s array_expand_once
printf -v a["$subscript"] %s hi
declare -p a
unset a
printf -v "a[$subscript]" %s hi
declare -p a
a[0]=hi
unset a["$subscript"]
declare -p a
unset a
unset a["$subscript"]
declare -p a
unset -v a
read a["$subscript"] <<<hi
declare -p a
declare -a a
read a["$subscript"] <<<hi
declare -p a
unset -v a
declare -a a
{ sleep 1; exit 12; } & bgpid=$!
wait -n -p a["$subscript"] $bgpid
declare -p a
unset -v a
declare -a a
declare -i a["$subscript"]=42
declare -p a
# this still won't work because the quotes prevent it from being recognized as
# an assignment statement
#declare -i "a[$subscript]"=42
#declare -p a
test -v a["$subscript"] && echo set
[ -v a["$subscript"] ] && echo set
let a["$subscript"]+=1
unset -v a
# these are all already arithmetic expression errors
declare -a a
(( a[$subscript]++ ))
declare -p a
: $(( a[$subscript]++ ))
declare -p a
a[$subscript]=hi
declare -p a
# length shortcuts for unset variables, so give it a value
a[0]=zero
echo ${#a[$subscript]}
unset -v a
# compound assignments should not perform double expansion
a=( [$subscript]=hi )
declare -p a
declare -a a
a=( [$subscript]=hi )
declare -p a
unset -v a
+3
View File
@@ -2,6 +2,7 @@
shopt: usage: shopt [-pqsu] [-o] [optname ...]
--
shopt -u autocd
shopt -u array_expand_once
shopt -u assoc_expand_once
shopt -u cdable_vars
shopt -s cdspell
@@ -79,6 +80,7 @@ shopt -s promptvars
shopt -s sourcepath
--
shopt -u autocd
shopt -u array_expand_once
shopt -u assoc_expand_once
shopt -u cdable_vars
shopt -u checkhash
@@ -123,6 +125,7 @@ shopt -u varredir_close
shopt -u xpg_echo
--
autocd off
array_expand_once off
assoc_expand_once off
cdable_vars off
checkhash off
+2 -9
View File
@@ -3329,18 +3329,11 @@ bind_int_variable (const char *lhs, const char *rhs, int flags)
isint = isarr = implicitarray = 0;
#if defined (ARRAY_VARS)
/* Don't rely on VA_NOEXPAND being 1, set it explicitly */
vflags = (flags & ASS_NOEXPAND) ? VA_NOEXPAND : 0;
if (flags & ASS_ONEWORD)
vflags |= VA_ONEWORD;
vflags = convert_assign_flags_to_validarray_flags (flags);
if (valid_array_reference (lhs, vflags))
{
isarr = 1;
avflags = 0;
/* Common code to translate between assignment and reference flags. */
if (flags & ASS_NOEXPAND)
avflags |= AV_NOEXPAND;
if (flags & ASS_ONEWORD)
avflags |= AV_ONEWORD;
avflags = convert_assign_flags_to_arrayval_flags (flags);
v = array_variable_part (lhs, avflags, (char **)0, (int *)0);
}
else if (legal_identifier (lhs) == 0)