mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-14 23:50:49 +02:00
fix obscure macOS issue where the Apple locale is set to something setlocale(3) doesn't understand; don't source .bash_logout if the shell is running setuid; fix for macOS issue with pipe size throttling and here-documents
This commit is contained in:
+1960
-1958
File diff suppressed because it is too large
Load Diff
+21
-13
@@ -5,7 +5,7 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet.ramey@case.edu
|
||||
.\"
|
||||
.\" Last Change: Mon May 18 11:35:35 EDT 2026
|
||||
.\" Last Change: Thu Jul 9 09:19:19 EDT 2026
|
||||
.\"
|
||||
.\" For bash_builtins, strip all but "SHELL BUILTIN COMMANDS" section
|
||||
.\" For rbash, strip all but "RESTRICTED SHELL" section
|
||||
@@ -22,7 +22,7 @@
|
||||
.ds zX \" empty
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2026 May 18" "GNU Bash 5.3"
|
||||
.TH BASH 1 "2026 July 1" "GNU Bash 5.3"
|
||||
.\"
|
||||
.ie \n(.g \{\
|
||||
.ds ' \(aq
|
||||
@@ -539,8 +539,12 @@ but neither
|
||||
or allow them to be specified.
|
||||
.PP
|
||||
If the shell is started with the effective user (group) id not equal to the
|
||||
real user (group) id, and the \fB\-p\fP option is not supplied, no startup
|
||||
files are read, shell functions are not inherited from the environment, the
|
||||
real user (group) id,
|
||||
and the \fB\-p\fP option is not supplied,
|
||||
bash does not attempt to read any startup files or
|
||||
.FN \*~/.bash_logout ,
|
||||
does not inherit shell functions from the environment,
|
||||
ignores the
|
||||
.SM
|
||||
.BR SHELLOPTS ,
|
||||
.SM
|
||||
@@ -550,8 +554,8 @@ files are read, shell functions are not inherited from the environment, the
|
||||
and
|
||||
.SM
|
||||
.B GLOBIGNORE
|
||||
variables, if they appear in the environment, are ignored,
|
||||
and the effective user id is set to the real user id.
|
||||
variables, if they appear in the environment,
|
||||
and sets the effective user id to the real user id.
|
||||
If the \fB\-p\fP option is supplied at invocation, the startup behavior is
|
||||
the same, but \fBbash\fP does not reset the effective user id.
|
||||
.SH DEFINITIONS
|
||||
@@ -7787,7 +7791,7 @@ the previous command.
|
||||
Once the argument \fIn\fP is computed,
|
||||
this uses the history expansion facilities to extract the
|
||||
\fIn\fPth word, as if the
|
||||
.Q !\fIn\fP
|
||||
.Q !!:\fIn\fP
|
||||
history expansion had been specified.
|
||||
.TP
|
||||
.B
|
||||
@@ -11853,14 +11857,16 @@ on the standard output.
|
||||
.B \-p
|
||||
Turn on
|
||||
.I privileged
|
||||
mode. In this mode, the shell does not read the
|
||||
mode.
|
||||
In this mode, the shell does not read the
|
||||
.SM
|
||||
.B $ENV
|
||||
and
|
||||
.SM
|
||||
.B $BASH_ENV
|
||||
files, shell functions are not inherited from the
|
||||
environment, and the
|
||||
files,
|
||||
does not inherit shell functions from the environment,
|
||||
and ignores the
|
||||
.SM
|
||||
.BR SHELLOPTS ,
|
||||
.SM
|
||||
@@ -11870,10 +11876,12 @@ environment, and the
|
||||
and
|
||||
.SM
|
||||
.B GLOBIGNORE
|
||||
variables, if they appear in the environment, are ignored.
|
||||
variables, if they appear in the environment.
|
||||
If the shell is started with the effective user (group) id not equal to the
|
||||
real user (group) id, and the \fB\-p\fP option is not supplied, these actions
|
||||
are taken and the effective user id is set to the real user id.
|
||||
real user (group) id,
|
||||
and the \fB\-p\fP option is not supplied,
|
||||
these actions are taken and the effective user id is set to the real user id
|
||||
(see \fBINVOCATION\fP above for more details).
|
||||
If the \fB\-p\fP option is supplied at startup, the effective user id is
|
||||
not reset.
|
||||
Turning this option off causes the effective user
|
||||
|
||||
+129
-126
@@ -1,9 +1,9 @@
|
||||
This is bash.info, produced by makeinfo version 7.3 from bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.3, 18 May 2026).
|
||||
Bash shell (version 5.3, 1 July 2026).
|
||||
|
||||
This is Edition 5.3, last updated 18 May 2026, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 1 July 2026, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Copyright © 1988-2026 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.3, 18 May 2026). The Bash home page is
|
||||
Bash shell (version 5.3, 1 July 2026). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 18 May 2026, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 1 July 2026, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -5083,18 +5083,18 @@ parameters, or to display the names and values of shell variables.
|
||||
Same as ‘-x’.
|
||||
|
||||
‘-p’
|
||||
Turn on privileged mode. In this mode, the ‘$BASH_ENV’ and
|
||||
‘$ENV’ files are not processed, shell functions are not
|
||||
inherited from the environment, and the ‘SHELLOPTS’,
|
||||
Turn on privileged mode. In this mode, Bash does not process
|
||||
the ‘$BASH_ENV’ and ‘$ENV’ files, does not inherit shell
|
||||
functions from the environment, and ignores the ‘SHELLOPTS’,
|
||||
‘BASHOPTS’, ‘CDPATH’ and ‘GLOBIGNORE’ variables, if they
|
||||
appear in the environment, are ignored. If the shell is
|
||||
started with the effective user (group) id not equal to the
|
||||
real user (group) id, and the ‘-p’ option is not supplied,
|
||||
these actions are taken and the effective user id is set to
|
||||
the real user id. If the ‘-p’ option is supplied at startup,
|
||||
the effective user id is not reset. Turning this option off
|
||||
causes the effective user and group ids to be set to the real
|
||||
user and group ids.
|
||||
appear in the environment. If the shell is started with the
|
||||
effective user (group) id not equal to the real user (group)
|
||||
id, and the ‘-p’ option is not supplied, these actions are
|
||||
taken and the effective user id is set to the real user id
|
||||
(*note Bash Startup Files:: for details). If the ‘-p’ option
|
||||
is supplied at startup, the effective user id is not reset.
|
||||
Turning this option off causes the effective user and group
|
||||
ids to be set to the real user and group ids.
|
||||
|
||||
‘-r’
|
||||
Enable restricted shell mode (*note The Restricted Shell::).
|
||||
@@ -6808,13 +6808,13 @@ Invoked with unequal effective and real UID/GIDs
|
||||
................................................
|
||||
|
||||
If Bash is started with the effective user (group) id not equal to the
|
||||
real user (group) id, and the ‘-p’ option is not supplied, no startup
|
||||
files are read, shell functions are not inherited from the environment,
|
||||
the ‘SHELLOPTS’, ‘BASHOPTS’, ‘CDPATH’, and ‘GLOBIGNORE’ variables, if
|
||||
they appear in the environment, are ignored, and the effective user id
|
||||
is set to the real user id. If the ‘-p’ option is supplied at
|
||||
invocation, the startup behavior is the same, but Bash does not reset
|
||||
the effective user id.
|
||||
real user (group) id, and the ‘-p’ option is not supplied, Bash does not
|
||||
attempt to read any startup files or ‘~/.bash_logout’, does not inherit
|
||||
shell functions from the environment, ignores the ‘SHELLOPTS’,
|
||||
‘BASHOPTS’, ‘CDPATH’, and ‘GLOBIGNORE’ variables, if they appear in the
|
||||
environment, and sets the effective user id to the real user id. If the
|
||||
‘-p’ option is supplied at invocation, the startup behavior is the same,
|
||||
but Bash does not reset the effective user id.
|
||||
|
||||
|
||||
File: bash.info, Node: Interactive Shells, Next: Bash Conditional Expressions, Prev: Bash Startup Files, Up: Bash Features
|
||||
@@ -7623,9 +7623,9 @@ can appear in the prompt variables ‘PS0’, ‘PS1’, ‘PS2’, and ‘PS4
|
||||
‘\[’
|
||||
Begin a sequence of non-printing characters. This could be used to
|
||||
embed a terminal control sequence into the prompt. This escape is
|
||||
only useful when the prompt will be supplied to Readline, so it
|
||||
shouldn't be used in ‘PS0’ or ‘PS4’, or when line editing is not
|
||||
enabled.
|
||||
only useful when the prompt will be supplied to Readline, and is
|
||||
ignored and removed otherwise, so it shouldn't be used in ‘PS0’ or
|
||||
‘PS4’, or when line editing is not enabled.
|
||||
|
||||
‘\]’
|
||||
End a sequence of non-printing characters begun with ‘\[’
|
||||
@@ -7984,100 +7984,103 @@ startup files.
|
||||
supplied as an argument exceeds ‘PATH_MAX’ when canonicalized, ‘cd’
|
||||
will attempt to use the supplied directory name.
|
||||
|
||||
52. When the ‘xpg_echo’ option is enabled, Bash does not attempt to
|
||||
52. The ‘command’ builtin prints command name arguments containing a
|
||||
slash as full pathnames when the ‘-v’ option is supplied.
|
||||
|
||||
53. When the ‘xpg_echo’ option is enabled, Bash does not attempt to
|
||||
interpret any arguments to ‘echo’ as options. ‘echo’ displays each
|
||||
argument after converting escape sequences.
|
||||
|
||||
53. The ‘export’ and ‘readonly’ builtin commands display their output
|
||||
54. The ‘export’ and ‘readonly’ builtin commands display their output
|
||||
in the format required by POSIX.
|
||||
|
||||
54. When listing the history, the ‘fc’ builtin does not include an
|
||||
55. When listing the history, the ‘fc’ builtin does not include an
|
||||
indication of whether or not a history entry has been modified.
|
||||
|
||||
55. The default editor used by ‘fc’ is ‘ed’.
|
||||
56. The default editor used by ‘fc’ is ‘ed’.
|
||||
|
||||
56. ‘fc’ treats extra arguments as an error instead of ignoring them.
|
||||
57. ‘fc’ treats extra arguments as an error instead of ignoring them.
|
||||
|
||||
57. If there are too many arguments supplied to ‘fc -s’, ‘fc’ prints
|
||||
58. If there are too many arguments supplied to ‘fc -s’, ‘fc’ prints
|
||||
an error message and returns failure.
|
||||
|
||||
58. The output of ‘kill -l’ prints all the signal names on a single
|
||||
59. The output of ‘kill -l’ prints all the signal names on a single
|
||||
line, separated by spaces, without the ‘SIG’ prefix.
|
||||
|
||||
59. The ‘kill’ builtin does not accept signal names with a ‘SIG’
|
||||
60. The ‘kill’ builtin does not accept signal names with a ‘SIG’
|
||||
prefix.
|
||||
|
||||
60. The ‘kill’ builtin returns a failure status if any of the pid or
|
||||
61. The ‘kill’ builtin returns a failure status if any of the pid or
|
||||
job arguments are invalid or if sending the specified signal to any
|
||||
of them fails. In default mode, ‘kill’ returns success if the
|
||||
signal was successfully sent to any of the specified processes.
|
||||
|
||||
61. The ‘printf’ builtin uses ‘double’ (via ‘strtod’) to convert
|
||||
62. The ‘printf’ builtin uses ‘double’ (via ‘strtod’) to convert
|
||||
arguments corresponding to floating point conversion specifiers,
|
||||
instead of ‘long double’ if it's available. The ‘L’ length
|
||||
modifier forces ‘printf’ to use ‘long double’ if it's available.
|
||||
|
||||
62. The ‘pwd’ builtin verifies that the value it prints is the same as
|
||||
63. The ‘pwd’ builtin verifies that the value it prints is the same as
|
||||
the current directory, even if it is not asked to check the file
|
||||
system with the ‘-P’ option.
|
||||
|
||||
63. The ‘read’ builtin may be interrupted by a signal for which a trap
|
||||
64. The ‘read’ builtin may be interrupted by a signal for which a trap
|
||||
has been set. If Bash receives a trapped signal while executing
|
||||
‘read’, the trap handler executes and ‘read’ returns an exit status
|
||||
greater than 128.
|
||||
|
||||
64. When the ‘set’ builtin is invoked without options, it does not
|
||||
65. When the ‘set’ builtin is invoked without options, it does not
|
||||
display shell function names and definitions.
|
||||
|
||||
65. When the ‘set’ builtin is invoked without options, it displays
|
||||
66. When the ‘set’ builtin is invoked without options, it displays
|
||||
variable values without quotes, unless they contain shell
|
||||
metacharacters, even if the result contains nonprinting characters.
|
||||
|
||||
66. The ‘test’ builtin compares strings using the current locale when
|
||||
67. The ‘test’ builtin compares strings using the current locale when
|
||||
evaluating the ‘<’ and ‘>’ binary operators.
|
||||
|
||||
67. The ‘test’ builtin's ‘-t’ unary primary requires an argument.
|
||||
68. The ‘test’ builtin's ‘-t’ unary primary requires an argument.
|
||||
Historical versions of ‘test’ made the argument optional in certain
|
||||
cases, and Bash attempts to accommodate those for backwards
|
||||
compatibility.
|
||||
|
||||
68. The ‘trap’ builtin displays signal names without the leading
|
||||
69. The ‘trap’ builtin displays signal names without the leading
|
||||
‘SIG’.
|
||||
|
||||
69. The ‘trap’ builtin doesn't check the first argument for a possible
|
||||
70. The ‘trap’ builtin doesn't check the first argument for a possible
|
||||
signal specification and revert the signal handling to the original
|
||||
disposition if it is, unless that argument consists solely of
|
||||
digits and is a valid signal number. If users want to reset the
|
||||
handler for a given signal to the original disposition, they should
|
||||
use ‘-’ as the first argument.
|
||||
|
||||
70. ‘trap -p’ without arguments displays signals whose dispositions
|
||||
71. ‘trap -p’ without arguments displays signals whose dispositions
|
||||
are set to SIG_DFL and those that were ignored when the shell
|
||||
started, not just trapped signals.
|
||||
|
||||
71. The ‘type’ and ‘command’ builtins will not report a non-executable
|
||||
72. The ‘type’ and ‘command’ builtins will not report a non-executable
|
||||
file as having been found, though the shell will attempt to execute
|
||||
such a file if it is the only so-named file found in ‘$PATH’.
|
||||
|
||||
72. The ‘ulimit’ builtin uses a block size of 512 bytes for the ‘-c’
|
||||
73. The ‘ulimit’ builtin uses a block size of 512 bytes for the ‘-c’
|
||||
and ‘-f’ options.
|
||||
|
||||
73. The ‘unset’ builtin with the ‘-v’ option specified returns a fatal
|
||||
74. The ‘unset’ builtin with the ‘-v’ option specified returns a fatal
|
||||
error if it attempts to unset a ‘readonly’ or ‘non-unsettable’
|
||||
variable, which causes a non-interactive shell to exit.
|
||||
|
||||
74. When asked to unset a variable that appears in an assignment
|
||||
75. When asked to unset a variable that appears in an assignment
|
||||
statement preceding the command, the ‘unset’ builtin attempts to
|
||||
unset a variable of the same name in the current or previous scope
|
||||
as well. This implements the required "if an assigned variable is
|
||||
further modified by the utility, the modifications made by the
|
||||
utility shall persist" behavior.
|
||||
|
||||
75. The arrival of ‘SIGCHLD’ when a trap is set on ‘SIGCHLD’ does not
|
||||
76. The arrival of ‘SIGCHLD’ when a trap is set on ‘SIGCHLD’ does not
|
||||
interrupt the ‘wait’ builtin and cause it to return immediately.
|
||||
The trap command is run once for each child that exits.
|
||||
|
||||
76. Bash removes an exited background process's status from the list
|
||||
77. Bash removes an exited background process's status from the list
|
||||
of such statuses after the ‘wait’ builtin returns it.
|
||||
|
||||
There is additional POSIX behavior that Bash does not implement by
|
||||
@@ -13824,82 +13827,82 @@ Node: Bourne Shell Builtins155613
|
||||
Node: Bash Builtins182332
|
||||
Node: Modifying Shell Behavior220067
|
||||
Node: The Set Builtin220409
|
||||
Node: The Shopt Builtin232403
|
||||
Node: Special Builtins249456
|
||||
Node: Shell Variables250445
|
||||
Node: Bourne Shell Variables250879
|
||||
Node: Bash Variables253387
|
||||
Node: Bash Features292671
|
||||
Node: Invoking Bash293685
|
||||
Node: Bash Startup Files300915
|
||||
Node: Interactive Shells306237
|
||||
Node: What is an Interactive Shell?306645
|
||||
Node: Is this Shell Interactive?307307
|
||||
Node: Interactive Shell Behavior308131
|
||||
Node: Bash Conditional Expressions311892
|
||||
Node: Shell Arithmetic317309
|
||||
Node: Aliases320636
|
||||
Node: Arrays323770
|
||||
Node: The Directory Stack331472
|
||||
Node: Directory Stack Builtins332269
|
||||
Node: Controlling the Prompt336714
|
||||
Node: The Restricted Shell339795
|
||||
Node: Bash POSIX Mode342888
|
||||
Node: Shell Compatibility Mode362704
|
||||
Node: Job Control371711
|
||||
Node: Job Control Basics372168
|
||||
Node: Job Control Builtins378536
|
||||
Node: Job Control Variables385324
|
||||
Node: Command Line Editing386555
|
||||
Node: Introduction and Notation388258
|
||||
Node: Readline Interaction390610
|
||||
Node: Readline Bare Essentials391798
|
||||
Node: Readline Movement Commands393606
|
||||
Node: Readline Killing Commands394602
|
||||
Node: Readline Arguments396625
|
||||
Node: Searching397715
|
||||
Node: Readline Init File399958
|
||||
Node: Readline Init File Syntax401261
|
||||
Node: Conditional Init Constructs428212
|
||||
Node: Sample Init File432597
|
||||
Node: Bindable Readline Commands435717
|
||||
Node: Commands For Moving437255
|
||||
Node: Commands For History439719
|
||||
Node: Commands For Text445110
|
||||
Node: Commands For Killing449235
|
||||
Node: Numeric Arguments452023
|
||||
Node: Commands For Completion453175
|
||||
Node: Keyboard Macros458871
|
||||
Node: Miscellaneous Commands459572
|
||||
Node: Readline vi Mode467115
|
||||
Node: Programmable Completion468092
|
||||
Node: Programmable Completion Builtins477828
|
||||
Node: A Programmable Completion Example489565
|
||||
Node: Using History Interactively494910
|
||||
Node: Bash History Facilities495591
|
||||
Node: Bash History Builtins499326
|
||||
Node: History Interaction506921
|
||||
Node: Event Designators511871
|
||||
Node: Word Designators513449
|
||||
Node: Modifiers515841
|
||||
Node: Installing Bash517778
|
||||
Node: Basic Installation518894
|
||||
Node: Compilers and Options522770
|
||||
Node: Compiling For Multiple Architectures523520
|
||||
Node: Installation Names525273
|
||||
Node: Specifying the System Type527507
|
||||
Node: Sharing Defaults528253
|
||||
Node: Operation Controls528967
|
||||
Node: Optional Features529986
|
||||
Node: Reporting Bugs542709
|
||||
Node: Major Differences From The Bourne Shell544066
|
||||
Node: GNU Free Documentation License565493
|
||||
Node: Indexes590670
|
||||
Node: Builtin Index591121
|
||||
Node: Reserved Word Index598219
|
||||
Node: Variable Index600664
|
||||
Node: Function Index618077
|
||||
Node: Concept Index632210
|
||||
Node: The Shopt Builtin232441
|
||||
Node: Special Builtins249494
|
||||
Node: Shell Variables250483
|
||||
Node: Bourne Shell Variables250917
|
||||
Node: Bash Variables253425
|
||||
Node: Bash Features292709
|
||||
Node: Invoking Bash293723
|
||||
Node: Bash Startup Files300953
|
||||
Node: Interactive Shells306313
|
||||
Node: What is an Interactive Shell?306721
|
||||
Node: Is this Shell Interactive?307383
|
||||
Node: Interactive Shell Behavior308207
|
||||
Node: Bash Conditional Expressions311968
|
||||
Node: Shell Arithmetic317385
|
||||
Node: Aliases320712
|
||||
Node: Arrays323846
|
||||
Node: The Directory Stack331548
|
||||
Node: Directory Stack Builtins332345
|
||||
Node: Controlling the Prompt336790
|
||||
Node: The Restricted Shell339909
|
||||
Node: Bash POSIX Mode343002
|
||||
Node: Shell Compatibility Mode362961
|
||||
Node: Job Control371968
|
||||
Node: Job Control Basics372425
|
||||
Node: Job Control Builtins378793
|
||||
Node: Job Control Variables385581
|
||||
Node: Command Line Editing386812
|
||||
Node: Introduction and Notation388515
|
||||
Node: Readline Interaction390867
|
||||
Node: Readline Bare Essentials392055
|
||||
Node: Readline Movement Commands393863
|
||||
Node: Readline Killing Commands394859
|
||||
Node: Readline Arguments396882
|
||||
Node: Searching397972
|
||||
Node: Readline Init File400215
|
||||
Node: Readline Init File Syntax401518
|
||||
Node: Conditional Init Constructs428469
|
||||
Node: Sample Init File432854
|
||||
Node: Bindable Readline Commands435974
|
||||
Node: Commands For Moving437512
|
||||
Node: Commands For History439976
|
||||
Node: Commands For Text445367
|
||||
Node: Commands For Killing449492
|
||||
Node: Numeric Arguments452280
|
||||
Node: Commands For Completion453432
|
||||
Node: Keyboard Macros459128
|
||||
Node: Miscellaneous Commands459829
|
||||
Node: Readline vi Mode467372
|
||||
Node: Programmable Completion468349
|
||||
Node: Programmable Completion Builtins478085
|
||||
Node: A Programmable Completion Example489822
|
||||
Node: Using History Interactively495167
|
||||
Node: Bash History Facilities495848
|
||||
Node: Bash History Builtins499583
|
||||
Node: History Interaction507178
|
||||
Node: Event Designators512128
|
||||
Node: Word Designators513706
|
||||
Node: Modifiers516098
|
||||
Node: Installing Bash518035
|
||||
Node: Basic Installation519151
|
||||
Node: Compilers and Options523027
|
||||
Node: Compiling For Multiple Architectures523777
|
||||
Node: Installation Names525530
|
||||
Node: Specifying the System Type527764
|
||||
Node: Sharing Defaults528510
|
||||
Node: Operation Controls529224
|
||||
Node: Optional Features530243
|
||||
Node: Reporting Bugs542966
|
||||
Node: Major Differences From The Bourne Shell544323
|
||||
Node: GNU Free Documentation License565750
|
||||
Node: Indexes590927
|
||||
Node: Builtin Index591378
|
||||
Node: Reserved Word Index598476
|
||||
Node: Variable Index600921
|
||||
Node: Function Index618334
|
||||
Node: Concept Index632467
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
+129
-126
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 7.3 from
|
||||
bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.3, 18 May 2026).
|
||||
Bash shell (version 5.3, 1 July 2026).
|
||||
|
||||
This is Edition 5.3, last updated 18 May 2026, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 1 July 2026, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Copyright © 1988-2026 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.3, 18 May 2026). The Bash home page is
|
||||
Bash shell (version 5.3, 1 July 2026). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 18 May 2026, of ‘The GNU Bash
|
||||
This is Edition 5.3, last updated 1 July 2026, of ‘The GNU Bash
|
||||
Reference Manual’, for ‘Bash’, Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -5084,18 +5084,18 @@ parameters, or to display the names and values of shell variables.
|
||||
Same as ‘-x’.
|
||||
|
||||
‘-p’
|
||||
Turn on privileged mode. In this mode, the ‘$BASH_ENV’ and
|
||||
‘$ENV’ files are not processed, shell functions are not
|
||||
inherited from the environment, and the ‘SHELLOPTS’,
|
||||
Turn on privileged mode. In this mode, Bash does not process
|
||||
the ‘$BASH_ENV’ and ‘$ENV’ files, does not inherit shell
|
||||
functions from the environment, and ignores the ‘SHELLOPTS’,
|
||||
‘BASHOPTS’, ‘CDPATH’ and ‘GLOBIGNORE’ variables, if they
|
||||
appear in the environment, are ignored. If the shell is
|
||||
started with the effective user (group) id not equal to the
|
||||
real user (group) id, and the ‘-p’ option is not supplied,
|
||||
these actions are taken and the effective user id is set to
|
||||
the real user id. If the ‘-p’ option is supplied at startup,
|
||||
the effective user id is not reset. Turning this option off
|
||||
causes the effective user and group ids to be set to the real
|
||||
user and group ids.
|
||||
appear in the environment. If the shell is started with the
|
||||
effective user (group) id not equal to the real user (group)
|
||||
id, and the ‘-p’ option is not supplied, these actions are
|
||||
taken and the effective user id is set to the real user id
|
||||
(*note Bash Startup Files:: for details). If the ‘-p’ option
|
||||
is supplied at startup, the effective user id is not reset.
|
||||
Turning this option off causes the effective user and group
|
||||
ids to be set to the real user and group ids.
|
||||
|
||||
‘-r’
|
||||
Enable restricted shell mode (*note The Restricted Shell::).
|
||||
@@ -6809,13 +6809,13 @@ Invoked with unequal effective and real UID/GIDs
|
||||
................................................
|
||||
|
||||
If Bash is started with the effective user (group) id not equal to the
|
||||
real user (group) id, and the ‘-p’ option is not supplied, no startup
|
||||
files are read, shell functions are not inherited from the environment,
|
||||
the ‘SHELLOPTS’, ‘BASHOPTS’, ‘CDPATH’, and ‘GLOBIGNORE’ variables, if
|
||||
they appear in the environment, are ignored, and the effective user id
|
||||
is set to the real user id. If the ‘-p’ option is supplied at
|
||||
invocation, the startup behavior is the same, but Bash does not reset
|
||||
the effective user id.
|
||||
real user (group) id, and the ‘-p’ option is not supplied, Bash does not
|
||||
attempt to read any startup files or ‘~/.bash_logout’, does not inherit
|
||||
shell functions from the environment, ignores the ‘SHELLOPTS’,
|
||||
‘BASHOPTS’, ‘CDPATH’, and ‘GLOBIGNORE’ variables, if they appear in the
|
||||
environment, and sets the effective user id to the real user id. If the
|
||||
‘-p’ option is supplied at invocation, the startup behavior is the same,
|
||||
but Bash does not reset the effective user id.
|
||||
|
||||
|
||||
File: bashref.info, Node: Interactive Shells, Next: Bash Conditional Expressions, Prev: Bash Startup Files, Up: Bash Features
|
||||
@@ -7624,9 +7624,9 @@ can appear in the prompt variables ‘PS0’, ‘PS1’, ‘PS2’, and ‘PS4
|
||||
‘\[’
|
||||
Begin a sequence of non-printing characters. This could be used to
|
||||
embed a terminal control sequence into the prompt. This escape is
|
||||
only useful when the prompt will be supplied to Readline, so it
|
||||
shouldn't be used in ‘PS0’ or ‘PS4’, or when line editing is not
|
||||
enabled.
|
||||
only useful when the prompt will be supplied to Readline, and is
|
||||
ignored and removed otherwise, so it shouldn't be used in ‘PS0’ or
|
||||
‘PS4’, or when line editing is not enabled.
|
||||
|
||||
‘\]’
|
||||
End a sequence of non-printing characters begun with ‘\[’
|
||||
@@ -7985,100 +7985,103 @@ startup files.
|
||||
supplied as an argument exceeds ‘PATH_MAX’ when canonicalized, ‘cd’
|
||||
will attempt to use the supplied directory name.
|
||||
|
||||
52. When the ‘xpg_echo’ option is enabled, Bash does not attempt to
|
||||
52. The ‘command’ builtin prints command name arguments containing a
|
||||
slash as full pathnames when the ‘-v’ option is supplied.
|
||||
|
||||
53. When the ‘xpg_echo’ option is enabled, Bash does not attempt to
|
||||
interpret any arguments to ‘echo’ as options. ‘echo’ displays each
|
||||
argument after converting escape sequences.
|
||||
|
||||
53. The ‘export’ and ‘readonly’ builtin commands display their output
|
||||
54. The ‘export’ and ‘readonly’ builtin commands display their output
|
||||
in the format required by POSIX.
|
||||
|
||||
54. When listing the history, the ‘fc’ builtin does not include an
|
||||
55. When listing the history, the ‘fc’ builtin does not include an
|
||||
indication of whether or not a history entry has been modified.
|
||||
|
||||
55. The default editor used by ‘fc’ is ‘ed’.
|
||||
56. The default editor used by ‘fc’ is ‘ed’.
|
||||
|
||||
56. ‘fc’ treats extra arguments as an error instead of ignoring them.
|
||||
57. ‘fc’ treats extra arguments as an error instead of ignoring them.
|
||||
|
||||
57. If there are too many arguments supplied to ‘fc -s’, ‘fc’ prints
|
||||
58. If there are too many arguments supplied to ‘fc -s’, ‘fc’ prints
|
||||
an error message and returns failure.
|
||||
|
||||
58. The output of ‘kill -l’ prints all the signal names on a single
|
||||
59. The output of ‘kill -l’ prints all the signal names on a single
|
||||
line, separated by spaces, without the ‘SIG’ prefix.
|
||||
|
||||
59. The ‘kill’ builtin does not accept signal names with a ‘SIG’
|
||||
60. The ‘kill’ builtin does not accept signal names with a ‘SIG’
|
||||
prefix.
|
||||
|
||||
60. The ‘kill’ builtin returns a failure status if any of the pid or
|
||||
61. The ‘kill’ builtin returns a failure status if any of the pid or
|
||||
job arguments are invalid or if sending the specified signal to any
|
||||
of them fails. In default mode, ‘kill’ returns success if the
|
||||
signal was successfully sent to any of the specified processes.
|
||||
|
||||
61. The ‘printf’ builtin uses ‘double’ (via ‘strtod’) to convert
|
||||
62. The ‘printf’ builtin uses ‘double’ (via ‘strtod’) to convert
|
||||
arguments corresponding to floating point conversion specifiers,
|
||||
instead of ‘long double’ if it's available. The ‘L’ length
|
||||
modifier forces ‘printf’ to use ‘long double’ if it's available.
|
||||
|
||||
62. The ‘pwd’ builtin verifies that the value it prints is the same as
|
||||
63. The ‘pwd’ builtin verifies that the value it prints is the same as
|
||||
the current directory, even if it is not asked to check the file
|
||||
system with the ‘-P’ option.
|
||||
|
||||
63. The ‘read’ builtin may be interrupted by a signal for which a trap
|
||||
64. The ‘read’ builtin may be interrupted by a signal for which a trap
|
||||
has been set. If Bash receives a trapped signal while executing
|
||||
‘read’, the trap handler executes and ‘read’ returns an exit status
|
||||
greater than 128.
|
||||
|
||||
64. When the ‘set’ builtin is invoked without options, it does not
|
||||
65. When the ‘set’ builtin is invoked without options, it does not
|
||||
display shell function names and definitions.
|
||||
|
||||
65. When the ‘set’ builtin is invoked without options, it displays
|
||||
66. When the ‘set’ builtin is invoked without options, it displays
|
||||
variable values without quotes, unless they contain shell
|
||||
metacharacters, even if the result contains nonprinting characters.
|
||||
|
||||
66. The ‘test’ builtin compares strings using the current locale when
|
||||
67. The ‘test’ builtin compares strings using the current locale when
|
||||
evaluating the ‘<’ and ‘>’ binary operators.
|
||||
|
||||
67. The ‘test’ builtin's ‘-t’ unary primary requires an argument.
|
||||
68. The ‘test’ builtin's ‘-t’ unary primary requires an argument.
|
||||
Historical versions of ‘test’ made the argument optional in certain
|
||||
cases, and Bash attempts to accommodate those for backwards
|
||||
compatibility.
|
||||
|
||||
68. The ‘trap’ builtin displays signal names without the leading
|
||||
69. The ‘trap’ builtin displays signal names without the leading
|
||||
‘SIG’.
|
||||
|
||||
69. The ‘trap’ builtin doesn't check the first argument for a possible
|
||||
70. The ‘trap’ builtin doesn't check the first argument for a possible
|
||||
signal specification and revert the signal handling to the original
|
||||
disposition if it is, unless that argument consists solely of
|
||||
digits and is a valid signal number. If users want to reset the
|
||||
handler for a given signal to the original disposition, they should
|
||||
use ‘-’ as the first argument.
|
||||
|
||||
70. ‘trap -p’ without arguments displays signals whose dispositions
|
||||
71. ‘trap -p’ without arguments displays signals whose dispositions
|
||||
are set to SIG_DFL and those that were ignored when the shell
|
||||
started, not just trapped signals.
|
||||
|
||||
71. The ‘type’ and ‘command’ builtins will not report a non-executable
|
||||
72. The ‘type’ and ‘command’ builtins will not report a non-executable
|
||||
file as having been found, though the shell will attempt to execute
|
||||
such a file if it is the only so-named file found in ‘$PATH’.
|
||||
|
||||
72. The ‘ulimit’ builtin uses a block size of 512 bytes for the ‘-c’
|
||||
73. The ‘ulimit’ builtin uses a block size of 512 bytes for the ‘-c’
|
||||
and ‘-f’ options.
|
||||
|
||||
73. The ‘unset’ builtin with the ‘-v’ option specified returns a fatal
|
||||
74. The ‘unset’ builtin with the ‘-v’ option specified returns a fatal
|
||||
error if it attempts to unset a ‘readonly’ or ‘non-unsettable’
|
||||
variable, which causes a non-interactive shell to exit.
|
||||
|
||||
74. When asked to unset a variable that appears in an assignment
|
||||
75. When asked to unset a variable that appears in an assignment
|
||||
statement preceding the command, the ‘unset’ builtin attempts to
|
||||
unset a variable of the same name in the current or previous scope
|
||||
as well. This implements the required "if an assigned variable is
|
||||
further modified by the utility, the modifications made by the
|
||||
utility shall persist" behavior.
|
||||
|
||||
75. The arrival of ‘SIGCHLD’ when a trap is set on ‘SIGCHLD’ does not
|
||||
76. The arrival of ‘SIGCHLD’ when a trap is set on ‘SIGCHLD’ does not
|
||||
interrupt the ‘wait’ builtin and cause it to return immediately.
|
||||
The trap command is run once for each child that exits.
|
||||
|
||||
76. Bash removes an exited background process's status from the list
|
||||
77. Bash removes an exited background process's status from the list
|
||||
of such statuses after the ‘wait’ builtin returns it.
|
||||
|
||||
There is additional POSIX behavior that Bash does not implement by
|
||||
@@ -13825,82 +13828,82 @@ Node: Bourne Shell Builtins155772
|
||||
Node: Bash Builtins182494
|
||||
Node: Modifying Shell Behavior220232
|
||||
Node: The Set Builtin220577
|
||||
Node: The Shopt Builtin232574
|
||||
Node: Special Builtins249630
|
||||
Node: Shell Variables250622
|
||||
Node: Bourne Shell Variables251059
|
||||
Node: Bash Variables253570
|
||||
Node: Bash Features292857
|
||||
Node: Invoking Bash293874
|
||||
Node: Bash Startup Files301107
|
||||
Node: Interactive Shells306432
|
||||
Node: What is an Interactive Shell?306843
|
||||
Node: Is this Shell Interactive?307508
|
||||
Node: Interactive Shell Behavior308335
|
||||
Node: Bash Conditional Expressions312099
|
||||
Node: Shell Arithmetic317519
|
||||
Node: Aliases320849
|
||||
Node: Arrays323986
|
||||
Node: The Directory Stack331691
|
||||
Node: Directory Stack Builtins332491
|
||||
Node: Controlling the Prompt336939
|
||||
Node: The Restricted Shell340023
|
||||
Node: Bash POSIX Mode343119
|
||||
Node: Shell Compatibility Mode362938
|
||||
Node: Job Control371948
|
||||
Node: Job Control Basics372408
|
||||
Node: Job Control Builtins378779
|
||||
Node: Job Control Variables385570
|
||||
Node: Command Line Editing386804
|
||||
Node: Introduction and Notation388510
|
||||
Node: Readline Interaction390865
|
||||
Node: Readline Bare Essentials392056
|
||||
Node: Readline Movement Commands393867
|
||||
Node: Readline Killing Commands394866
|
||||
Node: Readline Arguments396892
|
||||
Node: Searching397985
|
||||
Node: Readline Init File400231
|
||||
Node: Readline Init File Syntax401537
|
||||
Node: Conditional Init Constructs428491
|
||||
Node: Sample Init File432879
|
||||
Node: Bindable Readline Commands436002
|
||||
Node: Commands For Moving437543
|
||||
Node: Commands For History440010
|
||||
Node: Commands For Text445404
|
||||
Node: Commands For Killing449532
|
||||
Node: Numeric Arguments452323
|
||||
Node: Commands For Completion453478
|
||||
Node: Keyboard Macros459177
|
||||
Node: Miscellaneous Commands459881
|
||||
Node: Readline vi Mode467427
|
||||
Node: Programmable Completion468407
|
||||
Node: Programmable Completion Builtins478146
|
||||
Node: A Programmable Completion Example489886
|
||||
Node: Using History Interactively495234
|
||||
Node: Bash History Facilities495918
|
||||
Node: Bash History Builtins499656
|
||||
Node: History Interaction507254
|
||||
Node: Event Designators512207
|
||||
Node: Word Designators513788
|
||||
Node: Modifiers516183
|
||||
Node: Installing Bash518123
|
||||
Node: Basic Installation519242
|
||||
Node: Compilers and Options523121
|
||||
Node: Compiling For Multiple Architectures523874
|
||||
Node: Installation Names525630
|
||||
Node: Specifying the System Type527867
|
||||
Node: Sharing Defaults528616
|
||||
Node: Operation Controls529333
|
||||
Node: Optional Features530355
|
||||
Node: Reporting Bugs543081
|
||||
Node: Major Differences From The Bourne Shell544441
|
||||
Node: GNU Free Documentation License565871
|
||||
Node: Indexes591051
|
||||
Node: Builtin Index591505
|
||||
Node: Reserved Word Index598606
|
||||
Node: Variable Index601054
|
||||
Node: Function Index618470
|
||||
Node: Concept Index632606
|
||||
Node: The Shopt Builtin232612
|
||||
Node: Special Builtins249668
|
||||
Node: Shell Variables250660
|
||||
Node: Bourne Shell Variables251097
|
||||
Node: Bash Variables253608
|
||||
Node: Bash Features292895
|
||||
Node: Invoking Bash293912
|
||||
Node: Bash Startup Files301145
|
||||
Node: Interactive Shells306508
|
||||
Node: What is an Interactive Shell?306919
|
||||
Node: Is this Shell Interactive?307584
|
||||
Node: Interactive Shell Behavior308411
|
||||
Node: Bash Conditional Expressions312175
|
||||
Node: Shell Arithmetic317595
|
||||
Node: Aliases320925
|
||||
Node: Arrays324062
|
||||
Node: The Directory Stack331767
|
||||
Node: Directory Stack Builtins332567
|
||||
Node: Controlling the Prompt337015
|
||||
Node: The Restricted Shell340137
|
||||
Node: Bash POSIX Mode343233
|
||||
Node: Shell Compatibility Mode363195
|
||||
Node: Job Control372205
|
||||
Node: Job Control Basics372665
|
||||
Node: Job Control Builtins379036
|
||||
Node: Job Control Variables385827
|
||||
Node: Command Line Editing387061
|
||||
Node: Introduction and Notation388767
|
||||
Node: Readline Interaction391122
|
||||
Node: Readline Bare Essentials392313
|
||||
Node: Readline Movement Commands394124
|
||||
Node: Readline Killing Commands395123
|
||||
Node: Readline Arguments397149
|
||||
Node: Searching398242
|
||||
Node: Readline Init File400488
|
||||
Node: Readline Init File Syntax401794
|
||||
Node: Conditional Init Constructs428748
|
||||
Node: Sample Init File433136
|
||||
Node: Bindable Readline Commands436259
|
||||
Node: Commands For Moving437800
|
||||
Node: Commands For History440267
|
||||
Node: Commands For Text445661
|
||||
Node: Commands For Killing449789
|
||||
Node: Numeric Arguments452580
|
||||
Node: Commands For Completion453735
|
||||
Node: Keyboard Macros459434
|
||||
Node: Miscellaneous Commands460138
|
||||
Node: Readline vi Mode467684
|
||||
Node: Programmable Completion468664
|
||||
Node: Programmable Completion Builtins478403
|
||||
Node: A Programmable Completion Example490143
|
||||
Node: Using History Interactively495491
|
||||
Node: Bash History Facilities496175
|
||||
Node: Bash History Builtins499913
|
||||
Node: History Interaction507511
|
||||
Node: Event Designators512464
|
||||
Node: Word Designators514045
|
||||
Node: Modifiers516440
|
||||
Node: Installing Bash518380
|
||||
Node: Basic Installation519499
|
||||
Node: Compilers and Options523378
|
||||
Node: Compiling For Multiple Architectures524131
|
||||
Node: Installation Names525887
|
||||
Node: Specifying the System Type528124
|
||||
Node: Sharing Defaults528873
|
||||
Node: Operation Controls529590
|
||||
Node: Optional Features530612
|
||||
Node: Reporting Bugs543338
|
||||
Node: Major Differences From The Bourne Shell544698
|
||||
Node: GNU Free Documentation License566128
|
||||
Node: Indexes591308
|
||||
Node: Builtin Index591762
|
||||
Node: Reserved Word Index598863
|
||||
Node: Variable Index601311
|
||||
Node: Function Index618727
|
||||
Node: Concept Index632863
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
+19
-11
@@ -6175,13 +6175,16 @@ Same as @code{-x}.
|
||||
|
||||
@item -p
|
||||
Turn on privileged mode.
|
||||
In this mode, the @env{$BASH_ENV} and @env{$ENV} files are not
|
||||
processed, shell functions are not inherited from the environment,
|
||||
and the @env{SHELLOPTS}, @env{BASHOPTS}, @env{CDPATH} and @env{GLOBIGNORE}
|
||||
variables, if they appear in the environment, are ignored.
|
||||
In this mode, Bash does not process the @env{$BASH_ENV} and @env{$ENV} files,
|
||||
does not inherit shell functions from the environment,
|
||||
and ignores the
|
||||
@env{SHELLOPTS}, @env{BASHOPTS}, @env{CDPATH} and @env{GLOBIGNORE}
|
||||
variables, if they appear in the environment.
|
||||
If the shell is started with the effective user (group) id not equal to the
|
||||
real user (group) id, and the @option{-p} option is not supplied, these actions
|
||||
are taken and the effective user id is set to the real user id.
|
||||
real user (group) id,
|
||||
and the @option{-p} option is not supplied,
|
||||
these actions are taken and the effective user id is set to the real user id
|
||||
(@pxref{Bash Startup Files} for details).
|
||||
If the @option{-p} option is supplied at startup, the effective user id is
|
||||
not reset.
|
||||
Turning this option off causes the effective user
|
||||
@@ -8182,11 +8185,16 @@ options or allow them to be specified.
|
||||
@subsubheading Invoked with unequal effective and real @sc{uid/gid}s
|
||||
|
||||
If Bash is started with the effective user (group) id not equal to the
|
||||
real user (group) id, and the @option{-p} option is not supplied, no startup
|
||||
files are read, shell functions are not inherited from the environment,
|
||||
the @env{SHELLOPTS}, @env{BASHOPTS}, @env{CDPATH}, and @env{GLOBIGNORE}
|
||||
variables, if they appear in the environment, are ignored, and the effective
|
||||
user id is set to the real user id.
|
||||
real user (group) id,
|
||||
and the @option{-p} option is not supplied,
|
||||
Bash does not attempt to read any startup files or
|
||||
@file{~/.bash_logout},
|
||||
does not inherit shell functions from the environment,
|
||||
ignores the
|
||||
@env{SHELLOPTS}, @env{BASHOPTS}, @env{CDPATH}, and @env{GLOBIGNORE}
|
||||
variables,
|
||||
if they appear in the environment,
|
||||
and sets the effective user id to the real user id.
|
||||
If the @option{-p} option is supplied at invocation, the startup behavior is
|
||||
the same, but Bash does not reset the effective user id.
|
||||
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
Copyright (C) 1988-2026 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Mon May 18 11:35:01 EDT 2026
|
||||
@set LASTCHANGE Thu Jul 9 09:19:32 EDT 2026
|
||||
|
||||
@set EDITION 5.3
|
||||
@set VERSION 5.3
|
||||
|
||||
@set UPDATED 18 May 2026
|
||||
@set UPDATED-MONTH May 2026
|
||||
@set UPDATED 9 July 2026
|
||||
@set UPDATED-MONTH July 2026
|
||||
|
||||
Reference in New Issue
Block a user