Imported from ../bash-4.0.tar.gz.

This commit is contained in:
Jari Aalto 2009-02-19 22:21:29 +00:00
commit 17345e5ad2
134 changed files with 74214 additions and 4584 deletions

300
doc/FAQ
View file

@ -1,4 +1,4 @@
This is the Bash FAQ, version 3.36, for Bash version 3.2.
This is the Bash FAQ, version 4.01, for Bash version 4.0.
This document contains a set of frequently-asked questions concerning
Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
@ -36,9 +36,9 @@ A10) What is the bash `posix mode'?
Section B: The latest version
B1) What's new in version 3.2?
B2) Are there any user-visible incompatibilities between bash-3.2 and
bash-2.05b?
B1) What's new in version 4.0?
B2) Are there any user-visible incompatibilities between bash-4.0,
bash-3.2, and bash-2.05b?
Section C: Differences from other Unix shells
@ -143,26 +143,26 @@ of Case Western Reserve University.
A2) What's the latest version?
The latest version is 3.2, first made available on 12 October, 2006.
The latest version is 4.0, first made available on 20 February, 2009.
A3) Where can I get it?
Bash is the GNU project's shell, and so is available from the
master GNU archive site, ftp.gnu.org, and its mirrors. The
latest version is also available for FTP from ftp.cwru.edu.
The following URLs tell how to get version 3.2:
The following URLs tell how to get version 4.0:
ftp://ftp.gnu.org/pub/gnu/bash/bash-3.2.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-3.2.tar.gz
ftp://ftp.gnu.org/pub/gnu/bash/bash-4.0.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-4.0.tar.gz
Formatted versions of the documentation are available with the URLs:
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.2.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-3.2.tar.gz
ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-4.0.tar.gz
ftp://ftp.cwru.edu/pub/bash/bash-doc-4.0.tar.gz
Any patches for the current version are available with the URL:
ftp://ftp.cwru.edu/pub/bash/bash-3.2-patches/
ftp://ftp.cwru.edu/pub/bash/bash-4.0-patches/
A4) On what machines will bash run?
@ -194,9 +194,8 @@ http://www.cygwin.com/.
Cygnus originally ported bash-1.14.7, and that port was part of their
early GNU-Win32 (the original name) releases. Cygnus has also done
ports of bash-2.05b and bash-3.0 to the CYGWIN environment, and both
are available as part of their current release. Bash-3.2 is currently
being tested and should be available soon.
ports of bash-2.05b and bash-3.2 to the CYGWIN environment, and both
are available as part of their current release.
Bash-2.05b and later versions should require no local Cygnus changes to
build and run under CYGWIN.
@ -219,7 +218,7 @@ Mark began to work with bash-2.05, but I don't know the current status.
Bash-3.0 compiles and runs with no modifications under Microsoft's Services
for Unix (SFU), once known as Interix. I do not anticipate any problems
with building bash-3.1 or bash-3.2.
with building bash-4.0, but will gladly accept any patches that are needed.
A6) How can I build bash with gcc?
@ -388,12 +387,158 @@ They are also listed in a section in the Bash Reference Manual
Section B: The latest version
B1) What's new in version 3.2?
B1) What's new in version 4.0?
Bash-3.2 is the second maintenance release of the third major release of
bash. It contains the following significant new features (see the manual
page for complete descriptions and the CHANGES and NEWS files in the
bash-3.2 distribution).
Bash-4.0 is the fourth major release of bash. There are numerous new features,
some experimental. Depending on community reception, the experimental
features will evolve.
Bash-4.0 contains the following new features (see the manual page for
complete descriptions and the CHANGES and NEWS files in the bash-4.0
distribution):
o When using substring expansion on the positional parameters, a starting
index of 0 now causes $0 to be prefixed to the list.
o There is a new variable, $BASHPID, which always returns the process id of
the current shell.
o There is a new `autocd' option that, when enabled, causes bash to attempt
to `cd' to a directory name that is supplied as the first word of a
simple command.
o There is a new `checkjobs' option that causes the shell to check for and
report any running or stopped jobs at exit.
o The programmable completion code exports a new COMP_TYPE variable, set to
a character describing the type of completion being attempted.
o The programmable completion code exports a new COMP_KEY variable, set to
the character that caused the completion to be invoked (e.g., TAB).
o The programmable completion code now uses the same set of characters as
readline when breaking the command line into a list of words.
o The block multiplier for the ulimit -c and -f options is now 512 when in
Posix mode, as Posix specifies.
o Changed the behavior of the read builtin to save any partial input received
in the specified variable when the read builtin times out. This also
results in variables specified as arguments to read to be set to the empty
string when there is no input available. When the read builtin times out,
it returns an exit status greater than 128.
o The shell now has the notion of a `compatibility level', controlled by
new variables settable by `shopt'. Setting this variable currently
restores the bash-3.1 behavior when processing quoted strings on the rhs
of the `=~' operator to the `[[' command.
o The `ulimit' builtin now has new -b (socket buffer size) and -T (number
of threads) options.
o There is a new `compopt' builtin that allows completion functions to modify
completion options for existing completions or the completion currently
being executed.
o The `read' builtin has a new -i option which inserts text into the reply
buffer when using readline.
o A new `-E' option to the complete builtin allows control of the default
behavior for completion on an empty line.
o There is now limited support for completing command name words containing
globbing characters.
o The `help' builtin now has a new -d option, to display a short description,
and a -m option, to print help information in a man page-like format.
o There is a new `mapfile' builtin to populate an array with lines from a
given file.
o If a command is not found, the shell attempts to execute a shell function
named `command_not_found_handle', supplying the command words as the
function arguments.
o There is a new shell option: `globstar'. When enabled, the globbing code
treats `**' specially -- it matches all directories (and files within
them, when appropriate) recursively.
o There is a new shell option: `dirspell'. When enabled, the filename
completion code performs spelling correction on directory names during
completion.
o The `-t' option to the `read' builtin now supports fractional timeout
values.
o Brace expansion now allows zero-padding of expanded numeric values and
will add the proper number of zeroes to make sure all values contain the
same number of digits.
o There is a new bash-specific bindable readline function: `dabbrev-expand'.
It uses menu completion on a set of words taken from the history list.
o The command assigned to a key sequence with `bind -x' now sets two new
variables in the environment of the executed command: READLINE_LINE_BUFFER
and READLINE_POINT. The command can change the current readline line
and cursor position by modifying READLINE_LINE_BUFFER and READLINE_POINT,
respectively.
o There is a new >>& redirection operator, which appends the standard output
and standard error to the named file.
o The parser now understands `|&' as a synonym for `2>&1 |', which redirects
the standard error for a command through a pipe.
o The new `;&' case statement action list terminator causes execution to
continue with the action associated with the next pattern in the
statement rather than terminating the command.
o The new `;;&' case statement action list terminator causes the shell to
test the next set of patterns after completing execution of the current
action, rather than terminating the command.
o The shell understands a new variable: PROMPT_DIRTRIM. When set to an
integer value greater than zero, prompt expansion of \w and \W will
retain only that number of trailing pathname components and replace
the intervening characters with `...'.
o There are new case-modifying word expansions: uppercase (^[^]) and
lowercase (,[,]). They can work on either the first character or
array element, or globally. They accept an optional shell pattern
that determines which characters to modify. There is an optionally-
configured feature to include capitalization operators.
o The shell provides associative array variables, with the appropriate
support to create, delete, assign values to, and expand them.
o The `declare' builtin now has new -l (convert value to lowercase upon
assignment) and -u (convert value to uppercase upon assignment) options.
There is an optionally-configurable -c option to capitalize a value at
assignment.
o There is a new `coproc' reserved word that specifies a coprocess: an
asynchronous command run with two pipes connected to the creating shell.
Coprocs can be named. The input and output file descriptors and the
PID of the coprocess are available to the calling shell in variables
with coproc-specific names.
o A value of 0 for the -t option to `read' now returns success if there is
input available to be read from the specified file descriptor.
o CDPATH and GLOBIGNORE are ignored when the shell is running in privileged
mode.
o New bindable readline functions shell-forward-word and shell-backward-word,
which move forward and backward words delimited by shell metacharacters
and honor shell quoting.
o New bindable readline functions shell-backward-kill-word and shell-kill-word
which kill words backward and forward, but use the same word boundaries
as shell-forward-word and shell-backward-word.
A short feature history dating from Bash-2.0:
Bash-3.2 contained the following new features:
o Bash-3.2 now checks shell scripts for NUL characters rather than non-printing
characters when deciding whether or not a script is a binary file.
@ -401,8 +546,6 @@ o Bash-3.2 now checks shell scripts for NUL characters rather than non-printing
o Quoting the string argument to the [[ command's =~ (regexp) operator now
forces string matching, as with the other pattern-matching operators.
A short feature history dating from Bash-2.0:
Bash-3.1 contained the following new features:
o Bash-3.1 may now be configured and built in a mode that enforces strict
@ -651,10 +794,10 @@ grammar tighter and smaller (66 reduce-reduce conflicts gone)
lots of code now smaller and faster
test suite greatly expanded
B2) Are there any user-visible incompatibilities between bash-3.2 and
bash-2.05b?
B2) Are there any user-visible incompatibilities between bash-4.0, bash-3.2,
and bash-2.05b?
There are a few incompatibilities between version 2.05b and version 3.2.
There are a few incompatibilities between version 4.0 and version 3.2.
They are detailed in the file COMPAT in the bash distribution. That file
is not meant to be all-encompassing; send mail to bash-maintainers@gnu.org
if if you find something that's not mentioned there.
@ -687,25 +830,25 @@ Things bash has that sh does not:
the ${param/pat[/string]} parameter pattern substitution operator
expansions to perform substring removal (${p%[%]w}, ${p#[#]w})
expansion of positional parameters beyond $9 with ${num}
variables: BASH, BASH_VERSION, BASH_VERSINFO, UID, EUID, REPLY,
variables: BASH, BASHPID, BASH_VERSION, BASH_VERSINFO, UID, EUID, REPLY,
TIMEFORMAT, PPID, PWD, OLDPWD, SHLVL, RANDOM, SECONDS,
LINENO, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE, HOSTNAME,
ENV, PS3, PS4, DIRSTACK, PIPESTATUS, HISTSIZE, HISTFILE,
HISTFILESIZE, HISTCONTROL, HISTIGNORE, GLOBIGNORE, GROUPS,
PROMPT_COMMAND, FCEDIT, FIGNORE, IGNOREEOF, INPUTRC,
SHELLOPTS, OPTERR, HOSTFILE, TMOUT, FUNCNAME, histchars,
auto_resume
auto_resume, PROMPT_DIRTRIM
DEBUG trap
ERR trap
variable arrays with new compound assignment syntax
redirections: <>, &>, >|, <<<, [n]<&word-, [n]>&word-
redirections: <>, &>, >|, <<<, [n]<&word-, [n]>&word-, >>&
prompt string special char translation and variable expansion
auto-export of variables in initial environment
command search finds functions before builtins
bash return builtin will exit a file sourced with `.'
builtins: cd -/-L/-P, exec -l/-c/-a, echo -e/-E, hash -d/-l/-p/-t.
export -n/-f/-p/name=value, pwd -L/-P,
read -e/-p/-a/-t/-n/-d/-s/-u,
read -e/-p/-a/-t/-n/-d/-s/-u/-i,
readonly -a/-f/name=value, trap -l, set +o,
set -b/-m/-o option/-h/-p/-B/-C/-H/-P,
unset -f/-v, ulimit -i/-m/-p/-q/-u/-x,
@ -727,7 +870,7 @@ Things bash has that sh does not:
other new bash builtins: bind, command, compgen, complete, builtin,
declare/typeset, dirs, enable, fc, help,
history, logout, popd, pushd, disown, shopt,
printf
printf, compopt, mapfile
exported functions
filename generation when using output redirection (command >a*)
POSIX.2-style globbing character classes
@ -743,7 +886,14 @@ Things bash has that sh does not:
debugger support, including `caller' builtin and new variables
RETURN trap
the `+=' assignment operator
autocd shell option and behavior
command-not-found hook with command_not_found_handle shell function
globstar shell option and `**' globbing behavior
|& synonym for `2>&1 |'
;& and ;;& case action list terminators
case-modifying word expansions and variable attributes
associative arrays
coprocesses using the `coproc' reserved word and variables
Things sh has that bash does not:
uses variable SHACCT to do shell accounting
@ -788,14 +938,14 @@ Things bash has or uses that ksh88 does not:
the ${!param*} prefix expansion operator
the ${param:offset[:length]} parameter substring operator
the ${param/pat[/string]} parameter pattern substitution operator
variables: BASH, BASH_VERSION, BASH_VERSINFO, UID, EUID, SHLVL,
variables: BASH, BASH_VERSION, BASH_VERSINFO, BASHPID, UID, EUID, SHLVL,
TIMEFORMAT, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE,
HISTFILESIZE, HISTIGNORE, HISTCONTROL, PROMPT_COMMAND,
IGNOREEOF, FIGNORE, INPUTRC, HOSTFILE, DIRSTACK,
PIPESTATUS, HOSTNAME, OPTERR, SHELLOPTS, GLOBIGNORE,
GROUPS, FUNCNAME, histchars, auto_resume
GROUPS, FUNCNAME, histchars, auto_resume, PROMPT_DIRTRIM
prompt expansion with backslash escapes and command substitution
redirection: &> (stdout and stderr), <<<, [n]<&word-, [n]>&word-
redirection: &> (stdout and stderr), <<<, [n]<&word-, [n]>&word-, >>&
more extensive and extensible editing and programmable completion
builtins: bind, builtin, command, declare, dirs, echo -e/-E, enable,
exec -l/-c/-a, fc -s, export -n/-f/-p, hash, help, history,
@ -805,7 +955,7 @@ Things bash has or uses that ksh88 does not:
-o notify/-o physical/-o posix/-o hashall/-o onecmd/
-h/-B/-C/-b/-H/-P, set +o, suspend, trap -l, type,
typeset -a/-F/-p, ulimit -i/-q/-u/-x, umask -S, alias -p,
shopt, disown, printf, complete, compgen
shopt, disown, printf, complete, compgen, compopt, mapfile
`!' csh-style history expansion
POSIX.2-style globbing character classes
POSIX.2-style globbing equivalence classes
@ -821,18 +971,26 @@ Things bash has or uses that ksh88 does not:
Timestamps in history entries
{x..y} brace expansion
The `+=' assignment operator
autocd shell option and behavior
command-not-found hook with command_not_found_handle shell function
globstar shell option and `**' globbing behavior
|& synonym for `2>&1 |'
;& and ;;& case action list terminators
case-modifying word expansions and variable attributes
associative arrays
coprocesses using the `coproc' reserved word and variables
Things ksh88 has or uses that bash does not:
tracked aliases (alias -t)
variables: ERRNO, FPATH, EDITOR, VISUAL
co-processes (|&, >&p, <&p)
co-processes (bash uses different syntax)
weirdly-scoped functions
typeset +f to list all function names without definitions
text of command history kept in a file, not memory
builtins: alias -x, cd old new, newgrp, print,
read -p/-s/var?prompt, set -A/-o gmacs/
-o bgnice/-o markdirs/-o trackall/-o viraw/-s,
typeset -H/-L/-R/-Z/-A/-ft/-fu/-fx/-l/-u/-t, whence
typeset -H/-L/-R/-Z/-A/-ft/-fu/-fx/-t, whence
using environment to pass attributes of exported variables
arithmetic evaluation done on arguments to some builtins
reads .profile from $PWD when invoked as login shell
@ -848,33 +1006,48 @@ Implementation differences:
C3) Which new features in ksh-93 are not in bash, and which are?
New things in ksh-93 not in bash-3.2:
associative arrays
This list is current through ksh93t (11/04/2008)
New things in ksh-93 not in bash-4.0:
floating point arithmetic and variables
math library functions
${!name[sub]} name of subscript for associative array
`.' is allowed in variable names to create a hierarchical namespace
more extensive compound assignment syntax
discipline functions
`sleep' and `getconf' builtins (bash has loadable versions)
typeset -n and `nameref' variables
KEYBD trap
variables: .sh.edchar, .sh.edmode, .sh.edcol, .sh.edtext, .sh.version,
.sh.name, .sh.subscript, .sh.value, .sh.match, HISTEDIT
backreferences in pattern matching (\N)
`&' operator in pattern lists for matching
`&' operator in pattern lists for matching (match all instead of any)
exit statuses between 0 and 255
FPATH and PATH mixing
lexical scoping for local variables in `ksh' functions
no scoping for local variables in `POSIX' functions
$'' \C[.collating-element.] escape sequence
-C/-I invocation options
print -f (bash uses printf)
`fc' has been renamed to `hist'
`.' can execute shell functions
exit statuses between 0 and 255
FPATH and PATH mixing
getopts -a
-I invocation option
printf %H, %P, %T, %Z modifiers, output base for %d
lexical scoping for local variables in `ksh' functions
no scoping for local variables in `POSIX' functions
printf %B, %H, %P, %R, %T, %Z modifiers, output base for %d, `=' flag
read -N (read -n differs, too)/-v
set -o showme/-o multiline (bash default)
`sleep' and `getconf' builtins (bash has loadable versions)
typeset -n and `nameref' variables
typeset -C/-S/-T/-X/-h/-s
experimental `type' definitions (a la typedef) using typeset
negative subscripts for indexed array variables
array expansions ${array[sub1..sub2]} and ${!array[sub1..sub2]}
associative array assignments using `;' as element separator
command substitution $(n<#) expands to current byte offset for fd N
new '${ ' form of command substitution, executed in current shell
new >;/<#pat/<##pat/<#/># redirections
redirection operators preceded with {varname} to store fd number in varname
brace expansion printf-like formats
New things in ksh-93 present in bash-3.2:
New things in ksh-93 present in bash-4.0:
associative arrays
[n]<&word- and [n]>&word- redirections (combination dup and close)
for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
?:, ++, --, `expr1 , expr2' arithmetic operators
@ -883,24 +1056,30 @@ New things in ksh-93 present in bash-3.2:
compound array assignment
the `!' reserved word
loadable builtins -- but ksh uses `builtin' while bash uses `enable'
`command', `builtin', `disown' builtins
new $'...' and $"..." quoting
FIGNORE (but bash uses GLOBIGNORE), HISTCMD
set -o notify/-C
brace expansion and set -B
changes to kill builtin
`command', `builtin', `disown' builtins
echo -e
exec -c/-a
read -A (bash uses read -a)
read -t/-d
trap -p
exec -c/-a
`.' restores the positional parameters when it completes
set -o notify/-C
set -o pipefail
set -G (-o globstar) and **
POSIX.2 `test'
umask -S
unalias -a
command and arithmetic substitution performed on PS1, PS4, and ENV
command name completion
command name completion, TAB displaying possible completions
ENV processed only for interactive shells
set -o pipefail
The `+=' assignment operator
the `;&' case statement "fallthrough" pattern list terminator
csh-style history expansion and set -H
negative offsets in ${param:offset:length}
Section D: Why does bash do some things differently than other Unix shells?
@ -1457,6 +1636,11 @@ when assigning the variable, then expand the values to a single string that
may contain whitespace. The first problem may be solved by using backslashes
or any other quoting mechanism to escape the white space in the patterns.
Bash-4.0 introduces the concept of a `compatibility level', controlled by
several options to the `shopt' builtin. If the `compat31' option is enabled,
bash reverts to the bash-3.1 behavior with respect to quoting the rhs of
the =~ operator.
Section F: Things to watch out for on certain Unix versions
F1) Why can't I use command line editing in my `cmdtool'?
@ -1847,9 +2031,7 @@ H3) What's coming in future versions?
These are features I hope to include in a future version of bash.
Rocky Bernstein's bash debugger (support is included with bash-3.0)
associative arrays
co-processes, but with a new-style syntax that looks like function declaration
Rocky Bernstein's bash debugger (support is included with bash-4.0)
H4) What's on the bash `wish list' for future versions?
@ -1867,9 +2049,9 @@ Some of the new ksh93 pattern matching operators, like backreferencing
H5) When will the next release appear?
The next version will appear sometime in 2007. Never make predictions.
The next version will appear sometime in 2009. Never make predictions.
This document is Copyright 1995-2006 by Chester Ramey.
This document is Copyright 1995-2009 by Chester Ramey.
Permission is hereby granted, without written agreement and
without license or royalty fees, to use, copy, and distribute

