*** ../bash-20080221/doc/bashref.texi 2008-02-22 21:44:51.000000000 -0500 --- doc/bashref.texi 2008-04-25 12:32:42.000000000 -0400 *************** *** 681,688 **** waits for each command to terminate in turn. The return status is the exit status of the last command executed. ! The control operators @samp{&&} and @samp{||} ! denote @sc{and} lists and @sc{or} lists, respectively. An @sc{and} list has the form @example @var{command1} && @var{command2} --- 681,691 ---- waits for each command to terminate in turn. The return status is the exit status of the last command executed. ! @sc{and} and @sc{or} lists are sequences of one or more pipelines ! separated by the control operators @samp{&&} and @samp{||}, ! respectively. @sc{and} and @sc{or} lists are executed with left ! associativity. ! An @sc{and} list has the form @example @var{command1} && @var{command2} *************** *** 2298,2304 **** (see the description of @code{hash} in @ref{Bourne Shell Builtins}). A full search of the directories in @env{$PATH} is performed only if the command is not found in the hash table. ! If the search is unsuccessful, the shell prints an error message and returns an exit status of 127. @item --- 2301,2312 ---- (see the description of @code{hash} in @ref{Bourne Shell Builtins}). A full search of the directories in @env{$PATH} is performed only if the command is not found in the hash table. ! If the search is unsuccessful, the shell searches for a defined shell ! function named @code{command_not_found_handle}. ! If that function exists, it is invoked with the original command and ! the original command's arguments as its arguments, and the function's ! exit status becomes the exit status of the shell. ! If that function is not defined, the shell prints an error message and returns an exit status of 127. @item *************** *** 3129,3134 **** --- 3137,3143 ---- Readline initialization file (@pxref{Readline Init File}), but each binding or command must be passed as a separate argument; e.g., @samp{"\C-x\C-r":re-read-init-file}. + Options, if supplied, have the following meanings: @table @code *************** *** 3262,3268 **** The @option{-p} option will display the attributes and values of each @var{name}. ! When @option{-p} is used, additional options are ignored. The @option{-F} option inhibits the display of function definitions; only the function name and attributes are printed. If the @code{extdebug} shell option is enabled using @code{shopt} --- 3271,3286 ---- The @option{-p} option will display the attributes and values of each @var{name}. ! When @option{-p} is used with @var{name} arguments, additional options ! are ignored. ! ! When @option{-p} is supplied without @var{name} arguments, @code{declare} ! will display the attributes and values of all variables having the ! attributes specified by the additional options. ! If no other options are supplied with @option{-p}, @code{declare} will ! display the attributes and values of all shell variables. The @option{-f} ! option will restrict the display to shell functions. ! The @option{-F} option inhibits the display of function definitions; only the function name and attributes are printed. If the @code{extdebug} shell option is enabled using @code{shopt} *************** *** 3400,3413 **** @item help @btindex help @example ! help [-s] [@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 the builtins is printed. ! The @option{-s} option restricts the information displayed to a short ! usage synopsis. The return status is zero unless no command matches @var{pattern}. @item let --- 3418,3441 ---- @item help @btindex help @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 the builtins is printed. ! ! Options, if supplied, have the following meanings: ! ! @table @code ! @item -d ! Display a short description of each @var{pattern} ! @item -m ! Display the description of each @var{pattern} in a manpage-like format ! @item -s ! Display only a short usage synopsis for each @var{pattern} ! @end table ! The return status is zero unless no command matches @var{pattern}. @item let *************** *** 3443,3448 **** --- 3471,3516 ---- Exit a login shell, returning a status of @var{n} to the shell's parent. + @item mapfile + @btindex mapfile + @example + 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 array variable @var{array}, + or from file descriptor @var{fd} + if the @option{-u} option is supplied. + The variable @code{MAPFILE} is the default @var{array}. + Options, if supplied, have the following meanings: + @table @code + + @item -n + Copy at most @var{count} lines. If @var{count} is 0, all lines are copied. + @item -O + Begin assigning to @var{array} at index @var{origin}. + The default index is 0. + @item -s + Discard the first @var{count} lines read. + @item -t + Remove a trailing line from each line read. + @item -u + Read lines from file descriptor @var{fd} instead of the standard input. + @item -C + Evaluate @var{callback} each time @var{quantum}P lines are read. + The @option{-c} option specifies @var{quantum}. + @item -c + Specify the number of lines read between each call to @var{callback}. + @end table + + If @option{-C} is specified without @option{-c}, + the default quantum is 5000. + + If not supplied with an explicit origin, @code{mapfile} will clear @var{array} + before assigning to it. + + @code{mapfile} returns successfully unless an invalid option or option + argument is supplied, or @var{array} is invalid or unassignable. + @item printf @btindex printf @example *************** *** 3476,3482 **** @item read @btindex read @example ! read [-ers] [-a @var{aname}] [-d @var{delim}] [-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 --- 3544,3550 ---- @item read @btindex read @example ! read [-ers] [-a @var{aname}] [-d @var{delim}] [-i @var{text}] [-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 *************** *** 3510,3515 **** --- 3578,3587 ---- @item -e Readline (@pxref{Command Line Editing}) is used to obtain the line. + @item -i @var{text} + If Readline is being used to read the line, @var{text} is placed into + the editing buffer before editing begins. + @item -n @var{nchars} @code{read} returns after reading @var{nchars} characters rather than waiting for a complete line of input. *************** *** 3581,3588 **** If the @option{-f} option is used, @code{type} does not attempt to find shell functions, as with the @code{command} builtin. ! The return status is zero if any of the @var{names} are found, non-zero ! if none are found. @item typeset @btindex typeset --- 3653,3660 ---- If the @option{-f} option is used, @code{type} does not attempt to find shell functions, as with the @code{command} builtin. ! The return status is zero if all of the @var{names} are found, non-zero ! if any are not found. @item typeset @btindex typeset *************** *** 3596,3602 **** @item ulimit @btindex ulimit @example ! ulimit [-acdefilmnpqrstuvxSH] [@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 --- 3668,3674 ---- @item ulimit @btindex ulimit @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 *************** *** 3611,3616 **** --- 3683,3691 ---- @item -a All current limits are reported. + @item -b + The maximum socket buffer size. + @item -c The maximum size of core files created. *************** *** 3659,3664 **** --- 3734,3742 ---- @item -x The maximum number of file locks. + @item -T + The maximum number of threads. + @end table If @var{limit} is given, it is the new value of the specified resource; *************** *** 7049,7056 **** @item Bash provides a programmable word completion mechanism ! (@pxref{Programmable Completion}), and two builtin commands, ! @code{complete} and @code{compgen}, to manipulate it. @item Bash has command history (@pxref{Bash History Facilities}) and the --- 7127,7135 ---- @item Bash provides a programmable word completion mechanism ! (@pxref{Programmable Completion}), and builtin commands ! @code{complete}, @code{compgen}, and @code{compopt}, to ! manipulate it. @item Bash has command history (@pxref{Bash History Facilities}) and the