getting ready for bash-5.2

This commit is contained in:
Chet Ramey
2022-01-11 15:53:25 -05:00
parent be7fc0525e
commit 5e6f45d9b1
32 changed files with 8325 additions and 7093 deletions
+323
View File
@@ -1,3 +1,326 @@
This document details the changes between this version, bash-5.2-alpha, and
the previous version, bash-5.1-release.
1. Changes to Bash
a. Fixed a bug that assigned a value to the variable name supplied as an
argument to `wait -p' when there were no jobs.
b. Fixed a bug that resulted in performing incorrect word expansion on the
key/value pairs in a compound array assignment.
c. Fixed a bug that could put the child forked to run a command substitution
into the wrong process group.
d. Fixed a problem that could cause the lastpipe option to work incorrectly if
file descriptor 0 was closed.
e. Bash tries to suppress traps if a forked child receives a trapped signal
before it has a chance to reset its signal handlers.
f. Fixed several memory leaks in compound array assignments.
g. Fixed a problem with performing an assignment with `+=' to an array element
that was the value of a nameref.
h. Fixed a bug that could cause a nameref containing an array reference using
`@' or `*' not to expand to multiple words.
i. Fixed a bug where extended glob functions could match `.' or `..' when it
wasn't explicitly specified, even if dotglob was set.
j. Fixed a bug that caused non-interactive posix-mode shells not to exit on a
variable assignment error while assigning into the temporary environment.
k. Fixed a bug that caused parsing errors if an alias contained a compound
array assignment.
l. Fixed a couple of instances where bash checked syntax too aggressively when
trying to determine how to add a partial command to command-oriented
history.
m. Fixed a parser problem that caused it not to allow reserved words to follow
the `((' and `[[' commands.
n. Fixed a bad offset calculation when using negative offsets to `history -d'.
o. Fixed an off-by-one error that caused a read past the end of a buffer when
reading a multibyte character from the output of a command substitution.
p. Fixed a problem with a failed `exec' command not setting $? to the right
value for an exit trap.
q. Fixed a problem that caused bash not to unlink FIFOs created as part of
expanding redirections for an external command.
r. Fixed a bug that could cause aliases not to be expanded in case statements.
s. Fixed a bug that could cause word completion to attempt programmable
completion for the target of a redirection, instead of filename completion.
t. Fixed a bug that could result in errors after rebinding a key sequence with
`bind -x' multiple times.
u. Fixed a problem that could result in not quoting the result when performing
command name completion with a glob pattern in the command name.
v. `mapfile' now uses fully-buffered reads in more cases, which should improve
bulk read performance.
w. Fixed a bug that caused `wait -n' to not reset its internal state when
interrupted by a signal, resulting in subsequent calls failing.
x. Fixed a bug with parsing numeric arguments to readline key sequences
installed with `bind -x'.
y. Bash suppresses forking in several additional cases, including most uses
of $(<file).
z. If there are multiple `!' tokens in a [[ command, toggle the invert state
instead of setting it unconditionally.
aa. Fixed a bug where running `fc' on an empty history list would cause the
shell to crash.
bb. Word completion now checks whether or not a quote character closes a
quoted string begun on a previous line, so readline doesn't interpret the
quote as starting a new quoted string.
cc. Fixed a typo that translated \UNNNNNNNN characters that were not valid in
the current locale encoding as \uNNNNNNNN.
dd. Fixed an issue that could cause bash to print timing statistics for the
wrong command when `set -e' causes a command to fail.
ee. Bash now runs the exit trap in function context if a failed command in
the function causes the shell to exit.
ff. Some fixes to how subshells modify $SHLVL.
gg. Fixed a bug that caused `mapfile -t' not to remove the delimiter when the
delimiter is > 128 in the current encoding.
hh. Fixed a problem that could cause the shell to attempt to free unallocated
memory if an expansion error occurred.
ii. Fixed a bug in the bash malloc implementation of malloc_usable_size. Bash
did not use it, but it could cause problems with library functions that
did.
jj. If the `exec' builtin fails, and the shell does not exit, it restores
trapped signals to their trapped state.
kk. Fixed a bug that could cause variable assignment arguments to `declare' to
expand variables using attributes that the call to declare was turning off.
ll. Fixed a bug with LINENO and arithmetic for commands.
mm. Fixed a posix-mode bug that caused tildes not to be expanded after an
unquoted colon on the right side of an assignment statement.
nn. Fixed a problem with `caller' and line numbers when executing an ERR trap.
oo. Fixed a problem that could make the value returned by ${a:=b} not be the
final value assigned to a (e.g., if `a' has an attribute that modifies
the value on assignment).
pp. Fixed a problem with saving multi-line here-documents to the history list
where the here-document delimiter does not appear on the first line.
qq. Fixed a bug with using += to assign to dynamic variables like RANDOM.
rr. Fixed a bug that caused `set -n' to modify $? if set after execution had
started.
ss. Builtins like printf/read/wait now behave more consistently when assigning
arbitrary keys to associative arrays (like `]'. when appropriately quoted).
tt. Fixed a problem with here-document collection printing the wrong prompt
when parsing a compound list in an interactive shell.
uu. Fixed a problem with quoting shell expansion characters (like `$') when
they appear in a tab-completed word along with characters that do need
quoting (e.g.. $HOME/VirtualBox VMs).
2. Changes to Readline
a. Fixed a problem with cleaning up active marks when using callback mode.
b. Fixed a problem with arithmetic comparison operators checking the version.
c. Fixed a problem that could cause readline not to build on systems without
POSIX signal functions.
d. Fixed a bug that could cause readline to crash if the application removed
the callback line handler before readline read all typeahead.
e. Added additional checks for read errors in the middle of readline commands.
f. Fixed a redisplay problem that occurred when switching from the digit-
argument prompt `(arg: N)' back to the regular prompt and the regular
prompt contained invisible characters.
g. Fixed a problem with restoring the prompt when aborting an incremental
search.
h. Fix a problem with characters > 128 not being displayed correctly in certain
single-byte encodings.
i. Fixed a problem with unix-filename-rubout that caused it to delete too much
when applied to a pathname consisting only of one or more slashes.
j. Fixed a display problem that caused the prompt to be wrapped incorrectly if
the screen changed dimensions during a call to readline() and the prompt
became longer than the screen width.
k. Fixed a problem that caused the \r output by turning off bracketed paste
to overwrite the line if terminal echo was disabled.
l. Fixed a bug that could cause colored-completion-prefix to not display if
completion-prefix-display-length was set.
m. Fixed a problem with line wrapping prompts when a group of invisible
characters runs to the right edge of the screen and the prompt extends
longer then the screen width.
n. Fixed a couple problems that could cause rl_end to be set incorrectly by
transpose-words.
3. New Features in Bash
a. The bash malloc returns memory that is aligned on 16-byte boundaries.
b. There is a new internal timer framework used for read builtin timeouts.
c. Rewrote the command substitution parsing code to call the parser recursively
and rebuild the command string from the parsed command. This allows better
syntax checking and catches errors much earlier.
d. The `ulimit' builtin now treats an operand remaining after all of the options
and arguments are parsed as an argument to the last command specified by
an option. This is for POSIX compatibility.
e. Here-document parsing now handles $'...' and $"..." quoting when reading the
here-document body.
f. The `shell-expand-line' and `history-and-alias-expand-line' bindable readline
commands now understand $'...' and $"..." quoting.
g. There is a new `spell-correct-word' bindable readline command to perform
spelling correction on the current word.
h. The `unset' builtin now attempts to treat arguments as array subscripts
without parsing or expanding the subscript, even when `assoc_expand_once'
is not set.
i. There is a default value for $BASH_LOADABLES_PATH in config-top.h.
j. Associative array assignment and certain instances of referencing (e.g.,
`test -v' now allow `@' and `*' to be used as keys.
k. Bash attempts to expand indexed array subscripts only once when executing
shell constructs and word expansions.
l. The `unset' builtin allows a subscript of `@' or `*' to unset a key with
that value for associative arrays instead of unsetting the entire array
(which you can still do with `unset arrayname'). For indexed arrays, it
removes all elements of the array without unsetting it (like `A=()').
m. Additional builtins (printf/test/read/wait) do a better job of not
parsing array subscripts if array_expand_once is set.
n. New READLINE_ARGUMENT variable set to numeric argument for readline commands
defined using `bind -x'.
o. The new `varredir_close' shell option causes bash to automatically close
file descriptors opened with {var}<fn and other styles of varassign
redirection unless they're arguments to the `exec' builtin.
p. The `$0' special parameter is now set to the name of the script when running
any (non-interactive) startup files such as $BASH_ENV.
q. The `enable' builtin tries to load a loadable builtin using the default
search path if `enable name' (without any options) attempts to enable a
non-existent builtin.
r. The `printf' builtin has a new format specifier: %Q. This acts like %q but
applies any specified precision to the original unquoted argument, then
quotes and outputs the result.
s. The new `noexpand_translations' option controls whether or not the translated
output of $"..." is single-quoted.
t. There is a new parameter transformation operator: @k. This is like @K, but
expands the result to separate words after word splitting.
u. There is an alternate array implementation, selectable at `configure' time,
that optimizes access speed over memory use (use the new configure
--enable-alt-array-implementation option).
v. If an [N]<&WORD- or [N]>&WORD- redirection has WORD expand to the empty
string, treat the redirection as [N]<&- or [N]>&- and close file descriptor
N (default 0).
w. Invalid parameter transformation operators are now invalid word expansions,
and so cause fatal errors in non-interactive shells.
x. New shell option: patsub_replacement. When enabled, a `&' in the replacement
string of the pattern substitution expansion is replaced by the portion of
the string that matched the pattern. Backslash will escape the `&' and
insert a literal `&'.
y. `command -p' no longer looks in the hash table for the specified command.
z. The new `--enable-translatable-strings' option to `configure' allows $"..."
support to be compiled in or out.
aa. The new `globskipdots' shell option forces pathname expansion never to
return `.' or `..' unless explicitly matched.
bb. Array references using `@' and `*' that are the value of nameref variables
(declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
set -u is enabled and the array (v) is unset.
4. New Features in Readline
a. There is now an HS_HISTORY_VERSION containing the version number of the
history library for applications to use.
b. History expansion better understands multiple history expansions that may
contain strings that would ordinarily inhibit history expansion (e.g.,
`abc!$!$').
c. There is a new framework for readline timeouts, including new public
functions to set timeouts and query how much time is remaining before a
timeout hits, and a hook function that can trigger when readline times
out. There is a new state value to indicate a timeout.
d. Automatically bind termcap key sequences for page-up and page-down to
history-search-backward and history-search-forward, respectively.
e. There is a new `fetch-history' bindable command that retrieves the history
entry corresponding to its numeric argument. Negative arguments count back
from the end of the history.
f. `vi-undo' is now a bindable command.
g. There is a new option: `enable-active-region'. This separates control of
the active region and bracketed-paste. It has the same default value as
bracketed-paste, and enabling bracketed paste enables the active region.
Users can now turn off the active region while leaving bracketed paste
enabled.
h. rl_completer_word_break_characters is now `const char *' like
rl_basic_word_break_characters.
i. The non-incremental history searches now leave the current history offset
at the position of the last matching history entry, like incremental search.
j. Readline looks in $LS_COLORS for a custom filename extension
(*.readline-colored-completion-prefix) and uses that as the default color
for the common prefix displayed when `colored-completion-prefix' is set.
------------------------------------------------------------------------------
This document details the changes between this version, bash-5.1-rc3, and
the previous version, bash-5.1-rc2.
+322
View File
@@ -0,0 +1,322 @@
This document details the changes between this version, bash-5.2-alpha, and
the previous version, bash-5.1-release.
1. Changes to Bash
a. Fixed a bug that assigned a value to the variable name supplied as an
argument to `wait -p' when there were no jobs.
b. Fixed a bug that resulted in performing incorrect word expansion on the
key/value pairs in a compound array assignment.
c. Fixed a bug that could put the child forked to run a command substitution
into the wrong process group.
d. Fixed a problem that could cause the lastpipe option to work incorrectly if
file descriptor 0 was closed.
e. Bash tries to suppress traps if a forked child receives a trapped signal
before it has a chance to reset its signal handlers.
f. Fixed several memory leaks in compound array assignments.
g. Fixed a problem with performing an assignment with `+=' to an array element
that was the value of a nameref.
h. Fixed a bug that could cause a nameref containing an array reference using
`@' or `*' not to expand to multiple words.
i. Fixed a bug where extended glob functions could match `.' or `..' when it
wasn't explicitly specified, even if dotglob was set.
j. Fixed a bug that caused non-interactive posix-mode shells not to exit on a
variable assignment error while assigning into the temporary environment.
k. Fixed a bug that caused parsing errors if an alias contained a compound
array assignment.
l. Fixed a couple of instances where bash checked syntax too aggressively when
trying to determine how to add a partial command to command-oriented
history.
m. Fixed a parser problem that caused it not to allow reserved words to follow
the `((' and `[[' commands.
n. Fixed a bad offset calculation when using negative offsets to `history -d'.
o. Fixed an off-by-one error that caused a read past the end of a buffer when
reading a multibyte character from the output of a command substitution.
p. Fixed a problem with a failed `exec' command not setting $? to the right
value for an exit trap.
q. Fixed a problem that caused bash not to unlink FIFOs created as part of
expanding redirections for an external command.
r. Fixed a bug that could cause aliases not to be expanded in case statements.
s. Fixed a bug that could cause word completion to attempt programmable
completion for the target of a redirection, instead of filename completion.
t. Fixed a bug that could result in errors after rebinding a key sequence with
`bind -x' multiple times.
u. Fixed a problem that could result in not quoting the result when performing
command name completion with a glob pattern in the command name.
v. `mapfile' now uses fully-buffered reads in more cases, which should improve
bulk read performance.
w. Fixed a bug that caused `wait -n' to not reset its internal state when
interrupted by a signal, resulting in subsequent calls failing.
x. Fixed a bug with parsing numeric arguments to readline key sequences
installed with `bind -x'.
y. Bash suppresses forking in several additional cases, including most uses
of $(<file).
z. If there are multiple `!' tokens in a [[ command, toggle the invert state
instead of setting it unconditionally.
aa. Fixed a bug where running `fc' on an empty history list would cause the
shell to crash.
bb. Word completion now checks whether or not a quote character closes a
quoted string begun on a previous line, so readline doesn't interpret the
quote as starting a new quoted string.
cc. Fixed a typo that translated \UNNNNNNNN characters that were not valid in
the current locale encoding as \uNNNNNNNN.
dd. Fixed an issue that could cause bash to print timing statistics for the
wrong command when `set -e' causes a command to fail.
ee. Bash now runs the exit trap in function context if a failed command in
the function causes the shell to exit.
ff. Some fixes to how subshells modify $SHLVL.
gg. Fixed a bug that caused `mapfile -t' not to remove the delimiter when the
delimiter is > 128 in the current encoding.
hh. Fixed a problem that could cause the shell to attempt to free unallocated
memory if an expansion error occurred.
ii. Fixed a bug in the bash malloc implementation of malloc_usable_size. Bash
did not use it, but it could cause problems with library functions that
did.
jj. If the `exec' builtin fails, and the shell does not exit, it restores
trapped signals to their trapped state.
kk. Fixed a bug that could cause variable assignment arguments to `declare' to
expand variables using attributes that the call to declare was turning off.
ll. Fixed a bug with LINENO and arithmetic for commands.
mm. Fixed a posix-mode bug that caused tildes not to be expanded after an
unquoted colon on the right side of an assignment statement.
nn. Fixed a problem with `caller' and line numbers when executing an ERR trap.
oo. Fixed a problem that could make the value returned by ${a:=b} not be the
final value assigned to a (e.g., if `a' has an attribute that modifies
the value on assignment).
pp. Fixed a problem with saving multi-line here-documents to the history list
where the here-document delimiter does not appear on the first line.
qq. Fixed a bug with using += to assign to dynamic variables like RANDOM.
rr. Fixed a bug that caused `set -n' to modify $? if set after execution had
started.
ss. Builtins like printf/read/wait now behave more consistently when assigning
arbitrary keys to associative arrays (like `]'. when appropriately quoted).
tt. Fixed a problem with here-document collection printing the wrong prompt
when parsing a compound list in an interactive shell.
uu. Fixed a problem with quoting shell expansion characters (like `$') when
they appear in a tab-completed word along with characters that do need
quoting (e.g.. $HOME/VirtualBox VMs).
2. Changes to Readline
a. Fixed a problem with cleaning up active marks when using callback mode.
b. Fixed a problem with arithmetic comparison operators checking the version.
c. Fixed a problem that could cause readline not to build on systems without
POSIX signal functions.
d. Fixed a bug that could cause readline to crash if the application removed
the callback line handler before readline read all typeahead.
e. Added additional checks for read errors in the middle of readline commands.
f. Fixed a redisplay problem that occurred when switching from the digit-
argument prompt `(arg: N)' back to the regular prompt and the regular
prompt contained invisible characters.
g. Fixed a problem with restoring the prompt when aborting an incremental
search.
h. Fix a problem with characters > 128 not being displayed correctly in certain
single-byte encodings.
i. Fixed a problem with unix-filename-rubout that caused it to delete too much
when applied to a pathname consisting only of one or more slashes.
j. Fixed a display problem that caused the prompt to be wrapped incorrectly if
the screen changed dimensions during a call to readline() and the prompt
became longer than the screen width.
k. Fixed a problem that caused the \r output by turning off bracketed paste
to overwrite the line if terminal echo was disabled.
l. Fixed a bug that could cause colored-completion-prefix to not display if
completion-prefix-display-length was set.
m. Fixed a problem with line wrapping prompts when a group of invisible
characters runs to the right edge of the screen and the prompt extends
longer then the screen width.
n. Fixed a couple problems that could cause rl_end to be set incorrectly by
transpose-words.
3. New Features in Bash
a. The bash malloc returns memory that is aligned on 16-byte boundaries.
b. There is a new internal timer framework used for read builtin timeouts.
c. Rewrote the command substitution parsing code to call the parser recursively
and rebuild the command string from the parsed command. This allows better
syntax checking and catches errors much earlier.
d. The `ulimit' builtin now treats an operand remaining after all of the options
and arguments are parsed as an argument to the last command specified by
an option. This is for POSIX compatibility.
e. Here-document parsing now handles $'...' and $"..." quoting when reading the
here-document body.
f. The `shell-expand-line' and `history-and-alias-expand-line' bindable readline
commands now understand $'...' and $"..." quoting.
g. There is a new `spell-correct-word' bindable readline command to perform
spelling correction on the current word.
h. The `unset' builtin now attempts to treat arguments as array subscripts
without parsing or expanding the subscript, even when `assoc_expand_once'
is not set.
i. There is a default value for $BASH_LOADABLES_PATH in config-top.h.
j. Associative array assignment and certain instances of referencing (e.g.,
`test -v' now allow `@' and `*' to be used as keys.
k. Bash attempts to expand indexed array subscripts only once when executing
shell constructs and word expansions.
l. The `unset' builtin allows a subscript of `@' or `*' to unset a key with
that value for associative arrays instead of unsetting the entire array
(which you can still do with `unset arrayname'). For indexed arrays, it
removes all elements of the array without unsetting it (like `A=()').
m. Additional builtins (printf/test/read/wait) do a better job of not
parsing array subscripts if array_expand_once is set.
n. New READLINE_ARGUMENT variable set to numeric argument for readline commands
defined using `bind -x'.
o. The new `varredir_close' shell option causes bash to automatically close
file descriptors opened with {var}<fn and other styles of varassign
redirection unless they're arguments to the `exec' builtin.
p. The `$0' special parameter is now set to the name of the script when running
any (non-interactive) startup files such as $BASH_ENV.
q. The `enable' builtin tries to load a loadable builtin using the default
search path if `enable name' (without any options) attempts to enable a
non-existent builtin.
r. The `printf' builtin has a new format specifier: %Q. This acts like %q but
applies any specified precision to the original unquoted argument, then
quotes and outputs the result.
s. The new `noexpand_translations' option controls whether or not the translated
output of $"..." is single-quoted.
t. There is a new parameter transformation operator: @k. This is like @K, but
expands the result to separate words after word splitting.
u. There is an alternate array implementation, selectable at `configure' time,
that optimizes access speed over memory use (use the new configure
--enable-alt-array-implementation option).
v. If an [N]<&WORD- or [N]>&WORD- redirection has WORD expand to the empty
string, treat the redirection as [N]<&- or [N]>&- and close file descriptor
N (default 0).
w. Invalid parameter transformation operators are now invalid word expansions,
and so cause fatal errors in non-interactive shells.
x. New shell option: patsub_replacement. When enabled, a `&' in the replacement
string of the pattern substitution expansion is replaced by the portion of
the string that matched the pattern. Backslash will escape the `&' and
insert a literal `&'.
y. `command -p' no longer looks in the hash table for the specified command.
z. The new `--enable-translatable-strings' option to `configure' allows $"..."
support to be compiled in or out.
aa. The new `globskipdots' shell option forces pathname expansion never to
return `.' or `..' unless explicitly matched.
bb. Array references using `@' and `*' that are the value of nameref variables
(declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
set -u is enabled and the array (v) is unset.
4. New Features in Readline
a. There is now an HS_HISTORY_VERSION containing the version number of the
history library for applications to use.
b. History expansion better understands multiple history expansions that may
contain strings that would ordinarily inhibit history expansion (e.g.,
`abc!$!$').
c. There is a new framework for readline timeouts, including new public
functions to set timeouts and query how much time is remaining before a
timeout hits, and a hook function that can trigger when readline times
out. There is a new state value to indicate a timeout.
d. Automatically bind termcap key sequences for page-up and page-down to
history-search-backward and history-search-forward, respectively.
e. There is a new `fetch-history' bindable command that retrieves the history
entry corresponding to its numeric argument. Negative arguments count back
from the end of the history.
f. `vi-undo' is now a bindable command.
g. There is a new option: `enable-active-region'. This separates control of
the active region and bracketed-paste. It has the same default value as
bracketed-paste, and enabling bracketed paste enables the active region.
Users can now turn off the active region while leaving bracketed paste
enabled.
h. rl_completer_word_break_characters is now `const char *' like
rl_basic_word_break_characters.
i. The non-incremental history searches now leave the current history offset
at the position of the last matching history entry, like incremental search.
j. Readline looks in $LS_COLORS for a custom filename extension
(*.readline-colored-completion-prefix) and uses that as the default color
for the common prefix displayed when `colored-completion-prefix' is set.
+14 -2
View File
@@ -1739,7 +1739,7 @@ lib/readline/text.c
----
complete.c,readline.c,readline.h
- rl_completer_word_break_characters: now const char * like
rl_basic_word_break_characters; element of eadline state struct
rl_basic_word_break_characters; element of readline state struct
used to save it also const. THIS IS AN API CHANGE
bashline.c
@@ -2613,7 +2613,7 @@ lib/malloc/malloc.c
bashhist.c
- bash_add_history: if we're parsing a here-document (PST_HEREDOC), only
suppress adding the newline between lines if we're not at the first
line of the here-document (here_doc_first_line!= 0). From a report
line of the here-document (here_doc_first_line != 0). From a report
by S0AndS0 <strangerthanbland@gmail.com>
12/8
@@ -2902,3 +2902,15 @@ bashline.c
filename is unquoted (*QCP == 0) so the word will be expanded and is
not part of the filename (if needed, we can use file_exists to check
whether the expansion characters are actually part of the filename)
1/7
---
examples/loadables/accept.c
- new -b bindaddr option to bind to a specific IP address
- move setsockopt calls before bind() to avoid TIME_WAIT issues. Fixes
from Dzogovic Vehbo <dzove855@gmail.com>
1/10
----
configure.ac
- bumped version to 5.2-alpha.
+4
View File
@@ -473,6 +473,10 @@ does not provide the necessary support.
'--enable-strict-posix-default'
Make Bash POSIX-conformant by default (*note Bash POSIX Mode::).
'--enable-translatable-strings'
Enable support for '$"STRING"' translatable strings (*note Locale
Translation::).
'--enable-usg-echo-default'
A synonym for '--enable-xpg-echo-default'.
+139
View File
@@ -1,3 +1,142 @@
This is a terse description of the new features added to bash-5.2 since
the release of bash-5.1. As always, the manual page (doc/bash.1) is
the place to look for complete descriptions.
1. New Features in Bash
a. The bash malloc returns memory that is aligned on 16-byte boundaries.
b. There is a new internal timer framework used for read builtin timeouts.
c. Rewrote the command substitution parsing code to call the parser recursively
and rebuild the command string from the parsed command. This allows better
syntax checking and catches errors much earlier.
d. The `ulimit' builtin now treats an operand remaining after all of the options
and arguments are parsed as an argument to the last command specified by
an option. This is for POSIX compatibility.
e. Here-document parsing now handles $'...' and $"..." quoting when reading the
here-document body.
f. The `shell-expand-line' and `history-and-alias-expand-line' bindable readline
commands now understand $'...' and $"..." quoting.
g. There is a new `spell-correct-word' bindable readline command to perform
spelling correction on the current word.
h. The `unset' builtin now attempts to treat arguments as array subscripts
without parsing or expanding the subscript, even when `assoc_expand_once'
is not set.
i. There is a default value for $BASH_LOADABLES_PATH in config-top.h.
j. Associative array assignment and certain instances of referencing (e.g.,
`test -v' now allow `@' and `*' to be used as keys.
k. Bash attempts to expand indexed array subscripts only once when executing
shell constructs and word expansions.
l. The `unset' builtin allows a subscript of `@' or `*' to unset a key with
that value for associative arrays instead of unsetting the entire array
(which you can still do with `unset arrayname'). For indexed arrays, it
removes all elements of the array without unsetting it (like `A=()').
m. Additional builtins (printf/test/read/wait) do a better job of not
parsing array subscripts if array_expand_once is set.
n. New READLINE_ARGUMENT variable set to numeric argument for readline commands
defined using `bind -x'.
o. The new `varredir_close' shell option causes bash to automatically close
file descriptors opened with {var}<fn and other styles of varassign
redirection unless they're arguments to the `exec' builtin.
p. The `$0' special parameter is now set to the name of the script when running
any (non-interactive) startup files such as $BASH_ENV.
q. The `enable' builtin tries to load a loadable builtin using the default
search path if `enable name' (without any options) attempts to enable a
non-existent builtin.
r. The `printf' builtin has a new format specifier: %Q. This acts like %q but
applies any specified precision to the original unquoted argument, then
quotes and outputs the result.
s. The new `noexpand_translations' option controls whether or not the translated
output of $"..." is single-quoted.
t. There is a new parameter transformation operator: @k. This is like @K, but
expands the result to separate words after word splitting.
u. There is an alternate array implementation, selectable at `configure' time,
that optimizes access speed over memory use (use the new configure
--enable-alt-array-implementation option).
v. If an [N]<&WORD- or [N]>&WORD- redirection has WORD expand to the empty
string, treat the redirection as [N]<&- or [N]>&- and close file descriptor
N (default 0).
w. Invalid parameter transformation operators are now invalid word expansions,
and so cause fatal errors in non-interactive shells.
x. New shell option: patsub_replacement. When enabled, a `&' in the replacement
string of the pattern substitution expansion is replaced by the portion of
the string that matched the pattern. Backslash will escape the `&' and
insert a literal `&'.
y. `command -p' no longer looks in the hash table for the specified command.
z. The new `--enable-translatable-strings' option to `configure' allows $"..."
support to be compiled in or out.
aa. The new `globskipdots' shell option forces pathname expansion never to
return `.' or `..' unless explicitly matched.
bb. Array references using `@' and `*' that are the value of nameref variables
(declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
set -u is enabled and the array (v) is unset.
2. New Features in Readline
a. There is now an HS_HISTORY_VERSION containing the version number of the
history library for applications to use.
b. History expansion better understands multiple history expansions that may
contain strings that would ordinarily inhibit history expansion (e.g.,
`abc!$!$').
c. There is a new framework for readline timeouts, including new public
functions to set timeouts and query how much time is remaining before a
timeout hits, and a hook function that can trigger when readline times
out. There is a new state value to indicate a timeout.
d. Automatically bind termcap key sequences for page-up and page-down to
history-search-backward and history-search-forward, respectively.
e. There is a new `fetch-history' bindable command that retrieves the history
entry corresponding to its numeric argument. Negative arguments count back
from the end of the history.
f. `vi-undo' is now a bindable command.
g. There is a new option: `enable-active-region'. This separates control of
the active region and bracketed-paste. It has the same default value as
bracketed-paste, and enabling bracketed paste enables the active region.
Users can now turn off the active region while leaving bracketed paste
enabled.
h. rl_completer_word_break_characters is now `const char *' like
rl_basic_word_break_characters.
i. The non-incremental history searches now leave the current history offset
at the position of the last matching history entry, like incremental search.
j. Readline looks in $LS_COLORS for a custom filename extension
(*.readline-colored-completion-prefix) and uses that as the default color
for the common prefix displayed when `colored-completion-prefix' is set.
-------------------------------------------------------------------------------
This is a terse description of the new features added to bash-5.1 since
the release of bash-5.0. As always, the manual page (doc/bash.1) is
the place to look for complete descriptions.
+137
View File
@@ -0,0 +1,137 @@
This is a terse description of the new features added to bash-5.2 since
the release of bash-5.1. As always, the manual page (doc/bash.1) is
the place to look for complete descriptions.
1. New Features in Bash
a. The bash malloc returns memory that is aligned on 16-byte boundaries.
b. There is a new internal timer framework used for read builtin timeouts.
c. Rewrote the command substitution parsing code to call the parser recursively
and rebuild the command string from the parsed command. This allows better
syntax checking and catches errors much earlier.
d. The `ulimit' builtin now treats an operand remaining after all of the options
and arguments are parsed as an argument to the last command specified by
an option. This is for POSIX compatibility.
e. Here-document parsing now handles $'...' and $"..." quoting when reading the
here-document body.
f. The `shell-expand-line' and `history-and-alias-expand-line' bindable readline
commands now understand $'...' and $"..." quoting.
g. There is a new `spell-correct-word' bindable readline command to perform
spelling correction on the current word.
h. The `unset' builtin now attempts to treat arguments as array subscripts
without parsing or expanding the subscript, even when `assoc_expand_once'
is not set.
i. There is a default value for $BASH_LOADABLES_PATH in config-top.h.
j. Associative array assignment and certain instances of referencing (e.g.,
`test -v' now allow `@' and `*' to be used as keys.
k. Bash attempts to expand indexed array subscripts only once when executing
shell constructs and word expansions.
l. The `unset' builtin allows a subscript of `@' or `*' to unset a key with
that value for associative arrays instead of unsetting the entire array
(which you can still do with `unset arrayname'). For indexed arrays, it
removes all elements of the array without unsetting it (like `A=()').
m. Additional builtins (printf/test/read/wait) do a better job of not
parsing array subscripts if array_expand_once is set.
n. New READLINE_ARGUMENT variable set to numeric argument for readline commands
defined using `bind -x'.
o. The new `varredir_close' shell option causes bash to automatically close
file descriptors opened with {var}<fn and other styles of varassign
redirection unless they're arguments to the `exec' builtin.
p. The `$0' special parameter is now set to the name of the script when running
any (non-interactive) startup files such as $BASH_ENV.
q. The `enable' builtin tries to load a loadable builtin using the default
search path if `enable name' (without any options) attempts to enable a
non-existent builtin.
r. The `printf' builtin has a new format specifier: %Q. This acts like %q but
applies any specified precision to the original unquoted argument, then
quotes and outputs the result.
s. The new `noexpand_translations' option controls whether or not the translated
output of $"..." is single-quoted.
t. There is a new parameter transformation operator: @k. This is like @K, but
expands the result to separate words after word splitting.
u. There is an alternate array implementation, selectable at `configure' time,
that optimizes access speed over memory use (use the new configure
--enable-alt-array-implementation option).
v. If an [N]<&WORD- or [N]>&WORD- redirection has WORD expand to the empty
string, treat the redirection as [N]<&- or [N]>&- and close file descriptor
N (default 0).
w. Invalid parameter transformation operators are now invalid word expansions,
and so cause fatal errors in non-interactive shells.
x. New shell option: patsub_replacement. When enabled, a `&' in the replacement
string of the pattern substitution expansion is replaced by the portion of
the string that matched the pattern. Backslash will escape the `&' and
insert a literal `&'.
y. `command -p' no longer looks in the hash table for the specified command.
z. The new `--enable-translatable-strings' option to `configure' allows $"..."
support to be compiled in or out.
aa. The new `globskipdots' shell option forces pathname expansion never to
return `.' or `..' unless explicitly matched.
bb. Array references using `@' and `*' that are the value of nameref variables
(declare -n ref='v[@]' ; echo $ref) no longer cause the shell to exit if
set -u is enabled and the array (v) is unset.
2. New Features in Readline
a. There is now an HS_HISTORY_VERSION containing the version number of the
history library for applications to use.
b. History expansion better understands multiple history expansions that may
contain strings that would ordinarily inhibit history expansion (e.g.,
`abc!$!$').
c. There is a new framework for readline timeouts, including new public
functions to set timeouts and query how much time is remaining before a
timeout hits, and a hook function that can trigger when readline times
out. There is a new state value to indicate a timeout.
d. Automatically bind termcap key sequences for page-up and page-down to
history-search-backward and history-search-forward, respectively.
e. There is a new `fetch-history' bindable command that retrieves the history
entry corresponding to its numeric argument. Negative arguments count back
from the end of the history.
f. `vi-undo' is now a bindable command.
g. There is a new option: `enable-active-region'. This separates control of
the active region and bracketed-paste. It has the same default value as
bracketed-paste, and enabling bracketed paste enables the active region.
Users can now turn off the active region while leaving bracketed paste
enabled.
h. rl_completer_word_break_characters is now `const char *' like
rl_basic_word_break_characters.
i. The non-incremental history searches now leave the current history offset
at the position of the last matching history entry, like incremental search.
j. Readline looks in $LS_COLORS for a custom filename extension
(*.readline-colored-completion-prefix) and uses that as the default color
for the common prefix displayed when `colored-completion-prefix' is set.
+3 -3
View File
@@ -1,7 +1,7 @@
Introduction
============
This is GNU Bash, version 5.1. Bash is the GNU Project's Bourne
This is GNU Bash, version 5.2. Bash is the GNU Project's Bourne
Again SHell, a complete implementation of the POSIX shell spec,
but also with interactive command line editing, job control on
architectures that support it, csh-like features such as history
@@ -15,8 +15,8 @@ See the file POSIX for a discussion of how the Bash defaults differ
from the POSIX spec and a description of the Bash `posix mode'.
There are some user-visible incompatibilities between this version
of Bash and previous widely-distributed versions, bash-4.4 and
bash-5.0. For details, see the file COMPAT. The NEWS file tersely
of Bash and previous widely-distributed versions, bash-4.4, bash-5.0,
and bash-5.1. For details, see the file COMPAT. The NEWS file tersely
lists features that are new in this release.
Bash is free software, distributed under the terms of the [GNU] General
Vendored
+11 -11
View File
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac for Bash 5.2, version 5.038.
# From configure.ac for Bash 5.2, version 5.039.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for bash 5.2-devel.
# Generated by GNU Autoconf 2.71 for bash 5.2-alpha.
#
# Report bugs to <bug-bash@gnu.org>.
#
@@ -612,8 +612,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='bash'
PACKAGE_TARNAME='bash'
PACKAGE_VERSION='5.2-devel'
PACKAGE_STRING='bash 5.2-devel'
PACKAGE_VERSION='5.2-alpha'
PACKAGE_STRING='bash 5.2-alpha'
PACKAGE_BUGREPORT='bug-bash@gnu.org'
PACKAGE_URL=''
@@ -1467,7 +1467,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures bash 5.2-devel to adapt to many kinds of systems.
\`configure' configures bash 5.2-alpha to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1533,7 +1533,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of bash 5.2-devel:";;
short | recursive ) echo "Configuration of bash 5.2-alpha:";;
esac
cat <<\_ACEOF
@@ -1740,7 +1740,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
bash configure 5.2-devel
bash configure 5.2-alpha
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2397,7 +2397,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by bash $as_me 5.2-devel, which was
It was created by bash $as_me 5.2-alpha, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -3176,7 +3176,7 @@ ac_config_headers="$ac_config_headers config.h"
BASHVERS=5.2
RELSTATUS=devel
RELSTATUS=alpha
case "$RELSTATUS" in
alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
@@ -22330,7 +22330,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by bash $as_me 5.2-devel, which was
This file was extended by bash $as_me 5.2-alpha, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -22398,7 +22398,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
bash config.status 5.2-devel
bash config.status 5.2-alpha
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
+3 -3
View File
@@ -5,7 +5,7 @@ dnl report bugs to chet@po.cwru.edu
dnl
dnl Process this file with autoconf to produce a configure script.
# Copyright (C) 1987-2021 Free Software Foundation, Inc.
# Copyright (C) 1987-2022 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
@@ -21,10 +21,10 @@ dnl Process this file with autoconf to produce a configure script.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
AC_REVISION([for Bash 5.2, version 5.038])dnl
AC_REVISION([for Bash 5.2, version 5.039])dnl
define(bashvers, 5.2)
define(relstatus, devel)
define(relstatus, alpha)
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
+395 -387
View File
File diff suppressed because it is too large Load Diff
+39 -10
View File
@@ -3,7 +3,7 @@
</HEAD>
<BODY><TABLE WIDTH=100%>
<TR>
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2021 November 22<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2021 December 26<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<BR><A HREF="#index">Index</A>
@@ -368,7 +368,7 @@ An <I>interactive</I> shell is one started without non-option arguments
and without the
<B>-c</B>
option
option,
whose standard input and error are
both connected to terminals (as determined by
<I>isatty</I>(3)),
@@ -941,7 +941,7 @@ Expressions are composed of the primaries described below under
</FONT>
The words between the <B>[[</B> and <B>]]</B> do not undergo word splitting
and filename expansion.
and pathname expansion.
The shell performs tilde expansion, parameter and
variable expansion, arithmetic expansion, command substitution, process
substitution, and quote removal on those words
@@ -2557,15 +2557,15 @@ builtin command when no arguments are supplied.
<DD>
Each time this parameter is
referenced, the number of seconds since shell invocation is returned. If a
value is assigned to
referenced, it expands to the number of seconds since shell invocation.
If a value is assigned to
<FONT SIZE=-1><B>SECONDS</B>,
</FONT>
the value returned upon subsequent
references is
the number of seconds since the assignment plus the value assigned.
The number of seconds at shell invocation and the current time is always
The number of seconds at shell invocation and the current time are always
determined by querying the system clock.
If
<FONT SIZE=-1><B>SECONDS</B>
@@ -4681,6 +4681,18 @@ even if
<B>dotglob</B>
is set.
If the
<B>globskipdots</B>
shell option is enabled, the filenames
<B>``.''</B>
and
<B>``..''</B>
are never matched, even if the pattern begins with a
<B>``.''</B>.
When not matching pathnames, the
<B>``.''</B>
@@ -4704,6 +4716,8 @@ for a description of the
<B>nullglob</B>,
<B>globskipdots</B>,
<B>failglob</B>,
and
@@ -12524,7 +12538,9 @@ Exit after reading and executing one command.
<DD>
Treat unset variables and parameters other than the special
parameters &quot;@&quot; and &quot;*&quot; as an error when performing
parameters &quot;@&quot; and &quot;*&quot;,
or array variables subscripted with &quot;@&quot; or &quot;*&quot;,
as an error when performing
parameter expansion. If expansion is attempted on an
unset variable or parameter, the shell prints an error message, and,
if not interactive, exits with a non-zero status.
@@ -13046,6 +13062,19 @@ and
<B>B</B>,
and upper-case and lower-case ASCII characters will collate together.
<DT><B>globskipdots</B>
<DD>
If set, pathname expansion will never match the filenames
<B>``.''</B>
and
<B>``..''</B>,
even if the pattern begins with a
<B>``.''</B>.
This option is enabled by default.
<DT><B>globstar</B>
<DD>
@@ -14588,7 +14617,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%>2021 November 22<TH ALIGN=RIGHT width=33%>BASH(1)
<TH ALIGN=LEFT width=33%>GNU Bash 5.2<TH ALIGN=CENTER width=33%>2021 December 26<TH ALIGN=RIGHT width=33%>BASH(1)
</TR>
</TABLE>
<HR>
@@ -14694,7 +14723,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 bash.1.<BR>
Time: 22 November 2021 11:02:25 EST
This document was created by man2html from /usr/local/src/bash/bash-20220105/doc/bash.1.<BR>
Time: 11 January 2022 15:02:14 EST
</BODY>
</HTML>
+154 -146
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, 2 December 2021).
Bash shell (version 5.2, 26 December 2021).
This is Edition 5.2, last updated 2 December 2021, of 'The GNU Bash
This is Edition 5.2, last updated 26 December 2021, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Copyright (C) 1988-2021 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, 2 December 2021). The Bash home page is
Bash shell (version 5.2, 26 December 2021). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.2, last updated 2 December 2021, of 'The GNU Bash
This is Edition 5.2, last updated 26 December 2021, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Bash contains features that appear in other popular shells, and some
@@ -2344,8 +2344,10 @@ characters.
the start of a filename or immediately following a slash must be matched
explicitly, unless the shell option 'dotglob' is set. In order to match
the filenames '.' and '..', the pattern must begin with '.' (for
example, '.?'), even if 'dotglob' is set. When not matching filenames,
the '.' character is not treated specially.
example, '.?'), even if 'dotglob' is set. If the 'globskipdots' shell
option is enabled, the filenames '.' and '..' are never matched, even if
the pattern begins with a '.'. When not matching filenames, the '.'
character is not treated specially.
When matching a filename, the slash character must always be matched
explicitly by a slash in the pattern, but in other matching contexts it
@@ -2353,8 +2355,8 @@ can be matched by a special pattern character as described below (*note
Pattern Matching::).
See the description of 'shopt' in *note The Shopt Builtin::, for a
description of the 'nocaseglob', 'nullglob', 'failglob', and 'dotglob'
options.
description of the 'nocaseglob', 'nullglob', 'globskipdots', 'failglob',
and 'dotglob' options.
The 'GLOBIGNORE' shell variable may be used to restrict the set of
file names matching a pattern. If 'GLOBIGNORE' is set, each matching
@@ -4566,9 +4568,10 @@ parameters, or to display the names and values of shell variables.
'-u'
Treat unset variables and parameters other than the special
parameters '@' or '*' as an error when performing parameter
expansion. An error message will be written to the standard
error, and a non-interactive shell will exit.
parameters '@' or '*', or array variables subscripted with '@'
or '*', as an error when performing parameter expansion. An
error message will be written to the standard error, and a
non-interactive shell will exit.
'-v'
Print shell input lines as they are read.
@@ -4860,6 +4863,11 @@ This builtin allows you to change additional shell optional behavior.
upper-case and lower-case ASCII characters will collate
together.
'globskipdots'
If set, filename expansion will never match the filenames '.'
and '..', even if the pattern begins with a '.'. This option
is enabled by default.
'globstar'
If set, the pattern '**' used in a filename expansion context
will match all files and zero or more directories and
@@ -5753,7 +5761,7 @@ Variables::).
started. Assignment to this variable resets the count to the value
assigned, and the expanded value becomes the value assigned plus
the number of seconds since the assignment. The number of seconds
at shell invocation and the current time is always determined by
at shell invocation and the current time are always determined by
querying the system clock. If 'SECONDS' is unset, it loses its
special properties, even if it is subsequently reset.
@@ -6148,8 +6156,8 @@ File: bash.info, Node: What is an Interactive Shell?, Next: Is this Shell Inte
6.3.1 What is an Interactive Shell?
-----------------------------------
An interactive shell is one started without non-option arguments, unless
'-s' is specified, without specifying the '-c' option, and whose input
An interactive shell is one started without non-option arguments (unless
'-s' is specified) and without specifying the '-c' option, whose input
and error output are both connected to terminals (as determined by
'isatty(3)'), or one started with the '-i' option.
@@ -12414,138 +12422,138 @@ D.5 Concept Index

Tag Table:
Node: Top892
Node: Introduction2807
Node: What is Bash?3020
Node: What is a shell?4131
Node: Definitions6666
Node: Basic Shell Features9614
Node: Shell Syntax10830
Node: Shell Operation11853
Node: Quoting13143
Node: Escape Character14444
Node: Single Quotes14926
Node: Double Quotes15271
Node: ANSI-C Quoting16546
Node: Locale Translation17853
Node: Creating Internationalized Scripts19161
Node: Comments23275
Node: Shell Commands23890
Node: Reserved Words24825
Node: Simple Commands25578
Node: Pipelines26229
Node: Lists29185
Node: Compound Commands30977
Node: Looping Constructs31986
Node: Conditional Constructs34478
Node: Command Grouping48819
Node: Coprocesses50294
Node: GNU Parallel52954
Node: Shell Functions53868
Node: Shell Parameters61156
Node: Positional Parameters65541
Node: Special Parameters66440
Node: Shell Expansions69651
Node: Brace Expansion71775
Node: Tilde Expansion74506
Node: Shell Parameter Expansion77124
Node: Command Substitution94987
Node: Arithmetic Expansion96339
Node: Process Substitution97304
Node: Word Splitting98421
Node: Filename Expansion100362
Node: Pattern Matching102959
Node: Quote Removal107564
Node: Redirections107856
Node: Executing Commands117513
Node: Simple Command Expansion118180
Node: Command Search and Execution120287
Node: Command Execution Environment122662
Node: Environment125694
Node: Exit Status127354
Node: Signals129135
Node: Shell Scripts132581
Node: Shell Builtin Commands135605
Node: Bourne Shell Builtins137640
Node: Bash Builtins159098
Node: Modifying Shell Behavior189951
Node: The Set Builtin190293
Node: The Shopt Builtin200832
Node: Special Builtins216543
Node: Shell Variables217519
Node: Bourne Shell Variables217953
Node: Bash Variables220054
Node: Bash Features252866
Node: Invoking Bash253876
Node: Bash Startup Files259886
Node: Interactive Shells264986
Node: What is an Interactive Shell?265393
Node: Is this Shell Interactive?266039
Node: Interactive Shell Behavior266851
Node: Bash Conditional Expressions270477
Node: Shell Arithmetic275116
Node: Aliases278057
Node: Arrays280667
Node: The Directory Stack286911
Node: Directory Stack Builtins287692
Node: Controlling the Prompt291949
Node: The Restricted Shell294911
Node: Bash POSIX Mode297518
Node: Shell Compatibility Mode308788
Node: Job Control316814
Node: Job Control Basics317271
Node: Job Control Builtins322270
Node: Job Control Variables327667
Node: Command Line Editing328820
Node: Introduction and Notation330488
Node: Readline Interaction332108
Node: Readline Bare Essentials333296
Node: Readline Movement Commands335076
Node: Readline Killing Commands336033
Node: Readline Arguments337948
Node: Searching338989
Node: Readline Init File341172
Node: Readline Init File Syntax342430
Node: Conditional Init Constructs363915
Node: Sample Init File368108
Node: Bindable Readline Commands371229
Node: Commands For Moving372430
Node: Commands For History374478
Node: Commands For Text379469
Node: Commands For Killing383115
Node: Numeric Arguments386145
Node: Commands For Completion387281
Node: Keyboard Macros391469
Node: Miscellaneous Commands392153
Node: Readline vi Mode398089
Node: Programmable Completion398993
Node: Programmable Completion Builtins406770
Node: A Programmable Completion Example417462
Node: Using History Interactively422706
Node: Bash History Facilities423387
Node: Bash History Builtins426389
Node: History Interaction431394
Node: Event Designators435011
Node: Word Designators436362
Node: Modifiers438119
Node: Installing Bash439927
Node: Basic Installation441061
Node: Compilers and Options444780
Node: Compiling For Multiple Architectures445518
Node: Installation Names447208
Node: Specifying the System Type449314
Node: Sharing Defaults450027
Node: Operation Controls450697
Node: Optional Features451652
Node: Reporting Bugs462867
Node: Major Differences From The Bourne Shell464139
Node: GNU Free Documentation License480986
Node: Indexes506160
Node: Builtin Index506611
Node: Reserved Word Index513435
Node: Variable Index515880
Node: Function Index532369
Node: Concept Index546150
Node: Top894
Node: Introduction2811
Node: What is Bash?3024
Node: What is a shell?4135
Node: Definitions6670
Node: Basic Shell Features9618
Node: Shell Syntax10834
Node: Shell Operation11857
Node: Quoting13147
Node: Escape Character14448
Node: Single Quotes14930
Node: Double Quotes15275
Node: ANSI-C Quoting16550
Node: Locale Translation17857
Node: Creating Internationalized Scripts19165
Node: Comments23279
Node: Shell Commands23894
Node: Reserved Words24829
Node: Simple Commands25582
Node: Pipelines26233
Node: Lists29189
Node: Compound Commands30981
Node: Looping Constructs31990
Node: Conditional Constructs34482
Node: Command Grouping48823
Node: Coprocesses50298
Node: GNU Parallel52958
Node: Shell Functions53872
Node: Shell Parameters61160
Node: Positional Parameters65545
Node: Special Parameters66444
Node: Shell Expansions69655
Node: Brace Expansion71779
Node: Tilde Expansion74510
Node: Shell Parameter Expansion77128
Node: Command Substitution94991
Node: Arithmetic Expansion96343
Node: Process Substitution97308
Node: Word Splitting98425
Node: Filename Expansion100366
Node: Pattern Matching103112
Node: Quote Removal107717
Node: Redirections108009
Node: Executing Commands117666
Node: Simple Command Expansion118333
Node: Command Search and Execution120440
Node: Command Execution Environment122815
Node: Environment125847
Node: Exit Status127507
Node: Signals129288
Node: Shell Scripts132734
Node: Shell Builtin Commands135758
Node: Bourne Shell Builtins137793
Node: Bash Builtins159251
Node: Modifying Shell Behavior190104
Node: The Set Builtin190446
Node: The Shopt Builtin201044
Node: Special Builtins216953
Node: Shell Variables217929
Node: Bourne Shell Variables218363
Node: Bash Variables220464
Node: Bash Features253277
Node: Invoking Bash254287
Node: Bash Startup Files260297
Node: Interactive Shells265397
Node: What is an Interactive Shell?265804
Node: Is this Shell Interactive?266450
Node: Interactive Shell Behavior267262
Node: Bash Conditional Expressions270888
Node: Shell Arithmetic275527
Node: Aliases278468
Node: Arrays281078
Node: The Directory Stack287322
Node: Directory Stack Builtins288103
Node: Controlling the Prompt292360
Node: The Restricted Shell295322
Node: Bash POSIX Mode297929
Node: Shell Compatibility Mode309199
Node: Job Control317225
Node: Job Control Basics317682
Node: Job Control Builtins322681
Node: Job Control Variables328078
Node: Command Line Editing329231
Node: Introduction and Notation330899
Node: Readline Interaction332519
Node: Readline Bare Essentials333707
Node: Readline Movement Commands335487
Node: Readline Killing Commands336444
Node: Readline Arguments338359
Node: Searching339400
Node: Readline Init File341583
Node: Readline Init File Syntax342841
Node: Conditional Init Constructs364326
Node: Sample Init File368519
Node: Bindable Readline Commands371640
Node: Commands For Moving372841
Node: Commands For History374889
Node: Commands For Text379880
Node: Commands For Killing383526
Node: Numeric Arguments386556
Node: Commands For Completion387692
Node: Keyboard Macros391880
Node: Miscellaneous Commands392564
Node: Readline vi Mode398500
Node: Programmable Completion399404
Node: Programmable Completion Builtins407181
Node: A Programmable Completion Example417873
Node: Using History Interactively423117
Node: Bash History Facilities423798
Node: Bash History Builtins426800
Node: History Interaction431805
Node: Event Designators435422
Node: Word Designators436773
Node: Modifiers438530
Node: Installing Bash440338
Node: Basic Installation441472
Node: Compilers and Options445191
Node: Compiling For Multiple Architectures445929
Node: Installation Names447619
Node: Specifying the System Type449725
Node: Sharing Defaults450438
Node: Operation Controls451108
Node: Optional Features452063
Node: Reporting Bugs463278
Node: Major Differences From The Bourne Shell464550
Node: GNU Free Documentation License481397
Node: Indexes506571
Node: Builtin Index507022
Node: Reserved Word Index513846
Node: Variable Index516291
Node: Function Index532780
Node: Concept Index546561

End Tag Table
BIN
View File
Binary file not shown.
+3607 -3623
View File
File diff suppressed because it is too large Load Diff
+9 -9
View File
@@ -363,28 +363,28 @@
@xrdef{Optional Features-pg}{160}
@xrdef{Reporting Bugs-title}{Reporting Bugs}
@xrdef{Reporting Bugs-snt}{Appendix@tie @char65{}}
@xrdef{Reporting Bugs-pg}{165}
@xrdef{Reporting Bugs-pg}{166}
@xrdef{Major Differences From The Bourne Shell-title}{Major Differences From The Bourne Shell}
@xrdef{Major Differences From The Bourne Shell-snt}{Appendix@tie @char66{}}
@xrdef{Major Differences From The Bourne Shell-pg}{166}
@xrdef{Major Differences From The Bourne Shell-pg}{167}
@xrdef{GNU Free Documentation License-title}{GNU Free Documentation License}
@xrdef{GNU Free Documentation License-snt}{Appendix@tie @char67{}}
@xrdef{GNU Free Documentation License-pg}{172}
@xrdef{GNU Free Documentation License-pg}{173}
@xrdef{Indexes-title}{Indexes}
@xrdef{Indexes-snt}{Appendix@tie @char68{}}
@xrdef{Builtin Index-title}{Index of Shell Builtin Commands}
@xrdef{Builtin Index-snt}{Section@tie @char68.1}
@xrdef{Indexes-pg}{180}
@xrdef{Builtin Index-pg}{180}
@xrdef{Indexes-pg}{181}
@xrdef{Builtin Index-pg}{181}
@xrdef{Reserved Word Index-title}{Index of Shell Reserved Words}
@xrdef{Reserved Word Index-snt}{Section@tie @char68.2}
@xrdef{Variable Index-title}{Parameter and Variable Index}
@xrdef{Variable Index-snt}{Section@tie @char68.3}
@xrdef{Reserved Word Index-pg}{181}
@xrdef{Variable Index-pg}{182}
@xrdef{Reserved Word Index-pg}{182}
@xrdef{Variable Index-pg}{183}
@xrdef{Function Index-title}{Function Index}
@xrdef{Function Index-snt}{Section@tie @char68.4}
@xrdef{Function Index-pg}{184}
@xrdef{Function Index-pg}{185}
@xrdef{Concept Index-title}{Concept Index}
@xrdef{Concept Index-snt}{Section@tie @char68.5}
@xrdef{Concept Index-pg}{186}
@xrdef{Concept Index-pg}{187}
BIN
View File
Binary file not shown.
+52 -15
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, 22 November 2021).
the Bash shell (version 5.2, 26 December 2021).
This is Edition 5.2, last updated 22 November 2021,
This is Edition 5.2, last updated 26 December 2021,
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, 22 November 2021).
the Bash shell (version 5.2, 26 December 2021).
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 22 November 2021,
<p>This is Edition 5.2, last updated 26 December 2021,
of <cite>The GNU Bash Reference Manual</cite>,
for <code>Bash</code>, Version 5.2.
</p>
@@ -3192,6 +3192,9 @@ must be matched explicitly, unless the shell option <code>dotglob</code> is set.
In order to match the filenames &lsquo;<samp>.</samp>&rsquo; and &lsquo;<samp>..</samp>&rsquo;,
the pattern must begin with &lsquo;<samp>.</samp>&rsquo; (for example, &lsquo;<samp>.?</samp>&rsquo;),
even if <code>dotglob</code> is set.
If the <code>globskipdots</code> shell option is enabled, the filenames
&lsquo;<samp>.</samp>&rsquo; and &lsquo;<samp>..</samp>&rsquo; are never matched, even if the pattern begins
with a &lsquo;<samp>.</samp>&rsquo;.
When not matching filenames, the &lsquo;<samp>.</samp>&rsquo; character is not treated specially.
</p>
<p>When matching a filename, the slash character must always be
@@ -3201,6 +3204,7 @@ below (see <a href="#Pattern-Matching">Pattern Matching</a>).
</p>
<p>See the description of <code>shopt</code> in <a href="#The-Shopt-Builtin">The Shopt Builtin</a>,
for a description of the <code>nocaseglob</code>, <code>nullglob</code>,
<code>globskipdots</code>,
<code>failglob</code>, and <code>dotglob</code> options.
</p>
<p>The <code>GLOBIGNORE</code>
@@ -6025,7 +6029,9 @@ This option cannot be unset once it has been set.
</dd>
<dt><span><code>-u</code></span></dt>
<dd><p>Treat unset variables and parameters other than the special parameters
&lsquo;<samp>@</samp>&rsquo; or &lsquo;<samp>*</samp>&rsquo; as an error when performing parameter expansion.
&lsquo;<samp>@</samp>&rsquo; or &lsquo;<samp>*</samp>&rsquo;,
or array variables subscripted with &lsquo;<samp>@</samp>&rsquo; or &lsquo;<samp>*</samp>&rsquo;,
as an error when performing parameter expansion.
An error message will be written to the standard error, and a non-interactive
shell will exit.
</p>
@@ -6378,6 +6384,13 @@ is not taken into account, so
and upper-case and lower-case ASCII characters will collate together.
</p>
</dd>
<dt><span><code>globskipdots</code></span></dt>
<dd><p>If set, filename expansion will never match the filenames
&lsquo;<samp>.</samp>&rsquo; and &lsquo;<samp>..</samp>&rsquo;,
even if the pattern begins with a &lsquo;<samp>.</samp>&rsquo;.
This option is enabled by default.
</p>
</dd>
<dt><span><code>globstar</code></span></dt>
<dd><p>If set, the pattern &lsquo;<samp>**</samp>&rsquo; used in a filename expansion context will
match all files and zero or more directories and subdirectories.
@@ -7502,12 +7515,11 @@ with &lsquo;<samp>bind -x</samp>&rsquo; (see <a href="#Bash-Builtins">Bash Built
</p>
</dd>
<dt id='index-SECONDS'><span><code>SECONDS</code><a href='#index-SECONDS' class='copiable-anchor'> &para;</a></span></dt>
<dd><p>This variable expands to the number of seconds since the
shell was started. Assignment to this variable resets
the count to the value assigned, and the expanded value
becomes the value assigned plus the number of seconds
<dd><p>This variable expands to the number of seconds since the shell was started.
Assignment to this variable resets the count to the value assigned, and the
expanded value becomes the value assigned plus the number of seconds
since the assignment.
The number of seconds at shell invocation and the current time is always
The number of seconds at shell invocation and the current time are always
determined by querying the system clock.
If <code>SECONDS</code>
is unset, it loses its special properties,
@@ -7989,8 +8001,9 @@ Next: <a href="#Is-this-Shell-Interactive_003f" accesskey="n" rel="next">Is this
<span id="What-is-an-Interactive-Shell_003f-1"></span><h4 class="subsection">6.3.1 What is an Interactive Shell?</h4>
<p>An interactive shell
is one started without non-option arguments, unless <samp>-s</samp> is
specified, without specifying the <samp>-c</samp> option, and
is one started without non-option arguments
(unless <samp>-s</samp> is specified)
and without specifying the <samp>-c</samp> option,
whose input and error output are both
connected to terminals (as determined by <code>isatty(3)</code>),
or one started with the <samp>-i</samp> option.
@@ -9483,9 +9496,28 @@ when the <samp>-l</samp> option is supplied.
</dd>
<dt><span><code>compat51 (set using BASH_COMPAT)</code></span></dt>
<dd><ul>
<li> The <code>unset</code> builtin treats attempts to unset array subscripts &lsquo;<samp>@</samp>&rsquo;
and &lsquo;<samp>*</samp>&rsquo; differently depending on whether the array is indexed or
associative, and differently than in previous versions.
<li> The <code>unset</code> builtin will unset the array <code>a</code> given an argument like
&lsquo;<samp>a[@]</samp>&rsquo;.
Bash-5.2 will unset an element with key &lsquo;<samp>@</samp>&rsquo; (associative arrays)
or remove all the elements without unsetting the array (indexed arrays)
</li><li> arithmetic commands ( ((...)) ) and the expressions in an arithmetic for
statement can be expanded more than once
</li><li> expressions used as arguments to arithmetic operators in the <code>[[</code>
conditional command can be expanded more than once
</li><li> the expressions in substring parameter brace expansion can be
expanded more than once
</li><li> the expressions in the $(( ... )) word expansion can be expanded
more than once
</li><li> arithmetic expressions used as indexed array subscripts can be
expanded more than once
</li><li> <code>test -v</code>, when given an argument of &lsquo;<samp>A[@]</samp>&rsquo;, where <var>A</var> is
an existing associative array, will return true if the array has any set
elements.
Bash-5.2 will look for and report on a key named &lsquo;<samp>@</samp>&rsquo;
</li><li> the ${<var>parameter</var>[:]=<var>value</var>} word expansion will return
<var>value</var>, before any variable-specific transformations have been
performed (e.g., converting to lowercase).
Bash-5.2 will return the final value assigned to the variable.
</li></ul>
</dd>
</dl>
@@ -13711,6 +13743,11 @@ literals.
<dd><p>Make Bash <small>POSIX</small>-conformant by default (see <a href="#Bash-POSIX-Mode">Bash POSIX Mode</a>).
</p>
</dd>
<dt><span><code>--enable-translatable-strings</code></span></dt>
<dd><p>Enable support for <code>$&quot;<var>string</var>&quot;</code> translatable strings
(see <a href="#Locale-Translation">Locale-Specific Translation</a>).
</p>
</dd>
<dt><span><code>--enable-usg-echo-default</code></span></dt>
<dd><p>A synonym for <code>--enable-xpg-echo-default</code>.
</p>
+153 -145
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, 2 December 2021).
Bash shell (version 5.2, 26 December 2021).
This is Edition 5.2, last updated 2 December 2021, of 'The GNU Bash
This is Edition 5.2, last updated 26 December 2021, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Copyright (C) 1988-2021 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, 2 December 2021). The Bash home page is
Bash shell (version 5.2, 26 December 2021). The Bash home page is
<http://www.gnu.org/software/bash/>.
This is Edition 5.2, last updated 2 December 2021, of 'The GNU Bash
This is Edition 5.2, last updated 26 December 2021, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.2.
Bash contains features that appear in other popular shells, and some
@@ -2345,8 +2345,10 @@ characters.
the start of a filename or immediately following a slash must be matched
explicitly, unless the shell option 'dotglob' is set. In order to match
the filenames '.' and '..', the pattern must begin with '.' (for
example, '.?'), even if 'dotglob' is set. When not matching filenames,
the '.' character is not treated specially.
example, '.?'), even if 'dotglob' is set. If the 'globskipdots' shell
option is enabled, the filenames '.' and '..' are never matched, even if
the pattern begins with a '.'. When not matching filenames, the '.'
character is not treated specially.
When matching a filename, the slash character must always be matched
explicitly by a slash in the pattern, but in other matching contexts it
@@ -2354,8 +2356,8 @@ can be matched by a special pattern character as described below (*note
Pattern Matching::).
See the description of 'shopt' in *note The Shopt Builtin::, for a
description of the 'nocaseglob', 'nullglob', 'failglob', and 'dotglob'
options.
description of the 'nocaseglob', 'nullglob', 'globskipdots', 'failglob',
and 'dotglob' options.
The 'GLOBIGNORE' shell variable may be used to restrict the set of
file names matching a pattern. If 'GLOBIGNORE' is set, each matching
@@ -4567,9 +4569,10 @@ parameters, or to display the names and values of shell variables.
'-u'
Treat unset variables and parameters other than the special
parameters '@' or '*' as an error when performing parameter
expansion. An error message will be written to the standard
error, and a non-interactive shell will exit.
parameters '@' or '*', or array variables subscripted with '@'
or '*', as an error when performing parameter expansion. An
error message will be written to the standard error, and a
non-interactive shell will exit.
'-v'
Print shell input lines as they are read.
@@ -4861,6 +4864,11 @@ This builtin allows you to change additional shell optional behavior.
upper-case and lower-case ASCII characters will collate
together.
'globskipdots'
If set, filename expansion will never match the filenames '.'
and '..', even if the pattern begins with a '.'. This option
is enabled by default.
'globstar'
If set, the pattern '**' used in a filename expansion context
will match all files and zero or more directories and
@@ -6149,8 +6157,8 @@ File: bashref.info, Node: What is an Interactive Shell?, Next: Is this Shell I
6.3.1 What is an Interactive Shell?
-----------------------------------
An interactive shell is one started without non-option arguments, unless
'-s' is specified, without specifying the '-c' option, and whose input
An interactive shell is one started without non-option arguments (unless
'-s' is specified) and without specifying the '-c' option, whose input
and error output are both connected to terminals (as determined by
'isatty(3)'), or one started with the '-i' option.
@@ -12415,138 +12423,138 @@ D.5 Concept Index

Tag Table:
Node: Top895
Node: Introduction2813
Node: What is Bash?3029
Node: What is a shell?4143
Node: Definitions6681
Node: Basic Shell Features9632
Node: Shell Syntax10851
Node: Shell Operation11877
Node: Quoting13170
Node: Escape Character14474
Node: Single Quotes14959
Node: Double Quotes15307
Node: ANSI-C Quoting16585
Node: Locale Translation17895
Node: Creating Internationalized Scripts19206
Node: Comments23323
Node: Shell Commands23941
Node: Reserved Words24879
Node: Simple Commands25635
Node: Pipelines26289
Node: Lists29248
Node: Compound Commands31043
Node: Looping Constructs32055
Node: Conditional Constructs34550
Node: Command Grouping48894
Node: Coprocesses50372
Node: GNU Parallel53035
Node: Shell Functions53952
Node: Shell Parameters61243
Node: Positional Parameters65631
Node: Special Parameters66533
Node: Shell Expansions69747
Node: Brace Expansion71874
Node: Tilde Expansion74608
Node: Shell Parameter Expansion77229
Node: Command Substitution95095
Node: Arithmetic Expansion96450
Node: Process Substitution97418
Node: Word Splitting98538
Node: Filename Expansion100482
Node: Pattern Matching103082
Node: Quote Removal107690
Node: Redirections107985
Node: Executing Commands117645
Node: Simple Command Expansion118315
Node: Command Search and Execution120425
Node: Command Execution Environment122803
Node: Environment125838
Node: Exit Status127501
Node: Signals129285
Node: Shell Scripts132734
Node: Shell Builtin Commands135761
Node: Bourne Shell Builtins137799
Node: Bash Builtins159260
Node: Modifying Shell Behavior190116
Node: The Set Builtin190461
Node: The Shopt Builtin201003
Node: Special Builtins216717
Node: Shell Variables217696
Node: Bourne Shell Variables218133
Node: Bash Variables220237
Node: Bash Features253053
Node: Invoking Bash254066
Node: Bash Startup Files260079
Node: Interactive Shells265182
Node: What is an Interactive Shell?265592
Node: Is this Shell Interactive?266241
Node: Interactive Shell Behavior267056
Node: Bash Conditional Expressions270685
Node: Shell Arithmetic275327
Node: Aliases278271
Node: Arrays280884
Node: The Directory Stack287131
Node: Directory Stack Builtins287915
Node: Controlling the Prompt292175
Node: The Restricted Shell295140
Node: Bash POSIX Mode297750
Node: Shell Compatibility Mode309023
Node: Job Control317052
Node: Job Control Basics317512
Node: Job Control Builtins322514
Node: Job Control Variables327914
Node: Command Line Editing329070
Node: Introduction and Notation330741
Node: Readline Interaction332364
Node: Readline Bare Essentials333555
Node: Readline Movement Commands335338
Node: Readline Killing Commands336298
Node: Readline Arguments338216
Node: Searching339260
Node: Readline Init File341446
Node: Readline Init File Syntax342707
Node: Conditional Init Constructs364195
Node: Sample Init File368391
Node: Bindable Readline Commands371515
Node: Commands For Moving372719
Node: Commands For History374770
Node: Commands For Text379764
Node: Commands For Killing383413
Node: Numeric Arguments386446
Node: Commands For Completion387585
Node: Keyboard Macros391776
Node: Miscellaneous Commands392463
Node: Readline vi Mode398402
Node: Programmable Completion399309
Node: Programmable Completion Builtins407089
Node: A Programmable Completion Example417784
Node: Using History Interactively423031
Node: Bash History Facilities423715
Node: Bash History Builtins426720
Node: History Interaction431728
Node: Event Designators435348
Node: Word Designators436702
Node: Modifiers438462
Node: Installing Bash440273
Node: Basic Installation441410
Node: Compilers and Options445132
Node: Compiling For Multiple Architectures445873
Node: Installation Names447566
Node: Specifying the System Type449675
Node: Sharing Defaults450391
Node: Operation Controls451064
Node: Optional Features452022
Node: Reporting Bugs463240
Node: Major Differences From The Bourne Shell464515
Node: GNU Free Documentation License481365
Node: Indexes506542
Node: Builtin Index506996
Node: Reserved Word Index513823
Node: Variable Index516271
Node: Function Index532763
Node: Concept Index546547
Node: Top897
Node: Introduction2817
Node: What is Bash?3033
Node: What is a shell?4147
Node: Definitions6685
Node: Basic Shell Features9636
Node: Shell Syntax10855
Node: Shell Operation11881
Node: Quoting13174
Node: Escape Character14478
Node: Single Quotes14963
Node: Double Quotes15311
Node: ANSI-C Quoting16589
Node: Locale Translation17899
Node: Creating Internationalized Scripts19210
Node: Comments23327
Node: Shell Commands23945
Node: Reserved Words24883
Node: Simple Commands25639
Node: Pipelines26293
Node: Lists29252
Node: Compound Commands31047
Node: Looping Constructs32059
Node: Conditional Constructs34554
Node: Command Grouping48898
Node: Coprocesses50376
Node: GNU Parallel53039
Node: Shell Functions53956
Node: Shell Parameters61247
Node: Positional Parameters65635
Node: Special Parameters66537
Node: Shell Expansions69751
Node: Brace Expansion71878
Node: Tilde Expansion74612
Node: Shell Parameter Expansion77233
Node: Command Substitution95099
Node: Arithmetic Expansion96454
Node: Process Substitution97422
Node: Word Splitting98542
Node: Filename Expansion100486
Node: Pattern Matching103235
Node: Quote Removal107843
Node: Redirections108138
Node: Executing Commands117798
Node: Simple Command Expansion118468
Node: Command Search and Execution120578
Node: Command Execution Environment122956
Node: Environment125991
Node: Exit Status127654
Node: Signals129438
Node: Shell Scripts132887
Node: Shell Builtin Commands135914
Node: Bourne Shell Builtins137952
Node: Bash Builtins159413
Node: Modifying Shell Behavior190269
Node: The Set Builtin190614
Node: The Shopt Builtin201215
Node: Special Builtins217127
Node: Shell Variables218106
Node: Bourne Shell Variables218543
Node: Bash Variables220647
Node: Bash Features253463
Node: Invoking Bash254476
Node: Bash Startup Files260489
Node: Interactive Shells265592
Node: What is an Interactive Shell?266002
Node: Is this Shell Interactive?266651
Node: Interactive Shell Behavior267466
Node: Bash Conditional Expressions271095
Node: Shell Arithmetic275737
Node: Aliases278681
Node: Arrays281294
Node: The Directory Stack287541
Node: Directory Stack Builtins288325
Node: Controlling the Prompt292585
Node: The Restricted Shell295550
Node: Bash POSIX Mode298160
Node: Shell Compatibility Mode309433
Node: Job Control317462
Node: Job Control Basics317922
Node: Job Control Builtins322924
Node: Job Control Variables328324
Node: Command Line Editing329480
Node: Introduction and Notation331151
Node: Readline Interaction332774
Node: Readline Bare Essentials333965
Node: Readline Movement Commands335748
Node: Readline Killing Commands336708
Node: Readline Arguments338626
Node: Searching339670
Node: Readline Init File341856
Node: Readline Init File Syntax343117
Node: Conditional Init Constructs364605
Node: Sample Init File368801
Node: Bindable Readline Commands371925
Node: Commands For Moving373129
Node: Commands For History375180
Node: Commands For Text380174
Node: Commands For Killing383823
Node: Numeric Arguments386856
Node: Commands For Completion387995
Node: Keyboard Macros392186
Node: Miscellaneous Commands392873
Node: Readline vi Mode398812
Node: Programmable Completion399719
Node: Programmable Completion Builtins407499
Node: A Programmable Completion Example418194
Node: Using History Interactively423441
Node: Bash History Facilities424125
Node: Bash History Builtins427130
Node: History Interaction432138
Node: Event Designators435758
Node: Word Designators437112
Node: Modifiers438872
Node: Installing Bash440683
Node: Basic Installation441820
Node: Compilers and Options445542
Node: Compiling For Multiple Architectures446283
Node: Installation Names447976
Node: Specifying the System Type450085
Node: Sharing Defaults450801
Node: Operation Controls451474
Node: Optional Features452432
Node: Reporting Bugs463650
Node: Major Differences From The Bourne Shell464925
Node: GNU Free Documentation License481775
Node: Indexes506952
Node: Builtin Index507406
Node: Reserved Word Index514233
Node: Variable Index516681
Node: Function Index533173
Node: Concept Index546957

End Tag Table
+55 -47
View File
@@ -1,9 +1,12 @@
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/MacPorts 2021.58693_0) (preloaded format=pdftex 2021.10.21) 22 NOV 2021 11:02
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/MacPorts 2021.58693_0) (preloaded format=pdfetex 2021.8.30) 11 JAN 2022 15:04
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
**/Users/chet/src/bash/src/doc/bashref.texi
(/Users/chet/src/bash/src/doc/bashref.texi (./texinfo.tex
**\input /usr/local/src/bash/bash-20220105/doc/bashref.texi \input /usr/local/s
rc/bash/bash-20220105/doc/bashref.texi
(/usr/local/src/bash/bash-20220105/doc/bashref.texi
(/usr/local/src/bash/bash-20220105/doc/texinfo.tex
Loading texinfo [version 2015-11-22.14]:
\outerhsize=\dimen16
\outervsize=\dimen17
@@ -159,24 +162,27 @@ This is `epsf.tex' v2.7.4 <14 February 2011>
texinfo.tex: doing @include of version.texi
(./version.texi) [1{/opt/local/var/db/texmf/fonts/map/pdftex/updmap/pdftex.map}
] [2] (./bashref.toc [-1] [-2] [-3]) [-4] (./bashref.toc) (./bashref.toc)
Chapter 1
(/usr/local/src/bash/bash-20220105/doc/version.texi) [1{/opt/local/var/db/texmf
/fonts/map/pdftex/updmap/pdftex.map}] [2]
(/usr/local/build/bash/bash-20220105/doc/bashref.toc [-1] [-2] [-3]) [-4]
(/usr/local/build/bash/bash-20220105/doc/bashref.toc)
(/usr/local/build/bash/bash-20220105/doc/bashref.toc) Chapter 1
\openout0 = `bashref.toc'.
(./bashref.aux)
(/usr/local/build/bash/bash-20220105/doc/bashref.aux)
\openout1 = `bashref.aux'.
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'.
[8]
[8]
Overfull \hbox (3.12749pt too wide) in paragraph at lines 723--724
@texttt coproc[]|
@@ -223,7 +229,7 @@ Overfull \hbox (5.95723pt too wide) in paragraph at lines 724--725
[47] [48] [49] [50] [51]
[52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65]
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5176--5176
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5180--5180
[]@texttt set [-abefhkmnptuvxBCEHPT] [-o @textttsl option-name@texttt ] [--] [
-] [@textttsl ar-gu-ment []@texttt ][]
@@ -236,7 +242,7 @@ Overfull \hbox (38.26585pt too wide) in paragraph at lines 5176--5176
.etc.
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5177--5177
Overfull \hbox (38.26585pt too wide) in paragraph at lines 5181--5181
[]@texttt set [+abefhkmnptuvxBCEHPT] [+o @textttsl option-name@texttt ] [--] [
-] [@textttsl ar-gu-ment []@texttt ][]
@@ -255,8 +261,8 @@ Overfull \hbox (38.26585pt too wide) in paragraph at lines 5177--5177
texinfo.tex: doing @include of rluser.texi
(/Users/chet/src/bash/src/lib/readline/doc/rluser.texi Chapter 8 [115] [116]
[117] [118] [119] [120] [121] [122] [123] [124] [125]
(/usr/local/src/bash/bash-20220105/lib/readline/doc/rluser.texi Chapter 8
[115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125]
Underfull \hbox (badness 7540) in paragraph at lines 831--837
[]@textrm In the ex-am-ple above, @textttsl C-u[] @textrm is bound to the func
-tion
@@ -317,9 +323,10 @@ Overfull \hbox (15.27109pt too wide) in paragraph at lines 2090--2090
texinfo.tex: doing @include of hsuser.texi
(/Users/chet/src/bash/src/lib/readline/doc/hsuser.texi Chapter 9 [150] [151]
[152] [153] [154] [155]) Chapter 10 [156] [157] [158] [159] [160]
Underfull \hbox (badness 10000) in paragraph at lines 9259--9268
(/usr/local/src/bash/bash-20220105/lib/readline/doc/hsuser.texi Chapter 9
[150] [151] [152] [153] [154] [155]) Chapter 10 [156] [157] [158] [159]
[160]
Underfull \hbox (badness 10000) in paragraph at lines 9297--9306
[]@textrm All of the fol-low-ing op-tions ex-cept for `@texttt alt-array-implem
entation[]@textrm '[],
@@ -332,7 +339,7 @@ entation[]@textrm '[],
.etc.
Underfull \hbox (badness 10000) in paragraph at lines 9259--9268
Underfull \hbox (badness 10000) in paragraph at lines 9297--9306
@textrm `@texttt disabled-builtins[]@textrm '[], `@texttt direxpand-default[]@t
extrm '[], `@texttt strict-posix-default[]@textrm '[], and
@@ -344,41 +351,42 @@ extrm '[], `@texttt strict-posix-default[]@textrm '[], and
.@texttt a
.etc.
[161] [162] [163] Appendix A [164] Appendix B [165] [166] [167] [168] [169]
[170] Appendix C [171]
[161] [162] [163] [164] Appendix A [165] Appendix B [166] [167] [168] [169]
[170] [171] Appendix C [172]
texinfo.tex: doing @include of fdl.texi
(./fdl.texi [172] [173] [174] [175] [176] [177] [178])
Appendix D [179] [180] [181] [182] [183] [184] [185] [186] [187] [188] )
(/usr/local/src/bash/bash-20220105/doc/fdl.texi
[173] [174] [175] [176] [177] [178] [179]) Appendix D [180] [181] [182]
[183] [184] [185] [186] [187] [188] [189] )
Here is how much of TeX's memory you used:
4092 strings out of 497086
46917 string characters out of 6206519
140373 words of memory out of 5000000
4094 strings out of 497086
47566 string characters out of 6206517
141412 words of memory out of 5000000
4867 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,315b,978s stack positions out of 5000i,500n,10000p,200000b,80000s
{/opt/l
ocal/share/texmf-texlive/fonts/enc/dvips/cm-super/cm-super-t1.enc}</opt/local/s
hare/texmf-texlive/fonts/type1/public/amsfonts/cm/cmbx12.pfb></opt/local/share/
texmf-texlive/fonts/type1/public/amsfonts/cm/cmcsc10.pfb></opt/local/share/texm
f-texlive/fonts/type1/public/amsfonts/cm/cmmi10.pfb></opt/local/share/texmf-tex
live/fonts/type1/public/amsfonts/cm/cmmi12.pfb></opt/local/share/texmf-texlive/
fonts/type1/public/amsfonts/cm/cmmi9.pfb></opt/local/share/texmf-texlive/fonts/
type1/public/amsfonts/cm/cmr10.pfb></opt/local/share/texmf-texlive/fonts/type1/
public/amsfonts/cm/cmr9.pfb></opt/local/share/texmf-texlive/fonts/type1/public/
amsfonts/cm/cmsl10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfo
nts/cm/cmsltt10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts
/cm/cmsy10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/c
mti10.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmtt10
.pfb></opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmtt12.pfb>
</opt/local/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmtt9.pfb></opt/
local/share/texmf-texlive/fonts/type1/public/cm-super/sfrm1095.pfb></opt/local/
share/texmf-texlive/fonts/type1/public/cm-super/sfrm1440.pfb>
Output written on bashref.pdf (194 pages, 788761 bytes).
16i,6n,16p,389b,978s 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 (195 pages, 790709 bytes).
PDF statistics:
2736 PDF objects out of 2984 (max. 8388607)
2496 compressed objects within 25 object streams
322 named destinations out of 1000 (max. 500000)
2743 PDF objects out of 2984 (max. 8388607)
2501 compressed objects within 26 object streams
323 named destinations out of 1000 (max. 500000)
1141 words of extra memory for PDF output out of 10000 (max. 10000000)
BIN
View File
Binary file not shown.
+602 -553
View File
File diff suppressed because it is too large Load Diff
+10 -10
View File
@@ -129,13 +129,13 @@
@numsecentry{Sharing Defaults}{10.6}{Sharing Defaults}{159}
@numsecentry{Operation Controls}{10.7}{Operation Controls}{160}
@numsecentry{Optional Features}{10.8}{Optional Features}{160}
@appentry{Reporting Bugs}{A}{Reporting Bugs}{165}
@appentry{Major Differences From The Bourne Shell}{B}{Major Differences From The Bourne Shell}{166}
@appsecentry{Implementation Differences From The SVR4.2 Shell}{B.1}{}{170}
@appentry{GNU Free Documentation License}{C}{GNU Free Documentation License}{172}
@appentry{Indexes}{D}{Indexes}{180}
@appsecentry{Index of Shell Builtin Commands}{D.1}{Builtin Index}{180}
@appsecentry{Index of Shell Reserved Words}{D.2}{Reserved Word Index}{181}
@appsecentry{Parameter and Variable Index}{D.3}{Variable Index}{182}
@appsecentry{Function Index}{D.4}{Function Index}{184}
@appsecentry{Concept Index}{D.5}{Concept Index}{186}
@appentry{Reporting Bugs}{A}{Reporting Bugs}{166}
@appentry{Major Differences From The Bourne Shell}{B}{Major Differences From The Bourne Shell}{167}
@appsecentry{Implementation Differences From The SVR4.2 Shell}{B.1}{}{171}
@appentry{GNU Free Documentation License}{C}{GNU Free Documentation License}{173}
@appentry{Indexes}{D}{Indexes}{181}
@appsecentry{Index of Shell Builtin Commands}{D.1}{Builtin Index}{181}
@appsecentry{Index of Shell Reserved Words}{D.2}{Reserved Word Index}{182}
@appsecentry{Parameter and Variable Index}{D.3}{Variable Index}{183}
@appsecentry{Function Index}{D.4}{Function Index}{185}
@appsecentry{Concept Index}{D.5}{Concept Index}{187}
+361 -355
View File
File diff suppressed because it is too large Load Diff
+728 -711
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.22.4
%%CreationDate: Mon Nov 22 11:02:09 2021
%%CreationDate: Tue Jan 11 15:02:05 2022
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.22 4
@@ -283,8 +283,8 @@ F2(command)2.5 E F0 -.2(bu)2.5 G(iltin command).2 E<83>108 396 Q
(xe)-.15 G(cuted,).15 E F2(rbash)2.929 E F0 .429(turns of)2.929 F 2.929
(fa)-.25 G .729 -.15(ny r)-2.929 H .429(estrictions in the shell).15 F
(spa)108 441.6 Q(wned to e)-.15 E -.15(xe)-.15 G(cute the script.).15 E
F1(SEE ALSO)72 458.4 Q F0(bash\(1\))108 470.4 Q(GNU Bash-4.0)72 768 Q
(2004 Apr 20)148.735 E(1)203.725 E 0 Cg EP
F1(SEE ALSO)72 458.4 Q F0(bash\(1\))108 470.4 Q 157.215(Bash-5.2 2021)72
768 R(No)2.5 E -.15(ve)-.15 G(mber 22).15 E(1)190.545 E 0 Cg EP
%%Trailer
end
%%EOF
+26 -15
View File
@@ -48,7 +48,7 @@ accept_builtin (list)
SHELL_VAR *v;
intmax_t iport;
int opt;
char *tmoutarg, *fdvar, *rhostvar, *rhost;
char *tmoutarg, *fdvar, *rhostvar, *rhost, *bindaddr;
unsigned short uport;
int servsock, clisock;
struct sockaddr_in server, client;
@@ -56,13 +56,16 @@ accept_builtin (list)
struct timeval timeval;
struct linger linger = { 0, 0 };
rhostvar = tmoutarg = fdvar = rhost = (char *)NULL;
rhostvar = tmoutarg = fdvar = rhost = bindaddr = (char *)NULL;
reset_internal_getopt ();
while ((opt = internal_getopt (list, "r:t:v:")) != -1)
while ((opt = internal_getopt (list, "b:r:t:v:")) != -1)
{
switch (opt)
{
case 'b':
bindaddr = list_optarg;
break;
case 'r':
rhostvar = list_optarg;
break;
@@ -125,7 +128,17 @@ accept_builtin (list)
memset ((char *)&server, 0, sizeof (server));
server.sin_family = AF_INET;
server.sin_port = htons(uport);
server.sin_addr.s_addr = htonl(INADDR_ANY);
server.sin_addr.s_addr = bindaddr ? inet_addr (bindaddr) : htonl(INADDR_ANY);
if (server.sin_addr.s_addr == INADDR_NONE)
{
builtin_error ("invalid address: %s", strerror (errno));
return (EXECUTION_FAILURE);
}
opt = 1;
setsockopt (servsock, SOL_SOCKET, SO_REUSEADDR, (void *)&opt, sizeof (opt));
setsockopt (servsock, SOL_SOCKET, SO_LINGER, (void *)&linger, sizeof (linger));
if (bind (servsock, (struct sockaddr *)&server, sizeof (server)) < 0)
{
@@ -134,10 +147,6 @@ accept_builtin (list)
return (EXECUTION_FAILURE);
}
opt = 1;
setsockopt (servsock, SOL_SOCKET, SO_REUSEADDR, (void *)&opt, sizeof (opt));
setsockopt (servsock, SOL_SOCKET, SO_LINGER, (void *)&linger, sizeof (linger));
if (listen (servsock, 1) < 0)
{
builtin_error ("listen failure: %s", strerror (errno));
@@ -154,12 +163,12 @@ accept_builtin (list)
opt = select (servsock+1, &iofds, 0, 0, &timeval);
if (opt < 0)
builtin_error ("select failure: %s", strerror (errno));
builtin_error ("select failure: %s", strerror (errno));
if (opt <= 0)
{
close (servsock);
return (EXECUTION_FAILURE);
}
{
close (servsock);
return (EXECUTION_FAILURE);
}
}
clientlen = sizeof (client);
@@ -193,7 +202,7 @@ accept_bind_variable (varname, intval)
char ibuf[INT_STRLEN_BOUND (int) + 1], *p;
p = fmtulong (intval, 10, ibuf, sizeof (ibuf), 0);
v = builtin_bind_variable (varname, p, 0);
v = builtin_bind_variable (varname, p, 0); /* XXX */
if (v == 0 || readonly_p (v) || noassign_p (v))
builtin_error ("%s: cannot set variable", varname);
return (v != 0);
@@ -205,6 +214,8 @@ char *accept_doc[] = {
"This builtin allows a bash script to act as a TCP/IP server.",
"",
"Options, if supplied, have the following meanings:",
" -b address use ADDRESS as the IP address to listen on; the",
" default is INADDR_ANY",
" -t timeout wait TIMEOUT seconds for a connection. TIMEOUT may",
" be a decimal number including a fractional portion",
" -v varname store the numeric file descriptor of the connected",
@@ -229,6 +240,6 @@ struct builtin accept_struct = {
accept_builtin, /* function implementing the builtin */
BUILTIN_ENABLED, /* initial flags for builtin */
accept_doc, /* array of long documentation strings. */
"accept [-t timeout] [-v varname] [-r addrvar ] port", /* usage synopsis; becomes short_doc */
"accept [-b address] [-t timeout] [-v varname] [-r addrvar ] port", /* usage synopsis; becomes short_doc */
0 /* reserved for internal use */
};
+426 -401
View File
File diff suppressed because it is too large Load Diff
+670 -602
View File
File diff suppressed because it is too large Load Diff
+74 -37
View File
@@ -1,12 +1,14 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2020 Free Software Foundation, Inc.
# Copyright 1992-2021 Free Software Foundation, Inc.
timestamp='2020-11-07'
# shellcheck disable=SC2006,SC2268 # see below for rationale
timestamp='2021-12-25'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -33,7 +35,7 @@ timestamp='2020-11-07'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@@ -50,7 +52,14 @@ timestamp='2020-11-07'
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
me=$(echo "$0" | sed -e 's,.*/,,')
# The "shellcheck disable" line above the timestamp inhibits complaints
# about features and limitations of the classic Bourne shell that were
# superseded or lifted in POSIX. However, this script identifies a wide
# variety of pre-POSIX systems that do not have POSIX shells at all, and
# even some reasonably current systems (Solaris 10 as case-in-point) still
# have a pre-POSIX /bin/sh.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
@@ -67,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2020 Free Software Foundation, Inc.
Copyright 1992-2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -112,9 +121,11 @@ esac
# Split fields of configuration type
# shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read field1 field2 field3 field4 <<EOF
$1
EOF
IFS=$saved_IFS
# Separate into logical components for further validation
case $1 in
@@ -163,6 +174,10 @@ case $1 in
basic_machine=$field1
basic_os=$field2
;;
zephyr*)
basic_machine=$field1-unknown
basic_os=$field2
;;
# Manufacturers
dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
@@ -769,22 +784,22 @@ case $basic_machine in
vendor=hp
;;
i*86v32)
cpu=$(echo "$1" | sed -e 's/86.*/86/')
cpu=`echo "$1" | sed -e 's/86.*/86/'`
vendor=pc
basic_os=sysv32
;;
i*86v4*)
cpu=$(echo "$1" | sed -e 's/86.*/86/')
cpu=`echo "$1" | sed -e 's/86.*/86/'`
vendor=pc
basic_os=sysv4
;;
i*86v)
cpu=$(echo "$1" | sed -e 's/86.*/86/')
cpu=`echo "$1" | sed -e 's/86.*/86/'`
vendor=pc
basic_os=sysv
;;
i*86sol2)
cpu=$(echo "$1" | sed -e 's/86.*/86/')
cpu=`echo "$1" | sed -e 's/86.*/86/'`
vendor=pc
basic_os=solaris2
;;
@@ -917,14 +932,16 @@ case $basic_machine in
;;
leon-*|leon[3-9]-*)
cpu=sparc
vendor=$(echo "$basic_machine" | sed 's/-.*//')
vendor=`echo "$basic_machine" | sed 's/-.*//'`
;;
*-*)
# shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read cpu vendor <<EOF
$basic_machine
EOF
IFS=$saved_IFS
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -1003,6 +1020,11 @@ case $cpu-$vendor in
;;
# Here we normalize CPU types with a missing or matching vendor
armh-unknown | armh-alt)
cpu=armv7l
vendor=alt
basic_os=${basic_os:-linux-gnueabihf}
;;
dpx20-unknown | dpx20-bull)
cpu=rs6000
vendor=bull
@@ -1084,7 +1106,7 @@ case $cpu-$vendor in
cpu=mipsisa64sb1el
;;
sh5e[lb]-*)
cpu=$(echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/')
cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
;;
spur-*)
cpu=spur
@@ -1102,9 +1124,9 @@ case $cpu-$vendor in
cpu=x86_64
;;
xscale-* | xscalee[bl]-*)
cpu=$(echo "$cpu" | sed 's/^xscale/arm/')
cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
;;
arm64-*)
arm64-* | aarch64le-*)
cpu=aarch64
;;
@@ -1165,7 +1187,7 @@ case $cpu-$vendor in
| alphapca5[67] | alpha64pca5[67] \
| am33_2.0 \
| amdgcn \
| arc | arceb \
| arc | arceb | arc32 | arc64 \
| arm | arm[lb]e | arme[lb] | armv* \
| avr | avr32 \
| asmjs \
@@ -1185,6 +1207,7 @@ case $cpu-$vendor in
| k1om \
| le32 | le64 \
| lm32 \
| loongarch32 | loongarch64 | loongarchx32 \
| m32c | m32r | m32rle \
| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
@@ -1203,9 +1226,13 @@ case $cpu-$vendor in
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa32r3 | mipsisa32r3el \
| mipsisa32r5 | mipsisa32r5el \
| mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64r3 | mipsisa64r3el \
| mipsisa64r5 | mipsisa64r5el \
| mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
@@ -1229,7 +1256,7 @@ case $cpu-$vendor in
| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
| pru \
| pyramid \
| riscv | riscv32 | riscv64 \
| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
| rl78 | romp | rs6000 | rx \
| s390 | s390x \
| score \
@@ -1241,6 +1268,7 @@ case $cpu-$vendor in
| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
| spu \
| tahoe \
| thumbv7* \
| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
| tron \
| ubicom32 \
@@ -1281,35 +1309,37 @@ esac
if test x$basic_os != x
then
# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
# set os.
case $basic_os in
gnu/linux*)
kernel=linux
os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|')
os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
;;
os2-emx)
kernel=os2
os=$(echo $basic_os | sed -e 's|os2-emx|emx|')
os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
;;
nto-qnx*)
kernel=nto
os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|')
os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
;;
*-*)
# shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read kernel os <<EOF
$basic_os
EOF
IFS=$saved_IFS
;;
# Default OS when just kernel was specified
nto*)
kernel=nto
os=$(echo $basic_os | sed -e 's|nto|qnx|')
os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
;;
linux*)
kernel=linux
os=$(echo $basic_os | sed -e 's|linux|gnu|')
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
;;
*)
kernel=
@@ -1330,7 +1360,7 @@ case $os in
os=cnk
;;
solaris1 | solaris1.*)
os=$(echo $os | sed -e 's|solaris1|sunos4|')
os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
;;
solaris)
os=solaris2
@@ -1359,7 +1389,7 @@ case $os in
os=sco3.2v4
;;
sco3.2.[4-9]*)
os=$(echo $os | sed -e 's/sco3.2./sco3.2v/')
os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
;;
sco*v* | scout)
# Don't match below
@@ -1389,7 +1419,7 @@ case $os in
os=lynxos
;;
mac[0-9]*)
os=$(echo "$os" | sed -e 's|mac|macos|')
os=`echo "$os" | sed -e 's|mac|macos|'`
;;
opened*)
os=openedition
@@ -1398,10 +1428,10 @@ case $os in
os=os400
;;
sunos5*)
os=$(echo "$os" | sed -e 's|sunos5|solaris2|')
os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;;
sunos6*)
os=$(echo "$os" | sed -e 's|sunos6|solaris3|')
os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;;
wince*)
os=wince
@@ -1435,7 +1465,7 @@ case $os in
;;
# Preserve the version number of sinix5.
sinix5.*)
os=$(echo $os | sed -e 's|sinix|sysv|')
os=`echo "$os" | sed -e 's|sinix|sysv|'`
;;
sinix*)
os=sysv4
@@ -1681,11 +1711,14 @@ fi
# Now, validate our (potentially fixed-up) OS.
case $os in
# Sometimes we do "kernel-abi", so those need to count as OSes.
musl* | newlib* | uclibc*)
# Sometimes we do "kernel-libc", so those need to count as OSes.
musl* | newlib* | relibc* | uclibc*)
;;
# Likewise for "kernel-libc"
eabi | eabihf | gnueabi | gnueabihf)
# Likewise for "kernel-abi"
eabi* | gnueabi*)
;;
# VxWorks passes extra cpu info in the 4th filed.
simlinux | simwindows | spe)
;;
# Now accept the basic system types.
# The portable systems comes first.
@@ -1702,12 +1735,12 @@ case $os in
| nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
| clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
| mirbsd* | netbsd* | dicos* | openedition* | ose* \
| bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
| bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
| ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
| udi* | lites* | ieee* | go32* | aux* | hcos* \
| chorusrdb* | cegcc* | glidix* \
| chorusrdb* | cegcc* | glidix* | serenity* \
| cygwin* | msys* | pe* | moss* | proelf* | rtems* \
| midipix* | mingw32* | mingw64* | mint* \
| uxpv* | beos* | mpeix* | udk* | moxiebox* \
@@ -1720,7 +1753,8 @@ case $os in
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
| midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
| nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
| fiwix* )
;;
# This one is extra strict with allowed versions
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
@@ -1737,11 +1771,12 @@ esac
# As a final step for OS-related things, validate the OS-kernel combination
# (given a valid OS), if there is a kernel.
case $kernel-$os in
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* )
linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
| linux-musl* | linux-relibc* | linux-uclibc* )
;;
uclinux-uclibc* )
;;
-dietlibc* | -newlib* | -musl* | -uclibc* )
-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
# These are just libc implementations, not actual OSes, and thus
# require a kernel.
echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
@@ -1749,6 +1784,8 @@ case $kernel-$os in
;;
kfreebsd*-gnu* | kopensolaris*-gnu*)
;;
vxworks-simlinux | vxworks-simwindows | vxworks-spe)
;;
nto-qnx*)
;;
os2-emx)
+1 -1
View File
@@ -1,4 +1,4 @@
BUILD_DIR=/usr/local/build/bash/bash-current
BUILD_DIR=/usr/local/build/chet/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
+2 -2
View File
@@ -1,6 +1,6 @@
/* version.c -- distribution and version numbers. */
/* Copyright (C) 1989-2021 Free Software Foundation, Inc.
/* Copyright (C) 1989-2022 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -43,7 +43,7 @@ const char * const release_status = (char *)0;
#endif
const char * const sccs_version = SCCSVERSION;
const char * const bash_copyright = N_("Copyright (C) 2021 Free Software Foundation, Inc.");
const char * const bash_copyright = N_("Copyright (C) 2022 Free Software Foundation, Inc.");
const char * const bash_license = N_("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n");
/* If == 31, shell compatible with bash-3.1, == 32 with bash-3.2, and so on */
+2 -2
View File
@@ -1,6 +1,6 @@
/* version.c -- distribution and version numbers. */
/* Copyright (C) 1989-2021 Free Software Foundation, Inc.
/* Copyright (C) 1989-2022 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -43,7 +43,7 @@ const char * const release_status = (char *)0;
#endif
const char * const sccs_version = SCCSVERSION;
const char * const bash_copyright = N_("Copyright (C) 2021 Free Software Foundation, Inc.");
const char * const bash_copyright = N_("Copyright (C) 2022 Free Software Foundation, Inc.");
const char * const bash_license = N_("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n");
/* If == 31, shell compatible with bash-3.1, == 32 with bash-3.2, and so on */