BIN
doc/article.pdf Normal file

Binary file not shown.

1418
doc/article.ps Normal file

File diff suppressed because it is too large Load diff

1111
doc/article.txt Normal file

File diff suppressed because it is too large Load diff

5217
doc/bash.0 Normal file

File diff suppressed because it is too large Load diff

View file

@ -5,12 +5,12 @@
.\" Case Western Reserve University
.\" chet@po.cwru.edu
.\"
.\" Last Change: Mon Dec 29 16:49:01 EST 2008
.\" Last Change: Sat Feb 7 20:50:40 EST 2009
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
.TH BASH 1 "2008 December 29" "GNU Bash-4.0"
.TH BASH 1 "2009 February 7" "GNU Bash-4.0"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@ -887,6 +887,9 @@ The format for a coprocess is:
.PP
This creates a coprocess named \fINAME\fP.
If \fINAME\fP is not supplied, the default name is \fICOPROC\fP.
\fINAME\fP must not be supplied if \fIcommand\fP is a \fIsimple
command\fP (see above); otherwise, it is interpreted as the first word
of the simple command.
When the coproc is executed, the shell creates an array variable (see
.B Arrays
below) named \fINAME\fP in the context of the executing shell.
@ -1361,7 +1364,7 @@ corresponding to each member of \fBFUNCNAME\fP.
file where \fB${FUNCNAME[\fP\fI$i\fP\fB]}\fP was called
(or \fB${BASH_LINENO[\fP\fI$i-1\fP\fB]}\fP if referenced within another
shell function).
The corresponding source file name is \fB${BASH_SOURCE[\fP\fI$i\fP\fB]}\fB.
The corresponding source file name is \fB${BASH_SOURCE[\fP\fI$i\fP\fB]}\fP.
Use \fBLINENO\fP to obtain the current line number.
.TP
.B BASH_REMATCH
@ -1457,7 +1460,7 @@ programmable completion facilities (see \fBProgrammable Completion\fP
below).
.TP
.B COMP_WORDBREAKS
The set of characters that the Readline library treats as word
The set of characters that the \fBreadline\fP library treats as word
separators when performing word completion.
If
.SM
@ -1468,8 +1471,8 @@ subsequently reset.
.B COMP_WORDS
An array variable (see \fBArrays\fP below) consisting of the individual
words in the current command line.
The words are split on shell metacharacters as the shell parser would
separate them.
The line is split into words as \fBreadline\fP would split it, using
\fBCOMP_WORDBREAKS\fP as described above.
This variable is available only in shell functions invoked by the
programmable completion facilities (see \fBProgrammable Completion\fP
below).
@ -2484,9 +2487,10 @@ introduce indirection.
.PP
In each of the cases below, \fIword\fP is subject to tilde expansion,
parameter expansion, command substitution, and arithmetic expansion.
When not performing substring expansion, \fBbash\fP tests for a parameter
that is unset or null; omitting the colon results in a test only for a
parameter that is unset.
.PP
When not performing substring expansion, using the forms documented below,
\fBbash\fP tests for a parameter that is unset or null. Omitting the colon
results in a test only for a parameter that is unset.
.PP
.PD 0
.TP
@ -2723,7 +2727,7 @@ to uppercase; the \fB,\fP operator converts matching uppercase letters
to lowercase.
The \fB^^\fP and \fB,,\fP expansions convert each matched character in the
expanded value; the \fB^\fP and \fB,\fP expansions match and convert only
the first character.
the first character in the expanded value..
If \fIpattern\fP is omitted, it is treated like a \fB?\fP, which matches
every character.
If
@ -3173,7 +3177,7 @@ ls 2\fB>&\fP1 \fB>\fP dirlist
.PP
directs only the standard output to file
.IR dirlist ,
because the standard error was duplicated as standard output
because the standard error was duplicated from the standard output
before the standard output was redirected to
.IR dirlist .
.PP
@ -5619,7 +5623,7 @@ variable is inserted at the beginning of the current line.
If a numeric argument is supplied, this command acts as a toggle: if
the characters at the beginning of the line do not match the value
of \fBcomment\-begin\fP, the value is inserted, otherwise
the characters in \fBcomment-begin\fP are deleted from the beginning of
the characters in \fBcomment\-begin\fP are deleted from the beginning of
the line.
In either case, the line is accepted as if a newline had been typed.
The default value of
@ -7636,6 +7640,10 @@ is supplied, or
Exit a login shell.
.TP
\fBmapfile\fP [\fB\-n\fP \fIcount\fP] [\fB\-O\fP \fIorigin\fP] [\fB\-s\fP \fIcount\fP] [\fB\-t\fP] [\fB\-u\fP \fIfd\fP] [\fB\-C\fP \fIcallback\fP] [\fB\-c\fP \fIquantum\fP] [\fIarray\fP]
.PD 0
.TP
\fBreadarray\fP [\fB\-n\fP \fIcount\fP] [\fB\-O\fP \fIorigin\fP] [\fB\-s\fP \fIcount\fP] [\fB\-t\fP] [\fB\-u\fP \fIfd\fP] [\fB\-C\fP \fIcallback\fP] [\fB\-c\fP \fIquantum\fP] [\fIarray\fP]
.PD
Read lines from the standard input into array variable
.IR array ,
or from file descriptor
@ -7685,6 +7693,10 @@ If
is specified without
.BR \-c ,
the default quantum is 5000.
When \fIcallback\fP is evaluated, it is supplied the index of the next
array element to be assigned as an additional argument.
\fIcallback\fP is evaluated after the line is read but before the
array element is assigned.
.PP
If not supplied with an explicit origin, \fBmapfile\fP will clear \fIarray\fP
before assigning to it.
@ -7837,7 +7849,7 @@ The return status is 0 unless an error occurs while
reading the name of the current directory or an
invalid option is supplied.
.TP
\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \fIdelim\fP] [\fB\-\fP \fItext\fP] [\fB\-n\fP \fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-u\fP \fIfd\fP] [\fIname\fP ...]
\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \fIdelim\fP] [\fB\-i\fP \fItext\fP] [\fB\-n\fP \fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-u\fP \fIfd\fP] [\fIname\fP ...]
One line is read from the standard input, or from the file descriptor
\fIfd\fP supplied as an argument to the \fB\-u\fP option, and the first word
is assigned to the first
@ -8021,7 +8033,10 @@ immediately, rather than before the next primary prompt. This is
effective only when job control is enabled.
.TP 8
.B \-e
Exit immediately if a \fIsimple command\fP (see
Exit immediately if a \fIpipeline\fP (which may consist of a single
\fIsimple command\fP), a \fIsubshell\fP command enclosed in parentheses,
or one of the commands executed as part of a command list enclosed
by braces (see
.SM
.B SHELL GRAMMAR
above) exits with a non-zero status.
@ -8031,21 +8046,25 @@ command that fails is part of the command list immediately following a
or
.B until
keyword,
part of the test in an
part of the test following the
.B if
statement, part of a command executed in a
or
.B elif
reserved words, part of any command executed in a
.B &&
or
.B \(bv\(bv
list,
list except the command following the final \fB&&\fP or \fB\(bv\(bv\fP,
any command in a pipeline but the last,
or if the command's return value is
being inverted via
being inverted with
.BR ! .
Failing simple commands that are part of shell functions or command lists
enclosed in braces or parentheses satisfying the above conditions do not
cause the shell to exit.
A trap on \fBERR\fP, if set, is executed before the shell exits.
This option applies to the shell environment and each subshell environment
separately (see
.B "COMMAND EXECUTION ENVIRONMENT"
above), and may cause
subshells to exit before executing all the commands in the subshell.
.TP 8
.B \-f
Disable pathname expansion.
@ -9037,7 +9056,7 @@ The maximum number of pending signals
The maximum size that may be locked into memory
.TP
.B \-m
The maximum resident set size
The maximum resident set size (many systems do not honor this limit)
.TP
.B \-n
The maximum number of open file descriptors (most systems do not
@ -9312,7 +9331,7 @@ bfox@gnu.org
.PP
Chet Ramey, Case Western Reserve University
.br
chet@po.cwru.edu
chet.ramey@case.edu
.SH BUG REPORTS
If you find a bug in
.B bash,

12166
doc/bash.html Normal file

File diff suppressed because it is too large Load diff

BIN
doc/bash.pdf Normal file

Binary file not shown.

7998
doc/bash.ps Normal file

File diff suppressed because it is too large Load diff

50
doc/bashbug.0 Normal file
View file

@ -0,0 +1,50 @@
BASHBUG(1) BASHBUG(1)
NNAAMMEE
bashbug - report a bug in bash
SSYYNNOOPPSSIISS
bbaasshhbbuugg [_-_-_v_e_r_s_i_o_n] [_-_-_h_e_l_p] [_e_m_a_i_l_-_a_d_d_r_e_s_s]
DDEESSCCRRIIPPTTIIOONN
bbaasshhbbuugg is a shell script to help the user compose and mail bug reports
concerning bash in a standard format. bbaasshhbbuugg invokes the editor spec-
ified by the environment variable EEDDIITTOORR on a temporary copy of the bug
report format outline. The user must fill in the appropriate fields and
exit the editor. bbaasshhbbuugg then mails the completed report to _b_u_g_-
_b_a_s_h_@_g_n_u_._o_r_g, or _e_m_a_i_l_-_a_d_d_r_e_s_s. If the report cannot be mailed, it is
saved in the file _d_e_a_d_._b_a_s_h_b_u_g in the invoking user's home directory.
The bug report format outline consists of several sections. The first
section provides information about the machine, operating system, the
bash version, and the compilation environment. The second section
should be filled in with a description of the bug. The third section
should be a description of how to reproduce the bug. The optional
fourth section is for a proposed fix. Fixes are encouraged.
EENNVVIIRROONNMMEENNTT
bbaasshhbbuugg will utilize the following environment variables if they exist:
EEDDIITTOORR Specifies the preferred editor. If EEDDIITTOORR is not set, bbaasshhbbuugg
defaults to eemmaaccss.
HHOOMMEE Directory in which the failed bug report is saved if the mail
fails.
TTMMPPDDIIRR Directory in which to create temporary files and directories.
SSEEEE AALLSSOO
_b_a_s_h(1)
AAUUTTHHOORRSS
Brian Fox, Free Software Foundation
bfox@gnu.org
Chet Ramey, Case Western Reserve University
chet@po.cwru.edu
GNU Bash-4.0 1998 July 30 BASHBUG(1)

284
doc/bashbug.ps Normal file
View file

@ -0,0 +1,284 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
%%CreationDate: Mon Nov 17 17:38:06 2008
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%DocumentSuppliedResources: procset grops 1.19 2
%%Pages: 1
%%PageOrder: Ascend
%%DocumentMedia: Default 595 842 0 () ()
%%Orientation: Portrait
%%EndComments
%%BeginDefaults
%%PageMedia: Default
%%EndDefaults
%%BeginProlog
%%BeginResource: procset grops 1.19 2
%!PS-Adobe-3.0 Resource-ProcSet
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/MANUAL{
statusdict begin/manualfeed true store end
}bind def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/Fr{
setrgbcolor fill
}bind def
/setcmykcolor where{
pop
/Fk{
setcmykcolor fill
}bind def
}if
/Fg{
setgray fill
}bind def
/FL/fill load def
/LW/setlinewidth load def
/Cr/setrgbcolor load def
/setcmykcolor where{
pop
/Ck/setcmykcolor load def
}if
/Cg/setgray load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
/setpagedevice{}def
}bind def
/PEND{
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%EndProlog
%%BeginSetup
%%BeginFeature: *PageSize Default
<< /PageSize [ 595 842 ] /ImagingBBox null >> setpagedevice
%%EndFeature
%%IncludeResource: font Times-Roman
%%IncludeResource: font Times-Bold
%%IncludeResource: font Times-Italic
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron
/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE
/Times-Roman@0 ENC0/Times-Roman RE
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SHB).35 E 347.52(UG\(1\) B)-.1 F
(ASHB)-.35 E(UG\(1\))-.1 E/F1 10.95/Times-Bold@0 SF -.219(NA)72 84 S(ME)
.219 E F0(bashb)108 96 Q(ug \255 report a b)-.2 E(ug in bash)-.2 E F1
(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF(bashb)108 124.8 Q(ug)-.2 E F0
([)2.5 E/F3 10/Times-Italic@0 SF(--ver)A(sion)-.1 E F0 2.5(][)C F3
(--help)-2.5 E F0 2.5(][)C F3(email-addr)-2.5 E(ess)-.37 E F0(])A F1
(DESCRIPTION)72 141.6 Q F2(bashb)108 153.6 Q(ug)-.2 E F0 .446
(is a shell script to help the user compose and mail b)2.947 F .446
(ug reports concerning bash in a standard for)-.2 F(-)-.2 E(mat.)108
165.6 Q F2(bashb)5.961 E(ug)-.2 E F0(in)3.461 E -.2(vo)-.4 G -.1(ke).2 G
3.461(st).1 G .962(he editor speci\214ed by the en)-3.461 F .962
(vironment v)-.4 F(ariable)-.25 E/F4 9/Times-Bold@0 SF(EDIT)3.462 E(OR)
-.162 E F0 .962(on a temporary cop)3.212 F 3.462(yo)-.1 G(f)-3.462 E
.374(the b)108 177.6 R .374(ug report format outline. The user must \
\214ll in the appropriate \214elds and e)-.2 F .374(xit the editor)-.15
F(.)-.55 E F2(bashb)5.373 E(ug)-.2 E F0(then)2.873 E 1.141
(mails the completed report to)108 189.6 R F3 -.2(bu)3.641 G
(g-bash@gnu.or).2 E(g)-.37 E F0 3.641(,o)C(r)-3.641 E F3(email-addr)
3.641 E(ess)-.37 E F0 6.141(.I)C 3.641(ft)-6.141 G 1.142
(he report cannot be mailed, it is)-3.641 F(sa)108 201.6 Q -.15(ve)-.2 G
2.5(di).15 G 2.5(nt)-2.5 G(he \214le)-2.5 E F3(dead.bashb)2.5 E(ug)-.2 E
F0(in the in)2.5 E -.2(vo)-.4 G(king user').2 E 2.5(sh)-.55 G
(ome directory)-2.5 E(.)-.65 E .354(The b)108 218.4 R .354
(ug report format outline consists of se)-.2 F -.15(ve)-.25 G .353
(ral sections.).15 F .353(The \214rst section pro)5.353 F .353
(vides information about the)-.15 F .37
(machine, operating system, the bash v)108 230.4 R .371
(ersion, and the compilation en)-.15 F 2.871(vironment. The)-.4 F .371
(second section should)2.871 F .209
(be \214lled in with a description of the b)108 242.4 R 2.709(ug. The)
-.2 F .208(third section should be a description of ho)2.709 F 2.708(wt)
-.25 G 2.708(or)-2.708 G .208(eproduce the)-2.708 F -.2(bu)108 254.4 S
2.5(g. The).2 F(optional fourth section is for a proposed \214x.)2.5 E
(Fix)5 E(es are encouraged.)-.15 E F1(ENVIR)72 271.2 Q(ONMENT)-.329 E F2
(bashb)108 283.2 Q(ug)-.2 E F0(will utilize the follo)2.5 E(wing en)-.25
E(vironment v)-.4 E(ariables if the)-.25 E 2.5(ye)-.15 G(xist:)-2.65 E
F2(EDIT)108 300 Q(OR)-.18 E F0(Speci\214es the preferred editor)144 312
Q 2.5(.I)-.55 G(f)-2.5 E F4(EDIT)2.5 E(OR)-.162 E F0(is not set,)2.25 E
F2(bashb)2.5 E(ug)-.2 E F0(def)2.5 E(aults to)-.1 E F2(emacs)2.5 E F0(.)
A F2(HOME)108 328.8 Q F0(Directory in which the f)144 340.8 Q(ailed b)
-.1 E(ug report is sa)-.2 E -.15(ve)-.2 G 2.5(di).15 G 2.5(ft)-2.5 G
(he mail f)-2.5 E(ails.)-.1 E F2(TMPDIR)108 357.6 Q F0
(Directory in which to create temporary \214les and directories.)144
369.6 Q F1(SEE ALSO)72 386.4 Q F3(bash)108 398.4 Q F0(\(1\))A F1 -.548
(AU)72 415.2 S(THORS).548 E F0(Brian F)108 427.2 Q(ox, Free Softw)-.15 E
(are F)-.1 E(oundation)-.15 E(bfox@gnu.or)108 439.2 Q(g)-.18 E
(Chet Rame)108 456 Q 1.3 -.65(y, C)-.15 H(ase W).65 E(estern Reserv)-.8
E 2.5(eU)-.15 G(ni)-2.5 E -.15(ve)-.25 G(rsity).15 E(chet@po.cwru.edu)
108 468 Q(GNU Bash-4.0)72 768 Q(1998 July 30)148.175 E(1)203.165 E 0 Cg
EP
%%Trailer
end
%%EOF

BIN
doc/bashref.dvi Normal file

Binary file not shown.

15955
doc/bashref.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -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

BIN
doc/bashref.pdf Normal file

Binary file not shown.

16205
doc/bashref.ps Normal file

File diff suppressed because it is too large Load diff

View file

@ -1095,6 +1095,9 @@ The format for a coprocess is:
@noindent
This creates a coprocess named @var{NAME}.
If @var{NAME} is not supplied, the default name is @var{COPROC}.
@var{NAME} must not be supplied if @var{command} is a simple
command (@pxref{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
(@pxref{Arrays})
@ -1614,11 +1617,12 @@ introduce indirection.
In each of the cases below, @var{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 @var{parameter}'s existence and that its value
is not null; if the colon is omitted, the operator tests only for existence.
@table @code
@ -1769,7 +1773,7 @@ to uppercase; the @samp{,} operator converts matching uppercase letters
to lowercase.
The @samp{^^} and @samp{,,} expansions convert each matched character in the
expanded value; the @samp{^} and @samp{,} expansions match and convert only
the first character.
the first character in the expanded value.
If @var{pattern} is omitted, it is treated like a @samp{?}, which matches
every character.
If @var{parameter} is @samp{@@} or @samp{*},
@ -2106,7 +2110,7 @@ ls 2>&1 > @var{dirlist}
@end example
@noindent
directs only the standard output to file @var{dirlist},
because the standard error was duplicated as standard output
because the standard error was made a copy of the standard output
before the standard output was redirected to @var{dirlist}.
Bash handles several filenames specially when they are used in
@ -3169,7 +3173,7 @@ is executed whenever a simple command has a non-zero exit status,
subject to the following conditions.
The @code{ERR} trap is not executed if the failed command is part of the
command list immediately following an @code{until} or @code{while} keyword,
part of the test in an @code{if} statement,
part of the test following the @code{if} or @code{elif} reserved words,
part of a command executed in a @code{&&} or @code{||} list,
or if the command's return
status is being inverted using @code{!}.
@ -3648,6 +3652,10 @@ Specify the number of lines read between each call to @var{callback}.
If @option{-C} is specified without @option{-c},
the default quantum is 5000.
When @var{callback} is evaluated, it is supplied the index of the next
array element to be assigned as an additional argument.
@var{callback} is evaluated after the line is read but before the
array element is assigned.
If not supplied with an explicit origin, @code{mapfile} will clear @var{array}
before assigning to it.
@ -3765,6 +3773,18 @@ Read input from file descriptor @var{fd}.
@end table
@item readarray
@btindex readarray
@example
readarray [-n @var{count}] [-O @var{origin}] [-s @var{count}] [-t] [-u @var{fd}] [
-C @var{callback}] [-c @var{quantum}] [@var{array}]
@end example
Read lines from the standard input into array variable @var{array},
or from file descriptor @var{fd}
if the @option{-u} option is supplied.
A synonym for @code{mapfile}.
@item source
@btindex source
@example
@ -3858,10 +3878,11 @@ The maximum number of pending signals.
The maximum size that may be locked into memory.
@item -m
The maximum resident set size.
The maximum resident set size (many systems do not honor this limit).
@item -n
The maximum number of open file descriptors.
The maximum number of open file descriptors (most systems do not
allow this value to be set).
@item -p
The pipe buffer size.
@ -3966,18 +3987,25 @@ Cause the status of terminated background jobs to be reported
immediately, rather than before printing the next primary prompt.
@item -e
Exit immediately if a simple command (@pxref{Simple Commands}) exits
with a non-zero status, unless the command that fails is part of the
Exit immediately if a pipeline (@pxref{Pipelines}), which may consist
of a single simple command (@pxref{Simple Commands}),
a subshell command enclosed in parentheses (@pxref{Command Grouping}),
or one of the commands executed as part of a command list enclosed
by braces (@pxref{Command Grouping})
returns a non-zero status.
The shell does not exit if the command that fails is part of the
command list immediately following a @code{while} or @code{until} keyword,
part of the test in an @code{if} statement,
part of a command executed in a @code{&&} or @code{||b} list,
part of any command executed in a @code{&&} or @code{||} list except
the command following the final @code{&&} or @code{||},
any command in a pipeline but the last,
or if the command's return status is being inverted using @code{!}.
Failing simple commands that are part of shell functions or command lists
enclosed in braces or parentheses satisfying the above conditions do not
cause the shell to exit.
or if the command's return status is being inverted with @code{!}.
A trap on @code{ERR}, if set, is executed before the shell exits.
This option applies to the shell environment and each subshell environment
separately (@pxref{Command Execution Environment}), and may cause
subshells to exit before executing all the commands in the subshell.
@item -f
Disable file name generation (globbing).
@ -4773,8 +4801,8 @@ even if it is subsequently reset.
@item COMP_WORDS
An array variable consisting of the individual
words in the current command line.
The words are split on shell metacharacters as the shell parser would
separate them.
The line is split into words as Readline would split it, using
@code{COMP_WORDBREAKS} as described above.
This variable is available only in shell functions invoked by the
programmable completion facilities (@pxref{Programmable Completion}).
@ -7318,7 +7346,7 @@ to reproduce it.
the template it provides for filing a bug report.
Please send all reports concerning this manual to
@email{chet@@po.CWRU.Edu}.
@email{chet.ramey@@case.edu}.
@node Major Differences From The Bourne Shell
@appendix Major Differences From The Bourne Shell

1534
doc/builtins.0 Normal file

File diff suppressed because it is too large Load diff

2567
doc/builtins.ps Normal file

File diff suppressed because it is too large Load diff

59
doc/rbash.0 Normal file
View file

@ -0,0 +1,59 @@
RBASH(1) RBASH(1)
NNAAMMEE
rbash - restricted bash, see bbaasshh(1)
RREESSTTRRIICCTTEEDD SSHHEELLLL
If bbaasshh is started with the name rrbbaasshh, or the --rr option is supplied at
invocation, the shell becomes restricted. A restricted shell is used
to set up an environment more controlled than the standard shell. It
behaves identically to bbaasshh with the exception that the following are
disallowed or not performed:
+o changing directories with ccdd
+o setting or unsetting the values of SSHHEELLLL, PPAATTHH, EENNVV, or BBAASSHH__EENNVV
+o specifying command names containing //
+o specifying a file name containing a // as an argument to the ..
builtin command
+o Specifying a filename containing a slash as an argument to the
--pp option to the hhaasshh builtin command
+o importing function definitions from the shell environment at
startup
+o parsing the value of SSHHEELLLLOOPPTTSS from the shell environment at
startup
+o redirecting output using the >, >|, <>, >&, &>, and >> redirect-
ion operators
+o using the eexxeecc builtin command to replace the shell with another
command
+o adding or deleting builtin commands with the --ff and --dd options
to the eennaabbllee builtin command
+o Using the eennaabbllee builtin command to enable disabled shell
builtins
+o specifying the --pp option to the ccoommmmaanndd builtin command
+o turning off restricted mode with sseett ++rr or sseett ++oo rreessttrriicctteedd.
These restrictions are enforced after any startup files are read.
When a command that is found to be a shell script is executed, rrbbaasshh
turns off any restrictions in the shell spawned to execute the script.
SSEEEE AALLSSOO
bash(1)
GNU Bash-4.0 2004 Apr 20 RBASH(1)

279
doc/rbash.ps Normal file
View file

@ -0,0 +1,279 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.19.2
%%CreationDate: Thu Feb 5 08:05:28 2009
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%DocumentSuppliedResources: procset grops 1.19 2
%%Pages: 1
%%PageOrder: Ascend
%%DocumentMedia: Default 595 842 0 () ()
%%Orientation: Portrait
%%EndComments
%%BeginDefaults
%%PageMedia: Default
%%EndDefaults
%%BeginProlog
%%BeginResource: procset grops 1.19 2
%!PS-Adobe-3.0 Resource-ProcSet
/setpacking where{
pop
currentpacking
true setpacking
}if
/grops 120 dict dup begin
/SC 32 def
/A/show load def
/B{0 SC 3 -1 roll widthshow}bind def
/C{0 exch ashow}bind def
/D{0 exch 0 SC 5 2 roll awidthshow}bind def
/E{0 rmoveto show}bind def
/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
/G{0 rmoveto 0 exch ashow}bind def
/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/I{0 exch rmoveto show}bind def
/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
/K{0 exch rmoveto 0 exch ashow}bind def
/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/M{rmoveto show}bind def
/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
/O{rmoveto 0 exch ashow}bind def
/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/Q{moveto show}bind def
/R{moveto 0 SC 3 -1 roll widthshow}bind def
/S{moveto 0 exch ashow}bind def
/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
/SF{
findfont exch
[exch dup 0 exch 0 exch neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/MF{
findfont
[5 2 roll
0 3 1 roll
neg 0 0]makefont
dup setfont
[exch/setfont cvx]cvx bind def
}bind def
/level0 0 def
/RES 0 def
/PL 0 def
/LS 0 def
/MANUAL{
statusdict begin/manualfeed true store end
}bind def
/PLG{
gsave newpath clippath pathbbox grestore
exch pop add exch pop
}bind def
/BP{
/level0 save def
1 setlinecap
1 setlinejoin
72 RES div dup scale
LS{
90 rotate
}{
0 PL translate
}ifelse
1 -1 scale
}bind def
/EP{
level0 restore
showpage
}def
/DA{
newpath arcn stroke
}bind def
/SN{
transform
.25 sub exch .25 sub exch
round .25 add exch round .25 add exch
itransform
}bind def
/DL{
SN
moveto
SN
lineto stroke
}bind def
/DC{
newpath 0 360 arc closepath
}bind def
/TM matrix def
/DE{
TM currentmatrix pop
translate scale newpath 0 0 .5 0 360 arc closepath
TM setmatrix
}bind def
/RC/rcurveto load def
/RL/rlineto load def
/ST/stroke load def
/MT/moveto load def
/CL/closepath load def
/Fr{
setrgbcolor fill
}bind def
/setcmykcolor where{
pop
/Fk{
setcmykcolor fill
}bind def
}if
/Fg{
setgray fill
}bind def
/FL/fill load def
/LW/setlinewidth load def
/Cr/setrgbcolor load def
/setcmykcolor where{
pop
/Ck/setcmykcolor load def
}if
/Cg/setgray load def
/RE{
findfont
dup maxlength 1 index/FontName known not{1 add}if dict begin
{
1 index/FID ne{def}{pop pop}ifelse
}forall
/Encoding exch def
dup/FontName exch def
currentdict end definefont pop
}bind def
/DEFS 0 def
/EBEGIN{
moveto
DEFS begin
}bind def
/EEND/end load def
/CNT 0 def
/level1 0 def
/PBEGIN{
/level1 save def
translate
div 3 1 roll div exch scale
neg exch neg exch translate
0 setgray
0 setlinecap
1 setlinewidth
0 setlinejoin
10 setmiterlimit
[]0 setdash
/setstrokeadjust where{
pop
false setstrokeadjust
}if
/setoverprint where{
pop
false setoverprint
}if
newpath
/CNT countdictstack def
userdict begin
/showpage{}def
/setpagedevice{}def
}bind def
/PEND{
countdictstack CNT sub{end}repeat
level1 restore
}bind def
end def
/setpacking where{
pop
setpacking
}if
%%EndResource
%%EndProlog
%%BeginSetup
%%BeginFeature: *PageSize Default
<< /PageSize [ 595 842 ] /ImagingBBox null >> setpagedevice
%%EndFeature
%%IncludeResource: font Times-Roman
%%IncludeResource: font Times-Bold
grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron
/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(RB)72 48 Q 376.2(ASH\(1\) RB)-.35 F(ASH\(1\))
-.35 E/F1 10.95/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0
(rbash \255 restricted bash, see)108 96 Q/F2 10/Times-Bold@0 SF(bash)2.5
E F0(\(1\))A F1(RESTRICTED SHELL)72 112.8 Q F0(If)108 124.8 Q F2(bash)
4.397 E F0 1.897(is started with the name)4.397 F F2(rbash)4.397 E F0
4.397(,o)C 4.397(rt)-4.397 G(he)-4.397 E F2<ad72>4.397 E F0 1.896
(option is supplied at in)4.397 F -.2(vo)-.4 G 1.896
(cation, the shell becomes).2 F 3.445(restricted. A)108 136.8 R .945
(restricted shell is used to set up an en)3.445 F .946
(vironment more controlled than the standard shell.)-.4 F(It)5.946 E
(beha)108 148.8 Q -.15(ve)-.2 G 2.5(si).15 G(dentically to)-2.5 E F2
(bash)2.5 E F0(with the e)2.5 E(xception that the follo)-.15 E
(wing are disallo)-.25 E(wed or not performed:)-.25 E 32.5<8363>108
165.6 S(hanging directories with)-32.5 E F2(cd)2.5 E F0 32.5<8373>108
182.4 S(etting or unsetting the v)-32.5 E(alues of)-.25 E F2(SHELL)2.5 E
F0(,)A F2 -.74(PA)2.5 G(TH)-.21 E F0(,)A F2(ENV)2.5 E F0 2.5(,o)C(r)-2.5
E F2 -.3(BA)2.5 G(SH_ENV).3 E F0 32.5<8373>108 199.2 S
(pecifying command names containing)-32.5 E F2(/)2.5 E F0 32.5<8373>108
216 S(pecifying a \214le name containing a)-32.5 E F2(/)2.5 E F0
(as an ar)2.5 E(gument to the)-.18 E F2(.)2.5 E F0 -.2(bu)5 G
(iltin command).2 E 32.5<8353>108 232.8 S .351
(pecifying a \214lename containing a slash as an ar)-32.5 F .351
(gument to the)-.18 F F2<ad70>2.851 E F0 .351(option to the)2.851 F F2
(hash)2.851 E F0 -.2(bu)2.851 G .351(iltin com-).2 F(mand)144 244.8 Q
32.5<8369>108 261.6 S(mporting function de\214nitions from the shell en)
-32.5 E(vironment at startup)-.4 E 32.5<8370>108 278.4 S(arsing the v)
-32.5 E(alue of)-.25 E F2(SHELLOPTS)2.5 E F0(from the shell en)2.5 E
(vironment at startup)-.4 E 32.5<8372>108 295.2 S(edirecting output usi\
ng the >, >|, <>, >&, &>, and >> redirection operators)-32.5 E 32.5
<8375>108 312 S(sing the)-32.5 E F2(exec)2.5 E F0 -.2(bu)2.5 G
(iltin command to replace the shell with another command).2 E 32.5<8361>
108 328.8 S(dding or deleting b)-32.5 E(uiltin commands with the)-.2 E
F2<ad66>2.5 E F0(and)2.5 E F2<ad64>2.5 E F0(options to the)2.5 E F2
(enable)2.5 E F0 -.2(bu)2.5 G(iltin command).2 E 32.5<8355>108 345.6 S
(sing the)-32.5 E F2(enable)2.5 E F0 -.2(bu)2.5 G
(iltin command to enable disabled shell b).2 E(uiltins)-.2 E 32.5<8373>
108 362.4 S(pecifying the)-32.5 E F2<ad70>2.5 E F0(option to the)2.5 E
F2(command)2.5 E F0 -.2(bu)2.5 G(iltin command).2 E 32.5<8374>108 379.2
S(urning of)-32.5 E 2.5(fr)-.25 G(estricted mode with)-2.5 E F2(set +r)
2.5 E F0(or)2.5 E F2(set +o r)2.5 E(estricted)-.18 E F0(.)A
(These restrictions are enforced after an)108 396 Q 2.5(ys)-.15 G
(tartup \214les are read.)-2.5 E .429
(When a command that is found to be a shell script is e)108 412.8 R -.15
(xe)-.15 G(cuted,).15 E F2(rbash)2.929 E F0 .429(turns of)2.929 F 2.929
(fa)-.25 G .729 -.15(ny r)-2.929 H .429(estrictions in the shell).15 F
(spa)108 424.8 Q(wned to e)-.15 E -.15(xe)-.15 G(cute the script.).15 E
F1(SEE ALSO)72 441.6 Q F0(bash\(1\))108 453.6 Q(GNU Bash-4.0)72 768 Q
(2004 Apr 20)148.735 E(1)203.725 E 0 Cg EP
%%Trailer
end
%%EOF

BIN
doc/rose94.pdf Normal file

Binary file not shown.

1581
doc/rose94.ps Normal file

File diff suppressed because it is too large Load diff

View file

@ -2,9 +2,9 @@
Copyright (C) 1988-2009 Free Software Foundation, Inc.
@end ignore
@set LASTCHANGE Mon Dec 29 16:48:40 EST 2008
@set LASTCHANGE Fri Feb 13 18:29:03 EST 2009
@set EDITION 4.0
@set VERSION 4.0
@set UPDATED 29 December 2008
@set UPDATED-MONTH December 2008
@set UPDATED 13 February 2009
@set UPDATED-MONTH February 2009