mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-03 02:10:50 +02:00
commit bash-20110311 snapshot
This commit is contained in:
+148
-144
@@ -7,7 +7,7 @@ the Bash shell (version 4.2, 28 December 2010).
|
||||
This is Edition 4.2, last updated 28 December 2010, of `The GNU Bash
|
||||
Reference Manual', for `Bash', Version 4.2.
|
||||
|
||||
Copyright (C) 1988-2010 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2011 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
@@ -887,7 +887,7 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre
|
||||
without regard to the case of alphabetic characters. The return
|
||||
value is 0 if the string matches (`==') or does not match
|
||||
(`!=')the pattern, and 1 otherwise. Any part of the pattern may
|
||||
be quoted to force it to be matched as a string.
|
||||
be quoted to force the quoted portion to be matched as a string.
|
||||
|
||||
An additional binary operator, `=~', is available, with the same
|
||||
precedence as `==' and `!='. When it is used, the string to the
|
||||
@@ -899,13 +899,13 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre
|
||||
(see the description of `shopt' in *note The Shopt Builtin::) is
|
||||
enabled, the match is performed without regard to the case of
|
||||
alphabetic characters. Any part of the pattern may be quoted to
|
||||
force it to be matched as a string. Substrings matched by
|
||||
parenthesized subexpressions within the regular expression are
|
||||
saved in the array variable `BASH_REMATCH'. The element of
|
||||
`BASH_REMATCH' with index 0 is the portion of the string matching
|
||||
the entire regular expression. The element of `BASH_REMATCH' with
|
||||
index N is the portion of the string matching the Nth
|
||||
parenthesized subexpression.
|
||||
force the quoted portion to be matched as a string. Substrings
|
||||
matched by parenthesized subexpressions within the regular
|
||||
expression are saved in the array variable `BASH_REMATCH'. The
|
||||
element of `BASH_REMATCH' with index 0 is the portion of the string
|
||||
matching the entire regular expression. The element of
|
||||
`BASH_REMATCH' with index N is the portion of the string matching
|
||||
the Nth parenthesized subexpression.
|
||||
|
||||
Expressions may be combined using the following operators, listed
|
||||
in decreasing order of precedence:
|
||||
@@ -2068,8 +2068,9 @@ indented in a natural fashion.
|
||||
A variant of here documents, the format is:
|
||||
<<< WORD
|
||||
|
||||
The WORD is expanded and supplied to the command on its standard
|
||||
input.
|
||||
The WORD is expanded as described above, with the exception that
|
||||
pathname expansion is not applied, and supplied as a single string to
|
||||
the command on its standard input.
|
||||
|
||||
3.6.8 Duplicating File Descriptors
|
||||
----------------------------------
|
||||
@@ -2689,20 +2690,22 @@ standard.
|
||||
current directory or an invalid option is supplied.
|
||||
|
||||
`readonly'
|
||||
readonly [-aApf] [NAME[=VALUE]] ...
|
||||
readonly [-aAf] [-p] [NAME[=VALUE]] ...
|
||||
Mark each NAME as readonly. The values of these names may not be
|
||||
changed by subsequent assignment. If the `-f' option is supplied,
|
||||
each NAME refers to a shell function. The `-a' option means each
|
||||
NAME refers to an indexed array variable; the `-A' option means
|
||||
each NAME refers to an associative array variable. If no NAME
|
||||
arguments are given, or if the `-p' option is supplied, a list of
|
||||
all readonly names is printed. The `-p' option causes output to
|
||||
be displayed in a format that may be reused as input. If a
|
||||
variable name is followed by =VALUE, the value of the variable is
|
||||
set to VALUE. The return status is zero unless an invalid option
|
||||
is supplied, one of the NAME arguments is not a valid shell
|
||||
variable or function name, or the `-f' option is supplied with a
|
||||
name that is not a shell function.
|
||||
each NAME refers to an associative array variable. If both
|
||||
options are supplied, `-A' takes precedence. If no NAME arguments
|
||||
are given, or if the `-p' option is supplied, a list of all
|
||||
readonly names is printed. The other options may be used to
|
||||
restrict the output to a subset of the set of readonly names. The
|
||||
`-p' option causes output to be displayed in a format that may be
|
||||
reused as input. If a variable name is followed by =VALUE, the
|
||||
value of the variable is set to VALUE. The return status is zero
|
||||
unless an invalid option is supplied, one of the NAME arguments is
|
||||
not a valid shell variable or function name, or the `-f' option is
|
||||
supplied with a name that is not a shell function.
|
||||
|
||||
`return'
|
||||
return [N]
|
||||
@@ -3044,8 +3047,8 @@ POSIX standard.
|
||||
are displayed as well. `-F' implies `-f'.
|
||||
|
||||
The `-g' option forces variables to be created or modified at the
|
||||
global scope, even when \fBdeclare\fP is executed in a shell
|
||||
function. It is ignored in all other cases.
|
||||
global scope, even when `declare' is executed in a shell function.
|
||||
It is ignored in all other cases.
|
||||
|
||||
The following options can be used to restrict output to variables
|
||||
with the specified attributes or to give variables attributes:
|
||||
@@ -4011,7 +4014,7 @@ This builtin allows you to change additional shell optional behavior.
|
||||
|
||||
`globstar'
|
||||
If set, the pattern `**' used in a filename expansion context
|
||||
will match a files and zero or more directories and
|
||||
will match all files and zero or more directories and
|
||||
subdirectories. If the pattern is followed by a `/', only
|
||||
directories and subdirectories match.
|
||||
|
||||
@@ -5524,7 +5527,7 @@ Any variable may be used as an indexed array; the `declare' builtin
|
||||
will explicitly declare an array. There is no maximum limit on the
|
||||
size of an array, nor any requirement that members be indexed or
|
||||
assigned contiguously. Indexed arrays are referenced using integers
|
||||
(including arithmetic expressions (*note Shell Arithmetic::) and are
|
||||
(including arithmetic expressions (*note Shell Arithmetic::)) and are
|
||||
zero-based; associative arrays use arbitrary strings.
|
||||
|
||||
An indexed array is created automatically if any variable is
|
||||
@@ -5592,11 +5595,12 @@ array. A subscript of `*' or `@' also removes the entire array.
|
||||
|
||||
The `declare', `local', and `readonly' builtins each accept a `-a'
|
||||
option to specify an indexed array and a `-A' option to specify an
|
||||
associative array. The `read' builtin accepts a `-a' option to assign
|
||||
a list of words read from the standard input to an array, and can read
|
||||
values from the standard input into individual array elements. The
|
||||
`set' and `declare' builtins display array values in a way that allows
|
||||
them to be reused as input.
|
||||
associative array. If both options are supplied, `-A' takes precedence.
|
||||
The `read' builtin accepts a `-a' option to assign a list of words read
|
||||
from the standard input to an array, and can read values from the
|
||||
standard input into individual array elements. The `set' and `declare'
|
||||
builtins display array values in a way that allows them to be reused as
|
||||
input.
|
||||
|
||||
|
||||
File: bashref.info, Node: The Directory Stack, Next: Printing a Prompt, Prev: Arrays, Up: Bash Features
|
||||
@@ -9884,7 +9888,7 @@ D.1 Index of Shell Builtin Commands
|
||||
* :: Bourne Shell Builtins.
|
||||
(line 11)
|
||||
* [: Bourne Shell Builtins.
|
||||
(line 217)
|
||||
(line 219)
|
||||
* alias: Bash Builtins. (line 11)
|
||||
* bg: Job Control Builtins.
|
||||
(line 7)
|
||||
@@ -9950,28 +9954,28 @@ D.1 Index of Shell Builtin Commands
|
||||
* readonly: Bourne Shell Builtins.
|
||||
(line 176)
|
||||
* return: Bourne Shell Builtins.
|
||||
(line 192)
|
||||
(line 194)
|
||||
* set: The Set Builtin. (line 11)
|
||||
* shift: Bourne Shell Builtins.
|
||||
(line 205)
|
||||
(line 207)
|
||||
* shopt: The Shopt Builtin. (line 9)
|
||||
* source: Bash Builtins. (line 535)
|
||||
* suspend: Job Control Builtins.
|
||||
(line 94)
|
||||
* test: Bourne Shell Builtins.
|
||||
(line 217)
|
||||
(line 219)
|
||||
* times: Bourne Shell Builtins.
|
||||
(line 290)
|
||||
(line 292)
|
||||
* trap: Bourne Shell Builtins.
|
||||
(line 295)
|
||||
(line 297)
|
||||
* type: Bash Builtins. (line 539)
|
||||
* typeset: Bash Builtins. (line 570)
|
||||
* ulimit: Bash Builtins. (line 576)
|
||||
* umask: Bourne Shell Builtins.
|
||||
(line 341)
|
||||
(line 343)
|
||||
* unalias: Bash Builtins. (line 665)
|
||||
* unset: Bourne Shell Builtins.
|
||||
(line 358)
|
||||
(line 360)
|
||||
* wait: Job Control Builtins.
|
||||
(line 73)
|
||||
|
||||
@@ -10496,111 +10500,111 @@ Node: Lists23743
|
||||
Node: Compound Commands25472
|
||||
Node: Looping Constructs26276
|
||||
Node: Conditional Constructs28735
|
||||
Node: Command Grouping36848
|
||||
Node: Coprocesses38327
|
||||
Node: GNU Parallel39992
|
||||
Node: Shell Functions42460
|
||||
Node: Shell Parameters47404
|
||||
Node: Positional Parameters49820
|
||||
Node: Special Parameters50720
|
||||
Node: Shell Expansions53684
|
||||
Node: Brace Expansion55609
|
||||
Node: Tilde Expansion58364
|
||||
Node: Shell Parameter Expansion60715
|
||||
Node: Command Substitution69850
|
||||
Node: Arithmetic Expansion71183
|
||||
Node: Process Substitution72033
|
||||
Node: Word Splitting73083
|
||||
Node: Filename Expansion74706
|
||||
Node: Pattern Matching76845
|
||||
Node: Quote Removal80484
|
||||
Node: Redirections80779
|
||||
Node: Executing Commands89304
|
||||
Node: Simple Command Expansion89974
|
||||
Node: Command Search and Execution91904
|
||||
Node: Command Execution Environment94241
|
||||
Node: Environment97227
|
||||
Node: Exit Status98887
|
||||
Node: Signals100508
|
||||
Node: Shell Scripts102476
|
||||
Node: Shell Builtin Commands104994
|
||||
Node: Bourne Shell Builtins107022
|
||||
Node: Bash Builtins124952
|
||||
Node: Modifying Shell Behavior151166
|
||||
Node: The Set Builtin151511
|
||||
Node: The Shopt Builtin161045
|
||||
Node: Special Builtins173217
|
||||
Node: Shell Variables174196
|
||||
Node: Bourne Shell Variables174636
|
||||
Node: Bash Variables176663
|
||||
Node: Bash Features201572
|
||||
Node: Invoking Bash202455
|
||||
Node: Bash Startup Files208219
|
||||
Node: Interactive Shells213240
|
||||
Node: What is an Interactive Shell?213650
|
||||
Node: Is this Shell Interactive?214299
|
||||
Node: Interactive Shell Behavior215114
|
||||
Node: Bash Conditional Expressions218394
|
||||
Node: Shell Arithmetic222183
|
||||
Node: Aliases224942
|
||||
Node: Arrays227514
|
||||
Node: The Directory Stack231629
|
||||
Node: Directory Stack Builtins232343
|
||||
Node: Printing a Prompt235235
|
||||
Node: The Restricted Shell237987
|
||||
Node: Bash POSIX Mode239819
|
||||
Node: Job Control248480
|
||||
Node: Job Control Basics248940
|
||||
Node: Job Control Builtins253657
|
||||
Node: Job Control Variables258021
|
||||
Node: Command Line Editing259179
|
||||
Node: Introduction and Notation260746
|
||||
Node: Readline Interaction262368
|
||||
Node: Readline Bare Essentials263559
|
||||
Node: Readline Movement Commands265348
|
||||
Node: Readline Killing Commands266313
|
||||
Node: Readline Arguments268233
|
||||
Node: Searching269277
|
||||
Node: Readline Init File271463
|
||||
Node: Readline Init File Syntax272610
|
||||
Node: Conditional Init Constructs287952
|
||||
Node: Sample Init File290485
|
||||
Node: Bindable Readline Commands293602
|
||||
Node: Commands For Moving294809
|
||||
Node: Commands For History295953
|
||||
Node: Commands For Text299388
|
||||
Node: Commands For Killing302061
|
||||
Node: Numeric Arguments304518
|
||||
Node: Commands For Completion305657
|
||||
Node: Keyboard Macros309849
|
||||
Node: Miscellaneous Commands310420
|
||||
Node: Readline vi Mode316226
|
||||
Node: Programmable Completion317133
|
||||
Node: Programmable Completion Builtins324343
|
||||
Node: Using History Interactively333479
|
||||
Node: Bash History Facilities334163
|
||||
Node: Bash History Builtins337077
|
||||
Node: History Interaction340934
|
||||
Node: Event Designators343639
|
||||
Node: Word Designators344861
|
||||
Node: Modifiers346500
|
||||
Node: Installing Bash347904
|
||||
Node: Basic Installation349041
|
||||
Node: Compilers and Options351733
|
||||
Node: Compiling For Multiple Architectures352474
|
||||
Node: Installation Names354138
|
||||
Node: Specifying the System Type354956
|
||||
Node: Sharing Defaults355672
|
||||
Node: Operation Controls356345
|
||||
Node: Optional Features357303
|
||||
Node: Reporting Bugs366871
|
||||
Node: Major Differences From The Bourne Shell368072
|
||||
Node: GNU Free Documentation License384759
|
||||
Node: Indexes409955
|
||||
Node: Builtin Index410409
|
||||
Node: Reserved Word Index417236
|
||||
Node: Variable Index419684
|
||||
Node: Function Index432779
|
||||
Node: Concept Index439788
|
||||
Node: Command Grouping36880
|
||||
Node: Coprocesses38359
|
||||
Node: GNU Parallel40024
|
||||
Node: Shell Functions42492
|
||||
Node: Shell Parameters47436
|
||||
Node: Positional Parameters49852
|
||||
Node: Special Parameters50752
|
||||
Node: Shell Expansions53716
|
||||
Node: Brace Expansion55641
|
||||
Node: Tilde Expansion58396
|
||||
Node: Shell Parameter Expansion60747
|
||||
Node: Command Substitution69882
|
||||
Node: Arithmetic Expansion71215
|
||||
Node: Process Substitution72065
|
||||
Node: Word Splitting73115
|
||||
Node: Filename Expansion74738
|
||||
Node: Pattern Matching76877
|
||||
Node: Quote Removal80516
|
||||
Node: Redirections80811
|
||||
Node: Executing Commands89434
|
||||
Node: Simple Command Expansion90104
|
||||
Node: Command Search and Execution92034
|
||||
Node: Command Execution Environment94371
|
||||
Node: Environment97357
|
||||
Node: Exit Status99017
|
||||
Node: Signals100638
|
||||
Node: Shell Scripts102606
|
||||
Node: Shell Builtin Commands105124
|
||||
Node: Bourne Shell Builtins107152
|
||||
Node: Bash Builtins125246
|
||||
Node: Modifying Shell Behavior151455
|
||||
Node: The Set Builtin151800
|
||||
Node: The Shopt Builtin161334
|
||||
Node: Special Builtins173508
|
||||
Node: Shell Variables174487
|
||||
Node: Bourne Shell Variables174927
|
||||
Node: Bash Variables176954
|
||||
Node: Bash Features201863
|
||||
Node: Invoking Bash202746
|
||||
Node: Bash Startup Files208510
|
||||
Node: Interactive Shells213531
|
||||
Node: What is an Interactive Shell?213941
|
||||
Node: Is this Shell Interactive?214590
|
||||
Node: Interactive Shell Behavior215405
|
||||
Node: Bash Conditional Expressions218685
|
||||
Node: Shell Arithmetic222474
|
||||
Node: Aliases225233
|
||||
Node: Arrays227805
|
||||
Node: The Directory Stack231974
|
||||
Node: Directory Stack Builtins232688
|
||||
Node: Printing a Prompt235580
|
||||
Node: The Restricted Shell238332
|
||||
Node: Bash POSIX Mode240164
|
||||
Node: Job Control248825
|
||||
Node: Job Control Basics249285
|
||||
Node: Job Control Builtins254002
|
||||
Node: Job Control Variables258366
|
||||
Node: Command Line Editing259524
|
||||
Node: Introduction and Notation261091
|
||||
Node: Readline Interaction262713
|
||||
Node: Readline Bare Essentials263904
|
||||
Node: Readline Movement Commands265693
|
||||
Node: Readline Killing Commands266658
|
||||
Node: Readline Arguments268578
|
||||
Node: Searching269622
|
||||
Node: Readline Init File271808
|
||||
Node: Readline Init File Syntax272955
|
||||
Node: Conditional Init Constructs288297
|
||||
Node: Sample Init File290830
|
||||
Node: Bindable Readline Commands293947
|
||||
Node: Commands For Moving295154
|
||||
Node: Commands For History296298
|
||||
Node: Commands For Text299733
|
||||
Node: Commands For Killing302406
|
||||
Node: Numeric Arguments304863
|
||||
Node: Commands For Completion306002
|
||||
Node: Keyboard Macros310194
|
||||
Node: Miscellaneous Commands310765
|
||||
Node: Readline vi Mode316571
|
||||
Node: Programmable Completion317478
|
||||
Node: Programmable Completion Builtins324688
|
||||
Node: Using History Interactively333824
|
||||
Node: Bash History Facilities334508
|
||||
Node: Bash History Builtins337422
|
||||
Node: History Interaction341279
|
||||
Node: Event Designators343984
|
||||
Node: Word Designators345206
|
||||
Node: Modifiers346845
|
||||
Node: Installing Bash348249
|
||||
Node: Basic Installation349386
|
||||
Node: Compilers and Options352078
|
||||
Node: Compiling For Multiple Architectures352819
|
||||
Node: Installation Names354483
|
||||
Node: Specifying the System Type355301
|
||||
Node: Sharing Defaults356017
|
||||
Node: Operation Controls356690
|
||||
Node: Optional Features357648
|
||||
Node: Reporting Bugs367216
|
||||
Node: Major Differences From The Bourne Shell368417
|
||||
Node: GNU Free Documentation License385104
|
||||
Node: Indexes410300
|
||||
Node: Builtin Index410754
|
||||
Node: Reserved Word Index417581
|
||||
Node: Variable Index420029
|
||||
Node: Function Index433124
|
||||
Node: Concept Index440133
|
||||
|
||||
End Tag Table
|
||||
|
||||
Reference in New Issue
Block a user