BASH_BUILTINS(1) BASH_BUILTINS(1) NNAAMMEE bash, :, ., alias, bg, bind, break, builtin, case, cd, command, continue, declare, dirs, disown, echo, enable, eval, exec, exit, export, fc, fg, for, getopts, hash, help, history, if, jobs, kill, let, local, logout, popd, pushd, pwd, read, readonly, return, set, shift, shopt, source, suspend, test, times, trap, type, typeset, ulimit, umask, unalias, unset, until, wait, while - bash built-in commands, see bbaasshh(1) BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS Unless otherwise noted, each builtin command documented in this section as accepting options preceded by -- accepts ---- to signify the end of the options. :: [_a_r_g_u_m_e_n_t_s] No effect; the command does nothing beyond expand- ing _a_r_g_u_m_e_n_t_s and performing any specified redirec- tions. A zero exit code is returned. .. _f_i_l_e_n_a_m_e [_a_r_g_u_m_e_n_t_s] ssoouurrccee _f_i_l_e_n_a_m_e [_a_r_g_u_m_e_n_t_s] Read and execute commands from _f_i_l_e_n_a_m_e in the cur- rent shell environment and return the exit status of the last command executed from _f_i_l_e_n_a_m_e. If _f_i_l_e_n_a_m_e does not contain a slash, file names in PPAATTHH are used to find the directory containing _f_i_l_e_n_a_m_e. The file searched for in PPAATTHH need not be executable. The current directory is searched if no file is found in PPAATTHH. If the ssoouurrcceeppaatthh option to the sshhoopptt builtin command is turned off, the PPAATTHH is not searched. If any _a_r_g_u_m_e_n_t_s are supplied, they become the positional parameters when _f_i_l_e_n_a_m_e is executed. Otherwise the posi- tional parameters are unchanged. The return status is the status of the last command exited within the script (0 if no commands are executed), and false if _f_i_l_e_n_a_m_e is not found. aalliiaass [--pp] [_n_a_m_e[=_v_a_l_u_e] ...] AAlliiaass with no arguments or with the --pp option prints the list of aliases in the form aalliiaass _n_a_m_e=_v_a_l_u_e on standard output. When arguments are supplied, an alias is defined for each _n_a_m_e whose _v_a_l_u_e is given. A trailing space in _v_a_l_u_e causes the next word to be checked for alias substitution when the alias is expanded. For each _n_a_m_e in the argument list for which no _v_a_l_u_e is supplied, the name and value of the alias is printed. AAlliiaass returns true unless a _n_a_m_e is given for which no alias has been defined. bbgg [_j_o_b_s_p_e_c] Place _j_o_b_s_p_e_c in the background, as if it had been started with &&. If _j_o_b_s_p_e_c is not present, the GNU 1996 March 20 1 BASH_BUILTINS(1) BASH_BUILTINS(1) shell's notion of the _c_u_r_r_e_n_t _j_o_b is used. bbgg _j_o_b_- _s_p_e_c returns 0 unless run when job control is dis- abled or, when run with job control enabled, if _j_o_b_s_p_e_c was not found or started without job con- trol. bbiinndd [--mm _k_e_y_m_a_p] [--llppssvvPPSSVV] [--qq _n_a_m_e] [--rr _k_e_y_s_e_q] bbiinndd [--mm _k_e_y_m_a_p] --ff _f_i_l_e_n_a_m_e bbiinndd [--mm _k_e_y_m_a_p] _k_e_y_s_e_q:_f_u_n_c_t_i_o_n_-_n_a_m_e Display current rreeaaddlliinnee key and function bindings, or bind a key sequence to a rreeaaddlliinnee function or macro. The binding syntax accepted is identical to that of _._i_n_p_u_t_r_c, but each binding must be passed as a separate argument; e.g., '"\C-x\C-r": re-read-init-file'. Options, if supplied, have the following meanings: --mm _k_e_y_m_a_p Use _k_e_y_m_a_p as the keymap to be affected by the subsequent bindings. Acceptable _k_e_y_m_a_p names are _e_m_a_c_s_, _e_m_a_c_s_-_s_t_a_n_d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_c_o_m_m_a_n_d, and _v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d; _e_m_a_c_s is equivalent to _e_m_a_c_s_-_s_t_a_n_d_a_r_d. --ll List the names of all rreeaaddlliinnee functions. --pp Display rreeaaddlliinnee function names and bindings in such a way that they can be re-read. --PP List current rreeaaddlliinnee function names and bindings. --vv Display rreeaaddlliinnee variable names and values in such a way that they can be re-read. --VV List current rreeaaddlliinnee variable names and values. --ss Display rreeaaddlliinnee key sequences bound to macros and the strings they output in such a way that they can be re-read. --SS Display rreeaaddlliinnee key sequences bound to macros and the strings they output. --ff _f_i_l_e_n_a_m_e Read key bindings from _f_i_l_e_n_a_m_e. --qq _f_u_n_c_t_i_o_n Query about which keys invoke the named _f_u_n_c_t_i_o_n. --rr _k_e_y_s_e_q Remove any current binding for _k_e_y_s_e_q. The return value is 0 unless an unrecognized option is given or an error occurred. bbrreeaakk [_n] Exit from within a ffoorr, wwhhiillee, uunnttiill, or sseelleecctt loop. If _n is specified, break _n levels. _n must be >= 1. If _n is greater than the number of enclosing loops, all enclosing loops are exited. The return value is 0 unless the shell is not GNU 1996 March 20 2 BASH_BUILTINS(1) BASH_BUILTINS(1) executing a loop when bbrreeaakk is executed. bbuuiillttiinn _s_h_e_l_l_-_b_u_i_l_t_i_n [_a_r_g_u_m_e_n_t_s] Execute the specified shell builtin, passing it _a_r_g_u_m_e_n_t_s, and return its exit status. This is useful when you wish to define a function whose name is the same as a shell builtin, but need the functionality of the builtin within the function itself. The ccdd builtin is commonly redefined this way. The return status is false if _s_h_e_l_l_-_b_u_i_l_t_i_n is not a shell builtin command. ccdd [--LLPP] [_d_i_r] Change the current directory to _d_i_r. The variable HHOOMMEE is the default _d_i_r. The variable CCDDPPAATTHH defines the search path for the directory contain- ing _d_i_r. Alternative directory names in CCDDPPAATTHH are separated by a colon (:). A null directory name in CCDDPPAATTHH is the same as the current directory, i.e., ``..''. If _d_i_r begins with a slash (/), then CCDDPPAATTHH is not used. The --PP option says to use the physical directory structure instead of following symbolic links (see also the --PP option to the sseett builtin command); the --LL option forces symbolic links to be followed. An argument of -- is equivalent to $$OOLLDD-- PPWWDD. The return value is true if the directory was successfully changed; false otherwise. ccoommmmaanndd [--ppVVvv] _c_o_m_m_a_n_d [_a_r_g ...] Run _c_o_m_m_a_n_d with _a_r_g_s suppressing the normal shell function lookup. Only builtin commands or commands found in the PPAATTHH are executed. If the --pp option is given, the search for _c_o_m_m_a_n_d is performed using a default value for PPAATTHH that is guaranteed to find all of the standard utilities. If either the --VV or --vv option is supplied, a description of _c_o_m_m_a_n_d is printed. The --vv option causes a single word indi- cating the command or file name used to invoke _c_o_m_- _m_a_n_d to be printed; the --VV option produces a more verbose description. If the --VV or --vv option is supplied, the exit status is 0 if _c_o_m_m_a_n_d was found, and 1 if not. If neither option is supplied and an error occurred or _c_o_m_m_a_n_d cannot be found, the exit status is 127. Otherwise, the exit status of the ccoommmmaanndd builtin is the exit status of _c_o_m_- _m_a_n_d. ccoonnttiinnuuee [_n] Resume the next iteration of the enclosing ffoorr, wwhhiillee, uunnttiill, or sseelleecctt loop. If _n is specified, resume at the _nth enclosing loop. _n must be >= 1. If _n is greater than the number of enclosing loops, the last enclosing loop (the ``top-level'' loop) is resumed. The return value is 0 unless the shell is GNU 1996 March 20 3 BASH_BUILTINS(1) BASH_BUILTINS(1) not executing a loop when ccoonnttiinnuuee is executed. ddeeccllaarree [--aaffFFiirrxx] [--pp] [_n_a_m_e[=_v_a_l_u_e]] ttyyppeesseett [--aaffFFiirrxx] [--pp] [_n_a_m_e[=_v_a_l_u_e]] Declare variables and/or give them attributes. If no _n_a_m_es are given then display the values of vari- ables. The --pp option will display the attributes and values of each _n_a_m_e. When --pp is used, addi- tional options are ignored. The --FF option inhibits the display of function definitions; only the func- tion name and attributes are printed. The --FF option implies --ff. The following options can be used to restrict output to variables with the spec- ified attribute or to give variables attributes: --aa Each _n_a_m_e is an array variable (see AArrrraayyss above). --ff Use function names only. --ii The variable is treated as an integer; arithmetic evaluation (see AARRIITTHHMMEETTIICC EEVVAALLUU-- AATTIIOONN )) is performed when the variable is assigned a value. --rr Make _n_a_m_es readonly. These names cannot then be assigned values by subsequent assignment statements. --xx Mark _n_a_m_es for export to subsequent commands via the environment. Using `+' instead of `-' turns off the attribute instead, with the exception that ++aa may not be used to destroy an array variable. When used in a func- tion, makes each _n_a_m_e local, as with the llooccaall com- mand. The return value is 0 unless an illegal option is encountered, an attempt is made to define a function using "-f foo=bar", an attempt is made to assign a value to a readonly variable, an attempt is made to assign a value to an array vari- able without using the compound assignment syntax (see AArrrraayyss above), one of the _n_a_m_e_s is not a legal shell variable name, an attempt is made to turn off readonly status for a readonly variable, an attempt is made to turn off array status for an array vari- able, or an attempt is made to display a non- existent function with -f. ddiirrss [[--ccllppvv]] [[++_n]] [[--_n]] Without options, displays the list of currently remembered directories. The default display is on a single line with directory names separated by spaces. Directories are added to the list with the ppuusshhdd command; the ppooppdd command removes entries from the list. ++_n Displays the _nth entry counting from the left of the list shown by ddiirrss when invoked without options, starting with zero. GNU 1996 March 20 4 BASH_BUILTINS(1) BASH_BUILTINS(1) --_n Displays the _nth entry counting from the right of the list shown by ddiirrss when invoked without options, starting with zero. --cc Clears the directory stack by deleting all of the entries. --ll Produces a longer listing; the default list- ing format uses a tilde to denote the home directory. --pp Print the directory stack with one entry per line. --vv Print the directory stack with one entry per line, prefixing each entry with its index in the stack. The return value is 0 unless an illegal option is supplied or _n indexes beyond the end of the direc- tory stack. ddiissoowwnn [--hh] [_j_o_b_s_p_e_c ...] Without options, each _j_o_b_s_p_e_c is removed from the table of active jobs. If the --hh option is given, the job is not removed from the table, but is marked so that SSIIGGHHUUPP is not sent to the job if the shell receives a SSIIGGHHUUPP. If no _j_o_b_s_p_e_c is present, the _c_u_r_r_e_n_t _j_o_b is used. The return value is 0 unless a _j_o_b_s_p_e_c does not specify a valid job. eecchhoo [--nneeEE] [_a_r_g ...] Output the _a_r_gs, separated by spaces, followed by a newline. The return status is always 0. If --nn is specified, the trailing newline is suppressed. If the --ee option is given, interpretation of the fol- lowing backslash-escaped characters is enabled. The --EE option disables the interpretation of these escape characters, even on systems where they are interpreted by default. eecchhoo does not interpret ---- to mean the end of options. eecchhoo interprets the following escape sequences: \\aa alert (bell) \\bb backspace \\cc suppress trailing newline \\ee an escape character \\ff form feed \\nn new line \\rr carriage return \\tt horizontal tab \\vv vertical tab \\\\ backslash \\nnnnnn the character whose ASCII code is _n_n_n (octal) eennaabbllee [--aaddnnppss] [--ff _f_i_l_e_n_a_m_e] [_n_a_m_e ...] Enable and disable builtin shell commands. This allows the execution of a disk command which has GNU 1996 March 20 5 BASH_BUILTINS(1) BASH_BUILTINS(1) the same name as a shell builtin without specifying a full file name. If --nn is used, each _n_a_m_e is dis- abled; otherwise, _n_a_m_e_s are enabled. For example, to use the tteesstt binary found via the PPAATTHH instead of the shell builtin version, run eennaabbllee --nn tteesstt. The --ff option means to load the new builtin command _n_a_m_e from shared object _f_i_l_e_n_a_m_e, on systems that support dynamic loading. The --dd option will delete a builtin previously loaded with --ff. If no _n_a_m_e arguments are given, or if the --pp option is sup- plied, a list of shell builtins is printed. With no other option arguments, the list consists of all enabled shell builtins. If --nn is supplied, only disabled builtins are printed. If --aa is supplied, the list printed includes all builtins, with an indication of whether or not each is enabled. If --ss is supplied, the output is restricted to the POSIX _s_p_e_c_i_a_l builtins. The return value is 0 unless a _n_a_m_e is not a shell builtin or there is a problem loading a new builtin from a shared object. eevvaall [_a_r_g ...] The _a_r_gs are read and concatenated together into a single command. This command is then read and exe- cuted by the shell, and its exit status is returned as the value of eevvaall. If there are no _a_r_g_s, or only null arguments, eevvaall returns 0. eexxeecc [--ccll] [--aa _n_a_m_e] [_c_o_m_m_a_n_d] [_a_r_g_u_m_e_n_t_s] If _c_o_m_m_a_n_d is specified, it replaces the shell. No new process is created. The _a_r_g_u_m_e_n_t_s become the arguments to _c_o_m_m_a_n_d. If the --ll option is sup- plied, the shell places a dash in the zeroth arg passed to _c_o_m_m_a_n_d. This is what _l_o_g_i_n(1) does. The --cc option causes _c_o_m_m_a_n_d to be executed with an empty environment. If --aa is supplied, the shell passes _n_a_m_e as the zeroth argument to the executed command. If _c_o_m_m_a_n_d cannot be executed for some reason, a non-interactive shell exits, unless the shell option eexxeeccffaaiill is enabled, in which case it returns failure. An interactive shell returns failure if the file cannot be executed. If _c_o_m_m_a_n_d is not specified, any redirections take effect in the current shell, and the return status is 0. eexxiitt [_n] Cause the shell to exit with a status of _n. If _n is omitted, the exit status is that of the last command executed. A trap on EEXXIITT is executed before the shell terminates. eexxppoorrtt [--ffnn] [_n_a_m_e[=_w_o_r_d]] ... eexxppoorrtt --pp The supplied _n_a_m_e_s are marked for automatic export GNU 1996 March 20 6 BASH_BUILTINS(1) BASH_BUILTINS(1) to the environment of subsequently executed com- mands. If the --ff option is given, the _n_a_m_e_s refer to functions. If no _n_a_m_e_s are given, or if the --pp option is supplied, a list of all names that are exported in this shell is printed. The --nn option causes the export property to be removed from the named variables. eexxppoorrtt returns an exit status of 0 unless an illegal option is encountered, one of the _n_a_m_e_s is not a legal shell variable name, or --ff is supplied with a _n_a_m_e that is not a function. ffcc [--ee _e_n_a_m_e] [--nnllrr] [_f_i_r_s_t] [_l_a_s_t] ffcc --ss [_p_a_t=_r_e_p] [_c_m_d] Fix Command. In the first form, a range of com- mands from _f_i_r_s_t to _l_a_s_t is selected from the his- tory list. _F_i_r_s_t and _l_a_s_t may be specified as a string (to locate the last command beginning with that string) or as a number (an index into the his- tory list, where a negative number is used as an offset from the current command number). If _l_a_s_t is not specified it is set to the current command for listing (so that ffcc --ll --1100 prints the last 10 commands) and to _f_i_r_s_t otherwise. If _f_i_r_s_t is not specified it is set to the previous command for editing and -16 for listing. The --nn flag suppresses the command numbers when listing. The --rr flag reverses the order of the commands. If the --ll flag is given, the commands are listed on standard output. Otherwise, the edi- tor given by _e_n_a_m_e is invoked on a file containing those commands. If _e_n_a_m_e is not given, the value of the FFCCEEDDIITT variable is used, and the value of EEDDIITTOORR if FFCCEEDDIITT is not set. If neither variable is set, is used. When editing is complete, the edited commands are echoed and executed. In the second form, _c_o_m_m_a_n_d is re-executed after each instance of _p_a_t is replaced by _r_e_p. A useful alias to use with this is ``r=fc -s'', so that typ- ing ``r cc'' runs the last command beginning with ``cc'' and typing ``r'' re-executes the last com- mand. If the first form is used, the return value is 0 unless an illegal option is encountered or _f_i_r_s_t or _l_a_s_t specify history lines out of range. If the --ee option is supplied, the return value is the value of the last command executed or failure if an error occurs with the temporary file of commands. If the second form is used, the return status is that of the command re-executed, unless _c_m_d does not spec- ify a valid history line, in which case ffcc returns failure. GNU 1996 March 20 7 BASH_BUILTINS(1) BASH_BUILTINS(1) ffgg [_j_o_b_s_p_e_c] Place _j_o_b_s_p_e_c in the foreground, and make it the current job. If _j_o_b_s_p_e_c is not present, the shell's notion of the _c_u_r_r_e_n_t _j_o_b is used. The return value is that of the command placed into the foreground, or failure if run when job control is disabled or, when run with job control enabled, if _j_o_b_s_p_e_c does not specify a valid job or _j_o_b_s_p_e_c specifies a job that was started without job con- trol. ggeettooppttss _o_p_t_s_t_r_i_n_g _n_a_m_e [_a_r_g_s] ggeettooppttss is used by shell procedures to parse posi- tional parameters. _o_p_t_s_t_r_i_n_g contains the option letters to be recognized; if a letter is followed by a colon, the option is expected to have an argu- ment, which should be separated from it by white space. Each time it is invoked, ggeettooppttss places the next option in the shell variable _n_a_m_e, initializ- ing _n_a_m_e if it does not exist, and the index of the next argument to be processed into the variable OOPPTTIINNDD. OOPPTTIINNDD is initialized to 1 each time the shell or a shell script is invoked. When an option requires an argument, ggeettooppttss places that argument into the variable OOPPTTAARRGG. The shell does not reset OOPPTTIINNDD automatically; it must be manually reset between multiple calls to ggeettooppttss within the same shell invocation if a new set of parameters is to be used. ggeettooppttss can report errors in two ways. If the first character of _o_p_t_s_t_r_i_n_g is a colon, _s_i_l_e_n_t error reporting is used. In normal operation diag- nostic messages are printed when illegal options or missing option arguments are encountered. If the variable OOPPTTEERRRR is set to 0, no error message will be displayed, even if the first character of _o_p_t_- _s_t_r_i_n_g is not a colon. If an illegal option is seen, ggeettooppttss places ? into _n_a_m_e and, if not silent, prints an error message and unsets OOPPTTAARRGG. If ggeettooppttss is silent, the option character found is placed in OOPPTTAARRGG and no diagnostic message is printed. If a required argument is not found, and ggeettooppttss is not silent, a question mark (??) is placed in _n_a_m_e, OOPPTTAARRGG is unset, and a diagnostic message is printed. If ggeettooppttss is silent, then a colon (::) is placed in _n_a_m_e and OOPPTTAARRGG is set to the option character found. ggeettooppttss normally parses the positional parameters, but if more arguments are given in _a_r_g_s, ggeettooppttss GNU 1996 March 20 8 BASH_BUILTINS(1) BASH_BUILTINS(1) parses those instead. ggeettooppttss returns true if an option, specified or unspecified, is found. It returns false if the end of options is encountered or an error occurs. hhaasshh [--rr] [--pp _f_i_l_e_n_a_m_e] [_n_a_m_e] For each _n_a_m_e, the full file name of the command is determined by searching the directories in $$PPAATTHH and remembered. If the --pp option is supplied, no path search is performed, and _f_i_l_e_n_a_m_e is used as the full file name of the command. The --rr option causes the shell to forget all remembered loca- tions. If no arguments are given, information about remembered commands is printed. The return status is true unless a _n_a_m_e is not found or an illegal option is supplied. hheellpp [_p_a_t_t_e_r_n] Display helpful information about builtin commands. If _p_a_t_t_e_r_n is specified, hheellpp gives detailed help on all commands matching _p_a_t_t_e_r_n; otherwise help for all the builtins and shell control structures is printed. The return status is 0 unless no com- mand matches _p_a_t_t_e_r_n. hhiissttoorryy [--cc] [_n] hhiissttoorryy --aannrrww [_f_i_l_e_n_a_m_e] hhiissttoorryy --pp _a_r_g [_a_r_g _._._.] hhiissttoorryy --ss _a_r_g [_a_r_g _._._.] With no options, display the command history list with line numbers. Lines listed with a ** have been modified. An argument of _n lists only the last _n lines. If _f_i_l_e_n_a_m_e is supplied, it is used as the name of the history file; if not, the value of HHIISSTTFFIILLEE is used. Options, if supplied, have the following meanings: --aa Append the ``new'' history lines (history lines entered since the beginning of the current bbaasshh session) to the history file. --nn Read the history lines not already read from the history file into the current history list. These are lines appended to the his- tory file since the beginning of the current bbaasshh session. --rr Read the contents of the history file and use them as the current history. --ww Write the current history to the history file, overwriting the history file's con- tents. --cc Clear the history list by deleting all the entries. --pp Perform history substitution on the follow- ing _a_r_g_s and display the result on the stan- dard output. Does not store the results in GNU 1996 March 20 9 BASH_BUILTINS(1) BASH_BUILTINS(1) the history list. Each _a_r_g must be quoted to disable normal history expansion. --ss Store the _a_r_g_s in the history list as a sin- gle entry. The last command in the history list is removed before the _a_r_g_s are added. The return value is 0 unless an illegal option is encountered or an error occurs while reading or writing the history file. jjoobbss [--llnnpprrss] [ _j_o_b_s_p_e_c ... ] jjoobbss --xx _c_o_m_m_a_n_d [ _a_r_g_s ... ] The first form lists the active jobs. The options have the following meanings: --ll List process IDs in addition to the normal information. --pp List only the process ID of the job's pro- cess group leader. --nn Display information only about jobs that have changed status since the user was last notified of their status. --rr Restrict output to running jobs. --ss Restrict output to stopped jobs. If _j_o_b_s_p_e_c is given, output is restricted to infor- mation about that job. The return status is 0 unless an illegal option is encountered or an ille- gal _j_o_b_s_p_e_c is supplied. If the --xx option is supplied, jjoobbss replaces any _j_o_b_s_p_e_c found in _c_o_m_m_a_n_d or _a_r_g_s with the corre- sponding process group ID, and executes _c_o_m_m_a_n_d passing it _a_r_g_s, returning its exit status. kkiillll [--ss _s_i_g_s_p_e_c | --nn _s_i_g_n_u_m | --_s_i_g_s_p_e_c] [_p_i_d | _j_o_b_s_p_e_c] ... kkiillll --ll [_s_i_g_n_u_m | _s_i_g_s_p_e_c] Send the signal named by _s_i_g_s_p_e_c or _s_i_g_n_u_m to the processes named by _p_i_d or _j_o_b_s_p_e_c. _s_i_g_s_p_e_c is either a signal name such as SSIIGGKKIILLLL or a signal number; _s_i_g_n_u_m is a signal number. If _s_i_g_s_p_e_c is a signal name, the name may be given with or without the SSIIGG prefix. If _s_i_g_s_p_e_c is not present, then SSIIGGTTEERRMM is assumed. An argument of --ll lists the signal names. If any arguments are supplied when --ll is given, the names of the specified signals are listed, and the return status is 0. The arguments to --ll may be either signal names or signal numbers; if signal names are given, the corresponding signal number is displayed. kkiillll returns true if at least one signal was successfully sent, or false if an error occurs or an illegal option is encountered. GNU 1996 March 20 10 BASH_BUILTINS(1) BASH_BUILTINS(1) lleett _a_r_g [_a_r_g ...] Each _a_r_g is an arithmetic expression to be evalu- ated (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN). If the last _a_r_g evaluates to 0, lleett returns 1; 0 is returned other- wise. llooccaall [_n_a_m_e[=_v_a_l_u_e] ...] For each argument, create a local variable named _n_a_m_e, and assign it _v_a_l_u_e. When llooccaall is used within a function, it causes the variable _n_a_m_e to have a visible scope restricted to that function and its children. With no operands, llooccaall writes a list of local variables to the standard output. It is an error to use llooccaall when not within a func- tion. The return status is 0 unless llooccaall is used outside a function, or an illegal _n_a_m_e is supplied. llooggoouutt Exit a login shell. ppooppdd [-nn] [+_n] [-_n] Removes entries from the directory stack. With no arguments, removes the top directory from the stack, and performs a ccdd to the new top directory. Arguments, if supplied, have the following mean- ings: ++_n Removes the _nth entry counting from the left of the list shown by ddiirrss, starting with zero. For example: ``popd +0'' removes the first directory, ``popd +1'' the second. --_n Removes the _nth entry counting from the right of the list shown by ddiirrss, starting with zero. For example: ``popd -0'' removes the last directory, ``popd -1'' the next to last. --nn Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. If the ppooppdd command is successful, a ddiirrss is per- formed as well, and the return status is 0. ppooppdd returns false if an illegal option is encountered, the directory stack is empty, a non-existent direc- tory stack entry is specified, or the directory change fails. ppuusshhdd [--nn] [_d_i_r] ppuusshhdd [--nn] [+_n] [-_n] Adds a directory to the top of the directory stack, or rotates the stack, making the new top of the stack the current working directory. With no argu- ments, exchanges the top two directories and returns 0, unless the directory stack is empty. Arguments, if supplied, have the following mean- ings: GNU 1996 March 20 11 BASH_BUILTINS(1) BASH_BUILTINS(1) ++_n Rotates the stack so that the _nth directory (counting from the left of the list shown by ddiirrss, starting with zero) is at the top. --_n Rotates the stack so that the _nth directory (counting from the right of the list shown by ddiirrss, starting with zero) is at the top. --nn Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. ddiirr Adds _d_i_r to the directory stack at the top, making it the new current working directory. If the ppuusshhdd command is successful, a ddiirrss is per- formed as well. If the first form is used, ppuusshhdd returns 0 unless the cd to _d_i_r fails. With the second form, ppuusshhdd returns 0 unless the directory stack is empty, a non-existent directory stack ele- ment is specified, or the directory change to the specified new current directory fails. ppwwdd [--LLPP] Print the absolute file name of the current working directory. The file name printed contains no sym- bolic links if the --PP option is supplied or the --oo pphhyyssiiccaall option to the sseett builtin command is enabled. If the --LL option is used, symbolic links are followed. The return status is 0 unless an error occurs while reading the name of the current directory. rreeaadd [--eerr] [--aa _a_n_a_m_e] [--pp _p_r_o_m_p_t] [_n_a_m_e ...] One line is read from the standard input, and the first word is assigned to the first _n_a_m_e, the sec- ond word to the second _n_a_m_e, and so on, with left- over words assigned to the last _n_a_m_e. Only the characters in IIFFSS are recognized as word delim- iters. Options, if supplied, have the following meanings: --rr A backslash-newline pair is not ignored, and the backslash is considered to be part of the line. --pp Display _p_r_o_m_p_t, without a trailing newline, before attempting to read any input. The prompt is displayed only if input is coming from a terminal. --aa The words are assigned to sequential indices of the array variable _a_n_a_m_e, starting at 0. _a_n_a_m_e is unset before any new values are assigned. --ee If the standard input is coming from a ter- minal, rreeaaddlliinnee (see RREEAADDLLIINNEE above) is used to obtain the line. If no _n_a_m_e_s are supplied, the line read is assigned GNU 1996 March 20 12 BASH_BUILTINS(1) BASH_BUILTINS(1) to the variable RREEPPLLYY. The return code is zero, unless end-of-file is encountered. rreeaaddoonnllyy [--aappff] [_n_a_m_e ...] The given _n_a_m_e_s are marked readonly; the values of these _n_a_m_e_s may not be changed by subsequent assignment. If the --ff option is supplied, the functions corresponding to the _n_a_m_e_s are so marked. The --aa option restricts the variables to arrays. If no _n_a_m_e arguments are given, or if the --pp option is supplied, a list of all readonly names is printed. The return status is 0 unless an illegal option is encountered, one of the _n_a_m_e_s is not a legal shell variable name, or --ff is supplied with a _n_a_m_e that is not a function. rreettuurrnn [_n] Causes a function to exit with the return value specified by _n. If _n is omitted, the return status is that of the last command executed in the func- tion body. If used outside a function, but during execution of a script by the .. (ssoouurrccee) command, it causes the shell to stop executing that script and return either _n or the exit status of the last command executed within the script as the exit sta- tus of the script. If used outside a function and not during execution of a script by .., the return status is false. sseett [----aabbeeffhhkkmmnnppttuuvvxxBBCCHHPP] [--oo _o_p_t_i_o_n] [_a_r_g ...] Without options, the name and value of each shell variable are displayed in a format that can be re- used as input. When options are specified, they set or unset shell attributes. Any arguments remaining after the options are processed are treated as values for the positional parameters and are assigned, in order, to $$11, $$22, ...... $$_n. Options, if specified, have the following meanings: --aa Automatically mark variables which are mod- ified or created for export to the environ- ment of subsequent commands. --bb Report the status of terminated background jobs immediately, rather than before the next primary prompt. This is effective only when job control is enabled. --ee Exit immediately if a _s_i_m_p_l_e _c_o_m_m_a_n_d (see SSHHEELLLL GGRRAAMMMMAARR above) exits with a non-zero status. The shell does not exit if the command that fails is part of an _u_n_t_i_l or _w_h_i_l_e loop, part of an _i_f statement, part of a &&&& or |||| list, or if the command's return value is being inverted via !!. --ff Disable pathname expansion. --hh Remember the location of commands as they GNU 1996 March 20 13 BASH_BUILTINS(1) BASH_BUILTINS(1) are looked up for execution. This is on by default. --kk All arguments in the form of assignment statements are placed in the environment for a command, not just those that precede the command name. --mm Monitor mode. Job control is enabled. This flag is on by default for interactive shells on systems that support it (see JJOOBB CCOONNTTRROOLL above). Background processes run in a separate process group and a line con- taining their exit status is printed upon their completion. --nn Read commands but do not execute them. This may be used to check a shell script for syntax errors. This is ignored by interactive shells. --oo _o_p_t_i_o_n_-_n_a_m_e The _o_p_t_i_o_n_-_n_a_m_e can be one of the follow- ing: aalllleexxppoorrtt Same as --aa. bbrraacceeeexxppaanndd Same as --BB. eemmaaccss Use an emacs-style command line editing interface. This is enabled by default when the shell is inter- active, unless the shell is started with the ----nnooeeddiittiinngg option. eerrrreexxiitt Same as --ee. hhaasshhaallll Same as --hh. hhiisstteexxppaanndd Same as --HH. hhiissttoorryy Enable command history, as described above under HHIISSTTOORRYY. This option is on by default in interactive shells. iiggnnoorreeeeooff The effect is as if the shell com- mand IIGGNNOORREEEEOOFF==1100 had been executed (see SShheellll VVaarriiaabblleess above). kkeeyywwoorrdd Same as --kk. mmoonniittoorr Same as --mm. nnoocclloobbbbeerr Same as --CC. nnooeexxeecc Same as --nn. nnoogglloobb Same as --ff. nnoottiiffyy Same as --bb. nnoouunnsseett Same as --uu. oonneeccmmdd Same as --tt. pphhyyssiiccaall Same as --PP. ppoossiixx Change the behavior of bbaasshh where the default operation differs from GNU 1996 March 20 14 BASH_BUILTINS(1) BASH_BUILTINS(1) the POSIX 1003.2 standard to match the standard. pprriivviilleeggeedd Same as --pp. vveerrbboossee Same as --vv. vvii Use a vi-style command line editing interface. xxttrraaccee Same as --xx. If --oo is supplied with no _o_p_t_i_o_n_-_n_a_m_e, the values of the current options are printed. If ++oo is supplied with no _o_p_t_i_o_n_-_n_a_m_e, a series of sseett commands to recreate the cur- rent option settings is displayed on the standard output. --pp Turn on _p_r_i_v_i_l_e_g_e_d mode. In this mode, the $$EENNVV file is not processed, and shell func- tions are not inherited from the environ- ment. This is enabled automatically on startup if the effective user (group) id is not equal to the real user (group) id. Turning this option off causes the effec- tive user and group ids to be set to the real user and group ids. --tt Exit after reading and executing one com- mand. --uu Treat unset variables as an error when per- forming parameter expansion. If expansion is attempted on an unset variable, the shell prints an error message, and, if not interactive, exits with a non-zero status. --vv Print shell input lines as they are read. --xx After expanding each _s_i_m_p_l_e _c_o_m_m_a_n_d, dis- play the expanded value of PPSS44, followed by the command and its expanded arguments. --BB The shell performs brace expansion (see BBrraaccee EExxppaannssiioonn above). This is on by default. --CC If set, bbaasshh does not overwrite an existing file with the >>, >>&&, and <<>> redirection operators. This may be overridden when creating output files by using the redirec- tion operator >>|| instead of >>. --HH Enable !! style history substitution. This flag is on by default when the shell is interactive. --PP If set, the shell does not follow symbolic links when executing commands such as ccdd that change the current working directory. It uses the physical directory structure instead. By default, bbaasshh follows the log- ical chain of directories when performing commands which change the current direc- tory. ---- If no arguments follow this flag, then the GNU 1996 March 20 15 BASH_BUILTINS(1) BASH_BUILTINS(1) positional parameters are unset. Other- wise, the positional parameters are set to the _a_r_gs, even if some of them begin with a --. -- Signal the end of options, cause all remaining _a_r_gs to be assigned to the posi- tional parameters. The --xx and --vv options are turned off. If there are no _a_r_gs, the positional parameters remain unchanged. The flags are off by default unless otherwise noted. Using + rather than - causes these flags to be turned off. The flags can also be specified as options to an invocation of the shell. The current set of flags may be found in $$--. The return status is always true unless an illegal option is encoun- tered. sshhiifftt [_n] The positional parameters from _n+1 ... are renamed to $$11 ........ Parameters represented by the numbers $$## down to $$##-_n+1 are unset. _n must be a non- negative number less than or equal to $$##. If _n is 0, no parameters are changed. If _n is not given, it is assumed to be 1. If _n is greater than $$##, the positional parameters are not changed. The return status is greater than zero if _n is greater than $$## or less than zero; otherwise 0. sshhoopptt [--ppqqssuu] [--oo] [_o_p_t_n_a_m_e ...] Toggle the values of variables controlling optional shell behavior. With no options, or with the --pp option, a list of all settable options is dis- played, with an indication of whether or not each is set. Other options have the following meanings: --ss Enable (set) each _o_p_t_n_a_m_e. --uu Disable (unset) each _o_p_t_n_a_m_e. --qq Suppresses normal output (quiet mode); the return status indicates whether the _o_p_t_n_a_m_e is set or unset. If multiple _o_p_t_n_a_m_e argu- ments are given with --qq, the return status is zero if all _o_p_t_n_a_m_e_s are enabled; non- zero otherwise. --oo Restricts the values of _o_p_t_n_a_m_e to be those defined for the --oo option to the sseett builtin. If either --ss or --uu is used with no _o_p_t_n_a_m_e argu- ments, the display is limited to those options which are set or unset, respectively. Unless oth- erwise noted, the sshhoopptt options are disabled (unset) by default. The return status when listing options is zero if GNU 1996 March 20 16 BASH_BUILTINS(1) BASH_BUILTINS(1) all _o_p_t_n_a_m_e_s are enabled, non-zero otherwise. When setting or unsetting options, the return status is zero unless an _o_p_t_n_a_m_e is not a legal shell option. The list of sshhoopptt options is: ccddaabbllee__vvaarrss If set, an argument to the ccdd builtin com- mand that is not a directory is assumed to be the name of a variable whose value is the directory to change to. ccddssppeellll If set, minor errors in the spelling of a directory component in a ccdd command will be corrected. The errors checked for are transposed characters, a missing character, and one character too many. If a correc- tion is found, the corrected file name is printed, and the command proceeds. This option is only used by interactive shells. cchheecckkhhaasshh If set, bbaasshh checks that a command found in the hash table exists before trying to exe- cute it. If a hashed command no longer exists, a normal path search is performed. cchheecckkwwiinnssiizzee If set, bbaasshh checks the window size after each command and, if necessary, updates the values of LLIINNEESS and CCOOLLUUMMNNSS. ccmmddhhiisstt If set, bbaasshh attempts to save all lines of a multiple-line command in the same history entry. This allows easy re-editing of multi-line commands. ddoottgglloobb If set, bbaasshh includes filenames beginning with a `.' in the results of pathname expansion. eexxeeccffaaiill If set, a non-interactive shell will not exit if it cannot execute the file speci- fied as an argument to the eexxeecc builtin command. An interactive shell does not exit if eexxeecc fails. eexxppaanndd__aalliiaasseess If set, aliases are expanded as described above under AALLIIAASSEESS. This option is enabled by default for interactive shells. hhiissttaappppeenndd If set, the history list is appended to the file named by the value of the HHIISSTTFFIILLEE variable when the shell exits, rather than overwriting the file. hhiissttrreeeeddiitt If set, and rreeaaddlliinnee is being used, a user is given the opportunity to re-edit a failed history substitution. GNU 1996 March 20 17 BASH_BUILTINS(1) BASH_BUILTINS(1) hhiissttvveerriiffyy If set, and rreeaaddlliinnee is being used, the results of history substitution are not immediately passed to the shell parser. Instead, the resulting line is loaded into the rreeaaddlliinnee editing buffer, allowing fur- ther modification. hhoossttccoommpplleettee If set, and rreeaaddlliinnee is being used, bash will attempt to perform hostname completion when a word beginning with @@ is being com- pleted (see CCoommpplleettiinngg under RREEAADDLLIINNEE above). This is enabled by default. iinntteerraaccttiivvee__ccoommmmeennttss If set, allow a word beginning with ## to cause that word and all remaining charac- ters on that line to be ignored in an interactive shell (see CCOOMMMMEENNTTSS above). This option is enabled by default. lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line commands are saved to the his- tory with embedded newlines rather than using semicolon separators where possible. mmaaiillwwaarrnn If set, and a file that bbaasshh is checking for mail has been accessed since the last time it was checked, the message ``The mail in _m_a_i_l_f_i_l_e has been read'' is displayed. nnuullllgglloobb If set, bbaasshh allows patterns which match no files (see PPaatthhnnaammee EExxppaannssiioonn above) to expand to a null string, rather than them- selves. pprroommppttvvaarrss If set, prompt strings undergo variable and parameter expansion after being expanded as described in PPRROOMMPPTTIINNGG above. This option is enabled by default. sshhiifftt__vveerrbboossee If set, the sshhiifftt builtin prints an error message when the shift count exceeds the number of positional parameters. ssoouurrcceeppaatthh If set, the ssoouurrccee (..) builtin uses the value of PPAATTHH to find the directory con- taining the file supplied as an argument. This is enabled by default. ssuussppeenndd [--ff] Suspend the execution of this shell until it receives a SSIIGGCCOONNTT signal. The --ff option says not to complain if this is a login shell; just suspend anyway. The return status is 0 unless the shell is a login shell and --ff is not supplied, or if job control is not enabled. GNU 1996 March 20 18 BASH_BUILTINS(1) BASH_BUILTINS(1) tteesstt _e_x_p_r [[ _e_x_p_r ]] Return a status of 0 or 1 depending on the evalua- tion of the conditional expression _e_x_p_r. Expres- sions may be unary or binary. Unary expressions are often used to examine the status of a file. There are string operators and numeric comparison operators as well. Each operator and operand must be a separate argument. If _f_i_l_e is of the form /dev/fd/_n, then file descriptor _n is checked. Expressions are composed of the following pri- maries: --bb _f_i_l_e True if _f_i_l_e exists and is a block special file. --cc _f_i_l_e True if _f_i_l_e exists and is a character spe- cial file. --dd _f_i_l_e True if _f_i_l_e exists and is a directory. --ee _f_i_l_e True if _f_i_l_e exists. --ff _f_i_l_e True if _f_i_l_e exists and is a regular file. --gg _f_i_l_e True if _f_i_l_e exists and is set-group-id. --kk _f_i_l_e True if _f_i_l_e has its ``sticky'' bit set. --LL _f_i_l_e True if _f_i_l_e exists and is a symbolic link. --pp _f_i_l_e True if _f_i_l_e exists and is a named pipe. --rr _f_i_l_e True if _f_i_l_e exists and is readable. --ss _f_i_l_e True if _f_i_l_e exists and has a size greater than zero. --SS _f_i_l_e True if _f_i_l_e exists and is a socket. --tt _f_d True if _f_d is opened on a terminal. --uu _f_i_l_e True if _f_i_l_e exists and its set-user-id bit is set. --ww _f_i_l_e True if _f_i_l_e exists and is writable. --xx _f_i_l_e True if _f_i_l_e exists and is executable. --OO _f_i_l_e True if _f_i_l_e exists and is owned by the effective user id. --GG _f_i_l_e True if _f_i_l_e exists and is owned by the effective group id. GNU 1996 March 20 19 BASH_BUILTINS(1) BASH_BUILTINS(1) _f_i_l_e_1 -nntt _f_i_l_e_2 True if _f_i_l_e_1 is newer (according to modifi- cation date) than _f_i_l_e_2. _f_i_l_e_1 -oott _f_i_l_e_2 True if _f_i_l_e_1 is older than _f_i_l_e_2. _f_i_l_e_1 --eeff _f_i_l_e_2 True if _f_i_l_e_1 and _f_i_l_e_2 have the same device and inode numbers. --oo _o_p_t_n_a_m_e True if shell option _o_p_t_n_a_m_e is enabled. See the list of options under the descrip- tion of the --oo option to the sseett builtin above. --zz _s_t_r_i_n_g True if the length of _s_t_r_i_n_g is zero. --nn _s_t_r_i_n_g _s_t_r_i_n_g True if the length of _s_t_r_i_n_g is non-zero. _s_t_r_i_n_g_1 == _s_t_r_i_n_g_2 True if the strings are equal. ==== may be used in place of ==. _s_t_r_i_n_g_1 !!== _s_t_r_i_n_g_2 True if the strings are not equal. _s_t_r_i_n_g_1 << _s_t_r_i_n_g_2 True if _s_t_r_i_n_g_1 sorts before _s_t_r_i_n_g_2 lexico- graphically. _s_t_r_i_n_g_1 >> _s_t_r_i_n_g_2 True if _s_t_r_i_n_g_1 sorts after _s_t_r_i_n_g_2 lexico- graphically. !! _e_x_p_r True if _e_x_p_r is false. _e_x_p_r_1 -aa _e_x_p_r_2 True if both _e_x_p_r_1 AND _e_x_p_r_2 are true. _e_x_p_r_1 -oo _e_x_p_r_2 True if either _e_x_p_r_1 OR _e_x_p_r_2 is true. _a_r_g_1 OOPP _a_r_g_2 OOPP is one of --eeqq, --nnee, --lltt, --llee, --ggtt, or --ggee. These arithmetic binary operators return true if _a_r_g_1 is equal to, not equal to, less than, less than or equal to, greater than, or greater than or equal to _a_r_g_2, respectively. _A_r_g_1 and _a_r_g_2 may be positive or negative integers. ttiimmeess Print the accumulated user and system times for the shell and for processes run from the shell. The return status is 0. ttrraapp [--llpp] [_a_r_g] [_s_i_g_s_p_e_c ...] The command _a_r_g is to be read and executed when the shell receives signal(s) _s_i_g_s_p_e_c. If _a_r_g is absent or --, all specified signals are reset to their original values (the values they had upon entrance to the shell). If _a_r_g is the null string the sig- nal specified by each _s_i_g_s_p_e_c is ignored by the shell and by the commands it invokes. If _a_r_g is --pp GNU 1996 March 20 20 BASH_BUILTINS(1) BASH_BUILTINS(1) then the trap commands associated with each _s_i_g_s_p_e_c are displayed. If no arguments are supplied or if only --pp is given, ttrraapp prints the list of commands associated with each signal number. Each _s_i_g_s_p_e_c is either a signal name defined in <_s_i_g_n_a_l_._h>, or a signal number. If a _s_i_g_s_p_e_c is EEXXIITT (0) the com- mand _a_r_g is executed on exit from the shell. If a _s_i_g_s_p_e_c is DDEEBBUUGG, the command _a_r_g is executed after every _s_i_m_p_l_e _c_o_m_m_a_n_d (see SSHHEELLLL GGRRAAMMMMAARR above). The --ll option causes the shell to print a list of signal names and their corresponding numbers. Sig- nals ignored upon entry to the shell cannot be trapped or reset. Trapped signals are reset to their original values in a child process when it is created. The return status is false if any _s_i_g_s_p_e_c is invalid; otherwise ttrraapp returns true. ttyyppee [--aallll] [--ttyyppee | --ppaatthh] _n_a_m_e [_n_a_m_e ...] With no options, indicate how each _n_a_m_e would be interpreted if used as a command name. If the --ttyyppee flag is used, ttyyppee prints a string which is one of _a_l_i_a_s, _k_e_y_w_o_r_d, _f_u_n_c_t_i_o_n, _b_u_i_l_t_i_n, or _f_i_l_e if _n_a_m_e is an alias, shell reserved word, function, builtin, or disk file, respectively. If the _n_a_m_e is not found, then nothing is printed, and an exit status of false is returned. If the --ppaatthh flag is used, ttyyppee either returns the name of the disk file that would be executed if _n_a_m_e were specified as a command name, or nothing if --ttyyppee would not return _f_i_l_e. If a command is hashed, --ppaatthh prints the hashed value, not necessarily the file that appears first in PPAATTHH. If the --aallll flag is used, ttyyppee prints all of the places that contain an executable named _n_a_m_e. This includes aliases and functions, if and only if the --ppaatthh flag is not also used. The table of hashed commands is not consulted when using --aallll. ttyyppee accepts --aa, --tt, and --pp in place of --aallll, --ttyyppee, and --ppaatthh, respectively. ttyyppee returns true if any of the arguments are found, false if none are found. uulliimmiitt [--SSHHaaccddffllmmnnppssttuuvv [_l_i_m_i_t]] Provides control over the resources available to the shell and to processes started by it, on sys- tems that allow such control. The value of _l_i_m_i_t can be a number in the unit specified for the resource, or the value uunnlliimmiitteedd. The --HH and --SS options specify that the hard or soft limit is set for the given resource. A hard limit cannot be increased once it is set; a soft limit may be increased up to the value of the hard limit. If neither --HH nor --SS is specified, both the soft and hard limits are set. If _l_i_m_i_t is omitted, the cur- rent value of the soft limit of the resource is GNU 1996 March 20 21 BASH_BUILTINS(1) BASH_BUILTINS(1) printed, unless the --HH option is given. When more than one resource is specified, the limit name and unit are printed before the value. Other options are interpreted as follows: --aa All current limits are reported --cc The maximum size of core files created --dd The maximum size of a process's data segment --ff The maximum size of files created by the shell --ll The maximum size that may be locked into memory --mm The maximum resident set size --nn The maximum number of open file descriptors (most systems do not allow this value to be set) --pp The pipe size in 512-byte blocks (this may not be set) --ss The maximum stack size --tt The maximum amount of cpu time in seconds --uu The maximum number of processes available to a single user --vv The maximum amount of virtual memory avail- able to the shell If _l_i_m_i_t is given, it is the new value of the spec- ified resource (the --aa option is display only). If no option is given, then --ff is assumed. Values are in 1024-byte increments, except for --tt, which is in seconds, --pp, which is in units of 512-byte blocks, and --nn and --uu, which are unscaled values. The return status is 0 unless an illegal option is encountered, a non-numeric argument other than uunnlliimmiitteedd is supplied as _l_i_m_i_t, or an error occurs while setting a new limit. uummaasskk [--SS] [_m_o_d_e] The user file-creation mask is set to _m_o_d_e. If _m_o_d_e begins with a digit, it is interpreted as an octal number; otherwise it is interpreted as a sym- bolic mode mask similar to that accepted by _c_h_m_o_d(1). If _m_o_d_e is omitted, or if the --SS option is supplied, the current value of the mask is printed. The --SS option causes the mask to be printed in symbolic form; the default output is an octal number. The return status is 0 if the mode was successfully changed or if no _m_o_d_e argument was supplied, and false otherwise. uunnaalliiaass [-aa] [_n_a_m_e ...] Remove _n_a_m_es from the list of defined aliases. If --aa is supplied, all alias definitions are removed. The return value is true unless a supplied _n_a_m_e is not a defined alias. GNU 1996 March 20 22 BASH_BUILTINS(1) BASH_BUILTINS(1) uunnsseett [-ffvv] [_n_a_m_e ...] For each _n_a_m_e, remove the corresponding variable or function. If no options are supplied, or the --vv option is given, each _n_a_m_e refers to a shell vari- able. Read-only variables may not be unset. If --ff is specifed, each _n_a_m_e refers to a shell function, and the function definition is removed. Each unset variable or function is removed from the environ- ment passed to subsequent commands. If any of RRAANN-- DDOOMM, SSEECCOONNDDSS, LLIINNEENNOO, HHIISSTTCCMMDD, or DDIIRRSSTTAACCKK are unset, they lose their special properties, even if they are subsequently reset. The exit status is true unless a _n_a_m_e does not exist or is readonly. wwaaiitt [_n] Wait for the specified process and return its ter- mination status. _n may be a process ID or a job specification; if a job spec is given, all pro- cesses in that job's pipeline are waited for. If _n is not given, all currently active child processes are waited for, and the return status is zero. If _n specifies a non-existent process or job, the return status is 127. Otherwise, the return status is the exit status of the last process or job waited for. SSEEEE AALLSSOO bash(1), sh(1) GNU 1996 March 20 23