-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
*************
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
`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
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
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.
\1f
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
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.
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::).
* 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.
* 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.
(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.
\1f
Tag Table:
-Node: Top\7f1344
-Node: Introduction\7f3181
-Node: What is Bash?\7f3409
-Node: What is a shell?\7f4522
-Node: Definitions\7f7062
-Node: Basic Shell Features\7f9980
-Node: Shell Syntax\7f11199
-Node: Shell Operation\7f12229
-Node: Quoting\7f13523
-Node: Escape Character\7f14826
-Node: Single Quotes\7f15311
-Node: Double Quotes\7f15659
-Node: ANSI-C Quoting\7f16784
-Node: Locale Translation\7f17740
-Node: Comments\7f18636
-Node: Shell Commands\7f19254
-Node: Simple Commands\7f20078
-Node: Pipelines\7f20709
-Node: Lists\7f22965
-Node: Compound Commands\7f24694
-Node: Looping Constructs\7f25498
-Node: Conditional Constructs\7f27945
-Node: Command Grouping\7f35951
-Node: Coprocesses\7f37430
-Node: Shell Functions\7f38919
-Node: Shell Parameters\7f43380
-Node: Positional Parameters\7f45796
-Node: Special Parameters\7f46696
-Node: Shell Expansions\7f49660
-Node: Brace Expansion\7f51585
-Node: Tilde Expansion\7f54338
-Node: Shell Parameter Expansion\7f56689
-Node: Command Substitution\7f65520
-Node: Arithmetic Expansion\7f66853
-Node: Process Substitution\7f67703
-Node: Word Splitting\7f68753
-Node: Filename Expansion\7f70376
-Node: Pattern Matching\7f72516
-Node: Quote Removal\7f76155
-Node: Redirections\7f76450
-Node: Executing Commands\7f84593
-Node: Simple Command Expansion\7f85263
-Node: Command Search and Execution\7f87193
-Node: Command Execution Environment\7f89530
-Node: Environment\7f92329
-Node: Exit Status\7f93989
-Node: Signals\7f95610
-Node: Shell Scripts\7f97578
-Node: Shell Builtin Commands\7f100096
-Node: Bourne Shell Builtins\7f101773
-Node: Bash Builtins\7f119091
-Node: Modifying Shell Behavior\7f142764
-Node: The Set Builtin\7f143109
-Node: The Shopt Builtin\7f152149
-Node: Special Builtins\7f163011
-Node: Shell Variables\7f163990
-Node: Bourne Shell Variables\7f164430
-Node: Bash Variables\7f166411
-Node: Bash Features\7f188729
-Node: Invoking Bash\7f189612
-Node: Bash Startup Files\7f195421
-Node: Interactive Shells\7f200390
-Node: What is an Interactive Shell?\7f200800
-Node: Is this Shell Interactive?\7f201449
-Node: Interactive Shell Behavior\7f202264
-Node: Bash Conditional Expressions\7f205544
-Node: Shell Arithmetic\7f209123
-Node: Aliases\7f211869
-Node: Arrays\7f214441
-Node: The Directory Stack\7f218283
-Node: Directory Stack Builtins\7f218997
-Node: Printing a Prompt\7f221889
-Node: The Restricted Shell\7f224641
-Node: Bash POSIX Mode\7f226473
-Node: Job Control\7f234326
-Node: Job Control Basics\7f234786
-Node: Job Control Builtins\7f239399
-Node: Job Control Variables\7f243763
-Node: Command Line Editing\7f244921
-Node: Introduction and Notation\7f246488
-Node: Readline Interaction\7f248110
-Node: Readline Bare Essentials\7f249301
-Node: Readline Movement Commands\7f251090
-Node: Readline Killing Commands\7f252055
-Node: Readline Arguments\7f253975
-Node: Searching\7f255019
-Node: Readline Init File\7f257205
-Node: Readline Init File Syntax\7f258352
-Node: Conditional Init Constructs\7f271586
-Node: Sample Init File\7f274119
-Node: Bindable Readline Commands\7f277236
-Node: Commands For Moving\7f278443
-Node: Commands For History\7f279587
-Node: Commands For Text\7f282742
-Node: Commands For Killing\7f285415
-Node: Numeric Arguments\7f287866
-Node: Commands For Completion\7f289005
-Node: Keyboard Macros\7f292772
-Node: Miscellaneous Commands\7f293343
-Node: Readline vi Mode\7f298654
-Node: Programmable Completion\7f299568
-Node: Programmable Completion Builtins\7f305401
-Node: Using History Interactively\7f313827
-Node: Bash History Facilities\7f314511
-Node: Bash History Builtins\7f317425
-Node: History Interaction\7f321282
-Node: Event Designators\7f323987
-Node: Word Designators\7f325002
-Node: Modifiers\7f326641
-Node: Installing Bash\7f328045
-Node: Basic Installation\7f329182
-Node: Compilers and Options\7f331874
-Node: Compiling For Multiple Architectures\7f332615
-Node: Installation Names\7f334279
-Node: Specifying the System Type\7f335097
-Node: Sharing Defaults\7f335813
-Node: Operation Controls\7f336486
-Node: Optional Features\7f337444
-Node: Reporting Bugs\7f346846
-Node: Major Differences From The Bourne Shell\7f348040
-Node: GNU Free Documentation License\7f364727
-Node: Indexes\7f387188
-Node: Builtin Index\7f387642
-Node: Reserved Word Index\7f394396
-Node: Variable Index\7f396844
-Node: Function Index\7f408650
-Node: Concept Index\7f415382
+Node: Top\7f1346
+Node: Introduction\7f3185
+Node: What is Bash?\7f3413
+Node: What is a shell?\7f4526
+Node: Definitions\7f7066
+Node: Basic Shell Features\7f9984
+Node: Shell Syntax\7f11203
+Node: Shell Operation\7f12233
+Node: Quoting\7f13527
+Node: Escape Character\7f14830
+Node: Single Quotes\7f15315
+Node: Double Quotes\7f15663
+Node: ANSI-C Quoting\7f16788
+Node: Locale Translation\7f17744
+Node: Comments\7f18640
+Node: Shell Commands\7f19258
+Node: Simple Commands\7f20082
+Node: Pipelines\7f20713
+Node: Lists\7f22969
+Node: Compound Commands\7f24698
+Node: Looping Constructs\7f25502
+Node: Conditional Constructs\7f27949
+Node: Command Grouping\7f35955
+Node: Coprocesses\7f37434
+Node: Shell Functions\7f39078
+Node: Shell Parameters\7f43539
+Node: Positional Parameters\7f45955
+Node: Special Parameters\7f46855
+Node: Shell Expansions\7f49819
+Node: Brace Expansion\7f51744
+Node: Tilde Expansion\7f54497
+Node: Shell Parameter Expansion\7f56848
+Node: Command Substitution\7f65746
+Node: Arithmetic Expansion\7f67079
+Node: Process Substitution\7f67929
+Node: Word Splitting\7f68979
+Node: Filename Expansion\7f70602
+Node: Pattern Matching\7f72742
+Node: Quote Removal\7f76381
+Node: Redirections\7f76676
+Node: Executing Commands\7f84819
+Node: Simple Command Expansion\7f85489
+Node: Command Search and Execution\7f87419
+Node: Command Execution Environment\7f89756
+Node: Environment\7f92742
+Node: Exit Status\7f94402
+Node: Signals\7f96023
+Node: Shell Scripts\7f97991
+Node: Shell Builtin Commands\7f100509
+Node: Bourne Shell Builtins\7f102186
+Node: Bash Builtins\7f119504
+Node: Modifying Shell Behavior\7f143695
+Node: The Set Builtin\7f144040
+Node: The Shopt Builtin\7f153080
+Node: Special Builtins\7f163942
+Node: Shell Variables\7f164921
+Node: Bourne Shell Variables\7f165361
+Node: Bash Variables\7f167342
+Node: Bash Features\7f189660
+Node: Invoking Bash\7f190543
+Node: Bash Startup Files\7f196352
+Node: Interactive Shells\7f201321
+Node: What is an Interactive Shell?\7f201731
+Node: Is this Shell Interactive?\7f202380
+Node: Interactive Shell Behavior\7f203195
+Node: Bash Conditional Expressions\7f206475
+Node: Shell Arithmetic\7f210054
+Node: Aliases\7f212800
+Node: Arrays\7f215372
+Node: The Directory Stack\7f219214
+Node: Directory Stack Builtins\7f219928
+Node: Printing a Prompt\7f222820
+Node: The Restricted Shell\7f225572
+Node: Bash POSIX Mode\7f227404
+Node: Job Control\7f235257
+Node: Job Control Basics\7f235717
+Node: Job Control Builtins\7f240330
+Node: Job Control Variables\7f244694
+Node: Command Line Editing\7f245852
+Node: Introduction and Notation\7f247419
+Node: Readline Interaction\7f249041
+Node: Readline Bare Essentials\7f250232
+Node: Readline Movement Commands\7f252021
+Node: Readline Killing Commands\7f252986
+Node: Readline Arguments\7f254906
+Node: Searching\7f255950
+Node: Readline Init File\7f258136
+Node: Readline Init File Syntax\7f259283
+Node: Conditional Init Constructs\7f272517
+Node: Sample Init File\7f275050
+Node: Bindable Readline Commands\7f278167
+Node: Commands For Moving\7f279374
+Node: Commands For History\7f280518
+Node: Commands For Text\7f283673
+Node: Commands For Killing\7f286346
+Node: Numeric Arguments\7f288797
+Node: Commands For Completion\7f289936
+Node: Keyboard Macros\7f293703
+Node: Miscellaneous Commands\7f294274
+Node: Readline vi Mode\7f299585
+Node: Programmable Completion\7f300499
+Node: Programmable Completion Builtins\7f306332
+Node: Using History Interactively\7f314758
+Node: Bash History Facilities\7f315442
+Node: Bash History Builtins\7f318356
+Node: History Interaction\7f322213
+Node: Event Designators\7f324918
+Node: Word Designators\7f325933
+Node: Modifiers\7f327572
+Node: Installing Bash\7f328976
+Node: Basic Installation\7f330113
+Node: Compilers and Options\7f332805
+Node: Compiling For Multiple Architectures\7f333546
+Node: Installation Names\7f335210
+Node: Specifying the System Type\7f336028
+Node: Sharing Defaults\7f336744
+Node: Operation Controls\7f337417
+Node: Optional Features\7f338375
+Node: Reporting Bugs\7f347777
+Node: Major Differences From The Bourne Shell\7f348971
+Node: GNU Free Documentation License\7f365658
+Node: Indexes\7f388119
+Node: Builtin Index\7f388573
+Node: Reserved Word Index\7f395400
+Node: Variable Index\7f397848
+Node: Function Index\7f409654
+Node: Concept Index\7f416386
\1f
End Tag Table