mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-06 02:02:42 +02:00
commit bash-20080724 snapshot
This commit is contained in:
+202
-150
@@ -2,12 +2,12 @@ This is bashref.info, produced by makeinfo version 4.11 from
|
||||
/usr/homes/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, 29 June 2008).
|
||||
the Bash shell (version 4.0, 6 July 2008).
|
||||
|
||||
This is Edition 4.0, last updated 29 June 2008, of `The GNU Bash
|
||||
This is Edition 4.0, last updated 6 July 2008, of `The GNU Bash
|
||||
Reference Manual', for `Bash', Version 4.0.
|
||||
|
||||
Copyright (C) 1988-2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2008 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, 29 June 2008).
|
||||
the Bash shell (version 4.0, 6 July 2008).
|
||||
|
||||
This is Edition 4.0, last updated 29 June 2008, of `The GNU Bash
|
||||
This is Edition 4.0, last updated 6 July 2008, of `The GNU Bash
|
||||
Reference Manual', for `Bash', Version 4.0.
|
||||
|
||||
Bash contains features that appear in other popular shells, and some
|
||||
@@ -532,6 +532,7 @@ construct, or in some other grouping.
|
||||
commands.
|
||||
* Lists:: How to execute commands sequentially.
|
||||
* Compound Commands:: Shell commands for control flow.
|
||||
* Coprocesses:: Two-way communication between commands.
|
||||
|
||||
|
||||
File: bashref.info, Node: Simple Commands, Next: Pipelines, Up: Shell Commands
|
||||
@@ -644,7 +645,7 @@ status.
|
||||
command executed in the list.
|
||||
|
||||
|
||||
File: bashref.info, Node: Compound Commands, Prev: Lists, Up: Shell Commands
|
||||
File: bashref.info, Node: Compound Commands, Next: Coprocesses, Prev: Lists, Up: Shell Commands
|
||||
|
||||
3.2.4 Compound Commands
|
||||
-----------------------
|
||||
@@ -937,6 +938,40 @@ they are not separated from the LIST by whitespace.
|
||||
The exit status of both of these constructs is the exit status of
|
||||
LIST.
|
||||
|
||||
|
||||
File: bashref.info, Node: Coprocesses, Prev: Compound Commands, Up: Shell Commands
|
||||
|
||||
3.2.5 Coprocesses
|
||||
-----------------
|
||||
|
||||
A `coprocess' is a shell command preceded by the `coproc' reserved word.
|
||||
A coprocess is executed asynchronously in a subshell, as if the command
|
||||
had been terminated with the `&' control operator, with a two-way pipe
|
||||
established between the executing shell and the coprocess.
|
||||
|
||||
The format for a coprocess is:
|
||||
`coproc' [NAME] COMMAND [REDIRECTIONS]
|
||||
|
||||
This creates a coprocess named NAME. If NAME is not supplied, the
|
||||
default name is COPROC.
|
||||
|
||||
When the coproc is executed, the shell creates an array variable
|
||||
(*note Arrays::) named NAME in the context of the executing shell. The
|
||||
standard output of COMMAND is connected via a pipe to a file descriptor
|
||||
in the executing shell, and that file descriptor is assigned to NAME[0].
|
||||
The standard input of COMMAND is connected via a pipe to a file
|
||||
descriptor in the executing shell, and that file descriptor is assigned
|
||||
to NAME[1]. This pipe is established before any redirections specified
|
||||
by the command (*note Redirections::). The file descriptors can be
|
||||
utilized as arguments to shell commands and redirections using standard
|
||||
word expansions.
|
||||
|
||||
The process id of the shell spawned to execute the coprocess is
|
||||
available as the value of the variable NAME_PID. The `wait' builtin
|
||||
command may be used to wait for the coprocess to terminate.
|
||||
|
||||
The return status of a coprocess is the exit status of COMMAND.
|
||||
|
||||
|
||||
File: bashref.info, Node: Shell Functions, Next: Shell Parameters, Prev: Shell Commands, Up: Basic Shell Features
|
||||
|
||||
@@ -2852,7 +2887,7 @@ POSIX standard.
|
||||
non-zero if not.
|
||||
|
||||
`declare'
|
||||
declare [-aAfFirtx] [-p] [NAME[=VALUE] ...]
|
||||
declare [-aAfFilrtux] [-p] [NAME[=VALUE] ...]
|
||||
|
||||
Declare variables and give them attributes. If no NAMEs are
|
||||
given, then display the values of variables instead.
|
||||
@@ -2890,6 +2925,11 @@ POSIX standard.
|
||||
evaluation (*note Shell Arithmetic::) is performed when the
|
||||
variable is assigned a value.
|
||||
|
||||
`-l'
|
||||
When the variable is assigned a value, all upper-case
|
||||
characters are converted to lower-case. The upper-case
|
||||
attribute is disabled.
|
||||
|
||||
`-r'
|
||||
Make NAMEs readonly. These names cannot then be assigned
|
||||
values by subsequent assignment statements or unset.
|
||||
@@ -2899,6 +2939,11 @@ POSIX standard.
|
||||
inherit the `DEBUG' and `RETURN' traps from the calling shell.
|
||||
The trace attribute has no special meaning for variables.
|
||||
|
||||
`-u'
|
||||
When the variable is assigned a value, all lower-case
|
||||
characters are converted to upper-case. The lower-case
|
||||
attribute is disabled.
|
||||
|
||||
`-x'
|
||||
Mark each NAME for export to subsequent commands via the
|
||||
environment.
|
||||
@@ -3121,9 +3166,10 @@ POSIX standard.
|
||||
next character read and for line continuation. If no names are
|
||||
supplied, the line read is assigned to the variable `REPLY'. The
|
||||
return code is zero, unless end-of-file is encountered, `read'
|
||||
times out, or an invalid file descriptor is supplied as the
|
||||
argument to `-u'. Options, if supplied, have the following
|
||||
meanings:
|
||||
times out (in which case the return code is greater than 128), or
|
||||
an invalid file descriptor is supplied as the argument to `-u'.
|
||||
|
||||
Options, if supplied, have the following meanings:
|
||||
|
||||
`-a ANAME'
|
||||
The words are assigned to sequential indices of the array
|
||||
@@ -8361,6 +8407,10 @@ does not provide the necessary support.
|
||||
`=~' binary operator in the `[[' conditional command. (*note
|
||||
Conditional Constructs::).
|
||||
|
||||
`--enable-coprocesses'
|
||||
Include support for coprocesses and the `coproc' reserved word
|
||||
(*note Pipelines::).
|
||||
|
||||
`--enable-debugger'
|
||||
Include support for the bash debugger (distributed separately).
|
||||
|
||||
@@ -9347,8 +9397,8 @@ D.1 Index of Shell Builtin Commands
|
||||
(line 7)
|
||||
* disown: Job Control Builtins.
|
||||
(line 83)
|
||||
* echo: Bash Builtins. (line 211)
|
||||
* enable: Bash Builtins. (line 263)
|
||||
* echo: Bash Builtins. (line 221)
|
||||
* enable: Bash Builtins. (line 273)
|
||||
* eval: Bourne Shell Builtins.
|
||||
(line 63)
|
||||
* exec: Bourne Shell Builtins.
|
||||
@@ -9365,25 +9415,25 @@ D.1 Index of Shell Builtin Commands
|
||||
(line 103)
|
||||
* hash: Bourne Shell Builtins.
|
||||
(line 145)
|
||||
* help: Bash Builtins. (line 291)
|
||||
* help: Bash Builtins. (line 301)
|
||||
* history: Bash History Builtins.
|
||||
(line 39)
|
||||
* jobs: Job Control Builtins.
|
||||
(line 25)
|
||||
* kill: Job Control Builtins.
|
||||
(line 57)
|
||||
* let: Bash Builtins. (line 311)
|
||||
* local: Bash Builtins. (line 318)
|
||||
* logout: Bash Builtins. (line 328)
|
||||
* mapfile: Bash Builtins. (line 332)
|
||||
* let: Bash Builtins. (line 321)
|
||||
* local: Bash Builtins. (line 328)
|
||||
* logout: Bash Builtins. (line 338)
|
||||
* mapfile: Bash Builtins. (line 342)
|
||||
* popd: Directory Stack Builtins.
|
||||
(line 37)
|
||||
* printf: Bash Builtins. (line 373)
|
||||
* printf: Bash Builtins. (line 383)
|
||||
* pushd: Directory Stack Builtins.
|
||||
(line 58)
|
||||
* pwd: Bourne Shell Builtins.
|
||||
(line 163)
|
||||
* read: Bash Builtins. (line 398)
|
||||
* read: Bash Builtins. (line 408)
|
||||
* readonly: Bourne Shell Builtins.
|
||||
(line 172)
|
||||
* return: Bourne Shell Builtins.
|
||||
@@ -9392,7 +9442,7 @@ D.1 Index of Shell Builtin Commands
|
||||
* shift: Bourne Shell Builtins.
|
||||
(line 201)
|
||||
* shopt: The Shopt Builtin. (line 9)
|
||||
* source: Bash Builtins. (line 466)
|
||||
* source: Bash Builtins. (line 477)
|
||||
* suspend: Job Control Builtins.
|
||||
(line 94)
|
||||
* test: Bourne Shell Builtins.
|
||||
@@ -9401,12 +9451,12 @@ D.1 Index of Shell Builtin Commands
|
||||
(line 281)
|
||||
* trap: Bourne Shell Builtins.
|
||||
(line 286)
|
||||
* type: Bash Builtins. (line 470)
|
||||
* typeset: Bash Builtins. (line 501)
|
||||
* ulimit: Bash Builtins. (line 507)
|
||||
* type: Bash Builtins. (line 481)
|
||||
* typeset: Bash Builtins. (line 512)
|
||||
* ulimit: Bash Builtins. (line 518)
|
||||
* umask: Bourne Shell Builtins.
|
||||
(line 327)
|
||||
* unalias: Bash Builtins. (line 593)
|
||||
* unalias: Bash Builtins. (line 604)
|
||||
* unset: Bourne Shell Builtins.
|
||||
(line 344)
|
||||
* wait: Job Control Builtins.
|
||||
@@ -9777,6 +9827,7 @@ D.5 Concept Index
|
||||
(line 6)
|
||||
* configuration: Basic Installation. (line 6)
|
||||
* control operator: Definitions. (line 21)
|
||||
* coprocess: Coprocesses. (line 6)
|
||||
* directory stack: The Directory Stack. (line 6)
|
||||
* editing command lines: Readline Bare Essentials.
|
||||
(line 6)
|
||||
@@ -9888,131 +9939,132 @@ D.5 Concept Index
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top1344
|
||||
Node: Introduction3175
|
||||
Node: What is Bash?3403
|
||||
Node: What is a shell?4516
|
||||
Node: Definitions7056
|
||||
Node: Basic Shell Features9836
|
||||
Node: Shell Syntax11055
|
||||
Node: Shell Operation12085
|
||||
Node: Quoting13379
|
||||
Node: Escape Character14682
|
||||
Node: Single Quotes15167
|
||||
Node: Double Quotes15515
|
||||
Node: ANSI-C Quoting16640
|
||||
Node: Locale Translation17596
|
||||
Node: Comments18492
|
||||
Node: Shell Commands19110
|
||||
Node: Simple Commands19876
|
||||
Node: Pipelines20507
|
||||
Node: Lists22763
|
||||
Node: Compound Commands24492
|
||||
Node: Looping Constructs25276
|
||||
Node: Conditional Constructs27723
|
||||
Node: Command Grouping35729
|
||||
Node: Shell Functions37208
|
||||
Node: Shell Parameters41669
|
||||
Node: Positional Parameters44085
|
||||
Node: Special Parameters44985
|
||||
Node: Shell Expansions47949
|
||||
Node: Brace Expansion49874
|
||||
Node: Tilde Expansion52627
|
||||
Node: Shell Parameter Expansion54978
|
||||
Node: Command Substitution63809
|
||||
Node: Arithmetic Expansion65142
|
||||
Node: Process Substitution65992
|
||||
Node: Word Splitting67042
|
||||
Node: Filename Expansion68665
|
||||
Node: Pattern Matching70805
|
||||
Node: Quote Removal74444
|
||||
Node: Redirections74739
|
||||
Node: Executing Commands82882
|
||||
Node: Simple Command Expansion83552
|
||||
Node: Command Search and Execution85482
|
||||
Node: Command Execution Environment87819
|
||||
Node: Environment90618
|
||||
Node: Exit Status92278
|
||||
Node: Signals93899
|
||||
Node: Shell Scripts95867
|
||||
Node: Shell Builtin Commands98385
|
||||
Node: Bourne Shell Builtins100062
|
||||
Node: Bash Builtins117380
|
||||
Node: Modifying Shell Behavior140408
|
||||
Node: The Set Builtin140753
|
||||
Node: The Shopt Builtin149601
|
||||
Node: Special Builtins160463
|
||||
Node: Shell Variables161442
|
||||
Node: Bourne Shell Variables161882
|
||||
Node: Bash Variables163863
|
||||
Node: Bash Features186181
|
||||
Node: Invoking Bash187064
|
||||
Node: Bash Startup Files192873
|
||||
Node: Interactive Shells197842
|
||||
Node: What is an Interactive Shell?198252
|
||||
Node: Is this Shell Interactive?198901
|
||||
Node: Interactive Shell Behavior199716
|
||||
Node: Bash Conditional Expressions202996
|
||||
Node: Shell Arithmetic206575
|
||||
Node: Aliases209321
|
||||
Node: Arrays211893
|
||||
Node: The Directory Stack215735
|
||||
Node: Directory Stack Builtins216449
|
||||
Node: Printing a Prompt219341
|
||||
Node: The Restricted Shell222093
|
||||
Node: Bash POSIX Mode223925
|
||||
Node: Job Control231778
|
||||
Node: Job Control Basics232238
|
||||
Node: Job Control Builtins236832
|
||||
Node: Job Control Variables241196
|
||||
Node: Command Line Editing242354
|
||||
Node: Introduction and Notation243349
|
||||
Node: Readline Interaction244971
|
||||
Node: Readline Bare Essentials246162
|
||||
Node: Readline Movement Commands247951
|
||||
Node: Readline Killing Commands248916
|
||||
Node: Readline Arguments250836
|
||||
Node: Searching251880
|
||||
Node: Readline Init File254066
|
||||
Node: Readline Init File Syntax255213
|
||||
Node: Conditional Init Constructs268447
|
||||
Node: Sample Init File270980
|
||||
Node: Bindable Readline Commands274097
|
||||
Node: Commands For Moving275304
|
||||
Node: Commands For History276165
|
||||
Node: Commands For Text279320
|
||||
Node: Commands For Killing281993
|
||||
Node: Numeric Arguments284135
|
||||
Node: Commands For Completion285274
|
||||
Node: Keyboard Macros289041
|
||||
Node: Miscellaneous Commands289612
|
||||
Node: Readline vi Mode294923
|
||||
Node: Programmable Completion295837
|
||||
Node: Programmable Completion Builtins301670
|
||||
Node: Using History Interactively310053
|
||||
Node: Bash History Facilities310737
|
||||
Node: Bash History Builtins313651
|
||||
Node: History Interaction317508
|
||||
Node: Event Designators320213
|
||||
Node: Word Designators321228
|
||||
Node: Modifiers322867
|
||||
Node: Installing Bash324271
|
||||
Node: Basic Installation325408
|
||||
Node: Compilers and Options328100
|
||||
Node: Compiling For Multiple Architectures328841
|
||||
Node: Installation Names330505
|
||||
Node: Specifying the System Type331323
|
||||
Node: Sharing Defaults332039
|
||||
Node: Operation Controls332712
|
||||
Node: Optional Features333670
|
||||
Node: Reporting Bugs342954
|
||||
Node: Major Differences From The Bourne Shell344148
|
||||
Node: GNU Free Documentation License360835
|
||||
Node: Indexes383296
|
||||
Node: Builtin Index383750
|
||||
Node: Reserved Word Index390504
|
||||
Node: Variable Index392952
|
||||
Node: Function Index404758
|
||||
Node: Concept Index411490
|
||||
Node: Top1342
|
||||
Node: Introduction3171
|
||||
Node: What is Bash?3399
|
||||
Node: What is a shell?4512
|
||||
Node: Definitions7052
|
||||
Node: Basic Shell Features9832
|
||||
Node: Shell Syntax11051
|
||||
Node: Shell Operation12081
|
||||
Node: Quoting13375
|
||||
Node: Escape Character14678
|
||||
Node: Single Quotes15163
|
||||
Node: Double Quotes15511
|
||||
Node: ANSI-C Quoting16636
|
||||
Node: Locale Translation17592
|
||||
Node: Comments18488
|
||||
Node: Shell Commands19106
|
||||
Node: Simple Commands19930
|
||||
Node: Pipelines20561
|
||||
Node: Lists22817
|
||||
Node: Compound Commands24546
|
||||
Node: Looping Constructs25350
|
||||
Node: Conditional Constructs27797
|
||||
Node: Command Grouping35803
|
||||
Node: Coprocesses37282
|
||||
Node: Shell Functions38771
|
||||
Node: Shell Parameters43232
|
||||
Node: Positional Parameters45648
|
||||
Node: Special Parameters46548
|
||||
Node: Shell Expansions49512
|
||||
Node: Brace Expansion51437
|
||||
Node: Tilde Expansion54190
|
||||
Node: Shell Parameter Expansion56541
|
||||
Node: Command Substitution65372
|
||||
Node: Arithmetic Expansion66705
|
||||
Node: Process Substitution67555
|
||||
Node: Word Splitting68605
|
||||
Node: Filename Expansion70228
|
||||
Node: Pattern Matching72368
|
||||
Node: Quote Removal76007
|
||||
Node: Redirections76302
|
||||
Node: Executing Commands84445
|
||||
Node: Simple Command Expansion85115
|
||||
Node: Command Search and Execution87045
|
||||
Node: Command Execution Environment89382
|
||||
Node: Environment92181
|
||||
Node: Exit Status93841
|
||||
Node: Signals95462
|
||||
Node: Shell Scripts97430
|
||||
Node: Shell Builtin Commands99948
|
||||
Node: Bourne Shell Builtins101625
|
||||
Node: Bash Builtins118943
|
||||
Node: Modifying Shell Behavior142371
|
||||
Node: The Set Builtin142716
|
||||
Node: The Shopt Builtin151564
|
||||
Node: Special Builtins162426
|
||||
Node: Shell Variables163405
|
||||
Node: Bourne Shell Variables163845
|
||||
Node: Bash Variables165826
|
||||
Node: Bash Features188144
|
||||
Node: Invoking Bash189027
|
||||
Node: Bash Startup Files194836
|
||||
Node: Interactive Shells199805
|
||||
Node: What is an Interactive Shell?200215
|
||||
Node: Is this Shell Interactive?200864
|
||||
Node: Interactive Shell Behavior201679
|
||||
Node: Bash Conditional Expressions204959
|
||||
Node: Shell Arithmetic208538
|
||||
Node: Aliases211284
|
||||
Node: Arrays213856
|
||||
Node: The Directory Stack217698
|
||||
Node: Directory Stack Builtins218412
|
||||
Node: Printing a Prompt221304
|
||||
Node: The Restricted Shell224056
|
||||
Node: Bash POSIX Mode225888
|
||||
Node: Job Control233741
|
||||
Node: Job Control Basics234201
|
||||
Node: Job Control Builtins238795
|
||||
Node: Job Control Variables243159
|
||||
Node: Command Line Editing244317
|
||||
Node: Introduction and Notation245312
|
||||
Node: Readline Interaction246934
|
||||
Node: Readline Bare Essentials248125
|
||||
Node: Readline Movement Commands249914
|
||||
Node: Readline Killing Commands250879
|
||||
Node: Readline Arguments252799
|
||||
Node: Searching253843
|
||||
Node: Readline Init File256029
|
||||
Node: Readline Init File Syntax257176
|
||||
Node: Conditional Init Constructs270410
|
||||
Node: Sample Init File272943
|
||||
Node: Bindable Readline Commands276060
|
||||
Node: Commands For Moving277267
|
||||
Node: Commands For History278128
|
||||
Node: Commands For Text281283
|
||||
Node: Commands For Killing283956
|
||||
Node: Numeric Arguments286098
|
||||
Node: Commands For Completion287237
|
||||
Node: Keyboard Macros291004
|
||||
Node: Miscellaneous Commands291575
|
||||
Node: Readline vi Mode296886
|
||||
Node: Programmable Completion297800
|
||||
Node: Programmable Completion Builtins303633
|
||||
Node: Using History Interactively312016
|
||||
Node: Bash History Facilities312700
|
||||
Node: Bash History Builtins315614
|
||||
Node: History Interaction319471
|
||||
Node: Event Designators322176
|
||||
Node: Word Designators323191
|
||||
Node: Modifiers324830
|
||||
Node: Installing Bash326234
|
||||
Node: Basic Installation327371
|
||||
Node: Compilers and Options330063
|
||||
Node: Compiling For Multiple Architectures330804
|
||||
Node: Installation Names332468
|
||||
Node: Specifying the System Type333286
|
||||
Node: Sharing Defaults334002
|
||||
Node: Operation Controls334675
|
||||
Node: Optional Features335633
|
||||
Node: Reporting Bugs345035
|
||||
Node: Major Differences From The Bourne Shell346229
|
||||
Node: GNU Free Documentation License362916
|
||||
Node: Indexes385377
|
||||
Node: Builtin Index385831
|
||||
Node: Reserved Word Index392585
|
||||
Node: Variable Index395033
|
||||
Node: Function Index406839
|
||||
Node: Concept Index413571
|
||||
|
||||
End Tag Table
|
||||
|
||||
Reference in New Issue
Block a user