mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-13 15:10:49 +02:00
fix cd when user assigns a value to OLDPWD; fix android issue with blocked system calls; fix historical use of test -t; fix issue with foreground-TSTP async jobs
This commit is contained in:
+9
-5
@@ -2720,8 +2720,10 @@ CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS
|
||||
bolic links and operate on the target of the link, rather than the link
|
||||
itself.
|
||||
|
||||
When used with [[[[, the << and >> operators sort lexicographically using
|
||||
the current locale. The tteesstt command sorts using ASCII ordering.
|
||||
When used with [[[[, or when the shell is in _p_o_s_i_x _m_o_d_e, the << and >> op-
|
||||
erators sort lexicographically using the current locale. When the
|
||||
shell is not in _p_o_s_i_x _m_o_d_e, the tteesstt command sorts using ASCII order-
|
||||
ing.
|
||||
|
||||
--aa _f_i_l_e
|
||||
True if _f_i_l_e exists.
|
||||
@@ -6317,8 +6319,10 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
|
||||
The expression is parsed and evaluated according to
|
||||
precedence using the rules listed above.
|
||||
|
||||
When used with tteesstt or [[, the << and >> operators sort lexico-
|
||||
graphically using ASCII ordering.
|
||||
If the shell is not in _p_o_s_i_x _m_o_d_e, when used with tteesstt or [[, the
|
||||
<< and >> operators sort lexicographically using ASCII ordering.
|
||||
When the shell is in _p_o_s_i_x _m_o_d_e, these operators sort using the
|
||||
current locale.
|
||||
|
||||
ttiimmeess Print the accumulated user and system times for the shell and
|
||||
for processes run from the shell. The return status is 0.
|
||||
@@ -6800,4 +6804,4 @@ BBUUGGSS
|
||||
|
||||
|
||||
|
||||
GNU Bash 5.3 2023 June 28 BASH(1)
|
||||
GNU Bash 5.3 2023 July 7 BASH(1)
|
||||
|
||||
+11
-5
@@ -5,12 +5,12 @@
|
||||
.\" Case Western Reserve University
|
||||
.\" chet.ramey@case.edu
|
||||
.\"
|
||||
.\" Last Change: Wed Jun 28 14:06:27 EDT 2023
|
||||
.\" Last Change: Fri Jul 7 15:07:53 EDT 2023
|
||||
.\"
|
||||
.\" bash_builtins, strip all but Built-Ins section
|
||||
.if \n(zZ=1 .ig zZ
|
||||
.if \n(zY=1 .ig zY
|
||||
.TH BASH 1 "2023 June 28" "GNU Bash 5.3"
|
||||
.TH BASH 1 "2023 July 7" "GNU Bash 5.3"
|
||||
.\"
|
||||
.\" There's some problem with having a `@'
|
||||
.\" in a tagged paragraph with the BSD man macros.
|
||||
@@ -4874,9 +4874,12 @@ Unless otherwise specified, primaries that operate on files follow symbolic
|
||||
links and operate on the target of the link, rather than the link itself.
|
||||
.if t .sp 0.5
|
||||
.if n .sp 1
|
||||
When used with \fB[[\fP, the \fB<\fP and \fB>\fP operators sort
|
||||
When used with \fB[[\fP,
|
||||
or when the shell is in \fIposix mode\fP,
|
||||
the \fB<\fP and \fB>\fP operators sort
|
||||
lexicographically using the current locale.
|
||||
The \fBtest\fP command sorts using ASCII ordering.
|
||||
When the shell is not in \fIposix mode\fP,
|
||||
the \fBtest\fP command sorts using ASCII ordering.
|
||||
.sp 1
|
||||
.PD 0
|
||||
.TP
|
||||
@@ -11028,8 +11031,11 @@ using the rules listed above.
|
||||
.if t .sp 0.5
|
||||
.if n .sp 1
|
||||
.LP
|
||||
When used with \fBtest\fP or \fB[\fP, the \fB<\fP and \fB>\fP operators
|
||||
If the shell is not in \fIposix mode\fP,
|
||||
when used with \fBtest\fP or \fB[\fP, the \fB<\fP and \fB>\fP operators
|
||||
sort lexicographically using ASCII ordering.
|
||||
When the shell is in \fIposix mode\fP, these operators sort using the
|
||||
current locale.
|
||||
.RE
|
||||
.PD
|
||||
.TP
|
||||
|
||||
+13
-7
@@ -3,7 +3,7 @@
|
||||
</HEAD>
|
||||
<BODY><TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2023 June 28<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2023 July 7<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<BR><A HREF="#index">Index</A>
|
||||
@@ -6160,9 +6160,12 @@ links and operate on the target of the link, rather than the link itself.
|
||||
<P>
|
||||
|
||||
|
||||
When used with <B>[[</B>, the <B><</B> and <B>></B> operators sort
|
||||
When used with <B>[[</B>,
|
||||
or when the shell is in <I>posix mode</I>,
|
||||
the <B><</B> and <B>></B> operators sort
|
||||
lexicographically using the current locale.
|
||||
The <B>test</B> command sorts using ASCII ordering.
|
||||
When the shell is not in <I>posix mode</I>,
|
||||
the <B>test</B> command sorts using ASCII ordering.
|
||||
<P>
|
||||
|
||||
<DL COMPACT>
|
||||
@@ -13849,8 +13852,11 @@ using the rules listed above.
|
||||
</DL>
|
||||
<P>
|
||||
|
||||
When used with <B>test</B> or <B>[</B>, the <B><</B> and <B>></B> operators
|
||||
If the shell is not in <I>posix mode</I>,
|
||||
when used with <B>test</B> or <B>[</B>, the <B><</B> and <B>></B> operators
|
||||
sort lexicographically using ASCII ordering.
|
||||
When the shell is in <I>posix mode</I>, these operators sort using the
|
||||
current locale.
|
||||
</DL>
|
||||
|
||||
|
||||
@@ -15051,7 +15057,7 @@ There may be only one active coprocess at a time.
|
||||
<HR>
|
||||
<TABLE WIDTH=100%>
|
||||
<TR>
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash 5.3<TH ALIGN=CENTER width=33%>2023 June 28<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
<TH ALIGN=LEFT width=33%>GNU Bash 5.3<TH ALIGN=CENTER width=33%>2023 July 7<TH ALIGN=RIGHT width=33%>BASH(1)
|
||||
</TR>
|
||||
</TABLE>
|
||||
<HR>
|
||||
@@ -15157,7 +15163,7 @@ There may be only one active coprocess at a time.
|
||||
<DT><A HREF="#lbDI">BUGS</A><DD>
|
||||
</DL>
|
||||
<HR>
|
||||
This document was created by man2html from /usr/local/src/bash/bash-20230703/doc/bash.1.<BR>
|
||||
Time: 05 July 2023 11:27:18 EDT
|
||||
This document was created by man2html from /usr/local/src/bash/bash-20230705/doc/bash.1.<BR>
|
||||
Time: 07 July 2023 16:22:29 EDT
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
+166
-144
@@ -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.3, 29 June 2023).
|
||||
Bash shell (version 5.3, 7 July 2023).
|
||||
|
||||
This is Edition 5.3, last updated 29 June 2023, of 'The GNU Bash
|
||||
This is Edition 5.3, last updated 7 July 2023, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.3.
|
||||
|
||||
Copyright (C) 1988-2023 Free Software Foundation, Inc.
|
||||
@@ -26,10 +26,10 @@ Bash Features
|
||||
*************
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.3, 29 June 2023). The Bash home page is
|
||||
Bash shell (version 5.3, 7 July 2023). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 29 June 2023, of 'The GNU Bash
|
||||
This is Edition 5.3, last updated 7 July 2023, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -3613,8 +3613,25 @@ standard.
|
||||
The expression is parsed and evaluated according to precedence
|
||||
using the rules listed above.
|
||||
|
||||
When used with 'test' or '[', the '<' and '>' operators sort
|
||||
lexicographically using ASCII ordering.
|
||||
If the shell is not in POSIX mode, when used with 'test' or '[',
|
||||
the '<' and '>' operators sort lexicographically using ASCII
|
||||
ordering. If the shell is in POSIX mode, these operators use the
|
||||
current locale.
|
||||
|
||||
The historical operator-precedence parsing with 4 or more arguments
|
||||
can lead to ambiguities when it encounters strings that look like
|
||||
primaries. The POSIX standard has deprecated the '-a' and '-o'
|
||||
primaries and enclosing expressions within parentheses. Scripts
|
||||
should no longer use them. It's much more reliable to restrict
|
||||
test invocations to a single primary, and to replace uses of '-a'
|
||||
and '-o' with the shell's '&&' and '||' list operators. For
|
||||
example, use
|
||||
|
||||
test -n string1 && test -n string2
|
||||
|
||||
instead of
|
||||
|
||||
test -n string1 -a -n string2
|
||||
|
||||
'times'
|
||||
times
|
||||
@@ -7493,7 +7510,12 @@ startup files.
|
||||
66. The 'test' builtin compares strings using the current locale when
|
||||
processing the '<' and '>' binary operators.
|
||||
|
||||
67. Command substitutions don't set the '?' special parameter. The
|
||||
67. 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. Command substitutions don't set the '?' special parameter. The
|
||||
exit status of a simple command without a command word is still the
|
||||
exit status of the last command substitution that occurred while
|
||||
evaluating the variable assignments and redirections in that
|
||||
@@ -12107,19 +12129,19 @@ D.1 Index of Shell Builtin Commands
|
||||
* test: Bourne Shell Builtins.
|
||||
(line 281)
|
||||
* times: Bourne Shell Builtins.
|
||||
(line 366)
|
||||
(line 383)
|
||||
* trap: Bourne Shell Builtins.
|
||||
(line 372)
|
||||
(line 389)
|
||||
* true: Bourne Shell Builtins.
|
||||
(line 434)
|
||||
(line 451)
|
||||
* type: Bash Builtins. (line 615)
|
||||
* typeset: Bash Builtins. (line 653)
|
||||
* ulimit: Bash Builtins. (line 659)
|
||||
* umask: Bourne Shell Builtins.
|
||||
(line 439)
|
||||
(line 456)
|
||||
* unalias: Bash Builtins. (line 765)
|
||||
* unset: Bourne Shell Builtins.
|
||||
(line 457)
|
||||
(line 474)
|
||||
* wait: Job Control Builtins.
|
||||
(line 76)
|
||||
|
||||
@@ -12794,138 +12816,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top886
|
||||
Node: Introduction2795
|
||||
Node: What is Bash?3008
|
||||
Node: What is a shell?4119
|
||||
Node: Definitions6654
|
||||
Node: Basic Shell Features9602
|
||||
Node: Shell Syntax10818
|
||||
Node: Shell Operation11841
|
||||
Node: Quoting13131
|
||||
Node: Escape Character14432
|
||||
Node: Single Quotes14914
|
||||
Node: Double Quotes15259
|
||||
Node: ANSI-C Quoting16534
|
||||
Node: Locale Translation17843
|
||||
Node: Creating Internationalized Scripts19151
|
||||
Node: Comments23265
|
||||
Node: Shell Commands23880
|
||||
Node: Reserved Words24815
|
||||
Node: Simple Commands25568
|
||||
Node: Pipelines26219
|
||||
Node: Lists29202
|
||||
Node: Compound Commands30994
|
||||
Node: Looping Constructs32003
|
||||
Node: Conditional Constructs34495
|
||||
Node: Command Grouping48980
|
||||
Node: Coprocesses50455
|
||||
Node: GNU Parallel53115
|
||||
Node: Shell Functions54029
|
||||
Node: Shell Parameters61911
|
||||
Node: Positional Parameters66296
|
||||
Node: Special Parameters67195
|
||||
Node: Shell Expansions70406
|
||||
Node: Brace Expansion72491
|
||||
Node: Tilde Expansion75222
|
||||
Node: Shell Parameter Expansion77840
|
||||
Node: Command Substitution96239
|
||||
Node: Arithmetic Expansion99700
|
||||
Node: Process Substitution100665
|
||||
Node: Word Splitting101782
|
||||
Node: Filename Expansion103827
|
||||
Node: Pattern Matching106757
|
||||
Node: Quote Removal111756
|
||||
Node: Redirections112048
|
||||
Node: Executing Commands121738
|
||||
Node: Simple Command Expansion122405
|
||||
Node: Command Search and Execution124512
|
||||
Node: Command Execution Environment126896
|
||||
Node: Environment129928
|
||||
Node: Exit Status131588
|
||||
Node: Signals133369
|
||||
Node: Shell Scripts136815
|
||||
Node: Shell Builtin Commands139839
|
||||
Node: Bourne Shell Builtins141874
|
||||
Node: Bash Builtins164278
|
||||
Node: Modifying Shell Behavior196274
|
||||
Node: The Set Builtin196616
|
||||
Node: The Shopt Builtin207211
|
||||
Node: Special Builtins223215
|
||||
Node: Shell Variables224191
|
||||
Node: Bourne Shell Variables224625
|
||||
Node: Bash Variables226726
|
||||
Node: Bash Features261680
|
||||
Node: Invoking Bash262690
|
||||
Node: Bash Startup Files268700
|
||||
Node: Interactive Shells273828
|
||||
Node: What is an Interactive Shell?274236
|
||||
Node: Is this Shell Interactive?274882
|
||||
Node: Interactive Shell Behavior275694
|
||||
Node: Bash Conditional Expressions279320
|
||||
Node: Shell Arithmetic283959
|
||||
Node: Aliases286917
|
||||
Node: Arrays289808
|
||||
Node: The Directory Stack296368
|
||||
Node: Directory Stack Builtins297149
|
||||
Node: Controlling the Prompt301406
|
||||
Node: The Restricted Shell304368
|
||||
Node: Bash POSIX Mode306975
|
||||
Node: Shell Compatibility Mode322888
|
||||
Node: Job Control331129
|
||||
Node: Job Control Basics331586
|
||||
Node: Job Control Builtins336585
|
||||
Node: Job Control Variables342377
|
||||
Node: Command Line Editing343530
|
||||
Node: Introduction and Notation345198
|
||||
Node: Readline Interaction346818
|
||||
Node: Readline Bare Essentials348006
|
||||
Node: Readline Movement Commands349792
|
||||
Node: Readline Killing Commands350749
|
||||
Node: Readline Arguments352667
|
||||
Node: Searching353708
|
||||
Node: Readline Init File355891
|
||||
Node: Readline Init File Syntax357149
|
||||
Node: Conditional Init Constructs380937
|
||||
Node: Sample Init File385130
|
||||
Node: Bindable Readline Commands388251
|
||||
Node: Commands For Moving389452
|
||||
Node: Commands For History391500
|
||||
Node: Commands For Text396491
|
||||
Node: Commands For Killing400137
|
||||
Node: Numeric Arguments403167
|
||||
Node: Commands For Completion404303
|
||||
Node: Keyboard Macros408491
|
||||
Node: Miscellaneous Commands409176
|
||||
Node: Readline vi Mode415211
|
||||
Node: Programmable Completion416115
|
||||
Node: Programmable Completion Builtins423892
|
||||
Node: A Programmable Completion Example435009
|
||||
Node: Using History Interactively440254
|
||||
Node: Bash History Facilities440935
|
||||
Node: Bash History Builtins443937
|
||||
Node: History Interaction448958
|
||||
Node: Event Designators452575
|
||||
Node: Word Designators453926
|
||||
Node: Modifiers455683
|
||||
Node: Installing Bash457488
|
||||
Node: Basic Installation458622
|
||||
Node: Compilers and Options462341
|
||||
Node: Compiling For Multiple Architectures463079
|
||||
Node: Installation Names464768
|
||||
Node: Specifying the System Type466874
|
||||
Node: Sharing Defaults467588
|
||||
Node: Operation Controls468258
|
||||
Node: Optional Features469213
|
||||
Node: Reporting Bugs480429
|
||||
Node: Major Differences From The Bourne Shell481760
|
||||
Node: GNU Free Documentation License498606
|
||||
Node: Indexes523780
|
||||
Node: Builtin Index524231
|
||||
Node: Reserved Word Index531329
|
||||
Node: Variable Index533774
|
||||
Node: Function Index550905
|
||||
Node: Concept Index564686
|
||||
Node: Top884
|
||||
Node: Introduction2791
|
||||
Node: What is Bash?3004
|
||||
Node: What is a shell?4115
|
||||
Node: Definitions6650
|
||||
Node: Basic Shell Features9598
|
||||
Node: Shell Syntax10814
|
||||
Node: Shell Operation11837
|
||||
Node: Quoting13127
|
||||
Node: Escape Character14428
|
||||
Node: Single Quotes14910
|
||||
Node: Double Quotes15255
|
||||
Node: ANSI-C Quoting16530
|
||||
Node: Locale Translation17839
|
||||
Node: Creating Internationalized Scripts19147
|
||||
Node: Comments23261
|
||||
Node: Shell Commands23876
|
||||
Node: Reserved Words24811
|
||||
Node: Simple Commands25564
|
||||
Node: Pipelines26215
|
||||
Node: Lists29198
|
||||
Node: Compound Commands30990
|
||||
Node: Looping Constructs31999
|
||||
Node: Conditional Constructs34491
|
||||
Node: Command Grouping48976
|
||||
Node: Coprocesses50451
|
||||
Node: GNU Parallel53111
|
||||
Node: Shell Functions54025
|
||||
Node: Shell Parameters61907
|
||||
Node: Positional Parameters66292
|
||||
Node: Special Parameters67191
|
||||
Node: Shell Expansions70402
|
||||
Node: Brace Expansion72487
|
||||
Node: Tilde Expansion75218
|
||||
Node: Shell Parameter Expansion77836
|
||||
Node: Command Substitution96235
|
||||
Node: Arithmetic Expansion99696
|
||||
Node: Process Substitution100661
|
||||
Node: Word Splitting101778
|
||||
Node: Filename Expansion103823
|
||||
Node: Pattern Matching106753
|
||||
Node: Quote Removal111752
|
||||
Node: Redirections112044
|
||||
Node: Executing Commands121734
|
||||
Node: Simple Command Expansion122401
|
||||
Node: Command Search and Execution124508
|
||||
Node: Command Execution Environment126892
|
||||
Node: Environment129924
|
||||
Node: Exit Status131584
|
||||
Node: Signals133365
|
||||
Node: Shell Scripts136811
|
||||
Node: Shell Builtin Commands139835
|
||||
Node: Bourne Shell Builtins141870
|
||||
Node: Bash Builtins165003
|
||||
Node: Modifying Shell Behavior196999
|
||||
Node: The Set Builtin197341
|
||||
Node: The Shopt Builtin207936
|
||||
Node: Special Builtins223940
|
||||
Node: Shell Variables224916
|
||||
Node: Bourne Shell Variables225350
|
||||
Node: Bash Variables227451
|
||||
Node: Bash Features262405
|
||||
Node: Invoking Bash263415
|
||||
Node: Bash Startup Files269425
|
||||
Node: Interactive Shells274553
|
||||
Node: What is an Interactive Shell?274961
|
||||
Node: Is this Shell Interactive?275607
|
||||
Node: Interactive Shell Behavior276419
|
||||
Node: Bash Conditional Expressions280045
|
||||
Node: Shell Arithmetic284684
|
||||
Node: Aliases287642
|
||||
Node: Arrays290533
|
||||
Node: The Directory Stack297093
|
||||
Node: Directory Stack Builtins297874
|
||||
Node: Controlling the Prompt302131
|
||||
Node: The Restricted Shell305093
|
||||
Node: Bash POSIX Mode307700
|
||||
Node: Shell Compatibility Mode323840
|
||||
Node: Job Control332081
|
||||
Node: Job Control Basics332538
|
||||
Node: Job Control Builtins337537
|
||||
Node: Job Control Variables343329
|
||||
Node: Command Line Editing344482
|
||||
Node: Introduction and Notation346150
|
||||
Node: Readline Interaction347770
|
||||
Node: Readline Bare Essentials348958
|
||||
Node: Readline Movement Commands350744
|
||||
Node: Readline Killing Commands351701
|
||||
Node: Readline Arguments353619
|
||||
Node: Searching354660
|
||||
Node: Readline Init File356843
|
||||
Node: Readline Init File Syntax358101
|
||||
Node: Conditional Init Constructs381889
|
||||
Node: Sample Init File386082
|
||||
Node: Bindable Readline Commands389203
|
||||
Node: Commands For Moving390404
|
||||
Node: Commands For History392452
|
||||
Node: Commands For Text397443
|
||||
Node: Commands For Killing401089
|
||||
Node: Numeric Arguments404119
|
||||
Node: Commands For Completion405255
|
||||
Node: Keyboard Macros409443
|
||||
Node: Miscellaneous Commands410128
|
||||
Node: Readline vi Mode416163
|
||||
Node: Programmable Completion417067
|
||||
Node: Programmable Completion Builtins424844
|
||||
Node: A Programmable Completion Example435961
|
||||
Node: Using History Interactively441206
|
||||
Node: Bash History Facilities441887
|
||||
Node: Bash History Builtins444889
|
||||
Node: History Interaction449910
|
||||
Node: Event Designators453527
|
||||
Node: Word Designators454878
|
||||
Node: Modifiers456635
|
||||
Node: Installing Bash458440
|
||||
Node: Basic Installation459574
|
||||
Node: Compilers and Options463293
|
||||
Node: Compiling For Multiple Architectures464031
|
||||
Node: Installation Names465720
|
||||
Node: Specifying the System Type467826
|
||||
Node: Sharing Defaults468540
|
||||
Node: Operation Controls469210
|
||||
Node: Optional Features470165
|
||||
Node: Reporting Bugs481381
|
||||
Node: Major Differences From The Bourne Shell482712
|
||||
Node: GNU Free Documentation License499558
|
||||
Node: Indexes524732
|
||||
Node: Builtin Index525183
|
||||
Node: Reserved Word Index532281
|
||||
Node: Variable Index534726
|
||||
Node: Function Index551857
|
||||
Node: Concept Index565638
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
+166
-144
@@ -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.3, 29 June 2023).
|
||||
Bash shell (version 5.3, 7 July 2023).
|
||||
|
||||
This is Edition 5.3, last updated 29 June 2023, of 'The GNU Bash
|
||||
This is Edition 5.3, last updated 7 July 2023, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.3.
|
||||
|
||||
Copyright (C) 1988-2023 Free Software Foundation, Inc.
|
||||
@@ -27,10 +27,10 @@ Bash Features
|
||||
*************
|
||||
|
||||
This text is a brief description of the features that are present in the
|
||||
Bash shell (version 5.3, 29 June 2023). The Bash home page is
|
||||
Bash shell (version 5.3, 7 July 2023). The Bash home page is
|
||||
<http://www.gnu.org/software/bash/>.
|
||||
|
||||
This is Edition 5.3, last updated 29 June 2023, of 'The GNU Bash
|
||||
This is Edition 5.3, last updated 7 July 2023, of 'The GNU Bash
|
||||
Reference Manual', for 'Bash', Version 5.3.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -3614,8 +3614,25 @@ standard.
|
||||
The expression is parsed and evaluated according to precedence
|
||||
using the rules listed above.
|
||||
|
||||
When used with 'test' or '[', the '<' and '>' operators sort
|
||||
lexicographically using ASCII ordering.
|
||||
If the shell is not in POSIX mode, when used with 'test' or '[',
|
||||
the '<' and '>' operators sort lexicographically using ASCII
|
||||
ordering. If the shell is in POSIX mode, these operators use the
|
||||
current locale.
|
||||
|
||||
The historical operator-precedence parsing with 4 or more arguments
|
||||
can lead to ambiguities when it encounters strings that look like
|
||||
primaries. The POSIX standard has deprecated the '-a' and '-o'
|
||||
primaries and enclosing expressions within parentheses. Scripts
|
||||
should no longer use them. It's much more reliable to restrict
|
||||
test invocations to a single primary, and to replace uses of '-a'
|
||||
and '-o' with the shell's '&&' and '||' list operators. For
|
||||
example, use
|
||||
|
||||
test -n string1 && test -n string2
|
||||
|
||||
instead of
|
||||
|
||||
test -n string1 -a -n string2
|
||||
|
||||
'times'
|
||||
times
|
||||
@@ -7494,7 +7511,12 @@ startup files.
|
||||
66. The 'test' builtin compares strings using the current locale when
|
||||
processing the '<' and '>' binary operators.
|
||||
|
||||
67. Command substitutions don't set the '?' special parameter. The
|
||||
67. 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. Command substitutions don't set the '?' special parameter. The
|
||||
exit status of a simple command without a command word is still the
|
||||
exit status of the last command substitution that occurred while
|
||||
evaluating the variable assignments and redirections in that
|
||||
@@ -12108,19 +12130,19 @@ D.1 Index of Shell Builtin Commands
|
||||
* test: Bourne Shell Builtins.
|
||||
(line 281)
|
||||
* times: Bourne Shell Builtins.
|
||||
(line 366)
|
||||
(line 383)
|
||||
* trap: Bourne Shell Builtins.
|
||||
(line 372)
|
||||
(line 389)
|
||||
* true: Bourne Shell Builtins.
|
||||
(line 434)
|
||||
(line 451)
|
||||
* type: Bash Builtins. (line 615)
|
||||
* typeset: Bash Builtins. (line 653)
|
||||
* ulimit: Bash Builtins. (line 659)
|
||||
* umask: Bourne Shell Builtins.
|
||||
(line 439)
|
||||
(line 456)
|
||||
* unalias: Bash Builtins. (line 765)
|
||||
* unset: Bourne Shell Builtins.
|
||||
(line 457)
|
||||
(line 474)
|
||||
* wait: Job Control Builtins.
|
||||
(line 76)
|
||||
|
||||
@@ -12795,138 +12817,138 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top889
|
||||
Node: Introduction2801
|
||||
Node: What is Bash?3017
|
||||
Node: What is a shell?4131
|
||||
Node: Definitions6669
|
||||
Node: Basic Shell Features9620
|
||||
Node: Shell Syntax10839
|
||||
Node: Shell Operation11865
|
||||
Node: Quoting13158
|
||||
Node: Escape Character14462
|
||||
Node: Single Quotes14947
|
||||
Node: Double Quotes15295
|
||||
Node: ANSI-C Quoting16573
|
||||
Node: Locale Translation17885
|
||||
Node: Creating Internationalized Scripts19196
|
||||
Node: Comments23313
|
||||
Node: Shell Commands23931
|
||||
Node: Reserved Words24869
|
||||
Node: Simple Commands25625
|
||||
Node: Pipelines26279
|
||||
Node: Lists29265
|
||||
Node: Compound Commands31060
|
||||
Node: Looping Constructs32072
|
||||
Node: Conditional Constructs34567
|
||||
Node: Command Grouping49055
|
||||
Node: Coprocesses50533
|
||||
Node: GNU Parallel53196
|
||||
Node: Shell Functions54113
|
||||
Node: Shell Parameters61998
|
||||
Node: Positional Parameters66386
|
||||
Node: Special Parameters67288
|
||||
Node: Shell Expansions70502
|
||||
Node: Brace Expansion72590
|
||||
Node: Tilde Expansion75324
|
||||
Node: Shell Parameter Expansion77945
|
||||
Node: Command Substitution96347
|
||||
Node: Arithmetic Expansion99811
|
||||
Node: Process Substitution100779
|
||||
Node: Word Splitting101899
|
||||
Node: Filename Expansion103947
|
||||
Node: Pattern Matching106880
|
||||
Node: Quote Removal111882
|
||||
Node: Redirections112177
|
||||
Node: Executing Commands121870
|
||||
Node: Simple Command Expansion122540
|
||||
Node: Command Search and Execution124650
|
||||
Node: Command Execution Environment127037
|
||||
Node: Environment130072
|
||||
Node: Exit Status131735
|
||||
Node: Signals133519
|
||||
Node: Shell Scripts136968
|
||||
Node: Shell Builtin Commands139995
|
||||
Node: Bourne Shell Builtins142033
|
||||
Node: Bash Builtins164440
|
||||
Node: Modifying Shell Behavior196439
|
||||
Node: The Set Builtin196784
|
||||
Node: The Shopt Builtin207382
|
||||
Node: Special Builtins223389
|
||||
Node: Shell Variables224368
|
||||
Node: Bourne Shell Variables224805
|
||||
Node: Bash Variables226909
|
||||
Node: Bash Features261866
|
||||
Node: Invoking Bash262879
|
||||
Node: Bash Startup Files268892
|
||||
Node: Interactive Shells274023
|
||||
Node: What is an Interactive Shell?274434
|
||||
Node: Is this Shell Interactive?275083
|
||||
Node: Interactive Shell Behavior275898
|
||||
Node: Bash Conditional Expressions279527
|
||||
Node: Shell Arithmetic284169
|
||||
Node: Aliases287130
|
||||
Node: Arrays290024
|
||||
Node: The Directory Stack296587
|
||||
Node: Directory Stack Builtins297371
|
||||
Node: Controlling the Prompt301631
|
||||
Node: The Restricted Shell304596
|
||||
Node: Bash POSIX Mode307206
|
||||
Node: Shell Compatibility Mode323122
|
||||
Node: Job Control331366
|
||||
Node: Job Control Basics331826
|
||||
Node: Job Control Builtins336828
|
||||
Node: Job Control Variables342623
|
||||
Node: Command Line Editing343779
|
||||
Node: Introduction and Notation345450
|
||||
Node: Readline Interaction347073
|
||||
Node: Readline Bare Essentials348264
|
||||
Node: Readline Movement Commands350053
|
||||
Node: Readline Killing Commands351013
|
||||
Node: Readline Arguments352934
|
||||
Node: Searching353978
|
||||
Node: Readline Init File356164
|
||||
Node: Readline Init File Syntax357425
|
||||
Node: Conditional Init Constructs381216
|
||||
Node: Sample Init File385412
|
||||
Node: Bindable Readline Commands388536
|
||||
Node: Commands For Moving389740
|
||||
Node: Commands For History391791
|
||||
Node: Commands For Text396785
|
||||
Node: Commands For Killing400434
|
||||
Node: Numeric Arguments403467
|
||||
Node: Commands For Completion404606
|
||||
Node: Keyboard Macros408797
|
||||
Node: Miscellaneous Commands409485
|
||||
Node: Readline vi Mode415523
|
||||
Node: Programmable Completion416430
|
||||
Node: Programmable Completion Builtins424210
|
||||
Node: A Programmable Completion Example435330
|
||||
Node: Using History Interactively440578
|
||||
Node: Bash History Facilities441262
|
||||
Node: Bash History Builtins444267
|
||||
Node: History Interaction449291
|
||||
Node: Event Designators452911
|
||||
Node: Word Designators454265
|
||||
Node: Modifiers456025
|
||||
Node: Installing Bash457833
|
||||
Node: Basic Installation458970
|
||||
Node: Compilers and Options462692
|
||||
Node: Compiling For Multiple Architectures463433
|
||||
Node: Installation Names465125
|
||||
Node: Specifying the System Type467234
|
||||
Node: Sharing Defaults467951
|
||||
Node: Operation Controls468624
|
||||
Node: Optional Features469582
|
||||
Node: Reporting Bugs480801
|
||||
Node: Major Differences From The Bourne Shell482135
|
||||
Node: GNU Free Documentation License498984
|
||||
Node: Indexes524161
|
||||
Node: Builtin Index524615
|
||||
Node: Reserved Word Index531716
|
||||
Node: Variable Index534164
|
||||
Node: Function Index551298
|
||||
Node: Concept Index565082
|
||||
Node: Top887
|
||||
Node: Introduction2797
|
||||
Node: What is Bash?3013
|
||||
Node: What is a shell?4127
|
||||
Node: Definitions6665
|
||||
Node: Basic Shell Features9616
|
||||
Node: Shell Syntax10835
|
||||
Node: Shell Operation11861
|
||||
Node: Quoting13154
|
||||
Node: Escape Character14458
|
||||
Node: Single Quotes14943
|
||||
Node: Double Quotes15291
|
||||
Node: ANSI-C Quoting16569
|
||||
Node: Locale Translation17881
|
||||
Node: Creating Internationalized Scripts19192
|
||||
Node: Comments23309
|
||||
Node: Shell Commands23927
|
||||
Node: Reserved Words24865
|
||||
Node: Simple Commands25621
|
||||
Node: Pipelines26275
|
||||
Node: Lists29261
|
||||
Node: Compound Commands31056
|
||||
Node: Looping Constructs32068
|
||||
Node: Conditional Constructs34563
|
||||
Node: Command Grouping49051
|
||||
Node: Coprocesses50529
|
||||
Node: GNU Parallel53192
|
||||
Node: Shell Functions54109
|
||||
Node: Shell Parameters61994
|
||||
Node: Positional Parameters66382
|
||||
Node: Special Parameters67284
|
||||
Node: Shell Expansions70498
|
||||
Node: Brace Expansion72586
|
||||
Node: Tilde Expansion75320
|
||||
Node: Shell Parameter Expansion77941
|
||||
Node: Command Substitution96343
|
||||
Node: Arithmetic Expansion99807
|
||||
Node: Process Substitution100775
|
||||
Node: Word Splitting101895
|
||||
Node: Filename Expansion103943
|
||||
Node: Pattern Matching106876
|
||||
Node: Quote Removal111878
|
||||
Node: Redirections112173
|
||||
Node: Executing Commands121866
|
||||
Node: Simple Command Expansion122536
|
||||
Node: Command Search and Execution124646
|
||||
Node: Command Execution Environment127033
|
||||
Node: Environment130068
|
||||
Node: Exit Status131731
|
||||
Node: Signals133515
|
||||
Node: Shell Scripts136964
|
||||
Node: Shell Builtin Commands139991
|
||||
Node: Bourne Shell Builtins142029
|
||||
Node: Bash Builtins165165
|
||||
Node: Modifying Shell Behavior197164
|
||||
Node: The Set Builtin197509
|
||||
Node: The Shopt Builtin208107
|
||||
Node: Special Builtins224114
|
||||
Node: Shell Variables225093
|
||||
Node: Bourne Shell Variables225530
|
||||
Node: Bash Variables227634
|
||||
Node: Bash Features262591
|
||||
Node: Invoking Bash263604
|
||||
Node: Bash Startup Files269617
|
||||
Node: Interactive Shells274748
|
||||
Node: What is an Interactive Shell?275159
|
||||
Node: Is this Shell Interactive?275808
|
||||
Node: Interactive Shell Behavior276623
|
||||
Node: Bash Conditional Expressions280252
|
||||
Node: Shell Arithmetic284894
|
||||
Node: Aliases287855
|
||||
Node: Arrays290749
|
||||
Node: The Directory Stack297312
|
||||
Node: Directory Stack Builtins298096
|
||||
Node: Controlling the Prompt302356
|
||||
Node: The Restricted Shell305321
|
||||
Node: Bash POSIX Mode307931
|
||||
Node: Shell Compatibility Mode324074
|
||||
Node: Job Control332318
|
||||
Node: Job Control Basics332778
|
||||
Node: Job Control Builtins337780
|
||||
Node: Job Control Variables343575
|
||||
Node: Command Line Editing344731
|
||||
Node: Introduction and Notation346402
|
||||
Node: Readline Interaction348025
|
||||
Node: Readline Bare Essentials349216
|
||||
Node: Readline Movement Commands351005
|
||||
Node: Readline Killing Commands351965
|
||||
Node: Readline Arguments353886
|
||||
Node: Searching354930
|
||||
Node: Readline Init File357116
|
||||
Node: Readline Init File Syntax358377
|
||||
Node: Conditional Init Constructs382168
|
||||
Node: Sample Init File386364
|
||||
Node: Bindable Readline Commands389488
|
||||
Node: Commands For Moving390692
|
||||
Node: Commands For History392743
|
||||
Node: Commands For Text397737
|
||||
Node: Commands For Killing401386
|
||||
Node: Numeric Arguments404419
|
||||
Node: Commands For Completion405558
|
||||
Node: Keyboard Macros409749
|
||||
Node: Miscellaneous Commands410437
|
||||
Node: Readline vi Mode416475
|
||||
Node: Programmable Completion417382
|
||||
Node: Programmable Completion Builtins425162
|
||||
Node: A Programmable Completion Example436282
|
||||
Node: Using History Interactively441530
|
||||
Node: Bash History Facilities442214
|
||||
Node: Bash History Builtins445219
|
||||
Node: History Interaction450243
|
||||
Node: Event Designators453863
|
||||
Node: Word Designators455217
|
||||
Node: Modifiers456977
|
||||
Node: Installing Bash458785
|
||||
Node: Basic Installation459922
|
||||
Node: Compilers and Options463644
|
||||
Node: Compiling For Multiple Architectures464385
|
||||
Node: Installation Names466077
|
||||
Node: Specifying the System Type468186
|
||||
Node: Sharing Defaults468903
|
||||
Node: Operation Controls469576
|
||||
Node: Optional Features470534
|
||||
Node: Reporting Bugs481753
|
||||
Node: Major Differences From The Bourne Shell483087
|
||||
Node: GNU Free Documentation License499936
|
||||
Node: Indexes525113
|
||||
Node: Builtin Index525567
|
||||
Node: Reserved Word Index532668
|
||||
Node: Variable Index535116
|
||||
Node: Function Index552250
|
||||
Node: Concept Index566034
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
+28
-1
@@ -4288,8 +4288,30 @@ The expression is parsed and evaluated according to precedence
|
||||
using the rules listed above.
|
||||
@end table
|
||||
|
||||
When used with @code{test} or @samp{[}, the @samp{<} and @samp{>}
|
||||
If the shell is not in @sc{posix} mode,
|
||||
when used with @code{test} or @samp{[}, the @samp{<} and @samp{>}
|
||||
operators sort lexicographically using ASCII ordering.
|
||||
If the shell is in @sc{posix} mode, these operators use the current locale.
|
||||
|
||||
The historical operator-precedence parsing with 4 or more arguments can
|
||||
lead to ambiguities when it encounters strings that look like primaries.
|
||||
The @sc{posix} standard has deprecated the @option{-a} and @option{-o}
|
||||
primaries and enclosing expressions within parentheses.
|
||||
Scripts should no longer use them.
|
||||
It's much more reliable to restrict test invocations to a single primary,
|
||||
and to replace uses of @option{-a} and @option{-o} with the shell's
|
||||
@code{&&} and @code{||} list operators. For example, use
|
||||
|
||||
@example
|
||||
test -n string1 && test -n string2
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
instead of
|
||||
|
||||
@example
|
||||
test -n string1 -a -n string2
|
||||
@end example
|
||||
|
||||
@item times
|
||||
@btindex times
|
||||
@@ -8700,6 +8722,11 @@ character will escape it and the backslash will be removed.
|
||||
The @code{test} builtin compares strings using the current locale when
|
||||
processing the @samp{<} and @samp{>} binary operators.
|
||||
|
||||
@item
|
||||
The @code{test} builtin's @option{-t} unary primary requires an argument.
|
||||
Historical versions of @code{test} made the argument optional in certain
|
||||
cases, and bash attempts to accommodate those for backwards compatibility.
|
||||
|
||||
@item
|
||||
Command substitutions don't set the @samp{?} special parameter. The exit
|
||||
status of a simple command without a command word is still the exit status
|
||||
|
||||
+3
-3
@@ -2,10 +2,10 @@
|
||||
Copyright (C) 1988-2023 Free Software Foundation, Inc.
|
||||
@end ignore
|
||||
|
||||
@set LASTCHANGE Thu Jun 29 16:25:08 EDT 2023
|
||||
@set LASTCHANGE Fri Jul 7 15:07:53 EDT 2023
|
||||
|
||||
@set EDITION 5.3
|
||||
@set VERSION 5.3
|
||||
|
||||
@set UPDATED 29 June 2023
|
||||
@set UPDATED-MONTH June 2023
|
||||
@set UPDATED 7 July 2023
|
||||
@set UPDATED-MONTH July 2023
|
||||
|
||||
Reference in New Issue
Block a user