commit bash-20061214 snapshot

This commit is contained in:
Chet Ramey
2011-12-07 09:01:35 -05:00
parent 10a5f6b4cc
commit 258e3d4698
109 changed files with 19368 additions and 4220 deletions
+184 -177
View File
@@ -1,11 +1,11 @@
This is bashref.info, produced by makeinfo version 4.7 from
This is bashref.info, produced by makeinfo version 4.8 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 3.2, 28 September 2006).
the Bash shell (version 3.2, 27 November 2006).
This is Edition 3.2, last updated 28 September 2006, of `The GNU
Bash Reference Manual', for `Bash', Version 3.2.
This is Edition 3.2, last updated 27 November 2006, of `The GNU Bash
Reference Manual', for `Bash', Version 3.2.
Copyright (C) 1988-2005 Free Software Foundation, Inc.
@@ -37,10 +37,10 @@ Bash Features
*************
This text is a brief description of the features that are present in
the Bash shell (version 3.2, 28 September 2006).
the Bash shell (version 3.2, 27 November 2006).
This is Edition 3.2, last updated 28 September 2006, of `The GNU
Bash Reference Manual', for `Bash', Version 3.2.
This is Edition 3.2, last updated 27 November 2006, of `The GNU Bash
Reference Manual', for `Bash', Version 3.2.
Bash contains features that appear in other popular shells, and some
features that only appear in Bash. Some of the shells that Bash has
@@ -130,7 +130,7 @@ symbols are expanded to create larger expressions.
A Unix shell is both a command interpreter and a programming
language. As a command interpreter, the shell provides the user
interface to the rich set of GNU utilities. The programming language
features allow these utilitites to be combined. Files containing
features allow these utilities to be combined. Files containing
commands can be created, and become commands themselves. These new
commands have the same status as system commands in directories such as
`/bin', allowing users or groups to establish custom environments to
@@ -232,7 +232,7 @@ These definitions are used throughout the remainder of this manual.
group ID.
`process group ID'
A unique identifer that represents a `process group' during its
A unique identifier that represents a `process group' during its
lifetime.
`reserved word'
@@ -793,7 +793,7 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre
items. The set of expanded words is printed on the standard error
output stream, each preceded by a number. If the `in WORDS' is
omitted, the positional parameters are printed, as if `in "$@"'
had been specifed. The `PS3' prompt is then displayed and a line
had been specified. The `PS3' prompt is then displayed and a line
is read from the standard input. If the line consists of a number
corresponding to one of the displayed words, then the value of
NAME is set to that word. If the line is empty, the words and
@@ -1201,7 +1201,7 @@ Brace expansion is a mechanism by which arbitrary strings may be
generated. This mechanism is similar to FILENAME EXPANSION (*note
Filename Expansion::), but the file names generated need not exist.
Patterns to be brace expanded take the form of an optional PREAMBLE,
followed by either a series of comma-separated strings or a sequnce
followed by either a series of comma-separated strings or a seqeunce
expression between a pair of braces, followed by an optional POSTSCRIPT.
The preamble is prefixed to each string contained within the braces, and
the postscript is then appended to each resulting string, expanding left
@@ -1387,12 +1387,16 @@ if the colon is omitted, the operator tests only for existence.
that a negative offset must be separated from the colon by at least
one space to avoid being confused with the `:-' expansion.
Substring indexing is zero-based unless the positional parameters
are used, in which case the indexing starts at 1.
are used, in which case the indexing starts at 1 by default. If
OFFSET is 0, and the positional parameters are used, `$@' is
prefixed to the list.
`${!PREFIX*}'
`${!PREFIX@}'
Expands to the names of variables whose names begin with PREFIX,
separated by the first character of the `IFS' special variable.
When `@' is used and the expansion appears within double quotes,
each variable name expands to a separate word.
`${!NAME[@]}'
`${!NAME[*]}'
@@ -2348,11 +2352,11 @@ standard.
exec [-cl] [-a NAME] [COMMAND [ARGUMENTS]]
If COMMAND is supplied, it replaces the shell without creating a
new process. If the `-l' option is supplied, the shell places a
dash at the beginning of the zeroth arg passed to COMMAND. This
is what the `login' program does. The `-c' option causes COMMAND
to be executed with an empty environment. If `-a' is supplied,
the shell passes NAME as the zeroth argument to COMMAND. If no
COMMAND is specified, redirections may be used to affect the
dash at the beginning of the zeroth argument passed to COMMAND.
This is what the `login' program does. The `-c' option causes
COMMAND to be executed with an empty environment. If `-a' is
supplied, the shell passes NAME as the zeroth argument to COMMAND.
If no COMMAND is specified, redirections may be used to affect the
current shell environment. If there are no redirection errors, the
return status is zero; otherwise the return status is non-zero.
@@ -2655,7 +2659,7 @@ POSIX standard.
Display current Readline (*note Command Line Editing::) key and
function bindings, bind a key sequence to a Readline function or
macro, or set a Readline variable. Each non-option argument is a
command as it would appear in a a Readline initialization file
command as it would appear in a Readline initialization file
(*note Readline Init File::), but each binding or command must be
passed as a separate argument; e.g.,
`"\C-x\C-r":re-read-init-file'. Options, if supplied, have the
@@ -2799,10 +2803,12 @@ POSIX standard.
Mark each NAME for export to subsequent commands via the
environment.
Using `+' instead of `-' turns off the attribute instead. When
used in a function, `declare' makes each NAME local, as with the
`local' command. If a variable name is followed by =VALUE, the
value of the variable is set to VALUE.
Using `+' instead of `-' turns off the attribute instead, with the
exceptions that `+a' may not be used to destroy an array variable
and `+r' will not remove the readonly attribute. When used in a
function, `declare' makes each NAME local, as with the `local'
command. 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 encountered,
an attempt is made to define a function using `-f foo=bar', an
@@ -3402,9 +3408,10 @@ This builtin is so complicated that it deserves its own section.
Commands::) exits with a non-zero status, unless the command
that fails is part of the command list immediately following
a `while' or `until' keyword, part of the test in an `if'
statement, part of a `&&' or `||' list, or if the command's
return status is being inverted using `!'. A trap on `ERR',
if set, is executed before the shell exits.
statement, part of a `&&' or `||' list, any command in a
pipeline but the last, or if the command's return status is
being inverted using `!'. A trap on `ERR', if set, is
executed before the shell exits.
`-f'
Disable file name generation (globbing).
@@ -3892,7 +3899,7 @@ Variables::).
An array variable containing the names of all shell functions
currently in the execution call stack. The element with index 0
is the name of any currently-executing shell function. The
bottom-most element is "main". This variable exists only when a
bottom-most element is `"main"'. This variable exists only when a
shell function is executing. Assignments to `FUNCNAME' have no
effect and return an error status. If `FUNCNAME' is unset, it
loses its special properties, even if it is subsequently reset.
@@ -4191,7 +4198,7 @@ Variables::).
if input does not arrive after `TMOUT' seconds when input is coming
from a terminal.
In an interative shell, the value is interpreted as the number of
In an interactive shell, the value is interpreted as the number of
seconds to wait for input after issuing the primary prompt when
the shell is interactive. Bash terminates after that number of
seconds if input does not arrive.
@@ -4261,7 +4268,7 @@ the single-character options to be recognized.
Equivalent to `-D'.
`--help'
Display a usage message on standard output and exit sucessfully.
Display a usage message on standard output and exit successfully.
`--init-file FILENAME'
`--rcfile FILENAME'
@@ -4378,7 +4385,7 @@ File: bashref.info, Node: Bash Startup Files, Next: Interactive Shells, Prev:
6.2 Bash Startup Files
======================
This section describs how Bash executes its startup files. If any of
This section describes how Bash executes its startup files. If any of
the files exist but cannot be read, Bash reports an error. Tildes are
expanded in file names as described above under Tilde Expansion (*note
Tilde Expansion::).
@@ -4502,9 +4509,9 @@ File: bashref.info, Node: What is an Interactive Shell?, Next: Is this Shell I
-----------------------------------
An interactive shell is one started without non-option arguments,
unless `-s' is specified, without specifiying the `-c' option, and
whose input and error output are both connected to terminals (as
determined by `isatty(3)'), or one started with the `-i' option.
unless `-s' is specified, without specifying the `-c' option, and whose
input and error output are both connected to terminals (as determined
by `isatty(3)'), or one started with the `-i' option.
An interactive shell generally reads from and writes to a user's
terminal.
@@ -4581,7 +4588,7 @@ several ways.
((*note Signals::). `SIGINT' will interrupt some shell builtins.
11. An interactive login shell sends a `SIGHUP' to all jobs on exit if
the `hupoxexit' shell option has been enabled (*note Signals::).
the `huponexit' shell option has been enabled (*note Signals::).
12. The `-n' invocation option is ignored, and `set -n' has no effect
(*note The Set Builtin::).
@@ -5042,12 +5049,17 @@ File: bashref.info, Node: Directory Stack Builtins, Up: The Directory Stack
manipulated.
`pushd'
pushd [DIR | +N | -N] [-n]
pushd [-n] [+N | -N | DIR ]
Save the current directory on the top of the directory stack and
then `cd' to DIR. With no arguments, `pushd' exchanges the top
two directories.
`-n'
Suppresses the normal change of directory when adding
directories to the stack, so that only the stack is
manipulated.
`+N'
Brings the Nth directory (counting from the left of the list
printed by `dirs', starting with zero) to the top of the list
@@ -5058,11 +5070,6 @@ File: bashref.info, Node: Directory Stack Builtins, Up: The Directory Stack
printed by `dirs', starting with zero) to the top of the list
by rotating the stack.
`-n'
Suppresses the normal change of directory when adding
directories to the stack, so that only the stack is
manipulated.
`DIR'
Makes the current working directory be the top of the stack,
and then executes the equivalent of ``cd' DIR'. `cd's to DIR.
@@ -8994,8 +9001,8 @@ Index of Shell Builtin Commands
(line 7)
* disown: Job Control Builtins.
(line 83)
* echo: Bash Builtins. (line 191)
* enable: Bash Builtins. (line 243)
* echo: Bash Builtins. (line 193)
* enable: Bash Builtins. (line 245)
* eval: Bourne Shell Builtins.
(line 63)
* exec: Bourne Shell Builtins.
@@ -9012,24 +9019,24 @@ Index of Shell Builtin Commands
(line 103)
* hash: Bourne Shell Builtins.
(line 145)
* help: Bash Builtins. (line 271)
* help: Bash Builtins. (line 273)
* history: Bash History Builtins.
(line 39)
* jobs: Job Control Builtins.
(line 25)
* kill: Job Control Builtins.
(line 57)
* let: Bash Builtins. (line 280)
* local: Bash Builtins. (line 287)
* logout: Bash Builtins. (line 297)
* let: Bash Builtins. (line 282)
* local: Bash Builtins. (line 289)
* logout: Bash Builtins. (line 299)
* popd: Directory Stack Builtins.
(line 37)
* printf: Bash Builtins. (line 301)
* printf: Bash Builtins. (line 303)
* pushd: Directory Stack Builtins.
(line 58)
* pwd: Bourne Shell Builtins.
(line 163)
* read: Bash Builtins. (line 326)
* read: Bash Builtins. (line 328)
* readonly: Bourne Shell Builtins.
(line 172)
* return: Bourne Shell Builtins.
@@ -9037,8 +9044,8 @@ Index of Shell Builtin Commands
* set: The Set Builtin. (line 9)
* shift: Bourne Shell Builtins.
(line 200)
* shopt: Bash Builtins. (line 387)
* source: Bash Builtins. (line 618)
* shopt: Bash Builtins. (line 389)
* source: Bash Builtins. (line 620)
* suspend: Job Control Builtins.
(line 94)
* test: Bourne Shell Builtins.
@@ -9047,12 +9054,12 @@ Index of Shell Builtin Commands
(line 278)
* trap: Bourne Shell Builtins.
(line 283)
* type: Bash Builtins. (line 622)
* typeset: Bash Builtins. (line 653)
* ulimit: Bash Builtins. (line 659)
* type: Bash Builtins. (line 624)
* typeset: Bash Builtins. (line 655)
* ulimit: Bash Builtins. (line 661)
* umask: Bourne Shell Builtins.
(line 324)
* unalias: Bash Builtins. (line 737)
* unalias: Bash Builtins. (line 739)
* unset: Bourne Shell Builtins.
(line 341)
* wait: Job Control Builtins.
@@ -9524,129 +9531,129 @@ Concept Index

Tag Table:
Node: Top1359
Node: Introduction3442
Node: What is Bash?3670
Node: What is a shell?4783
Node: Definitions7324
Node: Basic Shell Features10091
Node: Shell Syntax11310
Node: Shell Operation12340
Node: Quoting13634
Node: Escape Character14937
Node: Single Quotes15422
Node: Double Quotes15770
Node: ANSI-C Quoting16895
Node: Locale Translation17851
Node: Comments18747
Node: Shell Commands19361
Node: Simple Commands20127
Node: Pipelines20758
Node: Lists22633
Node: Compound Commands24264
Node: Looping Constructs25048
Node: Conditional Constructs27495
Node: Command Grouping34954
Node: Shell Functions36403
Node: Shell Parameters40812
Node: Positional Parameters43142
Node: Special Parameters44042
Node: Shell Expansions47006
Node: Brace Expansion48931
Node: Tilde Expansion51256
Node: Shell Parameter Expansion53607
Node: Command Substitution61077
Node: Arithmetic Expansion62410
Node: Process Substitution63260
Node: Word Splitting64310
Node: Filename Expansion65771
Node: Pattern Matching67907
Node: Quote Removal71225
Node: Redirections71520
Node: Executing Commands79250
Node: Simple Command Expansion79920
Node: Command Search and Execution81850
Node: Command Execution Environment83856
Node: Environment86627
Node: Exit Status88287
Node: Signals89491
Node: Shell Scripts91455
Node: Shell Builtin Commands93973
Node: Bourne Shell Builtins95642
Node: Bash Builtins112744
Node: The Set Builtin142004
Node: Special Builtins150379
Node: Shell Variables151349
Node: Bourne Shell Variables151789
Node: Bash Variables153770
Node: Bash Features174084
Node: Invoking Bash174967
Node: Bash Startup Files180776
Node: Interactive Shells185634
Node: What is an Interactive Shell?186044
Node: Is this Shell Interactive?186694
Node: Interactive Shell Behavior187509
Node: Bash Conditional Expressions190785
Node: Shell Arithmetic194364
Node: Aliases197110
Node: Arrays199678
Node: The Directory Stack203027
Node: Directory Stack Builtins203741
Node: Printing a Prompt206632
Node: The Restricted Shell209346
Node: Bash POSIX Mode211178
Node: Job Control218937
Node: Job Control Basics219404
Node: Job Control Builtins223780
Node: Job Control Variables228107
Node: Command Line Editing229265
Node: Introduction and Notation230264
Node: Readline Interaction231886
Node: Readline Bare Essentials233077
Node: Readline Movement Commands234866
Node: Readline Killing Commands235831
Node: Readline Arguments237751
Node: Searching238795
Node: Readline Init File240981
Node: Readline Init File Syntax242128
Node: Conditional Init Constructs254459
Node: Sample Init File256992
Node: Bindable Readline Commands260109
Node: Commands For Moving261316
Node: Commands For History262177
Node: Commands For Text265332
Node: Commands For Killing268005
Node: Numeric Arguments270147
Node: Commands For Completion271286
Node: Keyboard Macros274879
Node: Miscellaneous Commands275450
Node: Readline vi Mode280761
Node: Programmable Completion281675
Node: Programmable Completion Builtins287467
Node: Using History Interactively295063
Node: Bash History Facilities295743
Node: Bash History Builtins298438
Node: History Interaction302295
Node: Event Designators304851
Node: Word Designators305866
Node: Modifiers307505
Node: Installing Bash308911
Node: Basic Installation310041
Node: Compilers and Options312733
Node: Compiling For Multiple Architectures313474
Node: Installation Names315138
Node: Specifying the System Type315956
Node: Sharing Defaults316672
Node: Operation Controls317345
Node: Optional Features318303
Node: Reporting Bugs327234
Node: Major Differences From The Bourne Shell328428
Node: Copying This Manual345093
Node: GNU Free Documentation License345369
Node: Builtin Index367775
Node: Reserved Word Index374324
Node: Variable Index376760
Node: Function Index387693
Node: Concept Index394413
Node: Top1357
Node: Introduction3438
Node: What is Bash?3666
Node: What is a shell?4779
Node: Definitions7319
Node: Basic Shell Features10087
Node: Shell Syntax11306
Node: Shell Operation12336
Node: Quoting13630
Node: Escape Character14933
Node: Single Quotes15418
Node: Double Quotes15766
Node: ANSI-C Quoting16891
Node: Locale Translation17847
Node: Comments18743
Node: Shell Commands19357
Node: Simple Commands20123
Node: Pipelines20754
Node: Lists22629
Node: Compound Commands24260
Node: Looping Constructs25044
Node: Conditional Constructs27491
Node: Command Grouping34951
Node: Shell Functions36400
Node: Shell Parameters40809
Node: Positional Parameters43139
Node: Special Parameters44039
Node: Shell Expansions47003
Node: Brace Expansion48928
Node: Tilde Expansion51254
Node: Shell Parameter Expansion53605
Node: Command Substitution61305
Node: Arithmetic Expansion62638
Node: Process Substitution63488
Node: Word Splitting64538
Node: Filename Expansion65999
Node: Pattern Matching68135
Node: Quote Removal71453
Node: Redirections71748
Node: Executing Commands79478
Node: Simple Command Expansion80148
Node: Command Search and Execution82078
Node: Command Execution Environment84084
Node: Environment86855
Node: Exit Status88515
Node: Signals89719
Node: Shell Scripts91683
Node: Shell Builtin Commands94201
Node: Bourne Shell Builtins95870
Node: Bash Builtins112975
Node: The Set Builtin142367
Node: Special Builtins150792
Node: Shell Variables151762
Node: Bourne Shell Variables152202
Node: Bash Variables154183
Node: Bash Features174500
Node: Invoking Bash175383
Node: Bash Startup Files181193
Node: Interactive Shells186052
Node: What is an Interactive Shell?186462
Node: Is this Shell Interactive?187111
Node: Interactive Shell Behavior187926
Node: Bash Conditional Expressions191202
Node: Shell Arithmetic194781
Node: Aliases197527
Node: Arrays200095
Node: The Directory Stack203444
Node: Directory Stack Builtins204158
Node: Printing a Prompt207050
Node: The Restricted Shell209764
Node: Bash POSIX Mode211596
Node: Job Control219355
Node: Job Control Basics219822
Node: Job Control Builtins224198
Node: Job Control Variables228525
Node: Command Line Editing229683
Node: Introduction and Notation230682
Node: Readline Interaction232304
Node: Readline Bare Essentials233495
Node: Readline Movement Commands235284
Node: Readline Killing Commands236249
Node: Readline Arguments238169
Node: Searching239213
Node: Readline Init File241399
Node: Readline Init File Syntax242546
Node: Conditional Init Constructs254877
Node: Sample Init File257410
Node: Bindable Readline Commands260527
Node: Commands For Moving261734
Node: Commands For History262595
Node: Commands For Text265750
Node: Commands For Killing268423
Node: Numeric Arguments270565
Node: Commands For Completion271704
Node: Keyboard Macros275297
Node: Miscellaneous Commands275868
Node: Readline vi Mode281179
Node: Programmable Completion282093
Node: Programmable Completion Builtins287885
Node: Using History Interactively295481
Node: Bash History Facilities296161
Node: Bash History Builtins298856
Node: History Interaction302713
Node: Event Designators305269
Node: Word Designators306284
Node: Modifiers307923
Node: Installing Bash309329
Node: Basic Installation310459
Node: Compilers and Options313151
Node: Compiling For Multiple Architectures313892
Node: Installation Names315556
Node: Specifying the System Type316374
Node: Sharing Defaults317090
Node: Operation Controls317763
Node: Optional Features318721
Node: Reporting Bugs327652
Node: Major Differences From The Bourne Shell328846
Node: Copying This Manual345511
Node: GNU Free Documentation License345787
Node: Builtin Index368193
Node: Reserved Word Index374742
Node: Variable Index377178
Node: Function Index388111
Node: Concept Index394831

End Tag Table