mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-05 03:10:50 +02:00
commit bash-20090205 snapshot
This commit is contained in:
+174
-154
@@ -1,13 +1,13 @@
|
||||
This is bashref.info, produced by makeinfo version 4.11 from
|
||||
This is bashref.info, produced by makeinfo version 4.13 from
|
||||
/Users/chet/src/bash/src/doc/bashref.texi.
|
||||
|
||||
This text is a brief description of the features that are present in
|
||||
the Bash shell (version 4.0, 28 October 2008).
|
||||
the Bash shell (version 4.0, 29 December 2008).
|
||||
|
||||
This is Edition 4.0, last updated 28 October 2008, of `The GNU Bash
|
||||
This is Edition 4.0, last updated 29 December 2008, of `The GNU Bash
|
||||
Reference Manual', for `Bash', Version 4.0.
|
||||
|
||||
Copyright (C) 1988-2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2009 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
|
||||
@@ -38,9 +38,9 @@ Bash Features
|
||||
*************
|
||||
|
||||
This text is a brief description of the features that are present in
|
||||
the Bash shell (version 4.0, 28 October 2008).
|
||||
the Bash shell (version 4.0, 29 December 2008).
|
||||
|
||||
This is Edition 4.0, last updated 28 October 2008, of `The GNU Bash
|
||||
This is Edition 4.0, last updated 29 December 2008, of `The GNU Bash
|
||||
Reference Manual', for `Bash', Version 4.0.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -955,7 +955,9 @@ established between the executing shell and the coprocess.
|
||||
`coproc' [NAME] COMMAND [REDIRECTIONS]
|
||||
|
||||
This creates a coprocess named NAME. If NAME is not supplied, the
|
||||
default name is COPROC.
|
||||
default name is COPROC. NAME must not be supplied if COMMAND is a
|
||||
simple command (*note Simple Commands::); otherwise, it is interpreted
|
||||
as the first word of the simple command.
|
||||
|
||||
When the coproc is executed, the shell creates an array variable
|
||||
(*note Arrays::) named NAME in the context of the executing shell. The
|
||||
@@ -1405,11 +1407,12 @@ introduce indirection.
|
||||
In each of the cases below, WORD is subject to tilde expansion,
|
||||
parameter expansion, command substitution, and arithmetic expansion.
|
||||
|
||||
When not performing substring expansion, Bash tests for a parameter
|
||||
that is unset or null; omitting the colon results in a test only for a
|
||||
parameter that is unset. Put another way, if the colon is included,
|
||||
the operator tests for both existence and that the value is not null;
|
||||
if the colon is omitted, the operator tests only for existence.
|
||||
When not performing substring expansion, using the form described
|
||||
below, Bash tests for a parameter that is unset or null. Omitting the
|
||||
colon results in a test only for a parameter that is unset. Put
|
||||
another way, if the colon is included, the operator tests for both
|
||||
PARAMETER's existence and that its value is not null; if the colon is
|
||||
omitted, the operator tests only for existence.
|
||||
|
||||
`${PARAMETER:-WORD}'
|
||||
If PARAMETER is unset or null, the expansion of WORD is
|
||||
@@ -1534,14 +1537,14 @@ if the colon is omitted, the operator tests only for existence.
|
||||
matching PATTERN to uppercase; the `,' operator converts matching
|
||||
uppercase letters to lowercase. The `^^' and `,,' expansions
|
||||
convert each matched character in the expanded value; the `^' and
|
||||
`,' expansions match and convert only the first character. If
|
||||
PATTERN is omitted, it is treated like a `?', which matches every
|
||||
character. If PARAMETER is `@' or `*', the case modification
|
||||
operation is applied to each positional parameter in turn, and the
|
||||
expansion is the resultant list. If PARAMETER is an array
|
||||
variable subscripted with `@' or `*', the case modification
|
||||
operation is applied to each member of the array in turn, and the
|
||||
expansion is the resultant list.
|
||||
`,' expansions match and convert only the first character in the
|
||||
expanded value. If PATTERN is omitted, it is treated like a `?',
|
||||
which matches every character. If PARAMETER is `@' or `*', the
|
||||
case modification operation is applied to each positional
|
||||
parameter in turn, and the expansion is the resultant list. If
|
||||
PARAMETER is an array variable subscripted with `@' or `*', the
|
||||
case modification operation is applied to each member of the array
|
||||
in turn, and the expansion is the resultant list.
|
||||
|
||||
|
||||
|
||||
@@ -2184,6 +2187,10 @@ at invocation. Builtin commands that are invoked as part of a pipeline
|
||||
are also executed in a subshell environment. Changes made to the
|
||||
subshell environment cannot affect the shell's execution environment.
|
||||
|
||||
Subshells spawned to execute command substitutions inherit the value
|
||||
of the `-e' option from the parent shell. When not in POSIX mode, Bash
|
||||
clears the `-e' option in such subshells.
|
||||
|
||||
If a command is followed by a `&' and job control is not active, the
|
||||
default standard input for the command is the empty file `/dev/null'.
|
||||
Otherwise, the invoked command inherits the file descriptors of the
|
||||
@@ -3122,6 +3129,10 @@ POSIX standard.
|
||||
CALLBACK.
|
||||
|
||||
If `-C' is specified without `-c', the default quantum is 5000.
|
||||
When CALLBACK is evaluated, it is supplied the index of the next
|
||||
array element to be assigned as an additional argument. CALLBACK
|
||||
is evaluated after the line is read but before the array element
|
||||
is assigned.
|
||||
|
||||
If not supplied with an explicit origin, `mapfile' will clear ARRAY
|
||||
before assigning to it.
|
||||
@@ -3226,6 +3237,14 @@ POSIX standard.
|
||||
Read input from file descriptor FD.
|
||||
|
||||
|
||||
`readarray'
|
||||
readarray [-n COUNT] [-O ORIGIN] [-s COUNT] [-t] [-u FD] [
|
||||
-C CALLBACK] [-c QUANTUM] [ARRAY]
|
||||
Read lines from the standard input into array variable ARRAY, or
|
||||
from file descriptor FD if the `-u' option is supplied.
|
||||
|
||||
A synonym for `mapfile'.
|
||||
|
||||
`source'
|
||||
source FILENAME
|
||||
A synonym for `.' (*note Bourne Shell Builtins::).
|
||||
@@ -9463,12 +9482,13 @@ D.1 Index of Shell Builtin Commands
|
||||
* mapfile: Bash Builtins. (line 342)
|
||||
* popd: Directory Stack Builtins.
|
||||
(line 37)
|
||||
* printf: Bash Builtins. (line 383)
|
||||
* printf: Bash Builtins. (line 387)
|
||||
* pushd: Directory Stack Builtins.
|
||||
(line 58)
|
||||
* pwd: Bourne Shell Builtins.
|
||||
(line 163)
|
||||
* read: Bash Builtins. (line 408)
|
||||
* read: Bash Builtins. (line 412)
|
||||
* readarray: Bash Builtins. (line 484)
|
||||
* readonly: Bourne Shell Builtins.
|
||||
(line 172)
|
||||
* return: Bourne Shell Builtins.
|
||||
@@ -9477,7 +9497,7 @@ D.1 Index of Shell Builtin Commands
|
||||
* shift: Bourne Shell Builtins.
|
||||
(line 201)
|
||||
* shopt: The Shopt Builtin. (line 9)
|
||||
* source: Bash Builtins. (line 480)
|
||||
* source: Bash Builtins. (line 492)
|
||||
* suspend: Job Control Builtins.
|
||||
(line 94)
|
||||
* test: Bourne Shell Builtins.
|
||||
@@ -9486,12 +9506,12 @@ D.1 Index of Shell Builtin Commands
|
||||
(line 281)
|
||||
* trap: Bourne Shell Builtins.
|
||||
(line 286)
|
||||
* type: Bash Builtins. (line 484)
|
||||
* typeset: Bash Builtins. (line 515)
|
||||
* ulimit: Bash Builtins. (line 521)
|
||||
* type: Bash Builtins. (line 496)
|
||||
* typeset: Bash Builtins. (line 527)
|
||||
* ulimit: Bash Builtins. (line 533)
|
||||
* umask: Bourne Shell Builtins.
|
||||
(line 327)
|
||||
* unalias: Bash Builtins. (line 607)
|
||||
* unalias: Bash Builtins. (line 619)
|
||||
* unset: Bourne Shell Builtins.
|
||||
(line 344)
|
||||
* wait: Job Control Builtins.
|
||||
@@ -9974,132 +9994,132 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top1344
|
||||
Node: Introduction3181
|
||||
Node: What is Bash?3409
|
||||
Node: What is a shell?4522
|
||||
Node: Definitions7062
|
||||
Node: Basic Shell Features9980
|
||||
Node: Shell Syntax11199
|
||||
Node: Shell Operation12229
|
||||
Node: Quoting13523
|
||||
Node: Escape Character14826
|
||||
Node: Single Quotes15311
|
||||
Node: Double Quotes15659
|
||||
Node: ANSI-C Quoting16784
|
||||
Node: Locale Translation17740
|
||||
Node: Comments18636
|
||||
Node: Shell Commands19254
|
||||
Node: Simple Commands20078
|
||||
Node: Pipelines20709
|
||||
Node: Lists22965
|
||||
Node: Compound Commands24694
|
||||
Node: Looping Constructs25498
|
||||
Node: Conditional Constructs27945
|
||||
Node: Command Grouping35951
|
||||
Node: Coprocesses37430
|
||||
Node: Shell Functions38919
|
||||
Node: Shell Parameters43380
|
||||
Node: Positional Parameters45796
|
||||
Node: Special Parameters46696
|
||||
Node: Shell Expansions49660
|
||||
Node: Brace Expansion51585
|
||||
Node: Tilde Expansion54338
|
||||
Node: Shell Parameter Expansion56689
|
||||
Node: Command Substitution65520
|
||||
Node: Arithmetic Expansion66853
|
||||
Node: Process Substitution67703
|
||||
Node: Word Splitting68753
|
||||
Node: Filename Expansion70376
|
||||
Node: Pattern Matching72516
|
||||
Node: Quote Removal76155
|
||||
Node: Redirections76450
|
||||
Node: Executing Commands84593
|
||||
Node: Simple Command Expansion85263
|
||||
Node: Command Search and Execution87193
|
||||
Node: Command Execution Environment89530
|
||||
Node: Environment92329
|
||||
Node: Exit Status93989
|
||||
Node: Signals95610
|
||||
Node: Shell Scripts97578
|
||||
Node: Shell Builtin Commands100096
|
||||
Node: Bourne Shell Builtins101773
|
||||
Node: Bash Builtins119091
|
||||
Node: Modifying Shell Behavior142764
|
||||
Node: The Set Builtin143109
|
||||
Node: The Shopt Builtin152149
|
||||
Node: Special Builtins163011
|
||||
Node: Shell Variables163990
|
||||
Node: Bourne Shell Variables164430
|
||||
Node: Bash Variables166411
|
||||
Node: Bash Features188729
|
||||
Node: Invoking Bash189612
|
||||
Node: Bash Startup Files195421
|
||||
Node: Interactive Shells200390
|
||||
Node: What is an Interactive Shell?200800
|
||||
Node: Is this Shell Interactive?201449
|
||||
Node: Interactive Shell Behavior202264
|
||||
Node: Bash Conditional Expressions205544
|
||||
Node: Shell Arithmetic209123
|
||||
Node: Aliases211869
|
||||
Node: Arrays214441
|
||||
Node: The Directory Stack218283
|
||||
Node: Directory Stack Builtins218997
|
||||
Node: Printing a Prompt221889
|
||||
Node: The Restricted Shell224641
|
||||
Node: Bash POSIX Mode226473
|
||||
Node: Job Control234326
|
||||
Node: Job Control Basics234786
|
||||
Node: Job Control Builtins239399
|
||||
Node: Job Control Variables243763
|
||||
Node: Command Line Editing244921
|
||||
Node: Introduction and Notation246488
|
||||
Node: Readline Interaction248110
|
||||
Node: Readline Bare Essentials249301
|
||||
Node: Readline Movement Commands251090
|
||||
Node: Readline Killing Commands252055
|
||||
Node: Readline Arguments253975
|
||||
Node: Searching255019
|
||||
Node: Readline Init File257205
|
||||
Node: Readline Init File Syntax258352
|
||||
Node: Conditional Init Constructs271586
|
||||
Node: Sample Init File274119
|
||||
Node: Bindable Readline Commands277236
|
||||
Node: Commands For Moving278443
|
||||
Node: Commands For History279587
|
||||
Node: Commands For Text282742
|
||||
Node: Commands For Killing285415
|
||||
Node: Numeric Arguments287866
|
||||
Node: Commands For Completion289005
|
||||
Node: Keyboard Macros292772
|
||||
Node: Miscellaneous Commands293343
|
||||
Node: Readline vi Mode298654
|
||||
Node: Programmable Completion299568
|
||||
Node: Programmable Completion Builtins305401
|
||||
Node: Using History Interactively313827
|
||||
Node: Bash History Facilities314511
|
||||
Node: Bash History Builtins317425
|
||||
Node: History Interaction321282
|
||||
Node: Event Designators323987
|
||||
Node: Word Designators325002
|
||||
Node: Modifiers326641
|
||||
Node: Installing Bash328045
|
||||
Node: Basic Installation329182
|
||||
Node: Compilers and Options331874
|
||||
Node: Compiling For Multiple Architectures332615
|
||||
Node: Installation Names334279
|
||||
Node: Specifying the System Type335097
|
||||
Node: Sharing Defaults335813
|
||||
Node: Operation Controls336486
|
||||
Node: Optional Features337444
|
||||
Node: Reporting Bugs346846
|
||||
Node: Major Differences From The Bourne Shell348040
|
||||
Node: GNU Free Documentation License364727
|
||||
Node: Indexes387188
|
||||
Node: Builtin Index387642
|
||||
Node: Reserved Word Index394396
|
||||
Node: Variable Index396844
|
||||
Node: Function Index408650
|
||||
Node: Concept Index415382
|
||||
Node: Top1346
|
||||
Node: Introduction3185
|
||||
Node: What is Bash?3413
|
||||
Node: What is a shell?4526
|
||||
Node: Definitions7066
|
||||
Node: Basic Shell Features9984
|
||||
Node: Shell Syntax11203
|
||||
Node: Shell Operation12233
|
||||
Node: Quoting13527
|
||||
Node: Escape Character14830
|
||||
Node: Single Quotes15315
|
||||
Node: Double Quotes15663
|
||||
Node: ANSI-C Quoting16788
|
||||
Node: Locale Translation17744
|
||||
Node: Comments18640
|
||||
Node: Shell Commands19258
|
||||
Node: Simple Commands20082
|
||||
Node: Pipelines20713
|
||||
Node: Lists22969
|
||||
Node: Compound Commands24698
|
||||
Node: Looping Constructs25502
|
||||
Node: Conditional Constructs27949
|
||||
Node: Command Grouping35955
|
||||
Node: Coprocesses37434
|
||||
Node: Shell Functions39078
|
||||
Node: Shell Parameters43539
|
||||
Node: Positional Parameters45955
|
||||
Node: Special Parameters46855
|
||||
Node: Shell Expansions49819
|
||||
Node: Brace Expansion51744
|
||||
Node: Tilde Expansion54497
|
||||
Node: Shell Parameter Expansion56848
|
||||
Node: Command Substitution65746
|
||||
Node: Arithmetic Expansion67079
|
||||
Node: Process Substitution67929
|
||||
Node: Word Splitting68979
|
||||
Node: Filename Expansion70602
|
||||
Node: Pattern Matching72742
|
||||
Node: Quote Removal76381
|
||||
Node: Redirections76676
|
||||
Node: Executing Commands84819
|
||||
Node: Simple Command Expansion85489
|
||||
Node: Command Search and Execution87419
|
||||
Node: Command Execution Environment89756
|
||||
Node: Environment92742
|
||||
Node: Exit Status94402
|
||||
Node: Signals96023
|
||||
Node: Shell Scripts97991
|
||||
Node: Shell Builtin Commands100509
|
||||
Node: Bourne Shell Builtins102186
|
||||
Node: Bash Builtins119504
|
||||
Node: Modifying Shell Behavior143695
|
||||
Node: The Set Builtin144040
|
||||
Node: The Shopt Builtin153080
|
||||
Node: Special Builtins163942
|
||||
Node: Shell Variables164921
|
||||
Node: Bourne Shell Variables165361
|
||||
Node: Bash Variables167342
|
||||
Node: Bash Features189660
|
||||
Node: Invoking Bash190543
|
||||
Node: Bash Startup Files196352
|
||||
Node: Interactive Shells201321
|
||||
Node: What is an Interactive Shell?201731
|
||||
Node: Is this Shell Interactive?202380
|
||||
Node: Interactive Shell Behavior203195
|
||||
Node: Bash Conditional Expressions206475
|
||||
Node: Shell Arithmetic210054
|
||||
Node: Aliases212800
|
||||
Node: Arrays215372
|
||||
Node: The Directory Stack219214
|
||||
Node: Directory Stack Builtins219928
|
||||
Node: Printing a Prompt222820
|
||||
Node: The Restricted Shell225572
|
||||
Node: Bash POSIX Mode227404
|
||||
Node: Job Control235257
|
||||
Node: Job Control Basics235717
|
||||
Node: Job Control Builtins240330
|
||||
Node: Job Control Variables244694
|
||||
Node: Command Line Editing245852
|
||||
Node: Introduction and Notation247419
|
||||
Node: Readline Interaction249041
|
||||
Node: Readline Bare Essentials250232
|
||||
Node: Readline Movement Commands252021
|
||||
Node: Readline Killing Commands252986
|
||||
Node: Readline Arguments254906
|
||||
Node: Searching255950
|
||||
Node: Readline Init File258136
|
||||
Node: Readline Init File Syntax259283
|
||||
Node: Conditional Init Constructs272517
|
||||
Node: Sample Init File275050
|
||||
Node: Bindable Readline Commands278167
|
||||
Node: Commands For Moving279374
|
||||
Node: Commands For History280518
|
||||
Node: Commands For Text283673
|
||||
Node: Commands For Killing286346
|
||||
Node: Numeric Arguments288797
|
||||
Node: Commands For Completion289936
|
||||
Node: Keyboard Macros293703
|
||||
Node: Miscellaneous Commands294274
|
||||
Node: Readline vi Mode299585
|
||||
Node: Programmable Completion300499
|
||||
Node: Programmable Completion Builtins306332
|
||||
Node: Using History Interactively314758
|
||||
Node: Bash History Facilities315442
|
||||
Node: Bash History Builtins318356
|
||||
Node: History Interaction322213
|
||||
Node: Event Designators324918
|
||||
Node: Word Designators325933
|
||||
Node: Modifiers327572
|
||||
Node: Installing Bash328976
|
||||
Node: Basic Installation330113
|
||||
Node: Compilers and Options332805
|
||||
Node: Compiling For Multiple Architectures333546
|
||||
Node: Installation Names335210
|
||||
Node: Specifying the System Type336028
|
||||
Node: Sharing Defaults336744
|
||||
Node: Operation Controls337417
|
||||
Node: Optional Features338375
|
||||
Node: Reporting Bugs347777
|
||||
Node: Major Differences From The Bourne Shell348971
|
||||
Node: GNU Free Documentation License365658
|
||||
Node: Indexes388119
|
||||
Node: Builtin Index388573
|
||||
Node: Reserved Word Index395400
|
||||
Node: Variable Index397848
|
||||
Node: Function Index409654
|
||||
Node: Concept Index416386
|
||||
|
||||
End Tag Table
|
||||
|
||||
Reference in New Issue
Block a user