diff -u bash-4.2.is/doc/bashref.texi bash-4.2.new/doc/bashref.texi --- bash-4.2.is/doc/bashref.texi 2011-09-11 10:50:03.000000000 +0200 +++ bash-4.2.new/doc/bashref.texi 2011-09-11 11:10:58.000000000 +0200 @@ -1692,7 +1692,6 @@ @item ~-@var{N} The string that would be displayed by @samp{dirs -@var{N}} - @end table @node Shell Parameter Expansion @@ -1906,7 +1905,6 @@ is an array variable subscripted with @samp{@@} or @samp{*}, the case modification operation is applied to each member of the array in turn, and the expansion is the resultant list. - @end table @node Command Substitution @@ -2269,7 +2267,6 @@ If @var{host} is a valid hostname or Internet address, and @var{port} is an integer port number or service name, Bash attempts to open a UDP connection to the corresponding socket. - @end table A failure to open or create a file causes the redirection to fail. @@ -2880,7 +2877,7 @@ Builtin commands are necessary to implement functionality impossible or inconvenient to obtain with separate utilities. -This section briefly describes the builtins which Bash inherits from +This chapter briefly describes the builtins which Bash inherited from the Bourne Shell, as well as the builtin commands which are unique to or have been extended in Bash. @@ -2917,6 +2914,7 @@ @example : [@var{arguments}] @end example + Do nothing beyond expanding @var{arguments} and performing redirections. The return status is zero. @@ -2925,6 +2923,7 @@ @example . @var{filename} [@var{arguments}] @end example + Read and execute commands from the @var{filename} argument in the current shell context. If @var{filename} does not contain a slash, the @env{PATH} variable is used to find @var{filename}. @@ -2943,6 +2942,7 @@ @example break [@var{n}] @end example + Exit from a @code{for}, @code{while}, @code{until}, or @code{select} loop. If @var{n} is supplied, the @var{n}th enclosing loop is exited. @var{n} must be greater than or equal to 1. @@ -2953,6 +2953,7 @@ @example cd [-L|[-P [-e]]] [@var{directory}] @end example + Change the current working directory to @var{directory}. If @var{directory} is not given, the value of the @env{HOME} shell variable is used. @@ -2980,6 +2981,7 @@ @example continue [@var{n}] @end example + Resume the next iteration of an enclosing @code{for}, @code{while}, @code{until}, or @code{select} loop. If @var{n} is supplied, the execution of the @var{n}th enclosing loop @@ -2992,6 +2994,7 @@ @example eval [@var{arguments}] @end example + The arguments are concatenated together into a single command, which is then read and executed, and its exit status returned as the exit status of @code{eval}. @@ -3003,6 +3006,7 @@ @example exec [-cl] [-a @var{name}] [@var{command} [@var{arguments}]] @end example + If @var{command} is supplied, it replaces the shell without creating a new process. If the @option{-l} option is supplied, the shell places a dash at the @@ -3021,6 +3025,7 @@ @example exit [@var{n}] @end example + Exit the shell, returning a status of @var{n} to the shell's parent. If @var{n} is omitted, the exit status is that of the last command executed. Any trap on @code{EXIT} is executed before the shell terminates. @@ -3030,6 +3035,7 @@ @example export [-fn] [-p] [@var{name}[=@var{value}]] @end example + Mark each @var{name} to be passed to child processes in the environment. If the @option{-f} option is supplied, the @var{name}s refer to shell functions; otherwise the names refer to shell variables. @@ -3049,6 +3055,7 @@ @example getopts @var{optstring} @var{name} [@var{args}] @end example + @code{getopts} is used by shell scripts to parse positional parameters. @var{optstring} contains the option characters to be recognized; if a character is followed by a colon, the option is expected to have an @@ -3103,6 +3110,7 @@ @example hash [-r] [-p @var{filename}] [-dt] [@var{name}] @end example + Each time @code{hash} is invoked, it remembers the full pathnames of the commands specified as @var{name} arguments, so they need not be searched for on subsequent invocations. @@ -3130,6 +3138,7 @@ @example pwd [-LP] @end example + Print the absolute pathname of the current working directory. If the @option{-P} option is supplied, the pathname printed will not contain symbolic links. @@ -3144,6 +3153,7 @@ @example readonly [-aAf] [-p] [@var{name}[=@var{value}]] @dots{} @end example + Mark each @var{name} as readonly. The values of these names may not be changed by subsequent assignment. If the @option{-f} option is supplied, each @var{name} refers to a shell @@ -3169,6 +3179,7 @@ @example return [@var{n}] @end example + Cause a shell function to exit with the return value @var{n}. If @var{n} is not supplied, the return value is the exit status of the last command executed in the function. @@ -3186,6 +3197,7 @@ @example shift [@var{n}] @end example + Shift the positional parameters to the left by @var{n}. The positional parameters from @var{n}+1 @dots{} @code{$#} are renamed to @code{$1} @dots{} @code{$#}-@var{n}. @@ -3205,6 +3217,7 @@ @example test @var{expr} @end example + Evaluate a conditional expression @var{expr}. Each operator and operand must be a separate argument. Expressions are composed of the primaries described below in @@ -3288,6 +3301,7 @@ @example times @end example + Print out the user and system times used by the shell and its children. The return status is zero. @@ -3296,6 +3310,7 @@ @example trap [-lp] [@var{arg}] [@var{sigspec} @dots{}] @end example + The commands in @var{arg} are to be read and executed when the shell receives signal @var{sigspec}. If @var{arg} is absent (and there is a single @var{sigspec}) or @@ -3350,6 +3365,7 @@ @example umask [-p] [-S] [@var{mode}] @end example + Set the shell process's file creation mask to @var{mode}. If @var{mode} begins with a digit, it is interpreted as an octal number; if not, it is interpreted as a symbolic mode mask similar @@ -3371,6 +3387,7 @@ @example unset [-fv] [@var{name}] @end example + Each variable or function @var{name} is removed. If no options are supplied, or the @option{-v} option is given, each @var{name} refers to a shell variable. @@ -3499,6 +3516,7 @@ @example builtin [@var{shell-builtin} [@var{args}]] @end example + Run a shell builtin, passing it @var{args}, and return its exit status. This is useful when defining a shell function with the same name as a shell builtin, retaining the functionality of the builtin within @@ -3511,6 +3529,7 @@ @example caller [@var{expr}] @end example + Returns the context of any active subroutine call (a shell function or a script executed with the @code{.} or @code{source} builtins). @@ -3531,6 +3550,7 @@ @example command [-pVv] @var{command} [@var{arguments} @dots{}] @end example + Runs @var{command} with @var{arguments} ignoring any shell function named @var{command}. Only shell builtin commands or commands found by searching the @@ -3650,6 +3670,7 @@ @example echo [-neE] [@var{arg} @dots{}] @end example + Output the @var{arg}s, separated by spaces, terminated with a newline. The return status is always 0. @@ -3705,6 +3726,7 @@ @example enable [-a] [-dnps] [-f @var{filename}] [@var{name} @dots{}] @end example + Enable and disable builtin shell commands. Disabling a builtin allows a disk command which has the same name as a shell builtin to be executed without specifying a full pathname, @@ -3737,6 +3759,7 @@ @example help [-dms] [@var{pattern}] @end example + Display helpful information about builtin commands. If @var{pattern} is specified, @code{help} gives detailed help on all commands matching @var{pattern}, otherwise a list of @@ -3760,6 +3783,7 @@ @example let @var{expression} [@var{expression} @dots{}] @end example + The @code{let} builtin allows arithmetic to be performed on shell variables. Each @var{expression} is evaluated according to the rules given below in @ref{Shell Arithmetic}. If the @@ -3771,6 +3795,7 @@ @example local [@var{option}] @var{name}[=@var{value}] @dots{} @end example + For each argument, a local variable named @var{name} is created, and assigned @var{value}. The @var{option} can be any of the options accepted by @code{declare}. @@ -3785,6 +3810,7 @@ @example logout [@var{n}] @end example + Exit a login shell, returning a status of @var{n} to the shell's parent. @@ -3794,6 +3820,7 @@ mapfile [-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 the indexed array variable @var{array}, or from file descriptor @var{fd} if the @option{-u} option is supplied. @@ -3840,6 +3867,7 @@ @example printf [-v @var{var}] @var{format} [@var{arguments}] @end example + Write the formatted @var{arguments} to the standard output under the control of the @var{format}. The @option{-v} option causes the output to be assigned to the variable @@ -3889,6 +3917,7 @@ read [-ers] [-a @var{aname}] [-d @var{delim}] [-i @var{text}] [-n @var{nchars}] [-N @var{nchars}] [-p @var{prompt}] [-t @var{timeout}] [-u @var{fd}] [@var{name} @dots{}] @end example + One line is read from the standard input, or from the file descriptor @var{fd} supplied as an argument to the @option{-u} option, and the first word is assigned to the first @var{name}, the second word to the second @var{name}, @@ -3978,6 +4007,7 @@ 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 the indexed array variable @var{array}, or from file descriptor @var{fd} if the @option{-u} option is supplied. @@ -3989,6 +4019,7 @@ @example source @var{filename} @end example + A synonym for @code{.} (@pxref{Bourne Shell Builtins}). @item type @@ -3996,6 +4027,7 @@ @example type [-afptP] [@var{name} @dots{}] @end example + For each @var{name}, indicate how it would be interpreted if used as a command name. @@ -4033,6 +4065,7 @@ @example typeset [-aAfFgilrtux] [-p] [@var{name}[=@var{value}] @dots{}] @end example + A deprecated synonym of the @code{declare} builtin command. It is supplied for compatibility with the Korn shell. @@ -4041,6 +4074,7 @@ @example ulimit [-abcdefilmnpqrstuvxHST] [@var{limit}] @end example + @code{ulimit} provides control over the resources available to processes started by the shell, on systems that allow such control. If an option is given, it is interpreted as follows: @@ -4436,6 +4470,7 @@ @example shopt [-pqsu] [-o] [@var{optname} @dots{}] @end example + Toggle the values of variables controlling optional shell behavior. With no options, or with the @option{-p} option, a list of all settable options is displayed, with an indication of whether or not each is set. @@ -4732,7 +4767,6 @@ @item xpg_echo If set, the @code{echo} builtin expands backslash-escape sequences by default. - @end table @noindent @@ -4740,7 +4774,6 @@ are enabled, non-zero otherwise. When setting or unsetting options, the return status is zero unless an @var{optname} is not a valid shell option. - @end table @node Special Builtins @@ -4982,7 +5015,6 @@ @item BASH_VERSINFO[5] The value of @env{MACHTYPE}. - @end table @item BASH_VERSION @@ -5482,7 +5514,7 @@ @node Bash Features @chapter Bash Features -This section describes features unique to Bash. +This chapter describes features unique to Bash. @menu * Invoking Bash:: Command line options that you can give @@ -5574,7 +5606,6 @@ @item --version Show version information for this instance of Bash on the standard output and exit successfully. - @end table There are several single-character options that may be supplied at @@ -5632,7 +5663,6 @@ A @code{--} signals the end of options and disables further option processing. Any arguments after the @code{--} are treated as filenames and arguments. - @end table @cindex login shell @@ -6067,7 +6097,6 @@ greater than, or greater than or equal to @var{arg2}, respectively. @var{Arg1} and @var{arg2} may be positive or negative integers. - @end table @node Shell Arithmetic @@ -6380,6 +6409,7 @@ @example dirs [+@var{N} | -@var{N}] [-clpv] @end example + Display the list of currently remembered directories. Directories are added to the list with the @code{pushd} command; the @code{popd} command removes directories from the list. @@ -6457,7 +6487,6 @@ executes the equivalent of `@code{cd} @var{dir}'. @code{cd}s to @var{dir}. @end table - @end table @node Printing a Prompt @@ -6984,6 +7013,7 @@ @example bg [@var{jobspec} @dots{}] @end example + Resume each suspended job @var{jobspec} in the background, as if it had been started with @samp{&}. If @var{jobspec} is not supplied, the current job is used. @@ -6997,6 +7027,7 @@ @example fg [@var{jobspec}] @end example + Resume the job @var{jobspec} in the foreground and make it the current job. If @var{jobspec} is not supplied, the current job is used. The return status is that of the command placed into the foreground, @@ -7048,6 +7079,7 @@ kill [-s @var{sigspec}] [-n @var{signum}] [-@var{sigspec}] @var{jobspec} or @var{pid} kill -l [@var{exit_status}] @end example + Send a signal specified by @var{sigspec} or @var{signum} to the process named by job specification @var{jobspec} or process @sc{id} @var{pid}. @var{sigspec} is either a case-insensitive signal name such as @@ -7066,8 +7098,9 @@ @item wait @btindex wait @example -wait [@var{jobspec} or @var{pid} ...] +wait [@var{jobspec} or @var{pid} @dots{}] @end example + Wait until the child process specified by each process @sc{id} @var{pid} or job specification @var{jobspec} exits and return the exit status of the last command waited for. @@ -7082,6 +7115,7 @@ @example disown [-ar] [-h] [@var{jobspec} @dots{}] @end example + Without options, each @var{jobspec} is removed from the table of active jobs. If the @option{-h} option is given, the job is not removed from the table, @@ -7098,11 +7132,11 @@ @example suspend [-f] @end example + Suspend the execution of this shell until it receives a @code{SIGCONT} signal. A login shell cannot be suspended; the @option{-f} option can be used to override this and force the suspension. - @end table When job control is not active, the @code{kill} and @code{wait} @@ -7625,7 +7659,6 @@ the Single Unix Specification, version 3. @xref{Bash Builtins}, for a description of the escape sequences that @code{echo} recognizes. - @end table The file @file{config-top.h} contains C Preprocessor