From: Chet Ramey Date: Fri, 13 Dec 2024 14:51:46 +0000 (-0500) Subject: more documentation updates; fix two issues when displaying readline completions;... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb56d620e075e3c96ae84b52de6b74683d9ab320;p=thirdparty%2Fbash.git more documentation updates; fix two issues when displaying readline completions; fix another use-after-free error with readline undo lists --- diff --git a/CHANGES b/CHANGES index 4e6f2da9..4b826d0a 100644 --- a/CHANGES +++ b/CHANGES @@ -82,6 +82,9 @@ aa. Fixes for the Makefiles to simplify, remove some unused variables, and bb. Fix for the `exec' builtin to avoid duplicate error messages. +cc. `printf' now warns if there are no valid characters at all in an integer + argument. + 2. Changes to Readline a. Make sure the bracketed-paste input buffer is null-terminated when read @@ -105,6 +108,12 @@ g. Fix off-by-one error when tokenizing words like $((expr)) while performing h. Fixes for incremental searches and redisplay in the C locale. +i. Fixes for some use-after-free of the undo list errors when stacking multiple + commands that use rl_maybe_replace_line to save changes to a history entry. + +j. Fixes to ensure that completion-prefix-display-length and + colored-completion-prefix are mutually exclusive. + 3. New Features in Bash a. MULTIPLE_COPROCS is now enabled by default. @@ -168,6 +177,9 @@ b. New `force-meta-prefix' bindable variable, which forces the use of ESC as c. The default value for `readline-colored-completion-prefix' no longer has a leading `.'; the original report was based on a misunderstanding. +d. There is a new bindable command, `export-completions', which writes the + possible completions for a word to the standard output in a defined format. + ------------------------------------------------------------------------------ This document details the changes between this version, bash-5.3-alpha, and the previous version, bash-5.2-release. diff --git a/CHANGES-5.3 b/CHANGES-5.3 index 7afd65b2..286c9ff9 100644 --- a/CHANGES-5.3 +++ b/CHANGES-5.3 @@ -82,6 +82,9 @@ aa. Fixes for the Makefiles to simplify, remove some unused variables, and bb. Fix for the `exec' builtin to avoid duplicate error messages. +cc. `printf' now warns if there are no valid characters at all in an integer + argument. + 2. Changes to Readline a. Make sure the bracketed-paste input buffer is null-terminated when read @@ -105,6 +108,12 @@ g. Fix off-by-one error when tokenizing words like $((expr)) while performing h. Fixes for incremental searches and redisplay in the C locale. +i. Fixes for some use-after-free of the undo list errors when stacking multiple + commands that use rl_maybe_replace_line to save changes to a history entry. + +j. Fixes to ensure that completion-prefix-display-length and + colored-completion-prefix are mutually exclusive. + 3. New Features in Bash a. MULTIPLE_COPROCS is now enabled by default. @@ -168,6 +177,9 @@ b. New `force-meta-prefix' bindable variable, which forces the use of ESC as c. The default value for `readline-colored-completion-prefix' no longer has a leading `.'; the original report was based on a misunderstanding. +d. There is a new bindable command, `export-completions', which writes the + possible completions for a word to the standard output in a defined format. + ------------------------------------------------------------------------------ This document details the changes between this version, bash-5.3-alpha, and the previous version, bash-5.2-release. diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index 3b1bf124..bd87d2c9 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -10741,3 +10741,34 @@ lib/readline/doc/rluser.texi - updates for active voice, future tense, formatting and fonts, edits to Programmable Completion Suggestions from G. Branden Robinson + + 12/10 + ----- +lib/readline/complete.c + - fnprint: make sure _rl_completion_prefix_display_length and + _rl_colored_completion_prefix are mutually exclusive, since the + callers assume they are. + +bashline.c + - bash_default_completion: if we're trying to complete a glob pattern, + and rl_completion_type is '?', tell readline not to append a slash + if the pattern ends in one. + +doc/bash.1,lib/readline/doc/readline.3,lib/readline/doc/rluser.texi + - completion-prefix-display-length: note that readline uses `___' + instead of an ellipsis if the filename begins with a period + All reported by Frederick Abell + +doc/bash.1,doc/bashref.texi + - PIPESTATUS: enumerate the commands that set PIPESTATUS + From a report by Ulrich Müller + +lib/readline/isearch.c + - _rl_isearch_init: change to call _rl_maybe_replace_line with arg + of 1 so rl_undo_list gets cleared (see change from 12/1) + Report from Grisha Levit + + 12/13 + ----- +CHANGES,NEWS + - updated for bash-5.3-beta diff --git a/NEWS b/NEWS index 40f9a03a..3bd189d7 100644 --- a/NEWS +++ b/NEWS @@ -184,6 +184,9 @@ k. New `force-meta-prefix' bindable variable, which forces the use of ESC as l. The default value for `readline-colored-completion-prefix' no longer has a leading `.'; the original report was based on a misunderstanding. +m. There is a new bindable command, `export-completions', which writes the + possible completions for a word to the standard output in a defined format. + ------------------------------------------------------------------------------- This is a terse description of the new features added to bash-5.2 since the release of bash-5.1. As always, the manual page (doc/bash.1) is diff --git a/NEWS-5.3 b/NEWS-5.3 index 7f860ecf..1d2f647d 100644 --- a/NEWS-5.3 +++ b/NEWS-5.3 @@ -183,3 +183,6 @@ k. New `force-meta-prefix' bindable variable, which forces the use of ESC as l. The default value for `readline-colored-completion-prefix' no longer has a leading `.'; the original report was based on a misunderstanding. + +m. There is a new bindable command, `export-completions', which writes the + possible completions for a word to the standard output in a defined format. diff --git a/README b/README index 34621000..9bcf5705 100644 --- a/README +++ b/README @@ -16,7 +16,7 @@ from the POSIX spec and a description of the Bash `posix mode'. There are some user-visible incompatibilities between this version of Bash and previous widely-distributed versions, bash-5.0, bash-5.1, -and bash-5.2. For details, see the file COMPAT. The NEWS file tersely +and bash-5.2. The COMPAT file has the details. The NEWS file tersely lists features that are new in this release. Bash is free software, distributed under the terms of the [GNU] General diff --git a/bashline.c b/bashline.c index 34bbf74b..2b67baf2 100644 --- a/bashline.c +++ b/bashline.c @@ -1933,11 +1933,21 @@ bash_default_completion (const char *text, int start, int end, int qc, int compf strvec_dispose (matches); matches = (char **)0; } - else if (matches && matches[1] && rl_completion_type == '!') + else if (matches && matches[1] && (rl_completion_type == '!' || rl_completion_type == '@')) { rl_completion_suppress_append = 1; rl_filename_completion_desired = 0; } + else if (matches && matches[1] && rl_completion_type == '?') + { + size_t ind; + ind = (end > start) ? end - start - 1 : 0; + if (text[ind] == '/') + { + rl_completion_suppress_append = 1; + rl_filename_completion_desired = 0; + } + } } return (matches); diff --git a/doc/bash.0 b/doc/bash.0 index c5720067..d8aa1ad2 100644 --- a/doc/bash.0 +++ b/doc/bash.0 @@ -1120,9 +1120,13 @@ PPAARRAAMMEETTEERRSS dent. PPIIPPEESSTTAATTUUSS An array variable (see AArrrraayyss below) containing a list of exit - status values from the processes in the most-recently-executed + status values from the commands in the most-recently-executed foreground pipeline, which may consist of only a simple command - (see SSHHEELLLL GGRRAAMMMMAARR above). + (see SSHHEELLLL GGRRAAMMMMAARR above). BBaasshh sets PPIIPPEESSTTAATTUUSS after executing + multi-element pipelines, timed and negated pipelines, simple + commands, subshells created with the ( operator, the [[[[ and (((( + compound commands, and after error conditions that result in the + shell aborting command execution. PPPPIIDD The process ID of the shell's parent. This variable is read- only. PPWWDD The current working directory as set by the ccdd command. @@ -3732,162 +3736,164 @@ RREEAADDLLIINNEE of possible completions that is displayed without modification. When set to a value greater than zero, rreeaaddlliinnee replaces common prefixes longer than this value with an ellipsis when displaying - possible completions. + possible completions. If a completion begins with a period, and + eeaaddlliinnee is completing filenames, it uses three underscores in- + stead of an ellipsis. ccoommpplleettiioonn--qquueerryy--iitteemmss ((110000)) - This determines when the user is queried about viewing the num- - ber of possible completions generated by the ppoossssiibbllee--ccoommppllee-- - ttiioonnss command. It may be set to any integer value greater than - or equal to zero. If the number of possible completions is - greater than or equal to the value of this variable, rreeaaddlliinnee - asks whether or not the user wishes to view them; otherwise - rreeaaddlliinnee simply lists them on the terminal. A zero value means + This determines when the user is queried about viewing the num- + ber of possible completions generated by the ppoossssiibbllee--ccoommppllee-- + ttiioonnss command. It may be set to any integer value greater than + or equal to zero. If the number of possible completions is + greater than or equal to the value of this variable, rreeaaddlliinnee + asks whether or not the user wishes to view them; otherwise + rreeaaddlliinnee simply lists them on the terminal. A zero value means rreeaaddlliinnee should never ask; negative values are treated as zero. ccoonnvveerrtt--mmeettaa ((OOnn)) - If set to OOnn, rreeaaddlliinnee converts characters it reads that have - the eighth bit set to an ASCII key sequence by clearing the + If set to OOnn, rreeaaddlliinnee converts characters it reads that have + the eighth bit set to an ASCII key sequence by clearing the eighth bit and prefixing it with an escape character (converting - the character to have the meta prefix). The default is _O_n, but - rreeaaddlliinnee sets it to _O_f_f if the locale contains characters whose + the character to have the meta prefix). The default is _O_n, but + rreeaaddlliinnee sets it to _O_f_f if the locale contains characters whose encodings may include bytes with the eighth bit set. This vari- - able is dependent on the LLCC__CCTTYYPPEE locale category, and may - change if the locale changes. This variable also affects key + able is dependent on the LLCC__CCTTYYPPEE locale category, and may + change if the locale changes. This variable also affects key bindings; see the description of ffoorrccee--mmeettaa--pprreeffiixx below. ddiissaabbllee--ccoommpplleettiioonn ((OOffff)) - If set to OOnn, rreeaaddlliinnee inhibits word completion. Completion + If set to OOnn, rreeaaddlliinnee inhibits word completion. Completion characters are inserted into the line as if they had been mapped to sseellff--iinnsseerrtt. eecchhoo--ccoonnttrrooll--cchhaarraacctteerrss ((OOnn)) - When set to OOnn, on operating systems that indicate they support + When set to OOnn, on operating systems that indicate they support it, rreeaaddlliinnee echoes a character corresponding to a signal gener- ated from the keyboard. eeddiittiinngg--mmooddee ((eemmaaccss)) - Controls whether rreeaaddlliinnee uses a set of key bindings similar to + Controls whether rreeaaddlliinnee uses a set of key bindings similar to _E_m_a_c_s or _v_i. eeddiittiinngg--mmooddee can be set to either eemmaaccss or vvii. eemmaaccss--mmooddee--ssttrriinngg ((@@)) - If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is + If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is displayed immediately before the last line of the primary prompt when emacs editing mode is active. The value is expanded like a - key binding, so the standard set of meta- and control- prefixes - and backslash escape sequences is available. The \1 and \2 es- - capes begin and end sequences of non-printing characters, which - can be used to embed a terminal control sequence into the mode + key binding, so the standard set of meta- and control- prefixes + and backslash escape sequences is available. The \1 and \2 es- + capes begin and end sequences of non-printing characters, which + can be used to embed a terminal control sequence into the mode string. eennaabbllee--aaccttiivvee--rreeggiioonn ((OOnn)) - When this variable is set to _O_n, rreeaaddlliinnee allows certain com- + When this variable is set to _O_n, rreeaaddlliinnee allows certain com- mands to designate the region as _a_c_t_i_v_e. When the region is ac- tive, rreeaaddlliinnee highlights the text in the region using the value of the aaccttiivvee--rreeggiioonn--ssttaarrtt--ccoolloorr variable, which defaults to the - string that enables the terminal's standout mode. The active + string that enables the terminal's standout mode. The active region shows the text inserted by bracketed-paste and any match- ing text found by incremental and non-incremental history searches. eennaabbllee--bbrraacckkeetteedd--ppaassttee ((OOnn)) - When set to OOnn, rreeaaddlliinnee configures the terminal to insert each - paste into the editing buffer as a single string of characters, - instead of treating each character as if it had been read from - the keyboard. This is called _b_r_a_c_k_e_t_e_d_-_p_a_s_t_e _m_o_d_e; it prevents - rreeaaddlliinnee from executing any editing commands bound to key se- + When set to OOnn, rreeaaddlliinnee configures the terminal to insert each + paste into the editing buffer as a single string of characters, + instead of treating each character as if it had been read from + the keyboard. This is called _b_r_a_c_k_e_t_e_d_-_p_a_s_t_e _m_o_d_e; it prevents + rreeaaddlliinnee from executing any editing commands bound to key se- quences appearing in the pasted text. eennaabbllee--kkeeyyppaadd ((OOffff)) When set to OOnn, rreeaaddlliinnee tries to enable the application keypad - when it is called. Some systems need this to enable the arrow + when it is called. Some systems need this to enable the arrow keys. eennaabbllee--mmeettaa--kkeeyy ((OOnn)) - When set to OOnn, rreeaaddlliinnee tries to enable any meta modifier key + When set to OOnn, rreeaaddlliinnee tries to enable any meta modifier key the terminal claims to support. On many terminals, the Meta key - is used to send eight-bit characters; this variable checks for - the terminal capability that indicates the terminal can enable - and disable a mode that sets the eighth bit of a character - (0200) if the Meta key is held down when the character is typed + is used to send eight-bit characters; this variable checks for + the terminal capability that indicates the terminal can enable + and disable a mode that sets the eighth bit of a character + (0200) if the Meta key is held down when the character is typed (a meta character). eexxppaanndd--ttiillddee ((OOffff)) If set to OOnn, rreeaaddlliinnee performs tilde expansion when it attempts word completion. ffoorrccee--mmeettaa--pprreeffiixx ((OOffff)) - If set to OOnn, rreeaaddlliinnee modifies its behavior when binding key - sequences containing \M- or Meta- (see KKeeyy BBiinnddiinnggss above) by + If set to OOnn, rreeaaddlliinnee modifies its behavior when binding key + sequences containing \M- or Meta- (see KKeeyy BBiinnddiinnggss above) by converting a key sequence of the form \M-_C or Meta-_C to the two- - character sequence EESSCC _C (adding the meta prefix). If + character sequence EESSCC _C (adding the meta prefix). If ffoorrccee--mmeettaa--pprreeffiixx is set to OOffff (the default), rreeaaddlliinnee uses the - value of the ccoonnvveerrtt--mmeettaa variable to determine whether to per- - form this conversion: if ccoonnvveerrtt--mmeettaa is OOnn, rreeaaddlliinnee performs - the conversion described above; if it is OOffff, rreeaaddlliinnee converts + value of the ccoonnvveerrtt--mmeettaa variable to determine whether to per- + form this conversion: if ccoonnvveerrtt--mmeettaa is OOnn, rreeaaddlliinnee performs + the conversion described above; if it is OOffff, rreeaaddlliinnee converts _C to a meta character by setting the eighth bit (0200). hhiissttoorryy--pprreesseerrvvee--ppooiinntt ((OOffff)) - If set to OOnn, the history code attempts to place point at the - same location on each history line retrieved with pprreevviioouuss--hhiiss-- + If set to OOnn, the history code attempts to place point at the + same location on each history line retrieved with pprreevviioouuss--hhiiss-- ttoorryy or nneexxtt--hhiissttoorryy. hhiissttoorryy--ssiizzee ((uunnsseett)) - Set the maximum number of history entries saved in the history - list. If set to zero, any existing history entries are deleted + Set the maximum number of history entries saved in the history + list. If set to zero, any existing history entries are deleted and no new entries are saved. If set to a value less than zero, - the number of history entries is not limited. By default, bbaasshh - sets the the maximum number of history entries to the value of - the HHIISSTTSSIIZZEE shell variable. Setting _h_i_s_t_o_r_y_-_s_i_z_e to a non-nu- - meric value will set the maximum number of history entries to + the number of history entries is not limited. By default, bbaasshh + sets the the maximum number of history entries to the value of + the HHIISSTTSSIIZZEE shell variable. Setting _h_i_s_t_o_r_y_-_s_i_z_e to a non-nu- + meric value will set the maximum number of history entries to 500. hhoorriizzoonnttaall--ssccrroollll--mmooddee ((OOffff)) Setting this variable to OOnn makes rreeaaddlliinnee use a single line for - display, scrolling the input horizontally on a single screen - line when it becomes longer than the screen width rather than - wrapping to a new line. This setting is automatically enabled + display, scrolling the input horizontally on a single screen + line when it becomes longer than the screen width rather than + wrapping to a new line. This setting is automatically enabled for terminals of height 1. iinnppuutt--mmeettaa ((OOffff)) If set to OOnn, rreeaaddlliinnee enables eight-bit input (that is, it does not clear the eighth bit in the characters it reads), regardless of what the terminal claims it can support. The default is _O_f_f, - but rreeaaddlliinnee sets it to _O_n if the locale contains characters + but rreeaaddlliinnee sets it to _O_n if the locale contains characters whose encodings may include bytes with the eighth bit set. This - variable is dependent on the LLCC__CCTTYYPPEE locale category, and its + variable is dependent on the LLCC__CCTTYYPPEE locale category, and its value may change if the locale changes. The name mmeettaa--ffllaagg is a synonym for iinnppuutt--mmeettaa. iisseeaarrcchh--tteerrmmiinnaattoorrss (("CC--[[CC--jj")) - The string of characters that should terminate an incremental - search without subsequently executing the character as a com- - mand. If this variable has not been given a value, the charac- + The string of characters that should terminate an incremental + search without subsequently executing the character as a com- + mand. If this variable has not been given a value, the charac- ters _E_S_C and CC--jj terminate an incremental search. kkeeyymmaapp ((eemmaaccss)) - Set the current rreeaaddlliinnee keymap. The set of valid keymap names - is _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. The default value is _e_m_a_c_s; the + Set the current rreeaaddlliinnee keymap. The set of valid keymap names + is _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. The default value is _e_m_a_c_s; the value of eeddiittiinngg--mmooddee also affects the default keymap. kkeeyysseeqq--ttiimmeeoouutt ((550000)) - Specifies the duration rreeaaddlliinnee will wait for a character when - reading an ambiguous key sequence (one that can form a complete + Specifies the duration rreeaaddlliinnee will wait for a character when + reading an ambiguous key sequence (one that can form a complete key sequence using the input read so far, or can take additional - input to complete a longer key sequence). If rreeaaddlliinnee does not - receive any input within the timeout, it uses the shorter but - complete key sequence. The value is specified in milliseconds, - so a value of 1000 means that rreeaaddlliinnee will wait one second for - additional input. If this variable is set to a value less than - or equal to zero, or to a non-numeric value, rreeaaddlliinnee waits un- - til another key is pressed to decide which key sequence to com- + input to complete a longer key sequence). If rreeaaddlliinnee does not + receive any input within the timeout, it uses the shorter but + complete key sequence. The value is specified in milliseconds, + so a value of 1000 means that rreeaaddlliinnee will wait one second for + additional input. If this variable is set to a value less than + or equal to zero, or to a non-numeric value, rreeaaddlliinnee waits un- + til another key is pressed to decide which key sequence to com- plete. mmaarrkk--ddiirreeccttoorriieess ((OOnn)) If set to OOnn, completed directory names have a slash appended. mmaarrkk--mmooddiiffiieedd--lliinneess ((OOffff)) - If set to OOnn, rreeaaddlliinnee displays history lines that have been + If set to OOnn, rreeaaddlliinnee displays history lines that have been modified with a preceding asterisk (**). mmaarrkk--ssyymmlliinnkkeedd--ddiirreeccttoorriieess ((OOffff)) If set to OOnn, completed names which are symbolic links to direc- - tories have a slash appended, subject to the value of mmaarrkk--ddii-- + tories have a slash appended, subject to the value of mmaarrkk--ddii-- rreeccttoorriieess. mmaattcchh--hhiiddddeenn--ffiilleess ((OOnn)) - This variable, when set to OOnn, forces rreeaaddlliinnee to match files - whose names begin with a "." (hidden files) when performing - filename completion. If set to OOffff, the user must include the + This variable, when set to OOnn, forces rreeaaddlliinnee to match files + whose names begin with a "." (hidden files) when performing + filename completion. If set to OOffff, the user must include the leading "." in the filename to be completed. mmeennuu--ccoommpplleettee--ddiissppllaayy--pprreeffiixx ((OOffff)) - If set to OOnn, menu completion displays the common prefix of the + If set to OOnn, menu completion displays the common prefix of the list of possible completions (which may be empty) before cycling through the list. oouuttppuutt--mmeettaa ((OOffff)) - If set to OOnn, rreeaaddlliinnee displays characters with the eighth bit - set directly rather than as a meta-prefixed escape sequence. - The default is _O_f_f, but rreeaaddlliinnee sets it to _O_n if the locale - contains characters whose encodings may include bytes with the - eighth bit set. This variable is dependent on the LLCC__CCTTYYPPEE lo- + If set to OOnn, rreeaaddlliinnee displays characters with the eighth bit + set directly rather than as a meta-prefixed escape sequence. + The default is _O_f_f, but rreeaaddlliinnee sets it to _O_n if the locale + contains characters whose encodings may include bytes with the + eighth bit set. This variable is dependent on the LLCC__CCTTYYPPEE lo- cale category, and its value may change if the locale changes. ppaaggee--ccoommpplleettiioonnss ((OOnn)) If set to OOnn, rreeaaddlliinnee uses an internal pager resembling _m_o_r_e(1) @@ -3895,109 +3901,109 @@ RREEAADDLLIINNEE pprreeffeerr--vviissiibbllee--bbeellll See bbeellll--ssttyyllee. pprriinntt--ccoommpplleettiioonnss--hhoorriizzoonnttaallllyy ((OOffff)) - If set to OOnn, rreeaaddlliinnee displays completions with matches sorted + If set to OOnn, rreeaaddlliinnee displays completions with matches sorted horizontally in alphabetical order, rather than down the screen. rreevveerrtt--aallll--aatt--nneewwlliinnee ((OOffff)) - If set to OOnn, rreeaaddlliinnee will undo all changes to history lines - before returning when executing aacccceepptt--lliinnee. By default, his- - tory lines may be modified and retain individual undo lists + If set to OOnn, rreeaaddlliinnee will undo all changes to history lines + before returning when executing aacccceepptt--lliinnee. By default, his- + tory lines may be modified and retain individual undo lists across calls to rreeaaddlliinnee. sseeaarrcchh--iiggnnoorree--ccaassee ((OOffff)) - If set to OOnn, rreeaaddlliinnee performs incremental and non-incremental + If set to OOnn, rreeaaddlliinnee performs incremental and non-incremental history list searches in a case-insensitive fashion. sshhooww--aallll--iiff--aammbbiigguuoouuss ((OOffff)) - This alters the default behavior of the completion functions. + This alters the default behavior of the completion functions. If set to OOnn, words which have more than one possible completion - cause the matches to be listed immediately instead of ringing + cause the matches to be listed immediately instead of ringing the bell. sshhooww--aallll--iiff--uunnmmooddiiffiieedd ((OOffff)) - This alters the default behavior of the completion functions in + This alters the default behavior of the completion functions in a fashion similar to sshhooww--aallll--iiff--aammbbiigguuoouuss. If set to OOnn, words - which have more than one possible completion without any possi- - ble partial completion (the possible completions don't share a - common prefix) cause the matches to be listed immediately in- + which have more than one possible completion without any possi- + ble partial completion (the possible completions don't share a + common prefix) cause the matches to be listed immediately in- stead of ringing the bell. sshhooww--mmooddee--iinn--pprroommpptt ((OOffff)) - If set to OOnn, add a string to the beginning of the prompt indi- - cating the editing mode: emacs, vi command, or vi insertion. + If set to OOnn, add a string to the beginning of the prompt indi- + cating the editing mode: emacs, vi command, or vi insertion. The mode strings are user-settable (e.g., _e_m_a_c_s_-_m_o_d_e_-_s_t_r_i_n_g). sskkiipp--ccoommpplleetteedd--tteexxtt ((OOffff)) - If set to OOnn, this alters the default completion behavior when - inserting a single match into the line. It's only active when - performing completion in the middle of a word. If enabled, - rreeaaddlliinnee does not insert characters from the completion that - match characters after point in the word being completed, so + If set to OOnn, this alters the default completion behavior when + inserting a single match into the line. It's only active when + performing completion in the middle of a word. If enabled, + rreeaaddlliinnee does not insert characters from the completion that + match characters after point in the word being completed, so portions of the word following the cursor are not duplicated. vvii--ccmmdd--mmooddee--ssttrriinngg ((((ccmmdd)))) - If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is + If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is displayed immediately before the last line of the primary prompt - when vi editing mode is active and in command mode. The value + when vi editing mode is active and in command mode. The value is expanded like a key binding, so the standard set of meta- and - control- prefixes and backslash escape sequences is available. - The \1 and \2 escapes begin and end sequences of non-printing - characters, which can be used to embed a terminal control se- + control- prefixes and backslash escape sequences is available. + The \1 and \2 escapes begin and end sequences of non-printing + characters, which can be used to embed a terminal control se- quence into the mode string. vvii--iinnss--mmooddee--ssttrriinngg ((((iinnss)))) - If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is + If the _s_h_o_w_-_m_o_d_e_-_i_n_-_p_r_o_m_p_t variable is enabled, this string is displayed immediately before the last line of the primary prompt when vi editing mode is active and in insertion mode. The value is expanded like a key binding, so the standard set of meta- and - control- prefixes and backslash escape sequences is available. - The \1 and \2 escapes begin and end sequences of non-printing - characters, which can be used to embed a terminal control se- + control- prefixes and backslash escape sequences is available. + The \1 and \2 escapes begin and end sequences of non-printing + characters, which can be used to embed a terminal control se- quence into the mode string. vviissiibbllee--ssttaattss ((OOffff)) - If set to OOnn, a character denoting a file's type as reported by - _s_t_a_t(2) is appended to the filename when listing possible com- + If set to OOnn, a character denoting a file's type as reported by + _s_t_a_t(2) is appended to the filename when listing possible com- pletions. RReeaaddlliinnee CCoonnddiittiioonnaall CCoonnssttrruuccttss - RReeaaddlliinnee implements a facility similar in spirit to the conditional - compilation features of the C preprocessor which allows key bindings - and variable settings to be performed as the result of tests. There + RReeaaddlliinnee implements a facility similar in spirit to the conditional + compilation features of the C preprocessor which allows key bindings + and variable settings to be performed as the result of tests. There are four parser directives available. - $$iiff The $$iiff construct allows bindings to be made based on the edit- - ing mode, the terminal being used, or the application using - rreeaaddlliinnee. The text of the test, after any comparison operator, + $$iiff The $$iiff construct allows bindings to be made based on the edit- + ing mode, the terminal being used, or the application using + rreeaaddlliinnee. The text of the test, after any comparison operator, extends to the end of the line; unless otherwise noted, no char- acters are required to isolate it. - mmooddee The mmooddee== form of the $$iiff directive is used to test - whether rreeaaddlliinnee is in emacs or vi mode. This may be - used in conjunction with the sseett kkeeyymmaapp command, for in- - stance, to set bindings in the _e_m_a_c_s_-_s_t_a_n_d_a_r_d and - _e_m_a_c_s_-_c_t_l_x keymaps only if rreeaaddlliinnee is starting out in + mmooddee The mmooddee== form of the $$iiff directive is used to test + whether rreeaaddlliinnee is in emacs or vi mode. This may be + used in conjunction with the sseett kkeeyymmaapp command, for in- + stance, to set bindings in the _e_m_a_c_s_-_s_t_a_n_d_a_r_d and + _e_m_a_c_s_-_c_t_l_x keymaps only if rreeaaddlliinnee is starting out in emacs mode. - tteerrmm The tteerrmm== form may be used to include terminal-specific + tteerrmm The tteerrmm== form may be used to include terminal-specific key bindings, perhaps to bind the key sequences output by the terminal's function keys. The word on the right side of the == is tested against both the full name of the ter- - minal and the portion of the terminal name before the - first --. This allows _x_t_e_r_m to match both _x_t_e_r_m and + minal and the portion of the terminal name before the + first --. This allows _x_t_e_r_m to match both _x_t_e_r_m and _x_t_e_r_m_-_2_5_6_c_o_l_o_r, for instance. vveerrssiioonn - The vveerrssiioonn test may be used to perform comparisons - against specific rreeaaddlliinnee versions. The vveerrssiioonn expands - to the current rreeaaddlliinnee version. The set of comparison - operators includes ==, (and ====), !!==, <<==, >>==, <<, and >>. - The version number supplied on the right side of the op- - erator consists of a major version number, an optional + The vveerrssiioonn test may be used to perform comparisons + against specific rreeaaddlliinnee versions. The vveerrssiioonn expands + to the current rreeaaddlliinnee version. The set of comparison + operators includes ==, (and ====), !!==, <<==, >>==, <<, and >>. + The version number supplied on the right side of the op- + erator consists of a major version number, an optional decimal point, and an optional minor version (e.g., 77..11). - If the minor version is omitted, it defaults to 00. The - operator may be separated from the string vveerrssiioonn and + If the minor version is omitted, it defaults to 00. The + operator may be separated from the string vveerrssiioonn and from the version number argument by whitespace. _a_p_p_l_i_c_a_t_i_o_n The _a_p_p_l_i_c_a_t_i_o_n construct is used to include application- - specific settings. Each program using the rreeaaddlliinnee li- - brary sets the _a_p_p_l_i_c_a_t_i_o_n _n_a_m_e, and an initialization + specific settings. Each program using the rreeaaddlliinnee li- + brary sets the _a_p_p_l_i_c_a_t_i_o_n _n_a_m_e, and an initialization file can test for a particular value. This could be used - to bind key sequences to functions useful for a specific - program. For instance, the following command adds a key - sequence that quotes the current or previous word in + to bind key sequences to functions useful for a specific + program. For instance, the following command adds a key + sequence that quotes the current or previous word in bbaasshh: $$iiff Bash @@ -4007,12 +4013,12 @@ RREEAADDLLIINNEE _v_a_r_i_a_b_l_e The _v_a_r_i_a_b_l_e construct provides simple equality tests for - rreeaaddlliinnee variables and values. The permitted comparison - operators are _=, _=_=, and _!_=. The variable name must be + rreeaaddlliinnee variables and values. The permitted comparison + operators are _=, _=_=, and _!_=. The variable name must be separated from the comparison operator by whitespace; the - operator may be separated from the value on the right - hand side by whitespace. String and boolean variables - may be tested. Boolean variables must be tested against + operator may be separated from the value on the right + hand side by whitespace. String and boolean variables + may be tested. Boolean variables must be tested against the values _o_n and _o_f_f. $$eellssee Commands in this branch of the $$iiff directive are executed if the @@ -4022,71 +4028,71 @@ RREEAADDLLIINNEE command. $$iinncclluuddee - This directive takes a single filename as an argument and reads + This directive takes a single filename as an argument and reads commands and key bindings from that file. For example, the fol- lowing directive would read _/_e_t_c_/_i_n_p_u_t_r_c: $$iinncclluuddee _/_e_t_c_/_i_n_p_u_t_r_c SSeeaarrcchhiinngg - RReeaaddlliinnee provides commands for searching through the command history + RReeaaddlliinnee provides commands for searching through the command history (see HHIISSTTOORRYY below) for lines containing a specified string. There are two search modes: _i_n_c_r_e_m_e_n_t_a_l and _n_o_n_-_i_n_c_r_e_m_e_n_t_a_l. - Incremental searches begin before the user has finished typing the - search string. As each character of the search string is typed, rreeaadd-- + Incremental searches begin before the user has finished typing the + search string. As each character of the search string is typed, rreeaadd-- lliinnee displays the next entry from the history matching the string typed - so far. An incremental search requires only as many characters as - needed to find the desired history entry. When using emacs editing - mode, type CC--rr to search backward in the history for a particular - string. Typing CC--ss searches forward through the history. The charac- - ters present in the value of the iisseeaarrcchh--tteerrmmiinnaattoorrss variable are used - to terminate an incremental search. If that variable has not been as- - signed a value, _E_S_C and CC--jj terminate an incremental search. CC--gg - aborts an incremental search and restores the original line. When the - search is terminated, the history entry containing the search string + so far. An incremental search requires only as many characters as + needed to find the desired history entry. When using emacs editing + mode, type CC--rr to search backward in the history for a particular + string. Typing CC--ss searches forward through the history. The charac- + ters present in the value of the iisseeaarrcchh--tteerrmmiinnaattoorrss variable are used + to terminate an incremental search. If that variable has not been as- + signed a value, _E_S_C and CC--jj terminate an incremental search. CC--gg + aborts an incremental search and restores the original line. When the + search is terminated, the history entry containing the search string becomes the current line. - To find other matching entries in the history list, type CC--rr or CC--ss as - appropriate. This searches backward or forward in the history for the - next entry matching the search string typed so far. Any other key se- - quence bound to a rreeaaddlliinnee command terminates the search and executes - that command. For instance, a newline terminates the search and ac- + To find other matching entries in the history list, type CC--rr or CC--ss as + appropriate. This searches backward or forward in the history for the + next entry matching the search string typed so far. Any other key se- + quence bound to a rreeaaddlliinnee command terminates the search and executes + that command. For instance, a newline terminates the search and ac- cepts the line, thereby executing the command from the history list. A - movement command will terminate the search, make the last line found + movement command will terminate the search, make the last line found the current line, and begin editing. RReeaaddlliinnee remembers the last incremental search string. If two CC--rrs are - typed without any intervening characters defining a new search string, + typed without any intervening characters defining a new search string, rreeaaddlliinnee uses any remembered search string. - Non-incremental searches read the entire search string before starting + Non-incremental searches read the entire search string before starting to search for matching history entries. The search string may be typed by the user or be part of the contents of the current line. RReeaaddlliinnee CCoommmmaanndd NNaammeess - The following is a list of the names of the commands and the default + The following is a list of the names of the commands and the default key sequences to which they are bound. Command names without an accom- panying key sequence are unbound by default. In the following descriptions, _p_o_i_n_t refers to the current cursor posi- - tion, and _m_a_r_k refers to a cursor position saved by the sseett--mmaarrkk com- - mand. The text between the point and mark is referred to as the _r_e_- + tion, and _m_a_r_k refers to a cursor position saved by the sseett--mmaarrkk com- + mand. The text between the point and mark is referred to as the _r_e_- _g_i_o_n. RReeaaddlliinnee has the concept of an _a_c_t_i_v_e _r_e_g_i_o_n: when the region is active, rreeaaddlliinnee redisplay highlights the region using the value of the - aaccttiivvee--rreeggiioonn--ssttaarrtt--ccoolloorr variable. The eennaabbllee--aaccttiivvee--rreeggiioonn rreeaaddlliinnee + aaccttiivvee--rreeggiioonn--ssttaarrtt--ccoolloorr variable. The eennaabbllee--aaccttiivvee--rreeggiioonn rreeaaddlliinnee variable turns this on and off. Several commands set the region to ac- tive; those are noted below. CCoommmmaannddss ffoorr MMoovviinngg bbeeggiinnnniinngg--ooff--lliinnee ((CC--aa)) - Move to the start of the current line. This may also be bound + Move to the start of the current line. This may also be bound to the Home key on some keyboards. eenndd--ooff--lliinnee ((CC--ee)) - Move to the end of the line. This may also be bound to the End + Move to the end of the line. This may also be bound to the End key on some keyboards. ffoorrwwaarrdd--cchhaarr ((CC--ff)) - Move forward a character. This may also be bound to the right + Move forward a character. This may also be bound to the right arrow key on some keyboards. bbaacckkwwaarrdd--cchhaarr ((CC--bb)) Move back a character. This may also be bound to the left arrow @@ -4095,33 +4101,33 @@ RREEAADDLLIINNEE Move forward to the end of the next word. Words are composed of alphanumeric characters (letters and digits). bbaacckkwwaarrdd--wwoorrdd ((MM--bb)) - Move back to the start of the current or previous word. Words + Move back to the start of the current or previous word. Words are composed of alphanumeric characters (letters and digits). sshheellll--ffoorrwwaarrdd--wwoorrdd - Move forward to the end of the next word. Words are delimited + Move forward to the end of the next word. Words are delimited by non-quoted shell metacharacters. sshheellll--bbaacckkwwaarrdd--wwoorrdd - Move back to the start of the current or previous word. Words + Move back to the start of the current or previous word. Words are delimited by non-quoted shell metacharacters. pprreevviioouuss--ssccrreeeenn--lliinnee - Attempt to move point to the same physical screen column on the - previous physical screen line. This will not have the desired - effect if the current rreeaaddlliinnee line does not take up more than - one physical line or if point is not greater than the length of + Attempt to move point to the same physical screen column on the + previous physical screen line. This will not have the desired + effect if the current rreeaaddlliinnee line does not take up more than + one physical line or if point is not greater than the length of the prompt plus the screen width. nneexxtt--ssccrreeeenn--lliinnee - Attempt to move point to the same physical screen column on the - next physical screen line. This will not have the desired ef- + Attempt to move point to the same physical screen column on the + next physical screen line. This will not have the desired ef- fect if the current rreeaaddlliinnee line does not take up more than one - physical line or if the length of the current rreeaaddlliinnee line is + physical line or if the length of the current rreeaaddlliinnee line is not greater than the length of the prompt plus the screen width. cclleeaarr--ddiissppllaayy ((MM--CC--ll)) - Clear the screen and, if possible, the terminal's scrollback - buffer, then redraw the current line, leaving the current line + Clear the screen and, if possible, the terminal's scrollback + buffer, then redraw the current line, leaving the current line at the top of the screen. cclleeaarr--ssccrreeeenn ((CC--ll)) Clear the screen, then redraw the current line, leaving the cur- - rent line at the top of the screen. With an argument, refresh + rent line at the top of the screen. With an argument, refresh the current line without clearing the screen. rreeddrraaww--ccuurrrreenntt--lliinnee Refresh the current line. @@ -4129,48 +4135,48 @@ RREEAADDLLIINNEE CCoommmmaannddss ffoorr MMaanniippuullaattiinngg tthhee HHiissttoorryy aacccceepptt--lliinnee ((NNeewwlliinnee,, RReettuurrnn)) Accept the line regardless of where the cursor is. If this line - is non-empty, add it to the history list according to the state - of the HHIISSTTCCOONNTTRROOLL and HHIISSTTIIGGNNOORREE variables. If the line is a - modified history line, restore the history line to its original + is non-empty, add it to the history list according to the state + of the HHIISSTTCCOONNTTRROOLL and HHIISSTTIIGGNNOORREE variables. If the line is a + modified history line, restore the history line to its original state. pprreevviioouuss--hhiissttoorryy ((CC--pp)) Fetch the previous command from the history list, moving back in - the list. This may also be bound to the up arrow key on some + the list. This may also be bound to the up arrow key on some keyboards. nneexxtt--hhiissttoorryy ((CC--nn)) - Fetch the next command from the history list, moving forward in - the list. This may also be bound to the down arrow key on some + Fetch the next command from the history list, moving forward in + the list. This may also be bound to the down arrow key on some keyboards. bbeeggiinnnniinngg--ooff--hhiissttoorryy ((MM--<<)) Move to the first line in the history. eenndd--ooff--hhiissttoorryy ((MM-->>)) - Move to the end of the input history, i.e., the line currently + Move to the end of the input history, i.e., the line currently being entered. ooppeerraattee--aanndd--ggeett--nneexxtt ((CC--oo)) - Accept the current line for execution as if a newline had been - entered, and fetch the next line relative to the current line - from the history for editing. A numeric argument, if supplied, + Accept the current line for execution as if a newline had been + entered, and fetch the next line relative to the current line + from the history for editing. A numeric argument, if supplied, specifies the history entry to use instead of the current line. ffeettcchh--hhiissttoorryy - With a numeric argument, fetch that entry from the history list + With a numeric argument, fetch that entry from the history list and make it the current line. Without an argument, move back to the first entry in the history list. rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((CC--rr)) - Search backward starting at the current line and moving "up" - through the history as necessary. This is an incremental - search. This command sets the region to the matched text and - activates the region. - ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((CC--ss)) - Search forward starting at the current line and moving "down" + Search backward starting at the current line and moving "up" through the history as necessary. This is an incremental search. This command sets the region to the matched text and activates the region. + ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((CC--ss)) + Search forward starting at the current line and moving "down" + through the history as necessary. This is an incremental + search. This command sets the region to the matched text and + activates the region. nnoonn--iinnccrreemmeennttaall--rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((MM--pp)) Search backward through the history starting at the current line - using a non-incremental search for a string supplied by the + using a non-incremental search for a string supplied by the user. The search string may match anywhere in a history line. nnoonn--iinnccrreemmeennttaall--ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((MM--nn)) - Search forward through the history using a non-incremental + Search forward through the history using a non-incremental search for a string supplied by the user. The search string may match anywhere in a history line. hhiissttoorryy--sseeaarrcchh--bbaacckkwwaarrdd @@ -4180,72 +4186,72 @@ RREEAADDLLIINNEE non-incremental search. This may be bound to the Page Up key on some keyboards. hhiissttoorryy--sseeaarrcchh--ffoorrwwaarrdd - Search forward through the history for the string of characters + Search forward through the history for the string of characters between the start of the current line and the point. The search string must match at the beginning of a history line. This is a - non-incremental search. This may be bound to the Page Down key + non-incremental search. This may be bound to the Page Down key on some keyboards. hhiissttoorryy--ssuubbssttrriinngg--sseeaarrcchh--bbaacckkwwaarrdd Search backward through the history for the string of characters between the start of the current line and the point. The search - string may match anywhere in a history line. This is a non-in- + string may match anywhere in a history line. This is a non-in- cremental search. hhiissttoorryy--ssuubbssttrriinngg--sseeaarrcchh--ffoorrwwaarrdd - Search forward through the history for the string of characters + Search forward through the history for the string of characters between the start of the current line and the point. The search - string may match anywhere in a history line. This is a non-in- + string may match anywhere in a history line. This is a non-in- cremental search. yyaannkk--nntthh--aarrgg ((MM--CC--yy)) - Insert the first argument to the previous command (usually the + Insert the first argument to the previous command (usually the second word on the previous line) at point. With an argument _n, - insert the _nth word from the previous command (the words in the - previous command begin with word 0). A negative argument in- - serts the _nth word from the end of the previous command. Once - the argument _n is computed, this uses the history expansion fa- - cilities to extract the _nth word, as if the "!_n" history expan- + insert the _nth word from the previous command (the words in the + previous command begin with word 0). A negative argument in- + serts the _nth word from the end of the previous command. Once + the argument _n is computed, this uses the history expansion fa- + cilities to extract the _nth word, as if the "!_n" history expan- sion had been specified. yyaannkk--llaasstt--aarrgg ((MM--..,, MM--__)) - Insert the last argument to the previous command (the last word + Insert the last argument to the previous command (the last word of the previous history entry). With a numeric argument, behave - exactly like yyaannkk--nntthh--aarrgg. Successive calls to yyaannkk--llaasstt--aarrgg - move back through the history list, inserting the last word (or - the word specified by the argument to the first call) of each + exactly like yyaannkk--nntthh--aarrgg. Successive calls to yyaannkk--llaasstt--aarrgg + move back through the history list, inserting the last word (or + the word specified by the argument to the first call) of each line in turn. Any numeric argument supplied to these successive - calls determines the direction to move through the history. A - negative argument switches the direction through the history - (back or forward). This uses the history expansion facilities - to extract the last word, as if the "!$" history expansion had + calls determines the direction to move through the history. A + negative argument switches the direction through the history + (back or forward). This uses the history expansion facilities + to extract the last word, as if the "!$" history expansion had been specified. sshheellll--eexxppaanndd--lliinnee ((MM--CC--ee)) - Expand the line by performing shell word expansions. This per- + Expand the line by performing shell word expansions. This per- forms alias and history expansion, $$'_s_t_r_i_n_g' and $$"_s_t_r_i_n_g" quot- - ing, tilde expansion, parameter and variable expansion, arith- - metic expansion, command and process substitution, word split- - ting, and quote removal. An explicit argument suppresses com- - mand and process substitution. See HHIISSTTOORRYY EEXXPPAANNSSIIOONN below for + ing, tilde expansion, parameter and variable expansion, arith- + metic expansion, command and process substitution, word split- + ting, and quote removal. An explicit argument suppresses com- + mand and process substitution. See HHIISSTTOORRYY EEXXPPAANNSSIIOONN below for a description of history expansion. hhiissttoorryy--eexxppaanndd--lliinnee ((MM--^^)) - Perform history expansion on the current line. See HHIISSTTOORRYY EEXX-- + Perform history expansion on the current line. See HHIISSTTOORRYY EEXX-- PPAANNSSIIOONN below for a description of history expansion. mmaaggiicc--ssppaaccee - Perform history expansion on the current line and insert a + Perform history expansion on the current line and insert a space. See HHIISSTTOORRYY EEXXPPAANNSSIIOONN below for a description of history expansion. aalliiaass--eexxppaanndd--lliinnee - Perform alias expansion on the current line. See AALLIIAASSEESS above + Perform alias expansion on the current line. See AALLIIAASSEESS above for a description of alias expansion. hhiissttoorryy--aanndd--aalliiaass--eexxppaanndd--lliinnee Perform history and alias expansion on the current line. iinnsseerrtt--llaasstt--aarrgguummeenntt ((MM--..,, MM--__)) A synonym for yyaannkk--llaasstt--aarrgg. eeddiitt--aanndd--eexxeeccuuttee--ccoommmmaanndd ((CC--xx CC--ee)) - Invoke an editor on the current command line, and execute the + Invoke an editor on the current command line, and execute the result as shell commands. BBaasshh attempts to invoke $$VVIISSUUAALL, $$EEDD-- IITTOORR, and _e_m_a_c_s as the editor, in that order. CCoommmmaannddss ffoorr CChhaannggiinngg TTeexxtt _e_n_d_-_o_f_-_f_i_l_e ((uussuuaallllyy CC--dd)) - The character indicating end-of-file as set, for example, by + The character indicating end-of-file as set, for example, by _s_t_t_y(1). If this character is read when there are no characters on the line, and point is at the beginning of the line, rreeaaddlliinnee interprets it as the end of input and returns EEOOFF. @@ -4255,198 +4261,198 @@ RREEAADDLLIINNEE above for the effects. This may also be bound to the Delete key on some keyboards. bbaacckkwwaarrdd--ddeelleettee--cchhaarr ((RRuubboouutt)) - Delete the character behind the cursor. When given a numeric + Delete the character behind the cursor. When given a numeric argument, save the deleted text on the kill ring. ffoorrwwaarrdd--bbaacckkwwaarrdd--ddeelleettee--cchhaarr - Delete the character under the cursor, unless the cursor is at + Delete the character under the cursor, unless the cursor is at the end of the line, in which case the character behind the cur- sor is deleted. qquuootteedd--iinnsseerrtt ((CC--qq,, CC--vv)) - Add the next character typed to the line verbatim. This is how + Add the next character typed to the line verbatim. This is how to insert characters like CC--qq, for example. ttaabb--iinnsseerrtt ((CC--vv TTAABB)) Insert a tab character. sseellff--iinnsseerrtt ((aa,, bb,, AA,, 11,, !!,, ...)) Insert the character typed. bbrraacckkeetteedd--ppaassttee--bbeeggiinn - This function is intended to be bound to the "bracketed paste" - escape sequence sent by some terminals, and such a binding is - assigned by default. It allows rreeaaddlliinnee to insert the pasted - text as a single unit without treating each character as if it - had been read from the keyboard. The pasted characters are in- - serted as if each one was bound to sseellff--iinnsseerrtt instead of exe- + This function is intended to be bound to the "bracketed paste" + escape sequence sent by some terminals, and such a binding is + assigned by default. It allows rreeaaddlliinnee to insert the pasted + text as a single unit without treating each character as if it + had been read from the keyboard. The pasted characters are in- + serted as if each one was bound to sseellff--iinnsseerrtt instead of exe- cuting any editing commands. - Bracketed paste sets the region to the inserted text and acti- + Bracketed paste sets the region to the inserted text and acti- vates the region. ttrraannssppoossee--cchhaarrss ((CC--tt)) - Drag the character before point forward over the character at - point, moving point forward as well. If point is at the end of - the line, then this transposes the two characters before point. + Drag the character before point forward over the character at + point, moving point forward as well. If point is at the end of + the line, then this transposes the two characters before point. Negative arguments have no effect. ttrraannssppoossee--wwoorrddss ((MM--tt)) - Drag the word before point past the word after point, moving - point over that word as well. If point is at the end of the + Drag the word before point past the word after point, moving + point over that word as well. If point is at the end of the line, this transposes the last two words on the line. sshheellll--ttrraannssppoossee--wwoorrddss ((MM--CC--tt)) - Drag the word before point past the word after point, moving - point past that word as well. If the insertion point is at the + Drag the word before point past the word after point, moving + point past that word as well. If the insertion point is at the end of the line, this transposes the last two words on the line. - Word boundaries are the same as sshheellll--ffoorrwwaarrdd--wwoorrdd and + Word boundaries are the same as sshheellll--ffoorrwwaarrdd--wwoorrdd and sshheellll--bbaacckkwwaarrdd--wwoorrdd. uuppccaassee--wwoorrdd ((MM--uu)) - Uppercase the current (or following) word. With a negative ar- + Uppercase the current (or following) word. With a negative ar- gument, uppercase the previous word, but do not move point. ddoowwnnccaassee--wwoorrdd ((MM--ll)) - Lowercase the current (or following) word. With a negative ar- + Lowercase the current (or following) word. With a negative ar- gument, lowercase the previous word, but do not move point. ccaappiittaalliizzee--wwoorrdd ((MM--cc)) Capitalize the current (or following) word. With a negative ar- gument, capitalize the previous word, but do not move point. oovveerrwwrriittee--mmooddee - Toggle overwrite mode. With an explicit positive numeric argu- + Toggle overwrite mode. With an explicit positive numeric argu- ment, switches to overwrite mode. With an explicit non-positive numeric argument, switches to insert mode. This command affects - only eemmaaccss mode; vvii mode does overwrite differently. Each call + only eemmaaccss mode; vvii mode does overwrite differently. Each call to _r_e_a_d_l_i_n_e_(_) starts in insert mode. - In overwrite mode, characters bound to sseellff--iinnsseerrtt replace the - text at point rather than pushing the text to the right. Char- - acters bound to bbaacckkwwaarrdd--ddeelleettee--cchhaarr replace the character be- - fore point with a space. By default, this command is unbound, + In overwrite mode, characters bound to sseellff--iinnsseerrtt replace the + text at point rather than pushing the text to the right. Char- + acters bound to bbaacckkwwaarrdd--ddeelleettee--cchhaarr replace the character be- + fore point with a space. By default, this command is unbound, but may be bound to the Insert key on some keyboards. KKiilllliinngg aanndd YYaannkkiinngg kkiillll--lliinnee ((CC--kk)) Kill the text from point to the end of the current line. With a - negative numeric argument, kill backward from the cursor to the + negative numeric argument, kill backward from the cursor to the beginning of the line. bbaacckkwwaarrdd--kkiillll--lliinnee ((CC--xx RRuubboouutt)) Kill backward to the beginning of the current line. With a neg- - ative numeric argument, kill forward from the cursor to the end + ative numeric argument, kill forward from the cursor to the end of the line. uunniixx--lliinnee--ddiissccaarrdd ((CC--uu)) - Kill backward from point to the beginning of the line, saving + Kill backward from point to the beginning of the line, saving the killed text on the kill-ring. kkiillll--wwhhoollee--lliinnee - Kill all characters on the current line, no matter where point + Kill all characters on the current line, no matter where point is. kkiillll--wwoorrdd ((MM--dd)) - Kill from point to the end of the current word, or if between - words, to the end of the next word. Word boundaries are the + Kill from point to the end of the current word, or if between + words, to the end of the next word. Word boundaries are the same as those used by ffoorrwwaarrdd--wwoorrdd. bbaacckkwwaarrdd--kkiillll--wwoorrdd ((MM--RRuubboouutt)) - Kill the word behind point. Word boundaries are the same as + Kill the word behind point. Word boundaries are the same as those used by bbaacckkwwaarrdd--wwoorrdd. sshheellll--kkiillll--wwoorrdd ((MM--CC--dd)) - Kill from point to the end of the current word, or if between - words, to the end of the next word. Word boundaries are the + Kill from point to the end of the current word, or if between + words, to the end of the next word. Word boundaries are the same as those used by sshheellll--ffoorrwwaarrdd--wwoorrdd. sshheellll--bbaacckkwwaarrdd--kkiillll--wwoorrdd - Kill the word behind point. Word boundaries are the same as + Kill the word behind point. Word boundaries are the same as those used by sshheellll--bbaacckkwwaarrdd--wwoorrdd. uunniixx--wwoorrdd--rruubboouutt ((CC--ww)) - Kill the word behind point, using white space as a word bound- + Kill the word behind point, using white space as a word bound- ary, saving the killed text on the kill-ring. uunniixx--ffiilleennaammee--rruubboouutt - Kill the word behind point, using white space and the slash - character as the word boundaries, saving the killed text on the + Kill the word behind point, using white space and the slash + character as the word boundaries, saving the killed text on the kill-ring. ddeelleettee--hhoorriizzoonnttaall--ssppaaccee ((MM--\\)) Delete all spaces and tabs around point. kkiillll--rreeggiioonn Kill the text in the current region. ccooppyy--rreeggiioonn--aass--kkiillll - Copy the text in the region to the kill buffer, so it can be + Copy the text in the region to the kill buffer, so it can be yanked immediately. ccooppyy--bbaacckkwwaarrdd--wwoorrdd - Copy the word before point to the kill buffer. The word bound- + Copy the word before point to the kill buffer. The word bound- aries are the same as bbaacckkwwaarrdd--wwoorrdd. ccooppyy--ffoorrwwaarrdd--wwoorrdd - Copy the word following point to the kill buffer. The word + Copy the word following point to the kill buffer. The word boundaries are the same as ffoorrwwaarrdd--wwoorrdd. yyaannkk ((CC--yy)) Yank the top of the kill ring into the buffer at point. yyaannkk--ppoopp ((MM--yy)) - Rotate the kill ring, and yank the new top. Only works follow- + Rotate the kill ring, and yank the new top. Only works follow- ing yyaannkk or yyaannkk--ppoopp. NNuummeerriicc AArrgguummeennttss ddiiggiitt--aarrgguummeenntt ((MM--00,, MM--11,, ...,, MM----)) - Add this digit to the argument already accumulating, or start a + Add this digit to the argument already accumulating, or start a new argument. M-- starts a negative argument. uunniivveerrssaall--aarrgguummeenntt - This is another way to specify an argument. If this command is - followed by one or more digits, optionally with a leading minus - sign, those digits define the argument. If the command is fol- + This is another way to specify an argument. If this command is + followed by one or more digits, optionally with a leading minus + sign, those digits define the argument. If the command is fol- lowed by digits, executing uunniivveerrssaall--aarrgguummeenntt again ends the nu- meric argument, but is otherwise ignored. As a special case, if this command is immediately followed by a character that is nei- - ther a digit nor minus sign, the argument count for the next - command is multiplied by four. The argument count is initially - one, so executing this function the first time makes the argu- + ther a digit nor minus sign, the argument count for the next + command is multiplied by four. The argument count is initially + one, so executing this function the first time makes the argu- ment count four, a second time makes the argument count sixteen, and so on. CCoommpplleettiinngg ccoommpplleettee ((TTAABB)) - Attempt to perform completion on the text before point. BBaasshh - attempts completion by first checking for any programmable com- - pletions for the command word (see PPrrooggrraammmmaabbllee CCoommpplleettiioonn be- + Attempt to perform completion on the text before point. BBaasshh + attempts completion by first checking for any programmable com- + pletions for the command word (see PPrrooggrraammmmaabbllee CCoommpplleettiioonn be- low), otherwise treating the text as a variable (if the text be- gins with $$), username (if the text begins with ~~), hostname (if - the text begins with @@), or command (including aliases, func- - tions, and builtins) in turn. If none of these produces a + the text begins with @@), or command (including aliases, func- + tions, and builtins) in turn. If none of these produces a match, it falls back to filename completion. ppoossssiibbllee--ccoommpplleettiioonnss ((MM--??)) - List the possible completions of the text before point. When + List the possible completions of the text before point. When displaying completions, rreeaaddlliinnee sets the number of columns used - for display to the value of ccoommpplleettiioonn--ddiissppllaayy--wwiiddtthh, the value - of the shell variable CCOOLLUUMMNNSS, or the screen width, in that or- + for display to the value of ccoommpplleettiioonn--ddiissppllaayy--wwiiddtthh, the value + of the shell variable CCOOLLUUMMNNSS, or the screen width, in that or- der. iinnsseerrtt--ccoommpplleettiioonnss ((MM--**)) - Insert all completions of the text before point that would have + Insert all completions of the text before point that would have been generated by ppoossssiibbllee--ccoommpplleettiioonnss, separated by a space. mmeennuu--ccoommpplleettee - Similar to ccoommpplleettee, but replaces the word to be completed with - a single match from the list of possible completions. Repeat- - edly executing mmeennuu--ccoommpplleettee steps through the list of possible - completions, inserting each match in turn. At the end of the - list of completions, mmeennuu--ccoommpplleettee rings the bell (subject to - the setting of bbeellll--ssttyyllee) and restores the original text. An - argument of _n moves _n positions forward in the list of matches; - a negative argument moves backward through the list. This com- + Similar to ccoommpplleettee, but replaces the word to be completed with + a single match from the list of possible completions. Repeat- + edly executing mmeennuu--ccoommpplleettee steps through the list of possible + completions, inserting each match in turn. At the end of the + list of completions, mmeennuu--ccoommpplleettee rings the bell (subject to + the setting of bbeellll--ssttyyllee) and restores the original text. An + argument of _n moves _n positions forward in the list of matches; + a negative argument moves backward through the list. This com- mand is intended to be bound to TTAABB, but is unbound by default. mmeennuu--ccoommpplleettee--bbaacckkwwaarrdd - Identical to mmeennuu--ccoommpplleettee, but moves backward through the list - of possible completions, as if mmeennuu--ccoommpplleettee had been given a + Identical to mmeennuu--ccoommpplleettee, but moves backward through the list + of possible completions, as if mmeennuu--ccoommpplleettee had been given a negative argument. This command is unbound by default. eexxppoorrtt--ccoommpplleettiioonnss - Perform completion on the word before point as described above - and write the list of possible completions to rreeaaddlliinnee's output - stream using the following format, writing information on sepa- + Perform completion on the word before point as described above + and write the list of possible completions to rreeaaddlliinnee's output + stream using the following format, writing information on sepa- rate lines: +o the number of matches _N; +o the word being completed; - +o _S:_E, where S and E are the start and end offsets of the + +o _S:_E, where S and E are the start and end offsets of the word in the rreeaaddlliinnee line buffer; then +o each match, one per line - If there are no matches, the first line will be "0", and this - command does not print any output after the _S:_E. If there is - only a single match, this prints a single line containing it. - If there is more than one match, this prints the common prefix - of the matches, which may be empty, on the first line after the + If there are no matches, the first line will be "0", and this + command does not print any output after the _S:_E. If there is + only a single match, this prints a single line containing it. + If there is more than one match, this prints the common prefix + of the matches, which may be empty, on the first line after the _S:_E, then the matches on subsequent lines. In this case, _N will include the first line with the common prefix. The user or application should be able to accommodate the possi- bility of a blank line. The intent is that the user or applica- - tion reads _N lines after the line containing _S:_E to obtain the + tion reads _N lines after the line containing _S:_E to obtain the match list. This command is unbound by default. ddeelleettee--cchhaarr--oorr--lliisstt - Deletes the character under the cursor if not at the beginning - or end of the line (like ddeelleettee--cchhaarr). At the end of the line, + Deletes the character under the cursor if not at the beginning + or end of the line (like ddeelleettee--cchhaarr). At the end of the line, it behaves identically to ppoossssiibbllee--ccoommpplleettiioonnss. This command is unbound by default. @@ -4458,7 +4464,7 @@ RREEAADDLLIINNEE it as a filename. ccoommpplleettee--uusseerrnnaammee ((MM--~~)) - Attempt completion on the text before point, treating it as a + Attempt completion on the text before point, treating it as a username. ppoossssiibbllee--uusseerrnnaammee--ccoommpplleettiioonnss ((CC--xx ~~)) @@ -4466,7 +4472,7 @@ RREEAADDLLIINNEE it as a username. ccoommpplleettee--vvaarriiaabbllee ((MM--$$)) - Attempt completion on the text before point, treating it as a + Attempt completion on the text before point, treating it as a shell variable. ppoossssiibbllee--vvaarriiaabbllee--ccoommpplleettiioonnss ((CC--xx $$)) @@ -4474,7 +4480,7 @@ RREEAADDLLIINNEE it as a shell variable. ccoommpplleettee--hhoossttnnaammee ((MM--@@)) - Attempt completion on the text before point, treating it as a + Attempt completion on the text before point, treating it as a hostname. ppoossssiibbllee--hhoossttnnaammee--ccoommpplleettiioonnss ((CC--xx @@)) @@ -4482,9 +4488,9 @@ RREEAADDLLIINNEE it as a hostname. ccoommpplleettee--ccoommmmaanndd ((MM--!!)) - Attempt completion on the text before point, treating it as a - command name. Command completion attempts to match the text - against aliases, reserved words, shell functions, shell + Attempt completion on the text before point, treating it as a + command name. Command completion attempts to match the text + against aliases, reserved words, shell functions, shell builtins, and finally executable filenames, in that order. ppoossssiibbllee--ccoommmmaanndd--ccoommpplleettiioonnss ((CC--xx !!)) @@ -4492,42 +4498,42 @@ RREEAADDLLIINNEE it as a command name. ddyynnaammiicc--ccoommpplleettee--hhiissttoorryy ((MM--TTAABB)) - Attempt completion on the text before point, comparing the text + Attempt completion on the text before point, comparing the text against history list entries for possible completion matches. ddaabbbbrreevv--eexxppaanndd - Attempt menu completion on the text before point, comparing the + Attempt menu completion on the text before point, comparing the text against lines from the history list for possible completion matches. ccoommpplleettee--iinnttoo--bbrraacceess ((MM--{{)) Perform filename completion and insert the list of possible com- - pletions enclosed within braces so the list is available to the + pletions enclosed within braces so the list is available to the shell (see BBrraaccee EExxppaannssiioonn above). KKeeyybbooaarrdd MMaaccrrooss ssttaarrtt--kkbbdd--mmaaccrroo ((CC--xx (()) - Begin saving the characters typed into the current keyboard + Begin saving the characters typed into the current keyboard macro. eenndd--kkbbdd--mmaaccrroo ((CC--xx )))) Stop saving the characters typed into the current keyboard macro and store the definition. ccaallll--llaasstt--kkbbdd--mmaaccrroo ((CC--xx ee)) - Re-execute the last keyboard macro defined, by making the char- + Re-execute the last keyboard macro defined, by making the char- acters in the macro appear as if typed at the keyboard. pprriinntt--llaasstt--kkbbdd--mmaaccrroo (()) - Print the last keyboard macro defined in a format suitable for + Print the last keyboard macro defined in a format suitable for the _i_n_p_u_t_r_c file. MMiisscceellllaanneeoouuss rree--rreeaadd--iinniitt--ffiillee ((CC--xx CC--rr)) - Read in the contents of the _i_n_p_u_t_r_c file, and incorporate any + Read in the contents of the _i_n_p_u_t_r_c file, and incorporate any bindings or variable assignments found there. aabboorrtt ((CC--gg)) - Abort the current editing command and ring the terminal's bell + Abort the current editing command and ring the terminal's bell (subject to the setting of bbeellll--ssttyyllee). ddoo--lloowweerrccaassee--vveerrssiioonn ((MM--AA,, MM--BB,, MM--_x,, ...)) - If the metafied character _x is uppercase, run the command that + If the metafied character _x is uppercase, run the command that is bound to the corresponding metafied lowercase character. The behavior is undefined if _x is already lowercase. pprreeffiixx--mmeettaa ((EESSCC)) @@ -4535,223 +4541,223 @@ RREEAADDLLIINNEE uunnddoo ((CC--__,, CC--xx CC--uu)) Incremental undo, separately remembered for each line. rreevveerrtt--lliinnee ((MM--rr)) - Undo all changes made to this line. This is like executing the - uunnddoo command enough times to return the line to its initial + Undo all changes made to this line. This is like executing the + uunnddoo command enough times to return the line to its initial state. ttiillddee--eexxppaanndd ((MM--&&)) Perform tilde expansion on the current word. sseett--mmaarrkk ((CC--@@,, MM--<>)) - Set the mark to the point. If a numeric argument is supplied, + Set the mark to the point. If a numeric argument is supplied, set the mark to that position. eexxcchhaannggee--ppooiinntt--aanndd--mmaarrkk ((CC--xx CC--xx)) - Swap the point with the mark. Set the current cursor position + Swap the point with the mark. Set the current cursor position to the saved position, then set the mark to the old cursor posi- tion. cchhaarraacctteerr--sseeaarrcchh ((CC--]])) - Read a character and move point to the next occurrence of that - character. A negative argument searches for previous occur- + Read a character and move point to the next occurrence of that + character. A negative argument searches for previous occur- rences. cchhaarraacctteerr--sseeaarrcchh--bbaacckkwwaarrdd ((MM--CC--]])) - Read a character and move point to the previous occurrence of + Read a character and move point to the previous occurrence of that character. A negative argument searches for subsequent oc- currences. sskkiipp--ccssii--sseeqquueennccee - Read enough characters to consume a multi-key sequence such as - those defined for keys like Home and End. CSI sequences begin + Read enough characters to consume a multi-key sequence such as + those defined for keys like Home and End. CSI sequences begin with a Control Sequence Indicator (CSI), usually _E_S_C _[. If this sequence is bound to "\e[", keys producing CSI sequences have no effect unless explicitly bound to a rreeaaddlliinnee command, instead of inserting stray characters into the editing buffer. This is un- bound by default, but usually bound to _E_S_C _[. iinnsseerrtt--ccoommmmeenntt ((MM--##)) - Without a numeric argument, insert the value of the rreeaaddlliinnee + Without a numeric argument, insert the value of the rreeaaddlliinnee ccoommmmeenntt--bbeeggiinn variable 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 ccoommmmeenntt--bbeeggiinn, insert the value; otherwise delete the - characters in ccoommmmeenntt--bbeeggiinn from the beginning of the line. In - either case, the line is accepted as if a newline had been - typed. The default value of ccoommmmeenntt--bbeeggiinn causes this command + 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 ccoommmmeenntt--bbeeggiinn, insert the value; otherwise delete the + characters in ccoommmmeenntt--bbeeggiinn from the beginning of the line. In + either case, the line is accepted as if a newline had been + typed. The default value of ccoommmmeenntt--bbeeggiinn causes this command to make the current line a shell comment. If a numeric argument causes the comment character to be removed, the line will be ex- ecuted by the shell. ssppeellll--ccoorrrreecctt--wwoorrdd ((CC--xx ss)) - Perform spelling correction on the current word, treating it as - a directory or filename, in the same way as the ccddssppeellll shell - option. Word boundaries are the same as those used by + Perform spelling correction on the current word, treating it as + a directory or filename, in the same way as the ccddssppeellll shell + option. Word boundaries are the same as those used by sshheellll--ffoorrwwaarrdd--wwoorrdd. gglloobb--ccoommpplleettee--wwoorrdd ((MM--gg)) Treat the word before point as a pattern for pathname expansion, - with an asterisk implicitly appended, then use the pattern to + with an asterisk implicitly appended, then use the pattern to generate a list of matching file names for possible completions. gglloobb--eexxppaanndd--wwoorrdd ((CC--xx **)) Treat the word before point as a pattern for pathname expansion, - and insert the list of matching file names, replacing the word. - If a numeric argument is supplied, append a ** before pathname + and insert the list of matching file names, replacing the word. + If a numeric argument is supplied, append a ** before pathname expansion. gglloobb--lliisstt--eexxppaannssiioonnss ((CC--xx gg)) Display the list of expansions that would have been generated by - gglloobb--eexxppaanndd--wwoorrdd and redisplay the line. If a numeric argument + gglloobb--eexxppaanndd--wwoorrdd and redisplay the line. If a numeric argument is supplied, append a ** before pathname expansion. dduummpp--ffuunnccttiioonnss - Print all of the functions and their key bindings to the rreeaadd-- + Print all of the functions and their key bindings to the rreeaadd-- lliinnee output stream. If a numeric argument is supplied, the out- - put is formatted in such a way that it can be made part of an + put is formatted in such a way that it can be made part of an _i_n_p_u_t_r_c file. dduummpp--vvaarriiaabblleess Print all of the settable rreeaaddlliinnee variables and their values to - the rreeaaddlliinnee output stream. If a numeric argument is supplied, - the output is formatted in such a way that it can be made part + the rreeaaddlliinnee output stream. If a numeric argument is supplied, + the output is formatted in such a way that it can be made part of an _i_n_p_u_t_r_c file. dduummpp--mmaaccrrooss - Print all of the rreeaaddlliinnee key sequences bound to macros and the + Print all of the rreeaaddlliinnee key sequences bound to macros and the strings they output to the rreeaaddlliinnee output stream. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an _i_n_p_u_t_r_c file. eexxeeccuuttee--nnaammeedd--ccoommmmaanndd ((MM--xx)) Read a bindable rreeaaddlliinnee command name from the input and execute - the function to which it's bound, as if the key sequence to - which it was bound appeared in the input. If this function is + the function to which it's bound, as if the key sequence to + which it was bound appeared in the input. If this function is supplied with a numeric argument, it passes that argument to the function it executes. ddiissppllaayy--sshheellll--vveerrssiioonn ((CC--xx CC--vv)) Display version information about the current instance of bbaasshh. PPrrooggrraammmmaabbllee CCoommpplleettiioonn - When a user attempts word completion for a command or an argument to a - command for which a completion specification (a _c_o_m_p_s_p_e_c) has been de- - fined using the ccoommpplleettee builtin (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below), + When a user attempts word completion for a command or an argument to a + command for which a completion specification (a _c_o_m_p_s_p_e_c) has been de- + fined using the ccoommpplleettee builtin (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below), rreeaaddlliinnee invokes the programmable completion facilities. - First, bbaasshh identifies the command name. If a compspec has been de- - fined for that command, the compspec is used to generate the list of - possible completions for the word. If the command word is the empty - string (completion attempted at the beginning of an empty line), bbaasshh - uses any compspec defined with the --EE option to ccoommpplleettee. The --II op- - tion to ccoommpplleettee indicates that the command word is the first non-as- + First, bbaasshh identifies the command name. If a compspec has been de- + fined for that command, the compspec is used to generate the list of + possible completions for the word. If the command word is the empty + string (completion attempted at the beginning of an empty line), bbaasshh + uses any compspec defined with the --EE option to ccoommpplleettee. The --II op- + tion to ccoommpplleettee indicates that the command word is the first non-as- signment word on the line, or after a command delimiter such as ;; or ||. This usually indicates command name completion. - If the command word is a full pathname, bbaasshh searches for a compspec - for the full pathname first. If there is no compspec for the full - pathname, bbaasshh attempts to find a compspec for the portion following - the final slash. If those searches do not result in a compspec, or if - there is no compspec for the command word, bbaasshh uses any compspec de- - fined with the --DD option to ccoommpplleettee as the default. If there is no - default compspec, bbaasshh performs alias expansion on the command word as - a final resort, and attempts to find a compspec for the command word + If the command word is a full pathname, bbaasshh searches for a compspec + for the full pathname first. If there is no compspec for the full + pathname, bbaasshh attempts to find a compspec for the portion following + the final slash. If those searches do not result in a compspec, or if + there is no compspec for the command word, bbaasshh uses any compspec de- + fined with the --DD option to ccoommpplleettee as the default. If there is no + default compspec, bbaasshh performs alias expansion on the command word as + a final resort, and attempts to find a compspec for the command word resulting from any successful expansion. If a compspec is not found, bbaasshh performs its default completion as de- - scribed above under CCoommpplleettiinngg. Otherwise, once a compspec has been + scribed above under CCoommpplleettiinngg. Otherwise, once a compspec has been found, bbaasshh uses it to generate the list of matching words. - First, bbaasshh performs the _a_c_t_i_o_n_s specified by the compspec. This only - returns matches which are prefixes of the word being completed. When - the --ff or --dd option is used for filename or directory name completion, + First, bbaasshh performs the _a_c_t_i_o_n_s specified by the compspec. This only + returns matches which are prefixes of the word being completed. When + the --ff or --dd option is used for filename or directory name completion, bbaasshh uses the shell variable FFIIGGNNOORREE to filter the matches. Next, programmable completion generates matches specified by a pathname - expansion pattern supplied as an argument to the --GG option. The words + expansion pattern supplied as an argument to the --GG option. The words generated by the pattern need not match the word being completed. BBaasshh - uses the FFIIGGNNOORREE variable to filter the matches, but does not use the + uses the FFIIGGNNOORREE variable to filter the matches, but does not use the GGLLOOBBIIGGNNOORREE shell variable. - Next, completion considers the string specified as the argument to the - --WW option. The string is first split using the characters in the IIFFSS - special variable as delimiters. This honors shell quoting within the - string, in order to provide a mechanism for the words to contain shell - metacharacters or characters in the value of IIFFSS. Each word is then + Next, completion considers the string specified as the argument to the + --WW option. The string is first split using the characters in the IIFFSS + special variable as delimiters. This honors shell quoting within the + string, in order to provide a mechanism for the words to contain shell + metacharacters or characters in the value of IIFFSS. Each word is then expanded using brace expansion, tilde expansion, parameter and variable expansion, command substitution, and arithmetic expansion, as described above under EEXXPPAANNSSIIOONN. The results are split using the rules described - above under WWoorrdd SSpplliittttiinngg. The results of the expansion are prefix- + above under WWoorrdd SSpplliittttiinngg. The results of the expansion are prefix- matched against the word being completed, and the matching words become possible completions. - After these matches have been generated, bbaasshh executes any shell func- + After these matches have been generated, bbaasshh executes any shell func- tion or command specified with the --FF and --CC options. When the command - or function is invoked, bbaasshh assigns values to the CCOOMMPP__LLIINNEE, - CCOOMMPP__PPOOIINNTT, CCOOMMPP__KKEEYY, and CCOOMMPP__TTYYPPEE variables as described above under - SShheellll VVaarriiaabblleess. If a shell function is being invoked, bbaasshh also sets - the CCOOMMPP__WWOORRDDSS and CCOOMMPP__CCWWOORRDD variables. When the function or command - is invoked, the first argument ($$11) is the name of the command whose + or function is invoked, bbaasshh assigns values to the CCOOMMPP__LLIINNEE, + CCOOMMPP__PPOOIINNTT, CCOOMMPP__KKEEYY, and CCOOMMPP__TTYYPPEE variables as described above under + SShheellll VVaarriiaabblleess. If a shell function is being invoked, bbaasshh also sets + the CCOOMMPP__WWOORRDDSS and CCOOMMPP__CCWWOORRDD variables. When the function or command + is invoked, the first argument ($$11) is the name of the command whose arguments are being completed, the second argument ($$22) is the word be- - ing completed, and the third argument ($$33) is the word preceding the - word being completed on the current command line. There is no filter- - ing of the generated completions against the word being completed; the - function or command has complete freedom in generating the matches and + ing completed, and the third argument ($$33) is the word preceding the + word being completed on the current command line. There is no filter- + ing of the generated completions against the word being completed; the + function or command has complete freedom in generating the matches and they do not need to match a prefix of the word. - Any function specified with --FF is invoked first. The function may use + Any function specified with --FF is invoked first. The function may use any of the shell facilities, including the ccoommppggeenn and ccoommppoopptt builtins - described below, to generate the matches. It must put the possible + described below, to generate the matches. It must put the possible completions in the CCOOMMPPRREEPPLLYY array variable, one per array element. - Next, any command specified with the --CC option is invoked in an envi- - ronment equivalent to command substitution. It should print a list of - completions, one per line, to the standard output. Backslash will es- - cape a newline, if necessary. These are added to the set of possible + Next, any command specified with the --CC option is invoked in an envi- + ronment equivalent to command substitution. It should print a list of + completions, one per line, to the standard output. Backslash will es- + cape a newline, if necessary. These are added to the set of possible completions. After generating all of the possible completions, bbaasshh applies any fil- - ter specified with the --XX option to the completions in the list. The - filter is a pattern as used for pathname expansion; a && in the pattern + ter specified with the --XX option to the completions in the list. The + filter is a pattern as used for pathname expansion; a && in the pattern is replaced with the text of the word being completed. A literal && may be escaped with a backslash; the backslash is removed before attempting - a match. Any completion that matches the pattern is removed from the - list. A leading !! negates the pattern; in this case bbaasshh removes any - completion that does not match the pattern. If the nnooccaasseemmaattcchh shell - option is enabled, bbaasshh performs the match without regard to the case + a match. Any completion that matches the pattern is removed from the + list. A leading !! negates the pattern; in this case bbaasshh removes any + completion that does not match the pattern. If the nnooccaasseemmaattcchh shell + option is enabled, bbaasshh performs the match without regard to the case of alphabetic characters. - Finally, programmable completion adds any prefix and suffix specified - with the --PP and --SS options, respectively, to each completion, and re- + Finally, programmable completion adds any prefix and suffix specified + with the --PP and --SS options, respectively, to each completion, and re- turns the result to rreeaaddlliinnee as the list of possible completions. - If the previously-applied actions do not generate any matches, and the - --oo ddiirrnnaammeess option was supplied to ccoommpplleettee when the compspec was de- + If the previously-applied actions do not generate any matches, and the + --oo ddiirrnnaammeess option was supplied to ccoommpplleettee when the compspec was de- fined, bbaasshh attempts directory name completion. - If the --oo pplluussddiirrss option was supplied to ccoommpplleettee when the compspec - was defined, bbaasshh attempts directory name completion and adds any + If the --oo pplluussddiirrss option was supplied to ccoommpplleettee when the compspec + was defined, bbaasshh attempts directory name completion and adds any matches to the set of possible completions. - By default, if a compspec is found, whatever it generates is returned - to the completion code as the full set of possible completions. The - default bbaasshh completions and the rreeaaddlliinnee default of filename comple- - tion are disabled. If the --oo bbaasshhddeeffaauulltt option was supplied to ccoomm-- - pplleettee when the compspec was defined, and the compspec generates no - matches, bbaasshh attempts its default completions. If the compspec and, + By default, if a compspec is found, whatever it generates is returned + to the completion code as the full set of possible completions. The + default bbaasshh completions and the rreeaaddlliinnee default of filename comple- + tion are disabled. If the --oo bbaasshhddeeffaauulltt option was supplied to ccoomm-- + pplleettee when the compspec was defined, and the compspec generates no + matches, bbaasshh attempts its default completions. If the compspec and, if attempted, the default bbaasshh completions generate no matches, and the - --oo ddeeffaauulltt option was supplied to ccoommpplleettee when the compspec was de- + --oo ddeeffaauulltt option was supplied to ccoommpplleettee when the compspec was de- fined, programmable completion performs rreeaaddlliinnee's default completion. - The options supplied to ccoommpplleettee and ccoommppoopptt can control how rreeaaddlliinnee - treats the completions. For instance, the _-_o _f_u_l_l_q_u_o_t_e option tells - rreeaaddlliinnee to quote the matches as if they were filenames. See the de- + The options supplied to ccoommpplleettee and ccoommppoopptt can control how rreeaaddlliinnee + treats the completions. For instance, the _-_o _f_u_l_l_q_u_o_t_e option tells + rreeaaddlliinnee to quote the matches as if they were filenames. See the de- scription of ccoommpplleettee below for details. - When a compspec indicates that it wants directory name completion, the - programmable completion functions force rreeaaddlliinnee to append a slash to + When a compspec indicates that it wants directory name completion, the + programmable completion functions force rreeaaddlliinnee to append a slash to completed names which are symbolic links to directories, subject to the value of the mmaarrkk--ddiirreeccttoorriieess rreeaaddlliinnee variable, regardless of the set- ting of the mmaarrkk--ssyymmlliinnkkeedd--ddiirreeccttoorriieess rreeaaddlliinnee variable. - There is some support for dynamically modifying completions. This is - most useful when used in combination with a default completion speci- - fied with ccoommpplleettee --DD. It's possible for shell functions executed as - completion functions to indicate that completion should be retried by - returning an exit status of 124. If a shell function returns 124, and + There is some support for dynamically modifying completions. This is + most useful when used in combination with a default completion speci- + fied with ccoommpplleettee --DD. It's possible for shell functions executed as + completion functions to indicate that completion should be retried by + returning an exit status of 124. If a shell function returns 124, and changes the compspec associated with the command on which completion is - being attempted (supplied as the first argument when the function is + being attempted (supplied as the first argument when the function is executed), programmable completion restarts from the beginning, with an - attempt to find a new compspec for that command. This can be used to - build a set of completions dynamically as completion is attempted, + attempt to find a new compspec for that command. This can be used to + build a set of completions dynamically as completion is attempted, rather than loading them all at once. - For instance, assuming that there is a library of compspecs, each kept - in a file corresponding to the name of the command, the following de- + For instance, assuming that there is a library of compspecs, each kept + in a file corresponding to the name of the command, the following de- fault completion function would load completions dynamically: _completion_loader() { @@ -4762,162 +4768,162 @@ RREEAADDLLIINNEE -o bashdefault -o default HHIISSTTOORRYY - When the --oo hhiissttoorryy option to the sseett builtin is enabled, the shell + When the --oo hhiissttoorryy option to the sseett builtin is enabled, the shell provides access to the _c_o_m_m_a_n_d _h_i_s_t_o_r_y, the list of commands previously - typed. The value of the HHIISSTTSSIIZZEE variable is used as the number of - commands to save in a history list: the shell saves the text of the + typed. The value of the HHIISSTTSSIIZZEE variable is used as the number of + commands to save in a history list: the shell saves the text of the last HHIISSTTSSIIZZEE commands (default 500). The shell stores each command in - the history list prior to parameter and variable expansion (see EEXXPPAANN-- - SSIIOONN above) but after history expansion is performed, subject to the + the history list prior to parameter and variable expansion (see EEXXPPAANN-- + SSIIOONN above) but after history expansion is performed, subject to the values of the shell variables HHIISSTTIIGGNNOORREE and HHIISSTTCCOONNTTRROOLL. - On startup, bbaasshh initializes the history list by reading history en- - tries from the the file named by the HHIISSTTFFIILLEE variable (default - _~_/_._b_a_s_h___h_i_s_t_o_r_y). That file is referred to as the _h_i_s_t_o_r_y _f_i_l_e. The - history file is truncated, if necessary, to contain no more than the - number of history entries specified by the value of the HHIISSTTFFIILLEESSIIZZEE - variable. If HHIISSTTFFIILLEESSIIZZEE is unset, or set to null, a non-numeric + On startup, bbaasshh initializes the history list by reading history en- + tries from the the file named by the HHIISSTTFFIILLEE variable (default + _~_/_._b_a_s_h___h_i_s_t_o_r_y). That file is referred to as the _h_i_s_t_o_r_y _f_i_l_e. The + history file is truncated, if necessary, to contain no more than the + number of history entries specified by the value of the HHIISSTTFFIILLEESSIIZZEE + variable. If HHIISSTTFFIILLEESSIIZZEE is unset, or set to null, a non-numeric value, or a numeric value less than zero, the history file is not trun- cated. When the history file is read, lines beginning with the history comment character followed immediately by a digit are interpreted as timestamps - for the following history line. These timestamps are optionally dis- - played depending on the value of the HHIISSTTTTIIMMEEFFOORRMMAATT variable. When - present, history timestamps delimit history entries, making multi-line + for the following history line. These timestamps are optionally dis- + played depending on the value of the HHIISSTTTTIIMMEEFFOORRMMAATT variable. When + present, history timestamps delimit history entries, making multi-line entries possible. When a shell with history enabled exits, bbaasshh copies the last $$HHIISSTTSSIIZZEE - entries from the history list to $$HHIISSTTFFIILLEE. If the hhiissttaappppeenndd shell - option is enabled (see the description of sshhoopptt under SSHHEELLLL BBUUIILLTTIINN - CCOOMMMMAANNDDSS below), bbaasshh appends the entries to the history file, other- - wise it overwrites the history file. If HHIISSTTFFIILLEE is unset or null, or - if the history file is unwritable, the history is not saved. After - saving the history, bbaasshh truncates the history file to contain no more + entries from the history list to $$HHIISSTTFFIILLEE. If the hhiissttaappppeenndd shell + option is enabled (see the description of sshhoopptt under SSHHEELLLL BBUUIILLTTIINN + CCOOMMMMAANNDDSS below), bbaasshh appends the entries to the history file, other- + wise it overwrites the history file. If HHIISSTTFFIILLEE is unset or null, or + if the history file is unwritable, the history is not saved. After + saving the history, bbaasshh truncates the history file to contain no more than HHIISSTTFFIILLEESSIIZZEE lines as described above. - If the HHIISSTTTTIIMMEEFFOORRMMAATT variable is set, the shell writes the timestamp - information associated with each history entry to the history file, - marked with the history comment character, so timestamps are preserved + If the HHIISSTTTTIIMMEEFFOORRMMAATT variable is set, the shell writes the timestamp + information associated with each history entry to the history file, + marked with the history comment character, so timestamps are preserved across shell sessions. This uses the history comment character to dis- - tinguish timestamps from other history lines. As above, when using + tinguish timestamps from other history lines. As above, when using HHIISSTTTTIIMMEEFFOORRMMAATT, the timestamps delimit multi-line history entries. - The ffcc builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below) will list or + The ffcc builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below) will list or edit and re-execute a portion of the history list. The hhiissttoorryy builtin can display or modify the history list and manipulate the history file. - When using command-line editing, search commands are available in each + When using command-line editing, search commands are available in each editing mode that provide access to the history list. - The shell allows control over which commands are saved on the history + The shell allows control over which commands are saved on the history list. The HHIISSTTCCOONNTTRROOLL and HHIISSTTIIGGNNOORREE variables are used to save only a - subset of the commands entered. If the ccmmddhhiisstt shell option is en- - abled, the shell attempts to save each line of a multi-line command in - the same history entry, adding semicolons where necessary to preserve - syntactic correctness. The lliitthhiisstt shell option modifies ccmmddhhiisstt by - saving the command with embedded newlines instead of semicolons. See + subset of the commands entered. If the ccmmddhhiisstt shell option is en- + abled, the shell attempts to save each line of a multi-line command in + the same history entry, adding semicolons where necessary to preserve + syntactic correctness. The lliitthhiisstt shell option modifies ccmmddhhiisstt by + saving the command with embedded newlines instead of semicolons. See the description of the sshhoopptt builtin below under SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS for information on setting and unsetting shell options. HHIISSTTOORRYY EEXXPPAANNSSIIOONN - The shell supports a history expansion feature that is similar to the - history expansion in ccsshh. This section describes what syntax features + The shell supports a history expansion feature that is similar to the + history expansion in ccsshh. This section describes what syntax features are available. History expansion is enabled by default for interactive shells, and can - be disabled using the ++HH option to the sseett builtin command (see SSHHEELLLL + be disabled using the ++HH option to the sseett builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). Non-interactive shells do not perform history expansion by default, but it can be enabled with "set -H". History expansions introduce words from the history list into the input - stream, making it easy to repeat commands, insert the arguments to a + stream, making it easy to repeat commands, insert the arguments to a previous command into the current input line, or fix errors in previous commands quickly. - History expansion is performed immediately after a complete line is - read, before the shell breaks it into words, and is performed on each - line individually. The shell attempts to inform the history expansion + History expansion is performed immediately after a complete line is + read, before the shell breaks it into words, and is performed on each + line individually. The shell attempts to inform the history expansion functions about quoting still in effect from previous lines. - It takes place in two parts. The first is to determine which history - list entry to use during substitution. The second is to select por- + It takes place in two parts. The first is to determine which history + list entry to use during substitution. The second is to select por- tions of that entry to include into the current one. - The entry selected from the history is the _e_v_e_n_t, and the portions of + The entry selected from the history is the _e_v_e_n_t, and the portions of that entry that are acted upon are _w_o_r_d_s. Various _m_o_d_i_f_i_e_r_s are avail- - able to manipulate the selected words. The entry is split into words - in the same fashion as when reading input, so that several _m_e_t_a_c_h_a_r_a_c_- - _t_e_r-separated words surrounded by quotes are considered one word. The - _e_v_e_n_t _d_e_s_i_g_n_a_t_o_r selects the event, the optional _w_o_r_d _d_e_s_i_g_n_a_t_o_r se- - lects words from the event, and various optional _m_o_d_i_f_i_e_r_s are avail- + able to manipulate the selected words. The entry is split into words + in the same fashion as when reading input, so that several _m_e_t_a_c_h_a_r_a_c_- + _t_e_r-separated words surrounded by quotes are considered one word. The + _e_v_e_n_t _d_e_s_i_g_n_a_t_o_r selects the event, the optional _w_o_r_d _d_e_s_i_g_n_a_t_o_r se- + lects words from the event, and various optional _m_o_d_i_f_i_e_r_s are avail- able to manipulate the selected words. - History expansions are introduced by the appearance of the history ex- - pansion character, which is !! by default. History expansions may ap- + History expansions are introduced by the appearance of the history ex- + pansion character, which is !! by default. History expansions may ap- pear anywhere in the input, but do not nest. - Only backslash (\\) and single quotes can quote the history expansion - character, but the history expansion character is also treated as + Only backslash (\\) and single quotes can quote the history expansion + character, but the history expansion character is also treated as quoted if it immediately precedes the closing double quote in a double- quoted string. - Several characters inhibit history expansion if found immediately fol- - lowing the history expansion character, even if it is unquoted: space, - tab, newline, carriage return, ==, and the other shell metacharacters + Several characters inhibit history expansion if found immediately fol- + lowing the history expansion character, even if it is unquoted: space, + tab, newline, carriage return, ==, and the other shell metacharacters defined above. There is a special abbreviation for substitution, active when the _q_u_i_c_k - _s_u_b_s_t_i_t_u_t_i_o_n character (described above under hhiissttcchhaarrss) is the first + _s_u_b_s_t_i_t_u_t_i_o_n character (described above under hhiissttcchhaarrss) is the first character on the line. It selects the previous history list entry, us- - ing an event designator equivalent to !!!!, and substitutes one string - for another in that entry. It is described below under EEvveenntt DDeessiiggnnaa-- - ttoorrss. This is the only history expansion that does not begin with the + ing an event designator equivalent to !!!!, and substitutes one string + for another in that entry. It is described below under EEvveenntt DDeessiiggnnaa-- + ttoorrss. This is the only history expansion that does not begin with the history expansion character. - Several shell options settable with the sshhoopptt builtin will modify his- - tory expansion behavior (see the description of the sshhoopptt builtin be- + Several shell options settable with the sshhoopptt builtin will modify his- + tory expansion behavior (see the description of the sshhoopptt builtin be- low).and If the hhiissttvveerriiffyy shell option is enabled, and rreeaaddlliinnee is be- ing used, history substitutions are not immediately passed to the shell parser. Instead, the expanded line is reloaded into the rreeaaddlliinnee edit- - ing buffer for further modification. If rreeaaddlliinnee is being used, and - the hhiissttrreeeeddiitt shell option is enabled, a failed history substitution + ing buffer for further modification. If rreeaaddlliinnee is being used, and + the hhiissttrreeeeddiitt shell option is enabled, a failed history substitution is reloaded into the rreeaaddlliinnee editing buffer for correction. - The --pp option to the hhiissttoorryy builtin command shows what a history ex- - pansion will do before using it. The --ss option to the hhiissttoorryy builtin - will add commands to the end of the history list without actually exe- + The --pp option to the hhiissttoorryy builtin command shows what a history ex- + pansion will do before using it. The --ss option to the hhiissttoorryy builtin + will add commands to the end of the history list without actually exe- cuting them, so that they are available for subsequent recall. - The shell allows control of the various characters used by the history + The shell allows control of the various characters used by the history expansion mechanism (see the description of hhiissttcchhaarrss above under SShheellll - VVaarriiaabblleess). The shell uses the history comment character to mark his- + VVaarriiaabblleess). The shell uses the history comment character to mark his- tory timestamps when writing the history file. EEvveenntt DDeessiiggnnaattoorrss - An event designator is a reference to an entry in the history list. + An event designator is a reference to an entry in the history list. The event designator consists of the portion of the word beginning with - the history expansion character and ending with the word designator if - present, or the end of the word. Unless the reference is absolute, + the history expansion character and ending with the word designator if + present, or the end of the word. Unless the reference is absolute, events are relative to the current position in the history list. - !! Start a history substitution, except when followed by a bbllaannkk, - newline, carriage return, =, or, when the eexxttgglloobb shell option + !! Start a history substitution, except when followed by a bbllaannkk, + newline, carriage return, =, or, when the eexxttgglloobb shell option is enabled using the sshhoopptt builtin, (. !!_n Refer to history list entry _n. !!--_n Refer to the current entry minus _n. !!!! Refer to the previous entry. This is a synonym for "!-1". !!_s_t_r_i_n_g - Refer to the most recent command preceding the current position + Refer to the most recent command preceding the current position in the history list starting with _s_t_r_i_n_g. !!??_s_t_r_i_n_g[[??]] - Refer to the most recent command preceding the current position - in the history list containing _s_t_r_i_n_g. The trailing ?? may be - omitted if _s_t_r_i_n_g is followed immediately by a newline. If - _s_t_r_i_n_g is missing, this uses the string from the most recent + Refer to the most recent command preceding the current position + in the history list containing _s_t_r_i_n_g. The trailing ?? may be + omitted if _s_t_r_i_n_g is followed immediately by a newline. If + _s_t_r_i_n_g is missing, this uses the string from the most recent search; it is an error if there is no previous search string. ^^_s_t_r_i_n_g_1^^_s_t_r_i_n_g_2^^ - Quick substitution. Repeat the previous command, replacing - _s_t_r_i_n_g_1 with _s_t_r_i_n_g_2. Equivalent to "!!:s^_s_t_r_i_n_g_1^_s_t_r_i_n_g_2^" + Quick substitution. Repeat the previous command, replacing + _s_t_r_i_n_g_1 with _s_t_r_i_n_g_2. Equivalent to "!!:s^_s_t_r_i_n_g_1^_s_t_r_i_n_g_2^" (see MMooddiiffiieerrss below). !!## The entire command line typed so far. @@ -4925,37 +4931,37 @@ HHIISSTTOORRYY EEXXPPAANNSSIIOONN Word designators are used to select desired words from the event. They are optional; if the word designator isn't supplied, the history expan- sion uses the entire event. A :: separates the event specification from - the word designator. It may be omitted if the word designator begins - with a ^^, $$, **, --, or %%. Words are numbered from the beginning of the - line, with the first word being denoted by 0 (zero). Words are in- + the word designator. It may be omitted if the word designator begins + with a ^^, $$, **, --, or %%. Words are numbered from the beginning of the + line, with the first word being denoted by 0 (zero). Words are in- serted into the current line separated by single spaces. 00 ((zzeerroo)) The zeroth word. For the shell, this is the command word. _n The _nth word. ^^ The first argument: word 1. - $$ The last word. This is usually the last argument, but will ex- + $$ The last word. This is usually the last argument, but will ex- pand to the zeroth word if there is only one word in the line. %% The first word matched by the most recent "?_s_t_r_i_n_g?" search, if - the search string begins with a character that is part of a - word. By default, searches begin at the end of each line and - proceed to the beginning, so the first word matched is the one + the search string begins with a character that is part of a + word. By default, searches begin at the end of each line and + proceed to the beginning, so the first word matched is the one closest to the end of the line. _x--_y A range of words; "-_y" abbreviates "0-_y". - ** All of the words but the zeroth. This is a synonym for "_1_-_$". - It is not an error to use ** if there is just one word in the + ** All of the words but the zeroth. This is a synonym for "_1_-_$". + It is not an error to use ** if there is just one word in the event; it expands to the empty string in that case. xx** Abbreviates _x_-_$. xx-- Abbreviates _x_-_$ like xx**, but omits the last word. If xx is miss- ing, it defaults to 0. - If a word designator is supplied without an event specification, the + If a word designator is supplied without an event specification, the previous command is used as the event, equivalent to !!!!. MMooddiiffiieerrss - After the optional word designator, the expansion may include a se- - quence of one or more of the following modifiers, each preceded by a - ":". These modify, or edit, the word or words selected from the his- + After the optional word designator, the expansion may include a se- + quence of one or more of the following modifiers, each preceded by a + ":". These modify, or edit, the word or words selected from the his- tory event. hh Remove a trailing pathname component, leaving only the head. @@ -4964,24 +4970,24 @@ HHIISSTTOORRYY EEXXPPAANNSSIIOONN ee Remove all but the trailing suffix. pp Print the new command but do not execute it. qq Quote the substituted words, escaping further substitutions. - xx Quote the substituted words as with qq, but break into words at - bbllaannkkss and newlines. The qq and xx modifiers are mutually exclu- + xx Quote the substituted words as with qq, but break into words at + bbllaannkkss and newlines. The qq and xx modifiers are mutually exclu- sive; expansion uses the last one supplied. ss//_o_l_d//_n_e_w// - Substitute _n_e_w for the first occurrence of _o_l_d in the event + Substitute _n_e_w for the first occurrence of _o_l_d in the event line. Any character may be used as the delimiter in place of /. - The final delimiter is optional if it is the last character of - the event line. A single backslash quotes the delimiter in _o_l_d - and _n_e_w. If & appears in _n_e_w, it is replaced with _o_l_d. A sin- - gle backslash quotes the &. If _o_l_d is null, it is set to the - last _o_l_d substituted, or, if no previous history substitutions + The final delimiter is optional if it is the last character of + the event line. A single backslash quotes the delimiter in _o_l_d + and _n_e_w. If & appears in _n_e_w, it is replaced with _o_l_d. A sin- + gle backslash quotes the &. If _o_l_d is null, it is set to the + last _o_l_d substituted, or, if no previous history substitutions took place, the last _s_t_r_i_n_g in a !!??_s_t_r_i_n_g[[??]] search. If _n_e_w is null, each matching _o_l_d is deleted. && Repeat the previous substitution. gg Cause changes to be applied over the entire event line. This is - used in conjunction with "::ss" (e.g., "::ggss//_o_l_d//_n_e_w//") or "::&&". - If used with "::ss", any delimiter can be used in place of /, and - the final delimiter is optional if it is the last character of + used in conjunction with "::ss" (e.g., "::ggss//_o_l_d//_n_e_w//") or "::&&". + If used with "::ss", any delimiter can be used in place of /, and + the final delimiter is optional if it is the last character of the event line. An aa may be used as a synonym for gg. GG Apply the following "ss" or "&&" modifier once to each word in the event line. @@ -4990,64 +4996,64 @@ SSHHEELLLL 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. The ::, ttrruuee, ffaallssee, and tteesstt/[[ builtins do not accept options - and do not treat ---- specially. The eexxiitt, llooggoouutt, rreettuurrnn, bbrreeaakk, ccoonn-- - ttiinnuuee, lleett, and sshhiifftt builtins accept and process arguments beginning - with -- without requiring ----. Other builtins that accept arguments but - are not specified as accepting options interpret arguments beginning - with -- as invalid options and require ---- to prevent this interpreta- + and do not treat ---- specially. The eexxiitt, llooggoouutt, rreettuurrnn, bbrreeaakk, ccoonn-- + ttiinnuuee, lleett, and sshhiifftt builtins accept and process arguments beginning + with -- without requiring ----. Other builtins that accept arguments but + are not specified as accepting options interpret arguments beginning + with -- as invalid options and require ---- to prevent this interpreta- tion. :: [_a_r_g_u_m_e_n_t_s] - No effect; the command does nothing beyond expanding _a_r_g_u_m_e_n_t_s + No effect; the command does nothing beyond expanding _a_r_g_u_m_e_n_t_s and performing any specified redirections. The return status is zero. .. [--pp _p_a_t_h] _f_i_l_e_n_a_m_e [_a_r_g_u_m_e_n_t_s] ssoouurrccee [--pp _p_a_t_h] _f_i_l_e_n_a_m_e [_a_r_g_u_m_e_n_t_s] - The .. command (ssoouurrccee) reads and execute commands from _f_i_l_e_n_a_m_e - in the current shell environment and returns the exit status of + The .. command (ssoouurrccee) reads and execute commands from _f_i_l_e_n_a_m_e + in the current shell environment and returns 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, .. searches for it. If the - --pp option is supplied, .. treats _p_a_t_h as a colon-separated list - of directories in which to find _f_i_l_e_n_a_m_e; otherwise, .. uses the - entries in PPAATTHH to find the directory containing _f_i_l_e_n_a_m_e. - _f_i_l_e_n_a_m_e does not need to be executable. When bbaasshh is not in + --pp option is supplied, .. treats _p_a_t_h as a colon-separated list + of directories in which to find _f_i_l_e_n_a_m_e; otherwise, .. uses the + entries in PPAATTHH to find the directory containing _f_i_l_e_n_a_m_e. + _f_i_l_e_n_a_m_e does not need to be executable. When bbaasshh is not in posix mode, it searches the current directory if _f_i_l_e_n_a_m_e is not - found in PPAATTHH, but does not search the current directory if --pp + found in PPAATTHH, but does not search the current directory if --pp is supplied. If the ssoouurrcceeppaatthh option to the sshhoopptt builtin com- mand is turned off, .. does not search PPAATTHH. - If any _a_r_g_u_m_e_n_t_s are supplied, they become the positional para- - meters when _f_i_l_e_n_a_m_e is executed. Otherwise the positional pa- + If any _a_r_g_u_m_e_n_t_s are supplied, they become the positional para- + meters when _f_i_l_e_n_a_m_e is executed. Otherwise the positional pa- rameters are unchanged. If the --TT option is enabled, .. inherits any trap on DDEEBBUUGG; if it - is not, any DDEEBBUUGG trap string is saved and restored around the + is not, any DDEEBBUUGG trap string is saved and restored around the call to .., and .. unsets the DDEEBBUUGG trap while it executes. If --TT is not set, and the sourced file changes the DDEEBBUUGG trap, the new value persists after .. completes. The return status is the sta- tus of the last command executed from _f_i_l_e_n_a_m_e (0 if no commands - are executed), and non-zero if _f_i_l_e_n_a_m_e is not found or cannot + are executed), and non-zero if _f_i_l_e_n_a_m_e is not found or cannot be read. aalliiaass [--pp] [_n_a_m_e[=_v_a_l_u_e] ...] - With no arguments or with the --pp option, aalliiaass prints the list - of aliases in the form aalliiaass _n_a_m_e=_v_a_l_u_e on standard output. + With no arguments or with the --pp option, aalliiaass 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, define an alias 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 - during command parsing. For each _n_a_m_e in the argument list for - which no _v_a_l_u_e is supplied, print the name and value of the - alias _n_a_m_e. aalliiaass returns true unless a _n_a_m_e is given (without + _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 + during command parsing. For each _n_a_m_e in the argument list for + which no _v_a_l_u_e is supplied, print the name and value of the + alias _n_a_m_e. aalliiaass returns true unless a _n_a_m_e is given (without a corresponding =_v_a_l_u_e) for which no alias has been defined. bbgg [_j_o_b_s_p_e_c ...] - Resume each suspended job _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 shell + Resume each suspended job _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 shell uses its notion of the _c_u_r_r_e_n_t _j_o_b. bbgg _j_o_b_s_p_e_c returns 0 unless - run when job control is disabled or, when run with job control - enabled, any specified _j_o_b_s_p_e_c was not found or was started + run when job control is disabled or, when run with job control + enabled, any specified _j_o_b_s_p_e_c was not found or was started without job control. bbiinndd [--mm _k_e_y_m_a_p] [--llssvvSSVVXX] @@ -5058,191 +5064,191 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS bbiinndd [--mm _k_e_y_m_a_p] --pp|--PP [_r_e_a_d_l_i_n_e_-_c_o_m_m_a_n_d] bbiinndd [--mm _k_e_y_m_a_p] _k_e_y_s_e_q:_r_e_a_d_l_i_n_e_-_c_o_m_m_a_n_d bbiinndd _r_e_a_d_l_i_n_e_-_c_o_m_m_a_n_d_-_l_i_n_e - Display current rreeaaddlliinnee key and function bindings, bind a key - sequence to a rreeaaddlliinnee function or macro or to a shell command, - or set a rreeaaddlliinnee variable. Each non-option argument is a key - binding or command as it would appear in a rreeaaddlliinnee initializa- - tion file such as _._i_n_p_u_t_r_c, but each binding or command must be - passed as a separate argument; e.g., '"\C-x\C-r": - re-read-init-file'. In the following descriptions, output - available to be re-read is formatted as commands that would ap- + Display current rreeaaddlliinnee key and function bindings, bind a key + sequence to a rreeaaddlliinnee function or macro or to a shell command, + or set a rreeaaddlliinnee variable. Each non-option argument is a key + binding or command as it would appear in a rreeaaddlliinnee initializa- + tion file such as _._i_n_p_u_t_r_c, but each binding or command must be + passed as a separate argument; e.g., '"\C-x\C-r": + re-read-init-file'. In the following descriptions, output + available to be re-read is formatted as commands that would ap- pear in a rreeaaddlliinnee initialization file or that would be supplied - as individual arguments to a bbiinndd command. Options, if sup- + as individual arguments to a bbiinndd command. Options, if sup- plied, 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_-_m_o_v_e_, _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 (_v_i_-_m_o_v_e - is also a synonym); _e_m_a_c_s is equivalent to _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_-_m_o_v_e_, _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 (_v_i_-_m_o_v_e + is also a synonym); _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 used as an argument to a subsequent - bbiinndd command or in a rreeaaddlliinnee initialization file. If - arguments remain after option processing, bbiinndd treats - them as rreeaaddlliinnee command names and restricts output to - those names. - --PP List current rreeaaddlliinnee function names and bindings. If + --pp Display rreeaaddlliinnee function names and bindings in such a + way that they can be used as an argument to a subsequent + bbiinndd command or in a rreeaaddlliinnee initialization file. If arguments remain after option processing, bbiinndd treats them as rreeaaddlliinnee command names and restricts output to those names. - --ss Display rreeaaddlliinnee key sequences bound to macros and the - strings they output in such a way that they can be used + --PP List current rreeaaddlliinnee function names and bindings. If + arguments remain after option processing, bbiinndd treats + them as rreeaaddlliinnee command names and restricts output to + those names. + --ss Display rreeaaddlliinnee key sequences bound to macros and the + strings they output in such a way that they can be used as an argument to a subsequent bbiinndd command or in a rreeaadd-- lliinnee initialization file. - --SS Display rreeaaddlliinnee key sequences bound to macros and the + --SS Display rreeaaddlliinnee key sequences bound to macros and the strings they output. - --vv Display rreeaaddlliinnee variable names and values in such a way + --vv Display rreeaaddlliinnee variable names and values in such a way that they can be used as an argument to a subsequent bbiinndd command or in a rreeaaddlliinnee initialization file. --VV List current rreeaaddlliinnee variable names and values. --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 - Display key sequences that invoke the named rreeaaddlliinnee + Display key sequences that invoke the named rreeaaddlliinnee _f_u_n_c_t_i_o_n. --uu _f_u_n_c_t_i_o_n - Unbind all key sequences bound to the named rreeaaddlliinnee + Unbind all key sequences bound to the named rreeaaddlliinnee _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. --xx _k_e_y_s_e_q[[:: ]]_s_h_e_l_l_-_c_o_m_m_a_n_d Cause _s_h_e_l_l_-_c_o_m_m_a_n_d to be executed whenever _k_e_y_s_e_q is en- tered. The separator between _k_e_y_s_e_q and _s_h_e_l_l_-_c_o_m_m_a_n_d is - either whitespace or a colon optionally followed by - whitespace. If the separator is whitespace, _s_h_e_l_l_-_c_o_m_- - _m_a_n_d must be enclosed in double quotes and rreeaaddlliinnee ex- - pands any of its special backslash-escapes in _s_h_e_l_l_-_c_o_m_- - _m_a_n_d before saving it. If the separator is a colon, any - enclosing double quotes are optional, and rreeaaddlliinnee does - not expand the command string before saving it. Since - the entire key binding expression must be a single argu- - ment, it should be enclosed in single quotes. When - _s_h_e_l_l_-_c_o_m_m_a_n_d is executed, the shell sets the RREEAADD-- - LLIINNEE__LLIINNEE variable to the contents of the rreeaaddlliinnee line + either whitespace or a colon optionally followed by + whitespace. If the separator is whitespace, _s_h_e_l_l_-_c_o_m_- + _m_a_n_d must be enclosed in double quotes and rreeaaddlliinnee ex- + pands any of its special backslash-escapes in _s_h_e_l_l_-_c_o_m_- + _m_a_n_d before saving it. If the separator is a colon, any + enclosing double quotes are optional, and rreeaaddlliinnee does + not expand the command string before saving it. Since + the entire key binding expression must be a single argu- + ment, it should be enclosed in single quotes. When + _s_h_e_l_l_-_c_o_m_m_a_n_d is executed, the shell sets the RREEAADD-- + LLIINNEE__LLIINNEE variable to the contents of the rreeaaddlliinnee line buffer and the RREEAADDLLIINNEE__PPOOIINNTT and RREEAADDLLIINNEE__MMAARRKK variables - to the current location of the insertion point and the - saved insertion point (the mark), respectively. The - shell assigns any numeric argument the user supplied to - the RREEAADDLLIINNEE__AARRGGUUMMEENNTT variable. If there was no argu- - ment, that variable is not set. If the executed command - changes the value of any of RREEAADDLLIINNEE__LLIINNEE, RREEAADD-- - LLIINNEE__PPOOIINNTT, or RREEAADDLLIINNEE__MMAARRKK, those new values will be + to the current location of the insertion point and the + saved insertion point (the mark), respectively. The + shell assigns any numeric argument the user supplied to + the RREEAADDLLIINNEE__AARRGGUUMMEENNTT variable. If there was no argu- + ment, that variable is not set. If the executed command + changes the value of any of RREEAADDLLIINNEE__LLIINNEE, RREEAADD-- + LLIINNEE__PPOOIINNTT, or RREEAADDLLIINNEE__MMAARRKK, those new values will be reflected in the editing state. - --XX List all key sequences bound to shell commands and the - associated commands in a format that can be reused as an + --XX List all key sequences bound to shell commands and the + associated commands in a format that can be reused as an argument to a subsequent bbiinndd command. - The return value is 0 unless an unrecognized option is supplied + The return value is 0 unless an unrecognized option is supplied or an error occurred. bbrreeaakk [_n] - Exit from within a ffoorr, wwhhiillee, uunnttiill, or sseelleecctt loop. If _n is + Exit from within a ffoorr, wwhhiillee, uunnttiill, or sseelleecctt loop. If _n is specified, bbrreeaakk exits _n enclosing loops. _n must be >= 1. If _n - is greater than the number of enclosing loops, all enclosing + is greater than the number of enclosing loops, all enclosing loops are exited. The return value is 0 unless _n is not greater than or equal to 1. 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 _s_h_e_l_l_-_b_u_i_l_t_i_n, passing it - _a_r_g_u_m_e_n_t_s, and return its exit status. This is useful when - defining a function whose name is the same as a shell builtin, - retaining the functionality of the builtin within the function. - The ccdd builtin is commonly redefined this way. The return sta- + Execute the specified shell builtin _s_h_e_l_l_-_b_u_i_l_t_i_n, passing it + _a_r_g_u_m_e_n_t_s, and return its exit status. This is useful when + defining a function whose name is the same as a shell builtin, + retaining the functionality of the builtin within the function. + The ccdd builtin is commonly redefined this way. The return sta- tus is false if _s_h_e_l_l_-_b_u_i_l_t_i_n is not a shell builtin command. ccaalllleerr [_e_x_p_r] Returns the context of any active subroutine call (a shell func- tion or a script executed with the .. or ssoouurrccee builtins). - Without _e_x_p_r, ccaalllleerr displays the line number and source file- - name of the current subroutine call. If a non-negative integer + Without _e_x_p_r, ccaalllleerr displays the line number and source file- + name of the current subroutine call. If a non-negative integer is supplied as _e_x_p_r, ccaalllleerr displays the line number, subroutine name, and source file corresponding to that position in the cur- - rent execution call stack. This extra information may be used, + rent execution call stack. This extra information may be used, for example, to print a stack trace. The current frame is frame 0. - The return value is 0 unless the shell is not executing a sub- - routine call or _e_x_p_r does not correspond to a valid position in + The return value is 0 unless the shell is not executing a sub- + routine call or _e_x_p_r does not correspond to a valid position in the call stack. ccdd [--LL] [--@@] [_d_i_r] ccdd --PP [--ee] [--@@] [_d_i_r] - Change the current directory to _d_i_r. if _d_i_r is not supplied, - the value of the HHOOMMEE shell variable is used as _d_i_r. The vari- - able CCDDPPAATTHH exists, and _d_i_r does not begin with a slash (/), ccdd + Change the current directory to _d_i_r. if _d_i_r is not supplied, + the value of the HHOOMMEE shell variable is used as _d_i_r. The vari- + able CCDDPPAATTHH exists, and _d_i_r does not begin with a slash (/), ccdd uses it as a search path: the shell searches each directory name - in CCDDPPAATTHH for _d_i_r. Alternative directory names in CCDDPPAATTHH are - separated by a colon (:). A null directory name in CCDDPPAATTHH is + in CCDDPPAATTHH for _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., ".". - The --PP option causes ccdd to use the physical directory structure + The --PP option causes ccdd to use the physical directory structure by resolving symbolic links while traversing _d_i_r and before pro- - cessing instances of _._. in _d_i_r (see also the --PP option to the + cessing instances of _._. in _d_i_r (see also the --PP option to the sseett builtin command). - The --LL option forces ccdd to follow symbolic links by resolving + The --LL option forces ccdd to follow symbolic links by resolving the link after processing instances of _._. in _d_i_r. If _._. appears - in _d_i_r, ccdd processes it by removing the immediately previous + in _d_i_r, ccdd processes it by removing the immediately previous pathname component from _d_i_r, back to a slash or the beginning of - _d_i_r, and verifying that the portion of _d_i_r it has processed to - that point is still a valid directory name after removing the + _d_i_r, and verifying that the portion of _d_i_r it has processed to + that point is still a valid directory name after removing the pathname component. If it is not a valid directory name, ccdd re- - turns a non-zero status. If neither --LL nor --PP is supplied, ccdd + turns a non-zero status. If neither --LL nor --PP is supplied, ccdd behaves as if --LL had been supplied. If the --ee option is supplied with --PP, and ccdd cannot successfully - determine the current working directory after a successful di- + determine the current working directory after a successful di- rectory change, it returns a non-zero status. - On systems that support it, the --@@ option presents the extended + On systems that support it, the --@@ option presents the extended attributes associated with a file as a directory. - An argument of -- is converted to $$OOLLDDPPWWDD before attempting the + An argument of -- is converted to $$OOLLDDPPWWDD before attempting the directory change. - If ccdd uses a non-empty directory name from CCDDPPAATTHH,, or if -- is - the first argument, and the directory change is successful, ccdd + If ccdd uses a non-empty directory name from CCDDPPAATTHH,, or if -- is + the first argument, and the directory change is successful, ccdd writes the absolute pathname of the new working directory to the standard output. - If the directory change is successful, ccdd sets the value of the + If the directory change is successful, ccdd sets the value of the PPWWDD environment variable to the new directory name, and sets the - OOLLDDPPWWDD environment variable to the value of the current working + OOLLDDPPWWDD environment variable to the value of the current working directory before the change. - The return value is true if the directory was successfully + 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 ...] - The ccoommmmaanndd builtin runs _c_o_m_m_a_n_d with _a_r_g_s suppressing the nor- + The ccoommmmaanndd builtin runs _c_o_m_m_a_n_d with _a_r_g_s suppressing the nor- mal shell function lookup for _c_o_m_m_a_n_d. Only builtin commands or - commands found in the PPAATTHH named _c_o_m_m_a_n_d are executed. If the + commands found in the PPAATTHH named _c_o_m_m_a_n_d are executed. If the --pp option is supplied, 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 + a default value for PPAATTHH that is guaranteed to find all of the standard utilities. - If either the --VV or --vv option is supplied, ccoommmmaanndd prints a de- - scription of _c_o_m_m_a_n_d. The --vv option displays a single word in- - dicating the command or filename used to invoke _c_o_m_m_a_n_d; the --VV + If either the --VV or --vv option is supplied, ccoommmmaanndd prints a de- + scription of _c_o_m_m_a_n_d. The --vv option displays a single word in- + dicating the command or filename used to invoke _c_o_m_m_a_n_d; the --VV option produces a more verbose description. - If the --VV or --vv option is supplied, the exit status is zero if - _c_o_m_m_a_n_d was found, and non-zero 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 + If the --VV or --vv option is supplied, the exit status is zero if + _c_o_m_m_a_n_d was found, and non-zero 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. ccoommppggeenn [--VV _v_a_r_n_a_m_e] [_o_p_t_i_o_n] [_w_o_r_d] - Generate possible completion matches for _w_o_r_d according to the - _o_p_t_i_o_ns, which may be any option accepted by the ccoommpplleettee + Generate possible completion matches for _w_o_r_d according to the + _o_p_t_i_o_ns, which may be any option accepted by the ccoommpplleettee builtin with the exceptions of --pp, --rr, --DD, --EE, and --II, and write the matches to the standard output. - If the --VV option is supplied, ccoommppggeenn stores the generated com- - pletions into the indexed array variable _v_a_r_n_a_m_e instead of + If the --VV option is supplied, ccoommppggeenn stores the generated com- + pletions into the indexed array variable _v_a_r_n_a_m_e instead of writing them to the standard output. When using the --FF or --CC options, the various shell variables set @@ -5251,11 +5257,11 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS The matches will be generated in the same way as if the program- mable completion code had generated them directly from a comple- - tion specification with the same flags. If _w_o_r_d is specified, - only those completions matching _w_o_r_d will be displayed or + tion specification with the same flags. If _w_o_r_d is specified, + only those completions matching _w_o_r_d will be displayed or stored. - The return value is true unless an invalid option is supplied, + The return value is true unless an invalid option is supplied, or no matches were generated. ccoommpplleettee [--aabbccddeeffggjjkkssuuvv] [--oo _c_o_m_p_-_o_p_t_i_o_n] [--DDEEII] [--AA _a_c_t_i_o_n] @@ -5265,78 +5271,78 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS Specify how arguments to each _n_a_m_e should be completed. If the --pp option is supplied, or if no options or _n_a_m_es are sup- - plied, print existing completion specifications in a way that + plied, print existing completion specifications in a way that allows them to be reused as input. The --rr option removes a com- - pletion specification for each _n_a_m_e, or, if no _n_a_m_es are sup- + pletion specification for each _n_a_m_e, or, if no _n_a_m_es are sup- plied, all completion specifications. - The --DD option indicates that other supplied options and actions - should apply to the "default" command completion; that is, com- - pletion attempted on a command for which no completion has pre- - viously been defined. The --EE option indicates that other sup- - plied options and actions should apply to "empty" command com- - pletion; that is, completion attempted on a blank line. The --II - option indicates that other supplied options and actions should - apply to completion on the initial non-assignment word on the + The --DD option indicates that other supplied options and actions + should apply to the "default" command completion; that is, com- + pletion attempted on a command for which no completion has pre- + viously been defined. The --EE option indicates that other sup- + plied options and actions should apply to "empty" command com- + pletion; that is, completion attempted on a blank line. The --II + option indicates that other supplied options and actions should + apply to completion on the initial non-assignment word on the line, or after a command delimiter such as ;; or ||, which is usu- ally command name completion. If multiple options are supplied, the --DD option takes precedence over --EE, and both take precedence - over --II. If any of --DD, --EE, or --II are supplied, any other _n_a_m_e - arguments are ignored; these completions only apply to the case + over --II. If any of --DD, --EE, or --II are supplied, any other _n_a_m_e + arguments are ignored; these completions only apply to the case specified by the option. The process of applying these completion specifications when at- - tempting word completion is described above under PPrrooggrraammmmaabbllee + tempting word completion is described above under PPrrooggrraammmmaabbllee CCoommpplleettiioonn. - Other options, if specified, have the following meanings. The - arguments to the --GG, --WW, and --XX options (and, if necessary, the - --PP and --SS options) should be quoted to protect them from expan- + Other options, if specified, have the following meanings. The + arguments to the --GG, --WW, and --XX options (and, if necessary, the + --PP and --SS options) should be quoted to protect them from expan- sion before the ccoommpplleettee builtin is invoked. --oo _c_o_m_p_-_o_p_t_i_o_n - The _c_o_m_p_-_o_p_t_i_o_n controls several aspects of the comp- - spec's behavior beyond the simple generation of comple- + The _c_o_m_p_-_o_p_t_i_o_n controls several aspects of the comp- + spec's behavior beyond the simple generation of comple- tions. _c_o_m_p_-_o_p_t_i_o_n may be one of: bbaasshhddeeffaauulltt Perform the rest of the default bbaasshh completions if the compspec generates no matches. - ddeeffaauulltt Use rreeaaddlliinnee's default filename completion if + ddeeffaauulltt Use rreeaaddlliinnee's default filename completion if the compspec generates no matches. ddiirrnnaammeess - Perform directory name completion if the comp- + Perform directory name completion if the comp- spec generates no matches. ffiilleennaammeess - Tell rreeaaddlliinnee that the compspec generates file- - names, so it can perform any filename-specific - processing (such as adding a slash to directory - names, quoting special characters, or suppress- - ing trailing spaces). This is intended to be + Tell rreeaaddlliinnee that the compspec generates file- + names, so it can perform any filename-specific + processing (such as adding a slash to directory + names, quoting special characters, or suppress- + ing trailing spaces). This is intended to be used with shell functions. ffuullllqquuoottee - Tell rreeaaddlliinnee to quote all the completed words + Tell rreeaaddlliinnee to quote all the completed words even if they are not filenames. - nnooqquuoottee Tell rreeaaddlliinnee not to quote the completed words - if they are filenames (quoting filenames is the + nnooqquuoottee Tell rreeaaddlliinnee not to quote the completed words + if they are filenames (quoting filenames is the default). - nnoossoorrtt Tell rreeaaddlliinnee not to sort the list of possible + nnoossoorrtt Tell rreeaaddlliinnee not to sort the list of possible completions alphabetically. - nnoossppaaccee Tell rreeaaddlliinnee not to append a space (the de- - fault) to words completed at the end of the + nnoossppaaccee Tell rreeaaddlliinnee not to append a space (the de- + fault) to words completed at the end of the line. pplluussddiirrss - After generating any matches defined by the - compspec, attempt directory name completion and - add any matches to the results of the other ac- + After generating any matches defined by the + compspec, attempt directory name completion and + add any matches to the results of the other ac- tions. --AA _a_c_t_i_o_n - The _a_c_t_i_o_n may be one of the following to generate a + The _a_c_t_i_o_n may be one of the following to generate a list of possible completions: aalliiaass Alias names. May also be specified as --aa. aarrrraayyvvaarr Array variable names. bbiinnddiinngg RReeaaddlliinnee key binding names. - bbuuiillttiinn Names of shell builtin commands. May also be + bbuuiillttiinn Names of shell builtin commands. May also be specified as --bb. ccoommmmaanndd Command names. May also be specified as --cc. ddiirreeccttoorryy @@ -5344,10 +5350,10 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS ddiissaabblleedd Names of disabled shell builtins. eennaabblleedd Names of enabled shell builtins. - eexxppoorrtt Names of exported shell variables. May also be + eexxppoorrtt Names of exported shell variables. May also be specified as --ee. - ffiillee File and directory names, similar to rreeaaddlliinnee's - filename completion. May also be specified as + ffiillee File and directory names, similar to rreeaaddlliinnee's + filename completion. May also be specified as --ff. ffuunnccttiioonn Names of shell functions. @@ -5355,17 +5361,17 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS hheellppttooppiicc Help topics as accepted by the hheellpp builtin. hhoossttnnaammee - Hostnames, as taken from the file specified by + Hostnames, as taken from the file specified by the HHOOSSTTFFIILLEE shell variable. - jjoobb Job names, if job control is active. May also + jjoobb Job names, if job control is active. May also be specified as --jj. - kkeeyywwoorrdd Shell reserved words. May also be specified as + kkeeyywwoorrdd Shell reserved words. May also be specified as --kk. rruunnnniinngg Names of running jobs, if job control is active. sseerrvviiccee Service names. May also be specified as --ss. - sseettoopptt Valid arguments for the --oo option to the sseett + sseettoopptt Valid arguments for the --oo option to the sseett builtin. - sshhoopptt Shell option names as accepted by the sshhoopptt + sshhoopptt Shell option names as accepted by the sshhoopptt builtin. ssiiggnnaall Signal names. ssttooppppeedd Names of stopped jobs, if job control is active. @@ -5374,219 +5380,219 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS Names of all shell variables. May also be spec- ified as --vv. --CC _c_o_m_m_a_n_d - _c_o_m_m_a_n_d is executed in a subshell environment, and its - output is used as the possible completions. Arguments + _c_o_m_m_a_n_d is executed in a subshell environment, and its + output is used as the possible completions. Arguments are passed as with the --FF option. --FF _f_u_n_c_t_i_o_n - The shell function _f_u_n_c_t_i_o_n is executed in the current - shell environment. When the function is executed, the + The shell function _f_u_n_c_t_i_o_n is executed in the current + shell environment. When the function is executed, the first argument ($$11) is the name of the command whose ar- guments are being completed, the second argument ($$22) is the word being completed, and the third argument ($$33) is - the word preceding the word being completed on the cur- + the word preceding the word being completed on the cur- rent command line. When _f_u_n_c_t_i_o_n finishes, programmable - completion retrieves the possible completions from the + completion retrieves the possible completions from the value of the CCOOMMPPRREEPPLLYY array variable. --GG _g_l_o_b_p_a_t - Expand the pathname expansion pattern _g_l_o_b_p_a_t to gener- + Expand the pathname expansion pattern _g_l_o_b_p_a_t to gener- ate the possible completions. --PP _p_r_e_f_i_x - Add _p_r_e_f_i_x to the beginning of each possible completion + Add _p_r_e_f_i_x to the beginning of each possible completion after all other options have been applied. --SS _s_u_f_f_i_x - Append _s_u_f_f_i_x to each possible completion after all + Append _s_u_f_f_i_x to each possible completion after all other options have been applied. --WW _w_o_r_d_l_i_s_t - Split the _w_o_r_d_l_i_s_t using the characters in the IIFFSS spe- - cial variable as delimiters, and expand each resulting - word. Shell quoting is honored within _w_o_r_d_l_i_s_t, in or- - der to provide a mechanism for the words to contain - shell metacharacters or characters in the value of IIFFSS. - The possible completions are the members of the resul- - tant list which match a prefix of the word being com- + Split the _w_o_r_d_l_i_s_t using the characters in the IIFFSS spe- + cial variable as delimiters, and expand each resulting + word. Shell quoting is honored within _w_o_r_d_l_i_s_t, in or- + der to provide a mechanism for the words to contain + shell metacharacters or characters in the value of IIFFSS. + The possible completions are the members of the resul- + tant list which match a prefix of the word being com- pleted. --XX _f_i_l_t_e_r_p_a_t - _f_i_l_t_e_r_p_a_t is a pattern as used for pathname expansion. + _f_i_l_t_e_r_p_a_t is a pattern as used for pathname expansion. It is applied to the list of possible completions gener- - ated by the preceding options and arguments, and each - completion matching _f_i_l_t_e_r_p_a_t is removed from the list. - A leading !! in _f_i_l_t_e_r_p_a_t negates the pattern; in this + ated by the preceding options and arguments, and each + completion matching _f_i_l_t_e_r_p_a_t is removed from the list. + A leading !! in _f_i_l_t_e_r_p_a_t negates the pattern; in this case, any completion not matching _f_i_l_t_e_r_p_a_t is removed. - The return value is true unless an invalid option is supplied, + The return value is true unless an invalid option is supplied, an option other than --pp, --rr, --DD, --EE, or --II is supplied without a - _n_a_m_e argument, an attempt is made to remove a completion speci- + _n_a_m_e argument, an attempt is made to remove a completion speci- fication for a _n_a_m_e for which no specification exists, or an er- ror occurs adding a completion specification. ccoommppoopptt [--oo _o_p_t_i_o_n] [--DDEEII] [++oo _o_p_t_i_o_n] [_n_a_m_e] - Modify completion options for each _n_a_m_e according to the _o_p_- + Modify completion options for each _n_a_m_e according to the _o_p_- _t_i_o_ns, or for the currently-executing completion if no _n_a_m_es are - supplied. If no _o_p_t_i_o_ns are supplied, display the completion - options for each _n_a_m_e or the current completion. The possible - values of _o_p_t_i_o_n are those valid for the ccoommpplleettee builtin de- + supplied. If no _o_p_t_i_o_ns are supplied, display the completion + options for each _n_a_m_e or the current completion. The possible + values of _o_p_t_i_o_n are those valid for the ccoommpplleettee builtin de- scribed above. The --DD option indicates that other supplied options should apply - to the "default" command completion; the --EE option indicates + to the "default" command completion; the --EE option indicates that other supplied options should apply to "empty" command com- pletion; and the --II option indicates that other supplied options - should apply to completion on the initial word on the line. + should apply to completion on the initial word on the line. These are determined in the same way as the ccoommpplleettee builtin. If multiple options are supplied, the --DD option takes precedence over --EE, and both take precedence over --II. - The return value is true unless an invalid option is supplied, + The return value is true unless an invalid option is supplied, an attempt is made to modify the options for a _n_a_m_e for which no completion specification exists, or an output error occurs. ccoonnttiinnuuee [_n] ccoonnttiinnuuee resumes the next iteration of the enclosing ffoorr, wwhhiillee, - uunnttiill, or sseelleecctt loop. If _n is specified, bbaasshh resumes the _nth - enclosing loop. _n must be >= 1. If _n is greater than the num- - ber of enclosing loops, the shell resumes the last enclosing - loop (the "top-level" loop). The return value is 0 unless _n is + uunnttiill, or sseelleecctt loop. If _n is specified, bbaasshh resumes the _nth + enclosing loop. _n must be >= 1. If _n is greater than the num- + ber of enclosing loops, the shell resumes the last enclosing + loop (the "top-level" loop). The return value is 0 unless _n is not greater than or equal to 1. ddeeccllaarree [--aaAAffFFggiiIIllnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...] ttyyppeesseett [--aaAAffFFggiiIIllnnrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...] - Declare variables and/or give them attributes. If no _n_a_m_es are + Declare variables and/or give them attributes. If no _n_a_m_es are given then display the values of variables or functions. The --pp - option will display the attributes and values of each _n_a_m_e. - When --pp is used with _n_a_m_e arguments, additional options, other + option will display the attributes and values of each _n_a_m_e. + When --pp is used with _n_a_m_e arguments, additional options, other than --ff and --FF, are ignored. When --pp is supplied without _n_a_m_e arguments, ddeeccllaarree will display the attributes and values of all variables having the attributes - specified by the additional options. If no other options are + specified by the additional options. If no other options are supplied with --pp, ddeeccllaarree will display the attributes and values - of all shell variables. The --ff option restricts the display to + of all shell variables. The --ff option restricts the display to shell functions. The --FF option inhibits the display of function definitions; only - the function name and attributes are printed. If the eexxttddeebbuugg - shell option is enabled using sshhoopptt, the source file name and - line number where each _n_a_m_e is defined are displayed as well. + the function name and attributes are printed. If the eexxttddeebbuugg + shell option is enabled using sshhoopptt, the source file name and + line number where each _n_a_m_e is defined are displayed as well. The --FF option implies --ff. - The --gg option forces variables to be created or modified at the + The --gg option forces variables to be created or modified at the global scope, even when ddeeccllaarree is executed in a shell function. It is ignored when ddeeccllaarree is not executed in a shell function. - The --II option causes local variables to inherit the attributes - (except the _n_a_m_e_r_e_f attribute) and value of any existing vari- - able with the same _n_a_m_e at a surrounding scope. If there is no + The --II option causes local variables to inherit the attributes + (except the _n_a_m_e_r_e_f attribute) and value of any existing vari- + able with the same _n_a_m_e at a surrounding scope. If there is no existing variable, the local variable is initially unset. - The following options can be used to restrict output to vari- - ables with the specified attribute or to give variables attrib- + The following options can be used to restrict output to vari- + ables with the specified attribute or to give variables attrib- utes: - --aa Each _n_a_m_e is an indexed array variable (see AArrrraayyss + --aa Each _n_a_m_e is an indexed array variable (see AArrrraayyss above). - --AA Each _n_a_m_e is an associative array variable (see AArrrraayyss + --AA Each _n_a_m_e is an associative array variable (see AArrrraayyss above). --ff Each _n_a_m_e refers to a shell function. --ii The variable is treated as an integer; arithmetic evalua- - tion (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN above) is performed when + tion (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN above) is performed when the variable is assigned a value. - --ll When the variable is assigned a value, all upper-case - characters are converted to lower-case. The upper-case + --ll When the variable is assigned a value, all upper-case + characters are converted to lower-case. The upper-case attribute is disabled. - --nn Give each _n_a_m_e the _n_a_m_e_r_e_f attribute, making it a name - reference to another variable. That other variable is - defined by the value of _n_a_m_e. All references, assign- - ments, and attribute modifications to _n_a_m_e, except those - using or changing the --nn attribute itself, are performed - on the variable referenced by _n_a_m_e's value. The nameref + --nn Give each _n_a_m_e the _n_a_m_e_r_e_f attribute, making it a name + reference to another variable. That other variable is + defined by the value of _n_a_m_e. All references, assign- + ments, and attribute modifications to _n_a_m_e, except those + using or changing the --nn attribute itself, are performed + on the variable referenced by _n_a_m_e's value. The nameref attribute cannot be applied to array variables. --rr Make _n_a_m_es readonly. These names cannot then be assigned values by subsequent assignment statements or unset. --tt Give each _n_a_m_e the _t_r_a_c_e attribute. Traced functions in- - herit the DDEEBBUUGG and RREETTUURRNN traps from the calling shell. + herit the DDEEBBUUGG and RREETTUURRNN traps from the calling shell. The trace attribute has no special meaning for variables. - --uu When the variable is assigned a value, all lower-case - characters are converted to upper-case. The lower-case + --uu When the variable is assigned a value, all lower-case + characters are converted to upper-case. The lower-case attribute is disabled. - --xx Mark each _n_a_m_e for export to subsequent commands via the + --xx Mark each _n_a_m_e for export to subsequent commands via the environment. - Using "+" instead of "-" turns off the specified attribute in- + Using "+" instead of "-" turns off the specified attribute in- stead, with the exceptions that ++aa and ++AA may not be used to de- - stroy array variables and ++rr will not remove the readonly at- + stroy array variables and ++rr will not remove the readonly at- tribute. - When used in a function, ddeeccllaarree and ttyyppeesseett make each _n_a_m_e lo- - cal, as with the llooccaall command, unless the --gg option is sup- - plied. If a variable name is followed by =_v_a_l_u_e, the value of - the variable is set to _v_a_l_u_e. When using --aa or --AA and the com- - pound assignment syntax to create array variables, additional + When used in a function, ddeeccllaarree and ttyyppeesseett make each _n_a_m_e lo- + cal, as with the llooccaall command, unless the --gg option is sup- + plied. If a variable name is followed by =_v_a_l_u_e, the value of + the variable is set to _v_a_l_u_e. When using --aa or --AA and the com- + pound assignment syntax to create array variables, additional attributes do not take effect until subsequent assignments. - The return value is 0 unless an invalid option is encountered, - an attempt is made to define a function using "-f foo=bar". an + The return value is 0 unless an invalid 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 at- tempt is made to assign a value to an array variable without us- - ing the compound assignment syntax (see AArrrraayyss above), one of + ing the compound assignment syntax (see AArrrraayyss above), one of the _n_a_m_e_s is not a valid 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 variable, or an + to turn off readonly status for a readonly variable, an attempt + is made to turn off array status for an array variable, or an attempt is made to display a non-existent function with --ff. ddiirrss [[--ccllppvv]] [[++_n]] [[--_n]] Without options, display the list of currently remembered direc- - tories. 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. The current directory is always the first directory + tories. 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. The current directory is always the first directory in the stack. Options, if supplied, have the following meanings: - --cc Clears the directory stack by deleting all of the en- + --cc Clears the directory stack by deleting all of the en- tries. - --ll Produces a listing using full pathnames; the default + --ll Produces a listing using full pathnames; the default listing 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, pre- + --vv Print the directory stack with one entry per line, pre- fixing each entry with its index in the stack. ++_n Displays the _nth entry counting from the left of the list shown by ddiirrss when invoked without options, starting with zero. - --_n Displays the _nth entry counting from the right of the + --_n Displays the _nth entry counting from the right of the list shown by ddiirrss when invoked without options, starting with zero. - The return value is 0 unless an invalid option is supplied or _n + The return value is 0 unless an invalid option is supplied or _n indexes beyond the end of the directory stack. ddiissoowwnn [--aarr] [--hh] [_i_d ...] - Without options, remove each _i_d from the table of active jobs. - Each _i_d may be a job specification _j_o_b_s_p_e_c or a process ID _p_i_d; + Without options, remove each _i_d from the table of active jobs. + Each _i_d may be a job specification _j_o_b_s_p_e_c or a process ID _p_i_d; if _i_d is a _p_i_d, ddiissoowwnn uses the job containing _p_i_d as _j_o_b_s_p_e_c. - If the --hh option is supplied, ddiissoowwnn does not remove the jobs - corresponding to each _i_d from the jobs table, but rather marks - them so the shell does not send SSIIGGHHUUPP to the job if the shell + If the --hh option is supplied, ddiissoowwnn does not remove the jobs + corresponding to each _i_d from the jobs table, but rather marks + them so the shell does not send SSIIGGHHUUPP to the job if the shell receives a SSIIGGHHUUPP. - If no _i_d is supplied, the --aa option means to remove or mark all + If no _i_d is supplied, the --aa option means to remove or mark all jobs; the --rr option without an _i_d argument removes or marks run- - ning jobs. If no _i_d is supplied, and neither the --aa nor the --rr + ning jobs. If no _i_d is supplied, and neither the --aa nor the --rr option is supplied, ddiissoowwnn removes or marks the current job. The return value is 0 unless an _i_d 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 0 unless a write error occurs. If --nn is + Output the _a_r_gs, separated by spaces, followed by a newline. + The return status is 0 unless a write error occurs. If --nn is specified, the trailing newline is not printed. - If the --ee option is given, eecchhoo interprets the following back- + If the --ee option is given, eecchhoo interprets the following back- slash-escaped characters. The --EE option disables interpretation - of these escape characters, even on systems where they are in- - terpreted by default. The xxppgg__eecchhoo shell option determines + of these escape characters, even on systems where they are in- + terpreted by default. The xxppgg__eecchhoo shell option determines whether or not eecchhoo interprets any options and expands these es- - cape characters. eecchhoo does not interpret ---- to mean the end of + cape characters. eecchhoo does not interpret ---- to mean the end of options. eecchhoo interprets the following escape sequences: @@ -5601,101 +5607,101 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS \\tt horizontal tab \\vv vertical tab \\\\ backslash - \\00_n_n_n The eight-bit character whose value is the octal value + \\00_n_n_n The eight-bit character whose value is the octal value _n_n_n (zero to three octal digits). - \\xx_H_H The eight-bit character whose value is the hexadecimal + \\xx_H_H The eight-bit character whose value is the hexadecimal value _H_H (one or two hex digits). - \\uu_H_H_H_H The Unicode (ISO/IEC 10646) character whose value is the + \\uu_H_H_H_H The Unicode (ISO/IEC 10646) character whose value is the hexadecimal value _H_H_H_H (one to four hex digits). \\UU_H_H_H_H_H_H_H_H - The Unicode (ISO/IEC 10646) character whose value is the + The Unicode (ISO/IEC 10646) character whose value is the hexadecimal value _H_H_H_H_H_H_H_H (one to eight hex digits). - eecchhoo writes any unrecognized backslash-escaped characters un- + eecchhoo writes any unrecognized backslash-escaped characters un- changed. eennaabbllee [--aa] [--ddnnppss] [--ff _f_i_l_e_n_a_m_e] [_n_a_m_e ...] - Enable and disable builtin shell commands. Disabling a builtin - allows an executable file which has the same name as a shell - builtin to be executed without specifying a full pathname, even + Enable and disable builtin shell commands. Disabling a builtin + allows an executable file which has the same name as a shell + builtin to be executed without specifying a full pathname, even though the shell normally searches for builtins before files. - If --nn is supplied, each _n_a_m_e is disabled; otherwise, _n_a_m_es are - enabled. For example, to use the tteesstt binary found usin g PPAATTHH + If --nn is supplied, each _n_a_m_e is disabled; otherwise, _n_a_m_es are + enabled. For example, to use the tteesstt binary found usin g PPAATTHH instead of the shell builtin version, run "enable -n test". - If no _n_a_m_e arguments are supplied, or if the --pp option is sup- + If no _n_a_m_e arguments are supplied, or if the --pp option is sup- plied, print a list of shell builtins. With no other option ar- guments, the list consists of all enabled shell builtins. If --nn - is supplied, print only disabled builtins. If --aa is supplied, - the list printed includes all builtins, with an indication of + is supplied, print only disabled builtins. If --aa is supplied, + the list printed includes all builtins, with an indication of whether or not each is enabled. The --ss option means to restrict the output to the POSIX _s_p_e_c_i_a_l builtins. - The --ff option means to load the new builtin command _n_a_m_e from + 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. If _f_i_l_e_n_a_m_e does not contain a slash, BBaasshh will use the value of - the BBAASSHH__LLOOAADDAABBLLEESS__PPAATTHH variable as a colon-separated list of - directories in which to search for _f_i_l_e_n_a_m_e. The default for - BBAASSHH__LLOOAADDAABBLLEESS__PPAATTHH is system-dependent, and may include "." to - force a search of the current directory. The --dd option will - delete a builtin previously loaded with --ff. If _-_s is used with + the BBAASSHH__LLOOAADDAABBLLEESS__PPAATTHH variable as a colon-separated list of + directories in which to search for _f_i_l_e_n_a_m_e. The default for + BBAASSHH__LLOOAADDAABBLLEESS__PPAATTHH is system-dependent, and may include "." to + force a search of the current directory. The --dd option will + delete a builtin previously loaded with --ff. If _-_s is used with _-_f, the new builtin becomes a POSIX special builtin. - If no options are supplied and a _n_a_m_e is not a shell builtin, - eennaabbllee will attempt to load _n_a_m_e from a shared object named + If no options are supplied and a _n_a_m_e is not a shell builtin, + eennaabbllee will attempt to load _n_a_m_e from a shared object named _n_a_m_e, as if the command were "enable -f _n_a_m_e _n_a_m_e". - The return value is 0 unless a _n_a_m_e is not a shell builtin or + The return value is 0 unless a _n_a_m_e is not a shell builtin or there is an error loading a new builtin from a shared object. eevvaall [_a_r_g ...] - Concatenate the _a_r_gs together into a single command, separating + Concatenate the _a_r_gs together into a single command, separating them with spaces. BBaasshh then reads and execute this command, and - returns its exit status as the return status of eevvaall. If there + returns its exit status as the return status 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 without creating - a new process. _c_o_m_m_a_n_d cannot be a shell builtin or function. + If _c_o_m_m_a_n_d is specified, it replaces the shell without creating + a new process. _c_o_m_m_a_n_d cannot be a shell builtin or function. 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 supplied, the shell places a dash at the beginning of the ze- - roth argument 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 envi- + roth argument 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 envi- ronment. 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 eexxeeccffaaiill shell option is enabled. In - that case, it returns a non-zero status. An interactive shell - returns a non-zero status if the file cannot be executed. A + shell exits, unless the eexxeeccffaaiill shell option is enabled. In + that case, it returns a non-zero status. An interactive shell + returns a non-zero status if the file cannot be executed. A subshell exits unconditionally if eexxeecc fails. 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. If there is a redi- + current shell, and the return status is 0. If there is a redi- rection error, the return status is 1. 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. Any trap + Cause the shell to exit with a status of _n. If _n is omitted, + the exit status is that of the last command executed. Any trap on EEXXIITT is executed before the shell terminates. eexxppoorrtt [--ffnn] [_n_a_m_e[=_v_a_l_u_e]] ... eexxppoorrtt --pp - The supplied _n_a_m_e_s are marked for automatic export to the envi- - ronment of subsequently executed commands. If the --ff option is + The supplied _n_a_m_e_s are marked for automatic export to the envi- + ronment of subsequently executed commands. If the --ff option is given, the _n_a_m_e_s refer to functions. - The --nn option unexports, or removes the export attribute, from - each _n_a_m_e. If no _n_a_m_e_s are given, or if the --pp option is sup- - plied, eexxppoorrtt prints a list of names of all exported variables + The --nn option unexports, or removes the export attribute, from + each _n_a_m_e. If no _n_a_m_e_s are given, or if the --pp option is sup- + plied, eexxppoorrtt prints a list of names of all exported variables on the standard output. - eexxppoorrtt allows the value of a variable to be set when it is ex- + eexxppoorrtt allows the value of a variable to be set when it is ex- ported or unexported by following the variable name with =_v_a_l_u_e. This sets the value of the variable to _v_a_l_u_e while modifying the - export attribute. eexxppoorrtt returns an exit status of 0 unless an - invalid option is encountered, one of the _n_a_m_e_s is not a valid + export attribute. eexxppoorrtt returns an exit status of 0 unless an + invalid option is encountered, one of the _n_a_m_e_s is not a valid shell variable name, or --ff is supplied with a _n_a_m_e that is not a function. @@ -5703,141 +5709,141 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS ffcc [--ee _e_n_a_m_e] [--llnnrr] [_f_i_r_s_t] [_l_a_s_t] ffcc --ss [_p_a_t=_r_e_p] [_c_m_d] - The first form selects a range of commands from _f_i_r_s_t to _l_a_s_t - from the history list and displays or edits and re-executes - them. _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 history list, where a negative number is used as + The first form selects a range of commands from _f_i_r_s_t to _l_a_s_t + from the history list and displays or edits and re-executes + them. _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 history list, where a negative number is used as an offset from the current command number). When listing, a _f_i_r_s_t or _l_a_s_t of 0 is equivalent to -1 and -0 is equivalent to the current command (usually the ffcc command); oth- - erwise 0 is equivalent to -1 and -0 is invalid. If _l_a_s_t is not + erwise 0 is equivalent to -1 and -0 is invalid. If _l_a_s_t is not specified, it is set to the current command for listing (so that "fc -l -10" 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. - If the --ll option is supplied, the commands are listed on the - standard output. The --nn option suppresses the command numbers + If the --ll option is supplied, the commands are listed on the + standard output. The --nn option suppresses the command numbers when listing. The --rr option reverses the order of the commands. - Otherwise, ffcc invokes the editor named by _e_n_a_m_e on a file con- - taining those commands. If _e_n_a_m_e is not supplied, ffcc uses the - value of the FFCCEEDDIITT variable, and the value of EEDDIITTOORR if FFCCEEDDIITT - is not set. If neither variable is set, ffcc uses _v_i_. When edit- - ing is complete, ffcc reads the file containing the edited com- + Otherwise, ffcc invokes the editor named by _e_n_a_m_e on a file con- + taining those commands. If _e_n_a_m_e is not supplied, ffcc uses the + value of the FFCCEEDDIITT variable, and the value of EEDDIITTOORR if FFCCEEDDIITT + is not set. If neither variable is set, ffcc uses _v_i_. When edit- + ing is complete, ffcc reads the file containing the edited com- mands and echoes and executes them. - In the second form, ffcc re-executes _c_o_m_m_a_n_d after replacing each - instance of _p_a_t with _r_e_p. _C_o_m_m_a_n_d is interpreted the same as + In the second form, ffcc re-executes _c_o_m_m_a_n_d after replacing each + instance of _p_a_t with _r_e_p. _C_o_m_m_a_n_d is interpreted the same as _f_i_r_s_t above. - A useful alias to use with ffcc is "r="fc -s"", so that typing "r + A useful alias to use with ffcc is "r="fc -s"", so that typing "r cc" runs the last command beginning with "cc" and typing "r" re- executes the last command. - If the first form is used, the return value is zero unless an - invalid option is encountered or _f_i_r_s_t or _l_a_s_t specify history - lines out of range. When editing and re-executing a file of + If the first form is used, the return value is zero unless an + invalid option is encountered or _f_i_r_s_t or _l_a_s_t specify history + lines out of range. When editing and re-executing a file of commands, the return value is the value of the last command exe- cuted or failure if an error occurs with the temporary file. If the second form is used, the return status is that of the re-ex- - ecuted command, unless _c_m_d does not specify a valid history en- + ecuted command, unless _c_m_d does not specify a valid history en- try, in which case ffcc returns a non-zero status. ffgg [_j_o_b_s_p_e_c] - Resume _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, ffgg uses the shell's notion of the - _c_u_r_r_e_n_t _j_o_b. The return value is that of the command placed - into the foreground, or failure if run when job control is dis- + Resume _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, ffgg uses the shell's notion of the + _c_u_r_r_e_n_t _j_o_b. The return value is that of the command placed + into the foreground, or failure if run when job control is dis- abled 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 + specify a valid job or _j_o_b_s_p_e_c specifies a job that was started without job control. ggeettooppttss _o_p_t_s_t_r_i_n_g _n_a_m_e [_a_r_g ...] - ggeettooppttss is used by shell scripts and functions to parse posi- - tional parameters and obtain options and their arguments. _o_p_t_- - _s_t_r_i_n_g contains the option characters to be recognized; if a + ggeettooppttss is used by shell scripts and functions to parse posi- + tional parameters and obtain options and their arguments. _o_p_t_- + _s_t_r_i_n_g contains the option characters to be recognized; if a character is followed by a colon, the option is expected to have - an argument, which should be separated from it by white space. + an argument, which should be separated from it by white space. The colon and question mark characters may not be used as option characters. - Each time it is invoked, ggeettooppttss places the next option in the + Each time it is invoked, ggeettooppttss places the next option in the shell variable _n_a_m_e, initializing _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, + 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 manu- - ally reset between multiple calls to ggeettooppttss within the same + The shell does not reset OOPPTTIINNDD automatically; it must be manu- + ally reset between multiple calls to ggeettooppttss within the same shell invocation to use a new set of parameters. - When it reaches the end of options, ggeettooppttss exits with a return - value greater than zero. OOPPTTIINNDD is set to the index of the + When it reaches the end of options, ggeettooppttss exits with a return + value greater than zero. OOPPTTIINNDD is set to the index of the first non-option argument, and _n_a_m_e is set to ?. - ggeettooppttss normally parses the positional parameters, but if more - arguments are supplied as _a_r_g values, ggeettooppttss parses those in- + ggeettooppttss normally parses the positional parameters, but if more + arguments are supplied as _a_r_g values, ggeettooppttss parses those in- stead. - ggeettooppttss can report errors in two ways. If the first character - of _o_p_t_s_t_r_i_n_g is a colon, ggeettooppttss uses _s_i_l_e_n_t error reporting. - In normal operation, ggeettooppttss prints diagnostic messages when it - encounters invalid options or missing option arguments. If the - variable OOPPTTEERRRR is set to 0, ggeettooppttss does not display any error - messages, even if the first character of _o_p_t_s_t_r_i_n_g is not a + ggeettooppttss can report errors in two ways. If the first character + of _o_p_t_s_t_r_i_n_g is a colon, ggeettooppttss uses _s_i_l_e_n_t error reporting. + In normal operation, ggeettooppttss prints diagnostic messages when it + encounters invalid options or missing option arguments. If the + variable OOPPTTEERRRR is set to 0, ggeettooppttss does not display any error + messages, even if the first character of _o_p_t_s_t_r_i_n_g is not a colon. If ggeettooppttss detects an invalid option, it places ? into _n_a_m_e and, - if not silent, prints an error message and unsets OOPPTTAARRGG. If - ggeettooppttss is silent, it assigns the option character found to OOPP-- + if not silent, prints an error message and unsets OOPPTTAARRGG. If + ggeettooppttss is silent, it assigns the option character found to OOPP-- TTAARRGG and does not print a diagnostic message. - If a required argument is not found, and ggeettooppttss is not silent, + If a required argument is not found, and ggeettooppttss is not silent, it sets the value of _n_a_m_e to a question mark (??), unsets OOPPTTAARRGG, - and prints a diagnostic message. If ggeettooppttss is silent, it sets - the value of _n_a_m_e to a colon (::) and sets OOPPTTAARRGG to the option + and prints a diagnostic message. If ggeettooppttss is silent, it sets + the value of _n_a_m_e to a colon (::) and sets OOPPTTAARRGG to the option character found. - ggeettooppttss returns true if an option, specified or unspecified, is + 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 [--llrr] [--pp _f_i_l_e_n_a_m_e] [--ddtt] [_n_a_m_e] Each time hhaasshh is invoked, it remembers the full pathname of the - command _n_a_m_e as determined by searching the directories in - $$PPAATTHH. Any previously-remembered pathname associated with _n_a_m_e - is discarded. If the --pp option is supplied, hhaasshh uses _f_i_l_e_n_a_m_e + command _n_a_m_e as determined by searching the directories in + $$PPAATTHH. Any previously-remembered pathname associated with _n_a_m_e + is discarded. If the --pp option is supplied, hhaasshh uses _f_i_l_e_n_a_m_e as the full pathname of the command. - The --rr option causes the shell to forget all remembered loca- - tions. Assigning to the PPAATTHH variable also clears all hashed - filenames. The --dd option causes the shell to forget the remem- + The --rr option causes the shell to forget all remembered loca- + tions. Assigning to the PPAATTHH variable also clears all hashed + filenames. The --dd option causes the shell to forget the remem- bered location of each _n_a_m_e. If the --tt option is supplied, hhaasshh prints the full pathname cor- - responding to each _n_a_m_e. If multiple _n_a_m_e arguments are sup- - plied with --tt, hhaasshh prints the _n_a_m_e before the corresponding + responding to each _n_a_m_e. If multiple _n_a_m_e arguments are sup- + plied with --tt, hhaasshh prints the _n_a_m_e before the corresponding hashed full pathname. The --ll option displays output in a format that may be reused as input. - If no arguments are given, or if only --ll is supplied, hhaasshh - prints information about remembered commands. The --tt, --dd, and - --pp options (the options that act on the _n_a_m_e arguments) are mu- + If no arguments are given, or if only --ll is supplied, hhaasshh + prints information about remembered commands. The --tt, --dd, and + --pp options (the options that act on the _n_a_m_e arguments) are mu- tually exclusive. Only one will be active. If more than one is - supplied, --tt has higher priority than --pp, and both have higher + supplied, --tt has higher priority than --pp, and both have higher priority than --dd. - The return status is zero unless a _n_a_m_e is not found or an in- + The return status is zero unless a _n_a_m_e is not found or an in- valid option is supplied. hheellpp [--ddmmss] [_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 it displays a list of all the builtins and + 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 it displays a list of all the builtins and shell compound commands. --dd Display a short description of each _p_a_t_t_e_r_n --mm Display the description of each _p_a_t_t_e_r_n in a manpage-like @@ -5853,18 +5859,18 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS 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 numbers. - Entries prefixed with a ** have been modified. An argument of _n - lists only the last _n entries. If the shell variable HHIISSTTTTIIMMEE-- - FFOORRMMAATT is set and not null, it is used as a format string for - _s_t_r_f_t_i_m_e(3) to display the time stamp associated with each dis- - played history entry. If hhiissttoorryy uses HHIISSTTTTIIMMEEFFOORRMMAATT, it does - not print an intervening space between the formatted time stamp + With no options, display the command history list with numbers. + Entries prefixed with a ** have been modified. An argument of _n + lists only the last _n entries. If the shell variable HHIISSTTTTIIMMEE-- + FFOORRMMAATT is set and not null, it is used as a format string for + _s_t_r_f_t_i_m_e(3) to display the time stamp associated with each dis- + played history entry. If hhiissttoorryy uses HHIISSTTTTIIMMEEFFOORRMMAATT, it does + not print an intervening space between the formatted time stamp and the history entry. If _f_i_l_e_n_a_m_e is supplied, hhiissttoorryy uses it as the name of the his- - tory file; if not, it uses the value of HHIISSTTFFIILLEE. If _f_i_l_e_n_a_m_e - is not supplied and HHIISSTTFFIILLEE is unset or null, the --aa,, --nn,, --rr,, + tory file; if not, it uses the value of HHIISSTTFFIILLEE. If _f_i_l_e_n_a_m_e + is not supplied and HHIISSTTFFIILLEE is unset or null, the --aa,, --nn,, --rr,, and --ww options have no effect. Options, if supplied, have the following meanings: @@ -5872,20 +5878,20 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS can be used with the other options to replace the history list. --dd _o_f_f_s_e_t - Delete the history entry at position _o_f_f_s_e_t. If _o_f_f_s_e_t + Delete the history entry at position _o_f_f_s_e_t. If _o_f_f_s_e_t is negative, it is interpreted as relative to one greater than the last history position, so negative indices count - back from the end of the history, and an index of -1 + back from the end of the history, and an index of -1 refers to the current hhiissttoorryy --dd command. --dd _s_t_a_r_t-_e_n_d - Delete the range of history entries between positions - _s_t_a_r_t and _e_n_d, inclusive. Positive and negative values + Delete the range of history entries between positions + _s_t_a_r_t and _e_n_d, inclusive. Positive and negative values for _s_t_a_r_t and _e_n_d are interpreted as described above. - --aa Append the "new" history lines to the history file. - These are history lines entered since the beginning of + --aa Append the "new" history lines to the history file. + These are history lines entered since the beginning of the current bbaasshh session, but not already appended to the history file. - --nn Read the history lines not already read from the history + --nn Read the history lines not already read from the history file and add them to the current history list. These are lines appended to the history file since the beginning of the current bbaasshh session. @@ -5893,24 +5899,24 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS rent history list. --ww Write the current history list to the history file, over- writing the history file. - --pp Perform history substitution on the following _a_r_g_s and - display the result on the standard output, without stor- - ing the results in the history list. Each _a_r_g must be + --pp Perform history substitution on the following _a_r_g_s and + display the result on the standard output, without stor- + ing the results in 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 single entry. - The last command in the history list is removed before + --ss Store the _a_r_g_s in the history list as a single entry. + The last command in the history list is removed before adding the _a_r_g_s. - If the HHIISSTTTTIIMMEEFFOORRMMAATT variable is set, hhiissttoorryy writes the time + If the HHIISSTTTTIIMMEEFFOORRMMAATT variable is set, hhiissttoorryy writes the time stamp information associated with each history entry to the his- - tory file, marked with the history comment character as de- - scribed above. When the history file is read, lines beginning - with the history comment character followed immediately by a - digit are interpreted as timestamps for the following history + tory file, marked with the history comment character as de- + scribed above. When the history file is read, lines beginning + with the history comment character followed immediately by a + digit are interpreted as timestamps for the following history entry. - The return value is 0 unless an invalid option is encountered, - an error occurs while reading or writing the history file, an + The return value is 0 unless an invalid option is encountered, + an error occurs while reading or writing the history file, an invalid _o_f_f_s_e_t or range is supplied as an argument to --dd, or the history expansion supplied as an argument to --pp fails. @@ -5919,14 +5925,14 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS The first form lists the active jobs. The options have the fol- lowing meanings: --ll List process IDs in addition to the normal information. - --nn Display information only about jobs that have changed + --nn Display information only about jobs that have changed status since the user was last notified of their status. - --pp List only the process ID of the job's process group + --pp List only the process ID of the job's process group leader. --rr Display only running jobs. --ss Display only stopped jobs. - If _j_o_b_s_p_e_c is supplied, jjoobbss restricts output to information + If _j_o_b_s_p_e_c is supplied, jjoobbss restricts output to information about that job. The return status is 0 unless an invalid option is encountered or an invalid _j_o_b_s_p_e_c is supplied. @@ -5936,433 +5942,433 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS kkiillll [--ss _s_i_g_s_p_e_c | --nn _s_i_g_n_u_m | --_s_i_g_s_p_e_c] _i_d [ ... ] kkiillll --ll|--LL [_s_i_g_s_p_e_c | _e_x_i_t___s_t_a_t_u_s] - Send the signal specified by _s_i_g_s_p_e_c or _s_i_g_n_u_m to the processes + Send the signal specified by _s_i_g_s_p_e_c or _s_i_g_n_u_m to the processes named by each _i_d. Each _i_d may be a job specification _j_o_b_s_p_e_c or - a process ID _p_i_d. _s_i_g_s_p_e_c is either a case-insensitive signal - name such as SSIIGGKKIILLLL (with or without the SSIIGG prefix) or a sig- - nal number; _s_i_g_n_u_m is a signal number. If _s_i_g_s_p_e_c is not sup- + a process ID _p_i_d. _s_i_g_s_p_e_c is either a case-insensitive signal + name such as SSIIGGKKIILLLL (with or without the SSIIGG prefix) or a sig- + nal number; _s_i_g_n_u_m is a signal number. If _s_i_g_s_p_e_c is not sup- plied, then kkiillll sends SSIIGGTTEERRMM. The --ll option lists the signal names. If any arguments are sup- plied when --ll is given, kkiillll lists the names of the signals cor- - responding to the arguments, and the return status is 0. The - _e_x_i_t___s_t_a_t_u_s argument to --ll is a number specifying either a sig- - nal number or the exit status of a process terminated by a sig- - nal; if it is supplied, kkiillll prints the name of the signal that + responding to the arguments, and the return status is 0. The + _e_x_i_t___s_t_a_t_u_s argument to --ll is a number specifying either a sig- + nal number or the exit status of a process terminated by a sig- + nal; if it is supplied, kkiillll prints the name of the signal that caused the process to terminate. kkiillll assumes that process exit statuses are greater than 128; anything less than that is a sig- nal number. The --LL option is equivalent to --ll. - kkiillll returns true if at least one signal was successfully sent, + kkiillll returns true if at least one signal was successfully sent, or false if an error occurs or an invalid option is encountered. lleett _a_r_g [_a_r_g ...] - Each _a_r_g is evaluated as an arithmetic expression (see AARRIITTHH-- - MMEETTIICC EEVVAALLUUAATTIIOONN above). If the last _a_r_g evaluates to 0, lleett + Each _a_r_g is evaluated as an arithmetic expression (see AARRIITTHH-- + MMEETTIICC EEVVAALLUUAATTIIOONN above). If the last _a_r_g evaluates to 0, lleett returns 1; otherwise lleett returns 0. llooccaall [_o_p_t_i_o_n] [_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. The _o_p_t_i_o_n can be any of the options accepted by ddee-- - ccllaarree. When llooccaall is used within a function, it causes the - variable _n_a_m_e to have a visible scope restricted to that func- - tion and its children. It is an error to use llooccaall when not + it _v_a_l_u_e. The _o_p_t_i_o_n can be any of the options accepted by ddee-- + ccllaarree. When llooccaall is used within a function, it causes the + variable _n_a_m_e to have a visible scope restricted to that func- + tion and its children. It is an error to use llooccaall when not within a function. - If _n_a_m_e is -, it makes the set of shell options local to the - function in which llooccaall is invoked: any shell options changed - using the sseett builtin inside the function after the call to lloo-- - ccaall are restored to their original values when the function re- - turns. The restore is performed as if a series of sseett commands - were executed to restore the values that were in place before + If _n_a_m_e is -, it makes the set of shell options local to the + function in which llooccaall is invoked: any shell options changed + using the sseett builtin inside the function after the call to lloo-- + ccaall are restored to their original values when the function re- + turns. The restore is performed as if a series of sseett commands + were executed to restore the values that were in place before the function. - With no operands, llooccaall writes a list of local variables to the + With no operands, llooccaall writes a list of local variables to the standard output. - The return status is 0 unless llooccaall is used outside a function, + The return status is 0 unless llooccaall is used outside a function, an invalid _n_a_m_e is supplied, or _n_a_m_e is a readonly variable. llooggoouutt [[_n]] - Exit a login shell, returning a status of _n to the shell's par- + Exit a login shell, returning a status of _n to the shell's par- ent. mmaappffiillee [--dd _d_e_l_i_m] [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC _c_a_l_l_b_a_c_k] [--cc _q_u_a_n_t_u_m] [_a_r_r_a_y] rreeaaddaarrrraayy [--dd _d_e_l_i_m] [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC _c_a_l_l_b_a_c_k] [--cc _q_u_a_n_t_u_m] [_a_r_r_a_y] - Read lines from the standard input, or from file descriptor _f_d - if the --uu option is supplied, into the indexed array variable - _a_r_r_a_y. The variable MMAAPPFFIILLEE is the default _a_r_r_a_y. Options, if + Read lines from the standard input, or from file descriptor _f_d + if the --uu option is supplied, into the indexed array variable + _a_r_r_a_y. The variable MMAAPPFFIILLEE is the default _a_r_r_a_y. Options, if supplied, have the following meanings: - --dd Use the first character of _d_e_l_i_m to terminate each input + --dd Use the first character of _d_e_l_i_m to terminate each input line, rather than newline. If _d_e_l_i_m is the empty string, mmaappffiillee will terminate a line when it reads a NUL charac- ter. --nn Copy at most _c_o_u_n_t lines. If _c_o_u_n_t is 0, copy all lines. - --OO Begin assigning to _a_r_r_a_y at index _o_r_i_g_i_n. The default + --OO Begin assigning to _a_r_r_a_y at index _o_r_i_g_i_n. The default index is 0. --ss Discard the first _c_o_u_n_t lines read. - --tt Remove a trailing _d_e_l_i_m (default newline) from each line + --tt Remove a trailing _d_e_l_i_m (default newline) from each line read. - --uu Read lines from file descriptor _f_d instead of the stan- + --uu Read lines from file descriptor _f_d instead of the stan- dard input. - --CC Evaluate _c_a_l_l_b_a_c_k each time _q_u_a_n_t_u_m lines are read. The + --CC Evaluate _c_a_l_l_b_a_c_k each time _q_u_a_n_t_u_m lines are read. The --cc option specifies _q_u_a_n_t_u_m. - --cc Specify the number of lines read between each call to + --cc Specify the number of lines read between each call to _c_a_l_l_b_a_c_k. - If --CC is specified without --cc, the default quantum is 5000. + If --CC is specified without --cc, the default quantum is 5000. When _c_a_l_l_b_a_c_k is evaluated, it is supplied the index of the next array element to be assigned and the line to be assigned to that - element as additional arguments. _c_a_l_l_b_a_c_k is evaluated after + element as additional arguments. _c_a_l_l_b_a_c_k is evaluated after the line is read but before the array element is assigned. - If not supplied with an explicit origin, mmaappffiillee will clear _a_r_- + If not supplied with an explicit origin, mmaappffiillee will clear _a_r_- _r_a_y before assigning to it. mmaappffiillee returns zero unless an invalid option or option argument - is supplied, _a_r_r_a_y is invalid or unassignable, or if _a_r_r_a_y is + is supplied, _a_r_r_a_y is invalid or unassignable, or if _a_r_r_a_y is not an indexed array. ppooppdd [-nn] [+_n] [-_n] - Remove entries from the directory stack. The elements are num- - bered from 0 starting at the first directory listed by ddiirrss, so - ppooppdd is equivalent to "popd +0." With no arguments, ppooppdd re- - moves the top directory from the stack, and changes to the new + Remove entries from the directory stack. The elements are num- + bered from 0 starting at the first directory listed by ddiirrss, so + ppooppdd is equivalent to "popd +0." With no arguments, ppooppdd re- + moves the top directory from the stack, and changes to the new top directory. Arguments, if supplied, have the following mean- ings: --nn Suppress the normal change of directory when removing di- rectories from the stack, only manipulate the stack. - ++_n Remove the _nth entry counting from the left of the list - shown by ddiirrss, starting with zero, from the stack. For + ++_n Remove the _nth entry counting from the left of the list + shown by ddiirrss, starting with zero, from the stack. For example: "popd +0" removes the first directory, "popd +1" the second. - --_n Remove 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 + --_n Remove 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. - If the top element of the directory stack is modified, and the - _-_n option was not supplied, ppooppdd uses the ccdd builtin to change + If the top element of the directory stack is modified, and the + _-_n option was not supplied, ppooppdd uses the ccdd builtin to change to the directory at the top of the stack. If the ccdd fails, ppooppdd returns a non-zero value. - Otherwise, ppooppdd returns false if an invalid option is supplied, - the directory stack is empty, or _n specifies a non-existent di- + Otherwise, ppooppdd returns false if an invalid option is supplied, + the directory stack is empty, or _n specifies a non-existent di- rectory stack entry. - If the ppooppdd command is successful, bbaasshh runs ddiirrss to show the - final contents of the directory stack, and the return status is + If the ppooppdd command is successful, bbaasshh runs ddiirrss to show the + final contents of the directory stack, and the return status is 0. pprriinnttff [--vv _v_a_r] _f_o_r_m_a_t [_a_r_g_u_m_e_n_t_s] - Write the formatted _a_r_g_u_m_e_n_t_s to the standard output under the - control of the _f_o_r_m_a_t. The --vv option assigns the output to the + Write the formatted _a_r_g_u_m_e_n_t_s to the standard output under the + control of the _f_o_r_m_a_t. The --vv option assigns the output to the variable _v_a_r rather than printing it to the standard output. - The _f_o_r_m_a_t is a character string which contains three types of - objects: plain characters, which are simply copied to standard - output, character escape sequences, which are converted and - copied to the standard output, and format specifications, each - of which causes printing of the next successive _a_r_g_u_m_e_n_t. In - addition to the standard _p_r_i_n_t_f(3) format characters ccCCssSS-- + The _f_o_r_m_a_t is a character string which contains three types of + objects: plain characters, which are simply copied to standard + output, character escape sequences, which are converted and + copied to the standard output, and format specifications, each + of which causes printing of the next successive _a_r_g_u_m_e_n_t. In + addition to the standard _p_r_i_n_t_f(3) format characters ccCCssSS-- nnddiioouuxxXXeeEEffFFggGGaaAA, pprriinnttff interprets the following additional for- mat specifiers: %%bb causes pprriinnttff to expand backslash escape sequences in the corresponding _a_r_g_u_m_e_n_t in the same way as eecchhoo --ee. - %%qq causes pprriinnttff to output the corresponding _a_r_g_u_m_e_n_t in a - format that can be reused as shell input. %%qq and %%QQ use - the $$'''' quoting style if any characters in the argument - string require it, and backslash quoting otherwise. If - the format string uses the _p_r_i_n_t_f alternate form, these + %%qq causes pprriinnttff to output the corresponding _a_r_g_u_m_e_n_t in a + format that can be reused as shell input. %%qq and %%QQ use + the $$'''' quoting style if any characters in the argument + string require it, and backslash quoting otherwise. If + the format string uses the _p_r_i_n_t_f alternate form, these two formats quote the argument string using single quotes. - %%QQ like %%qq, but applies any supplied precision to the _a_r_g_u_- + %%QQ like %%qq, but applies any supplied precision to the _a_r_g_u_- _m_e_n_t before quoting it. %%((_d_a_t_e_f_m_t))TT - causes pprriinnttff to output the date-time string resulting - from using _d_a_t_e_f_m_t as a format string for _s_t_r_f_t_i_m_e(3). + causes pprriinnttff to output the date-time string resulting + from using _d_a_t_e_f_m_t as a format string for _s_t_r_f_t_i_m_e(3). The corresponding _a_r_g_u_m_e_n_t is an integer representing the number of seconds since the epoch. This format specifier recognizes two special argument values: -1 represents the - current time, and -2 represents the time the shell was + current time, and -2 represents the time the shell was invoked. If no argument is specified, conversion behaves - as if -1 had been supplied. This is an exception to the + as if -1 had been supplied. This is an exception to the usual pprriinnttff behavior. The %b, %q, and %T format specifiers all use the field width and precision arguments from the format specification and write that - many bytes from (or use that wide a field for) the expanded ar- - gument, which usually contains more characters than the origi- + many bytes from (or use that wide a field for) the expanded ar- + gument, which usually contains more characters than the origi- nal. The %n format specifier accepts a corresponding argument that is treated as a shell variable name. - The %s and %c format specifiers accept an l (long) modifier, + The %s and %c format specifiers accept an l (long) modifier, which forces them to convert the argument string to a wide-char- acter string and apply any supplied field width and precision in terms of characters, not bytes. The %S and %C format specifiers are equivalent to %ls and %lc, respectively. - Arguments to non-string format specifiers are treated as C con- + Arguments to non-string format specifiers are treated as C con- stants, except that a leading plus or minus sign is allowed, and - if the leading character is a single or double quote, the value - is the numeric value of the following character, using the cur- + if the leading character is a single or double quote, the value + is the numeric value of the following character, using the cur- rent locale. - The _f_o_r_m_a_t is reused as necessary to consume all of the _a_r_g_u_- + The _f_o_r_m_a_t is reused as necessary to consume all of the _a_r_g_u_- _m_e_n_t_s. If the _f_o_r_m_a_t requires more _a_r_g_u_m_e_n_t_s than are supplied, - the extra format specifications behave as if a zero value or - null string, as appropriate, had been supplied. The return - value is zero on success, non-zero if an invalid option is sup- + the extra format specifications behave as if a zero value or + null string, as appropriate, had been supplied. The return + value is zero on success, non-zero if an invalid option is sup- plied or a write or assignment error occurs. ppuusshhdd [--nn] [+_n] [-_n] ppuusshhdd [--nn] [_d_i_r] Add a directory to the top of the directory stack, or rotate the - stack, making the new top of the stack the current working di- - rectory. With no arguments, ppuusshhdd exchanges the top two ele- - ments of the directory stack. Arguments, if supplied, have the + stack, making the new top of the stack the current working di- + rectory. With no arguments, ppuusshhdd exchanges the top two ele- + ments of the directory stack. Arguments, if supplied, have the following meanings: - --nn Suppress the normal change of directory when rotating or - adding directories to the stack, only manipulate the + --nn Suppress the normal change of directory when rotating or + adding directories to the stack, only manipulate the stack. ++_n Rotate the stack so that the _nth directory (counting from - the left of the list shown by ddiirrss, starting with zero) + 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 + --_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. _d_i_r Adds _d_i_r to the directory stack at the top. After the stack has been modified, if the --nn option was not sup- - plied, ppuusshhdd uses the ccdd builtin to change to the directory at + plied, ppuusshhdd uses the ccdd builtin to change to the directory at the top of the stack. If the ccdd fails, ppuusshhdd returns a non-zero value. - Otherwise, if no arguments are supplied, ppuusshhdd returns zero un- - less the directory stack is empty. When rotating the directory + Otherwise, if no arguments are supplied, ppuusshhdd returns zero un- + less the directory stack is empty. When rotating the directory stack, ppuusshhdd returns zero unless the directory stack is empty or _n specifies a non-existent directory stack element. - If the ppuusshhdd command is successful, bbaasshh runs ddiirrss to show the + If the ppuusshhdd command is successful, bbaasshh runs ddiirrss to show the final contents of the directory stack. ppwwdd [--LLPP] - Print the absolute pathname of the current working directory. + Print the absolute pathname of the current working directory. The pathname printed contains no symbolic 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, the pathname printed may - contain symbolic links. The return status is 0 unless an error + is enabled. If the --LL option is used, the pathname printed may + contain symbolic links. The return status is 0 unless an error occurs while reading the name of the current directory or an in- valid option is supplied. rreeaadd [--EEeerrss] [--aa _a_n_a_m_e] [--dd _d_e_l_i_m] [--ii _t_e_x_t] [--nn _n_c_h_a_r_s] [--NN _n_c_h_a_r_s] [--pp _p_r_o_m_p_t] [--tt _t_i_m_e_o_u_t] [--uu _f_d] [_n_a_m_e ...] Read one line from the standard input, or from the file descrip- - tor _f_d supplied as an argument to the --uu option, split it into - words as described above under WWoorrdd SSpplliittttiinngg, and assign the - first word to the first _n_a_m_e, the second word to the second - _n_a_m_e, and so on. If there are more words than names, the re- - maining words and their intervening delimiters are assigned to - the last _n_a_m_e. If there are fewer words read from the input - stream than names, the remaining names are assigned empty val- - ues. The characters in the value of the IIFFSS variable are used + tor _f_d supplied as an argument to the --uu option, split it into + words as described above under WWoorrdd SSpplliittttiinngg, and assign the + first word to the first _n_a_m_e, the second word to the second + _n_a_m_e, and so on. If there are more words than names, the re- + maining words and their intervening delimiters are assigned to + the last _n_a_m_e. If there are fewer words read from the input + stream than names, the remaining names are assigned empty val- + ues. The characters in the value of the IIFFSS variable are used to split the line into words using the same rules the shell uses for expansion (described above under WWoorrdd SSpplliittttiinngg). The back- - slash character (\\) removes any special meaning for the next + slash character (\\) removes any special meaning for the next character read and is used for line continuation. Options, if supplied, have the following meanings: --aa _a_n_a_m_e 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. Other _n_a_m_e arguments are ig- + new values are assigned. Other _n_a_m_e arguments are ig- nored. --dd _d_e_l_i_m - The first character of _d_e_l_i_m terminates the input line, - rather than newline. If _d_e_l_i_m is the empty string, rreeaadd + The first character of _d_e_l_i_m terminates the input line, + rather than newline. If _d_e_l_i_m is the empty string, rreeaadd will terminate a line when it reads a NUL character. - --ee If the standard input is coming from a terminal, rreeaadd - uses rreeaaddlliinnee (see RREEAADDLLIINNEE above) to obtain the line. - RReeaaddlliinnee uses the current (or default, if line editing - was not previously active) editing settings, but uses + --ee If the standard input is coming from a terminal, rreeaadd + uses rreeaaddlliinnee (see RREEAADDLLIINNEE above) to obtain the line. + RReeaaddlliinnee uses the current (or default, if line editing + was not previously active) editing settings, but uses rreeaaddlliinnee's default filename completion. - --EE If the standard input is coming from a terminal, rreeaadd - uses rreeaaddlliinnee (see RREEAADDLLIINNEE above) to obtain the line. - RReeaaddlliinnee uses the current (or default, if line editing - was not previously active) editing settings, but uses + --EE If the standard input is coming from a terminal, rreeaadd + uses rreeaaddlliinnee (see RREEAADDLLIINNEE above) to obtain the line. + RReeaaddlliinnee uses the current (or default, if line editing + was not previously active) editing settings, but uses bash's default completion, including programmable comple- tion. --ii _t_e_x_t - If rreeaaddlliinnee is being used to read the line, rreeaadd places + If rreeaaddlliinnee is being used to read the line, rreeaadd places _t_e_x_t into the editing buffer before editing begins. --nn _n_c_h_a_r_s - rreeaadd returns after reading _n_c_h_a_r_s characters rather than - waiting for a complete line of input, unless it encoun- - ters EOF or rreeaadd times out, but honors a delimiter if it + rreeaadd returns after reading _n_c_h_a_r_s characters rather than + waiting for a complete line of input, unless it encoun- + ters EOF or rreeaadd times out, but honors a delimiter if it reads fewer than _n_c_h_a_r_s characters before the delimiter. --NN _n_c_h_a_r_s - rreeaadd returns after reading exactly _n_c_h_a_r_s characters - rather than waiting for a complete line of input, unless + rreeaadd returns after reading exactly _n_c_h_a_r_s characters + rather than waiting for a complete line of input, unless it encounters EOF or rreeaadd times out. Any delimiter char- - acters in the input are not treated specially and do not + acters in the input are not treated specially and do not cause rreeaadd to return until it has read _n_c_h_a_r_s characters. The result is not split on the characters in IIFFSS; the in- tent is that the variable is assigned exactly the charac- - ters read (with the exception of backslash; see the --rr + ters read (with the exception of backslash; see the --rr option below). --pp _p_r_o_m_p_t Display _p_r_o_m_p_t on standard error, without a trailing new- - line, before attempting to read any input, but only if + line, before attempting to read any input, but only if input is coming from a terminal. --rr Backslash does not act as an escape character. The back- - slash is considered to be part of the line. In particu- - lar, a backslash-newline pair may not then be used as a + slash is considered to be part of the line. In particu- + lar, a backslash-newline pair may not then be used as a line continuation. --ss Silent mode. If input is coming from a terminal, charac- ters are not echoed. --tt _t_i_m_e_o_u_t - Cause rreeaadd to time out and return failure if it does not - read a complete line of input (or a specified number of - characters) within _t_i_m_e_o_u_t seconds. _t_i_m_e_o_u_t may be a - decimal number with a fractional portion following the - decimal point. This option is only effective if rreeaadd is - reading input from a terminal, pipe, or other special - file; it has no effect when reading from regular files. - If rreeaadd times out, it saves any partial input read into - the specified variable _n_a_m_e, and the exit status is - greater than 128. If _t_i_m_e_o_u_t is 0, rreeaadd returns immedi- - ately, without trying to read any data. In this case, - the exit status is 0 if input is available on the speci- - fied file descriptor, or the read will return EOF, non- + Cause rreeaadd to time out and return failure if it does not + read a complete line of input (or a specified number of + characters) within _t_i_m_e_o_u_t seconds. _t_i_m_e_o_u_t may be a + decimal number with a fractional portion following the + decimal point. This option is only effective if rreeaadd is + reading input from a terminal, pipe, or other special + file; it has no effect when reading from regular files. + If rreeaadd times out, it saves any partial input read into + the specified variable _n_a_m_e, and the exit status is + greater than 128. If _t_i_m_e_o_u_t is 0, rreeaadd returns immedi- + ately, without trying to read any data. In this case, + the exit status is 0 if input is available on the speci- + fied file descriptor, or the read will return EOF, non- zero otherwise. - --uu _f_d Read input from file descriptor _f_d instead of the stan- + --uu _f_d Read input from file descriptor _f_d instead of the stan- dard input. - Other than the case where _d_e_l_i_m is the empty string, rreeaadd ig- + Other than the case where _d_e_l_i_m is the empty string, rreeaadd ig- nores any NUL characters in the input. - If no _n_a_m_e_s are supplied, rreeaadd assigns the line read, without - the ending delimiter but otherwise unmodified, to the variable + If no _n_a_m_e_s are supplied, rreeaadd assigns the line read, without + the ending delimiter but otherwise unmodified, to the variable RREEPPLLYY. The exit status is zero, unless end-of-file is encountered, rreeaadd - times out (in which case the status is greater than 128), a + times out (in which case the status is greater than 128), a variable assignment error (such as assigning to a readonly vari- - able) occurs, or an invalid file descriptor is supplied as the + able) occurs, or an invalid file descriptor is supplied as the argument to --uu. rreeaaddoonnllyy [--aaAAff] [--pp] [_n_a_m_e[=_w_o_r_d] ...] - The given _n_a_m_e_s are marked readonly; the values of these _n_a_m_e_s + 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 or unset. If the --ff - option is supplied, each _n_a_m_e refers to a shell function. The - --aa option restricts the variables to indexed arrays; the --AA op- + option is supplied, each _n_a_m_e refers to a shell function. The + --aa option restricts the variables to indexed arrays; the --AA op- tion restricts the variables to associative arrays. If both op- - tions are supplied, --AA takes precedence. If no _n_a_m_e arguments - are supplied, or if the --pp option is supplied, print a list of - all readonly names. The other options may be used to restrict + tions are supplied, --AA takes precedence. If no _n_a_m_e arguments + are supplied, or if the --pp option is supplied, print a list of + all readonly names. The other options may be used to restrict the output to a subset of the set of readonly names. The --pp op- tion displays output in a format that may be reused as input. - rreeaaddoonnllyy allows the value of a variable to be set at the same + rreeaaddoonnllyy allows the value of a variable to be set at the same time the readonly attribute is changed by following the variable - name with =_v_a_l_u_e. This sets the value of the variable is to + name with =_v_a_l_u_e. This sets the value of the variable is to _v_a_l_u_e while modifying the readonly attribute. - The return status is 0 unless an invalid option is encountered, - one of the _n_a_m_e_s is not a valid shell variable name, or --ff is + The return status is 0 unless an invalid option is encountered, + one of the _n_a_m_e_s is not a valid shell variable name, or --ff is supplied with a _n_a_m_e that is not a function. rreettuurrnn [_n] - Stop executing a shell function or sourced file and return the + Stop executing a shell function or sourced file and return the value specified by _n to its caller. If _n is omitted, the return - status is that of the last command executed. If rreettuurrnn is exe- - cuted by a trap handler, the last command used to determine the + status is that of the last command executed. If rreettuurrnn is exe- + cuted by a trap handler, the last command used to determine the status is the last command executed before the trap handler. If rreettuurrnn is executed during a DDEEBBUUGG trap, the last command used to - determine the status is the last command executed by the trap + determine the status is the last command executed by the trap handler before rreettuurrnn was invoked. When rreettuurrnn is used to terminate execution of a script being ex- - ecuted 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 status - of the script. If _n is supplied, the return value is its least + ecuted 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 status + of the script. If _n is supplied, the return value is its least significant 8 bits. - Any command associated with the RREETTUURRNN trap is executed before + Any command associated with the RREETTUURRNN trap is executed before execution resumes after the function or script. - The return status is non-zero if rreettuurrnn is supplied a non-nu- + The return status is non-zero if rreettuurrnn is supplied a non-nu- meric argument, or is used outside a function and not during ex- ecution of a script by .. or ssoouurrccee. sseett [--aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [--oo _o_p_t_i_o_n_-_n_a_m_e] [----] [--] [_a_r_g ...] sseett [++aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [++oo _o_p_t_i_o_n_-_n_a_m_e] [----] [--] [_a_r_g ...] sseett --oo - sseett ++oo Without options, display the name and value of each shell vari- - able in a format that can be reused as input for setting or re- + sseett ++oo Without options, display the name and value of each shell vari- + able in a format that can be reused as input for setting or re- setting the currently-set variables. Read-only variables cannot - be reset. In posix mode, only shell variables are listed. The - output is sorted according to the current locale. When options - are specified, they set or unset shell attributes. Any argu- - ments remaining after option processing are treated as values + be reset. In posix mode, only shell variables are listed. The + output is sorted according to the current locale. When options + are specified, they set or unset shell attributes. Any argu- + ments remaining after option processing are treated as values for the positional parameters and are assigned, in order, to $$11, - $$22, ..., $$_n. Options, if specified, have the following mean- + $$22, ..., $$_n. Options, if specified, have the following mean- ings: --aa Each variable or function that is created or modified is - given the export attribute and marked for export to the + given the export attribute and marked for export to the environment of subsequent commands. - --bb Report the status of terminated background jobs immedi- + --bb Report the status of terminated background jobs immedi- ately, rather than before the next primary prompt or af- - ter a foreground command terminates. This is effective + ter a foreground command terminates. This is effective only when job control is enabled. - --ee Exit immediately if a _p_i_p_e_l_i_n_e (which may consist of a - single _s_i_m_p_l_e _c_o_m_m_a_n_d), a _l_i_s_t, or a _c_o_m_p_o_u_n_d _c_o_m_m_a_n_d + --ee Exit immediately if a _p_i_p_e_l_i_n_e (which may consist of a + single _s_i_m_p_l_e _c_o_m_m_a_n_d), a _l_i_s_t, or a _c_o_m_p_o_u_n_d _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 the command list immediately following a wwhhiillee - or uunnttiill keyword, part of the test following the iiff or - eelliiff reserved words, part of any command executed in a - &&&& or |||| list except the command following the final &&&& - or ||||, any command in a pipeline but the last (subject - to the state of the ppiippeeffaaiill shell option), or if the - command's return value is being inverted with !!. If a - compound command other than a subshell returns a non- - zero status because a command failed while --ee was being - ignored, the shell does not exit. A trap on EERRRR, if - set, is executed before the shell exits. This option + The shell does not exit if the command that fails is + part of the command list immediately following a wwhhiillee + or uunnttiill keyword, part of the test following the iiff or + eelliiff reserved words, part of any command executed in a + &&&& or |||| list except the command following the final &&&& + or ||||, any command in a pipeline but the last (subject + to the state of the ppiippeeffaaiill shell option), or if the + command's return value is being inverted with !!. If a + compound command other than a subshell returns a non- + zero status because a command failed while --ee was being + ignored, the shell does not exit. A trap on EERRRR, if + set, is executed before the shell exits. This option applies to the shell environment and each subshell envi- - ronment separately (see CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT + ronment separately (see CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT above), and may cause subshells to exit before executing all the commands in the subshell. - If a compound command or shell function executes in a - context where --ee is being ignored, none of the commands - executed within the compound command or function body - will be affected by the --ee setting, even if --ee is set - and a command returns a failure status. If a compound - command or shell function sets --ee while executing in a - context where --ee is ignored, that setting will not have - any effect until the compound command or the command + If a compound command or shell function executes in a + context where --ee is being ignored, none of the commands + executed within the compound command or function body + will be affected by the --ee setting, even if --ee is set + and a command returns a failure status. If a compound + command or shell function sets --ee while executing in a + context where --ee is ignored, that setting will not have + any effect until the compound command or the command containing the function call completes. --ff Disable pathname expansion. - --hh Remember the location of commands as they are looked up + --hh Remember the location of commands as they are looked up for execution. This is enabled by default. - --kk All arguments in the form of assignment statements are - placed in the environment for a command, not just those + --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 option is - on by default for interactive shells on systems that - support it (see JJOOBB CCOONNTTRROOLL above). All processes run + --mm Monitor mode. Job control is enabled. This option is + on by default for interactive shells on systems that + support it (see JJOOBB CCOONNTTRROOLL above). All processes run in a separate process group. When a background job com- pletes, the shell prints a line containing its exit sta- tus. --nn Read commands but do not execute them. This may be used - to check a shell script for syntax errors. This is ig- + to check a shell script for syntax errors. This is ig- nored 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 following: @@ -6370,10 +6376,10 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS Same as --aa. bbrraacceeeexxppaanndd Same as --BB. - eemmaaccss Use an emacs-style command line editing inter- + eemmaaccss Use an emacs-style command line editing inter- face. This is enabled by default when the shell is interactive, unless the shell is started with - the ----nnooeeddiittiinngg option. This also affects the + the ----nnooeeddiittiinngg option. This also affects the editing interface used for rreeaadd --ee. eerrrreexxiitt Same as --ee. eerrrrttrraaccee @@ -6387,7 +6393,7 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS HHIISSTTOORRYY. This option is on by default in inter- active shells. iiggnnoorreeeeooff - The effect is as if the shell command + The effect is as if the shell command "IGNOREEOF=10" had been executed (see SShheellll VVaarriiaabblleess above). kkeeyywwoorrdd Same as --kk. @@ -6403,184 +6409,184 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS pphhyyssiiccaall Same as --PP. ppiippeeffaaiill - If set, the return value of a pipeline is the - value of the last (rightmost) command to exit - with a non-zero status, or zero if all commands - in the pipeline exit successfully. This option + If set, the return value of a pipeline is the + value of the last (rightmost) command to exit + with a non-zero status, or zero if all commands + in the pipeline exit successfully. This option is disabled by default. - ppoossiixx Change the behavior of bbaasshh where the default - operation differs from the POSIX standard to - match the standard (_p_o_s_i_x _m_o_d_e). See SSEEEE AALLSSOO + ppoossiixx Change the behavior of bbaasshh where the default + operation differs from the POSIX standard to + match the standard (_p_o_s_i_x _m_o_d_e). See SSEEEE AALLSSOO below for a reference to a document that details how posix mode affects bash's behavior. pprriivviilleeggeedd Same as --pp. vveerrbboossee Same as --vv. - vvii Use a vi-style command line editing interface. + vvii Use a vi-style command line editing interface. This also affects the editing interface used for rreeaadd --ee. xxttrraaccee Same as --xx. - If --oo is supplied with no _o_p_t_i_o_n_-_n_a_m_e, sseett prints the - current shell option settings. If ++oo is supplied with - no _o_p_t_i_o_n_-_n_a_m_e, sseett prints a series of sseett commands to - recreate the current option settings on the standard + If --oo is supplied with no _o_p_t_i_o_n_-_n_a_m_e, sseett prints the + current shell option settings. If ++oo is supplied with + no _o_p_t_i_o_n_-_n_a_m_e, sseett prints a series of sseett commands to + recreate the current option settings on the standard output. - --pp Turn on _p_r_i_v_i_l_e_g_e_d mode. In this mode, the shell does - not read the $$EENNVV and $$BBAASSHH__EENNVV files, shell functions - are not inherited from the environment, and the SSHHEELL-- - LLOOPPTTSS, BBAASSHHOOPPTTSS, CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if - they appear in the environment, are ignored. If the - shell is started with the effective user (group) id not - equal to the real user (group) id, and the --pp option is - not supplied, these actions are taken and the effective + --pp Turn on _p_r_i_v_i_l_e_g_e_d mode. In this mode, the shell does + not read the $$EENNVV and $$BBAASSHH__EENNVV files, shell functions + are not inherited from the environment, and the SSHHEELL-- + LLOOPPTTSS, BBAASSHHOOPPTTSS, CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if + they appear in the environment, are ignored. If the + shell is started with the effective user (group) id not + equal to the real user (group) id, and the --pp option is + not supplied, these actions are taken and the effective user id is set to the real user id. If the --pp option is supplied at startup, the effective user id is not reset. - Turning this option off causes the effective user and + Turning this option off causes the effective user and group ids to be set to the real user and group ids. --rr Enable restricted shell mode. This option cannot be un- set once it has been set. --tt Exit after reading and executing one command. --uu Treat unset variables and parameters other than the spe- - cial parameters "@" and "*", or array variables sub- - scripted with "@" or "*", as an error when performing - parameter expansion. If expansion is attempted on an - unset variable or parameter, the shell prints an error - message, and, if not interactive, exits with a non-zero + cial parameters "@" and "*", or array variables sub- + scripted with "@" or "*", as an error when performing + parameter expansion. If expansion is attempted on an + unset variable or parameter, 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, ffoorr command, ccaassee + --xx After expanding each _s_i_m_p_l_e _c_o_m_m_a_n_d, ffoorr command, ccaassee command, sseelleecctt command, or arithmetic ffoorr command, dis- - play the expanded value of PPSS44, followed by the command - and its expanded arguments or associated word list, to + play the expanded value of PPSS44, followed by the command + and its expanded arguments or associated word list, to the standard error. - --BB The shell performs brace expansion (see BBrraaccee EExxppaannssiioonn + --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. Using the - redirection operator >>|| instead of >> will override this + --CC If set, bbaasshh does not overwrite an existing file with + the >>, >>&&, and <<>> redirection operators. Using the + redirection operator >>|| instead of >> will override this and force the creation of an output file. --EE If set, any trap on EERRRR is inherited by shell functions, - command substitutions, and commands executed in a sub- - shell environment. The EERRRR trap is normally not inher- + command substitutions, and commands executed in a sub- + shell environment. The EERRRR trap is normally not inher- ited in such cases. --HH Enable !! style history substitution. This option is on by default when the shell is interactive. - --PP If set, the shell does not resolve symbolic links when - executing commands such as ccdd that change the current + --PP If set, the shell does not resolve 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 logical - chain of directories when performing commands which + chain of directories when performing commands which change the current directory. - --TT If set, any traps on DDEEBBUUGG and RREETTUURRNN are inherited by + --TT If set, any traps on DDEEBBUUGG and RREETTUURRNN are inherited by shell functions, command substitutions, and commands ex- - ecuted in a subshell environment. The DDEEBBUUGG and RREETTUURRNN + ecuted in a subshell environment. The DDEEBBUUGG and RREETTUURRNN traps are normally not inherited in such cases. ---- If no arguments follow this option, unset the positional parameters. Otherwise, set the positional parameters to the _a_r_gs, even if some of them begin with a --. -- Signal the end of options, and assign all remaining _a_r_gs to the positional parameters. The --xx and --vv options are - turned off. If there are no _a_r_gs, the positional para- + turned off. If there are no _a_r_gs, the positional para- meters remain unchanged. - The options are off by default unless otherwise noted. Using + - rather than - causes these options to be turned off. The op- + The options are off by default unless otherwise noted. Using + + rather than - causes these options to be turned off. The op- tions can also be specified as arguments to an invocation of the - shell. The current set of options may be found in $$--. The re- - turn status is always zero unless an invalid option is encoun- + shell. The current set of options may be found in $$--. The re- + turn status is always zero unless an invalid option is encoun- tered. sshhiifftt [_n] Rename positional parameters from _n+1 ... 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 + 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 settings controlling optional shell behav- - ior. The settings can be either those listed below, or, if the + Toggle the values of settings controlling optional shell behav- + ior. The settings can be either those listed below, or, if the --oo option is used, those available with the --oo option to the sseett builtin command. - With no options, or with the --pp option, display a list of all - settable options, with an indication of whether or not each is - set; if any _o_p_t_n_a_m_e_s are supplied, the output is restricted to + With no options, or with the --pp option, display a list of all + settable options, with an indication of whether or not each is + set; if any _o_p_t_n_a_m_e_s are supplied, the output is restricted to those options. The --pp option displays output in a form that may be reused as input. 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 + --qq Suppresses normal output (quiet mode); the return status indicates whether the _o_p_t_n_a_m_e is set or unset. If multi- - ple _o_p_t_n_a_m_e arguments are supplied with --qq, the return + ple _o_p_t_n_a_m_e arguments are supplied with --qq, the return status is zero if all _o_p_t_n_a_m_e_s are enabled; non-zero oth- erwise. - --oo Restricts the values of _o_p_t_n_a_m_e to be those defined for + --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 arguments, sshhoopptt - shows only those options which are set or unset, respectively. - Unless otherwise noted, the sshhoopptt options are disabled (unset) + If either --ss or --uu is used with no _o_p_t_n_a_m_e arguments, sshhoopptt + shows only those options which are set or unset, respectively. + Unless otherwise noted, the sshhoopptt options are disabled (unset) by default. - The return status when listing options is zero if all _o_p_t_n_a_m_e_s - are enabled, non-zero otherwise. When setting or unsetting op- - tions, the return status is zero unless an _o_p_t_n_a_m_e is not a + The return status when listing options is zero if all _o_p_t_n_a_m_e_s + are enabled, non-zero otherwise. When setting or unsetting op- + tions, the return status is zero unless an _o_p_t_n_a_m_e is not a valid shell option. The list of sshhoopptt options is: aarrrraayy__eexxppaanndd__oonnccee - If set, the shell suppresses multiple evaluation of as- + If set, the shell suppresses multiple evaluation of as- sociative and indexed array subscripts during arithmetic expression evaluation, while executing builtins that can - perform variable assignments, and while executing + perform variable assignments, and while executing builtins that perform array dereferencing. aassssoocc__eexxppaanndd__oonnccee Deprecated; a synonym for aarrrraayy__eexxppaanndd__oonnccee. - aauuttooccdd If set, a command name that is the name of a directory - is executed as if it were the argument to the ccdd com- + aauuttooccdd If set, a command name that is the name of a directory + is executed as if it were the argument to the ccdd com- mand. This option is only used by interactive shells. bbaasshh__ssoouurrccee__ffuullllppaatthh - If set, filenames added to the BBAASSHH__SSOOUURRCCEE array vari- - able are converted to full pathnames (see SShheellll VVaarrii-- + If set, filenames added to the BBAASSHH__SSOOUURRCCEE array vari- + able are converted to full pathnames (see SShheellll VVaarrii-- aabblleess above). ccddaabbllee__vvaarrss - If set, an argument to the ccdd builtin command that is - not a directory is assumed to be the name of a variable + If set, an argument to the ccdd builtin command 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, the ccdd command attempts to correct minor errors - in the spelling of a directory component. Minor errors - include transposed characters, a missing character, and + ccddssppeellll If set, the ccdd command attempts to correct minor errors + in the spelling of a directory component. Minor errors + include transposed characters, a missing character, and one extra character. If ccdd corrects the directory name, - it prints the corrected filename, and the command pro- + it prints the corrected filename, and the command pro- ceeds. This option is only used by interactive shells. cchheecckkhhaasshh If set, bbaasshh checks that a command found in the hash ta- - ble exists before trying to execute it. If a hashed - command no longer exists, bbaasshh performs a normal path + ble exists before trying to execute it. If a hashed + command no longer exists, bbaasshh performs a normal path search. cchheecckkjjoobbss If set, bbaasshh lists the status of any stopped and running - jobs before exiting an interactive shell. If any jobs + jobs before exiting an interactive shell. If any jobs are running, bbaasshh defers the exit until a second exit is - attempted without an intervening command (see JJOOBB CCOONN-- - TTRROOLL above). The shell always postpones exiting if any + attempted without an intervening command (see JJOOBB CCOONN-- + TTRROOLL above). The shell always postpones exiting if any jobs are stopped. cchheecckkwwiinnssiizzee - If set, bbaasshh checks the window size after each external - (non-builtin) command and, if necessary, updates the - values of LLIINNEESS and CCOOLLUUMMNNSS, using the file descriptor - associated with the standard error if it is a terminal. + If set, bbaasshh checks the window size after each external + (non-builtin) command and, if necessary, updates the + values of LLIINNEESS and CCOOLLUUMMNNSS, using the file descriptor + associated with the standard error if it is a terminal. This option is enabled by default. - 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. This option is - enabled by default, but only has an effect if command + 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. This option is + enabled by default, but only has an effect if command history is enabled, as described above under HHIISSTTOORRYY. ccoommppaatt3311 ccoommppaatt3322 @@ -6590,143 +6596,143 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS ccoommppaatt4433 ccoommppaatt4444 ccoommppaatt5500 - These control aspects of the shell's compatibility mode + These control aspects of the shell's compatibility mode (see SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE below). ccoommpplleettee__ffuullllqquuoottee - If set, bbaasshh quotes all shell metacharacters in file- - names and directory names when performing completion. + If set, bbaasshh quotes all shell metacharacters in file- + names and directory names when performing completion. If not set, bbaasshh removes metacharacters such as the dol- - lar sign from the set of characters that will be quoted - in completed filenames when these metacharacters appear - in shell variable references in words to be completed. - This means that dollar signs in variable names that ex- - pand to directories will not be quoted; however, any - dollar signs appearing in filenames will not be quoted, - either. This is active only when bash is using back- - slashes to quote completed filenames. This variable is - set by default, which is the default bash behavior in + lar sign from the set of characters that will be quoted + in completed filenames when these metacharacters appear + in shell variable references in words to be completed. + This means that dollar signs in variable names that ex- + pand to directories will not be quoted; however, any + dollar signs appearing in filenames will not be quoted, + either. This is active only when bash is using back- + slashes to quote completed filenames. This variable is + set by default, which is the default bash behavior in versions through 4.2. ddiirreexxppaanndd - If set, bbaasshh replaces directory names with the results - of word expansion when performing filename completion. + If set, bbaasshh replaces directory names with the results + of word expansion when performing filename completion. This changes the contents of the rreeaaddlliinnee editing - buffer. If not set, bbaasshh attempts to preserve what the + buffer. If not set, bbaasshh attempts to preserve what the user typed. ddiirrssppeellll - If set, bbaasshh attempts spelling correction on directory - names during word completion if the directory name ini- + If set, bbaasshh attempts spelling correction on directory + names during word completion if the directory name ini- tially supplied does not exist. - ddoottgglloobb If set, bbaasshh includes filenames beginning with a "." in - the results of pathname expansion. The filenames _. and + ddoottgglloobb If set, bbaasshh includes filenames beginning with a "." in + the results of pathname expansion. The filenames _. and _._. must always be matched explicitly, even if ddoottgglloobb is set. eexxeeccffaaiill If set, a non-interactive shell will not exit if it can- - not execute the file specified as an argument to the - eexxeecc builtin. An interactive shell does not exit if + not execute the file specified as an argument to the + eexxeecc builtin. An interactive shell does not exit if eexxeecc fails. eexxppaanndd__aalliiaasseess - If set, aliases are expanded as described above under + If set, aliases are expanded as described above under AALLIIAASSEESS. This option is enabled by default for interac- tive shells. eexxttddeebbuugg - If set at shell invocation, or in a shell startup file, + If set at shell invocation, or in a shell startup file, arrange to execute the debugger profile before the shell - starts, identical to the ----ddeebbuuggggeerr option. If set af- - ter invocation, behavior intended for use by debuggers + starts, identical to the ----ddeebbuuggggeerr option. If set af- + ter invocation, behavior intended for use by debuggers is enabled: 11.. The --FF option to the ddeeccllaarree builtin displays the source file name and line number corresponding to each function name supplied as an argument. - 22.. If the command run by the DDEEBBUUGG trap returns a - non-zero value, the next command is skipped and + 22.. If the command run by the DDEEBBUUGG trap returns a + non-zero value, the next command is skipped and not executed. - 33.. If the command run by the DDEEBBUUGG trap returns a - value of 2, and the shell is executing in a sub- - routine (a shell function or a shell script exe- - cuted by the .. or ssoouurrccee builtins), the shell + 33.. If the command run by the DDEEBBUUGG trap returns a + value of 2, and the shell is executing in a sub- + routine (a shell function or a shell script exe- + cuted by the .. or ssoouurrccee builtins), the shell simulates a call to rreettuurrnn. - 44.. BBAASSHH__AARRGGCC and BBAASSHH__AARRGGVV are updated as described + 44.. BBAASSHH__AARRGGCC and BBAASSHH__AARRGGVV are updated as described in their descriptions above). - 55.. Function tracing is enabled: command substitu- + 55.. Function tracing is enabled: command substitu- tion, shell functions, and subshells invoked with (( _c_o_m_m_a_n_d )) inherit the DDEEBBUUGG and RREETTUURRNN traps. - 66.. Error tracing is enabled: command substitution, - shell functions, and subshells invoked with (( + 66.. Error tracing is enabled: command substitution, + shell functions, and subshells invoked with (( _c_o_m_m_a_n_d )) inherit the EERRRR trap. - eexxttgglloobb If set, enable the extended pattern matching features + eexxttgglloobb If set, enable the extended pattern matching features described above under PPaatthhnnaammee EExxppaannssiioonn. eexxttqquuoottee - If set, $$'_s_t_r_i_n_g' and $$"_s_t_r_i_n_g" quoting is performed - within $${{_p_a_r_a_m_e_t_e_r}} expansions enclosed in double + If set, $$'_s_t_r_i_n_g' and $$"_s_t_r_i_n_g" quoting is performed + within $${{_p_a_r_a_m_e_t_e_r}} expansions enclosed in double quotes. This option is enabled by default. ffaaiillgglloobb - If set, patterns which fail to match filenames during + If set, patterns which fail to match filenames during pathname expansion result in an expansion error. ffoorrccee__ffiiggnnoorree - If set, the suffixes specified by the FFIIGGNNOORREE shell - variable cause words to be ignored when performing word + If set, the suffixes specified by the FFIIGGNNOORREE shell + variable cause words to be ignored when performing word completion even if the ignored words are the only possi- - ble completions. See SShheellll VVaarriiaabblleess above for a de- - scription of FFIIGGNNOORREE. This option is enabled by de- + ble completions. See SShheellll VVaarriiaabblleess above for a de- + scription of FFIIGGNNOORREE. This option is enabled by de- fault. gglloobbaasscciiiirraannggeess - If set, range expressions used in pattern matching - bracket expressions (see PPaatttteerrnn MMaattcchhiinngg above) behave - as if in the traditional C locale when performing com- - parisons. That is, pattern matching does not take the - current locale's collating sequence into account, so bb - will not collate between AA and BB, and upper-case and + If set, range expressions used in pattern matching + bracket expressions (see PPaatttteerrnn MMaattcchhiinngg above) behave + as if in the traditional C locale when performing com- + parisons. That is, pattern matching does not take the + current locale's collating sequence into account, so bb + will not collate between AA and BB, and upper-case and lower-case ASCII characters will collate together. gglloobbsskkiippddoottss - If set, pathname expansion will never match the file- - names _. and _._., even if the pattern begins with a ".". + If set, pathname expansion will never match the file- + names _. and _._., even if the pattern begins with a ".". This option is enabled by default. gglloobbssttaarr If set, the pattern **** used in a pathname expansion con- - text will match all files and zero or more directories - and subdirectories. If the pattern is followed by a //, + text will match all files and zero or more directories + and subdirectories. If the pattern is followed by a //, only directories and subdirectories match. ggnnuu__eerrrrffmmtt If set, shell error messages are written in the standard GNU error message format. hhiissttaappppeenndd - If set, the history list is appended to the file named + If set, the history list is appended to the file named by the value of the HHIISSTTFFIILLEE variable when the shell ex- its, rather than overwriting the file. hhiissttrreeeeddiitt - If set, and rreeaaddlliinnee is being used, the user is given - the opportunity to re-edit a failed history substitu- + If set, and rreeaaddlliinnee is being used, the user is given + the opportunity to re-edit a failed history substitu- tion. hhiissttvveerriiffyy - If set, and rreeaaddlliinnee is being used, the results of his- - tory substitution are not immediately passed to the - shell parser. Instead, the resulting line is loaded + If set, and rreeaaddlliinnee is being used, the results of his- + tory substitution are not immediately passed to the + shell parser. Instead, the resulting line is loaded into the rreeaaddlliinnee editing buffer, allowing further modi- fication. hhoossttccoommpplleettee If set, and rreeaaddlliinnee is being used, bbaasshh will attempt to - perform hostname completion when a word containing a @@ - is being completed (see CCoommpplleettiinngg under RREEAADDLLIINNEE + perform hostname completion when a word containing a @@ + is being completed (see CCoommpplleettiinngg under RREEAADDLLIINNEE above). This is enabled by default. hhuuppoonneexxiitt If set, bbaasshh will send SSIIGGHHUUPP to all jobs when an inter- active login shell exits. iinnhheerriitt__eerrrreexxiitt - If set, command substitution inherits the value of the - eerrrreexxiitt option, instead of unsetting it in the subshell - environment. This option is enabled when posix mode is + If set, command substitution inherits the value of the + eerrrreexxiitt option, instead of unsetting it in the subshell + environment. This option is enabled when posix mode is enabled. iinntteerraaccttiivvee__ccoommmmeennttss - In an interactive shell, a word beginning with ## causes - that word and all remaining characters on that line to - be ignored, as in a non-interactive shell (see CCOOMMMMEENNTTSS + In an interactive shell, a word beginning with ## causes + that word and all remaining characters on that line to + be ignored, as in a non-interactive shell (see CCOOMMMMEENNTTSS above). This option is enabled by default. llaassttppiippee - If set, and job control is not active, the shell runs + If set, and job control is not active, the shell runs the last command of a pipeline not executed in the back- ground in the current shell environment. - lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line + lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line commands are saved to the history with embedded newlines rather than using semicolon separators where possible. llooccaallvvaarr__iinnhheerriitt @@ -6735,37 +6741,37 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS scope before any new value is assigned. The nameref at- tribute is not inherited. llooccaallvvaarr__uunnsseett - If set, calling uunnsseett on local variables in previous - function scopes marks them so subsequent lookups find + If set, calling uunnsseett on local variables in previous + function scopes marks them so subsequent lookups find them unset until that function returns. This is identi- - cal to the behavior of unsetting local variables at the + cal to the behavior of unsetting local variables at the current function scope. llooggiinn__sshheellll - The shell sets this option if it is started as a login - shell (see IINNVVOOCCAATTIIOONN above). The value may not be + The shell sets this option if it is started as a login + shell (see IINNVVOOCCAATTIIOONN above). The value may not be changed. mmaaiillwwaarrnn - If set, and a file that bbaasshh is checking for mail has - been accessed since the last time it was checked, bbaasshh - displays the message "The mail in _m_a_i_l_f_i_l_e has been + If set, and a file that bbaasshh is checking for mail has + been accessed since the last time it was checked, bbaasshh + displays the message "The mail in _m_a_i_l_f_i_l_e has been read". nnoo__eemmppttyy__ccmmdd__ccoommpplleettiioonn If set, and rreeaaddlliinnee is being used, bbaasshh does not search - PPAATTHH for possible completions when completion is at- + PPAATTHH for possible completions when completion is at- tempted on an empty line. nnooccaasseegglloobb - If set, bbaasshh matches filenames in a case-insensitive + If set, bbaasshh matches filenames in a case-insensitive fashion when performing pathname expansion (see PPaatthhnnaammee EExxppaannssiioonn above). nnooccaasseemmaattcchh - If set, bbaasshh matches patterns in a case-insensitive + If set, bbaasshh matches patterns in a case-insensitive fashion when performing matching while executing ccaassee or [[[[ conditional commands, when performing pattern substi- - tution word expansions, or when filtering possible com- + tution word expansions, or when filtering possible com- pletions as part of programmable completion. nnooeexxppaanndd__ttrraannssllaattiioonn - If set, bbaasshh encloses the translated results of $$""..."" - quoting in single quotes instead of double quotes. If + If set, bbaasshh encloses the translated results of $$""..."" + quoting in single quotes instead of double quotes. If the string is not translated, this has no effect. nnuullllgglloobb If set, pathname expansion patterns which match no files @@ -6773,73 +6779,73 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS removed, rather than expanding to themselves. ppaattssuubb__rreeppllaacceemmeenntt If set, bbaasshh expands occurrences of && in the replacement - string of pattern substitution to the text matched by - the pattern, as described under PPaarraammeetteerr EExxppaannssiioonn + string of pattern substitution to the text matched by + the pattern, as described under PPaarraammeetteerr EExxppaannssiioonn above. This option is enabled by default. pprrooggccoommpp - If set, enable the programmable completion facilities + If set, enable the programmable completion facilities (see PPrrooggrraammmmaabbllee CCoommpplleettiioonn above). This option is en- abled by default. pprrooggccoommpp__aalliiaass - If set, and programmable completion is enabled, bbaasshh - treats a command name that doesn't have any completions + If set, and programmable completion is enabled, bbaasshh + treats a command name that doesn't have any completions as a possible alias and attempts alias expansion. If it - has an alias, bbaasshh attempts programmable completion us- + has an alias, bbaasshh attempts programmable completion us- ing the command word resulting from the expanded alias. pprroommppttvvaarrss If set, prompt strings undergo parameter expansion, com- - mand substitution, arithmetic expansion, and quote re- - moval after being expanded as described in PPRROOMMPPTTIINNGG + mand substitution, arithmetic expansion, and quote re- + moval after being expanded as described in PPRROOMMPPTTIINNGG above. This option is enabled by default. rreessttrriicctteedd__sshheellll - The shell sets this option if it is started in re- - stricted mode (see RREESSTTRRIICCTTEEDD SSHHEELLLL below). The value - may not be changed. This is not reset when the startup - files are executed, allowing the startup files to dis- + The shell sets this option if it is started in re- + stricted mode (see RREESSTTRRIICCTTEEDD SSHHEELLLL below). The value + may not be changed. This is not reset when the startup + files are executed, allowing the startup files to dis- cover whether or not a shell is restricted. sshhiifftt__vveerrbboossee - If set, the sshhiifftt builtin prints an error message when + If set, the sshhiifftt builtin prints an error message when the shift count exceeds the number of positional parame- ters. ssoouurrcceeppaatthh If set, the .. (ssoouurrccee) builtin uses the value of PPAATTHH to - find the directory containing the file supplied as an - argument when the --pp option is not supplied. This op- + find the directory containing the file supplied as an + argument when the --pp option is not supplied. This op- tion is enabled by default. vvaarrrreeddiirr__cclloossee - If set, the shell automatically closes file descriptors - assigned using the _{_v_a_r_n_a_m_e_} redirection syntax (see + If set, the shell automatically closes file descriptors + assigned using the _{_v_a_r_n_a_m_e_} redirection syntax (see RREEDDIIRREECCTTIIOONN above) instead of leaving them open when the command completes. xxppgg__eecchhoo - If set, the eecchhoo builtin expands backslash-escape se- - quences by default. If the ppoossiixx shell option is also + If set, the eecchhoo builtin expands backslash-escape se- + quences by default. If the ppoossiixx shell option is also enabled, eecchhoo does not interpret any options. ssuussppeenndd [--ff] - Suspend the execution of this shell until it receives a SSIIGGCCOONNTT - signal. A login shell, or a shell without job control enabled, - cannot be suspended; the --ff option will override this and force - the suspension. The return status is 0 unless the shell is a - login shell or job control is not enabled and --ff is not sup- + Suspend the execution of this shell until it receives a SSIIGGCCOONNTT + signal. A login shell, or a shell without job control enabled, + cannot be suspended; the --ff option will override this and force + the suspension. The return status is 0 unless the shell is a + login shell or job control is not enabled and --ff is not sup- plied. tteesstt _e_x_p_r [[ _e_x_p_r ]] Return a status of 0 (true) or 1 (false) depending on the evalu- - ation of the conditional expression _e_x_p_r. Each operator and - operand must be a separate argument. Expressions are composed - of the primaries described above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS. - tteesstt does not accept any options, nor does it accept and ignore + ation of the conditional expression _e_x_p_r. Each operator and + operand must be a separate argument. Expressions are composed + of the primaries described above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS. + tteesstt does not accept any options, nor does it accept and ignore an argument of ---- as signifying the end of options. - Expressions may be combined using the following operators, - listed in decreasing order of precedence. The evaluation de- + Expressions may be combined using the following operators, + listed in decreasing order of precedence. The evaluation de- pends on the number of arguments; see below. tteesstt uses operator precedence when there are five or more arguments. !! _e_x_p_r True if _e_x_p_r is false. (( _e_x_p_r )) - Returns the value of _e_x_p_r. This may be used to override + Returns the value of _e_x_p_r. This may be used to override normal operator precedence. _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. @@ -6856,110 +6862,110 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS null. 2 arguments If the first argument is !!, the expression is true if and - only if the second argument is null. If the first argu- - ment is one of the unary conditional operators listed - above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is + only if the second argument is null. If the first argu- + ment is one of the unary conditional operators listed + above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is true if the unary test is true. If the first argument is not a valid unary conditional operator, the expression is false. 3 arguments The following conditions are applied in the order listed. - If the second argument is one of the binary conditional + If the second argument is one of the binary conditional operators listed above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the result of the expression is the result of the binary test - using the first and third arguments as operands. The --aa - and --oo operators are considered binary operators when - there are three arguments. If the first argument is !!, - the value is the negation of the two-argument test using + using the first and third arguments as operands. The --aa + and --oo operators are considered binary operators when + there are three arguments. If the first argument is !!, + the value is the negation of the two-argument test using the second and third arguments. If the first argument is exactly (( and the third argument is exactly )), the result - is the one-argument test of the second argument. Other- + is the one-argument test of the second argument. Other- wise, the expression is false. 4 arguments The following conditions are applied in the order listed. If the first argument is !!, the result is the negation of - the three-argument expression composed of the remaining - arguments. If the first argument is exactly (( and the + the three-argument expression composed of the remaining + arguments. If the first argument is exactly (( and the fourth argument is exactly )), the result is the two-argu- - ment test of the second and third arguments. Otherwise, - the expression is parsed and evaluated according to + ment test of the second and third arguments. Otherwise, + the expression is parsed and evaluated according to precedence using the rules listed above. 5 or more arguments - The expression is parsed and evaluated according to + The expression is parsed and evaluated according to precedence using the rules listed above. When the shell is in posix mode, or if the expression is part of the [[[[ command, the << and >> operators sort using the current lo- - cale. If the shell is not in posix mode, the tteesstt and [[ com- + cale. If the shell is not in posix mode, the tteesstt and [[ com- mands sort lexicographically using ASCII ordering. - The historical operator-precedence parsing with 4 or more argu- - ments can lead to ambiguities when it encounters strings that - look like primaries. The POSIX standard has deprecated the --aa - and --oo primaries and enclosing expressions within parentheses. - Scripts should no longer use them. It's much more reliable to - restrict test invocations to a single primary, and to replace + The historical operator-precedence parsing with 4 or more argu- + ments can lead to ambiguities when it encounters strings that + look like primaries. The POSIX standard has deprecated the --aa + and --oo primaries and enclosing expressions within parentheses. + Scripts should no longer use them. It's much more reliable to + restrict test invocations to a single primary, and to replace uses of --aa and --oo with the shell's &&&& and |||| list operators. - ttiimmeess Print the accumulated user and system times for the shell and + ttiimmeess Print the accumulated user and system times for the shell and for processes run from the shell. The return status is 0. ttrraapp [--llppPP] [[_a_c_t_i_o_n] _s_i_g_s_p_e_c ...] The _a_c_t_i_o_n is a command that is read and executed when the shell - receives any of the signals _s_i_g_s_p_e_c. If _a_c_t_i_o_n is absent (and + receives any of the signals _s_i_g_s_p_e_c. If _a_c_t_i_o_n is absent (and there is a single _s_i_g_s_p_e_c) or --, each specified _s_i_g_s_p_e_c is reset - to the value it had when the shell was started. If _a_c_t_i_o_n is - the null string the signal specified by each _s_i_g_s_p_e_c is ignored + to the value it had when the shell was started. If _a_c_t_i_o_n is + the null string the signal specified by each _s_i_g_s_p_e_c is ignored by the shell and by the commands it invokes. - If no arguments are supplied, ttrraapp displays the actions associ- + If no arguments are supplied, ttrraapp displays the actions associ- ated with each trapped signal as a set of ttrraapp commands that can - be reused as shell input to restore the current signal disposi- - tions. If --pp is given, and _a_c_t_i_o_n is not present, then ttrraapp - displays the actions associated with each _s_i_g_s_p_e_c or, if none + be reused as shell input to restore the current signal disposi- + tions. If --pp is given, and _a_c_t_i_o_n is not present, then ttrraapp + displays the actions associated with each _s_i_g_s_p_e_c or, if none are supplied, for all trapped signals, as a set of ttrraapp commands - that can be reused as shell input to restore the current signal - dispositions. The --PP option behaves similarly, but displays - only the actions associated with each _s_i_g_s_p_e_c argument. --PP re- - quires at least one _s_i_g_s_p_e_c argument. The --PP or --pp options may - be used in a subshell environment (e.g., command substitution) - and, as long as they are used before ttrraapp is used to change a + that can be reused as shell input to restore the current signal + dispositions. The --PP option behaves similarly, but displays + only the actions associated with each _s_i_g_s_p_e_c argument. --PP re- + quires at least one _s_i_g_s_p_e_c argument. The --PP or --pp options may + be used in a subshell environment (e.g., command substitution) + and, as long as they are used before ttrraapp is used to change a signal's handling, will display the state of its parent's traps. - The --ll option prints a list of signal names and their corre- - sponding numbers. Each _s_i_g_s_p_e_c is either a signal name defined + The --ll option prints a list of signal names and their corre- + sponding numbers. 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. Signal names are case insen- - sitive and the SSIIGG prefix is optional. If --ll is supplied with + sitive and the SSIIGG prefix is optional. If --ll is supplied with no _s_i_g_s_p_e_c arguments, it prints a list of valid signal names. - If a _s_i_g_s_p_e_c is EEXXIITT (0), _a_c_t_i_o_n is executed on exit from the - shell. If a _s_i_g_s_p_e_c is DDEEBBUUGG, _a_c_t_i_o_n is executed before every - _s_i_m_p_l_e _c_o_m_m_a_n_d, _f_o_r command, _c_a_s_e command, _s_e_l_e_c_t command, (( - arithmetic command, [[ conditional command, arithmetic _f_o_r com- - mand, and before the first command executes in a shell function - (see SSHHEELLLL GGRRAAMMMMAARR above). Refer to the description of the - eexxttddeebbuugg shell option (see sshhoopptt above) for details of its ef- - fect on the DDEEBBUUGG trap. If a _s_i_g_s_p_e_c is RREETTUURRNN, _a_c_t_i_o_n is exe- + If a _s_i_g_s_p_e_c is EEXXIITT (0), _a_c_t_i_o_n is executed on exit from the + shell. If a _s_i_g_s_p_e_c is DDEEBBUUGG, _a_c_t_i_o_n is executed before every + _s_i_m_p_l_e _c_o_m_m_a_n_d, _f_o_r command, _c_a_s_e command, _s_e_l_e_c_t command, (( + arithmetic command, [[ conditional command, arithmetic _f_o_r com- + mand, and before the first command executes in a shell function + (see SSHHEELLLL GGRRAAMMMMAARR above). Refer to the description of the + eexxttddeebbuugg shell option (see sshhoopptt above) for details of its ef- + fect on the DDEEBBUUGG trap. If a _s_i_g_s_p_e_c is RREETTUURRNN, _a_c_t_i_o_n is exe- cuted each time a shell function or a script executed with the .. or ssoouurrccee builtins finishes executing. - If a _s_i_g_s_p_e_c is EERRRR, _a_c_t_i_o_n is executed whenever a pipeline - (which may consist of a single simple command), a list, or a - compound command returns a non-zero exit status, subject to the - following conditions. The EERRRR trap is not executed if the + If a _s_i_g_s_p_e_c is EERRRR, _a_c_t_i_o_n is executed whenever a pipeline + (which may consist of a single simple command), a list, or a + compound command returns a non-zero exit status, subject to the + following conditions. The EERRRR trap is not executed if the failed command is part of the command list immediately following - a wwhhiillee or uunnttiill keyword, part of the test in an _i_f statement, + a wwhhiillee or uunnttiill keyword, part of the test in an _i_f statement, part of a command executed in a &&&& or |||| list except the command - following the final &&&& or ||||, any command in a pipeline but the - last (subject to the state of the ppiippeeffaaiill shell option), or if + following the final &&&& or ||||, any command in a pipeline but the + last (subject to the state of the ppiippeeffaaiill shell option), or if the command's return value is being inverted using !!. These are the same conditions obeyed by the eerrrreexxiitt (--ee) option. When the shell is not interactive, signals ignored upon entry to the shell cannot be trapped or reset. Interactive shells permit trapping signals ignored on entry. Trapped signals that are not - being ignored are reset to their original values in a subshell - or subshell environment when one is created. The return status + being ignored are reset to their original values in a subshell + or subshell environment when one is created. The return status is false if any _s_i_g_s_p_e_c is invalid; otherwise ttrraapp returns true. ttrruuee Does nothing, returns a 0 status. @@ -6968,61 +6974,61 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS Indicate how each _n_a_m_e would be interpreted if used as a command name. - If the --tt option 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 executable file, re- - spectively. If the _n_a_m_e is not found, ttyyppee prints nothing and + If the --tt option 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 executable file, re- + spectively. If the _n_a_m_e is not found, ttyyppee prints nothing and returns a non-zero exit status. - If the --pp option is used, ttyyppee either returns the pathname of - the executable file that would be found by searching $$PPAATTHH for + If the --pp option is used, ttyyppee either returns the pathname of + the executable file that would be found by searching $$PPAATTHH for _n_a_m_e or nothing if "type -t name" would not return _f_i_l_e. The --PP - option forces a PPAATTHH search for each _n_a_m_e, even if "type -t + option forces a PPAATTHH search for each _n_a_m_e, even if "type -t name" would not return _f_i_l_e. If _n_a_m_e is present in the table of - hashed commands, --pp and --PP print the hashed value, which is not + hashed commands, --pp and --PP print the hashed value, which is not necessarily the file that appears first in PPAATTHH. - If the --aa option is used, ttyyppee prints all of the places that - contain a command named _n_a_m_e. This includes aliases, reserved - words, functions, and builtins, but the path search options (--pp - and --PP) can be supplied to restrict the output to executable - files. ttyyppee does not consult the table of hashed commands when + If the --aa option is used, ttyyppee prints all of the places that + contain a command named _n_a_m_e. This includes aliases, reserved + words, functions, and builtins, but the path search options (--pp + and --PP) can be supplied to restrict the output to executable + files. ttyyppee does not consult the table of hashed commands when using --aa with --pp, and only performs a PPAATTHH search for _n_a_m_e. The --ff option suppresses shell function lookup, as with the ccoomm-- - mmaanndd builtin. ttyyppee returns true if all of the arguments are + mmaanndd builtin. ttyyppee returns true if all of the arguments are found, false if any are not found. uulliimmiitt [--HHSS] --aa uulliimmiitt [--HHSS] [--bbccddeeffiikkllmmnnppqqrrssttuuvvxxPPRRTT [_l_i_m_i_t]] - Provides control over the resources available to the shell and + Provides control over the resources available to the shell and to processes it starts, on systems that allow such control. - The --HH and --SS options specify whether the hard or soft limit is + The --HH and --SS options specify whether the hard or soft limit is set for the given resource. A hard limit cannot be increased by a non-root user once it is set; a soft limit may be increased up - to the value of the hard limit. If neither --HH nor --SS is speci- + to the value of the hard limit. If neither --HH nor --SS is speci- fied, uulliimmiitt sets both the soft and hard limits. The value of _l_i_m_i_t can be a number in the unit specified for the - resource or one of the special values hhaarrdd, ssoofftt, or uunnlliimmiitteedd, - which stand for the current hard limit, the current soft limit, - and no limit, respectively. If _l_i_m_i_t is omitted, uulliimmiitt prints - the current value of the soft limit of the resource, unless the - --HH option is given. When more than one resource is specified, - the limit name and unit, if appropriate, are printed before the + resource or one of the special values hhaarrdd, ssoofftt, or uunnlliimmiitteedd, + which stand for the current hard limit, the current soft limit, + and no limit, respectively. If _l_i_m_i_t is omitted, uulliimmiitt prints + the current value of the soft limit of the resource, unless the + --HH option is given. When more than one resource is specified, + the limit name and unit, if appropriate, are printed before the value. Other options are interpreted as follows: --aa Report all current limits; no limits are set. --bb The maximum socket buffer size. --cc The maximum size of core files created. --dd The maximum size of a process's data segment. --ee The maximum scheduling priority ("nice"). - --ff The maximum size of files written by the shell and its + --ff The maximum size of files written by the shell and its children. --ii The maximum number of pending signals. --kk The maximum number of kqueues that may be allocated. --ll The maximum size that may be locked into memory. - --mm The maximum resident set size (many systems do not honor + --mm The maximum resident set size (many systems do not honor this limit). --nn The maximum number of open file descriptors (most systems do not allow this value to be set). @@ -7031,146 +7037,146 @@ SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS --rr The maximum real-time scheduling priority. --ss The maximum stack size. --tt The maximum amount of cpu time in seconds. - --uu The maximum number of processes available to a single + --uu The maximum number of processes available to a single user. - --vv The maximum amount of virtual memory available to the + --vv The maximum amount of virtual memory available to the shell and, on some systems, to its children. --xx The maximum number of file locks. --PP The maximum number of pseudoterminals. - --RR The maximum time a real-time process can run before + --RR The maximum time a real-time process can run before blocking, in microseconds. --TT The maximum number of threads. - If _l_i_m_i_t is supplied, and the --aa option is not used, _l_i_m_i_t is - the new value of the specified resource. If no option is sup- + If _l_i_m_i_t is supplied, and the --aa option is not used, _l_i_m_i_t is + the new value of the specified resource. If no option is sup- plied, then --ff is assumed. - Values are in 1024-byte increments, except for --tt, which is in - seconds; --RR, which is in microseconds; --pp, which is in units of - 512-byte blocks; --PP, --TT, --bb, --kk, --nn, and --uu, which are unscaled - values; and, when in posix mode, --cc and --ff, which are in - 512-byte increments. The return status is 0 unless an invalid + Values are in 1024-byte increments, except for --tt, which is in + seconds; --RR, which is in microseconds; --pp, which is in units of + 512-byte blocks; --PP, --TT, --bb, --kk, --nn, and --uu, which are unscaled + values; and, when in posix mode, --cc and --ff, which are in + 512-byte increments. The return status is 0 unless an invalid option or argument is supplied, or an error occurs while setting a new limit. uummaasskk [--pp] [--SS] [_m_o_d_e] - Set the user file-creation mask to _m_o_d_e. If _m_o_d_e begins with a + Set the user file-creation mask to _m_o_d_e. If _m_o_d_e begins with a digit, it is interpreted as an octal number; otherwise it is in- - terpreted as a symbolic mode mask similar to that accepted by + terpreted as a symbolic mode mask similar to that accepted by _c_h_m_o_d(1). If _m_o_d_e is omitted, uummaasskk prints the current value of the mask. The --SS option without a _m_o_d_e argument prints the mask in a symbolic format; the default output is an octal number. If the --pp option is supplied, and _m_o_d_e is omitted, the output is in - a form that may be reused as input. The return status is zero - if the mode was successfully changed or if no _m_o_d_e argument was + a form that may be reused as input. The return status is zero + if the mode was successfully changed or if no _m_o_d_e argument was supplied, and non-zero otherwise. uunnaalliiaass [-aa] [_n_a_m_e ...] - Remove each _n_a_m_e from the list of defined aliases. If --aa is - supplied, remove all alias definitions. The return value is + Remove each _n_a_m_e from the list of defined aliases. If --aa is + supplied, remove all alias definitions. The return value is true unless a supplied _n_a_m_e is not a defined alias. uunnsseett [-ffvv] [-nn] [_n_a_m_e ...] - For each _n_a_m_e, remove the corresponding variable or function. + For each _n_a_m_e, remove the corresponding variable or function. If the --vv option is given, each _n_a_m_e refers to a shell variable, - and that variable is removed. If --ff is specified, each _n_a_m_e - refers to a shell function, and the function definition is re- - moved. If the --nn option is supplied, and _n_a_m_e is a variable - with the _n_a_m_e_r_e_f attribute, _n_a_m_e will be unset rather than the - variable it references. --nn has no effect if the --ff option is - supplied. Read-only variables and functions may not be unset. - When variables or functions are removed, they are also removed - from the environment passed to subsequent commands. If no op- - tions are supplied, each _n_a_m_e refers to a variable; if there is - no variable by that name, a function with that name, if any, is - unset. Some shell variables may not be unset. If any of + and that variable is removed. If --ff is specified, each _n_a_m_e + refers to a shell function, and the function definition is re- + moved. If the --nn option is supplied, and _n_a_m_e is a variable + with the _n_a_m_e_r_e_f attribute, _n_a_m_e will be unset rather than the + variable it references. --nn has no effect if the --ff option is + supplied. Read-only variables and functions may not be unset. + When variables or functions are removed, they are also removed + from the environment passed to subsequent commands. If no op- + tions are supplied, each _n_a_m_e refers to a variable; if there is + no variable by that name, a function with that name, if any, is + unset. Some shell variables may not be unset. If any of BBAASSHH__AALLIIAASSEESS, BBAASSHH__AARRGGVV00, BBAASSHH__CCMMDDSS, BBAASSHH__CCOOMMMMAANNDD, BBAASSHH__SSUUBB-- - SSHHEELLLL, BBAASSHHPPIIDD, CCOOMMPP__WWOORRDDBBRREEAAKKSS, DDIIRRSSTTAACCKK, EEPPOOCCHHRREEAALLTTIIMMEE, - EEPPOOCCHHSSEECCOONNDDSS, FFUUNNCCNNAAMMEE, GGRROOUUPPSS, HHIISSTTCCMMDD, LLIINNEENNOO, RRAANNDDOOMM, SSEECC-- - OONNDDSS, or SSRRAANNDDOOMM are unset, they lose their special properties, - even if they are subsequently reset. The exit status is true + SSHHEELLLL, BBAASSHHPPIIDD, CCOOMMPP__WWOORRDDBBRREEAAKKSS, DDIIRRSSTTAACCKK, EEPPOOCCHHRREEAALLTTIIMMEE, + EEPPOOCCHHSSEECCOONNDDSS, FFUUNNCCNNAAMMEE, GGRROOUUPPSS, HHIISSTTCCMMDD, LLIINNEENNOO, RRAANNDDOOMM, SSEECC-- + OONNDDSS, or SSRRAANNDDOOMM are unset, they lose their special properties, + even if they are subsequently reset. The exit status is true unless a _n_a_m_e is readonly or may not be unset. wwaaiitt [--ffnn] [--pp _v_a_r_n_a_m_e] [_i_d ...] Wait for each specified child process _i_d and return the termina- - tion status of the last _i_d. Each _i_d may be a process ID _p_i_d or - a job specification _j_o_b_s_p_e_c; if a jobspec is supplied, wwaaiitt + tion status of the last _i_d. Each _i_d may be a process ID _p_i_d or + a job specification _j_o_b_s_p_e_c; if a jobspec is supplied, wwaaiitt waits for all processes in the job. - If no options or _i_ds are supplied, wwaaiitt waits for all running - background jobs and the last-executed process substitution, if + If no options or _i_ds are supplied, wwaaiitt waits for all running + background jobs and the last-executed process substitution, if its process id is the same as $$!!, and the return status is zero. - If the --nn option is supplied, wwaaiitt waits for any one of the + If the --nn option is supplied, wwaaiitt waits for any one of the given _i_ds or, if no _i_ds are supplied, any job or process substi- tution, to complete and returns its exit status. If none of the - supplied _i_ds is a child of the shell, or if no _i_ds are supplied - and the shell has no unwaited-for children, the exit status is + supplied _i_ds is a child of the shell, or if no _i_ds are supplied + and the shell has no unwaited-for children, the exit status is 127. - If the --pp option is supplied, wwaaiitt assigns the process or job - identifier of the job for which the exit status is returned to - the variable _v_a_r_n_a_m_e named by the option argument. The vari- - able, which cannot be readonly, will be unset initially, before - any assignment. This is useful only when used with the --nn op- + If the --pp option is supplied, wwaaiitt assigns the process or job + identifier of the job for which the exit status is returned to + the variable _v_a_r_n_a_m_e named by the option argument. The vari- + able, which cannot be readonly, will be unset initially, before + any assignment. This is useful only when used with the --nn op- tion. - Supplying the --ff option, when job control is enabled, forces - wwaaiitt to wait for each _i_d to terminate before returning its sta- + Supplying the --ff option, when job control is enabled, forces + wwaaiitt to wait for each _i_d to terminate before returning its sta- tus, instead of returning when it changes status. - If none of the _i_ds specify one of the shell's active child - processes, the return status is 127. If wwaaiitt is interrupted by - a signal, any _v_a_r_n_a_m_e will remain unset, and the return status - will be greater than 128, as described under SSIIGGNNAALLSS above. + If none of the _i_ds specify one of the shell's active child + processes, the return status is 127. If wwaaiitt is interrupted by + a signal, any _v_a_r_n_a_m_e will remain unset, and the return status + will be greater than 128, as described under SSIIGGNNAALLSS above. Otherwise, the return status is the exit status of the last _i_d. SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE - Bash-4.0 introduced the concept of a _s_h_e_l_l _c_o_m_p_a_t_i_b_i_l_i_t_y _l_e_v_e_l, speci- + Bash-4.0 introduced the concept of a _s_h_e_l_l _c_o_m_p_a_t_i_b_i_l_i_t_y _l_e_v_e_l, speci- fied as a set of options to the shopt builtin (ccoommppaatt3311, ccoommppaatt3322, ccoomm-- - ppaatt4400, ccoommppaatt4411, and so on). There is only one current compatibility + ppaatt4400, ccoommppaatt4411, and so on). There is only one current compatibility level -- each option is mutually exclusive. The compatibility level is - intended to allow users to select behavior from previous versions that - is incompatible with newer versions while they migrate scripts to use - current features and behavior. It's intended to be a temporary solu- + intended to allow users to select behavior from previous versions that + is incompatible with newer versions while they migrate scripts to use + current features and behavior. It's intended to be a temporary solu- tion. - This section does not mention behavior that is standard for a particu- - lar version (e.g., setting ccoommppaatt3322 means that quoting the right hand - side of the regexp matching operator quotes special regexp characters - in the word, which is default behavior in bash-3.2 and subsequent ver- + This section does not mention behavior that is standard for a particu- + lar version (e.g., setting ccoommppaatt3322 means that quoting the right hand + side of the regexp matching operator quotes special regexp characters + in the word, which is default behavior in bash-3.2 and subsequent ver- sions). - If a user enables, say, ccoommppaatt3322, it may affect the behavior of other - compatibility levels up to and including the current compatibility - level. The idea is that each compatibility level controls behavior - that changed in that version of bbaasshh, but that behavior may have been - present in earlier versions. For instance, the change to use locale- - based comparisons with the [[[[ command came in bash-4.1, and earlier + If a user enables, say, ccoommppaatt3322, it may affect the behavior of other + compatibility levels up to and including the current compatibility + level. The idea is that each compatibility level controls behavior + that changed in that version of bbaasshh, but that behavior may have been + present in earlier versions. For instance, the change to use locale- + based comparisons with the [[[[ command came in bash-4.1, and earlier versions used ASCII-based comparisons, so enabling ccoommppaatt3322 will enable - ASCII-based comparisons as well. That granularity may not be suffi- - cient for all uses, and as a result users should employ compatibility - levels carefully. Read the documentation for a particular feature to + ASCII-based comparisons as well. That granularity may not be suffi- + cient for all uses, and as a result users should employ compatibility + levels carefully. Read the documentation for a particular feature to find out the current behavior. - Bash-4.3 introduced a new shell variable: BBAASSHH__CCOOMMPPAATT. The value as- + Bash-4.3 introduced a new shell variable: BBAASSHH__CCOOMMPPAATT. The value as- signed to this variable (a decimal version number like 4.2, or an inte- - ger corresponding to the ccoommppaatt_N_N option, like 42) determines the com- + ger corresponding to the ccoommppaatt_N_N option, like 42) determines the com- patibility level. Starting with bash-4.4, bbaasshh began deprecating older compatibility lev- els. Eventually, the options will be removed in favor of BBAASSHH__CCOOMMPPAATT. - Bash-5.0 was the final version for which there was an individual shopt - option for the previous version. BBAASSHH__CCOOMMPPAATT is the only mechanism to + Bash-5.0 was the final version for which there was an individual shopt + option for the previous version. BBAASSHH__CCOOMMPPAATT is the only mechanism to control the compatibility level in versions newer than bash-5.0. - The following table describes the behavior changes controlled by each + The following table describes the behavior changes controlled by each compatibility level setting. The ccoommppaatt_N_N tag is used as shorthand for setting the compatibility level to _N_N using one of the following mecha- - nisms. For versions prior to bash-5.0, the compatibility level may be - set using the corresponding ccoommppaatt_N_N shopt option. For bash-4.3 and - later versions, the BBAASSHH__CCOOMMPPAATT variable is preferred, and it is re- + nisms. For versions prior to bash-5.0, the compatibility level may be + set using the corresponding ccoommppaatt_N_N shopt option. For bash-4.3 and + later versions, the BBAASSHH__CCOOMMPPAATT variable is preferred, and it is re- quired for bash-5.1 and later versions. ccoommppaatt3311 @@ -7178,173 +7184,173 @@ SSHHEELLLL CCOOMMPPAATTIIBBIILLIITTYY MMOODDEE ator (=~) has no special effect. ccoommppaatt3322 - +o The << and >> operators to the [[[[ command do not consider + +o The << and >> operators to the [[[[ command do not consider the current locale when comparing strings; they use ASCII ordering. ccoommppaatt4400 - +o The << and >> operators to the [[[[ command do not consider + +o The << and >> operators to the [[[[ command do not consider the current locale when comparing strings; they use ASCII ordering. BBaasshh versions prior to bash-4.1 use ASCII col- - lation and _s_t_r_c_m_p(3); bash-4.1 and later use the current + lation and _s_t_r_c_m_p(3); bash-4.1 and later use the current locale's collation sequence and _s_t_r_c_o_l_l(3). ccoommppaatt4411 - +o In _p_o_s_i_x mode, ttiimmee may be followed by options and still + +o In _p_o_s_i_x mode, ttiimmee may be followed by options and still be recognized as a reserved word (this is POSIX interpre- tation 267). +o In _p_o_s_i_x mode, the parser requires that an even number of - single quotes occur in the _w_o_r_d portion of a double- - quoted parameter expansion and treats them specially, so - that characters within the single quotes are considered + single quotes occur in the _w_o_r_d portion of a double- + quoted parameter expansion and treats them specially, so + that characters within the single quotes are considered quoted (this is POSIX interpretation 221). ccoommppaatt4422 +o The replacement string in double-quoted pattern substitu- - tion does not undergo quote removal, as it does in ver- + tion does not undergo quote removal, as it does in ver- sions after bash-4.2. - +o In posix mode, single quotes are considered special when - expanding the _w_o_r_d portion of a double-quoted parameter - expansion and can be used to quote a closing brace or - other special character (this is part of POSIX interpre- - tation 221); in later versions, single quotes are not + +o In posix mode, single quotes are considered special when + expanding the _w_o_r_d portion of a double-quoted parameter + expansion and can be used to quote a closing brace or + other special character (this is part of POSIX interpre- + tation 221); in later versions, single quotes are not special within double-quoted word expansions. ccoommppaatt4433 - +o Word expansion errors are considered non-fatal errors - that cause the current command to fail, even in posix - mode (the default behavior is to make them fatal errors + +o Word expansion errors are considered non-fatal errors + that cause the current command to fail, even in posix + mode (the default behavior is to make them fatal errors that cause the shell to exit). - +o When executing a shell function, the loop state + +o When executing a shell function, the loop state (while/until/etc.) is not reset, so bbrreeaakk or ccoonnttiinnuuee in that function will break or continue loops in the calling context. Bash-4.4 and later reset the loop state to pre- vent this. ccoommppaatt4444 - +o The shell sets up the values used by BBAASSHH__AARRGGVV and - BBAASSHH__AARRGGCC so they can expand to the shell's positional - parameters even if extended debugging mode is not en- + +o The shell sets up the values used by BBAASSHH__AARRGGVV and + BBAASSHH__AARRGGCC so they can expand to the shell's positional + parameters even if extended debugging mode is not en- abled. - +o A subshell inherits loops from its parent context, so - bbrreeaakk or ccoonnttiinnuuee will cause the subshell to exit. - Bash-5.0 and later reset the loop state to prevent the + +o A subshell inherits loops from its parent context, so + bbrreeaakk or ccoonnttiinnuuee will cause the subshell to exit. + Bash-5.0 and later reset the loop state to prevent the exit - +o Variable assignments preceding builtins like eexxppoorrtt and + +o Variable assignments preceding builtins like eexxppoorrtt and rreeaaddoonnllyy that set attributes continue to affect variables with the same name in the calling environment even if the shell is not in posix mode. ccoommppaatt5500 - +o Bash-5.1 changed the way $$RRAANNDDOOMM is generated to intro- - duce slightly more randomness. If the shell compatibil- + +o Bash-5.1 changed the way $$RRAANNDDOOMM is generated to intro- + duce slightly more randomness. If the shell compatibil- ity level is set to 50 or lower, it reverts to the method - from bash-5.0 and previous versions, so seeding the ran- - dom number generator by assigning a value to RRAANNDDOOMM will + from bash-5.0 and previous versions, so seeding the ran- + dom number generator by assigning a value to RRAANNDDOOMM will produce the same sequence as in bash-5.0. - +o If the command hash table is empty, bash versions prior - to bash-5.1 printed an informational message to that ef- - fect, even when producing output that can be reused as - input. Bash-5.1 suppresses that message when the --ll op- + +o If the command hash table is empty, bash versions prior + to bash-5.1 printed an informational message to that ef- + fect, even when producing output that can be reused as + input. Bash-5.1 suppresses that message when the --ll op- tion is supplied. ccoommppaatt5511 - +o The uunnsseett builtin treats attempts to unset array sub- - scripts @@ and ** differently depending on whether the ar- - ray is indexed or associative, and differently than in + +o The uunnsseett builtin treats attempts to unset array sub- + scripts @@ and ** differently depending on whether the ar- + ray is indexed or associative, and differently than in previous versions. +o Arithmetic commands ( ((((...)))) ) and the expressions in an arithmetic for statement can be expanded more than once. - +o Expressions used as arguments to arithmetic operators in - the [[[[ conditional command can be expanded more than + +o Expressions used as arguments to arithmetic operators in + the [[[[ conditional command can be expanded more than once. - +o The expressions in substring parameter brace expansion + +o The expressions in substring parameter brace expansion can be expanded more than once. +o The expressions in the $$((((...)))) word expansion can be ex- panded more than once. - +o Arithmetic expressions used as indexed array subscripts + +o Arithmetic expressions used as indexed array subscripts can be expanded more than once. - +o tteesstt --vv, when given an argument of AA[[@@]], where AA is an + +o tteesstt --vv, when given an argument of AA[[@@]], where AA is an existing associative array, will return true if the array - has any set elements. Bash-5.2 will look for and report + has any set elements. Bash-5.2 will look for and report on a key named @@. +o The ${_p_a_r_a_m_e_t_e_r[[::]]==_v_a_l_u_e} word expansion will return - _v_a_l_u_e, before any variable-specific transformations have + _v_a_l_u_e, before any variable-specific transformations have been performed (e.g., converting to lowercase). Bash-5.2 will return the final value assigned to the variable. - +o Parsing command substitutions will behave as if extended + +o Parsing command substitutions will behave as if extended globbing (see the description of the sshhoopptt builtin above) - is enabled, so that parsing a command substitution con- + is enabled, so that parsing a command substitution con- taining an extglob pattern (say, as part of a shell func- - tion) will not fail. This assumes the intent is to en- - able extglob before the command is executed and word ex- - pansions are performed. It will fail at word expansion - time if extglob hasn't been enabled by the time the com- + tion) will not fail. This assumes the intent is to en- + able extglob before the command is executed and word ex- + pansions are performed. It will fail at word expansion + time if extglob hasn't been enabled by the time the com- mand is executed. ccoommppaatt5522 - +o The tteesstt builtin uses its historical algorithm to parse - parenthesized subexpressions when given five or more ar- + +o The tteesstt builtin uses its historical algorithm to parse + parenthesized subexpressions when given five or more ar- guments. - +o If the --pp or --PP option is supplied to the bbiinndd builtin, + +o If the --pp or --PP option is supplied to the bbiinndd builtin, bbiinndd treats any arguments remaining after option process- - ing as bindable command names, and displays any key se- - quences bound to those commands, instead of treating the + ing as bindable command names, and displays any key se- + quences bound to those commands, instead of treating the arguments as key sequences to bind. RREESSTTRRIICCTTEEDD SSHHEELLLL If bbaasshh is started with the name rrbbaasshh, or the --rr option is supplied at - invocation, the shell becomes _r_e_s_t_r_i_c_t_e_d. 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 + invocation, the shell becomes _r_e_s_t_r_i_c_t_e_d. 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, HHIISSTTFFIILLEE, EENNVV, + +o Setting or unsetting the values of SSHHEELLLL, PPAATTHH, HHIISSTTFFIILLEE, EENNVV, or BBAASSHH__EENNVV. +o Specifying command names containing //. - +o Specifying a filename containing a // as an argument to the .. + +o Specifying a filename containing a // as an argument to the .. builtin command. - +o Using the --pp option to the .. builtin command to specify a + +o Using the --pp option to the .. builtin command to specify a search path. - +o Specifying a filename containing a slash as an argument to the + +o Specifying a filename containing a slash as an argument to the hhiissttoorryy builtin command. - +o Specifying a filename containing a slash as an argument to the + +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 + +o Importing function definitions from the shell environment at startup. - +o Parsing the value of SSHHEELLLLOOPPTTSS from the shell environment at + +o Parsing the value of SSHHEELLLLOOPPTTSS from the shell environment at startup. - +o Redirecting output using the >, >|, <>, >&, &>, and >> redirec- + +o Redirecting output using the >, >|, <>, >&, &>, and >> redirec- tion 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 + +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 + +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 sshhoopptt --uu rree-- + +o Turning off restricted mode with sseett ++rr or sshhoopptt --uu rree-- ssttrriicctteedd__sshheellll. These restrictions are enforced after any startup files are read. When a command that is found to be a shell script is executed (see CCOOMM-- - MMAANNDD EEXXEECCUUTTIIOONN above), rrbbaasshh turns off any restrictions in the shell + MMAANNDD EEXXEECCUUTTIIOONN above), rrbbaasshh turns off any restrictions in the shell spawned to execute the script. SSEEEE AALLSSOO @@ -7369,10 +7375,10 @@ FFIILLEESS _~_/_._b_a_s_h_r_c The individual per-interactive-shell startup file _~_/_._b_a_s_h___l_o_g_o_u_t - The individual login shell cleanup file, executed when a login + The individual login shell cleanup file, executed when a login shell exits _~_/_._b_a_s_h___h_i_s_t_o_r_y - The default value of HHIISSTTFFIILLEE, the file in which bash saves the + The default value of HHIISSTTFFIILLEE, the file in which bash saves the command history _~_/_._i_n_p_u_t_r_c Individual _r_e_a_d_l_i_n_e initialization file @@ -7386,15 +7392,15 @@ AAUUTTHHOORRSS BBUUGG RREEPPOORRTTSS If you find a bug in bbaasshh, you should report it. But first, you should - make sure that it really is a bug, and that it appears in the latest - version of bbaasshh. The latest version is always available from + make sure that it really is a bug, and that it appears in the latest + version of bbaasshh. The latest version is always available from _f_t_p_:_/_/_f_t_p_._g_n_u_._o_r_g_/_p_u_b_/_g_n_u_/_b_a_s_h_/ and _h_t_t_p_:_/_/_g_i_t_._s_a_v_a_n_- _n_a_h_._g_n_u_._o_r_g_/_c_g_i_t_/_b_a_s_h_._g_i_t_/_s_n_a_p_s_h_o_t_/_b_a_s_h_-_m_a_s_t_e_r_._t_a_r_._g_z. - Once you have determined that a bug actually exists, use the _b_a_s_h_b_u_g - command to submit a bug report. If you have a fix, you are encouraged + Once you have determined that a bug actually exists, use the _b_a_s_h_b_u_g + command to submit a bug report. If you have a fix, you are encouraged to mail that as well! You may send suggestions and "philosophical" bug - reports to _b_u_g_-_b_a_s_h_@_g_n_u_._o_r_g or post them to the Usenet newsgroup + reports to _b_u_g_-_b_a_s_h_@_g_n_u_._o_r_g or post them to the Usenet newsgroup ggnnuu..bbaasshh..bbuugg. ALL bug reports should include: @@ -7405,7 +7411,7 @@ BBUUGG RREEPPOORRTTSS A description of the bug behaviour A short script or "recipe" which exercises the bug - _b_a_s_h_b_u_g inserts the first three items automatically into the template + _b_a_s_h_b_u_g inserts the first three items automatically into the template it provides for filing a bug report. Comments and bug reports concerning this manual page should be directed @@ -7421,14 +7427,14 @@ BBUUGGSS Shell builtin commands and functions are not stoppable/restartable. - Compound commands and command lists of the form "a ; b ; c" are not - handled gracefully when combined with process suspension. When a - process is stopped, the shell immediately executes the next command in - the list or breaks out of any existing loops. It suffices to enclose - the command in parentheses to force it into a subshell, which may be - stopped as a unit, or to start the command in the background and imme- + Compound commands and command lists of the form "a ; b ; c" are not + handled gracefully when combined with process suspension. When a + process is stopped, the shell immediately executes the next command in + the list or breaks out of any existing loops. It suffices to enclose + the command in parentheses to force it into a subshell, which may be + stopped as a unit, or to start the command in the background and imme- diately bring it into the foreground. Array variables may not (yet) be exported. -GNU Bash 5.3 2024 November 29 _B_A_S_H(1) +GNU Bash 5.3 2024 December 12 _B_A_S_H(1) diff --git a/doc/bash.1 b/doc/bash.1 index 1006980c..a5a8e445 100644 --- a/doc/bash.1 +++ b/doc/bash.1 @@ -5,7 +5,7 @@ .\" Case Western Reserve University .\" chet.ramey@case.edu .\" -.\" Last Change: Fri Nov 29 18:17:43 EST 2024 +.\" Last Change: Thu Dec 12 13:37:07 EST 2024 .\" .\" bash_builtins, strip all but Builtins section .\" @@ -17,7 +17,7 @@ .ds zY \" empty .if \n(zZ=1 .ig zZ .if \n(zY=1 .ig zY -.TH BASH 1 "2024 November 29" "GNU Bash 5.3" +.TH BASH 1 "2024 December 12" "GNU Bash 5.3" .\" .ie \n(.g \{\ .ds ' \(aq @@ -2116,13 +2116,27 @@ The default is system-dependent. .B PIPESTATUS An array variable (see .B Arrays -below) containing a list of exit status values from the processes +below) containing a list of exit status values from the commands in the most-recently-executed foreground pipeline, which may consist of only a simple command (see .SM .B "SHELL GRAMMAR" above). +\fBBash\fP sets +.SM +.B PIPESTATUS +after executing multi-element pipelines, +timed and negated pipelines, +simple commands, +subshells created with the ( operator, +the +.B [[ +and +.B (( +compound commands, and +after error conditions that result in the +shell aborting command execution. .TP .B PPID The process ID of the shell's parent. @@ -6803,6 +6817,9 @@ completions that is displayed without modification. When set to a value greater than zero, \fBreadline\fP replaces common prefixes longer than this value with an ellipsis when displaying possible completions. +If a completion begins with a period, +and \fBeadline\fP is completing filenames, +it uses three underscores instead of an ellipsis. .TP .B completion\-query\-items (100) This determines when the user is queried about viewing diff --git a/doc/bash.html b/doc/bash.html index 8e16fd38..11f90e3b 100644 --- a/doc/bash.html +++ b/doc/bash.html @@ -3,7 +3,7 @@ -
BASH(1)2024 November 29BASH(1) +BASH(1)2024 December 12BASH(1)

Index @@ -2679,7 +2679,7 @@ The default is system-dependent. An array variable (see Arrays -below) containing a list of exit status values from the processes +below) containing a list of exit status values from the commands in the most-recently-executed foreground pipeline, which may consist of only a simple command (see @@ -2687,6 +2687,23 @@ consist of only a simple command above). +Bash sets +PIPESTATUS + + +after executing multi-element pipelines, +timed and negated pipelines, +simple commands, +subshells created with the ( operator, +the +[[ + +and +(( + +compound commands, and +after error conditions that result in the +shell aborting command execution.
PPID
@@ -8625,6 +8642,9 @@ completions that is displayed without modification. When set to a value greater than zero, readline replaces common prefixes longer than this value with an ellipsis when displaying possible completions. +If a completion begins with a period, +and eadline is completing filenames, +it uses three underscores instead of an ellipsis.
completion-query-items (100)
@@ -16566,7 +16586,7 @@ Array variables may not (yet) be exported.
-
GNU Bash 5.32024 November 29BASH(1) +GNU Bash 5.32024 December 12BASH(1)

@@ -16675,7 +16695,7 @@ Array variables may not (yet) be exported.
BUGS

-This document was created by man2html from /usr/local/src/bash/bash-20241126/doc/bash.1.
-Time: 07 December 2024 09:58:26 PST +This document was created by man2html from /usr/local/src/bash/bash-20241207/doc/bash.1.
+Time: 12 December 2024 13:38:21 EST diff --git a/doc/bash.info b/doc/bash.info index 3c8be8fd..1eafd9df 100644 --- a/doc/bash.info +++ b/doc/bash.info @@ -1,9 +1,9 @@ This is bash.info, produced by makeinfo version 7.1 from bashref.texi. This text is a brief description of the features that are present in the -Bash shell (version 5.3, 29 November 2024). +Bash shell (version 5.3, 12 December 2024). - This is Edition 5.3, last updated 29 November 2024, of ‘The GNU Bash + This is Edition 5.3, last updated 12 December 2024, of ‘The GNU Bash Reference Manual’, for ‘Bash’, Version 5.3. Copyright © 1988-2024 Free Software Foundation, Inc. @@ -26,10 +26,10 @@ Bash Features ************* This text is a brief description of the features that are present in the -Bash shell (version 5.3, 29 November 2024). The Bash home page is +Bash shell (version 5.3, 12 December 2024). The Bash home page is . - This is Edition 5.3, last updated 29 November 2024, of ‘The GNU Bash + This is Edition 5.3, last updated 12 December 2024, of ‘The GNU Bash Reference Manual’, for ‘Bash’, Version 5.3. Bash contains features that appear in other popular shells, and some @@ -6200,9 +6200,13 @@ Variables::). ‘PIPESTATUS’ An array variable (*note Arrays::) containing a list of exit status - values from the processes in the most-recently-executed foreground + values from the commands in the most-recently-executed foreground pipeline, which may consist of only a simple command (*note Shell - Commands::). + Commands::). Bash sets ‘PIPESTATUS’ after executing multi-element + pipelines, timed and negated pipelines, simple commands, subshells + created with the ‘(’ operator, the ‘[[’ and ‘((’ compound commands, + and after error conditions that result in the shell aborting + command execution. ‘POSIXLY_CORRECT’ If this variable is in the environment when Bash starts, the shell @@ -8825,7 +8829,9 @@ Variable Settings list of possible completions that is displayed without modification. When set to a value greater than zero, Readline replaces common prefixes longer than this value with an - ellipsis when displaying possible completions. + ellipsis when displaying possible completions. If a + completion begins with a period, and Readline is completing + filenames, it uses three underscores instead of an ellipsis. ‘completion-query-items’ The number of possible completions that determines when the @@ -12953,40 +12959,40 @@ D.3 Parameter and Variable Index * completion-prefix-display-length: Readline Init File Syntax. (line 122) * completion-query-items: Readline Init File Syntax. - (line 129) + (line 131) * COMPREPLY: Bash Variables. (line 277) * convert-meta: Readline Init File Syntax. - (line 140) + (line 142) * COPROC: Bash Variables. (line 283) * DIRSTACK: Bash Variables. (line 287) * disable-completion: Readline Init File Syntax. - (line 152) + (line 154) * echo-control-characters: Readline Init File Syntax. - (line 157) + (line 159) * editing-mode: Readline Init File Syntax. - (line 162) + (line 164) * EMACS: Bash Variables. (line 297) * emacs-mode-string: Readline Init File Syntax. - (line 168) + (line 170) * enable-active-region The: Readline Init File Syntax. - (line 178) + (line 180) * enable-bracketed-paste: Readline Init File Syntax. - (line 191) + (line 193) * enable-keypad: Readline Init File Syntax. - (line 200) + (line 202) * enable-meta-key: Readline Init File Syntax. - (line 205) + (line 207) * ENV: Bash Variables. (line 302) * EPOCHREALTIME: Bash Variables. (line 307) * EPOCHSECONDS: Bash Variables. (line 315) * EUID: Bash Variables. (line 322) * EXECIGNORE: Bash Variables. (line 326) * expand-tilde: Readline Init File Syntax. - (line 215) + (line 217) * FCEDIT: Bash Variables. (line 338) * FIGNORE: Bash Variables. (line 341) * force-meta-prefix: Readline Init File Syntax. - (line 219) + (line 221) * FUNCNAME: Bash Variables. (line 347) * FUNCNEST: Bash Variables. (line 364) * GLOBIGNORE: Bash Variables. (line 369) @@ -12999,15 +13005,15 @@ D.3 Parameter and Variable Index * HISTFILESIZE: Bash Variables. (line 465) * HISTIGNORE: Bash Variables. (line 476) * history-preserve-point: Readline Init File Syntax. - (line 232) + (line 234) * history-size: Readline Init File Syntax. - (line 238) + (line 240) * HISTSIZE: Bash Variables. (line 500) * HISTTIMEFORMAT: Bash Variables. (line 507) * HOME: Bourne Shell Variables. (line 13) * horizontal-scroll-mode: Readline Init File Syntax. - (line 248) + (line 250) * HOSTFILE: Bash Variables. (line 516) * HOSTNAME: Bash Variables. (line 527) * HOSTTYPE: Bash Variables. (line 530) @@ -13015,13 +13021,13 @@ D.3 Parameter and Variable Index (line 18) * IGNOREEOF: Bash Variables. (line 533) * input-meta: Readline Init File Syntax. - (line 256) + (line 258) * INPUTRC: Bash Variables. (line 542) * INSIDE_EMACS: Bash Variables. (line 546) * isearch-terminators: Readline Init File Syntax. - (line 267) + (line 269) * keymap: Readline Init File Syntax. - (line 274) + (line 276) * LANG: Creating Internationalized Scripts. (line 51) * LANG <1>: Bash Variables. (line 552) @@ -13043,15 +13049,15 @@ D.3 Parameter and Variable Index (line 29) * MAPFILE: Bash Variables. (line 609) * mark-modified-lines: Readline Init File Syntax. - (line 304) + (line 306) * mark-symlinked-directories: Readline Init File Syntax. - (line 309) + (line 311) * match-hidden-files: Readline Init File Syntax. - (line 314) + (line 316) * menu-complete-display-prefix: Readline Init File Syntax. - (line 321) + (line 323) * meta-flag: Readline Init File Syntax. - (line 256) + (line 258) * OLDPWD: Bash Variables. (line 613) * OPTARG: Bourne Shell Variables. (line 36) @@ -13060,61 +13066,61 @@ D.3 Parameter and Variable Index (line 40) * OSTYPE: Bash Variables. (line 621) * output-meta: Readline Init File Syntax. - (line 326) + (line 328) * page-completions: Readline Init File Syntax. - (line 335) + (line 337) * PATH: Bourne Shell Variables. (line 44) * PIPESTATUS: Bash Variables. (line 624) -* POSIXLY_CORRECT: Bash Variables. (line 630) -* PPID: Bash Variables. (line 640) -* PROMPT_COMMAND: Bash Variables. (line 644) -* PROMPT_DIRTRIM: Bash Variables. (line 650) -* PS0: Bash Variables. (line 656) +* POSIXLY_CORRECT: Bash Variables. (line 634) +* PPID: Bash Variables. (line 644) +* PROMPT_COMMAND: Bash Variables. (line 648) +* PROMPT_DIRTRIM: Bash Variables. (line 654) +* PS0: Bash Variables. (line 660) * PS1: Bourne Shell Variables. (line 53) * PS2: Bourne Shell Variables. (line 58) -* PS3: Bash Variables. (line 661) -* PS4: Bash Variables. (line 666) -* PWD: Bash Variables. (line 674) -* RANDOM: Bash Variables. (line 677) -* READLINE_ARGUMENT: Bash Variables. (line 685) -* READLINE_LINE: Bash Variables. (line 689) -* READLINE_MARK: Bash Variables. (line 693) -* READLINE_POINT: Bash Variables. (line 699) -* REPLY: Bash Variables. (line 703) +* PS3: Bash Variables. (line 665) +* PS4: Bash Variables. (line 670) +* PWD: Bash Variables. (line 678) +* RANDOM: Bash Variables. (line 681) +* READLINE_ARGUMENT: Bash Variables. (line 689) +* READLINE_LINE: Bash Variables. (line 693) +* READLINE_MARK: Bash Variables. (line 697) +* READLINE_POINT: Bash Variables. (line 703) +* REPLY: Bash Variables. (line 707) * revert-all-at-newline: Readline Init File Syntax. - (line 348) + (line 350) * search-ignore-case: Readline Init File Syntax. - (line 355) -* SECONDS: Bash Variables. (line 707) -* SHELL: Bash Variables. (line 717) -* SHELLOPTS: Bash Variables. (line 722) -* SHLVL: Bash Variables. (line 731) + (line 357) +* SECONDS: Bash Variables. (line 711) +* SHELL: Bash Variables. (line 721) +* SHELLOPTS: Bash Variables. (line 726) +* SHLVL: Bash Variables. (line 735) * show-all-if-ambiguous: Readline Init File Syntax. - (line 360) + (line 362) * show-all-if-unmodified: Readline Init File Syntax. - (line 366) + (line 368) * show-mode-in-prompt: Readline Init File Syntax. - (line 375) + (line 377) * skip-completed-text: Readline Init File Syntax. - (line 381) -* SRANDOM: Bash Variables. (line 736) + (line 383) +* SRANDOM: Bash Variables. (line 740) * TEXTDOMAIN: Creating Internationalized Scripts. (line 51) * TEXTDOMAINDIR: Creating Internationalized Scripts. (line 51) -* TIMEFORMAT: Bash Variables. (line 745) -* TMOUT: Bash Variables. (line 784) -* TMPDIR: Bash Variables. (line 796) -* UID: Bash Variables. (line 800) +* TIMEFORMAT: Bash Variables. (line 749) +* TMOUT: Bash Variables. (line 788) +* TMPDIR: Bash Variables. (line 800) +* UID: Bash Variables. (line 804) * vi-cmd-mode-string: Readline Init File Syntax. - (line 394) + (line 396) * vi-ins-mode-string: Readline Init File Syntax. - (line 405) + (line 407) * visible-stats: Readline Init File Syntax. - (line 416) + (line 418)  File: bash.info, Node: Function Index, Next: Concept Index, Prev: Variable Index, Up: Indexes @@ -13564,77 +13570,77 @@ Node: Special Builtins244422 Node: Shell Variables245411 Node: Bourne Shell Variables245845 Node: Bash Variables248353 -Node: Bash Features286744 -Node: Invoking Bash287758 -Node: Bash Startup Files294184 -Node: Interactive Shells299426 -Node: What is an Interactive Shell?299834 -Node: Is this Shell Interactive?300496 -Node: Interactive Shell Behavior301320 -Node: Bash Conditional Expressions305081 -Node: Shell Arithmetic310292 -Node: Aliases313621 -Node: Arrays316755 -Node: The Directory Stack323839 -Node: Directory Stack Builtins324636 -Node: Controlling the Prompt329081 -Node: The Restricted Shell331966 -Node: Bash POSIX Mode334848 -Node: Shell Compatibility Mode352910 -Node: Job Control361917 -Node: Job Control Basics362374 -Node: Job Control Builtins368652 -Node: Job Control Variables375334 -Node: Command Line Editing376565 -Node: Introduction and Notation378268 -Node: Readline Interaction380620 -Node: Readline Bare Essentials381808 -Node: Readline Movement Commands383616 -Node: Readline Killing Commands384612 -Node: Readline Arguments386635 -Node: Searching387692 -Node: Readline Init File389935 -Node: Readline Init File Syntax391238 -Node: Conditional Init Constructs417921 -Node: Sample Init File422306 -Node: Bindable Readline Commands425427 -Node: Commands For Moving426965 -Node: Commands For History429333 -Node: Commands For Text434723 -Node: Commands For Killing438848 -Node: Numeric Arguments441636 -Node: Commands For Completion442788 -Node: Keyboard Macros448484 -Node: Miscellaneous Commands449185 -Node: Readline vi Mode455745 -Node: Programmable Completion456722 -Node: Programmable Completion Builtins465459 -Node: A Programmable Completion Example477196 -Node: Using History Interactively482541 -Node: Bash History Facilities483222 -Node: Bash History Builtins486957 -Node: History Interaction493428 -Node: Event Designators498378 -Node: Word Designators499956 -Node: Modifiers502260 -Node: Installing Bash504197 -Node: Basic Installation505313 -Node: Compilers and Options509189 -Node: Compiling For Multiple Architectures509939 -Node: Installation Names511692 -Node: Specifying the System Type513926 -Node: Sharing Defaults514672 -Node: Operation Controls515386 -Node: Optional Features516405 -Node: Reporting Bugs528785 -Node: Major Differences From The Bourne Shell530143 -Node: GNU Free Documentation License551563 -Node: Indexes576740 -Node: Builtin Index577191 -Node: Reserved Word Index584289 -Node: Variable Index586734 -Node: Function Index604147 -Node: Concept Index618142 +Node: Bash Features287048 +Node: Invoking Bash288062 +Node: Bash Startup Files294488 +Node: Interactive Shells299730 +Node: What is an Interactive Shell?300138 +Node: Is this Shell Interactive?300800 +Node: Interactive Shell Behavior301624 +Node: Bash Conditional Expressions305385 +Node: Shell Arithmetic310596 +Node: Aliases313925 +Node: Arrays317059 +Node: The Directory Stack324143 +Node: Directory Stack Builtins324940 +Node: Controlling the Prompt329385 +Node: The Restricted Shell332270 +Node: Bash POSIX Mode335152 +Node: Shell Compatibility Mode353214 +Node: Job Control362221 +Node: Job Control Basics362678 +Node: Job Control Builtins368956 +Node: Job Control Variables375638 +Node: Command Line Editing376869 +Node: Introduction and Notation378572 +Node: Readline Interaction380924 +Node: Readline Bare Essentials382112 +Node: Readline Movement Commands383920 +Node: Readline Killing Commands384916 +Node: Readline Arguments386939 +Node: Searching387996 +Node: Readline Init File390239 +Node: Readline Init File Syntax391542 +Node: Conditional Init Constructs418372 +Node: Sample Init File422757 +Node: Bindable Readline Commands425878 +Node: Commands For Moving427416 +Node: Commands For History429784 +Node: Commands For Text435174 +Node: Commands For Killing439299 +Node: Numeric Arguments442087 +Node: Commands For Completion443239 +Node: Keyboard Macros448935 +Node: Miscellaneous Commands449636 +Node: Readline vi Mode456196 +Node: Programmable Completion457173 +Node: Programmable Completion Builtins465910 +Node: A Programmable Completion Example477647 +Node: Using History Interactively482992 +Node: Bash History Facilities483673 +Node: Bash History Builtins487408 +Node: History Interaction493879 +Node: Event Designators498829 +Node: Word Designators500407 +Node: Modifiers502711 +Node: Installing Bash504648 +Node: Basic Installation505764 +Node: Compilers and Options509640 +Node: Compiling For Multiple Architectures510390 +Node: Installation Names512143 +Node: Specifying the System Type514377 +Node: Sharing Defaults515123 +Node: Operation Controls515837 +Node: Optional Features516856 +Node: Reporting Bugs529236 +Node: Major Differences From The Bourne Shell530594 +Node: GNU Free Documentation License552014 +Node: Indexes577191 +Node: Builtin Index577642 +Node: Reserved Word Index584740 +Node: Variable Index587185 +Node: Function Index604598 +Node: Concept Index618593  End Tag Table diff --git a/doc/bash.pdf b/doc/bash.pdf index dc0bbe44..281e433f 100644 Binary files a/doc/bash.pdf and b/doc/bash.pdf differ diff --git a/doc/bash.ps b/doc/bash.ps new file mode 100644 index 00000000..0b79bfb3 --- /dev/null +++ b/doc/bash.ps @@ -0,0 +1,11678 @@ +%!PS-Adobe-3.0 +%%Creator: groff version 1.23.0 +%%CreationDate: Fri Dec 13 09:15:08 2024 +%%DocumentNeededResources: font Times-Italic +%%+ font Times-Roman +%%+ font Times-Bold +%%+ font Courier +%%+ font Symbol +%%+ font Courier-Bold +%%DocumentSuppliedResources: procset grops 1.23 0 +%%Pages: 96 +%%PageOrder: Ascend +%%DocumentMedia: Default 612 792 0 () () +%%Orientation: Portrait +%%EndComments +%%BeginDefaults +%%PageMedia: Default +%%EndDefaults +%%BeginProlog +%%BeginResource: procset grops 1.23 0 +%!PS-Adobe-3.0 Resource-ProcSet +/setpacking where{ +pop +currentpacking +true setpacking +}if +/grops 120 dict dup begin +% The ASCII code of the space character. +/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 +% name size font SF - +/SF{ +findfont exch +[exch dup 0 exch 0 exch neg 0 0]makefont +dup setfont +[exch/setfont cvx]cvx bind def +}bind def +% name a c d font MF - +/MF{ +findfont +[5 2 roll +0 3 1 roll % b +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 +% Enable manual feed. +% MANUAL - +/MANUAL{ +statusdict begin/manualfeed true store end +}bind def +% Guess the page length. +% This assumes that the imageable area is vertically centered on the page. +% PLG - length +/PLG{ +gsave newpath clippath pathbbox grestore +exch pop add exch pop +}bind def +% BP - +/BP{ +/level0 save def +1 setlinecap +1 setlinejoin +DEFS/BPhook known{DEFS begin BPhook end}if +72 RES div dup scale +LS{ +90 rotate +}{ +0 PL translate +}ifelse +1 -1 scale +}bind def +/EP{ +level0 restore +showpage +}def +% centerx centery radius startangle endangle DA - +/DA{ +newpath arcn stroke +}bind def +% x y SN - x' y' +% round a position to nearest (pixel + (.25,.25)) +/SN{ +transform +.25 sub exch .25 sub exch +round .25 add exch round .25 add exch +itransform +}bind def +% endx endy startx starty DL - +% we round the endpoints of the line, so that parallel horizontal +% and vertical lines will appear even +/DL{ +SN +moveto +SN +lineto stroke +}bind def +% centerx centery radius DC - +/DC{ +newpath 0 360 arc closepath +}bind def +/TM matrix def +% width height centerx centery DE - +/DE{ +TM currentmatrix pop +translate scale newpath 0 0 .5 0 360 arc closepath +TM setmatrix +}bind def +% these are for splines +/RC/rcurveto load def +/RL/rlineto load def +/ST/stroke load def +/MT/moveto load def +/CL/closepath load def +% fill the last path +% r g b Fr - +/Fr{ +setrgbcolor fill +}bind def +% c m y k Fk - +/setcmykcolor where{ +pop +/Fk{ +setcmykcolor fill +}bind def +}if +% g Fg - +/Fg{ +setgray fill +}bind def +% fill with the "current color" +/FL/fill load def +/LW/setlinewidth load def +/Cr/setrgbcolor load def +/setcmykcolor where{ +pop +/Ck/setcmykcolor load def +}if +/Cg/setgray load def +% new_font_name encoding_vector old_font_name RE - +/RE{ +findfont +dup maxlength 1 index/FontName known not{1 add}if dict begin +{ +1 index/FID ne +2 index/UniqueID ne +and +{def}{pop pop}ifelse +}forall +/Encoding exch def +dup/FontName exch def +currentdict end definefont pop +}bind def +/DEFS 0 def +% hpos vpos EBEGIN - +/EBEGIN{ +moveto +DEFS begin +}bind def +/EEND/end load def +/CNT 0 def +/level1 0 def +% llx lly newwid wid newht ht newllx newlly PBEGIN - +/PBEGIN{ +/level1 save def +translate +div 3 1 roll div exch scale +neg exch neg exch translate +% set the graphics state to default values +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 +% +% Any included setpagedevice should be ignored. +% See: http://www.w-beer.de/doc/ps/. +% +/setpagedevice{}def +mark +}bind def +/PEND{ +cleartomark +countdictstack CNT sub{end}repeat +level1 restore +}bind def +end def +/setpacking where{ +pop +setpacking +}if +%%EndResource +%%EndProlog +%%BeginSetup +%%BeginFeature: *PageSize Default +<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice +%%EndFeature +%%IncludeResource: font Times-Italic +%%IncludeResource: font Times-Roman +%%IncludeResource: font Times-Bold +%%IncludeResource: font Courier +%%IncludeResource: font Symbol +%%IncludeResource: font Courier-Bold +grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 +def/PL 792 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 +/Courier-Bold@0 ENC0/Courier-Bold RE/Courier@0 ENC0/Courier RE +/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE +/Times-Italic@0 ENC0/Times-Italic RE +%%EndSetup +%%Page: 1 1 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10.95/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E +F1(bash \255 GNU Bourne-Ag)108 96 Q(ain SHell)-.05 E F2(SYNOPSIS)72 +112.8 Q/F3 10/Times-Bold@0 SF(bash)108 124.8 Q F1 +([options] [command_string | \214le])2.5 E F2(COPYRIGHT)72 141.6 Q F1 +(Bash is Cop)108 153.6 Q(yright \251 1989-2024 by the Free Softw)-.1 E +(are F)-.1 E(oundation, Inc.)-.15 E F2(DESCRIPTION)72 170.4 Q F3(Bash) +108 182.4 Q F1 .973(is an)3.474 F F3(sh)3.473 E F1 .973 +(-compatible command language interpreter that e)B -.15(xe)-.15 G .973 +(cutes commands read from the standard).15 F .289 +(input, from a string, or from a \214le.)108 194.4 R F3(Bash)5.289 E F1 +.289(also incorporates useful features from the)2.789 F F0 -.4(Ko)2.789 +G(rn).4 E F1(and)2.789 E F0(C)2.789 E F1 .289(shells \()2.789 F F3(ksh)A +F1(and)108 206.4 Q F3(csh)2.5 E F1(\).)A .694(POSIX is the name for a f) +108 223.2 R .694(amily of computing standards based on Unix.)-.1 F F3 +(Bash)5.694 E F1 .693(is intended to be a confor)3.193 F(-)-.2 E 1.097(\ +mant implementation of the Shell and Utilities portion of the IEEE POSI\ +X speci\214cation \(IEEE Standard)108 235.2 R(1003.1\).)108 247.2 Q F3 +(Bash)5 E F1(can be con\214gured to be POSIX-conformant by def)2.5 E +(ault.)-.1 E F2(OPTIONS)72 264 Q F1 .483(All of the single-character sh\ +ell options documented in the description of the)108 276 R F3(set)2.983 +E F1 -.2(bu)2.983 G .483(iltin command, includ-).2 F(ing)108 288 Q F3 +2.718 E F1 2.718(,c)C .218 +(an be used as options when the shell is in)-2.718 F -.2(vo)-.4 G -.1 +(ke).2 G 2.718(d. In).1 F(addition,)2.719 E F3(bash)2.719 E F1 .219 +(interprets the follo)2.719 F .219(wing options)-.25 F(when it is in)108 +300 Q -.2(vo)-.4 G -.1(ke).2 G(d:).1 E F3108 316.8 Q F1 .868 +(If the)158 316.8 R F33.368 E F1 .867(option is present, then com\ +mands are read from the \214rst non-option ar)3.368 F(gument)-.18 E F0 +(com-)3.567 E(mand_string)158 328.8 Q F1 5.726(.I).22 G 3.226(ft)-5.726 +G .726(here are ar)-3.226 F .727(guments after the)-.18 F F0 +(command_string)3.427 E F1 3.227(,t).22 G .727(he \214rst ar)-3.227 F +.727(gument is assigned)-.18 F(to)158 340.8 Q F3($0)2.919 E F1 .419 +(and an)2.919 F 2.919(yr)-.15 G .419(emaining ar)-2.919 F .418 +(guments are assigned to the positional parameters.)-.18 F .418 +(The assignment)5.418 F(to)158 352.8 Q F3($0)2.5 E F1 +(sets the name of the shell, which is used in w)2.5 E +(arning and error messages.)-.1 E F3108 369.6 Q F1(If the)158 +369.6 Q F32.5 E F1(option is present, the shell is)2.5 E F0(inter) +2.51 E(active)-.15 E F1(.).18 E F3108 386.4 Q F1(Mak)158 386.4 Q +(e)-.1 E F3(bash)2.5 E F1(act as if it had been in)2.5 E -.2(vo)-.4 G +-.1(ke).2 G 2.5(da).1 G 2.5(sal)-2.5 G(ogin shell \(see)-2.5 E/F4 9 +/Times-Bold@0 SF(INV)2.5 E(OCA)-.405 E(TION)-.855 E F1(belo)2.25 E(w\).) +-.25 E F3108 403.2 Q F1(If the)158 403.2 Q F32.5 E F1 +(option is present, the shell becomes)2.5 E F0 -.37(re)2.5 G(stricted) +.37 E F1(\(see)3.27 E F4(RESTRICTED SHELL)2.5 E F1(belo)2.25 E(w\).)-.25 +E F3108 420 Q F1 .929(If the)158 420 R F33.429 E F1 .929 +(option is present, or if no ar)3.429 F .93 +(guments remain after option processing, the shell reads)-.18 F 1.693 +(commands from the standard input.)158 432 R 1.692(This option allo) +6.692 F 1.692(ws the positional parameters to be set)-.25 F(when in)158 +444 Q -.2(vo)-.4 G(king an interacti).2 E .3 -.15(ve s)-.25 H +(hell or when reading input through a pipe.).15 E F3108 460.8 Q F1 +1.065(Print a list of all double-quoted strings preceded by)158 460.8 R +F3($)3.566 E F1 1.066(on the standard output.)3.566 F 1.066 +(These are the)6.066 F 1.47(strings that are subject to language transl\ +ation when the current locale is not)158 472.8 R F3(C)3.97 E F1(or)3.97 +E F3(POSIX)3.97 E F1(.)A(This implies the)158 484.8 Q F32.5 E F1 +(option; no commands will be e)2.5 E -.15(xe)-.15 G(cuted.).15 E F3 +([\255+]O [)108 501.6 Q F0(shopt_option)A F3(])A F0(shopt_option)158 +513.6 Q F1 1.097(is one of the shell options accepted by the)3.596 F F3 +(shopt)3.597 E F1 -.2(bu)3.597 G 1.097(iltin \(see).2 F F4 1.097 +(SHELL B)3.597 F(UIL)-.09 E(TIN)-.828 E(COMMANDS)158 525.6 Q F1(belo) +3.003 E 3.253(w\). If)-.25 F F0(shopt_option)3.253 E F1 .753 +(is present,)3.253 F F33.253 E F1 .753(sets the v)3.253 F .753 +(alue of that option;)-.25 F F3(+O)3.252 E F1(unsets)3.252 E 3.456 +(it. If)158 537.6 R F0(shopt_option)3.456 E F1 .957(is not supplied,) +3.457 F F3(bash)3.457 E F1 .957(prints the names and v)3.457 F .957 +(alues of the shell options ac-)-.25 F .276(cepted by)158 549.6 R F3 +(shopt)2.776 E F1 .276(on the standard output.)2.776 F .276(If the in) +5.276 F -.2(vo)-.4 G .276(cation option is).2 F F3(+O)2.775 E F1 2.775 +(,t)C .275(he output is displayed)-2.775 F +(in a format that may be reused as input.)158 561.6 Q F3108 578.4 +Q F1(A)158 578.4 Q F33.363 E F1 .864 +(signals the end of options and disables further option processing.) +3.363 F(An)5.864 E 3.364(ya)-.15 G -.18(rg)-3.364 G .864(uments after) +.18 F(the)158 590.4 Q F33.559 E F1 1.059 +(are treated as a shell script \214lename \(see belo)3.559 F 1.059 +(w\) and ar)-.25 F 1.058(guments passed to that script.)-.18 F(An ar)158 +602.4 Q(gument of)-.18 E F32.5 E F1(is equi)2.5 E -.25(va)-.25 G +(lent to).25 E F32.5 E F1(.)A F3(Bash)108 619.2 Q F1 .303 +(also interprets a number of multi-character options.)2.803 F .304 +(These options must appear on the command line)5.303 F +(before the single-character options to be recognized.)108 631.2 Q F3 +108 648 Q(ugger)-.2 E F1 .475(Arrange for the deb)144 660 R +.475(ugger pro\214le to be e)-.2 F -.15(xe)-.15 G .475 +(cuted before the shell starts.).15 F -.45(Tu)5.474 G .474(rns on e).45 +F .474(xtended deb)-.15 F(ug-)-.2 E +(ging mode \(see the description of the)144 672 Q F3(extdeb)2.5 E(ug)-.2 +E F1(option to the)2.5 E F3(shopt)2.5 E F1 -.2(bu)2.5 G(iltin belo).2 E +(w\).)-.25 E F3(\255\255dump\255po\255strings)108 688.8 Q F1(Equi)144 +700.8 Q -.25(va)-.25 G(lent to).25 E F32.5 E F1 2.5(,b)C +(ut the output is in the GNU)-2.7 E F0 -.1(ge)2.5 G(tte).1 E(xt)-.2 E F1 +(\231po\232 \(portable object\) \214le format.)2.5 E(GNU Bash 5.3)72 768 +Q(2024 December 12)136.795 E(1)190.955 E 0 Cg EP +%%Page: 2 2 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(\255\255dump\255strings)108 +84 Q F1(Equi)144 96 Q -.25(va)-.25 G(lent to).25 E F22.5 E F1(.)A +F2(\255\255help)108 112.8 Q F1 +(Display a usage message on standard output and e)144 112.8 Q +(xit successfully)-.15 E(.)-.65 E F2108 129.6 Q F0 +(\214le)2.5 E F2108 141.6 Q(c\214le)-.18 E F0(\214le)2.5 E F1 +(Ex)144 153.6 Q 1.167(ecute commands from)-.15 F F0(\214le)5.577 E F1 +1.168(instead of the standard personal initialization \214le)3.847 F F0 +(\001/.bashr)5.334 E(c)-.37 E F1 1.168(if the)5.334 F +(shell is interacti)144 165.6 Q .3 -.15(ve \()-.25 H(see).15 E/F3 9 +/Times-Bold@0 SF(INV)2.5 E(OCA)-.405 E(TION)-.855 E F1(belo)2.25 E(w\).) +-.25 E F2(\255\255login)108 182.4 Q F1(Equi)144 194.4 Q -.25(va)-.25 G +(lent to).25 E F22.5 E F1(.)A F2(\255\255noediting)108 211.2 Q F1 +(Do not use the GNU)144 223.2 Q F2 -.18(re)2.5 G(adline).18 E F1 +(library to read command lines when the shell is interacti)2.5 E -.15 +(ve)-.25 G(.).15 E F2(\255\255nopr)108 240 Q(o\214le)-.18 E F1 .017 +(Do not read either the system-wide startup \214le)144 252 R F0(/etc/pr) +4.183 E(o\214le)-.45 E F1 .017(or an)4.183 F 2.517(yo)-.15 G 2.517(ft) +-2.517 G .017(he personal initialization \214les)-2.517 F F0 +(\001/.bash_pr)145.666 264 Q(o\214le)-.45 E F1(,)1.666 E F0 +(\001/.bash_lo)5.579 E(gin)-.1 E F1 3.913(,o)1.666 G(r)-3.913 E F0 +(\001/.pr)5.579 E(o\214le)-.45 E F1 6.413(.B)1.666 G 3.913(yd)-6.413 G +(ef)-3.913 E(ault,)-.1 E F2(bash)3.913 E F1 1.414 +(reads these \214les when it is in-)3.913 F -.2(vo)144 276 S -.1(ke).2 G +2.5(da).1 G 2.5(sal)-2.5 G(ogin shell \(see)-2.5 E F3(INV)2.5 E(OCA) +-.405 E(TION)-.855 E F1(belo)2.25 E(w\).)-.25 E F2108 292.8 +Q(c)-.18 E F1 .855(Do not read and e)144 292.8 R -.15(xe)-.15 G .855 +(cute the personal initialization \214le).15 F F0(\001/.bashr)5.02 E(c) +-.37 E F1 .854(if the shell is interacti)5.02 F -.15(ve)-.25 G 5.854(.T) +.15 G(his)-5.854 E(option is on by def)144 304.8 Q +(ault if the shell is in)-.1 E -.2(vo)-.4 G -.1(ke).2 G 2.5(da).1 G(s) +-2.5 E F2(sh)2.5 E F1(.)A F2(\255\255posix)108 321.6 Q F1 1.782 +(Change the beha)144 333.6 R 1.782(vior of)-.2 F F2(bash)4.282 E F1 +1.782(where the def)4.282 F 1.782(ault operation dif)-.1 F 1.782 +(fers from the POSIX standard to)-.25 F .333(match the standard \()144 +345.6 R F0 .333(posix mode)B F1 2.833(\). See)B F3 .333(SEE ALSO)2.833 F +F1(belo)2.583 E 2.833(wf)-.25 G .332 +(or a reference to a document that details)-2.833 F(ho)144 357.6 Q 2.5 +(wp)-.25 G(osix mode af)-2.5 E(fects)-.25 E F2(Bash)2.5 E F1 1.1 -.55 +('s b)D(eha).55 E(vior)-.2 E(.)-.55 E F2108 374.4 Q(estricted) +-.18 E F1(The shell becomes restricted \(see)144 386.4 Q F3 +(RESTRICTED SHELL)2.5 E F1(belo)2.25 E(w\).)-.25 E F2108 403.2 Q +(erbose)-.1 E F1(Equi)144 415.2 Q -.25(va)-.25 G(lent to).25 E F2 +2.5 E F1(.)A F2108 432 Q(ersion)-.1 E F1(Sho)144 444 Q 2.5(wv) +-.25 G(ersion information for this instance of)-2.65 E F2(bash)2.5 E F1 +(on the standard output and e)2.5 E(xit successfully)-.15 E(.)-.65 E/F4 +10.95/Times-Bold@0 SF(ARGUMENTS)72 460.8 Q F1 .016(If ar)108 472.8 R +.016(guments remain after option processing, and neither the)-.18 F F2 +2.516 E F1 .016(nor the)2.516 F F22.516 E F1 .016 +(option has been supplied, the \214rst)2.516 F(ar)108 484.8 Q .11(gumen\ +t is assumed to be the name of a \214le containing shell commands \(a) +-.18 F F0 .109(shell script)2.609 F F1 2.609(\). If)B F2(bash)2.609 E F1 +.109(is in)2.609 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E .256(in this f)108 +496.8 R(ashion,)-.1 E F2($0)2.756 E F1 .257(is set to the name of the \ +\214le, and the positional parameters are set to the remaining ar)2.756 +F(gu-)-.18 E(ments.)108 508.8 Q F2(Bash)5.2 E F1 .2(reads and e)2.7 F +-.15(xe)-.15 G .2(cutes commands from this \214le, then e).15 F(xits.) +-.15 E F2(Bash)5.199 E F1 1.299 -.55('s e)D .199(xit status is the e).4 +F .199(xit status of)-.15 F .732(the last command e)108 520.8 R -.15(xe) +-.15 G .732(cuted in the script.).15 F .733(If no commands are e)5.732 F +-.15(xe)-.15 G .733(cuted, the e).15 F .733(xit status is 0.)-.15 F .733 +(Bash \214rst at-)5.733 F .087 +(tempts to open the \214le in the current directory)108 532.8 R 2.587 +(,a)-.65 G .086 +(nd, if no \214le is found, then searches the directories in)-2.587 F F3 +-.666(PA)2.586 G(TH)-.189 E F1(for the script.)108 544.8 Q F4(INV)72 +561.6 Q(OCA)-.493 E(TION)-1.04 E F1(A)108 573.6 Q F0(lo)2.5 E(gin shell) +-.1 E F1(is one whose \214rst character of ar)2.5 E(gument zero is a) +-.18 E F22.5 E F1 2.5(,o)C 2.5(ro)-2.5 G(ne started with the)-2.5 E +F2(\255\255login)2.5 E F1(option.)2.5 E(An)108 590.4 Q F0(inter)2.733 E +(active)-.15 E F1 .234(shell is one started without non-option ar)2.733 +F .234(guments \(unless)-.18 F F22.734 E F1 .234 +(is speci\214ed\) and without the)2.734 F F22.734 E F1 2.787(opti\ +on, whose standard input and standard error are both connected to termi\ +nals \(as determined by)108 602.4 R F0(isatty)108.01 614.4 Q F1 .375 +(\(3\)\), or one started with the).32 F F22.875 E F1(option.)2.875 +E F2(Bash)5.375 E F1(sets)2.875 E F3(PS1)2.876 E F1(and)2.626 E F2<24ad> +2.876 E F1(includes)2.876 E F2(i)2.876 E F1 .376 +(if the shell is interacti)2.876 F -.15(ve)-.25 G 2.876(,s).15 G 2.876 +(oa)-2.876 G(shell script or a startup \214le can test this state.)108 +626.4 Q .033(The follo)108 643.2 R .033(wing paragraphs describe ho)-.25 +F(w)-.25 E F2(bash)2.532 E F1 -.15(exe)2.532 G .032 +(cutes its startup \214les.).15 F .032(If an)5.032 F 2.532(yo)-.15 G +2.532(ft)-2.532 G .032(he \214les e)-2.532 F .032(xist b)-.15 F .032 +(ut cannot be)-.2 F(read,)108 655.2 Q F2(bash)2.599 E F1 .099 +(reports an error)2.599 F 5.099(.T)-.55 G .099(ildes are e)-5.449 F .099 +(xpanded in \214lenames as described belo)-.15 F 2.6(wu)-.25 G(nder)-2.6 +E F2 -.18(Ti)2.6 G .1(lde Expansion).18 F F1(in)2.6 E(the)108 667.2 Q F3 +(EXP)2.5 E(ANSION)-.666 E F1(section.)2.25 E(When)108 684 Q F2(bash) +2.896 E F1 .396(is in)2.896 F -.2(vo)-.4 G -.1(ke).2 G 2.896(da).1 G +2.896(sa)-2.896 G 2.896(ni)-2.896 G(nteracti)-2.896 E .696 -.15(ve l) +-.25 H .396(ogin shell, or as a non-interacti).15 F .695 -.15(ve s)-.25 +H .395(hell with the).15 F F2(\255\255login)2.895 E F1 .395(option, it) +2.895 F 1.137(\214rst reads and e)108 696 R -.15(xe)-.15 G 1.137 +(cutes commands from the \214le).15 F F0(/etc/pr)5.303 E(o\214le)-.45 E +F1 3.638(,i)1.666 G 3.638(ft)-3.638 G 1.138(hat \214le e)-3.638 F 3.638 +(xists. After)-.15 F 1.138(reading that \214le, it)3.638 F .707 +(looks for)108 708 R F0(\001/.bash_pr)4.873 E(o\214le)-.45 E F1(,)1.666 +E F0(\001/.bash_lo)4.873 E(gin)-.1 E F1 3.207(,a)1.666 G(nd)-3.207 E F0 +(\001/.pr)4.873 E(o\214le)-.45 E F1 3.207(,i)1.666 G 3.206(nt)-3.207 G +.706(hat order)-3.206 F 3.206(,a)-.4 G .706(nd reads and e)-3.206 F -.15 +(xe)-.15 G .706(cutes commands).15 F .182(from the \214rst one that e) +108 720 R .182(xists and is readable.)-.15 F(The)5.183 E F2 +(\255\255nopr)2.683 E(o\214le)-.18 E F1 .183 +(option may be used when the shell is started)2.683 F(GNU Bash 5.3)72 +768 Q(2024 December 12)136.795 E(2)190.955 E 0 Cg EP +%%Page: 3 3 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(to inhibit this beha)108 84 Q(vior)-.2 E(.)-.55 E +1.104(When an interacti)108 100.8 R 1.404 -.15(ve l)-.25 H 1.104 +(ogin shell e).15 F 1.104(xits, or a non-interacti)-.15 F 1.404 -.15 +(ve l)-.25 H 1.104(ogin shell e).15 F -.15(xe)-.15 G 1.104(cutes the).15 +F/F2 10/Times-Bold@0 SF(exit)3.604 E F1 -.2(bu)3.604 G 1.104 +(iltin command,).2 F F2(bash)108 112.8 Q F1(reads and e)2.5 E -.15(xe) +-.15 G(cutes commands from the \214le).15 E F0(\001/.bash_lo)4.166 E +(gout)-.1 E F1 2.5(,i)1.666 G 2.5(fi)-2.5 G 2.5(te)-2.5 G(xists.)-2.65 E +1.697(When an interacti)108 129.6 R 1.997 -.15(ve s)-.25 H 1.698 +(hell that is not a login shell is started,).15 F F2(bash)4.198 E F1 +1.698(reads and e)4.198 F -.15(xe)-.15 G 1.698(cutes commands from).15 F +F0(\001/.bashr)109.666 141.6 Q(c)-.37 E F1 3.956(,i)1.666 G 3.956(ft) +-3.956 G 1.456(hat \214le e)-3.956 F 3.955(xists. The)-.15 F F2 +3.955 E(c)-.18 E F1 1.455(option inhibits this beha)3.955 F +(vior)-.2 E 6.455(.T)-.55 G(he)-6.455 E F23.955 E(c\214le)-.18 E +F0(\214le)3.955 E F1 1.455(option causes)3.955 F F2(bash)108 153.6 Q F1 +(to use)2.5 E F0(\214le)2.5 E F1(instead of)2.5 E F0(\001/.bashr)4.166 E +(c)-.37 E F1(.)1.666 E(When)108 170.4 Q F2(bash)5.305 E F1 2.805 +(is started non-interacti)5.305 F -.15(ve)-.25 G(ly).15 E 5.305(,t)-.65 +G 5.305(or)-5.305 G 2.806(un a shell script, for e)-5.305 F 2.806 +(xample, it looks for the v)-.15 F(ariable)-.25 E/F3 9/Times-Bold@0 SF +-.27(BA)108 182.4 S(SH_ENV).27 E F1 1.011(in the en)3.261 F 1.011 +(vironment, e)-.4 F 1.01(xpands its v)-.15 F 1.01 +(alue if it appears there, and uses the e)-.25 F 1.01(xpanded v)-.15 F +1.01(alue as the)-.25 F(name of a \214le to read and e)108 194.4 Q -.15 +(xe)-.15 G(cute.).15 E F2(Bash)5 E F1(beha)2.5 E -.15(ve)-.2 G 2.5(sa) +.15 G 2.5(si)-2.5 G 2.5(ft)-2.5 G(he follo)-2.5 E(wing command were e) +-.25 E -.15(xe)-.15 G(cuted:).15 E/F4 10/Courier@0 SF +(if [ \255n "$BASH_ENV" ]; then . "$BASH_ENV"; fi)144 211.2 Q F1 -.2(bu) +108 228 S 2.5(td).2 G(oes not use the v)-2.5 E(alue of the)-.25 E F3 +-.666(PA)2.5 G(TH)-.189 E F1 -.25(va)2.25 G +(riable to search for the \214lename.).25 E(If)108 244.8 Q F2(bash)3.417 +E F1 .917(is in)3.417 F -.2(vo)-.4 G -.1(ke).2 G 3.417(dw).1 G .917 +(ith the name)-3.417 F F2(sh)3.417 E F1 3.417(,i)C 3.417(tt)-3.417 G +.917(ries to mimic the startup beha)-3.417 F .917(vior of historical v) +-.2 F .917(ersions of)-.15 F F2(sh)3.417 E F1(as)3.417 E .145 +(closely as possible, while conforming to the POSIX standard as well.) +108 256.8 R .145(When in)5.145 F -.2(vo)-.4 G -.1(ke).2 G 2.645(da).1 G +2.645(sa)-2.645 G 2.645(ni)-2.645 G(nteracti)-2.645 E .445 -.15(ve l) +-.25 H(ogin).15 E 1.263(shell, or a non-interacti)108 268.8 R 1.563 -.15 +(ve s)-.25 H 1.264(hell with the).15 F F2(\255\255login)3.764 E F1 1.264 +(option, it \214rst attempts to read and e)3.764 F -.15(xe)-.15 G 1.264 +(cute commands).15 F(from)108 280.8 Q F0(/etc/pr)5.383 E(o\214le)-.45 E +F1(and)5.383 E F0(\001/.pr)5.383 E(o\214le)-.45 E F1 3.717(,i)1.666 G +3.717(nt)-3.717 G 1.217(hat order)-3.717 F 6.217(.T)-.55 G(he)-6.217 E +F2(\255\255nopr)3.717 E(o\214le)-.18 E F1 1.217 +(option inhibits this beha)3.717 F(vior)-.2 E 6.216(.W)-.55 G 1.216 +(hen in-)-6.216 F -.2(vo)108 292.8 S -.1(ke).2 G 2.508(da).1 G 2.508(sa) +-2.508 G 2.508(ni)-2.508 G(nteracti)-2.508 E .308 -.15(ve s)-.25 H .008 +(hell with the name).15 F F2(sh)2.508 E F1(,)A F2(bash)2.508 E F1 .008 +(looks for the v)2.508 F(ariable)-.25 E F3(ENV)2.508 E/F5 9 +/Times-Roman@0 SF(,)A F1 -.15(ex)2.258 G .008(pands its v).15 F .009 +(alue if it is de-)-.25 F .775(\214ned, and uses the e)108 304.8 R .775 +(xpanded v)-.15 F .774(alue as the name of a \214le to read and e)-.25 F +-.15(xe)-.15 G 3.274(cute. Since).15 F 3.274(as)3.274 G .774(hell in) +-3.274 F -.2(vo)-.4 G -.1(ke).2 G 3.274(da).1 G(s)-3.274 E F2(sh)3.274 E +F1 .396(does not attempt to read and e)108 316.8 R -.15(xe)-.15 G .396 +(cute commands from an).15 F 2.896(yo)-.15 G .396 +(ther startup \214les, the)-2.896 F F22.896 E(c\214le)-.18 E F1 +.397(option has no ef-)2.896 F 3.871(fect. A)108 328.8 R(non-interacti) +3.871 E 1.671 -.15(ve s)-.25 H 1.371(hell in).15 F -.2(vo)-.4 G -.1(ke) +.2 G 3.871(dw).1 G 1.371(ith the name)-3.871 F F2(sh)3.871 E F1 1.37 +(does not attempt to read an)3.871 F 3.87(yo)-.15 G 1.37 +(ther startup \214les.)-3.87 F(When in)108 340.8 Q -.2(vo)-.4 G -.1(ke) +.2 G 2.5(da).1 G(s)-2.5 E F2(sh)2.5 E F1(,)A F2(bash)2.5 E F1 +(enters posix mode after reading the startup \214les.)2.5 E(When)108 +357.6 Q F2(bash)2.793 E F1 .294(is started in posix mode, as with the) +2.793 F F2(\255\255posix)2.794 E F1 .294(command line option, it follo) +2.794 F .294(ws the POSIX stan-)-.25 F .621(dard for startup \214les.) +108 369.6 R .621(In this mode, interacti)5.621 F .921 -.15(ve s)-.25 H +.621(hells e).15 F .621(xpand the)-.15 F F3(ENV)3.121 E F1 -.25(va)2.87 +G .62(riable and read and e).25 F -.15(xe)-.15 G .62(cute com-).15 F +(mands from the \214le whose name is the e)108 381.6 Q(xpanded v)-.15 E +2.5(alue. No)-.25 F(other startup \214les are read.)2.5 E F2(Bash)108 +398.4 Q F1 .224(attempts to determine when it is being run with its sta\ +ndard input connected to a netw)2.723 F .224(ork connection,)-.1 F .85 +(as when e)108 410.4 R -.15(xe)-.15 G .85 +(cuted by the historical and rarely-seen remote shell daemon, usually) +.15 F F0 -.1(rs)3.35 G(hd).1 E F1 3.35(,o)C 3.35(rt)-3.35 G .85 +(he secure shell)-3.35 F(daemon)108 422.4 Q F0(sshd)3.875 E F1 6.375(.I) +C(f)-6.375 E F2(bash)3.875 E F1 1.376 +(determines it is being run non-interacti)3.875 F -.15(ve)-.25 G 1.376 +(ly in this f).15 F 1.376(ashion, it reads and e)-.1 F -.15(xe)-.15 G +(cutes).15 E .384(commands from)108 434.4 R F0(\001/.bashr)4.549 E(c) +-.37 E F1 2.883(,i)1.666 G 2.883(ft)-2.883 G .383(hat \214le e)-2.883 F +.383(xists and is readable.)-.15 F F2(Bash)5.383 E F1 .383 +(does not read this \214le if in)2.883 F -.2(vo)-.4 G -.1(ke).2 G 2.883 +(da).1 G(s)-2.883 E F2(sh)2.883 E F1(.)A(The)108 446.4 Q F2 +2.76 E(c)-.18 E F1 .26(option inhibits this beha)2.76 F(vior)-.2 E 2.76 +(,a)-.4 G .26(nd the)-2.76 F F22.761 E(c\214le)-.18 E F1 .261 +(option mak)2.761 F(es)-.1 E F2(bash)2.761 E F1 .261(use a dif)2.761 F +.261(ferent \214le instead of)-.25 F F0(\001/.bashr)109.666 458.4 Q(c) +-.37 E F1 2.65(,b)1.666 G .15(ut neither)-2.85 F F0 -.1(rs)2.65 G(hd).1 +E F1(nor)2.65 E F0(sshd)2.65 E F1 .149(generally in)2.65 F -.2(vo)-.4 G +.349 -.1(ke t).2 H .149(he shell with those options or allo).1 F 2.649 +(wt)-.25 G .149(hem to be spec-)-2.649 F(i\214ed.)108 470.4 Q .433 +(If the shell is started with the ef)108 487.2 R(fecti)-.25 E .733 -.15 +(ve u)-.25 H .433 +(ser \(group\) id not equal to the real user \(group\) id, and the).15 F +F22.934 E F1(op-)2.934 E 1.124(tion is not supplied, no startup \ +\214les are read, shell functions are not inherited from the en)108 +499.2 R 1.124(vironment, the)-.4 F F3(SHELLOPTS)108 511.2 Q F5(,)A F3 +-.27(BA)2.959 G(SHOPTS).27 E F5(,)A F3(CDP)2.959 E -.855(AT)-.666 G(H) +.855 E F5(,)A F1(and)2.959 E F3(GLOBIGNORE)3.209 E F1 -.25(va)2.959 G +.709(riables, if the).25 F 3.209(ya)-.15 G .71(ppear in the en)-3.209 F +.71(vironment, are)-.4 F .905(ignored, and the ef)108 523.2 R(fecti)-.25 +E 1.205 -.15(ve u)-.25 H .904(ser id is set to the real user id.).15 F +.904(If the)5.904 F F23.404 E F1 .904(option is supplied at in) +3.404 F -.2(vo)-.4 G .904(cation, the).2 F(startup beha)108 535.2 Q +(vior is the same, b)-.2 E(ut the ef)-.2 E(fecti)-.25 E .3 -.15(ve u) +-.25 H(ser id is not reset.).15 E/F6 10.95/Times-Bold@0 SF(DEFINITIONS) +72 552 Q F1(The follo)108 564 Q +(wing de\214nitions are used throughout the rest of this document.)-.25 +E F2(blank)108 576 Q F1 2.5(As)144 576 S(pace or tab)-2.5 E(.)-.4 E F2 +(whitespace)108 588 Q F1 2.587(Ac)144 600 S .087 +(haracter belonging to the)-2.587 F F2(space)2.587 E F1 .088 +(character class in the current locale, or for which)2.587 F F0(isspace) +2.588 E F1 .088(\(3\) re-)B(turns true.)144 612 Q F2 -.1(wo)108 624 S +(rd).1 E F1 2.5(As)144 624 S +(equence of characters considered as a single unit by the shell.)-2.5 E +(Also kno)5 E(wn as a)-.25 E F2(tok)2.5 E(en)-.1 E F1(.)A F2(name)108 +636 Q F1(A)144 636 Q F0(wor)3.006 E(d)-.37 E F1 .165 +(consisting only of alphanumeric characters and underscores, and be) +3.436 F .165(ginning with an alpha-)-.15 F +(betic character or an underscore.)144 648 Q(Also referred to as an)5 E +F2(identi\214er)2.5 E F1(.)A F2(metacharacter)108 660 Q F1 2.5(Ac)144 +672 S(haracter that, when unquoted, separates w)-2.5 E 2.5(ords. One)-.1 +F(of the follo)2.5 E(wing:)-.25 E F2 5(|&;\(\)<>s)144 684 S 2.5 +(pace tab newline)-5 F(contr)108 696 Q(ol operator)-.18 E F1(A)144 708 Q +F0(tok)2.5 E(en)-.1 E F1(that performs a control function.)2.5 E +(It is one of the follo)5 E(wing symbols:)-.25 E F2 2.5 +(|| & && ; ;; ;& ;;& \( \) | |&)144 720 R()10 E F1 +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(3)190.955 E 0 Cg EP +%%Page: 4 4 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10.95/Times-Bold@0 SF(RESER)72 84 Q(VED W)-.602 +E(ORDS)-.11 E F0 .306(Reserved wor)108 96 R(ds)-.37 E F1 .306(are w) +2.806 F .306(ords that ha)-.1 F .606 -.15(ve a s)-.2 H .306 +(pecial meaning to the shell.).15 F .307(The follo)5.307 F .307(wing w) +-.25 F .307(ords are recognized as)-.1 F(reserv)108 108 Q .314 +(ed when unquoted and either the \214rst w)-.15 F .314 +(ord of a command \(see)-.1 F/F3 9/Times-Bold@0 SF .313(SHELL GRAMMAR) +2.813 F F1(belo)2.563 E .313(w\), the third)-.25 F -.1(wo)108 120 S .643 +(rd of a).1 F/F4 10/Times-Bold@0 SF(case)3.143 E F1(or)3.143 E F4 +(select)3.143 E F1 .643(command \(only)3.143 F F4(in)3.143 E F1 .643 +(is v)3.143 F .643(alid\), or the third w)-.25 F .643(ord of a)-.1 F F4 +-.25(fo)3.143 G(r).25 E F1 .644(command \(only)3.143 F F4(in)3.144 E F1 +(and)3.144 E F4(do)3.144 E F1(are v)108 132 Q(alid\):)-.25 E F4 11.295 +(!c)144 148.8 S 8.795(ase copr)-11.295 F 8.795 +(oc do done elif else esac \214 f)-.18 F 8.795 +(or function if in select then)-.25 F 7.5(until while { } time [[ ]])144 +160.8 R F2(SHELL GRAMMAR)72 177.6 Q F1 +(This section describes the syntax of the v)108 189.6 Q +(arious forms of shell commands.)-.25 E F4(Simple Commands)87 206.4 Q F1 +(A)108 218.4 Q F0 .388(simple command)2.888 F F1 .388 +(is a sequence of optional v)2.888 F .389(ariable assignments follo)-.25 +F .389(wed by)-.25 F F4(blank)2.889 E F1 .389(-separated w)B .389 +(ords and)-.1 F .816(redirections, and terminated by a)108 230.4 R F0 +(contr)3.316 E .815(ol oper)-.45 F(ator)-.15 E F1 5.815(.T)C .815 +(he \214rst w)-5.815 F .815(ord speci\214es the command to be e)-.1 F +-.15(xe)-.15 G(cuted,).15 E(and is passed as ar)108 242.4 Q +(gument zero.)-.18 E(The remaining w)5 E(ords are passed as ar)-.1 E +(guments to the in)-.18 E -.2(vo)-.4 G -.1(ke).2 G 2.5(dc).1 G(ommand.) +-2.5 E(The return v)108 259.2 Q(alue of a)-.25 E F0(simple command)2.5 E +F1(is its e)2.5 E(xit status, or 128+)-.15 E F0(n)A F1 +(if the command is terminated by signal)3.333 E F0(n)2.86 E F1(.).24 E +F4(Pipelines)87 276 Q F1(A)108 288 Q F0(pipeline)2.996 E F1 .496(is a s\ +equence of one or more commands separated by one of the control operato\ +rs)2.996 F F4(|)2.996 E F1(or)2.996 E F4(|&)2.996 E F1 5.496(.T)C(he) +-5.496 E(format for a pipeline is:)108 300 Q([)144 316.8 Q F4(time)A F1 +([)2.5 E F4A F1(]] [ ! ])A F0(command1)2.5 E F1 2.5([[)2.5 G F4(|) +-2.5 E/F5 10/Symbol SFA F4(|&)A F1(])A F0(command2)2.5 E F1 -3.332 +1.666(... ])2.5 H .8(The standard output of)108 333.6 R F0(command1)3.5 +E F1 .799(is connected via a pipe to the standard input of)3.3 F F0 +(command2)3.499 E F1 5.799(.T).02 G .799(his con-)-5.799 F .214 +(nection is performed before an)108 345.6 R 2.714(yr)-.15 G .214 +(edirections speci\214ed by the)-2.714 F F0(command1)2.915 E F1(\(see)A +F3(REDIRECTION)2.715 E F1(belo)2.465 E 2.715(w\). If)-.25 F F4(|&)2.715 +E F1 .3(is the pipeline operator)108 357.6 R(,)-.4 E F0(command1)2.8 E +F1 1.4 -.55('s s)D .3(tandard error).55 F 2.8(,i)-.4 G 2.8(na)-2.8 G .3 +(ddition to its standard output, is connected to)-2.8 F F0(com-)2.8 E +(mand2)108 369.6 Q F1 1.751 -.55('s s)D .651 +(tandard input through the pipe; it is shorthand for).55 F F4 .651 +(2>&1 |)3.151 F F1 5.651(.T)C .652 +(his implicit redirection of the stan-)-5.651 F +(dard error to the standard output is performed after an)108 381.6 Q 2.5 +(yr)-.15 G(edirections speci\214ed by)-2.5 E F0(command1)2.5 E F1(.)A +.48(The return status of a pipeline is the e)108 398.4 R .48 +(xit status of the last command, unless the)-.15 F F4(pipefail)2.98 E F1 +.48(option is enabled.)2.98 F(If)108 410.4 Q F4(pipefail)2.686 E F1 .186 +(is enabled, the pipeline')2.686 F 2.686(sr)-.55 G .186 +(eturn status is the v)-2.686 F .187 +(alue of the last \(rightmost\) command to e)-.25 F .187(xit with a)-.15 +F .611(non-zero status, or zero if all commands e)108 422.4 R .611 +(xit successfully)-.15 F 5.611(.I)-.65 G 3.111(ft)-5.611 G .61 +(he reserv)-3.111 F .61(ed w)-.15 F(ord)-.1 E F4(!)3.11 E F1 .61 +(precedes a pipeline, the)5.61 F -.15(ex)108 434.4 S .408 +(it status of that pipeline is the logical ne).15 F -.05(ga)-.15 G .408 +(tion of the e).05 F .408(xit status as described abo)-.15 F -.15(ve) +-.15 G 5.408(.I).15 G 2.908(fap)-5.408 G .408(ipeline is e)-2.908 F -.15 +(xe)-.15 G(-).15 E(cuted synchronously)108 446.4 Q 2.5(,t)-.65 G +(he shell w)-2.5 E(aits for all commands in the pipeline to terminate b\ +efore returning a v)-.1 E(alue.)-.25 E .358(If the)108 463.2 R F4(time) +2.858 E F1(reserv)2.858 E .358(ed w)-.15 F .358(ord precedes a pipeline\ +, the shell reports the elapsed as well as user and system time)-.1 F +.553(consumed by its e)108 475.2 R -.15(xe)-.15 G .554 +(cution when the pipeline terminates.).15 F(The)5.554 E F43.054 E +F1 .554(option changes the output format to that)3.054 F .352 +(speci\214ed by POSIX.)108 487.2 R .352 +(When the shell is in posix mode, it does not recognize)5.352 F F4(time) +2.852 E F1 .352(as a reserv)2.852 F .352(ed w)-.15 F .352(ord if the)-.1 +F(ne)108 499.2 Q .043(xt tok)-.15 F .043(en be)-.1 F .043 +(gins with a \231\255\232.)-.15 F .044(The v)5.043 F .044(alue of the) +-.25 F F3(TIMEFORMA)2.544 E(T)-.855 E F1 -.25(va)2.294 G .044 +(riable is a format string that speci\214es ho).25 F(w)-.25 E .26 +(the timing information should be displayed; see the description of)108 +511.2 R F3(TIMEFORMA)2.76 E(T)-.855 E F1(belo)2.509 E 2.759(wu)-.25 G +(nder)-2.759 E F4 .259(Shell V)2.759 F(ari-)-.92 E(ables)108 523.2 Q F1 +(.)A .287(When the shell is in posix mode,)108 540 R F4(time)2.787 E F1 +.287(may appear by itself as the only w)2.787 F .287 +(ord in a simple command.)-.1 F .288(In this)5.288 F .604(case, the she\ +ll displays the total user and system time consumed by the shell and it\ +s children.)108 552 R(The)5.603 E F3(TIME-)3.103 E(FORMA)108 564 Q(T) +-.855 E F1 -.25(va)2.25 G +(riable speci\214es the format of the time information.).25 E .303(Each\ + command in a multi-command pipeline, where pipes are created, is e)108 +580.8 R -.15(xe)-.15 G .304(cuted in a).15 F F0(subshell)2.804 E F1 +2.804(,w)C .304(hich is a)-2.804 F .208(separate process.)108 592.8 R +(See)5.208 E F3 .208(COMMAND EXECUTION ENVIR)2.708 F(ONMENT)-.27 E F1 +.208(for a description of subshells and a sub-)2.458 F .926(shell en)108 +604.8 R 3.426(vironment. If)-.4 F(the)3.427 E F4(lastpipe)3.427 E F1 +.927(option is enabled using the)3.427 F F4(shopt)3.427 E F1 -.2(bu) +3.427 G .927(iltin \(see the description of).2 F F4(shopt)3.427 E F1 +(belo)108 616.8 Q(w\), and job control is not acti)-.25 E -.15(ve)-.25 G +2.5(,t).15 G +(he last element of a pipeline may be run by the shell process.)-2.5 E +F4(Lists)87 633.6 Q F1(A)108 645.6 Q F0(list)2.85 E F1 .35(is a sequenc\ +e of one or more pipelines separated by one of the operators)2.85 F F4 +(;)2.849 E F1(,)A F4(&)2.849 E F1(,)A F4(&&)2.849 E F1 2.849(,o)C(r) +-2.849 E F4(||)2.849 E F1 2.849(,a)C .349(nd option-)-2.849 F +(ally terminated by one of)108 657.6 Q F4(;)2.5 E F1(,)A F4(&)2.5 E F1 +2.5(,o)C(r)-2.5 E F4()2.5 E F1(.)A .96 +(Of these list operators,)108 674.4 R F4(&&)3.46 E F1(and)3.46 E F4(||) +3.46 E F1(ha)3.46 E 1.26 -.15(ve e)-.2 H .961(qual precedence, follo).15 +F .961(wed by)-.25 F F4(;)3.461 E F1(and)3.461 E F4(&)3.461 E F1 3.461 +(,w)C .961(hich ha)-3.461 F 1.261 -.15(ve e)-.2 H .961(qual prece-).15 F +(dence.)108 686.4 Q 2.5(As)108 703.2 S(equence of one or more ne)-2.5 E +(wlines may appear in a)-.25 E F0(list)2.5 E F1 +(instead of a semicolon to delimit commands.)2.5 E .029 +(If a command is terminated by the control operator)108 720 R F4(&)2.529 +E F1 2.529(,t)C .029(he shell e)-2.529 F -.15(xe)-.15 G .029 +(cutes the command in the).15 F F0(bac)2.528 E(kgr)-.2 E(ound)-.45 E F1 +(in)2.528 E(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(4)190.955 E +0 Cg EP +%%Page: 5 5 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E 2.678(as)108 84 S 2.678(ubshell. The)-2.678 F .178 +(shell does not w)2.678 F .178 +(ait for the command to \214nish, and the return status is 0.)-.1 F .178 +(These are referred)5.178 F .779(to as)108 96 R F0(async)3.279 E(hr)-.15 +E(onous)-.45 E F1 3.279(commands. Commands)3.279 F .779(separated by a) +3.279 F/F2 10/Times-Bold@0 SF(;)3.279 E F1 .779(are e)3.279 F -.15(xe) +-.15 G .778(cuted sequentially; the shell w).15 F .778(aits for)-.1 F +(each command to terminate in turn.)108 108 Q +(The return status is the e)5 E(xit status of the last command e)-.15 E +-.15(xe)-.15 G(cuted.).15 E .171(AND and OR lists are sequences of one \ +or more pipelines separated by the)108 124.8 R F2(&&)2.672 E F1(and) +2.672 E F2(||)2.672 E F1 .172(control operators, re-)2.672 F(specti)108 +136.8 Q -.15(ve)-.25 G(ly).15 E 5(.A)-.65 G(ND and OR lists are e)-5 E +-.15(xe)-.15 G(cuted with left associati).15 E(vity)-.25 E 5(.A)-.65 G +2.5(nA)-5 G(ND list has the form)-2.5 E F0(command1)144 153.6 Q F2(&&) +2.5 E F0(command2)2.5 E(command2)108.2 170.4 Q F1(is e)2.52 E -.15(xe) +-.15 G(cuted if, and only if,).15 E F0(command1)2.7 E F1(returns an e) +2.5 E(xit status of zero \(success\).)-.15 E(An OR list has the form)108 +187.2 Q F0(command1)144 204 Q F2(||)2.5 E F0(command2)2.5 E(command2) +108.2 220.8 Q F1 .435(is e)2.955 F -.15(xe)-.15 G .435 +(cuted if, and only if,).15 F F0(command1)3.135 E F1 .435 +(returns a non-zero e)2.935 F .435(xit status.)-.15 F .434 +(The return status of AND)5.434 F(and OR lists is the e)108 232.8 Q +(xit status of the last command e)-.15 E -.15(xe)-.15 G +(cuted in the list.).15 E F2(Compound Commands)87 249.6 Q F1(A)108 261.6 +Q F0 1.053(compound command)3.553 F F1 1.053(is one of the follo)3.553 F +3.553(wing. In)-.25 F 1.053(most cases a)3.553 F F0(list)3.553 E F1 +1.054(in a command')3.554 F 3.554(sd)-.55 G 1.054(escription may be) +-3.554 F 1.027(separated from the rest of the command by one or more ne) +108 273.6 R 1.026(wlines, and may be follo)-.25 F 1.026(wed by a ne)-.25 +F 1.026(wline in)-.25 F(place of a semicolon.)108 285.6 Q(\()108 302.4 Q +F0(list)A F1(\))A F0(list)144 302.4 Q F1 .214(is e)2.714 F -.15(xe)-.15 +G .215(cuted in a subshell \(see).15 F/F3 9/Times-Bold@0 SF .215 +(COMMAND EXECUTION ENVIR)2.715 F(ONMENT)-.27 E F1(belo)2.465 E 2.715(wf) +-.25 G .215(or a descrip-)-2.715 F .21(tion of a subshell en)144 314.4 R +2.709(vironment\). V)-.4 F .209(ariable assignments and b)-1.11 F .209 +(uiltin commands that af)-.2 F .209(fect the shell')-.25 F(s)-.55 E(en) +144 326.4 Q 1.068(vironment do not remain in ef)-.4 F 1.069 +(fect after the command completes.)-.25 F 1.069 +(The return status is the e)6.069 F(xit)-.15 E(status of)144 338.4 Q F0 +(list)2.5 E F1(.)A({)108 355.2 Q F0(list)2.5 E F1 2.5(;})C F0(list)144 +355.2 Q F1 .715(is e)3.215 F -.15(xe)-.15 G .715 +(cuted in the current shell en).15 F(vironment.)-.4 E F0(list)5.714 E F1 +.714(must be terminated with a ne)3.214 F .714(wline or semi-)-.25 F 2.5 +(colon. This)144 367.2 R(is kno)2.5 E(wn as a)-.25 E F0(gr)2.5 E +(oup command)-.45 E F1 5(.T)C(he return status is the e)-5 E +(xit status of)-.15 E F0(list)2.5 E F1(.)A .243(Note that unlik)144 384 +R 2.743(et)-.1 G .243(he metacharacters)-2.743 F F2(\()2.743 E F1(and) +2.743 E F2(\))2.744 E F1(,)A F2({)2.744 E F1(and)2.744 E F2(})2.744 E F1 +(are)2.744 E F0 -.37(re)2.744 G .244(served wor).37 F(ds)-.37 E F1 .244 +(and must occur where a re-)2.744 F(serv)144 396 Q .952(ed w)-.15 F .951 +(ord is permitted to be recognized.)-.1 F .951(Since the)5.951 F 3.451 +(yd)-.15 G 3.451(on)-3.451 G .951(ot cause a w)-3.451 F .951 +(ord break, the)-.1 F 3.451(ym)-.15 G .951(ust be)-3.451 F +(separated from)144 408 Q F0(list)2.5 E F1 +(by whitespace or another shell metacharacter)2.5 E(.)-.55 E(\(\()108 +424.8 Q F0 -.2(ex)C(pr).2 E(ession)-.37 E F1(\)\))A 2.213 +(The arithmetic)144 436.8 R F0 -.2(ex)4.713 G(pr).2 E(ession)-.37 E F1 +2.213(is e)4.713 F -.25(va)-.25 G 2.213 +(luated according to the rules described belo).25 F 4.714(wu)-.25 G +(nder)-4.714 E F3(ARITH-)4.714 E .349(METIC EV)144 448.8 R(ALU)-1.215 E +-.855(AT)-.54 G(ION).855 E/F4 9/Times-Roman@0 SF(.)A F1 .349(If the v) +4.849 F .349(alue of the e)-.25 F .348 +(xpression is non-zero, the return status is 0; otherwise)-.15 F .781 +(the return status is 1.)144 460.8 R(The)5.782 E F0 -.2(ex)3.282 G(pr).2 +E(ession)-.37 E F1(under)3.282 E .782(goes the same e)-.18 F .782 +(xpansions as if it were within double)-.15 F(quotes, b)144 472.8 Q +(ut double quote characters in)-.2 E F0 -.2(ex)2.5 G(pr).2 E(ession)-.37 +E F1(are not treated specially and are remo)2.5 E -.15(ve)-.15 G(d.).15 +E F2([[)108 489.6 Q F0 -.2(ex)2.5 G(pr).2 E(ession)-.37 E F2(]])2.5 E F1 +(Ev)144 501.6 Q 2.274(aluate the conditional e)-.25 F(xpression)-.15 E +F0 -.2(ex)4.774 G(pr).2 E(ession)-.37 E F1 2.274 +(and return a status of zero \(true\) or non-zero)4.774 F(\(f)144 513.6 +Q 3.663(alse\). Expressions)-.1 F 1.164 +(are composed of the primaries described belo)3.663 F 3.664(wu)-.25 G +(nder)-3.664 E F3(CONDITION)3.664 E 1.164(AL EX-)-.18 F(PRESSIONS)144 +525.6 Q F4(.)A F1 .138(The w)4.638 F .137(ords between the)-.1 F F2([[) +2.637 E F1(and)2.637 E F2(]])2.637 E F1 .137(do not under)2.637 F .137 +(go w)-.18 F .137(ord splitting and pathname e)-.1 F(xpan-)-.15 E 2.761 +(sion. The)144 537.6 R .262(shell performs tilde e)2.761 F .262 +(xpansion, parameter and v)-.15 F .262(ariable e)-.25 F .262 +(xpansion, arithmetic e)-.15 F(xpansion,)-.15 E .282 +(command substitution, process substitution, and quote remo)144 549.6 R +-.25(va)-.15 G 2.782(lo).25 G 2.782(nt)-2.782 G .282(hose w)-2.782 F +2.781(ords. Conditional)-.1 F(oper)2.781 E(-)-.2 E(ators such as)144 +561.6 Q F22.5 E F1 +(must be unquoted to be recognized as primaries.)2.5 E(When used with) +144 578.4 Q F2([[)2.5 E F1 2.5(,t)C(he)-2.5 E F2(<)2.5 E F1(and)2.5 E F2 +(>)2.5 E F1(operators sort le)2.5 E +(xicographically using the current locale.)-.15 E .502(When the)144 +595.2 R F2(==)3.002 E F1(and)3.002 E F2(!=)3.002 E F1 .502(operators ar\ +e used, the string to the right of the operator is considered a pat-) +3.002 F .81(tern and matched according to the rules described belo)144 +607.2 R 3.31(wu)-.25 G(nder)-3.31 E F2 -.1(Pa)3.31 G(tter).1 E 3.31(nM) +-.15 G(atching)-3.31 E F1 3.31(,a)C 3.31(si)-3.31 G 3.31(ft)-3.31 G(he) +-3.31 E F2(ext-)3.31 E(glob)144 619.2 Q F1 .313 +(shell option were enabled.)2.813 F(The)5.313 E F2(=)2.813 E F1 .313 +(operator is equi)2.813 F -.25(va)-.25 G .313(lent to).25 F F2(==)2.813 +E F1 5.313(.I)C 2.813(ft)-5.313 G(he)-2.813 E F2(nocasematch)2.813 E F1 +.314(shell op-)2.814 F .03 +(tion is enabled, the match is performed without re)144 631.2 R -.05(ga) +-.15 G .029(rd to the case of alphabetic characters.).05 F .029(The re-) +5.029 F .806(turn v)144 643.2 R .807(alue is 0 if the string matches \() +-.25 F F2(==)A F1 3.307(\)o)C 3.307(rd)-3.307 G .807(oes not match \() +-3.307 F F2(!=)A F1 3.307(\)t)C .807(he pattern, and 1 otherwise.)-3.307 +F(If)5.807 E(an)144 655.2 Q 3.1(yp)-.15 G .6(art of the pattern is quot\ +ed, the quoted portion is matched as a string: e)-3.1 F -.15(ve)-.25 G +.599(ry character in the).15 F +(quoted portion matches itself, instead of ha)144 667.2 Q(ving an)-.2 E +2.5(ys)-.15 G(pecial pattern matching meaning.)-2.5 E .133 +(An additional binary operator)144 684 R(,)-.4 E F2<3d01>2.633 E F1 +2.633(,i)C 2.633(sa)-2.633 G -.25(va)-2.833 G .133 +(ilable, with the same precedence as).25 F F2(==)2.633 E F1(and)2.633 E +F2(!=)2.633 E F1 5.133(.W)C .133(hen it is)-5.133 F .182 +(used, the string to the right of the operator is considered a POSIX e) +144 696 R .182(xtended re)-.15 F .181(gular e)-.15 F .181(xpression and) +-.15 F 2.623(matched accordingly \(using the POSIX)144 708 R F0 -.37(re) +5.124 G(gcomp)-.03 E F1(and)5.124 E F0 -.37(re)5.124 G -.1(ge)-.03 G +(xec)-.1 E F1(interf)5.124 E 2.624(aces usually described in)-.1 F F0 +-.37(re)144 720 S -.1(ge)-.03 G(x)-.1 E F1 3.241(\(3\)\). The).53 F .741 +(return v)3.241 F .741 +(alue is 0 if the string matches the pattern, and 1 otherwise.)-.25 F +.74(If the re)5.74 F(gular)-.15 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(5)190.955 E 0 Cg EP +%%Page: 6 6 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E -.15(ex)144 84 S .508 +(pression is syntactically incorrect, the conditional e).15 F +(xpression')-.15 E 3.008(sr)-.55 G .509(eturn v)-3.008 F .509 +(alue is 2.)-.25 F .509(If the)5.509 F/F2 10/Times-Bold@0 SF(nocase-) +3.009 E(match)144 96 Q F1 1.307 +(shell option is enabled, the match is performed without re)3.807 F -.05 +(ga)-.15 G 1.306(rd to the case of alphabetic).05 F(characters.)144 108 +Q .243(If an)144 124.8 R 2.743(yp)-.15 G .244 +(art of the pattern is quoted, the quoted portion is matched literally) +-2.743 F 2.744(,a)-.65 G 2.744(sa)-2.744 G(bo)-2.744 E -.15(ve)-.15 G +5.244(.I).15 G 2.744(ft)-5.244 G .244(he pattern)-2.744 F .368 +(is stored in a shell v)144 136.8 R .368(ariable, quoting the v)-.25 F +.368(ariable e)-.25 F .368 +(xpansion forces the entire pattern to be matched)-.15 F(literally)144 +148.8 Q 5.389(.T)-.65 G .389(reat brack)-5.739 F .389(et e)-.1 F .389 +(xpressions in re)-.15 F .389(gular e)-.15 F .389(xpressions carefully) +-.15 F 2.889(,s)-.65 G .389(ince normal quoting and pat-)-2.889 F +(tern characters lose their meanings between brack)144 160.8 Q(ets.)-.1 +E .662(The match succeeds if the pattern matches an)144 177.6 R 3.162 +(yp)-.15 G .662(art of the string.)-3.162 F .661 +(Anchor the pattern using the)5.662 F F2<00>3.161 E F1(and)144 189.6 Q +F2($)2.5 E F1(re)2.5 E(gular e)-.15 E +(xpression operators to force it to match the entire string.)-.15 E .75 +(The array v)144 206.4 R(ariable)-.25 E/F3 9/Times-Bold@0 SF -.27(BA) +3.25 G(SH_REMA).27 E(TCH)-.855 E F1 .751 +(records which parts of the string matched the pattern.)3.001 F(The) +5.751 E .825(element of)144 218.4 R F3 -.27(BA)3.325 G(SH_REMA).27 E +(TCH)-.855 E F1 .825(with inde)3.075 F 3.325(x0c)-.15 G .825 +(ontains the portion of the string matching the entire)-3.325 F(re)144 +230.4 Q 1.515(gular e)-.15 F 4.015(xpression. Substrings)-.15 F 1.515 +(matched by parenthesized sube)4.015 F 1.515(xpressions within the re) +-.15 F 1.515(gular e)-.15 F(x-)-.15 E .147(pression are sa)144 242.4 R +-.15(ve)-.2 G 2.647(di).15 G 2.647(nt)-2.647 G .146(he remaining)-2.647 +F F3 -.27(BA)2.646 G(SH_REMA).27 E(TCH)-.855 E F1 2.646(indices. The) +2.396 F .146(element of)2.646 F F3 -.27(BA)2.646 G(SH_REMA).27 E(TCH) +-.855 E F1 .514(with inde)144 254.4 R(x)-.15 E F0(n)3.014 E F1 .514 +(is the portion of the string matching the)3.014 F F0(n)3.014 E F1 .514 +(th parenthesized sube)B(xpression.)-.15 E F2(Bash)5.514 E F1(sets)3.014 +E F3 -.27(BA)144 266.4 S(SH_REMA).27 E(TCH)-.855 E F1 .659 +(in the global scope; declaring it as a local v)2.91 F .659 +(ariable will lead to une)-.25 F .659(xpected re-)-.15 F(sults.)144 +278.4 Q .785(Expressions may be combined using the follo)144 295.2 R +.786(wing operators, listed in decreasing order of prece-)-.25 F(dence:) +144 307.2 Q F2(\()144 324 Q F0 -.2(ex)2.5 G(pr).2 E(ession)-.37 E F2(\)) +2.5 E F1 .523(Returns the v)180 336 R .522(alue of)-.25 F F0 -.2(ex) +3.022 G(pr).2 E(ession)-.37 E F1 5.522(.T)C .522(his may be used to o) +-5.522 F -.15(ve)-.15 G .522(rride the normal precedence of).15 F +(operators.)180 348 Q F2(!)144 360 Q F0 -.2(ex)2.5 G(pr).2 E(ession)-.37 +E F1 -.35(Tr)180 372 S(ue if).35 E F0 -.2(ex)2.5 G(pr).2 E(ession)-.37 E +F1(is f)2.74 E(alse.)-.1 E F0 -.2(ex)144 384 S(pr).2 E(ession1)-.37 E F2 +(&&)2.5 E F0 -.2(ex)2.5 G(pr).2 E(ession2)-.37 E F1 -.35(Tr)180 396 S +(ue if both).35 E F0 -.2(ex)2.5 G(pr).2 E(ession1)-.37 E F1(and)2.5 E F0 +-.2(ex)2.5 G(pr).2 E(ession2)-.37 E F1(are true.)2.52 E F0 -.2(ex)144 +408 S(pr).2 E(ession1)-.37 E F2(||)2.5 E F0 -.2(ex)2.5 G(pr).2 E +(ession2)-.37 E F1 -.35(Tr)180 420 S(ue if either).35 E F0 -.2(ex)2.5 G +(pr).2 E(ession1)-.37 E F1(or)2.5 E F0 -.2(ex)2.5 G(pr).2 E(ession2)-.37 +E F1(is true.)2.52 E(The)144 436.8 Q F2(&&)2.675 E F1(and)2.675 E F2(||) +2.675 E F1 .175(operators do not e)2.675 F -.25(va)-.25 G(luate).25 E F0 +-.2(ex)2.675 G(pr).2 E(ession2)-.37 E F1 .175(if the v)2.675 F .175 +(alue of)-.25 F F0 -.2(ex)2.676 G(pr).2 E(ession1)-.37 E F1 .176(is suf) +2.676 F .176(\214cient to de-)-.25 F(termine the return v)144 448.8 Q +(alue of the entire conditional e)-.25 E(xpression.)-.15 E F2 -.25(fo) +108 465.6 S(r).25 E F0(name)2.5 E F1 2.5([[)2.5 G F2(in)A F1([)2.5 E F0 +(wor)2.5 E 2.5(d.)-.37 G 1.666(..)-.834 G F1 2.5(]];]).834 G F2(do)A F0 +(list)2.5 E F1(;)2.5 E F2(done)2.5 E F1 .269(First, e)144 477.6 R .269 +(xpand The list of w)-.15 F .268(ords follo)-.1 F(wing)-.25 E F2(in) +2.768 E F1 2.768(,g)C .268(enerating a list of items.)-2.768 F .268 +(Then, the v)5.268 F(ariable)-.25 E F0(name)2.768 E F1(is)2.768 E .199 +(set to each element of this list in turn, and)144 489.6 R F0(list)2.699 +E F1 .2(is e)2.7 F -.15(xe)-.15 G .2(cuted each time.).15 F .2(If the) +5.2 F F2(in)2.7 E F0(wor)2.7 E(d)-.37 E F1 .2(is omitted, the)2.7 F F2 +-.25(fo)144 501.6 S(r).25 E F1 .762(command e)3.262 F -.15(xe)-.15 G +(cutes).15 E F0(list)3.261 E F1 .761 +(once for each positional parameter that is set \(see)3.261 F F3 -.666 +(PA)3.261 G(RAMETERS).666 E F1(be-)3.011 E(lo)144 513.6 Q 2.575 +(w\). The)-.25 F .075(return status is the e)2.575 F .075 +(xit status of the last command that e)-.15 F -.15(xe)-.15 G 2.575 +(cutes. If).15 F .075(the e)2.575 F .075(xpansion of the)-.15 F +(items follo)144 525.6 Q(wing)-.25 E F2(in)2.5 E F1 +(results in an empty list, no commands are e)2.5 E -.15(xe)-.15 G +(cuted, and the return status is 0.).15 E F2 -.25(fo)108 542.4 S(r).25 E +F1(\(\()2.5 E F0 -.2(ex)2.5 G(pr1).2 E F1(;)2.5 E F0 -.2(ex)2.5 G(pr2).2 +E F1(;)2.5 E F0 -.2(ex)2.5 G(pr3).2 E F1(\)\) ;)2.5 E F2(do)2.5 E F0 +(list)2.5 E F1(;)2.5 E F2(done)2.5 E F1 2.52(First, e)144 554.4 R -.25 +(va)-.25 G 2.519(luate the arithmetic e).25 F(xpression)-.15 E F0 -.2 +(ex)5.019 G(pr1).2 E F1 2.519(according to the rules described belo) +5.019 F 5.019(wu)-.25 G(nder)-5.019 E F3 .922(ARITHMETIC EV)144 566.4 R +(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E/F4 9/Times-Roman@0 SF(.)A F1 +.922(Then, repeatedly e)5.422 F -.25(va)-.25 G .923 +(luate the arithmetic e).25 F(xpression)-.15 E F0 -.2(ex)3.423 G(pr2).2 +E F1 .923(until it)3.423 F -.25(eva)144 578.4 S 1.409(luates to zero.) +.25 F 1.409(Each time)6.409 F F0 -.2(ex)3.909 G(pr2).2 E F1 -.25(eva) +3.909 G 1.409(luates to a non-zero v).25 F 1.408(alue, e)-.25 F -.15(xe) +-.15 G(cute).15 E F0(list)3.908 E F1 1.408(and e)3.908 F -.25(va)-.25 G +1.408(luate the).25 F .052(arithmetic e)144 590.4 R(xpression)-.15 E F0 +-.2(ex)2.553 G(pr3).2 E F1 5.053(.I)C 2.553(fa)-5.053 G .353 -.15(ny ex) +-2.553 H .053(pression is omitted, it beha).15 F -.15(ve)-.2 G 2.553(sa) +.15 G 2.553(si)-2.553 G 2.553(fi)-2.553 G 2.553(te)-2.553 G -.25(va) +-2.803 G .053(luates to 1.).25 F .053(The re-)5.053 F .692(turn v)144 +602.4 R .692(alue is the e)-.25 F .692 +(xit status of the last command in)-.15 F F0(list)3.192 E F1 .692 +(that is e)3.192 F -.15(xe)-.15 G .692(cuted, or non-zero if an).15 F +3.192(yo)-.15 G 3.192(ft)-3.192 G(he)-3.192 E -.15(ex)144 614.4 S +(pressions is in).15 E -.25(va)-.4 G(lid.).25 E .856(Use the)144 631.2 R +F2(br)3.356 E(eak)-.18 E F1(and)3.356 E F2(continue)3.356 E F1 -.2(bu) +3.356 G .857(iltins \(see).2 F F3 .857(SHELL B)3.357 F(UIL)-.09 E .857 +(TIN COMMANDS)-.828 F F1(belo)3.107 E .857(w\) to control loop)-.25 F +-.15(exe)144 643.2 S(cution.).15 E F2(select)108 660 Q F0(name)2.5 E F1 +([)2.5 E F2(in)2.5 E F0(wor)2.5 E(d)-.37 E F1 2.5(];)2.5 G F2(do)A F0 +(list)2.5 E F1(;)2.5 E F2(done)2.5 E F1 .017(First, e)144 672 R .016 +(xpand the list of w)-.15 F .016(ords follo)-.1 F(wing)-.25 E F2(in) +2.516 E F1 2.516(,g)C .016 +(enerating a list of items, and print the set of e)-2.516 F(xpanded)-.15 +E -.1(wo)144 684 S 1.143(rds the standard error).1 F 3.643(,e)-.4 G +1.143(ach preceded by a number)-3.643 F 6.143(.I)-.55 G 3.643(ft)-6.143 +G(he)-3.643 E F2(in)3.643 E F0(wor)3.643 E(d)-.37 E F1 1.143 +(is omitted, print the posi-)3.643 F 1.307(tional parameters \(see)144 +696 R F3 -.666(PA)3.807 G(RAMETERS).666 E F1(belo)3.557 E(w\).)-.25 E F2 +(select)6.307 E F1 1.306(then displays the)3.806 F F3(PS3)3.806 E F1 +1.306(prompt and reads a)3.556 F .013(line from the standard input.)144 +708 R .013 +(If the line consists of a number corresponding to one of the displayed) +5.013 F -.1(wo)144 720 S 1.14(rds, then).1 F F2(select)3.64 E F1 1.14 +(sets the v)3.64 F 1.14(alue of)-.25 F F0(name)4 E F1 1.139(to that w) +3.82 F 3.639(ord. If)-.1 F 1.139(the line is empty)3.639 F(,)-.65 E F2 +(select)3.639 E F1 1.139(displays the)3.639 F(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(6)190.955 E 0 Cg EP +%%Page: 7 7 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E -.1(wo)144 84 S 1.23(rds and prompt ag).1 F 3.73 +(ain. If)-.05 F 1.23(EOF is read,)3.73 F/F2 10/Times-Bold@0 SF(select) +3.73 E F1 1.23(completes and returns 1.)3.73 F(An)6.23 E 3.73(yo)-.15 G +1.23(ther v)-3.73 F 1.23(alue sets)-.25 F F0(name)144.36 96 Q F1 .406 +(to null.)3.086 F .406(The line read is sa)5.406 F -.15(ve)-.2 G 2.906 +(di).15 G 2.906(nt)-2.906 G .406(he v)-2.906 F(ariable)-.25 E/F3 9 +/Times-Bold@0 SF(REPL)2.906 E(Y)-.828 E/F4 9/Times-Roman@0 SF(.)A F1 +(The)4.906 E F0(list)2.996 E F1 .406(is e)3.586 F -.15(xe)-.15 G .406 +(cuted after each selec-).15 F .139(tion until a)144 108 R F2(br)2.639 E +(eak)-.18 E F1 .139(command is e)2.639 F -.15(xe)-.15 G 2.639 +(cuted. The).15 F -.15(ex)2.639 G .139(it status of).15 F F2(select)2.64 +E F1 .14(is the e)2.64 F .14(xit status of the last com-)-.15 F(mand e) +144 120 Q -.15(xe)-.15 G(cuted in).15 E F0(list)2.59 E F1 2.5(,o).68 G +2.5(rz)-2.5 G(ero if no commands were e)-2.5 E -.15(xe)-.15 G(cuted.).15 +E F2(case)108 136.8 Q F0(wor)2.5 E(d)-.37 E F2(in)2.5 E F1 2.5([[)2.5 G +(\(])-2.5 E F0(pattern)2.5 E F1([)2.5 E F2(|)2.5 E F0(pattern)2.5 E F1 +2.5(].)2.5 G -3.332 1.666(.. \))-.834 H F0(list).834 E F1(;; ] .)2.5 E +1.666(..)1.666 G F2(esac).834 E F1(A)144 148.8 Q F2(case)2.81 E F1 .31 +(command \214rst e)2.81 F(xpands)-.15 E F0(wor)2.81 E(d)-.37 E F1 2.81 +(,a)C .309(nd tries to match it ag)-2.81 F .309(ainst each)-.05 F F0 +(pattern)2.809 E F1 .309(in turn, proceeding)2.809 F .971 +(from \214rst to last, using the matching rules described under)144 +160.8 R F2 -.1(Pa)3.471 G(tter).1 E 3.471(nM)-.15 G(atching)-3.471 E F1 +(belo)3.471 E 4.771 -.65(w. A)-.25 H(pattern)4.121 E 1.007 +(list is a set of one or more patterns separated by)144 172.8 R 3.506 +(,a)5.172 G 1.006(nd the \) operator terminates the pattern list.)-3.506 +F(The)144 184.8 Q F0(wor)3.015 E(d)-.37 E F1 .515(is e)3.015 F .515 +(xpanded using tilde e)-.15 F .515(xpansion, parameter and v)-.15 F .515 +(ariable e)-.25 F .515(xpansion, arithmetic e)-.15 F(xpan-)-.15 E .051 +(sion, command substitution, process substitution and quote remo)144 +196.8 R -.25(va)-.15 G 2.551(l. Each).25 F F0(pattern)2.551 E F1 -.15 +(ex)2.551 G .05(amined is e).15 F(x-)-.15 E .76(panded using tilde e)144 +208.8 R .76(xpansion, parameter and v)-.15 F .76(ariable e)-.25 F .76 +(xpansion, arithmetic e)-.15 F .76(xpansion, command)-.15 F .419 +(substitution, process substitution, and quote remo)144 220.8 R -.25(va) +-.15 G 2.919(l. If).25 F(the)2.919 E F2(nocasematch)2.919 E F1 .419 +(shell option is enabled,)2.919 F .706 +(the match is performed without re)144 232.8 R -.05(ga)-.15 G .706 +(rd to the case of alphabetic characters.).05 F(A)5.706 E F0(clause) +3.207 E F1 .707(is a pattern)3.207 F(list and an associated)144 244.8 Q +F0(list)2.5 E F1(.)A .14(When a match is found,)144 261.6 R F2(case)2.64 +E F1 -.15(exe)2.64 G .139(cutes the corresponding).15 F F0(list)2.639 E +F1 5.139(.I)C 2.639(ft)-5.139 G(he)-2.639 E F2(;;)2.639 E F1 .139 +(operator terminates the case)2.639 F .695(clause, the)144 273.6 R F2 +(case)3.195 E F1 .695(command completes after the \214rst match.)3.195 F +(Using)5.695 E F2(;&)3.195 E F1 .695(in place of)3.195 F F2(;;)3.195 E +F1 .695(causes e)3.195 F -.15(xe)-.15 G(cu-).15 E .499 +(tion to continue with the)144 285.6 R F0(list)2.999 E F1 .498 +(associated with the ne)2.999 F .498(xt pattern list.)-.15 F(Using)5.498 +E F2(;;&)2.998 E F1 .498(in place of)2.998 F F2(;;)2.998 E F1(causes) +2.998 E .669(the shell to test the ne)144 297.6 R .669 +(xt pattern list in the statement, if an)-.15 F 1.97 -.65(y, a)-.15 H +.67(nd e).65 F -.15(xe)-.15 G .67(cute an).15 F 3.17(ya)-.15 G +(ssociated)-3.17 E F0(list)3.17 E F1 .67(if the)3.17 F 1.189 +(match succeeds.)144 309.6 R 1.189(continuing the case statement e)6.189 +F -.15(xe)-.15 G 1.188(cution as if the pattern list had not matched.) +.15 F(The e)144 321.6 Q(xit status is zero if no pattern matches.)-.15 E +(Otherwise, it is the e)144 338.4 Q(xit status of the last command e) +-.15 E -.15(xe)-.15 G(cuted in the last).15 E F0(list)2.5 E F1 -.15(exe) +2.5 G(cuted.).15 E F2(if)108 355.2 Q F0(list)2.5 E F1(;)A F2(then)2.5 E +F0(list)2.5 E F1 2.5(;[)C F2(elif)A F0(list)2.5 E F1(;)A F2(then)2.5 E +F0(list)2.5 E F1 2.5(;].)C -3.332 1.666(.. [)-.834 H F2(else).834 E F0 +(list)2.5 E F1 2.5(;])C F2<8c>A F1(The)144 367.2 Q F2(if)2.977 E F0 +(list)3.067 E F1 .478(is e)3.658 F -.15(xe)-.15 G 2.978(cuted. If).15 F +.478(its e)2.978 F .478(xit status is zero, the)-.15 F F2(then)2.978 E +F0(list)2.978 E F1 .478(is e)2.978 F -.15(xe)-.15 G 2.978 +(cuted. Otherwise,).15 F(each)2.978 E F2(elif)2.978 E F0(list)2.978 E F1 +1.088(is e)144 379.2 R -.15(xe)-.15 G 1.088(cuted in turn, and if its e) +.15 F 1.087(xit status is zero, the corresponding)-.15 F F2(then)3.587 E +F0(list)3.587 E F1 1.087(is e)3.587 F -.15(xe)-.15 G 1.087 +(cuted and the).15 F .103(command completes.)144 391.2 R .103 +(Otherwise, the)5.103 F F2(else)2.603 E F0(list)2.603 E F1 .103(is e) +2.603 F -.15(xe)-.15 G .103(cuted, if present.).15 F .103(The e)5.103 F +.103(xit status is the e)-.15 F .104(xit sta-)-.15 F +(tus of the last command e)144 403.2 Q -.15(xe)-.15 G +(cuted, or zero if no condition tested true.).15 E F2(while)108 420 Q F0 +(list-1)2.5 E F1(;)A F2(do)2.5 E F0(list-2)2.5 E F1(;)A F2(done)2.5 E +(until)108 432 Q F0(list-1)2.5 E F1(;)A F2(do)2.5 E F0(list-2)2.5 E F1 +(;)A F2(done)2.5 E F1(The)144 444 Q F2(while)3.45 E F1 .95 +(command continuously e)3.45 F -.15(xe)-.15 G .95(cutes the list).15 F +F0(list-2)3.45 E F1 .95(as long as the last command in the list)3.45 F +F0(list-1)144 456 Q F1 .205(returns an e)2.705 F .205 +(xit status of zero.)-.15 F(The)5.205 E F2(until)2.705 E F1 .205 +(command is identical to the)2.705 F F2(while)2.705 E F1 .205 +(command, e)2.705 F(xcept)-.15 E .6(that the test is ne)144 468 R -.05 +(ga)-.15 G(ted:).05 E F0(list-2)3.19 E F1 .6(is e)3.12 F -.15(xe)-.15 G +.599(cuted as long as the last command in).15 F F0(list-1)3.189 E F1 +.599(returns a non-zero)3.099 F -.15(ex)144 480 S .204(it status.).15 F +.204(The e)5.204 F .204(xit status of the)-.15 F F2(while)2.704 E F1 +(and)2.704 E F2(until)2.704 E F1 .205(commands is the e)2.704 F .205 +(xit status of the last command)-.15 F -.15(exe)144 492 S(cuted in).15 E +F0(list-2)2.5 E F1 2.5(,o)C 2.5(rz)-2.5 G(ero if none w)-2.5 E(as e)-.1 +E -.15(xe)-.15 G(cuted.).15 E F2(Copr)87 508.8 Q(ocesses)-.18 E F1(A)108 +520.8 Q F0(copr)2.602 E(ocess)-.45 E F1 .102 +(is a shell command preceded by the)2.602 F F2(copr)2.602 E(oc)-.18 E F1 +(reserv)2.602 E .102(ed w)-.15 F 2.602(ord. A)-.1 F .102(coprocess is e) +2.602 F -.15(xe)-.15 G .101(cuted asynchro-).15 F .641 +(nously in a subshell, as if the command had been terminated with the) +108 532.8 R F2(&)3.142 E F1 .642(control operator)3.142 F 3.142(,w)-.4 G +.642(ith a tw)-3.142 F(o-w)-.1 E(ay)-.1 E +(pipe established between the e)108 544.8 Q -.15(xe)-.15 G +(cuting shell and the coprocess.).15 E(The syntax for a coprocess is:) +108 561.6 Q F2(copr)144 578.4 Q(oc)-.18 E F1([)2.5 E F0 -.27(NA)C(ME).27 +E F1(])A F0(command)2.5 E F1([)2.5 E F0 -.37(re)C(dir).37 E(ections)-.37 +E F1(])A .599(This creates a coprocess named)108 595.2 R F0 -.27(NA) +3.099 G(ME).27 E F1(.)A F0(command)5.599 E F1 .599 +(may be either a simple command or a compound com-)3.099 F 1.4 +(mand \(see abo)108 607.2 R -.15(ve)-.15 G(\).).15 E F0 -.27(NA)6.4 G +(ME).27 E F1 1.4(is a shell v)3.9 F 1.4(ariable name.)-.25 F(If)6.4 E F0 +-.27(NA)3.9 G(ME).27 E F1 1.4(is not supplied, the def)3.9 F 1.4 +(ault name is)-.1 F F2(CO-)3.9 E(PR)108 619.2 Q(OC)-.3 E F1(.)A +(The recommended form to use for a coprocess is)108 636 Q F2(copr)144 +652.8 Q(oc)-.18 E F0 -.27(NA)2.5 G(ME).27 E F1({)2.5 E F0(command)2.5 E +F1([)2.5 E F0 -.37(re)C(dir).37 E(ections)-.37 E F1(]; })A .799(This fo\ +rm is preferred because simple commands result in the coprocess al)108 +669.6 R -.1(wa)-.1 G .799(ys being named).1 F F2(COPR)3.299 E(OC)-.3 E +F1(,)A(and it is simpler to use and more complete than the other compou\ +nd commands.)108 681.6 Q(If)108 698.4 Q F0(command)3.061 E F1 .561 +(is a compound command,)3.061 F F0 -.27(NA)3.061 G(ME).27 E F1 .562 +(is optional. The w)3.061 F .562(ord follo)-.1 F(wing)-.25 E F2(copr) +3.062 E(oc)-.18 E F1 .562(determines whether)3.062 F .339(that w)108 +710.4 R .339(ord is interpreted as a v)-.1 F .339 +(ariable name: it is interpreted as)-.25 F F0 -.27(NA)2.839 G(ME).27 E +F1 .338(if it is not a reserv)2.838 F .338(ed w)-.15 F .338 +(ord that intro-)-.1 F 1.121(duces a compound command.)108 722.4 R(If) +6.121 E F0(command)3.621 E F1 1.121(is a simple command,)3.621 F F0 -.27 +(NA)3.621 G(ME).27 E F1 1.121(is not allo)3.621 F 1.122 +(wed; this is to a)-.25 F -.2(vo)-.2 G(id).2 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(7)190.955 E 0 Cg EP +%%Page: 8 8 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(confusion between)108 84 Q F0 -.27(NA)2.5 G(ME).27 +E F1(and the \214rst w)2.5 E(ord of the simple command.)-.1 E .09 +(When the coprocess is e)108 100.8 R -.15(xe)-.15 G .09 +(cuted, the shell creates an array v).15 F .09(ariable \(see)-.25 F/F2 +10/Times-Bold@0 SF(Arrays)2.59 E F1(belo)2.59 E .09(w\) named)-.25 F F0 +-.27(NA)2.59 G(ME).27 E F1 .09(in the)2.59 F(conte)108 112.8 Q .302 +(xt of the e)-.15 F -.15(xe)-.15 G .302(cuting shell.).15 F .302 +(The standard output of)5.302 F F0(command)3.002 E F1 .302 +(is connected via a pipe to a \214le descriptor)3.572 F .588(in the e) +108 124.8 R -.15(xe)-.15 G .587 +(cuting shell, and that \214le descriptor is assigned to).15 F F0 -.27 +(NA)3.087 G(ME).27 E F1 3.087([0]. The)B .587(standard input of)3.087 F +F0(command)3.287 E F1(is)3.857 E 2.029 +(connected via a pipe to a \214le descriptor in the e)108 136.8 R -.15 +(xe)-.15 G 2.029 +(cuting shell, and that \214le descriptor is assigned to).15 F F0 -.27 +(NA)108 148.8 S(ME).27 E F1 2.879([1]. This)B .379 +(pipe is established before an)2.879 F 2.879(yr)-.15 G .379 +(edirections speci\214ed by the command \(see)-2.879 F/F3 9/Times-Bold@0 +SF(REDIRECTION)2.879 E F1(belo)108 160.8 Q 3.425(w\). The)-.25 F .925 +(\214le descriptors can be utilized as ar)3.425 F .926 +(guments to shell commands and redirections using stan-)-.18 F .286 +(dard w)108 172.8 R .286(ord e)-.1 F 2.786(xpansions. Other)-.15 F .286 +(than those created to e)2.786 F -.15(xe)-.15 G .286 +(cute command and process substitutions, the \214le de-).15 F +(scriptors are not a)108 184.8 Q -.25(va)-.2 G(ilable in subshells.).25 +E 1.676(The process ID of the shell spa)108 201.6 R 1.676(wned to e)-.15 +F -.15(xe)-.15 G 1.676(cute the coprocess is a).15 F -.25(va)-.2 G 1.676 +(ilable as the v).25 F 1.677(alue of the v)-.25 F(ariable)-.25 E F0 -.27 +(NA)108 213.6 S(ME).27 E F1 2.5(_PID. The)B F2(wait)2.5 E F1 -.2(bu)2.5 +G(iltin may be used to w).2 E(ait for the coprocess to terminate.)-.1 E +.336(Since the coprocess is created as an asynchronous command, the)108 +230.4 R F2(copr)2.836 E(oc)-.18 E F1 .335(command al)2.835 F -.1(wa)-.1 +G .335(ys returns success.).1 F +(The return status of a coprocess is the e)108 242.4 Q(xit status of) +-.15 E F0(command)2.5 E F1(.)A F2(Shell Function De\214nitions)87 259.2 +Q F1 2.697(As)108 271.2 S .198 +(hell function is an object that is called lik)-2.697 F 2.698(eas)-.1 G +.198(imple command and e)-2.698 F -.15(xe)-.15 G .198 +(cutes a compound command with).15 F 2.5(an)108 283.2 S .5 -.25(ew s) +-2.5 H(et of positional parameters.).25 E +(Shell functions are declared as follo)5 E(ws:)-.25 E F0(fname)108 300 Q +F1(\(\))2.5 E F0(compound\255command)2.5 E F1([)2.5 E F0 -.37(re)C(dir) +.37 E(ection)-.37 E F1(])A F2(function)108 312 Q F0(fname)2.5 E F1 +([\(\)])2.5 E F0(compound\255command)2.5 E F1([)2.5 E F0 -.37(re)C(dir) +.37 E(ection)-.37 E F1(])A .217(This de\214nes a function named)144 324 +R F0(fname)2.717 E F1 5.217(.T)C .217(he reserv)-5.217 F .217(ed w)-.15 +F(ord)-.1 E F2(function)2.717 E F1 .216(is optional.)2.717 F .216 +(If the)5.216 F F2(function)2.716 E F1(re-)2.716 E(serv)144 336 Q .68 +(ed w)-.15 F .68(ord is supplied, the parentheses are optional.)-.1 F +(The)5.68 E F0(body)3.18 E F1 .68(of the function is the compound)3.18 F +(command)144 348 Q F0(compound\255command)2.784 E F1(\(see)3.354 E F2 +.084(Compound Commands)2.584 F F1(abo)2.584 E -.15(ve)-.15 G 2.584 +(\). That).15 F .084(command is usually a)2.584 F F0(list)144 360 Q F1 +.044(of commands between { and }, b)2.544 F .044(ut may be an)-.2 F +2.544(yc)-.15 G .044(ommand listed under)-2.544 F F2 .044 +(Compound Commands)2.544 F F1(abo)144 372 Q -.15(ve)-.15 G 5.532(.I).15 +G 3.032(ft)-5.532 G(he)-3.032 E F2(function)3.032 E F1(reserv)3.032 E +.532(ed w)-.15 F .532(ord is used, b)-.1 F .532 +(ut the parentheses are not supplied, the braces are)-.2 F(recommended.) +144 384 Q F0(compound\255command)6.253 E F1 1.253(is e)3.753 F -.15(xe) +-.15 G 1.253(cuted whene).15 F -.15(ve)-.25 G(r).15 E F0(fname)3.753 E +F1 1.254(is speci\214ed as the name of a)3.753 F 1.187(simple command.) +144 396 R 1.187(When in posix mode,)6.187 F F0(fname)3.687 E F1 1.186 +(must be a v)3.687 F 1.186(alid shell)-.25 F F0(name)3.686 E F1 1.186 +(and may not be the)3.686 F .088(name of one of the POSIX)144 408 R F0 +.089(special b)2.589 F(uiltins)-.2 E F1 5.089(.I)C 2.589(nd)-5.089 G(ef) +-2.589 E .089(ault mode, a function name can be an)-.1 F 2.589(yu)-.15 G +(nquoted)-2.589 E(shell w)144 420 Q(ord that does not contain)-.1 E F2 +($)2.5 E F1(.)A(An)108 436.8 Q 2.93(yr)-.15 G .43(edirections \(see) +-2.93 F F3(REDIRECTION)2.93 E F1(belo)2.68 E .43 +(w\) speci\214ed when a function is de\214ned are performed when the) +-.25 F(function is e)108 448.8 Q -.15(xe)-.15 G(cuted.).15 E .57(The e) +108 465.6 R .57(xit status of a function de\214nition is zero unless a \ +syntax error occurs or a readonly function with the)-.15 F .85 +(same name already e)108 477.6 R 3.35(xists. When)-.15 F -.15(exe)3.35 G +.85(cuted, the e).15 F .85(xit status of a function is the e)-.15 F .85 +(xit status of the last com-)-.15 F(mand e)108 489.6 Q -.15(xe)-.15 G +(cuted in the body).15 E 5(.\()-.65 G(See)-5 E F3(FUNCTIONS)2.5 E F1 +(belo)2.25 E -.65(w.)-.25 G(\)).65 E/F4 10.95/Times-Bold@0 SF(COMMENTS) +72 506.4 Q F1 .982(In a non-interacti)108 518.4 R 1.282 -.15(ve s)-.25 H +.982(hell, or an interacti).15 F 1.282 -.15(ve s)-.25 H .982 +(hell in which the).15 F F2(interacti)3.482 E -.1(ve)-.1 G(_comments).1 +E F1 .982(option to the)3.482 F F2(shopt)3.482 E F1 -.2(bu)108 530.4 S +.612(iltin is enabled \(see).2 F F3 .612(SHELL B)3.112 F(UIL)-.09 E .612 +(TIN COMMANDS)-.828 F F1(belo)2.862 E .612(w\), a w)-.25 F .612(ord be) +-.1 F .612(ginning with)-.15 F F2(#)3.111 E F1 .611(introduces a com-) +3.111 F 2.854(ment. A)108 542.4 R -.1(wo)2.854 G .354(rd be).1 F .354 +(gins at the be)-.15 F .355 +(ginning of a line, after unquoted whitespace, or after an operator)-.15 +F 5.355(.T)-.55 G .355(he com-)-5.355 F .364(ment causes that w)108 +554.4 R .364 +(ord and all remaining characters on that line to be ignored.)-.1 F .363 +(An interacti)5.363 F .663 -.15(ve s)-.25 H .363(hell without).15 F(the) +108 566.4 Q F2(interacti)2.62 E -.1(ve)-.1 G(_comments).1 E F1 .121 +(option enabled does not allo)2.621 F 2.621(wc)-.25 G 2.621 +(omments. The)-2.621 F F2(interacti)2.621 E -.1(ve)-.1 G(_comments).1 E +F1 .121(option is)2.621 F(enabled by def)108 578.4 Q(ault in interacti) +-.1 E .3 -.15(ve s)-.25 H(hells.).15 E F4 -.11(QU)72 595.2 S -.438(OT) +.11 G(ING).438 E F0(Quoting)108 607.2 Q F1 .478(is used to remo)2.978 F +.777 -.15(ve t)-.15 H .477 +(he special meaning of certain characters or w).15 F .477 +(ords to the shell.)-.1 F .477(Quoting can be)5.477 F .184 +(used to disable special treatment for special characters, to pre)108 +619.2 R -.15(ve)-.25 G .185(nt reserv).15 F .185(ed w)-.15 F .185 +(ords from being recognized as)-.1 F(such, and to pre)108 631.2 Q -.15 +(ve)-.25 G(nt parameter e).15 E(xpansion.)-.15 E .289(Each of the)108 +648 R F0(metac)2.789 E(har)-.15 E(acter)-.15 E(s)-.1 E F1 .288 +(listed abo)2.789 F .588 -.15(ve u)-.15 H(nder).15 E F3(DEFINITIONS) +2.788 E F1 .288(has special meaning to the shell and must be)2.538 F +(quoted if it is to represent itself.)108 660 Q 1.344 +(When the command history e)108 676.8 R 1.344(xpansion f)-.15 F 1.344 +(acilities are being used \(see)-.1 F F3(HIST)3.844 E(OR)-.162 E 3.594 +(YE)-.315 G(XP)-3.594 E(ANSION)-.666 E F1(belo)3.595 E 1.345(w\), the) +-.25 F F0(history e)108 688.8 Q(xpansion)-.2 E F1(character)2.5 E 2.5 +(,u)-.4 G(sually)-2.5 E F2(!)2.5 E F1 2.5(,m)C(ust be quoted to pre)-2.5 +E -.15(ve)-.25 G(nt history e).15 E(xpansion.)-.15 E .768 +(There are four quoting mechanisms: the)108 705.6 R F0 .768(escape c) +3.458 F(har)-.15 E(acter)-.15 E F1 3.268(,s).73 G .767 +(ingle quotes, double quotes, and dollar)-3.268 F(-single)-.2 E(quotes.) +108 717.6 Q(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(8)190.955 E +0 Cg EP +%%Page: 9 9 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E 2.962(An)108 84 S .463(on-quoted backslash \() +-2.962 F/F2 10/Times-Bold@0 SF(\\)A F1 2.963(\)i)C 2.963(st)-2.963 G(he) +-2.963 E F0 .463(escape c)3.153 F(har)-.15 E(acter)-.15 E F1 5.463(.I) +.73 G 2.963(tp)-5.463 G(reserv)-2.963 E .463(es the literal v)-.15 F +.463(alue of the ne)-.25 F .463(xt character that)-.15 F(follo)108 96 Q +.878(ws, remo)-.25 F .878(ving an)-.15 F 3.378(ys)-.15 G .878 +(pecial meaning it has, with the e)-3.378 F .877(xception of . If)-.25 F(a)3.377 E F2(\\)3.377 E F1( pair ap-)-.25 F .176 +(pears, and the backslash is not itself quoted, the)108 108 R F2(\\) +2.676 E F1( is treated as a line continuation \(that is, it is re-)-.25 F +(mo)108 120 Q -.15(ve)-.15 G 2.5(df).15 G(rom the input stream and ef) +-2.5 E(fecti)-.25 E -.15(ve)-.25 G(ly ignored\).).15 E .295 +(Enclosing characters in single quotes preserv)108 136.8 R .295 +(es the literal v)-.15 F .295(alue of each character within the quotes.) +-.25 F 2.795(As)5.295 G(in-)-2.795 E +(gle quote may not occur between single quotes, e)108 148.8 Q -.15(ve) +-.25 G 2.5(nw).15 G(hen preceded by a backslash.)-2.5 E .033 +(Enclosing characters in double quotes preserv)108 165.6 R .034 +(es the literal v)-.15 F .034 +(alue of all characters within the quotes, with the)-.25 F -.15(ex)108 +177.6 S .057(ception of).15 F F2($)2.557 E F1(,)A F2<92>2.557 E F1(,)A +F2(\\)2.557 E F1 2.557(,a)C .057(nd, when history e)-2.557 F .056 +(xpansion is enabled,)-.15 F F2(!)2.556 E F1 5.056(.W)C .056 +(hen the shell is in posix mode, the)-5.056 F F2(!)2.556 E F1 .056 +(has no)2.556 F .46(special meaning within double quotes, e)108 189.6 R +-.15(ve)-.25 G 2.96(nw).15 G .46(hen history e)-2.96 F .46 +(xpansion is enabled.)-.15 F .46(The characters)5.46 F F2($)2.96 E F1 +(and)2.96 E F2<92>2.96 E F1(re-)2.96 E .563 +(tain their special meaning within double quotes.)108 201.6 R .562 +(The backslash retains its special meaning only when fol-)5.563 F(lo)108 +213.6 Q .317(wed by one of the follo)-.25 F .318(wing characters:)-.25 F +F2($)2.818 E F1(,)A F2<92>2.818 E F1(,)A F2(")3.651 E F1(,).833 E F2(\\) +2.818 E F1 2.818(,o)C(r)-2.818 E F2()2.818 E F1 5.318(.B)C .318 +(ackslashes preceding characters with-)-5.318 F +(out a special meaning are left unmodi\214ed.)108 225.6 Q 3.144(Ad)108 +242.4 S .644(ouble quote may be quoted within double quotes by precedin\ +g it with a backslash.)-3.144 F .643(If enabled, history)5.643 F -.15 +(ex)108 254.4 S 1.267(pansion will be performed unless an).15 F F2(!) +3.767 E F1 1.268 +(appearing in double quotes is escaped using a backslash.)6.267 F(The) +6.268 E(backslash preceding the)108 266.4 Q F2(!)2.5 E F1(is not remo)5 +E -.15(ve)-.15 G(d.).15 E(The special parameters)108 283.2 Q F2(*)2.5 E +F1(and)2.5 E F2(@)2.5 E F1(ha)2.5 E .3 -.15(ve s)-.2 H +(pecial meaning when in double quotes \(see).15 E/F3 9/Times-Bold@0 SF +-.666(PA)2.5 G(RAMETERS).666 E F1(belo)2.25 E(w\).)-.25 E .149 +(Character sequences of the form)108 300 R F2($)2.649 E F1<08>A F0 +(string)A F1 2.649<0861>C .149(re treated as a special v)-2.649 F .149 +(ariant of single quotes.)-.25 F .148(The sequence e)5.148 F(x-)-.15 E +.527(pands to)108 312 R F0(string)3.027 E F1 3.027(,w)C .527 +(ith backslash-escaped characters in)-3.027 F F0(string)3.027 E F1 .528 +(replaced as speci\214ed by the ANSI C standard.)3.027 F +(Backslash escape sequences, if present, are decoded as follo)108 324 Q +(ws:)-.25 E F2(\\a)144 336 Q F1(alert \(bell\))180 336 Q F2(\\b)144 348 +Q F1(backspace)180 348 Q F2(\\e)144 360 Q(\\E)144 372 Q F1 +(an escape character)180 372 Q F2(\\f)144 384 Q F1(form feed)180 384 Q +F2(\\n)144 396 Q F1(ne)180 396 Q 2.5(wl)-.25 G(ine)-2.5 E F2(\\r)144 408 +Q F1(carriage return)180 408 Q F2(\\t)144 420 Q F1(horizontal tab)180 +420 Q F2(\\v)144 432 Q F1 -.15(ve)180 432 S(rtical tab).15 E F2(\\\\)144 +444 Q F1(backslash)180 444 Q F2<5c08>144 456 Q F1(single quote)180 456 Q +F2(\\")144 468 Q F1(double quote)180 468 Q F2(\\?)144 480 Q F1 +(question mark)180 480 Q F2(\\)144 492 Q F0(nnn)A F1 +(The eight-bit character whose v)180 492 Q(alue is the octal v)-.25 E +(alue)-.25 E F0(nnn)2.5 E F1(\(one to three octal digits\).)2.5 E F2 +(\\x)144 504 Q F0(HH)A F1(The eight-bit character whose v)180 504 Q +(alue is the he)-.25 E(xadecimal v)-.15 E(alue)-.25 E F0(HH)2.5 E F1 +(\(one or tw)2.5 E 2.5(oh)-.1 G .3 -.15(ex d)-2.5 H(igits\).).15 E F2 +(\\u)144 516 Q F0(HHHH)A F1 1.204 +(The Unicode \(ISO/IEC 10646\) character whose v)180 528 R 1.203 +(alue is the he)-.25 F 1.203(xadecimal v)-.15 F(alue)-.25 E F0(HHHH) +3.703 E F1(\(one to four he)180 540 Q 2.5(xd)-.15 G(igits\).)-2.5 E F2 +(\\U)144 552 Q F0(HHHHHHHH)A F1 .244 +(The Unicode \(ISO/IEC 10646\) character whose v)180 564 R .245 +(alue is the he)-.25 F .245(xadecimal v)-.15 F(alue)-.25 E F0(HHHHH-) +2.745 E(HHH)180 576 Q F1(\(one to eight he)2.5 E 2.5(xd)-.15 G(igits\).) +-2.5 E F2(\\c)144 588 Q F0(x)A F1 2.5(Ac)180 588 S(ontrol-)-2.5 E F0(x)A +F1(character)2.5 E(.)-.55 E(The e)108 604.8 Q(xpanded result is single-\ +quoted, as if the dollar sign had not been present.)-.15 E F2 -.74(Tr)87 +621.6 S(anslating Strings).74 E F1 2.884(Ad)108 633.6 S .383 +(ouble-quoted string preceded by a dollar sign \()-2.884 F F2($)A F1(")A +F0(string)A F1 .383("\) causes the string to be translated according to) +B 1.635(the current locale.)108 645.6 R(The)6.635 E F0 -.1(ge)4.135 G +(tte).1 E(xt)-.2 E F1 1.636 +(infrastructure performs the lookup and translation, using the)4.135 F +F2(LC_MES-)4.136 E(SA)108 657.6 Q(GES)-.55 E F1(,)A F2(TEXTDOMAINDIR) +2.761 E F1 2.761(,a)C(nd)-2.761 E F2(TEXTDOMAIN)2.761 E F1 .261(shell v) +2.761 F 2.761(ariables. If)-.25 F .261(the current locale is)2.761 F F2 +(C)2.76 E F1(or)2.76 E F2(POSIX)2.76 E F1(,)A 1.213 +(if there are no translations a)108 669.6 R -.25(va)-.2 G 1.214(ilable,\ + or if the string is not translated, the dollar sign is ignored, and th\ +e).25 F .949(string is treated as double-quoted as described abo)108 +681.6 R -.15(ve)-.15 G 5.949(.T).15 G .949 +(his is a form of double quoting, so the string re-)-5.949 F .371 +(mains double-quoted by def)108 693.6 R .371 +(ault, whether or not it is translated and replaced.)-.1 F .372(If the) +5.372 F F2(noexpand_translation)2.872 E F1 .14 +(option is enabled using the)108 705.6 R F2(shopt)2.639 E F1 -.2(bu) +2.639 G .139 +(iltin, translated strings are single-quoted instead of double-quoted.) +.2 F(See)5.139 E(the description of)108 717.6 Q F2(shopt)2.5 E F1(belo) +2.5 E 2.5(wu)-.25 G(nder)-2.5 E F3(SHELL B)2.5 E(UIL)-.09 E +(TIN COMMANDS)-.828 E/F4 9/Times-Roman@0 SF(.)A F1(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(9)190.955 E 0 Cg EP +%%Page: 10 10 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10.95/Times-Bold@0 SF -.81(PA)72 84 S(RAMETERS) +.81 E F1(A)108 96 Q F0(par)4.574 E(ameter)-.15 E F1 .824 +(is an entity that stores v)4.054 F 3.324(alues. It)-.25 F .824 +(can be a)3.324 F F0(name)3.685 E F1 3.325(,an).18 G(umber)-3.325 E +3.325(,o)-.4 G 3.325(ro)-3.325 G .825(ne of the special characters) +-3.325 F .802(listed belo)108 108 R 3.302(wu)-.25 G(nder)-3.302 E/F3 10 +/Times-Bold@0 SF .802(Special P)3.302 F(arameters)-.1 E F1 5.802(.A)C F0 +(variable)-2.21 E F1 .802(is a parameter denoted by a)3.482 F F0(name) +3.662 E F1 5.801(.A).18 G -.25(va)-2.5 G .801(riable has a).25 F F0 +(value)108 120 Q F1 .368(and zero or more)2.868 F F0(attrib)2.868 E +(utes)-.2 E F1 5.369(.A)C(ttrib)-5.369 E .369 +(utes are assigned using the)-.2 F F3(declar)2.869 E(e)-.18 E F1 -.2(bu) +2.869 G .369(iltin command \(see).2 F F3(declar)2.869 E(e)-.18 E F1 +(belo)108 132 Q 2.5(wi)-.25 G(n)-2.5 E/F4 9/Times-Bold@0 SF(SHELL B)2.5 +E(UIL)-.09 E(TIN COMMANDS)-.828 E/F5 9/Times-Roman@0 SF(\).)A F1(The)4.5 +E F3(export)2.5 E F1(and)2.5 E F3 -.18(re)2.5 G(adonly).18 E F1 -.2(bu) +2.5 G(iltins assign speci\214c attrib).2 E(utes.)-.2 E 2.755(Ap)108 +148.8 S .255(arameter is set if it has been assigned a v)-2.755 F 2.754 +(alue. The)-.25 F .254(null string is a v)2.754 F .254(alid v)-.25 F +2.754(alue. Once)-.25 F 2.754(av)2.754 G .254(ariable is set, it)-3.004 +F(may be unset only by using the)108 160.8 Q F3(unset)2.5 E F1 -.2(bu) +2.5 G(iltin command \(see).2 E F4(SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS) +-.828 E F1(belo)2.25 E(w\).)-.25 E(A)108 177.6 Q F0(variable)2.79 E F1 +(may be assigned to by a statement of the form)2.68 E F0(name)144 194.4 +Q F1(=[)A F0(value)A F1(])A(If)108 211.2 Q F0(value)3.022 E F1 .232 +(is not gi)2.912 F -.15(ve)-.25 G .232(n, the v).15 F .232 +(ariable is assigned the null string.)-.25 F(All)5.233 E F0(values)3.023 +E F1(under)3.003 E .233(go tilde e)-.18 F .233(xpansion, parameter)-.15 +F .515(and v)108 223.2 R .515(ariable e)-.25 F .515 +(xpansion, command substitution, arithmetic e)-.15 F .515 +(xpansion, and quote remo)-.15 F -.25(va)-.15 G 3.015(l\().25 G(see) +-3.015 E F4(EXP)3.015 E(ANSION)-.666 E F1(belo)108 235.2 Q 2.698 +(w\). If)-.25 F .198(the v)2.698 F .198(ariable has its)-.25 F F3 +(integer)2.698 E F1(attrib)2.698 E .198(ute set, then)-.2 F F0(value) +2.988 E F1 .198(is e)2.878 F -.25(va)-.25 G .199 +(luated as an arithmetic e).25 F .199(xpression e)-.15 F -.15(ve)-.25 G +(n).15 E .524(if the)108 247.2 R F3($\(\()3.024 E F1 1.666(...)C F3 +(\)\))-1.666 E F1 -.15(ex)3.024 G .523(pansion is not used \(see).15 F +F3 .523(Arithmetic Expansion)3.023 F F1(belo)3.023 E 3.023(w\). W)-.25 F +.523(ord splitting and pathname e)-.8 F(x-)-.15 E 1.363 +(pansion are not performed.)108 259.2 R 1.364 +(Assignment statements may also appear as ar)6.363 F 1.364 +(guments to the)-.18 F F3(alias)3.864 E F1(,)A F3(declar)3.864 E(e)-.18 +E F1(,)A F3(typeset)108 271.2 Q F1(,)A F3(export)3.871 E F1(,)A F3 -.18 +(re)3.871 G(adonly).18 E F1 3.871(,a)C(nd)-3.871 E F3(local)3.871 E F1 +-.2(bu)3.871 G 1.371(iltin commands \().2 F F0(declar)A(ation)-.15 E F1 +3.871(commands\). When)3.871 F 1.37(in posix mode,)3.871 F 1.141 +(these b)108 283.2 R 1.142 +(uiltins may appear in a command after one or more instances of the)-.2 +F F3(command)3.642 E F1 -.2(bu)3.642 G 1.142(iltin and retain).2 F +(these assignment statement properties.)108 295.2 Q .377(In the conte) +108 312 R .377(xt where an assignment statement is assigning a v)-.15 F +.376(alue to a shell v)-.25 F .376(ariable or array inde)-.25 F .376 +(x, the +=)-.15 F .524(operator appends to or adds to the v)108 324 R +(ariable')-.25 E 3.024(sp)-.55 G(re)-3.024 E .524(vious v)-.25 F 3.024 +(alue. This)-.25 F .524(includes ar)3.024 F .524(guments to)-.18 F F0 +(declar)3.024 E(ation)-.15 E F1(com-)3.024 E .546(mands such as)108 336 +R F3(declar)3.046 E(e)-.18 E F1 .546(that accept assignment statements.) +3.046 F .546(When += is applied to a v)5.546 F .545 +(ariable for which the)-.25 F F3(integer)108 348 Q F1(attrib)3.533 E +1.033(ute has been set, the v)-.2 F(ariable')-.25 E 3.533(sc)-.55 G +1.033(urrent v)-3.533 F 1.033(alue and)-.25 F F0(value)3.533 E F1 1.033 +(are each e)3.533 F -.25(va)-.25 G 1.034(luated as arithmetic e).25 F +(x-)-.15 E .353 +(pressions, and the sum of the results is assigned as the v)108 360 R +(ariable')-.25 E 2.853(sv)-.55 G 2.852(alue. The)-3.103 F .352 +(current v)2.852 F .352(alue is usually an in-)-.25 F(te)108 372 Q .254 +(ger constant, b)-.15 F .254(ut may be an e)-.2 F 2.754(xpression. When) +-.15 F .254(+= is applied to an array v)2.754 F .255 +(ariable using compound assign-)-.25 F .663(ment \(see)108 384 R F3 +(Arrays)3.163 E F1(belo)3.163 E .663(w\), the v)-.25 F(ariable')-.25 E +3.163(sv)-.55 G .662 +(alue is not unset \(as it is when using =\), and ne)-3.413 F 3.162(wv) +-.25 G .662(alues are ap-)-3.412 F .306(pended to the array be)108 396 R +.306(ginning at one greater than the array')-.15 F 2.807(sm)-.55 G .307 +(aximum inde)-2.807 F 2.807(x\()-.15 G .307(for inde)-2.807 F -.15(xe) +-.15 G 2.807(da).15 G .307(rrays\) or added)-2.807 F .246 +(as additional k)108 408 R -.15(ey)-.1 G.15 E .246 +(alue pairs in an associati)-.25 F .546 -.15(ve a)-.25 H(rray).15 E +5.246(.W)-.65 G .246(hen applied to a string-v)-5.246 F .245(alued v) +-.25 F(ariable,)-.25 E F0(value)2.745 E F1 .245(is e)2.745 F(x-)-.15 E +(panded and appended to the v)108 420 Q(ariable')-.25 E 2.5(sv)-.55 G +(alue.)-2.75 E 3.382(Av)108 436.8 S .882(ariable can be assigned the) +-3.632 F F0(namer)3.382 E(ef)-.37 E F1(attrib)3.382 E .882 +(ute using the)-.2 F F33.382 E F1 .882(option to the)3.382 F F3 +(declar)3.382 E(e)-.18 E F1(or)3.383 E F3(local)3.383 E F1 -.2(bu)3.383 +G .883(iltin com-).2 F .316(mands \(see the descriptions of)108 448.8 R +F3(declar)2.816 E(e)-.18 E F1(and)2.816 E F3(local)2.816 E F1(belo)2.816 +E .316(w\) to create a)-.25 F F0(namer)2.815 E(ef)-.37 E F1 2.815(,o)C +2.815(rar)-2.815 G .315(eference to another v)-2.815 F(ari-)-.25 E 2.918 +(able. This)108 460.8 R(allo)2.918 E .418(ws v)-.25 F .418 +(ariables to be manipulated indirectly)-.25 F 5.419(.W)-.65 G(hene) +-5.419 E -.15(ve)-.25 G 2.919(rt).15 G .419(he nameref v)-2.919 F .419 +(ariable is referenced, as-)-.25 F .133 +(signed to, unset, or has its attrib)108 472.8 R .132 +(utes modi\214ed \(other than using or changing the)-.2 F F0(namer)2.632 +E(ef)-.37 E F1(attrib)2.632 E .132(ute itself\), the)-.2 F 1.356 +(operation is actually performed on the v)108 484.8 R 1.357 +(ariable speci\214ed by the nameref v)-.25 F(ariable')-.25 E 3.857(sv) +-.55 G 3.857(alue. A)-4.107 F 1.357(nameref is)3.857 F .972 +(commonly used within shell functions to refer to a v)108 496.8 R .971 +(ariable whose name is passed as an ar)-.25 F .971(gument to the)-.18 F +2.5(function. F)108 508.8 R(or instance, if a v)-.15 E +(ariable name is passed to a shell function as its \214rst ar)-.25 E +(gument, running)-.18 E/F6 10/Courier@0 SF(declare \255n ref=$1)144 +525.6 Q F1 .385(inside the function creates a local nameref v)108 542.4 +R(ariable)-.25 E F3 -.18(re)2.885 G(f).18 E F1 .385(whose v)2.885 F .385 +(alue is the v)-.25 F .385(ariable name passed as the \214rst)-.25 F(ar) +108 554.4 Q 3.531(gument. References)-.18 F 1.031(and assignments to) +3.531 F F3 -.18(re)3.531 G(f).18 E F1 3.531(,a)C 1.031 +(nd changes to its attrib)-3.531 F 1.03 +(utes, are treated as references, as-)-.2 F .196(signments, and attrib) +108 566.4 R .196(ute modi\214cations to the v)-.2 F .196 +(ariable whose name w)-.25 F .196(as passed as)-.1 F F3($1)2.696 E F1 +5.197(.I)C 2.697(ft)-5.197 G .197(he control v)-2.697 F(ariable)-.25 E +.006(in a)108 578.4 R F3 -.25(fo)2.506 G(r).25 E F1 .006 +(loop has the nameref attrib)2.506 F .006(ute, the list of w)-.2 F .006 +(ords can be a list of shell v)-.1 F .006 +(ariables, and a name reference)-.25 F .325(is established for each w) +108 590.4 R .325(ord in the list, in turn, when the loop is e)-.1 F -.15 +(xe)-.15 G 2.826(cuted. Array).15 F -.25(va)2.826 G .326 +(riables cannot be gi).25 F -.15(ve)-.25 G(n).15 E(the)108 602.4 Q F3 +(namer)2.536 E(ef)-.18 E F1(attrib)2.536 E 2.536(ute. Ho)-.2 F(we)-.25 E +-.15(ve)-.25 G .836 -.4(r, n).15 H .036(ameref v).4 F .035 +(ariables can reference array v)-.25 F .035 +(ariables and subscripted array v)-.25 F(ari-)-.25 E 2.586 +(ables. Namerefs)108 614.4 R .086(can be unset using the)2.586 F F3 +2.587 E F1 .087(option to the)2.587 F F3(unset)2.587 E F1 -.2(bu) +2.587 G 2.587(iltin. Otherwise,).2 F(if)2.587 E F3(unset)2.587 E F1 .087 +(is e)2.587 F -.15(xe)-.15 G .087(cuted with).15 F +(the name of a nameref v)108 626.4 Q(ariable as an ar)-.25 E +(gument, the v)-.18 E(ariable referenced by the nameref v)-.25 E +(ariable is unset.)-.25 E F3 -.2(Po)87 643.2 S(sitional P).2 E +(arameters)-.1 E F1(A)108 655.2 Q F0 .706(positional par)4.456 F(ameter) +-.15 E F1 .706(is a parameter denoted by one or more digits, other than\ + the single digit 0.)3.936 F(Posi-)5.705 E .444 +(tional parameters are assigned from the shell')108 667.2 R 2.944(sa) +-.55 G -.18(rg)-2.944 G .444(uments when it is in).18 F -.2(vo)-.4 G -.1 +(ke).2 G .445(d, and may be reassigned using).1 F(the)108 679.2 Q F3 +(set)3.334 E F1 -.2(bu)3.334 G .834(iltin command.).2 F .833(Positional\ + parameters may not be assigned to with assignment statements.)5.834 F +(The)5.833 E(positional parameters are temporarily replaced when a shel\ +l function is e)108 691.2 Q -.15(xe)-.15 G(cuted \(see).15 E F4 +(FUNCTIONS)2.5 E F1(belo)2.25 E(w\).)-.25 E 1.403(When a positional par\ +ameter consisting of more than a single digit is e)108 708 R 1.404 +(xpanded, it must be enclosed in)-.15 F .436(braces \(see)108 720 R F4 +(EXP)2.936 E(ANSION)-.666 E F1(belo)2.686 E 2.936(w\). W)-.25 F .435 +(ithout braces, a digit follo)-.4 F .435 +(wing $ can only refer to one of the \214rst nine)-.25 F(GNU Bash 5.3)72 +768 Q(2024 December 12)136.795 E(10)185.955 E 0 Cg EP +%%Page: 11 11 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(positional parameters \()108 84 Q/F2 10 +/Times-Bold@0 SF($1\255$9)A F1 2.5(\)o)C 2.5(rt)-2.5 G +(he special parameter)-2.5 E F2($0)2.5 E F1(\(see the ne)2.5 E +(xt section\).)-.15 E F2(Special P)87 100.8 Q(arameters)-.1 E F1 1.674 +(The shell treats se)108 112.8 R -.15(ve)-.25 G 1.674 +(ral parameters specially).15 F 6.675(.T)-.65 G 1.675 +(hese parameters may only be referenced; assignment to)-6.675 F +(them is not allo)108 124.8 Q 2.5(wed. Special)-.25 F +(parameters are denoted by one of the follo)2.5 E(wing characters.)-.25 +E F2(*)108 141.6 Q F1(\()144 141.6 Q F2($*)A F1 3.478(\)E)C .978 +(xpands to the positional parameters, starting from one.)-3.478 F .978 +(When the e)5.978 F .977(xpansion is not within)-.15 F .383 +(double quotes, each positional parameter e)144 153.6 R .383 +(xpands to a separate w)-.15 F 2.883(ord. In)-.1 F(conte)2.883 E .383 +(xts where w)-.15 F .383(ord e)-.1 F(x-)-.15 E .131 +(pansions are performed, those w)144 165.6 R .131 +(ords are subject to further w)-.1 F .13(ord splitting and pathname e) +-.1 F(xpansion.)-.15 E 1.095(When the e)144 177.6 R 1.095 +(xpansion occurs within double quotes, it e)-.15 F 1.096 +(xpands to a single w)-.15 F 1.096(ord with the v)-.1 F 1.096(alue of) +-.25 F .628(each parameter separated by the \214rst character of the)144 +189.6 R/F3 9/Times-Bold@0 SF(IFS)3.128 E F1 -.25(va)2.878 G 3.128 +(riable. That).25 F(is,)3.128 E F2("$*")3.128 E F1 .627(is equi)3.128 F +-.25(va)-.25 G .627(lent to).25 F F2("$1)144 201.6 Q F0(c)A F2($2)A F0 +(c)A F2 1.666(...)C(")-1.666 E F1 2.805(,w)C(here)-2.805 E F0(c)3.005 E +F1 .306(is the \214rst character of the v)3.115 F .306(alue of the)-.25 +F F3(IFS)2.806 E F1 -.25(va)2.556 G 2.806(riable. If).25 F F3(IFS)2.806 +E F1 .306(is unset, the pa-)2.556 F .129 +(rameters are separated by spaces.)144 213.6 R(If)5.129 E F3(IFS)2.629 E +F1 .129(is null, the parameters are joined without interv)2.379 F .129 +(ening sep-)-.15 F(arators.)144 225.6 Q F2(@)108 237.6 Q F1(\()144 237.6 +Q F2($@)A F1 2.86(\)E)C .361 +(xpands to the positional parameters, starting from one.)-2.86 F .361 +(In conte)5.361 F .361(xts where w)-.15 F .361(ord splitting is)-.1 F +.253(performed, this e)144 249.6 R .253 +(xpands each positional parameter to a separate w)-.15 F .253 +(ord; if not within double quotes,)-.1 F .396(these w)144 261.6 R .396 +(ords are subject to w)-.1 F .396(ord splitting.)-.1 F .396(In conte) +5.396 F .396(xts where w)-.15 F .396 +(ord splitting is not performed, such)-.1 F .149(as the v)144 273.6 R +.148(alue portion of an assignment statement, this e)-.25 F .148 +(xpands to a single w)-.15 F .148(ord with each positional)-.1 F .155 +(parameter separated by a space.)144 285.6 R .155(When the e)5.155 F +.155(xpansion occurs within double quotes, and w)-.15 F .155(ord split-) +-.1 F 1.484(ting is performed, each parameter e)144 297.6 R 1.484 +(xpands to a separate w)-.15 F 3.984(ord. That)-.1 F(is,)3.984 E F2 +("$@")3.984 E F1 1.484(is equi)3.984 F -.25(va)-.25 G 1.484(lent to).25 +F F2("$1" "$2" .)144 309.6 Q 1.666(..)1.666 G F1 .205 +(If the double-quoted e)3.538 F .205(xpansion occurs within a w)-.15 F +.205(ord, the e)-.1 F .205(xpansion of the \214rst pa-)-.15 F .361 +(rameter is joined with the e)144 321.6 R .361(xpansion of the be)-.15 F +.36(ginning part of the original w)-.15 F .36(ord, and the e)-.1 F +(xpansion)-.15 E .196(of the last parameter is joined with the e)144 +333.6 R .197(xpansion of the last part of the original w)-.15 F 2.697 +(ord. When)-.1 F(there)2.697 E(are no positional parameters,)144 345.6 Q +F2("$@")2.5 E F1(and)2.5 E F2($@)2.5 E F1 -.15(ex)2.5 G +(pand to nothing \(i.e., the).15 E 2.5(ya)-.15 G(re remo)-2.5 E -.15(ve) +-.15 G(d\).).15 E F2(#)108 357.6 Q F1(\()144 357.6 Q F2($#)A F1 2.5(\)E) +C(xpands to the number of positional parameters in decimal.)-2.5 E F2(?) +108 369.6 Q F1(\()144 369.6 Q F2($?)A F1 2.5(\)E)C(xpands to the e)-2.5 +E(xit status of the most recently e)-.15 E -.15(xe)-.15 G +(cuted command.).15 E F2108 381.6 Q F1(\()144 381.6 Q F2<24ad>A F1 +2.78(\)E)C .279 +(xpands to the current option \215ags as speci\214ed upon in)-2.78 F -.2 +(vo)-.4 G .279(cation, by the).2 F F2(set)2.779 E F1 -.2(bu)2.779 G .279 +(iltin command,).2 F(or those set by the shell itself \(such as the)144 +393.6 Q F22.5 E F1(option\).)2.5 E F2($)108 405.6 Q F1(\()144 +405.6 Q F2($$)A F1 2.835(\)E)C .335 +(xpands to the process ID of the shell.)-2.835 F .335 +(In a subshell, it e)5.335 F .335(xpands to the process ID of the par) +-.15 F(-)-.2 E(ent shell, not the subshell.)144 417.6 Q F2(!)108 429.6 Q +F1(\()144 429.6 Q F2($!)A F1 .722(\)Expands to the process ID of the jo\ +b most recently placed into the background, whether e)B -.15(xe)-.15 G +(-).15 E(cuted as an asynchronous command or using the)144 441.6 Q F2 +(bg)2.5 E F1 -.2(bu)2.5 G(iltin \(see).2 E F3(JOB CONTR)2.5 E(OL)-.27 E +F1(belo)2.25 E(w\).)-.25 E F2(0)108 453.6 Q F1(\()144 453.6 Q F2($0)A F1 +3.094(\)E)C .594(xpands to the name of the shell or shell script.)-3.094 +F .594(This is set at shell initialization.)5.594 F(If)5.595 E F2(bash) +3.095 E F1(is)3.095 E(in)144 465.6 Q -.2(vo)-.4 G -.1(ke).2 G 3.078(dw) +.1 G .578(ith a \214le of commands,)-3.078 F F2($0)3.078 E F1 .578 +(is set to the name of that \214le.)3.078 F(If)5.577 E F2(bash)3.077 E +F1 .577(is started with the)3.077 F F23.077 E F1 .368 +(option, then)144 477.6 R F2($0)2.869 E F1 .369 +(is set to the \214rst ar)2.869 F .369(gument after the string to be e) +-.18 F -.15(xe)-.15 G .369(cuted, if one is present.).15 F(Other)5.369 E +(-)-.2 E(wise, it is set to the \214lename used to in)144 489.6 Q -.2 +(vo)-.4 G -.1(ke).2 G F2(bash)2.6 E F1 2.5(,a)C 2.5(sg)-2.5 G -2.15 -.25 +(iv e)-2.5 H 2.5(nb).25 G 2.5(ya)-2.5 G -.18(rg)-2.5 G(ument zero.).18 E +F2(Shell V)87 506.4 Q(ariables)-.92 E F1(The shell sets follo)108 518.4 +Q(wing v)-.25 E(ariables:)-.25 E F2(_)108 535.2 Q F1(\()144 535.2 Q F2 +($_)A F1 2.555(,a)C 2.555(nu)-2.555 G .055 +(nderscore\) This has a number of meanings depending on conte)-2.555 F +2.555(xt. At)-.15 F .054(shell startup,)2.554 F F2(_)2.554 E F1 .054 +(is set)2.554 F .912(to the pathname used to in)144 547.2 R -.2(vo)-.4 G +1.112 -.1(ke t).2 H .912(he shell or shell script being e).1 F -.15(xe) +-.15 G .913(cuted as passed in the en).15 F(viron-)-.4 E .57(ment or ar) +144 559.2 R .57(gument list.)-.18 F(Subsequently)5.57 E 3.07(,i)-.65 G +3.069(te)-3.07 G .569(xpands to the last ar)-3.219 F .569 +(gument to the pre)-.18 F .569(vious simple com-)-.25 F .008(mand e)144 +571.2 R -.15(xe)-.15 G .008(cuted in the fore).15 F .008 +(ground, after e)-.15 F 2.508(xpansion. It)-.15 F .008 +(is also set to the full pathname used to in)2.508 F -.2(vo)-.4 G -.1 +(ke).2 G .556(each command e)144 583.2 R -.15(xe)-.15 G .556 +(cuted and placed in the en).15 F .555(vironment e)-.4 F .555 +(xported to that command.)-.15 F .555(When check-)5.555 F(ing mail,)144 +595.2 Q F2($_)2.5 E F1 -.15(ex)2.5 G +(pands to the name of the mail \214le currently being check).15 E(ed.) +-.1 E F2 -.3(BA)108 607.2 S(SH).3 E F1 +(Expands to the full \214lename used to in)144 607.2 Q -.2(vo)-.4 G .2 +-.1(ke t).2 H(his instance of).1 E F2(bash)2.5 E F1(.)A F2 -.3(BA)108 +619.2 S(SHOPTS).3 E F1 2.548(Ac)144 631.2 S .049 +(olon-separated list of enabled shell options.)-2.548 F .049(Each w) +5.049 F .049(ord in the list is a v)-.1 F .049(alid ar)-.25 F .049 +(gument for the)-.18 F F22.549 E F1 .116(option to the)144 643.2 R +F2(shopt)2.616 E F1 -.2(bu)2.616 G .116(iltin command \(see).2 F F3 .116 +(SHELL B)2.616 F(UIL)-.09 E .116(TIN COMMANDS)-.828 F F1(belo)2.366 E +2.616(w\). The)-.25 F .115(options ap-)2.615 F 1.066(pearing in)144 +655.2 R F3 -.27(BA)3.566 G(SHOPTS).27 E F1 1.066(are those reported as) +3.316 F F0(on)3.796 E F1(by)3.807 E F2(shopt)3.567 E F1 6.067(.I)C 3.567 +(ft)-6.067 G 1.067(his v)-3.567 F 1.067(ariable is in the en)-.25 F +(vironment)-.4 E(when)144 667.2 Q F2(bash)2.766 E F1 .266 +(starts up, the shell enables each option in the list before reading an) +2.766 F 2.766(ys)-.15 G .265(tartup \214les.)-2.766 F(This)5.265 E -.25 +(va)144 679.2 S(riable is read-only).25 E(.)-.65 E F2 -.3(BA)108 691.2 S +(SHPID).3 E F1 .187(Expands to the process ID of the current)144 703.2 R +F2(bash)2.687 E F1 2.688(process. This)2.688 F(dif)2.688 E .188 +(fers from)-.25 F F2($$)2.688 E F1 .188(under certain circum-)2.688 F +.548(stances, such as subshells that do not require)144 715.2 R F2(bash) +3.048 E F1 .548(to be re-initialized.)3.048 F .548(Assignments to)5.548 +F F3 -.27(BA)3.048 G(SHPID).27 E F1(ha)144 727.2 Q .3 -.15(ve n)-.2 H +2.5(oe).15 G -.25(ff)-2.5 G 2.5(ect. If).25 F F3 -.27(BA)2.5 G(SHPID).27 +E F1(is unset, it loses its special properties, e)2.25 E -.15(ve)-.25 G +2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G +(ubsequently reset.)-2.5 E(GNU Bash 5.3)72 768 Q(2024 December 12) +136.795 E(11)185.955 E 0 Cg EP +%%Page: 12 12 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF -.3(BA)108 84 S(SH_ALIASES).3 +E F1 1.195(An associati)144 96 R 1.495 -.15(ve a)-.25 H 1.195(rray v).15 +F 1.195(ariable whose members correspond to the internal list of aliase\ +s as main-)-.25 F .16(tained by the)144 108 R F2(alias)2.66 E F1 -.2(bu) +2.66 G 2.66(iltin. Elements).2 F .16 +(added to this array appear in the alias list; ho)2.66 F(we)-.25 E -.15 +(ve)-.25 G .96 -.4(r, u).15 H(nsetting).4 E .142 +(array elements currently does not remo)144 120 R .442 -.15(ve a)-.15 H +.142(liases from the alias list.).15 F(If)5.142 E/F3 9/Times-Bold@0 SF +-.27(BA)2.642 G(SH_ALIASES).27 E F1 .143(is unset, it)2.392 F +(loses its special properties, e)144 132 Q -.15(ve)-.25 G 2.5(ni).15 G +2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E F2 +-.3(BA)108 144 S(SH_ARGC).3 E F1 .935(An array v)144 156 R .935 +(ariable whose v)-.25 F .934 +(alues are the number of parameters in each frame of the current)-.25 F +F2(bash)3.434 E F1 -.15(exe)144 168 S .535(cution call stack.).15 F .535 +(The number of parameters to the current subroutine \(shell function or\ + script)5.535 F -.15(exe)144 180 S .142(cuted with).15 F F2(.)2.642 E F1 +(or)2.642 E F2(sour)2.642 E(ce)-.18 E F1 2.642(\)i)C 2.642(sa)-2.642 G +2.642(tt)-2.642 G .142(he top of the stack.)-2.642 F .141 +(When a subroutine is e)5.141 F -.15(xe)-.15 G .141 +(cuted, the number of).15 F 1.265(parameters passed is pushed onto)144 +192 R F3 -.27(BA)3.765 G(SH_ARGC).27 E/F4 9/Times-Roman@0 SF(.)A F1 +1.265(The shell sets)5.765 F F3 -.27(BA)3.765 G(SH_ARGC).27 E F1 1.265 +(only when in e)3.515 F(x-)-.15 E .948(tended deb)144 204 R .947 +(ugging mode \(see the description of the)-.2 F F2(extdeb)3.447 E(ug)-.2 +E F1 .947(option to the)3.447 F F2(shopt)3.447 E F1 -.2(bu)3.447 G .947 +(iltin belo).2 F(w\).)-.25 E(Setting)144 216 Q F2(extdeb)3.362 E(ug)-.2 +E F1 .862(after the shell has started to e)3.362 F -.15(xe)-.15 G .863 +(cute a script, or referencing this v).15 F .863(ariable when)-.25 F F2 +(extdeb)144 228 Q(ug)-.2 E F1 .706 +(is not set, may result in inconsistent v)3.207 F 3.206 +(alues. Assignments)-.25 F(to)3.206 E F3 -.27(BA)3.206 G(SH_ARGC).27 E +F1(ha)2.956 E 1.006 -.15(ve n)-.2 H 3.206(oe).15 G(f-)-3.206 E +(fect, and it may not be unset.)144 240 Q F2 -.3(BA)108 252 S(SH_ARGV).3 +E F1 .206(An array v)144 264 R .206 +(ariable containing all of the parameters in the current)-.25 F F2(bash) +2.706 E F1 -.15(exe)2.706 G .207(cution call stack.).15 F .207 +(The \214-)5.207 F .567(nal parameter of the last subroutine call is at\ + the top of the stack; the \214rst parameter of the initial)144 276 R +.066(call is at the bottom.)144 288 R .067(When a subroutine is e)5.067 +F -.15(xe)-.15 G .067 +(cuted, the shell pushes the supplied parameters onto).15 F F3 -.27(BA) +144 300 S(SH_ARGV).27 E F4(.)A F1 .854(The shell sets)5.354 F F3 -.27 +(BA)3.354 G(SH_ARGV).27 E F1 .853(only when in e)3.104 F .853 +(xtended deb)-.15 F .853(ugging mode \(see the de-)-.2 F .475 +(scription of the)144 312 R F2(extdeb)2.975 E(ug)-.2 E F1 .475 +(option to the)2.975 F F2(shopt)2.975 E F1 -.2(bu)2.975 G .475 +(iltin belo).2 F 2.975(w\). Setting)-.25 F F2(extdeb)2.976 E(ug)-.2 E F1 +.476(after the shell has)2.976 F .45(started to e)144 324 R -.15(xe)-.15 +G .45(cute a script, or referencing this v).15 F .45(ariable when)-.25 F +F2(extdeb)2.95 E(ug)-.2 E F1 .45(is not set, may result in in-)2.95 F +(consistent v)144 336 Q 2.5(alues. Assignments)-.25 F(to)2.5 E F3 -.27 +(BA)2.5 G(SH_ARGV).27 E F1(ha)2.25 E .3 -.15(ve n)-.2 H 2.5(oe).15 G +-.25(ff)-2.5 G(ect, and it may not be unset.).25 E F2 -.3(BA)108 348 S +(SH_ARGV0).3 E F1 .25(When referenced, this v)144 360 R .25(ariable e) +-.25 F .251 +(xpands to the name of the shell or shell script \(identical to)-.15 F +F2($0)2.751 E F1 2.751(;s)C(ee)-2.751 E .679 +(the description of special parameter 0 abo)144 372 R -.15(ve)-.15 G +3.179(\). Assigning).15 F 3.178(av)3.178 G .678(alue to)-3.428 F F3 -.27 +(BA)3.178 G(SH_ARGV0).27 E F1(sets)2.928 E F2($0)3.178 E F1 .678(to the) +3.178 F .45(same v)144 384 R 2.95(alue. If)-.25 F F3 -.27(BA)2.95 G +(SH_ARGV0).27 E F1 .45(is unset, it loses its special properties, e)2.7 +F -.15(ve)-.25 G 2.951(ni).15 G 2.951(fi)-2.951 G 2.951(ti)-2.951 G +2.951(ss)-2.951 G .451(ubsequently re-)-2.951 F(set.)144 396 Q F2 -.3 +(BA)108 408 S(SH_CMDS).3 E F1 .668(An associati)144 420 R .968 -.15 +(ve a)-.25 H .668(rray v).15 F .668(ariable whose members correspond to\ + the internal hash table of commands)-.25 F .708(as maintained by the) +144 432 R F2(hash)3.208 E F1 -.2(bu)3.208 G 3.208(iltin. Adding).2 F +.708(elements to this array mak)3.208 F .708(es them appear in the hash) +-.1 F .059(table; ho)144 444 R(we)-.25 E -.15(ve)-.25 G .859 -.4(r, u) +.15 H .059(nsetting array elements currently does not remo).4 F .358 +-.15(ve c)-.15 H .058(ommand names from the hash).15 F 2.5(table. If)144 +456 R F3 -.27(BA)2.5 G(SH_CMDS).27 E F1 +(is unset, it loses its special properties, e)2.25 E -.15(ve)-.25 G 2.5 +(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.) +-2.5 E F2 -.3(BA)108 468 S(SH_COMMAND).3 E F1 .21 +(Expands to the command currently being e)144 480 R -.15(xe)-.15 G .21 +(cuted or about to be e).15 F -.15(xe)-.15 G .21 +(cuted, unless the shell is e).15 F -.15(xe)-.15 G(-).15 E .304(cuting \ +a command as the result of a trap, in which case it is the command e)144 +492 R -.15(xe)-.15 G .304(cuting at the time of).15 F .15(the trap.)144 +504 R(If)5.15 E F3 -.27(BA)2.65 G(SH_COMMAND).27 E F1 .15 +(is unset, it loses its special properties, e)2.4 F -.15(ve)-.25 G 2.651 +(ni).15 G 2.651(fi)-2.651 G 2.651(ti)-2.651 G 2.651(ss)-2.651 G .151 +(ubsequently re-)-2.651 F(set.)144 516 Q F2 -.3(BA)108 528 S +(SH_EXECUTION_STRING).3 E F1(The command ar)144 540 Q(gument to the)-.18 +E F22.5 E F1(in)2.5 E -.2(vo)-.4 G(cation option.).2 E F2 -.3(BA) +108 552 S(SH_LINENO).3 E F1 .693(An array v)144 564 R .692(ariable whos\ +e members are the line numbers in source \214les where each correspondi\ +ng)-.25 F .969(member of)144 576 R F3(FUNCN)3.469 E(AME)-.18 E F1 -.1 +(wa)3.219 G 3.469(si).1 G -1.9 -.4(nv o)-3.469 H -.1(ke).4 G(d.).1 E F2 +(${B)5.969 E(ASH_LINENO[)-.3 E F0($i)A F2(]})A F1 .97 +(is the line number in the source)3.469 F 14.672(\214le \()144 588 R F2 +(${B)A(ASH_SOURCE[)-.3 E F0($i+1)A F2(]})A F1 17.172(\)w)C(here)-17.172 +E F2(${FUNCN)17.172 E(AME[)-.2 E F0($i)A F2(]})A F1 -.1(wa)17.172 G +17.171(sc).1 G 14.671(alled \(or)-17.171 F F2(${B)144 600 Q(ASH_LINENO[) +-.3 E F0($i\2551)A F2(]})A F1 1.256 +(if referenced within another shell function\).)3.756 F(Use)6.257 E F3 +(LINENO)3.757 E F1 1.257(to obtain)3.507 F(the current line number)144 +612 Q 5(.A)-.55 G(ssignments to)-5 E F3 -.27(BA)2.5 G(SH_LINENO).27 E F1 +(ha)2.25 E .3 -.15(ve n)-.2 H 2.5(oe).15 G -.25(ff)-2.5 G +(ect, and it may not be unset.).25 E F2 -.3(BA)108 624 S(SH_LO).3 E(AD) +-.4 E(ABLES_P)-.35 E -.95(AT)-.74 G(H).95 E F1 3.287(Ac)144 636 S .786 +(olon-separated list of directories in which the)-3.287 F F2(enable) +3.286 E F1 3.286(command. looks)3.286 F .786(for dynamically load-)3.286 +F(able b)144 648 Q(uiltins.)-.2 E F2 -.3(BA)108 660 S(SH_MONOSECONDS).3 +E F1 .706(Each time this v)144 672 R .706(ariable is referenced, it e) +-.25 F .707(xpands to the v)-.15 F .707(alue returned by the system') +-.25 F 3.207(sm)-.55 G(onotonic)-3.207 E .058(clock, if one is a)144 684 +R -.25(va)-.2 G 2.558(ilable. If).25 F .057 +(there is no monotonic clock, this is equi)2.557 F -.25(va)-.25 G .057 +(lent to).25 F F2(EPOCHSECONDS)2.557 E F1(.)A(If)144 696 Q F3 -.27(BA) +2.5 G(SH_MONOSECONDS).27 E F1 +(is unset, it loses its special properties, e)2.25 E -.15(ve)-.25 G 2.5 +(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.) +-2.5 E(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(12)185.955 E 0 +Cg EP +%%Page: 13 13 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF -.3(BA)108 84 S(SH_REMA).3 E +(TCH)-.95 E F1 1.418(An array v)144 96 R 1.418 +(ariable whose members are assigned by the)-.25 F F2<3d01>3.918 E F1 +1.418(binary operator to the)3.918 F F2([[)3.918 E F1(conditional)3.918 +E 3.462(command. The)144 108 R .962(element with inde)3.462 F 3.462(x0i) +-.15 G 3.462(st)-3.462 G .962 +(he portion of the string matching the entire re)-3.462 F .961(gular e) +-.15 F(x-)-.15 E 3.82(pression. The)144 120 R 1.32(element with inde) +3.82 F(x)-.15 E F0(n)3.82 E F1 1.32 +(is the portion of the string matching the)3.82 F F0(n)3.82 E F1 1.32 +(th parenthesized)B(sube)144 132 Q(xpression.)-.15 E F2 -.3(BA)108 144 S +(SH_SOURCE).3 E F1 .126(An array v)144 156 R .125(ariable whose members\ + are the source \214lenames where the corresponding shell function)-.25 +F .78(names in the)144 168 R/F3 9/Times-Bold@0 SF(FUNCN)3.28 E(AME)-.18 +E F1 .78(array v)3.03 F .78(ariable are de\214ned.)-.25 F .78 +(The shell function)5.78 F F2(${FUNCN)3.281 E(AME[)-.2 E F0($i)A F2(]})A +F1(is)3.281 E .425(de\214ned in the \214le)144 180 R F2(${B)2.925 E +(ASH_SOURCE[)-.3 E F0($i)A F2(]})A F1 .424(and called from)2.924 F F2 +(${B)2.924 E(ASH_SOURCE[)-.3 E F0($i+1)A F2(]})A F1 5.424(.A)C(ssign-) +-5.424 E(ments to)144 192 Q F3 -.27(BA)2.5 G(SH_SOURCE).27 E F1(ha)2.25 +E .3 -.15(ve n)-.2 H 2.5(oe).15 G -.25(ff)-2.5 G +(ect, and it may not be unset.).25 E F2 -.3(BA)108 204 S(SH_SUBSHELL).3 +E F1 .296(Incremented by one within each subshell or subshell en)144 216 +R .296(vironment when the shell be)-.4 F .297(gins e)-.15 F -.15(xe)-.15 +G(cuting).15 E .233(in that en)144 228 R 2.732(vironment. The)-.4 F .232 +(initial v)2.732 F .232(alue is 0.)-.25 F(If)5.232 E F3 -.27(BA)2.732 G +(SH_SUBSHELL).27 E F1 .232(is unset, it loses its special prop-)2.482 F +(erties, e)144 240 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti) +-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E F2 -.3(BA)108 252 S +(SH_TRAPSIG).3 E F1 .203 +(Set to the signal number corresponding to the trap action being e)144 +264 R -.15(xe)-.15 G .203(cuted during its e).15 F -.15(xe)-.15 G 2.703 +(cution. See).15 F .783(the description of)144 276 R F2(trap)3.282 E F1 +(under)3.282 E F3 .782(SHELL B)3.282 F(UIL)-.09 E .782(TIN COMMANDS) +-.828 F F1(belo)3.032 E 3.282(wf)-.25 G .782 +(or information about signal)-3.282 F(numbers and trap e)144 288 Q -.15 +(xe)-.15 G(cution.).15 E F2 -.3(BA)108 300 S(SH_VERSINFO).3 E F1 2.644 +(Ar)144 312 S .144(eadonly array v)-2.644 F .144 +(ariable whose members hold v)-.25 F .144 +(ersion information for this instance of)-.15 F F2(bash)2.645 E F1 5.145 +(.T)C(he)-5.145 E -.25(va)144 324 S +(lues assigned to the array members are as follo).25 E(ws:)-.25 E F2 -.3 +(BA)144 336 S(SH_VERSINFO[).3 E F1(0)A F2(])A F1(The major v)264 336 Q +(ersion number \(the)-.15 E F0 -.37(re)2.5 G(lease).37 E F1(\).)A F2 -.3 +(BA)144 348 S(SH_VERSINFO[).3 E F1(1)A F2(])A F1(The minor v)264 348 Q +(ersion number \(the)-.15 E F0(ver)2.5 E(sion)-.1 E F1(\).)A F2 -.3(BA) +144 360 S(SH_VERSINFO[).3 E F1(2)A F2(])A F1(The patch le)264 360 Q -.15 +(ve)-.25 G(l.).15 E F2 -.3(BA)144 372 S(SH_VERSINFO[).3 E F1(3)A F2(])A +F1(The b)264 372 Q(uild v)-.2 E(ersion.)-.15 E F2 -.3(BA)144 384 S +(SH_VERSINFO[).3 E F1(4)A F2(])A F1(The release status \(e.g.,)264 384 Q +F0(beta)2.5 E F1(\).)A F2 -.3(BA)144 396 S(SH_VERSINFO[).3 E F1(5)A F2 +(])A F1(The v)264 396 Q(alue of)-.25 E F3(MA)2.5 E(CHTYPE)-.495 E/F4 9 +/Times-Roman@0 SF(.)A F2 -.3(BA)108 408 S(SH_VERSION).3 E F1 +(Expands to a string describing the v)144 420 Q +(ersion of this instance of)-.15 E F2(bash)2.5 E F1 +(\(e.g., 5.2.37\(3\)-release\).)2.5 E F2(COMP_CW)108 432 Q(ORD)-.1 E F1 +.397(An inde)144 444 R 2.897(xi)-.15 G(nto)-2.897 E F2(${COMP_W)2.896 E +(ORDS})-.1 E F1 .396(of the w)2.896 F .396 +(ord containing the current cursor position.)-.1 F .396(This v)5.396 F +(ari-)-.25 E 1.18(able is a)144 456 R -.25(va)-.2 G 1.181 +(ilable only in shell functions in).25 F -.2(vo)-.4 G -.1(ke).2 G 3.681 +(db).1 G 3.681(yt)-3.681 G 1.181(he programmable completion f)-3.681 F +1.181(acilities \(see)-.1 F F2(Pr)144 468 Q(ogrammable Completion)-.18 E +F1(belo)2.5 E(w\).)-.25 E F2(COMP_KEY)108 480 Q F1 .017(The k)144 492 R +.317 -.15(ey \()-.1 H .017(or \214nal k).15 F .317 -.15(ey o)-.1 H 2.517 +(fak).15 G .317 -.15(ey s)-2.617 H .016(equence\) used to in).15 F -.2 +(vo)-.4 G .216 -.1(ke t).2 H .016(he current completion function.).1 F +.016(This v)5.016 F(ari-)-.25 E 1.612(able is a)144 504 R -.25(va)-.2 G +1.612(ilable only in shell functions and e).25 F 1.612 +(xternal commands in)-.15 F -.2(vo)-.4 G -.1(ke).2 G 4.113(db).1 G 4.113 +(yt)-4.113 G 1.613(he programmable)-4.113 F(completion f)144 516 Q +(acilities \(see)-.1 E F2(Pr)2.5 E(ogrammable Completion)-.18 E F1(belo) +2.5 E(w\).)-.25 E F2(COMP_LINE)108 528 Q F1 1.208 +(The current command line.)144 540 R 1.208(This v)6.208 F 1.208 +(ariable is a)-.25 F -.25(va)-.2 G 1.208 +(ilable only in shell functions and e).25 F 1.207(xternal com-)-.15 F +1.037(mands in)144 552 R -.2(vo)-.4 G -.1(ke).2 G 3.537(db).1 G 3.537 +(yt)-3.537 G 1.037(he programmable completion f)-3.537 F 1.037 +(acilities \(see)-.1 F F2(Pr)3.537 E 1.037(ogrammable Completion)-.18 F +F1(be-)3.537 E(lo)144 564 Q(w\).)-.25 E F2(COMP_POINT)108 576 Q F1 .667 +(The inde)144 588 R 3.167(xo)-.15 G 3.167(ft)-3.167 G .666 +(he current cursor position relati)-3.167 F .966 -.15(ve t)-.25 H 3.166 +(ot).15 G .666(he be)-3.166 F .666(ginning of the current command.)-.15 +F .666(If the)5.666 F .534 +(current cursor position is at the end of the current command, the v)144 +600 R .535(alue of this v)-.25 F .535(ariable is equal to)-.25 F F2 +(${#COMP_LINE})144 612 Q F1 5.705(.T)C .705(his v)-5.705 F .704 +(ariable is a)-.25 F -.25(va)-.2 G .704 +(ilable only in shell functions and e).25 F .704(xternal commands in-) +-.15 F -.2(vo)144 624 S -.1(ke).2 G 2.5(db).1 G 2.5(yt)-2.5 G +(he programmable completion f)-2.5 E(acilities \(see)-.1 E F2(Pr)2.5 E +(ogrammable Completion)-.18 E F1(belo)2.5 E(w\).)-.25 E F2(COMP_TYPE)108 +636 Q F1 .041(Set to an inte)144 648 R .041(ger v)-.15 F .041(alue corr\ +esponding to the type of attempted completion that caused a completion) +-.25 F .338(function to be called:)144 660 R F0 -.5(TA)2.837 G(B).5 E F1 +2.837(,f)C .337(or normal completion,)-2.837 F F0(?)2.837 E F1 2.837(,f) +C .337(or listing completions after successi)-2.837 F .637 -.15(ve t) +-.25 H(abs,).15 E F0(!)144 672 Q F1 3.067(,f)C .567 +(or listing alternati)-3.067 F -.15(ve)-.25 G 3.067(so).15 G 3.067(np) +-3.067 G .567(artial w)-3.067 F .567(ord completion,)-.1 F F0(@)3.067 E +F1 3.067(,t)C 3.067(ol)-3.067 G .567(ist completions if the w)-3.067 F +.567(ord is not un-)-.1 F .418(modi\214ed, or)144 684 R F0(%)2.918 E F1 +2.918(,f)C .418(or menu completion.)-2.918 F .417(This v)5.417 F .417 +(ariable is a)-.25 F -.25(va)-.2 G .417 +(ilable only in shell functions and e).25 F(xter)-.15 E(-)-.2 E .704 +(nal commands in)144 696 R -.2(vo)-.4 G -.1(ke).2 G 3.204(db).1 G 3.204 +(yt)-3.204 G .704(he programmable completion f)-3.204 F .704 +(acilities \(see)-.1 F F2(Pr)3.204 E .704(ogrammable Comple-)-.18 F +(tion)144 708 Q F1(belo)2.5 E(w\).)-.25 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(13)185.955 E 0 Cg EP +%%Page: 14 14 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(COMP_W)108 84 Q(ORDBREAKS)-.1 +E F1 1.336(The set of characters that the)144 96 R F2 -.18(re)3.836 G +(adline).18 E F1 1.336(library treats as w)3.836 F 1.335 +(ord separators when performing w)-.1 F(ord)-.1 E 3.125(completion. If) +144 108 R/F3 9/Times-Bold@0 SF(COMP_W)3.125 E(ORDBREAKS)-.09 E F1 .626 +(is unset, it loses its special properties, e)2.875 F -.15(ve)-.25 G +3.126(ni).15 G 3.126(fi)-3.126 G 3.126(ti)-3.126 G 3.126(ss)-3.126 G +(ubse-)-3.126 E(quently reset.)144 120 Q F2(COMP_W)108 132 Q(ORDS)-.1 E +F1 .654(An array v)144 144 R .654(ariable \(see)-.25 F F2(Arrays)3.154 E +F1(belo)3.154 E .654(w\) consisting of the indi)-.25 F .653(vidual w) +-.25 F .653(ords in the current command)-.1 F 3.191(line. The)144 156 R +.692(line is split into w)3.192 F .692(ords as)-.1 F F2 -.18(re)3.192 G +(adline).18 E F1 -.1(wo)3.192 G .692(uld split it, using).1 F F3(COMP_W) +3.192 E(ORDBREAKS)-.09 E F1 .692(as de-)2.942 F 1.558(scribed abo)144 +168 R -.15(ve)-.15 G 6.558(.T).15 G 1.558(his v)-6.558 F 1.558 +(ariable is a)-.25 F -.25(va)-.2 G 1.558 +(ilable only in shell functions in).25 F -.2(vo)-.4 G -.1(ke).2 G 4.057 +(db).1 G 4.057(yt)-4.057 G 1.557(he programmable)-4.057 F(completion f) +144 180 Q(acilities \(see)-.1 E F2(Pr)2.5 E(ogrammable Completion)-.18 E +F1(belo)2.5 E(w\).)-.25 E F2(COPR)108 192 Q(OC)-.3 E F1 .168(An array v) +144 204 R .168(ariable \(see)-.25 F F2(Arrays)2.668 E F1(belo)2.669 E +.169 +(w\) created to hold the \214le descriptors for output from and input) +-.25 F(to an unnamed coprocess \(see)144 216 Q F2(Copr)2.5 E(ocesses) +-.18 E F1(abo)2.5 E -.15(ve)-.15 G(\).).15 E F2(DIRST)108 228 Q -.55(AC) +-.9 G(K).55 E F1 .79(An array v)144 240 R .79(ariable \(see)-.25 F F2 +(Arrays)3.29 E F1(belo)3.289 E .789 +(w\) containing the current contents of the directory stack.)-.25 F(Di-) +5.789 E .099(rectories appear in the stack in the order the)144 252 R +2.599(ya)-.15 G .099(re displayed by the)-2.599 F F2(dirs)2.599 E F1 -.2 +(bu)2.599 G 2.599(iltin. Assigning).2 F .099(to mem-)2.599 F .84 +(bers of this array v)144 264 R .84 +(ariable may be used to modify directories already in the stack, b)-.25 +F .84(ut the)-.2 F F2(pushd)3.34 E F1(and)144 276 Q F2(popd)2.714 E F1 +-.2(bu)2.714 G .214(iltins must be used to add and remo).2 F .514 -.15 +(ve d)-.15 H 2.715(irectories. Assigning).15 F .215(to this v)2.715 F +.215(ariable does not)-.25 F .118(change the current directory)144 288 R +5.118(.I)-.65 G(f)-5.118 E F3(DIRST)2.617 E -.495(AC)-.81 G(K).495 E F1 +.117(is unset, it loses its special properties, e)2.367 F -.15(ve)-.25 G +2.617(ni).15 G 2.617(fi)-2.617 G 2.617(ti)-2.617 G 2.617(ss)-2.617 G +(ub-)-2.617 E(sequently reset.)144 300 Q F2(EPOCHREAL)108 312 Q(TIME) +-.92 E F1 .337(Each time this parameter is referenced, it e)144 324 R +.338(xpands to the number of seconds since the Unix Epoch)-.15 F(\(see) +144 336 Q F0(time)2.981 E F1 .351(\(3\)\) as a \215oating-point v).18 F +.351(alue with micro-second granularity)-.25 F 5.35(.A)-.65 G .35 +(ssignments to)-5.35 F F3(EPOCHRE-)2.85 E(AL)144 348 Q(TIME)-.828 E F1 +1.09(are ignored.)3.34 F(If)6.09 E F3(EPOCHREAL)3.59 E(TIME)-.828 E F1 +1.09(is unset, it loses its special properties, e)3.34 F -.15(ve)-.25 G +3.591(ni).15 G 3.591(fi)-3.591 G 3.591(ti)-3.591 G(s)-3.591 E +(subsequently reset.)144 360 Q F2(EPOCHSECONDS)108 372 Q F1 .338 +(Each time this parameter is referenced, it e)144 384 R .337 +(xpands to the number of seconds since the Unix Epoch)-.15 F(\(see)144 +396 Q F0(time)4.143 E F1 4.013(\(3\)\). Assignments).18 F(to)4.013 E F3 +(EPOCHSECONDS)4.013 E F1 1.513(are ignored.)3.763 F(If)6.514 E F3 +(EPOCHSECONDS)4.014 E F1 1.514(is unset, it)3.764 F +(loses its special properties, e)144 408 Q -.15(ve)-.25 G 2.5(ni).15 G +2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E F2 +(EUID)108 420 Q F1 1.104(Expands to the ef)144 420 R(fecti)-.25 E 1.403 +-.15(ve u)-.25 H 1.103(ser ID of the current user).15 F 3.603(,i)-.4 G +1.103(nitialized at shell startup.)-3.603 F 1.103(This v)6.103 F 1.103 +(ariable is)-.25 F(readonly)144 432 Q(.)-.65 E F2(FUNCN)108 444 Q(AME) +-.2 E F1 .478(An array v)144 456 R .479 +(ariable containing the names of all shell functions currently in the e) +-.25 F -.15(xe)-.15 G .479(cution call stack.).15 F .277 +(The element with inde)144 468 R 2.777(x0i)-.15 G 2.777(st)-2.777 G .276 +(he name of an)-2.777 F 2.776(yc)-.15 G(urrently-e)-2.776 E -.15(xe)-.15 +G .276(cuting shell function.).15 F .276(The bottom-most)5.276 F .065 +(element \(the one with the highest inde)144 480 R .065 +(x\) is \231main\232.)-.15 F .065(This v)5.065 F .065(ariable e)-.25 F +.065(xists only when a shell function)-.15 F .003(is e)144 492 R -.15 +(xe)-.15 G 2.503(cuting. Assignments).15 F(to)2.503 E F3(FUNCN)2.503 E +(AME)-.18 E F1(ha)2.252 E .302 -.15(ve n)-.2 H 2.502(oe).15 G -.25(ff) +-2.502 G 2.502(ect. If).25 F F3(FUNCN)2.502 E(AME)-.18 E F1 .002 +(is unset, it loses its spe-)2.252 F(cial properties, e)144 504 Q -.15 +(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G +(ubsequently reset.)-2.5 E 4.584(This v)144 520.8 R 4.584 +(ariable can be used with)-.25 F F3 -.27(BA)7.084 G(SH_LINENO).27 E F1 +(and)6.834 E F3 -.27(BA)7.085 G(SH_SOURCE).27 E/F4 9/Times-Roman@0 SF(.) +A F1 4.585(Each element of)9.085 F F3(FUNCN)144 532.8 Q(AME)-.18 E F1 +.733(has corresponding elements in)2.983 F F3 -.27(BA)3.233 G(SH_LINENO) +.27 E F1(and)2.983 E F3 -.27(BA)3.233 G(SH_SOURCE).27 E F1 .733 +(to describe the)2.983 F .012(call stack.)144 544.8 R -.15(Fo)5.012 G +2.512(ri).15 G(nstance,)-2.512 E F2(${FUNCN)2.512 E(AME[)-.2 E F0($i)A +F2(]})A F1 -.1(wa)2.512 G 2.512(sc).1 G .012(alled from the \214le) +-2.512 F F2(${B)2.512 E(ASH_SOURCE[)-.3 E F0($i+1)A F2(]})A F1 1.184 +(at line number)144 556.8 R F2(${B)3.684 E(ASH_LINENO[)-.3 E F0($i)A F2 +(]})A F1 6.184(.T)C(he)-6.184 E F2(caller)3.683 E F1 -.2(bu)3.683 G +1.183(iltin displays the current call stack using).2 F +(this information.)144 568.8 Q F2(GR)108 580.8 Q(OUPS)-.3 E F1 1.228 +(An array v)144 592.8 R 1.228(ariable containing the list of groups of \ +which the current user is a member)-.25 F 6.229(.A)-.55 G(ssign-)-6.229 +E .572(ments to)144 604.8 R F3(GR)3.072 E(OUPS)-.27 E F1(ha)2.822 E .872 +-.15(ve n)-.2 H 3.072(oe).15 G -.25(ff)-3.072 G 3.072(ect. If).25 F F3 +(GR)3.072 E(OUPS)-.27 E F1 .572 +(is unset, it loses its special properties, e)2.822 F -.15(ve)-.25 G +3.072(ni).15 G 3.071(fi)-3.072 G 3.071(ti)-3.071 G(s)-3.071 E +(subsequently reset.)144 616.8 Q F2(HISTCMD)108 628.8 Q F1 2.81 +(The history number)144 640.8 R 5.31(,o)-.4 G 5.31(ri)-5.31 G(nde)-5.31 +E 5.311(xi)-.15 G 5.311(nt)-5.311 G 2.811 +(he history list, of the current command.)-5.311 F 2.811(Assignments to) +7.811 F F3(HISTCMD)144 652.8 Q F1(ha)2.684 E .734 -.15(ve n)-.2 H 2.934 +(oe).15 G -.25(ff)-2.934 G 2.934(ect. If).25 F F3(HISTCMD)2.934 E F1 +.434(is unset, it loses its special properties, e)2.684 F -.15(ve)-.25 G +2.934(ni).15 G 2.934(fi)-2.934 G 2.933(ti)-2.934 G 2.933(ss)-2.933 G +(ubse-)-2.933 E(quently reset.)144 664.8 Q F2(HOSTN)108 676.8 Q(AME)-.2 +E F1(Automatically set to the name of the current host.)144 688.8 Q F2 +(HOSTTYPE)108 700.8 Q F1 .222(Automatically set to a string that unique\ +ly describes the type of machine on which)144 712.8 R F2(bash)2.723 E F1 +.223(is e)2.723 F -.15(xe)-.15 G(cut-).15 E 2.5(ing. The)144 724.8 R +(def)2.5 E(ault is system-dependent.)-.1 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(14)185.955 E 0 Cg EP +%%Page: 15 15 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(LINENO)108 84 Q F1 1.408(Eac\ +h time this parameter is referenced, the shell substitutes a decimal nu\ +mber representing the)144 96 R .078(current sequential line number \(st\ +arting with 1\) within a script or function.)144 108 R .079 +(When not in a script or)5.078 F .307(function, the v)144 120 R .307 +(alue substituted is not guaranteed to be meaningful.)-.25 F(If)5.306 E +/F3 9/Times-Bold@0 SF(LINENO)2.806 E F1 .306(is unset, it loses its) +2.556 F(special properties, e)144 132 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5 +(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E F2(MA) +108 144 Q(CHTYPE)-.55 E F1 .898(Automatically set to a string that full\ +y describes the system type on which)144 156 R F2(bash)3.398 E F1 .899 +(is e)3.398 F -.15(xe)-.15 G .899(cuting, in).15 F(the standard GNU)144 +168 Q F0(cpu-company-system)2.5 E F1 2.5(format. The)2.5 F(def)2.5 E +(ault is system-dependent.)-.1 E F2(MAPFILE)108 180 Q F1 .294 +(An array v)144 192 R .294(ariable \(see)-.25 F F2(Arrays)2.794 E F1 +(belo)2.794 E .294(w\) created to hold the te)-.25 F .293 +(xt read by the)-.15 F F2(map\214le)2.793 E F1 -.2(bu)2.793 G .293 +(iltin when no).2 F -.25(va)144 204 S(riable name is supplied.).25 E F2 +(OLDPWD)108 216 Q F1(The pre)144 228 Q(vious w)-.25 E +(orking directory as set by the)-.1 E F2(cd)2.5 E F1(command.)2.5 E F2 +(OPT)108 240 Q(ARG)-.9 E F1 1.626(The v)144 252 R 1.627 +(alue of the last option ar)-.25 F 1.627(gument processed by the)-.18 F +F2(getopts)4.127 E F1 -.2(bu)4.127 G 1.627(iltin command \(see).2 F F3 +(SHELL)4.127 E -.09(BU)144 264 S(IL).09 E(TIN COMMANDS)-.828 E F1(belo) +2.25 E(w\).)-.25 E F2(OPTIND)108 276 Q F1 1.652(The inde)144 288 R 4.152 +(xo)-.15 G 4.152(ft)-4.152 G 1.652(he ne)-4.152 F 1.652(xt ar)-.15 F +1.652(gument to be processed by the)-.18 F F2(getopts)4.151 E F1 -.2(bu) +4.151 G 1.651(iltin command \(see).2 F F3(SHELL)4.151 E -.09(BU)144 300 +S(IL).09 E(TIN COMMANDS)-.828 E F1(belo)2.25 E(w\).)-.25 E F2(OSTYPE)108 +312 Q F1 .329(Automatically set to a string that describes the operatin\ +g system on which)144 324 R F2(bash)2.83 E F1 .33(is e)2.83 F -.15(xe) +-.15 G 2.83(cuting. The).15 F(def)144 336 Q(ault is system-dependent.) +-.1 E F2(PIPEST)108 348 Q -.95(AT)-.9 G(US).95 E F1 .297(An array v)144 +360 R .297(ariable \(see)-.25 F F2(Arrays)2.797 E F1(belo)2.797 E .297 +(w\) containing a list of e)-.25 F .297(xit status v)-.15 F .297 +(alues from the commands in)-.25 F 1.601(the most-recently-e)144 372 R +-.15(xe)-.15 G 1.601(cuted fore).15 F 1.602 +(ground pipeline, which may consist of only a simple command)-.15 F +(\(see)144 384 Q F3 .216(SHELL GRAMMAR)2.716 F F1(abo)2.465 E -.15(ve) +-.15 G(\).).15 E F2(Bash)5.215 E F1(sets)2.715 E F3(PIPEST)2.715 E -.855 +(AT)-.81 G(US).855 E F1 .215(after e)2.465 F -.15(xe)-.15 G .215 +(cuting multi-element pipelines,).15 F .333(timed and ne)144 396 R -.05 +(ga)-.15 G .333 +(ted pipelines, simple commands, subshells created with the \( operator) +.05 F 2.834(,t)-.4 G(he)-2.834 E F2([[)2.834 E F1(and)2.834 E F2(\(\() +2.834 E F1 .489(compound commands, and after error conditions that resu\ +lt in the shell aborting command e)144 408 R -.15(xe)-.15 G(cu-).15 E +(tion.)144 420 Q F2(PPID)108 432 Q F1(The process ID of the shell')144 +432 Q 2.5(sp)-.55 G 2.5(arent. This)-2.5 F -.25(va)2.5 G +(riable is readonly).25 E(.)-.65 E F2(PWD)108 444 Q F1(The current w)144 +444 Q(orking directory as set by the)-.1 E F2(cd)2.5 E F1(command.)2.5 E +F2(RANDOM)108 456 Q F1 .417 +(Each time this parameter is referenced, it e)144 468 R .417 +(xpands to a random inte)-.15 F .417(ger between 0 and 32767.)-.15 F +(As-)5.417 E .125(signing a v)144 480 R .125(alue to)-.25 F F3(RANDOM) +2.625 E F1 .124(initializes \(seeds\) the sequence of random numbers.) +2.374 F .124(Seeding the ran-)5.124 F 1.343 +(dom number generator with the same constant v)144 492 R 1.344 +(alue produces the same sequence of v)-.25 F 3.844(alues. If)-.25 F F3 +(RANDOM)144 504 Q F1(is unset, it loses its special properties, e)2.25 E +-.15(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G +(ubsequently reset.)-2.5 E F2(READLINE_ARGUMENT)108 516 Q F1(An)144 528 +Q 4.665(yn)-.15 G 2.165(umeric ar)-4.665 F 2.165(gument gi)-.18 F -.15 +(ve)-.25 G 4.665(nt).15 G 4.665(oa)-4.665 G F2 -.18(re)C(adline).18 E F1 +2.165(command that w)4.665 F 2.165 +(as de\214ned using \231bind \255x\232 \(see)-.1 F F3(SHELL B)144 540 Q +(UIL)-.09 E(TIN COMMANDS)-.828 E F1(belo)2.25 E(w\) when it w)-.25 E +(as in)-.1 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E F2(READLINE_LINE)108 552 Q +F1 1.693(The contents of the)144 564 R F2 -.18(re)4.193 G(adline).18 E +F1 1.693(line b)4.193 F(uf)-.2 E(fer)-.25 E 4.193(,f)-.4 G 1.694 +(or use with \231bind \255x\232 \(see)-4.193 F F3 1.694(SHELL B)4.194 F +(UIL)-.09 E 1.694(TIN COM-)-.828 F(MANDS)144 576 Q F1(belo)2.25 E(w\).) +-.25 E F2(READLINE_MARK)108 588 Q F1 .236(The position of the mark \(sa) +144 600 R -.15(ve)-.2 G 2.736(di).15 G .236(nsertion point\) in the) +-2.736 F F2 -.18(re)2.736 G(adline).18 E F1 .236(line b)2.736 F(uf)-.2 E +(fer)-.25 E 2.736(,f)-.4 G .236(or use with \231bind \255x\232)-2.736 F +(\(see)144 612 Q F3 1.016(SHELL B)3.516 F(UIL)-.09 E 1.016(TIN COMMANDS) +-.828 F F1(belo)3.266 E 3.516(w\). The)-.25 F 1.017 +(characters between the insertion point and the)3.516 F +(mark are often called the)144 624 Q F0 -.37(re)2.5 G(gion)-.03 E F1(.)A +F2(READLINE_POINT)108 636 Q F1 .443 +(The position of the insertion point in the)144 648 R F2 -.18(re)2.943 G +(adline).18 E F1 .443(line b)2.943 F(uf)-.2 E(fer)-.25 E 2.943(,f)-.4 G +.442(or use with \231bind \255x\232 \(see)-2.943 F F3(SHELL)2.942 E -.09 +(BU)144 660 S(IL).09 E(TIN COMMANDS)-.828 E F1(belo)2.25 E(w\).)-.25 E +F2(REPL)108 672 Q(Y)-.92 E F1(Set to the line of input read by the)144 +684 Q F2 -.18(re)2.5 G(ad).18 E F1 -.2(bu)2.5 G +(iltin command when no ar).2 E(guments are supplied.)-.18 E F2(SECONDS) +108 696 Q F1 .177(Each time this parameter is referenced, it e)144 708 R +.178(xpands to the number of seconds since shell in)-.15 F -.2(vo)-.4 G +(cation.).2 E .713(If a v)144 720 R .712(alue is assigned to)-.25 F F3 +(SECONDS)3.212 E/F4 9/Times-Roman@0 SF(,)A F1 .712(the v)2.962 F .712 +(alue returned upon subsequent references is the number)-.25 F +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(15)185.955 E 0 Cg EP +%%Page: 16 16 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .627(of seconds since the assignment plus the v)144 +84 R .627(alue assigned.)-.25 F .628(The number of seconds at shell in) +5.627 F -.2(vo)-.4 G(ca-).2 E .364(tion and the current time are al)144 +96 R -.1(wa)-.1 G .363 +(ys determined by querying the system clock at one-second reso-).1 F 2.5 +(lution. If)144 108 R/F2 9/Times-Bold@0 SF(SECONDS)2.5 E F1 +(is unset, it loses its special properties, e)2.25 E -.15(ve)-.25 G 2.5 +(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.) +-2.5 E/F3 10/Times-Bold@0 SF(SHELLOPTS)108 120 Q F1 3.262(Ac)144 132 S +.763(olon-separated list of enabled shell options.)-3.262 F .763(Each w) +5.763 F .763(ord in the list is a v)-.1 F .763(alid ar)-.25 F .763 +(gument for the)-.18 F F3144 144 Q F1 1.174(option to the)3.674 F +F3(set)3.674 E F1 -.2(bu)3.674 G 1.174(iltin command \(see).2 F F2 1.173 +(SHELL B)3.673 F(UIL)-.09 E 1.173(TIN COMMANDS)-.828 F F1(belo)3.423 E +3.673(w\). The)-.25 F(options)3.673 E .019(appearing in)144 156 R F2 +(SHELLOPTS)2.519 E F1 .019(are those reported as)2.269 F F0(on)2.749 E +F1(by)2.759 E F3 .019(set \255o)2.519 F F1 5.019(.I)C 2.519(ft)-5.019 G +.019(his v)-2.519 F .02(ariable is in the en)-.25 F(vironment)-.4 E +(when)144 168 Q F3(bash)2.766 E F1 .266 +(starts up, the shell enables each option in the list before reading an) +2.766 F 2.766(ys)-.15 G .265(tartup \214les.)-2.766 F(This)5.265 E -.25 +(va)144 180 S(riable is read-only).25 E(.)-.65 E F3(SHL)108 192 Q(VL) +-.92 E F1(Incremented by one each time an instance of)144 204 Q F3(bash) +2.5 E F1(is started.)2.5 E F3(SRANDOM)108 216 Q F1 .561 +(Each time it is referenced, this v)144 228 R .561(ariable e)-.25 F .562 +(xpands to a 32-bit pseudo-random number)-.15 F 5.562(.T)-.55 G .562 +(he random)-5.562 F .65 +(number generator is not linear on systems that support)144 240 R F0 +(/de)4.816 E(v/ur)-.15 E(andom)-.15 E F1(or)4.816 E F0(ar)3.48 E(c4r) +-.37 E(andom)-.15 E F1 .649(\(3\), so each).32 F .788 +(returned number has no relationship to the numbers preceding it.)144 +252 R .788(The random number generator)5.788 F .088 +(cannot be seeded, so assignments to this v)144 264 R .087(ariable ha) +-.25 F .387 -.15(ve n)-.2 H 2.587(oe).15 G -.25(ff)-2.587 G 2.587 +(ect. If).25 F F2(SRANDOM)2.587 E F1 .087(is unset, it loses its)2.337 F +(special properties, e)144 276 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 +G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E F3(UID)108 288 Q +F1(Expands to the user ID of the current user)144 288 Q 2.5(,i)-.4 G +(nitialized at shell startup.)-2.5 E(This v)5 E(ariable is readonly)-.25 +E(.)-.65 E .114(The shell uses the follo)108 304.8 R .114(wing v)-.25 F +.114(ariables. In some cases,)-.25 F F3(bash)2.614 E F1 .115 +(assigns a def)2.614 F .115(ault v)-.1 F .115(alue to a v)-.25 F .115 +(ariable; these cases)-.25 F(are noted belo)108 316.8 Q -.65(w.)-.25 G +F3 -.3(BA)108 333.6 S(SH_COMP).3 E -.95(AT)-.74 G F1 .503(The v)144 +345.6 R .502(alue is used to set the shell')-.25 F 3.002(sc)-.55 G .502 +(ompatibility le)-3.002 F -.15(ve)-.25 G 3.002(l. See).15 F F2 .502 +(SHELL COMP)3.002 F -.855(AT)-.666 G .502(IBILITY MODE).855 F F1(be-) +2.752 E(lo)144 357.6 Q 2.662(wf)-.25 G .162(or a description of the v) +-2.662 F .162(arious compatibility le)-.25 F -.15(ve)-.25 G .162 +(ls and their ef).15 F 2.663(fects. The)-.25 F -.25(va)2.663 G .163 +(lue may be a dec-).25 F .33(imal number \(e.g., 4.2\) or an inte)144 +369.6 R .33 +(ger \(e.g., 42\) corresponding to the desired compatibility le)-.15 F +-.15(ve)-.25 G 2.83(l. If).15 F F2 -.27(BA)144 381.6 S(SH_COMP).27 E +-.855(AT)-.666 G F1 .431 +(is unset or set to the empty string, the compatibility le)3.536 F -.15 +(ve)-.25 G 2.931(li).15 G 2.931(ss)-2.931 G .431(et to the def)-2.931 F +.432(ault for)-.1 F .654(the current v)144 393.6 R 3.154(ersion. If)-.15 +F F2 -.27(BA)3.154 G(SH_COMP).27 E -.855(AT)-.666 G F1 .654 +(is set to a v)3.759 F .653(alue that is not one of the v)-.25 F .653 +(alid compatibility)-.25 F(le)144 405.6 Q -.15(ve)-.25 G .585 +(ls, the shell prints an error message and sets the compatibility le).15 +F -.15(ve)-.25 G 3.085(lt).15 G 3.085(ot)-3.085 G .585(he def)-3.085 F +.585(ault for the cur)-.1 F(-)-.2 E .724(rent v)144 417.6 R 3.224 +(ersion. A)-.15 F .724(subset of the v)3.224 F .724(alid v)-.25 F .723 +(alues correspond to the compatibility le)-.25 F -.15(ve)-.25 G .723 +(ls described belo).15 F(w)-.25 E(under)144 429.6 Q F2 .144(SHELL COMP) +2.644 F -.855(AT)-.666 G .144(IBILITY MODE).855 F/F4 9/Times-Roman@0 SF +(.)A F1 -.15(Fo)4.644 G 2.645(re).15 G .145(xample, 4.2 and 42 are v) +-2.795 F .145(alid v)-.25 F .145(alues that correspond)-.25 F .567 +(to the)144 441.6 R F3 .567(compat42 shopt)3.067 F F1 .567 +(option and set the compatibility le)3.067 F -.15(ve)-.25 G 3.066(lt).15 +G 3.066(o4)-3.066 G 3.066(2. The)-3.066 F .566(current v)3.066 F .566 +(ersion is also a)-.15 F -.25(va)144 453.6 S(lid v).25 E(alue.)-.25 E F3 +-.3(BA)108 465.6 S(SH_ENV).3 E F1 .298(If this parameter is set when)144 +477.6 R F3(bash)2.798 E F1 .298(is e)2.798 F -.15(xe)-.15 G .298 +(cuting a shell script, its e).15 F .299(xpanded v)-.15 F .299 +(alue is interpreted as a)-.25 F .468(\214lename containing commands to\ + initialize the shell before it reads and e)144 489.6 R -.15(xe)-.15 G +.467(cutes commands from).15 F .838(the script.)144 501.6 R .838(The v) +5.838 F .838(alue of)-.25 F F2 -.27(BA)3.339 G(SH_ENV).27 E F1 .839 +(is subjected to parameter e)3.089 F .839 +(xpansion, command substitution,)-.15 F .922(and arithmetic e)144 513.6 +R .922(xpansion before being interpreted as a \214lename.)-.15 F F2 +-.666(PA)5.922 G(TH)-.189 E F1 .922(is not used to search for)3.172 F +(the resultant \214lename.)144 525.6 Q F3 -.3(BA)108 537.6 S(SH_XTRA).3 +E(CEFD)-.55 E F1 .55(If set to an inte)144 549.6 R .55 +(ger corresponding to a v)-.15 F .551(alid \214le descriptor)-.25 F(,) +-.4 E F3(bash)3.051 E F1 .551(writes the trace output generated)3.051 F +.245(when \231set \255x\232 is enabled to that \214le descriptor)144 +561.6 R 2.745(,i)-.4 G .245(nstead of the standard error)-2.745 F 5.244 +(.T)-.55 G .244(he \214le descriptor is)-5.244 F .76(closed when)144 +573.6 R F2 -.27(BA)3.26 G(SH_XTRA).27 E(CEFD)-.495 E F1 .761 +(is unset or assigned a ne)3.01 F 3.261(wv)-.25 G 3.261(alue. Unsetting) +-3.511 F F2 -.27(BA)3.261 G(SH_XTRA).27 E(CEFD)-.495 E F1 .583(or assig\ +ning it the empty string causes the trace output to be sent to the stan\ +dard error)144 585.6 R 5.582(.N)-.55 G .582(ote that)-5.582 F(setting) +144 597.6 Q F2 -.27(BA)2.995 G(SH_XTRA).27 E(CEFD)-.495 E F1 .495(to 2 \ +\(the standard error \214le descriptor\) and then unsetting it will res\ +ult)2.745 F(in the standard error being closed.)144 609.6 Q F3(CDP)108 +621.6 Q -.95(AT)-.74 G(H).95 E F1 .554(The search path for the)144 633.6 +R F3(cd)3.054 E F1 3.054(command. This)3.054 F .554 +(is a colon-separated list of directories where the shell)3.054 F +(looks for directories speci\214ed as ar)144 645.6 Q(guments to the)-.18 +E F3(cd)2.5 E F1 2.5(command. A)2.5 F(sample v)2.5 E +(alue is \231.:\001:/usr\232.)-.25 E F3(CHILD_MAX)108 657.6 Q F1 .931 +(Set the number of e)144 669.6 R .931(xited child status v)-.15 F .931 +(alues for the shell to remember)-.25 F(.)-.55 E F3(Bash)5.931 E F1 .932 +(will not allo)3.431 F 3.432(wt)-.25 G(his)-3.432 E -.25(va)144 681.6 S +1.078(lue to be decreased belo).25 F 3.577(waP)-.25 G 1.077 +(OSIX-mandated minimum, and there is a maximum v)-3.577 F 1.077 +(alue \(cur)-.25 F(-)-.2 E(rently 8192\) that this may not e)144 693.6 Q +2.5(xceed. The)-.15 F(minimum v)2.5 E(alue is system-dependent.)-.25 E +F3(COLUMNS)108 705.6 Q F1 .828(Used by the)144 717.6 R F3(select)3.328 E +F1 .829(compound command to determine the terminal width when printing \ +selection)3.328 F 4.507(lists. Automatically)144 729.6 R 2.007 +(set if the)4.507 F F3(checkwinsize)4.507 E F1 2.006 +(option is enabled or in an interacti)4.507 F 2.306 -.15(ve s)-.25 H +2.006(hell upon).15 F(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E +(16)185.955 E 0 Cg EP +%%Page: 17 17 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(receipt of a)144 84 Q/F2 9/Times-Bold@0 SF +(SIGWINCH)2.5 E/F3 9/Times-Roman@0 SF(.)A/F4 10/Times-Bold@0 SF +(COMPREPL)108 96 Q(Y)-.92 E F1 .847(An array v)144 108 R .848 +(ariable from which)-.25 F F4(bash)3.348 E F1 .848 +(reads the possible completions generated by a shell function)3.348 F +(in)144 120 Q -.2(vo)-.4 G -.1(ke).2 G 2.785(db).1 G 2.785(yt)-2.785 G +.285(he programmable completion f)-2.785 F .285(acility \(see)-.1 F F4 +(Pr)2.785 E .285(ogrammable Completion)-.18 F F1(belo)2.785 E 2.785 +(w\). Each)-.25 F(array element contains one possible completion.)144 +132 Q F4(EMA)108 144 Q(CS)-.55 E F1(If)144 156 Q F4(bash)3.07 E F1 .57 +(\214nds this v)3.07 F .57(ariable in the en)-.25 F .571 +(vironment when the shell starts with v)-.4 F .571 +(alue \231t\232, it assumes that)-.25 F +(the shell is running in an Emacs shell b)144 168 Q(uf)-.2 E +(fer and disables line editing.)-.25 E F4(ENV)108 180 Q F1 1.282 +(Expanded and e)144 180 R -.15(xe)-.15 G 1.282(cuted similarly to).15 F +F2 -.27(BA)3.781 G(SH_ENV).27 E F1(\(see)3.531 E F2(INV)3.781 E(OCA) +-.405 E(TION)-.855 E F1(abo)3.531 E -.15(ve)-.15 G 3.781(\)w).15 G 1.281 +(hen an interacti)-3.781 F -.15(ve)-.25 G(shell is in)144 192 Q -.2(vo) +-.4 G -.1(ke).2 G 2.5(di).1 G 2.5(np)-2.5 G(osix mode.)-2.5 E F4 +(EXECIGNORE)108 204 Q F1 2.791(Ac)144 216 S .291 +(olon-separated list of shell patterns \(see)-2.791 F F4 -.1(Pa)2.791 G +(tter).1 E 2.791(nM)-.15 G(atching)-2.791 E F1 2.791(\)d)C .292 +(e\214ning the set of \214lenames to be)-2.791 F .357 +(ignored by command search using)144 228 R F2 -.666(PA)2.857 G(TH)-.189 +E F3(.)A F1 .356(Files whose full pathnames match one of these patterns) +4.856 F 1.432(are not considered e)144 240 R -.15(xe)-.15 G 1.432 +(cutable \214les for the purposes of completion and command e).15 F -.15 +(xe)-.15 G 1.433(cution via).15 F F2 -.666(PA)144 252 S(TH)-.189 E F1 +3.087(lookup. This)2.837 F .587(does not af)3.087 F .587(fect the beha) +-.25 F .587(vior of the)-.2 F F4([)3.087 E F1(,)A F4(test)3.087 E F1 +3.087(,a)C(nd)-3.087 E F4([[)3.087 E F1 3.086(commands. Full)3.086 F +(pathnames)3.086 E .103(in the command hash table are not subject to)144 +264 R F2(EXECIGNORE)2.603 E F3(.)A F1 .104(Use this v)4.603 F .104 +(ariable to ignore shared li-)-.25 F .33(brary \214les that ha)144 276 R +.63 -.15(ve t)-.2 H .33(he e).15 F -.15(xe)-.15 G .33 +(cutable bit set, b).15 F .33(ut are not e)-.2 F -.15(xe)-.15 G .33 +(cutable \214les.).15 F .33(The pattern matching hon-)5.33 F +(ors the setting of the)144 288 Q F4(extglob)2.5 E F1(shell option.)2.5 +E F4(FCEDIT)108 300 Q F1(The def)144 312 Q(ault editor for the)-.1 E F4 +(fc)2.5 E F1 -.2(bu)2.5 G(iltin command.).2 E F4(FIGNORE)108 324 Q F1 +2.598(Ac)144 336 S .098(olon-separated list of suf)-2.598 F<8c78>-.25 E +.098(es to ignore when performing \214lename completion \(see)-.15 F F2 +(READLINE)2.599 E F1(belo)144 348 Q 2.705(w\). A)-.25 F .205 +(\214lename whose suf)2.705 F .205(\214x matches one of the entries in) +-.25 F F2(FIGNORE)2.705 E F1 .205(is e)2.455 F .204 +(xcluded from the list)-.15 F(of matched \214lenames.)144 360 Q 2.5(As)5 +G(ample v)-2.5 E(alue is \231.o:\001\232.)-.25 E F4(FUNCNEST)108 372 Q +F1 .23(If set to a numeric v)144 384 R .231 +(alue greater than 0, de\214nes a maximum function nesting le)-.25 F +-.15(ve)-.25 G 2.731(l. Function).15 F(in)2.731 E -.2(vo)-.4 G(-).2 E +(cations that e)144 396 Q(xceed this nesting le)-.15 E -.15(ve)-.25 G +2.5(lc).15 G(ause the current command to abort.)-2.5 E F4(GLOBIGNORE)108 +408 Q F1 2.924(Ac)144 420 S .423(olon-separated list of patterns de\214\ +ning the set of \214le names to be ignored by pathname e)-2.924 F(xpan-) +-.15 E 2.947(sion. If)144 432 R 2.947<618c>2.947 G .447 +(le name matched by a pathname e)-2.947 F .448 +(xpansion pattern also matches one of the patterns in)-.15 F F2 +(GLOBIGNORE)144 444 Q F3(,)A F1 .14(it is remo)2.39 F -.15(ve)-.15 G +2.64(df).15 G .14(rom the list of matches.)-2.64 F .139 +(The pattern matching honors the setting of)5.14 F(the)144 456 Q F4 +(extglob)2.5 E F1(shell option.)2.5 E F4(GLOBSOR)108 468 Q(T)-.4 E F1 +.075(Controls ho)144 480 R 2.575(wt)-.25 G .075 +(he results of pathname e)-2.575 F .075(xpansion are sorted.)-.15 F .075 +(The v)5.075 F .076(alue of this v)-.25 F .076(ariable speci\214es the) +-.25 F .36(sort criteria and sort order for the results of pathname e) +144 492 R 2.859(xpansion. If)-.15 F .359(this v)2.859 F .359 +(ariable is unset or set to)-.25 F .655(the null string, pathname e)144 +504 R .655(xpansion uses the historical beha)-.15 F .655 +(vior of sorting by name, in ascending)-.2 F(le)144 516 Q +(xicographic order as determined by the)-.15 E F2(LC_COLLA)2.5 E(TE) +-.855 E F1(shell v)2.25 E(ariable.)-.25 E .03(If set, a v)144 532.8 R +.03(alid v)-.25 F .03(alue be)-.25 F .03(gins with an optional)-.15 F F0 +(+)2.53 E F1 2.529(,w)C .029(hich is ignored, or)-2.529 F F02.529 E +F1 2.529(,w)C .029(hich re)-2.529 F -.15(ve)-.25 G .029 +(rses the sort order).15 F 1.303(from ascending to descending, follo)144 +544.8 R 1.303(wed by a sort speci\214er)-.25 F 6.304(.T)-.55 G 1.304 +(he v)-6.304 F 1.304(alid sort speci\214ers are)-.25 F F0(name)4.164 E +F1(,).18 E F0(numeric)144 556.8 Q F1(,).31 E F0(size)3.921 E F1(,).18 E +F0(mtime)3.961 E F1(,).18 E F0(atime)3.911 E F1(,).18 E F0(ctime)3.781 E +F1 3.581(,a).18 G(nd)-3.581 E F0(bloc)3.851 E(ks)-.2 E F1 3.581(,w).27 G +1.08(hich sort the \214les on name, names in numeric)-3.581 F .979 +(rather than le)144 568.8 R .979(xicographic order)-.15 F 3.479<2c8c>-.4 +G .979 +(le size, modi\214cation time, access time, inode change time, and) +-3.479 F .894(number of blocks, respecti)144 580.8 R -.15(ve)-.25 G(ly) +.15 E 5.894(.I)-.65 G 3.394(fa)-5.894 G 1.194 -.15(ny o)-3.394 H 3.394 +(ft).15 G .894(he non-name k)-3.394 F -.15(ey)-.1 G 3.394(sc).15 G .893 +(ompare as equal \(e.g., if tw)-3.394 F 3.393<6f8c>-.1 G(les)-3.393 E +(are the same size\), sorting uses the name as a secondary sort k)144 +592.8 Q -.15(ey)-.1 G(.)-.5 E -.15(Fo)144 609.6 S 2.692(re).15 G .192 +(xample, a v)-2.842 F .192(alue of)-.25 F F0(\255mtime)2.692 E F1 .192 +(sorts the results in descending order by modi\214cation time \(ne)2.692 +F(west)-.25 E(\214rst\).)144 621.6 Q(The)144 638.4 Q F0(numeric)3.844 E +F1 1.344(speci\214er treats names consisting solely of digits as number\ +s and sorts them using)3.844 F .265(their numeric v)144 650.4 R .266 +(alue \(so \2312\232 sorts before \23110\232, for e)-.25 F 2.766 +(xample\). When)-.15 F(using)2.766 E F0(numeric)2.766 E F1 2.766(,n)C +.266(ames contain-)-2.766 F .321(ing non-digits sort after all the all-\ +digit names and are sorted by name using the traditional beha)144 662.4 +R(v-)-.2 E(ior)144 674.4 Q(.)-.55 E 2.643(As)144 691.2 S .143 +(ort speci\214er of)-2.643 F F0(nosort)2.643 E F1 .144 +(disables sorting completely;)2.644 F F4(bash)2.644 E F1 .144 +(returns the results in the order the)2.644 F 2.644(ya)-.15 G(re)-2.644 +E(read from the \214le system, ignoring an)144 703.2 Q 2.5(yl)-.15 G +(eading)-2.5 E F02.5 E F1(.)A(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(17)185.955 E 0 Cg EP +%%Page: 18 18 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .52(If the sort speci\214er is missing, it def)144 +84 R .52(aults to)-.1 F F0(name)3.02 E F1 3.02(,s)C 3.02(oav)-3.02 G .52 +(alue of)-3.27 F F0(+)3.02 E F1 .52(is equi)3.02 F -.25(va)-.25 G .52 +(lent to the null string,).25 F .482(and a v)144 96 R .482(alue of)-.25 +F F0(-)2.982 E F1 .482(sorts by name in descending order)2.982 F 5.482 +(.A)-.55 G .783 -.15(ny i)-5.482 H -1.95 -.4(nv a).15 H .483(lid v).4 F +.483(alue restores the historical sort-)-.25 F(ing beha)144 108 Q(vior) +-.2 E(.)-.55 E/F2 10/Times-Bold@0 SF(HISTCONTR)108 120 Q(OL)-.3 E F1 +2.654(Ac)144 132 S .153(olon-separated list of v)-2.654 F .153 +(alues controlling ho)-.25 F 2.653(wc)-.25 G .153(ommands are sa)-2.653 +F -.15(ve)-.2 G 2.653(do).15 G 2.653(nt)-2.653 G .153(he history list.) +-2.653 F .153(If the list)5.153 F .49(of v)144 144 R .49(alues includes) +-.25 F F0(ignor)3 E(espace)-.37 E F1 2.99(,l).18 G .49(ines which be) +-2.99 F .49(gin with a)-.15 F F2(space)2.99 E F1 .49 +(character are not sa)2.99 F -.15(ve)-.2 G 2.99(di).15 G 2.99(nt)-2.99 G +.49(he his-)-2.99 F .558(tory list.)144 156 R 3.058(Av)5.558 G .558 +(alue of)-3.308 F F0(ignor)3.068 E(edups)-.37 E F1 .558 +(causes lines matching the pre)3.328 F .557 +(vious history entry not to be sa)-.25 F -.15(ve)-.2 G(d.).15 E 2.925 +(Av)144 168 S .425(alue of)-3.175 F F0(ignor)2.935 E(eboth)-.37 E F1 +.426(is shorthand for)3.205 F F0(ignor)2.926 E(espace)-.37 E F1(and) +2.926 E F0(ignor)2.926 E(edups)-.37 E F1 5.426(.A)C -.25(va)-2.5 G .426 +(lue of).25 F F0(er)3.116 E(asedups)-.15 E F1(causes)3.196 E .699 +(all pre)144 180 R .698 +(vious lines matching the current line to be remo)-.25 F -.15(ve)-.15 G +3.198(df).15 G .698(rom the history list before that line is)-3.198 F +(sa)144 192 Q -.15(ve)-.2 G 2.763(d. An).15 F 2.763(yv)-.15 G .263 +(alue not in the abo)-3.013 F .563 -.15(ve l)-.15 H .263 +(ist is ignored.).15 F(If)5.263 E/F3 9/Times-Bold@0 SF(HISTCONTR)2.763 E +(OL)-.27 E F1 .264(is unset, or does not include)2.513 F 2.607(av)144 +204 S .107(alid v)-2.857 F(alue,)-.25 E F2(bash)2.607 E F1(sa)2.607 E +-.15(ve)-.2 G 2.607(sa).15 G .107(ll lines read by the shell parser on \ +the history list, subject to the v)-2.607 F .107(alue of)-.25 F F3 +(HISTIGNORE)144 216 Q/F4 9/Times-Roman@0 SF(.)A F1 .06 +(If the \214rst line of a multi-line compound command w)4.559 F .06 +(as sa)-.1 F -.15(ve)-.2 G .06(d, the second and sub-).15 F 1.394 +(sequent lines are not tested, and are added to the history re)144 228 R +-.05(ga)-.15 G 1.393(rdless of the v).05 F 1.393(alue of)-.25 F F3 +(HISTCON-)3.893 E(TR)144 240 Q(OL)-.27 E F4(.)A F1 1.099 +(If the \214rst line w)5.599 F 1.099(as not sa)-.1 F -.15(ve)-.2 G 1.099 +(d, the second and subsequent lines of the command are not).15 F(sa)144 +252 Q -.15(ve)-.2 G 2.5(de).15 G(ither)-2.5 E(.)-.55 E F2(HISTFILE)108 +264 Q F1 .818(The name of the \214le in which command history is sa)144 +276 R -.15(ve)-.2 G 3.317(d\().15 G(see)-3.317 E F3(HIST)3.317 E(OR) +-.162 E(Y)-.315 E F1(belo)3.067 E(w\).)-.25 E F2(Bash)5.817 E F1 .817 +(assigns a)3.317 F(def)144 288 Q .774(ault v)-.1 F .774(alue of)-.25 F +F0(\001/.bash_history)4.94 E F1 5.774(.I)1.666 G(f)-5.774 E F3(HISTFILE) +3.274 E F1 .775(is unset or null, the shell does not sa)3.024 F 1.075 +-.15(ve t)-.2 H .775(he com-).15 F(mand history when it e)144 300 Q +(xits.)-.15 E F2(HISTFILESIZE)108 312 Q F1 1.623 +(The maximum number of lines contained in the history \214le.)144 324 R +1.622(When this v)6.623 F 1.622(ariable is assigned a)-.25 F -.25(va)144 +336 S .124(lue, the history \214le is truncated, if necessary).25 F +2.624(,t)-.65 G 2.624(oc)-2.624 G .125 +(ontain no more than that number of lines by re-)-2.624 F(mo)144 348 Q +.066(ving the oldest entries.)-.15 F .065(The history \214le is also tr\ +uncated to this size after writing it when a shell)5.066 F -.15(ex)144 +360 S .407(its or by the).15 F F2(history)2.908 E F1 -.2(bu)2.908 G +2.908(iltin. If).2 F .408(the v)2.908 F .408 +(alue is 0, the history \214le is truncated to zero size.)-.25 F +(Non-nu-)5.408 E .406(meric v)144 372 R .406(alues and numeric v)-.25 F +.405(alues less than zero inhibit truncation.)-.25 F .405 +(The shell sets the def)5.405 F .405(ault v)-.1 F(alue)-.25 E(to the v) +144 384 Q(alue of)-.25 E F3(HISTSIZE)2.5 E F1(after reading an)2.25 E +2.5(ys)-.15 G(tartup \214les.)-2.5 E F2(HISTIGNORE)108 396 Q F1 2.657 +(Ac)144 408 S .157(olon-separated list of patterns used to decide which\ + command lines should be sa)-2.657 F -.15(ve)-.2 G 2.658(do).15 G 2.658 +(nt)-2.658 G .158(he his-)-2.658 F .997(tory list.)144 420 R .997 +(If a command line matches one of the patterns in the v)5.997 F .996 +(alue of)-.25 F F3(HISTIGNORE)3.496 E F4(,)A F1 .996(it is not)3.246 F +(sa)144 432 Q -.15(ve)-.2 G 2.771(do).15 G 2.771(nt)-2.771 G .271 +(he history list.)-2.771 F .271(Each pattern is anchored at the be)5.271 +F .271(ginning of the line and must match the)-.15 F .087 +(complete line \()144 444 R F2(bash)A F1 .087(does not)2.587 F .086 +(implicitly append a \231)5.086 F F2(*)A F1 2.586(\232\). Each)B .086 +(pattern is tested ag)2.586 F .086(ainst the line after)-.05 F 2.252 +(the checks speci\214ed by)144 456 R F3(HISTCONTR)4.752 E(OL)-.27 E F1 +2.252(are applied.)4.502 F 2.252 +(In addition to the normal shell pattern)7.252 F 1.386 +(matching characters, \231)144 468 R F2(&)A F1 3.886<9a6d>C 1.386 +(atches the pre)-3.886 F 1.385(vious history line.)-.25 F 3.885(Ab)6.385 +G 1.385(ackslash escapes the \231)-3.885 F F2(&)A F1 1.385(\232; the)B +.775(backslash is remo)144 480 R -.15(ve)-.15 G 3.275(db).15 G .775 +(efore attempting a match.)-3.275 F .776 +(If the \214rst line of a multi-line compound com-)5.775 F .76(mand w) +144 492 R .76(as sa)-.1 F -.15(ve)-.2 G .76(d, the second and subsequen\ +t lines are not tested, and are added to the history re-).15 F -.05(ga) +144 504 S .579(rdless of the v).05 F .579(alue of)-.25 F F3(HISTIGNORE) +3.079 E F4(.)A F1 .579(If the \214rst line w)5.079 F .579(as not sa)-.1 +F -.15(ve)-.2 G .579(d, the second and subsequent).15 F .262 +(lines of the command are not sa)144 516 R -.15(ve)-.2 G 2.761(de).15 G +(ither)-2.761 E 5.261(.T)-.55 G .261 +(he pattern matching honors the setting of the)-5.261 F F2(extglob)2.761 +E F1(shell option.)144 528 Q F2(HISTSIZE)108 540 Q F1 1.387 +(The number of commands to remember in the command history \(see)144 552 +R F3(HIST)3.887 E(OR)-.162 E(Y)-.315 E F1(belo)3.637 E 3.887(w\). If) +-.25 F(the)3.888 E -.25(va)144 564 S 1.321 +(lue is 0, commands are not sa).25 F -.15(ve)-.2 G 3.821(di).15 G 3.821 +(nt)-3.821 G 1.321(he history list.)-3.821 F 1.32(Numeric v)6.32 F 1.32 +(alues less than zero result in)-.25 F -2.15 -.25(ev e)144 576 T .436 +(ry command being sa).25 F -.15(ve)-.2 G 2.936(do).15 G 2.936(nt)-2.936 +G .436(he history list \(there is no limit\).)-2.936 F .437 +(The shell sets the def)5.437 F .437(ault v)-.1 F(alue)-.25 E +(to 500 after reading an)144 588 Q 2.5(ys)-.15 G(tartup \214les.)-2.5 E +F2(HISTTIMEFORMA)108 600 Q(T)-.95 E F1 .926(If this v)144 612 R .926 +(ariable is set and not null, its v)-.25 F .925 +(alue is used as a format string for)-.25 F F0(strftime)3.765 E F1 .925 +(\(3\) to print the).18 F .672 +(time stamp associated with each history entry displayed by the)144 624 +R F2(history)3.173 E F1 -.2(bu)3.173 G 3.173(iltin. If).2 F .673(this v) +3.173 F .673(ariable is)-.25 F .454 +(set, the shell writes time stamps to the history \214le so the)144 636 +R 2.954(ym)-.15 G .454(ay be preserv)-2.954 F .454 +(ed across shell sessions.)-.15 F(This uses the history comment charact\ +er to distinguish timestamps from other history lines.)144 648 Q F2 +(HOME)108 660 Q F1 1.27(The home directory of the current user; the def) +144 672 R 1.27(ault ar)-.1 F 1.27(gument for the)-.18 F F2(cd)3.77 E F1 +-.2(bu)3.77 G 1.27(iltin command.).2 F(The)6.27 E -.25(va)144 684 S +(lue of this v).25 E(ariable is also used when performing tilde e)-.25 E +(xpansion.)-.15 E F2(HOSTFILE)108 696 Q F1 1.015 +(Contains the name of a \214le in the same format as)144 708 R F0 +(/etc/hosts)5.181 E F1 1.015(that should be read when the shell)5.181 F +.55(needs to complete a hostname.)144 720 R .551 +(The list of possible hostname completions may be changed while)5.551 F +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(18)185.955 E 0 Cg EP +%%Page: 19 19 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E 1.059(the shell is running; the ne)144 84 R 1.059 +(xt time hostname completion is attempted after the v)-.15 F 1.058 +(alue is changed,)-.25 F/F2 10/Times-Bold@0 SF(bash)144 96 Q F1 .138 +(adds the contents of the ne)2.638 F 2.638<778c>-.25 G .138(le to the e) +-2.638 F .138(xisting list.)-.15 F(If)5.138 E/F3 9/Times-Bold@0 SF +(HOSTFILE)2.638 E F1 .138(is set, b)2.388 F .139(ut has no v)-.2 F .139 +(alue, or)-.25 F .518(does not name a readable \214le,)144 108 R F2 +(bash)3.018 E F1 .518(attempts to read)3.018 F F0(/etc/hosts)4.683 E F1 +.517(to obtain the list of possible host-)4.683 F(name completions.)144 +120 Q(When)5 E F3(HOSTFILE)2.5 E F1(is unset,)2.25 E F2(bash)2.5 E F1 +(clears the the hostname list.)2.5 E F2(IFS)108 132 Q F1(The)144 132 Q +F0 .555(Internal F)3.635 F .555(ield Separ)-.45 F(ator)-.15 E F1 .555 +(that is used for w)3.785 F .556(ord splitting after e)-.1 F .556 +(xpansion and to split lines into)-.15 F -.1(wo)144 144 S .054 +(rds with the).1 F F2 -.18(re)2.554 G(ad).18 E F1 -.2(bu)2.554 G .054 +(iltin command.).2 F -.8(Wo)5.054 G .053(rd splitting is described belo) +.8 F 2.553(wu)-.25 G(nder)-2.553 E F3(EXP)2.553 E(ANSION)-.666 E/F4 9 +/Times-Roman@0 SF(.)A F1(The)4.553 E(def)144 156 Q(ault v)-.1 E +(alue is \231\232.)-.25 E F2(IGNOREEOF)108 +168 Q F1 .503(Controls the action of an interacti)144 180 R .803 -.15 +(ve s)-.25 H .503(hell on receipt of an).15 F F3(EOF)3.003 E F1 .503 +(character as the sole input.)2.753 F .504(If set,)5.504 F .426(the v) +144 192 R .426(alue is the number of consecuti)-.25 F -.15(ve)-.25 G F3 +(EOF)3.076 E F1 .426 +(characters which must be typed as the \214rst characters)2.676 F .46 +(on an input line before)144 204 R F2(bash)2.96 E F1 -.15(ex)2.96 G 2.96 +(its. If).15 F .46(the v)2.96 F .46(ariable is set b)-.25 F .46 +(ut does not ha)-.2 F .76 -.15(ve a n)-.2 H .46(umeric v).15 F .46 +(alue, or the)-.25 F -.25(va)144 216 S(lue is null, the def).25 E +(ault v)-.1 E(alue is 10.)-.25 E(If it is unset,)5 E F3(EOF)2.5 E F1 +(signi\214es the end of input to the shell.)2.25 E F2(INPUTRC)108 228 Q +F1 .112(The \214lename for the)144 240 R F2 -.18(re)2.612 G(adline).18 E +F1 .112(startup \214le, o)2.612 F -.15(ve)-.15 G .112(rriding the def) +.15 F .112(ault of)-.1 F F0(\001/.inputr)4.278 E(c)-.37 E F1(\(see)4.278 +E F3(READLINE)2.611 E F1(be-)2.361 E(lo)144 252 Q(w\).)-.25 E F2 +(INSIDE_EMA)108 264 Q(CS)-.55 E F1 .033(If this v)144 276 R .033 +(ariable appears in the en)-.25 F .033(vironment when the shell starts,) +-.4 F F2(bash)2.534 E F1 .034(assumes that it is running in-)2.534 F +(side an Emacs shell b)144 288 Q(uf)-.2 E +(fer and may disable line editing, depending on the v)-.25 E(alue of) +-.25 E F3(TERM)2.5 E F4(.)A F2(LANG)108 300 Q F1 1.24 +(Used to determine the locale cate)144 300 R 1.239(gory for an)-.15 F +3.739(yc)-.15 G(ate)-3.739 E 1.239 +(gory not speci\214cally selected with a v)-.15 F(ariable)-.25 E +(starting with)144 312 Q F2(LC_)2.5 E F1(.)A F2(LC_ALL)108 324 Q F1 .973 +(This v)144 336 R .973(ariable o)-.25 F -.15(ve)-.15 G .973 +(rrides the v).15 F .973(alue of)-.25 F F3(LANG)3.473 E F1 .973(and an) +3.223 F 3.473(yo)-.15 G(ther)-3.473 E F2(LC_)3.473 E F1 -.25(va)3.473 G +.974(riable specifying a locale cate-).25 F(gory)144 348 Q(.)-.65 E F2 +(LC_COLLA)108 360 Q(TE)-.95 E F1 .412(This v)144 372 R .412(ariable det\ +ermines the collation order used when sorting the results of pathname e) +-.25 F(xpansion,)-.15 E 1.464(and determines the beha)144 384 R 1.464 +(vior of range e)-.2 F 1.465(xpressions, equi)-.15 F -.25(va)-.25 G +1.465(lence classes, and collating sequences).25 F(within pathname e)144 +396 Q(xpansion and pattern matching.)-.15 E F2(LC_CTYPE)108 408 Q F1 +1.936(This v)144 420 R 1.936 +(ariable determines the interpretation of characters and the beha)-.25 F +1.935(vior of character classes)-.2 F(within pathname e)144 432 Q +(xpansion and pattern matching.)-.15 E F2(LC_MESSA)108 444 Q(GES)-.55 E +F1(This v)144 456 Q(ariable determines the locale used to translate dou\ +ble-quoted strings preceded by a)-.25 E F2($)2.5 E F1(.)A F2(LC_NUMERIC) +108 468 Q F1(This v)144 480 Q(ariable determines the locale cate)-.25 E +(gory used for number formatting.)-.15 E F2(LC_TIME)108 492 Q F1(This v) +144 504 Q(ariable determines the locale cate)-.25 E +(gory used for data and time formatting.)-.15 E F2(LINES)108 516 Q F1 +.054(Used by the)144 516 R F2(select)2.554 E F1 .054(compound command t\ +o determine the column length for printing selection lists.)2.554 F .265 +(Automatically set if the)144 528 R F2(checkwinsize)2.765 E F1 .264 +(option is enabled or in an interacti)2.765 F .564 -.15(ve s)-.25 H .264 +(hell upon receipt of a).15 F F3(SIGWINCH)144 540 Q F4(.)A F2(MAIL)108 +552 Q F1 .463(If the v)144 552 R .464 +(alue is set to a \214le or directory name and the)-.25 F F3(MAILP)2.964 +E -.855(AT)-.666 G(H).855 E F1 -.25(va)2.714 G .464(riable is not set,) +.25 F F2(bash)2.964 E F1(informs)2.964 E(the user of the arri)144 564 Q +-.25(va)-.25 G 2.5(lo).25 G 2.5(fm)-2.5 G +(ail in the speci\214ed \214le or Maildir)-2.5 E(-format directory)-.2 E +(.)-.65 E F2(MAILCHECK)108 576 Q F1 .099(Speci\214es ho)144 588 R 2.599 +(wo)-.25 G .099(ften \(in seconds\))-2.599 F F2(bash)2.598 E F1 .098 +(checks for mail.)2.598 F .098(The def)5.098 F .098(ault is 60 seconds.) +-.1 F .098(When it is time)5.098 F .223(to check for mail, the shell do\ +es so before displaying the primary prompt.)144 600 R .224(If this v) +5.224 F .224(ariable is unset,)-.25 F(or set to a v)144 612 Q(alue that\ + is not a number greater than or equal to zero, the shell disables mail\ + checking.)-.25 E F2(MAILP)108 624 Q -.95(AT)-.74 G(H).95 E F1 2.99(Ac) +144 636 S .49(olon-separated list of \214lenames to be check)-2.99 F .49 +(ed for mail.)-.1 F .49(The message to be printed when mail)5.49 F(arri) +144 648 Q -.15(ve)-.25 G 3.633(si).15 G 3.633(nap)-3.633 G 1.134(articu\ +lar \214le may be speci\214ed by separating the \214lename from the mes\ +sage with a)-3.633 F 2.559(\231?\232. When)144 660 R .059 +(used in the te)2.559 F .059(xt of the message,)-.15 F F2($_)2.559 E F1 +-.15(ex)2.559 G .059(pands to the name of the current mail\214le.).15 F +-.15(Fo)5.059 G 2.558(re).15 G(x-)-2.708 E(ample:)144 672 Q/F5 10 +/Courier-Bold@0 SF(MAILPATH)144 684 Q/F6 10/Courier@0 SF(=\010/var/mail\ +/bfox?"You have mail":\001/shell\255mail?"$_ has mail!"\010)A F2(Bash) +144 696 Q F1 .015(can be con\214gured to supply a def)2.515 F .015 +(ault v)-.1 F .015(alue for this v)-.25 F .015(ariable \(there is no v) +-.25 F .015(alue by def)-.25 F .015(ault\), b)-.1 F(ut)-.2 E(the locati\ +on of the user mail \214les that it uses is system dependent \(e.g., /v) +144 708 Q(ar/mail/)-.25 E F2($USER)A F1(\).)A(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(19)185.955 E 0 Cg EP +%%Page: 20 20 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(OPTERR)108 84 Q F1 .39 +(If set to the v)144 96 R .39(alue 1,)-.25 F F2(bash)2.89 E F1 .389 +(displays error messages generated by the)2.889 F F2(getopts)2.889 E F1 +-.2(bu)2.889 G .389(iltin command \(see).2 F/F3 9/Times-Bold@0 SF .359 +(SHELL B)144 108 R(UIL)-.09 E .359(TIN COMMANDS)-.828 F F1(belo)2.609 E +(w\).)-.25 E F3(OPTERR)5.359 E F1 .36 +(is initialized to 1 each time the shell is in)2.609 F -.2(vo)-.4 G -.1 +(ke).2 G(d).1 E(or a shell script is e)144 120 Q -.15(xe)-.15 G(cuted.) +.15 E F2 -.74(PA)108 132 S(TH)-.21 E F1 .588 +(The search path for commands.)144 132 R .587 +(It is a colon-separated list of directories in which the shell looks) +5.588 F .471(for commands \(see)144 144 R F3 .471(COMMAND EXECUTION) +2.971 F F1(belo)2.722 E 2.972(w\). A)-.25 F .472 +(zero-length \(null\) directory name in the)2.972 F -.25(va)144 156 S +.536(lue of).25 F F3 -.666(PA)3.036 G(TH)-.189 E F1 .535 +(indicates the current directory)2.786 F 5.535(.A)-.65 G .535 +(null directory name may appear as tw)-2.5 F 3.035(oa)-.1 G(djacent) +-3.035 E .867(colons, or as an initial or trailing colon.)144 168 R .868 +(The def)5.868 F .868(ault path is system-dependent, and is set by the) +-.1 F(administrator who installs)144 180 Q F2(bash)2.5 E F1 5(.A)C +(common v)-2.5 E(alue is \231/usr/local/bin:/usr/lo-)-.25 E +(cal/sbin:/usr/bin:/usr/sbin:/bin:/sbin\232.)144 192 Q F2(POSIXL)108 204 +Q(Y_CORRECT)-.92 E F1 .402(If this v)144 216 R .402 +(ariable is in the en)-.25 F .401(vironment when)-.4 F F2(bash)2.901 E +F1 .401(starts, the shell enters posix mode before reading)2.901 F .011 +(the startup \214les, as if the)144 228 R F2(\255\255posix)2.511 E F1 +(in)2.511 E -.2(vo)-.4 G .011(cation option had been supplied.).2 F .011 +(If it is set while the shell is)5.011 F(running,)144 240 Q F2(bash) +3.344 E F1 .844(enables posix mode, as if the command \231set \255o pos\ +ix\232 had been e)3.344 F -.15(xe)-.15 G 3.344(cuted. When).15 F +(the shell enters posix mode, it sets this v)144 252 Q(ariable if it w) +-.25 E(as not already set.)-.1 E F2(PR)108 264 Q(OMPT_COMMAND)-.3 E F1 +.155(If this v)144 276 R .155(ariable is set, and is an array)-.25 F +2.655(,t)-.65 G .155(he v)-2.655 F .155(alue of each set element is e) +-.25 F -.15(xe)-.15 G .155(cuted as a command prior).15 F .407 +(to issuing each primary prompt.)144 288 R .407(If this is set b)5.407 F +.407(ut not an array v)-.2 F .407(ariable, its v)-.25 F .407 +(alue is used as a com-)-.25 F(mand to e)144 300 Q -.15(xe)-.15 G +(cute instead.).15 E F2(PR)108 312 Q(OMPT_DIR)-.3 E(TRIM)-.4 E F1 .676 +(If set to a number greater than zero, the v)144 324 R .676 +(alue is used as the number of trailing directory compo-)-.25 F .923 +(nents to retain when e)144 336 R .923(xpanding the)-.15 F F2(\\w)3.423 +E F1(and)3.423 E F2(\\W)3.423 E F1 .923(prompt string escapes \(see) +3.423 F F3(PR)3.423 E(OMPTING)-.27 E F1(belo)3.173 E(w\).)-.25 E +(Characters remo)144 348 Q -.15(ve)-.15 G 2.5(da).15 G +(re replaced with an ellipsis.)-2.5 E F2(PS0)108 360 Q F1 1.174(The v) +144 360 R 1.174(alue of this parameter is e)-.25 F 1.174(xpanded \(see) +-.15 F F3(PR)3.674 E(OMPTING)-.27 E F1(belo)3.424 E 1.174 +(w\) and displayed by interacti)-.25 F -.15(ve)-.25 G +(shells after reading a command and before the command is e)144 372 Q +-.15(xe)-.15 G(cuted.).15 E F2(PS1)108 384 Q F1 .065(The v)144 384 R +.065(alue of this parameter is e)-.25 F .065(xpanded \(see)-.15 F F3(PR) +2.565 E(OMPTING)-.27 E F1(belo)2.315 E .065 +(w\) and used as the primary prompt)-.25 F 2.5(string. The)144 396 R +(def)2.5 E(ault v)-.1 E(alue is \231\\s\255\\v\\$ \232.)-.25 E F2(PS2) +108 408 Q F1 .117(The v)144 408 R .117(alue of this parameter is e)-.25 +F .117(xpanded as with)-.15 F F3(PS1)2.617 E F1 .118 +(and used as the secondary prompt string.)2.368 F(The)5.118 E(def)144 +420 Q(ault is \231> \232.)-.1 E F2(PS3)108 432 Q F1 1.116(The v)144 432 +R 1.115(alue of this parameter is used as the prompt for the)-.25 F F2 +(select)3.615 E F1 1.115(command \(see)3.615 F F3 1.115(SHELL GRAM-) +3.615 F(MAR)144 444 Q F1(abo)2.25 E -.15(ve)-.15 G(\).).15 E F2(PS4)108 +456 Q F1 .1(The v)144 456 R .1(alue of this parameter is e)-.25 F .1 +(xpanded as with)-.15 F F3(PS1)2.6 E F1 .101(and the v)2.35 F .101 +(alue is printed before each command)-.25 F F2(bash)144 468 Q F1 .335 +(displays during an e)2.835 F -.15(xe)-.15 G .335(cution trace.).15 F +.335(The \214rst character of the e)5.335 F .335(xpanded v)-.15 F .335 +(alue of)-.25 F F3(PS4)2.834 E F1 .334(is repli-)2.584 F +(cated multiple times, as necessary)144 480 Q 2.5(,t)-.65 G 2.5(oi)-2.5 +G(ndicate multiple le)-2.5 E -.15(ve)-.25 G(ls of indirection.).15 E +(The def)5 E(ault is \231+ \232.)-.1 E F2(SHELL)108 492 Q F1 .542 +(This v)144 504 R .542(ariable e)-.25 F .542 +(xpands to the full pathname to the shell.)-.15 F .543 +(If it is not set when the shell starts,)5.543 F F2(bash)3.043 E F1 +(assigns to it the full pathname of the current user')144 516 Q 2.5(sl) +-.55 G(ogin shell.)-2.5 E F2(TIMEFORMA)108 528 Q(T)-.95 E F1 .827(The v) +144 540 R .826 +(alue of this parameter is used as a format string specifying ho)-.25 F +3.326(wt)-.25 G .826(he timing information for)-3.326 F .648 +(pipelines pre\214x)144 552 R .648(ed with the)-.15 F F2(time)3.148 E F1 +(reserv)3.148 E .648(ed w)-.15 F .649(ord should be displayed.)-.1 F +(The)5.649 E F2(%)3.149 E F1 .649(character introduces)3.149 F .712 +(an escape sequence that is e)144 564 R .711(xpanded to a time v)-.15 F +.711(alue or other information.)-.25 F .711(The escape sequences)5.711 F +(and their meanings are as follo)144 576 Q(ws; the brack)-.25 E +(ets denote optional portions.)-.1 E F2(%%)144 588 Q F1 2.5(Al)194 588 S +(iteral)-2.5 E F2(%)2.5 E F1(.)A F2(%[)144 600 Q F0(p)A F2(][l]R)A F1 +(The elapsed time in seconds.)194 600 Q F2(%[)144 612 Q F0(p)A F2(][l]U) +A F1(The number of CPU seconds spent in user mode.)194 612 Q F2(%[)144 +624 Q F0(p)A F2(][l]S)A F1 +(The number of CPU seconds spent in system mode.)194 624 Q F2(%P)144 636 +Q F1(The CPU percentage, computed as \(%U + %S\) / %R.)194 636 Q .87 +(The optional)144 652.8 R F0(p)3.37 E F1 .87(is a digit specifying the) +3.37 F F0(pr)3.37 E(ecision)-.37 E F1 3.37(,t)C .87 +(he number of fractional digits after a decimal)-3.37 F 2.67(point. A) +144 664.8 R -.25(va)2.67 G .17 +(lue of 0 causes no decimal point or fraction to be output.).25 F F2 +(time)5.169 E F1 .169(prints at most six digits)2.669 F 1.21 +(after the decimal point; v)144 676.8 R 1.21(alues of)-.25 F F0(p)3.71 E +F1 1.211(greater than 6 are changed to 6.)3.71 F(If)6.211 E F0(p)3.711 E +F1 1.211(is not speci\214ed,)3.711 F F2(time)3.711 E F1 +(prints three digits after the decimal point.)144 688.8 Q .668 +(The optional)144 705.6 R F2(l)3.168 E F1 .668 +(speci\214es a longer format, including minutes, of the form)3.168 F F0 +(MM)3.168 E F1(m)A F0(SS)A F1(.)A F0(FF)A F1 3.167(s. The)B -.25(va) +3.167 G(lue).25 E(of)144 717.6 Q F0(p)2.5 E F1 +(determines whether or not the fraction is included.)2.5 E(GNU Bash 5.3) +72 768 Q(2024 December 12)136.795 E(20)185.955 E 0 Cg EP +%%Page: 21 21 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E 13.364(If this v)144 84 R 13.364 +(ariable is not set,)-.25 F/F2 10/Times-Bold@0 SF(bash)15.865 E F1 +13.365(acts as if it had the v)15.865 F(alue)-.25 E F2($\010\\nr)144 96 +Q(eal\\t%3lR\\nuser\\t%3lU\\nsys\\t%3lS\010)-.18 E F1 5.293(.I)C 2.793 +(ft)-5.293 G .293(he v)-2.793 F .293(alue is null,)-.25 F F2(bash)2.793 +E F1 .292(does not display an)2.793 F 2.792(yt)-.15 G(iming)-2.792 E 2.5 +(information. A)144 108 R(trailing ne)2.5 E +(wline is added when the format string is displayed.)-.25 E F2(TMOUT)108 +120 Q F1 .225(If set to a v)144 132 R .225(alue greater than zero, the) +-.25 F F2 -.18(re)2.725 G(ad).18 E F1 -.2(bu)2.725 G .225 +(iltin uses the v).2 F .226(alue as its def)-.25 F .226(ault timeout.) +-.1 F(The)5.226 E F2(select)2.726 E F1 .68 +(command terminates if input does not arri)144 144 R .98 -.15(ve a)-.25 +H(fter).15 E/F3 9/Times-Bold@0 SF(TMOUT)3.18 E F1 .68 +(seconds when input is coming from a)2.93 F 2.555(terminal. In)144 156 R +.055(an interacti)2.555 F .355 -.15(ve s)-.25 H .055(hell, the v).15 F +.055(alue is interpreted as the number of seconds to w)-.25 F .055 +(ait for a line)-.1 F .836(of input after issuing the primary prompt.) +144 168 R F2(Bash)5.836 E F1 .836(terminates after w)3.336 F .836 +(aiting for that number of sec-)-.1 F +(onds if a complete line of input does not arri)144 180 Q -.15(ve)-.25 G +(.).15 E F2(TMPDIR)108 192 Q F1 .39(If set,)144 204 R F2(bash)2.89 E F1 +.39(uses its v)2.89 F .39(alue as the name of a directory in which)-.25 +F F2(bash)2.891 E F1 .391(creates temporary \214les for the)2.891 F +(shell')144 216 Q 2.5(su)-.55 G(se.)-2.5 E F2(auto_r)108 228 Q(esume) +-.18 E F1 .531(This v)144 240 R .531(ariable controls ho)-.25 F 3.031 +(wt)-.25 G .531(he shell interacts with the user and job control.)-3.031 +F .53(If this v)5.53 F .53(ariable is set,)-.25 F .409 +(simple commands consisting of only a single w)144 252 R .409 +(ord, without redirections, are treated as candidates)-.1 F 1.018 +(for resumption of an e)144 264 R 1.018(xisting stopped job)-.15 F 6.018 +(.T)-.4 G 1.017(here is no ambiguity allo)-6.018 F 1.017 +(wed; if there is more than)-.25 F 1.002(one job be)144 276 R 1.002 +(ginning with or containing the w)-.15 F 1.002 +(ord, this selects the most recently accessed job)-.1 F 6.002(.T)-.4 G +(he)-6.002 E F0(name)144.36 288 Q F1 .603 +(of a stopped job, in this conte)3.284 F .603 +(xt, is the command line used to start it, as displayed by)-.15 F F2 +(jobs)3.103 E F1(.)A 1.078(If set to the v)144 300 R(alue)-.25 E F0 -.2 +(ex)3.578 G(act).2 E F1 3.578(,t).68 G 1.078(he w)-3.578 F 1.079 +(ord must match the name of a stopped job e)-.1 F 1.079 +(xactly; if set to)-.15 F F0(sub-)3.919 E(string)144 312 Q F1 2.572(,t) +.22 G .072(he w)-2.572 F .072 +(ord needs to match a substring of the name of a stopped job)-.1 F 5.071 +(.T)-.4 G(he)-5.071 E F0(substring)2.911 E F1 -.25(va)2.791 G .071 +(lue pro-).25 F .576(vides functionality analogous to the)144 324 R F2 +(%?)3.076 E F1 .576(job identi\214er \(see)5.576 F F3 .576(JOB CONTR) +3.076 F(OL)-.27 E F1(belo)2.826 E 3.076(w\). If)-.25 F .576(set to an) +3.076 F(y)-.15 E .843(other v)144 336 R .843(alue \(e.g.,)-.25 F F0(pr) +4.593 E(e\214x)-.37 E F1 .843(\), the w).53 F .842 +(ord must be a pre\214x of a stopped job')-.1 F 3.342(sn)-.55 G .842 +(ame; this pro)-3.342 F .842(vides func-)-.15 F +(tionality analogous to the)144 348 Q F2(%)2.5 E F0(string)A F1 +(job identi\214er)2.5 E(.)-.55 E F2(histchars)108 360 Q F1 .672(The tw) +144 372 R 3.172(oo)-.1 G 3.172(rt)-3.172 G .672 +(hree characters which control history e)-3.172 F .673 +(xpansion, quick substitution, and tok)-.15 F(enization)-.1 E(\(see)144 +384 Q F3(HIST)4.066 E(OR)-.162 E 3.816(YE)-.315 G(XP)-3.816 E(ANSION) +-.666 E F1(belo)3.816 E 4.066(w\). The)-.25 F 1.565 +(\214rst character is the)4.065 F F0 1.565(history e)4.065 F(xpansion) +-.2 E F1(character)4.065 E 4.065(,t)-.4 G(he)-4.065 E .57 +(character which be)144 396 R .57(gins a history e)-.15 F .571 +(xpansion, normally \231)-.15 F F2(!)A F1 3.071(\232. The)B .571 +(second character is the)3.071 F F0(quic)3.071 E 3.071(ks)-.2 G(ub-) +-3.071 E(stitution)144 408 Q F1(character)2.785 E 2.785(,n)-.4 G .285 +(ormally \231)-2.785 F F2<00>A F1 2.785(\232. When)B .285 +(it appears as the \214rst character on the line, history substi-)2.785 +F .015(tution repeats the pre)144 420 R .015 +(vious command, replacing one string with another)-.25 F 5.016(.T)-.55 G +.016(he optional third charac-)-5.016 F .431(ter is the character which\ + indicates that the remainder of the line is a comment when found as th\ +e)144 432 R .688(\214rst character of a w)144 444 R .688 +(ord, normally \231)-.1 F F2(#)A F1 3.188(\232. The)B .689 +(history comment character disables history substitu-)3.189 F .405 +(tion for the remaining w)144 456 R .405(ords on the line.)-.1 F .404 +(It does not necessarily cause the shell parser to treat the)5.405 F +(rest of the line as a comment.)144 468 Q F2(Arrays)87 484.8 Q(Bash)108 +496.8 Q F1(pro)3.39 E .89(vides one-dimensional inde)-.15 F -.15(xe)-.15 +G 3.39(da).15 G .891(nd associati)-3.39 F 1.191 -.15(ve a)-.25 H .891 +(rray v).15 F 3.391(ariables. An)-.25 F 3.391(yv)-.15 G .891 +(ariable may be used as an)-3.641 F(inde)108 508.8 Q -.15(xe)-.15 G +2.698(da).15 G .198(rray; the)-2.698 F F2(declar)2.698 E(e)-.18 E F1 -.2 +(bu)2.698 G .197(iltin e).2 F .197(xplicitly declares an array)-.15 F +5.197(.T)-.65 G .197(here is no maximum limit on the size of an)-5.197 F +(array)108 520.8 Q 3.705(,n)-.65 G 1.205(or an)-3.705 F 3.705(yr)-.15 G +1.205(equirement that members be inde)-3.705 F -.15(xe)-.15 G 3.705(do) +.15 G 3.705(ra)-3.705 G 1.205(ssigned contiguously)-3.705 F 6.205(.I) +-.65 G(nde)-6.205 E -.15(xe)-.15 G 3.705(da).15 G 1.205(rrays are refer) +-3.705 F(-)-.2 E .105(enced using arithmetic e)108 532.8 R .105 +(xpressions that must e)-.15 F .105(xpand to an inte)-.15 F .104 +(ger and are zero-based; associati)-.15 F .404 -.15(ve a)-.25 H .104 +(rrays are).15 F .529(referenced using arbitrary strings.)108 544.8 R +.529(Unless otherwise noted, inde)5.529 F -.15(xe)-.15 G 3.029(da).15 G +.529(rray indices must be non-ne)-3.029 F -.05(ga)-.15 G(ti).05 E .83 +-.15(ve i)-.25 H(n-).15 E(te)108 556.8 Q(gers.)-.15 E 2.463(An inde)108 +573.6 R -.15(xe)-.15 G 4.963(da).15 G 2.463 +(rray is created automatically if an)-4.963 F 4.963(yv)-.15 G 2.462 +(ariable is assigned to using the syntax)-5.213 F F0(name)4.962 E F1([)A +F0(sub-)A(script)108 585.6 Q F1(]=)A F0(value)A F1 5.682(.T)C(he)-5.682 +E F0(subscript)3.522 E F1 .682(is treated as an arithmetic e)3.862 F +.682(xpression that must e)-.15 F -.25(va)-.25 G .682 +(luate to a number greater).25 F .75(than or equal to zero.)108 597.6 R +2.349 -.8(To e)5.749 H .749(xplicitly declare an inde).65 F -.15(xe)-.15 +G 3.249(da).15 G(rray)-3.249 E 3.249(,u)-.65 G(se)-3.249 E F2(declar) +3.249 E 3.249<65ad>-.18 G(a)-3.249 E F0(name)3.249 E F1(\(see)3.249 E F3 +.749(SHELL B)3.249 F(UIL)-.09 E(TIN)-.828 E(COMMANDS)108 609.6 Q F1 +(belo)2.25 E(w\).)-.25 E F2(declar)5 E 2.5<65ad>-.18 G(a)-2.5 E F0(name) +2.5 E F2([)A F0(subscript)A F2(])A F1(is also accepted; the)2.5 E F0 +(subscript)2.5 E F1(is ignored.)2.5 E(Associati)108 626.4 Q .3 -.15 +(ve a)-.25 H(rrays are created using).15 E F2(declar)2.5 E 2.5<65ad>-.18 +G(A)-2.5 E F0(name)2.5 E F1(.)A(Attrib)108 643.2 Q .94 +(utes may be speci\214ed for an array v)-.2 F .941(ariable using the) +-.25 F F2(declar)3.441 E(e)-.18 E F1(and)3.441 E F2 -.18(re)3.441 G +(adonly).18 E F1 -.2(bu)3.441 G 3.441(iltins. Each).2 F(attrib)3.441 E +(ute)-.2 E(applies to all members of an array)108 655.2 Q(.)-.65 E .418 +(Arrays are assigned using compound assignments of the form)108 672 R F0 +(name)2.918 E F1(=)A F2(\()A F1 -.25(va)C(lue).25 E F0(1)A F1 -2.915 +1.666(... v)2.918 H(alue)-1.916 E F0(n)A F2(\))A F1 2.917(,w)C .417 +(here each)-2.917 F F0(value)2.917 E F1 .156(may be of the form [)108 +684 R F0(subscript)A F1(]=)A F0(string)A F1 5.156(.I)C(nde)-5.156 E -.15 +(xe)-.15 G 2.656(da).15 G .156(rray assignments do not require an)-2.656 +F .156(ything b)-.15 F(ut)-.2 E F0(string)2.656 E F1 5.156(.E)C(ach) +-5.156 E F0(value)108 696 Q F1 .216(in the list is e)2.716 F .216 +(xpanded using the shell e)-.15 F .216(xpansions described belo)-.15 F +2.716(wu)-.25 G(nder)-2.716 E F3(EXP)2.716 E(ANSION)-.666 E/F4 9 +/Times-Roman@0 SF(,)A F1 -.2(bu)2.466 G(t).2 E F0(value)2.716 E F1 2.715 +(st)C(hat)-2.715 E 1.325(are v)108 708 R 1.325(alid v)-.25 F 1.325 +(ariable assignments including the brack)-.25 F 1.326 +(ets and subscript do not under)-.1 F 1.326(go brace e)-.18 F 1.326 +(xpansion and)-.15 F -.1(wo)108 720 S(rd splitting, as with indi).1 E +(vidual v)-.25 E(ariable assignments.)-.25 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(21)185.955 E 0 Cg EP +%%Page: 22 22 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .164(When assigning to inde)108 84 R -.15(xe)-.15 G +2.663(da).15 G .163(rrays, if the optional brack)-2.663 F .163 +(ets and subscript are supplied, that inde)-.1 F 2.663(xi)-.15 G 2.663 +(sa)-2.663 G(ssigned)-2.663 E .459(to; otherwise the inde)108 96 R 2.959 +(xo)-.15 G 2.959(ft)-2.959 G .459(he element assigned is the last inde) +-2.959 F 2.96(xa)-.15 G .46(ssigned to by the statement plus one.)-2.96 +F(In-)5.46 E(de)108 108 Q(xing starts at zero.)-.15 E 1.288 +(When assigning to an associati)108 124.8 R 1.588 -.15(ve a)-.25 H(rray) +.15 E 3.788(,t)-.65 G 1.288(he w)-3.788 F 1.288 +(ords in a compound assignment may be either assignment)-.1 F .608 +(statements, for which the subscript is required, or a list of w)108 +136.8 R .608(ords that is interpreted as a sequence of alter)-.1 F(-)-.2 +E 1.735(nating k)108 148.8 R -.15(ey)-.1 G 4.235(sa).15 G 1.735(nd v) +-4.235 F(alues:)-.25 E F0(name)4.235 E F1(=)A/F2 10/Times-Bold@0 SF(\()A +F0 -.1(ke)4.235 G 1.735(y1 value1 k)-.2 F -.3(ey)-.1 G 4.235(2v).3 G +(alue2)-4.235 E F1 1.666(...)4.234 G F2(\))-1.666 E F1 6.734(.T)C 1.734 +(hese are treated identically to)-6.734 F F0(name)4.234 E F1(=)A F2(\()A +F1([)108 160.8 Q F0 -.1(ke)C(y1)-.2 E F1(]=)A F0(value1)A F1([)2.91 E F0 +-.1(ke)C(y2)-.2 E F1(]=)A F0(value2)A F1 1.666(...)2.91 G F2(\))-1.666 E +F1 5.41(.T)C .41(he \214rst w)-5.41 F .411 +(ord in the list determines ho)-.1 F 2.911(wt)-.25 G .411 +(he remaining w)-2.911 F .411(ords are inter)-.1 F(-)-.2 E .154 +(preted; all assignments in a list must be of the same type.)108 172.8 R +.153(When using k)5.153 F -.15(ey)-.1 G(/v).15 E .153(alue pairs, the k) +-.25 F -.15(ey)-.1 G 2.653(sm).15 G .153(ay not be)-2.653 F +(missing or empty; a \214nal missing v)108 184.8 Q(alue is treated lik) +-.25 E 2.5(et)-.1 G(he empty string.)-2.5 E .239 +(This syntax is also accepted by the)108 201.6 R F2(declar)2.739 E(e) +-.18 E F1 -.2(bu)2.739 G 2.739(iltin. Indi).2 F .24 +(vidual array elements may be assigned to using the)-.25 F F0(name)108 +213.6 Q F1([)A F0(subscript)A F1(]=)A F0(value)A F1 +(syntax introduced abo)2.5 E -.15(ve)-.15 G(.).15 E .026 +(When assigning to an inde)108 230.4 R -.15(xe)-.15 G 2.526(da).15 G +(rray)-2.526 E 2.525(,i)-.65 G(f)-2.525 E F0(name)2.885 E F1 .025 +(is subscripted by a ne)2.705 F -.05(ga)-.15 G(ti).05 E .325 -.15(ve n) +-.25 H(umber).15 E 2.525(,t)-.4 G .025(hat number is interpreted)-2.525 +F .316(as relati)108 242.4 R .616 -.15(ve t)-.25 H 2.816(oo).15 G .316 +(ne greater than the maximum inde)-2.816 F 2.816(xo)-.15 G(f)-2.816 E F0 +(name)2.816 E F1 2.816(,s)C 2.816(on)-2.816 G -2.25 -.15(eg a)-2.816 H +(ti).15 E .616 -.15(ve i)-.25 H .317(ndices count back from the end of) +.15 F(the array)108 254.4 Q 2.5(,a)-.65 G(nd an inde)-2.5 E 2.5(xo)-.15 +G 2.5<66ad>-2.5 G 2.5(1r)-2.5 G(eferences the last element.)-2.5 E .644 +(The += operator appends to an array v)108 271.2 R .643 +(ariable when assigning using the compound assignment syntax; see)-.25 F +/F3 9/Times-Bold@0 SF -.666(PA)108 283.2 S(RAMETERS).666 E F1(abo)2.25 E +-.15(ve)-.15 G(.).15 E .683(An array element is referenced using ${)108 +300 R F0(name)A F1([)A F0(subscript)A F1 3.184(]}. The)B .684 +(braces are required to a)3.184 F -.2(vo)-.2 G .684(id con\215icts with) +.2 F .298(pathname e)108 312 R 2.798(xpansion. If)-.15 F F0(subscript) +2.798 E F1(is)2.798 E F2(@)2.798 E F1(or)2.798 E F2(*)2.798 E F1 2.797 +(,t)C .297(he w)-2.797 F .297(ord e)-.1 F .297(xpands to all members of) +-.15 F F0(name)2.797 E F1 2.797(,u)C .297(nless noted in the)-2.797 F +.144(description of a b)108 324 R .144(uiltin or w)-.2 F .144(ord e)-.1 +F 2.644(xpansion. These)-.15 F .144(subscripts dif)2.644 F .145 +(fer only when the w)-.25 F .145(ord appears within dou-)-.1 F .095 +(ble quotes.)108 336 R .095(If the w)5.095 F .095 +(ord is double-quoted, ${)-.1 F F0(name)A F1 .095([*]} e)B .094 +(xpands to a single w)-.15 F .094(ord with the v)-.1 F .094 +(alue of each array)-.25 F .256 +(member separated by the \214rst character of the)108 348 R F3(IFS)2.756 +E F1 .257(special v)2.506 F .257(ariable, and ${)-.25 F F0(name)A F1 +.257([@]} e)B .257(xpands each element)-.15 F(of)108 360 Q F0(name)3.461 +E F1 .961(to a separate w)3.461 F 3.461(ord. When)-.1 F .961 +(there are no array members, ${)3.461 F F0(name)A F1 .96([@]} e)B .96 +(xpands to nothing.)-.15 F .96(If the)5.96 F .726(double-quoted e)108 +372 R .727(xpansion occurs within a w)-.15 F .727(ord, the e)-.1 F .727 +(xpansion of the \214rst parameter is joined with the be-)-.15 F .8 +(ginning part of the e)108 384 R .8(xpansion of the original w)-.15 F .8 +(ord, and the e)-.1 F .8(xpansion of the last parameter is joined with) +-.15 F .553(the last part of the e)108 396 R .554 +(xpansion of the original w)-.15 F 3.054(ord. This)-.1 F .554 +(is analogous to the e)3.054 F .554(xpansion of the special para-)-.15 F +(meters)108 408 Q F2(*)2.5 E F1(and)2.5 E F2(@)2.5 E F1(\(see)2.5 E F2 +(Special P)2.5 E(arameters)-.1 E F1(abo)2.5 E -.15(ve)-.15 G(\).).15 E +(${#)108 424.8 Q F0(name)A F1([)A F0(subscript)A F1 .33(]} e)B .33 +(xpands to the length of ${)-.15 F F0(name)A F1([)A F0(subscript)A F1 +2.83(]}. If)B F0(subscript)2.83 E F1(is)2.83 E F2(*)2.83 E F1(or)2.83 E +F2(@)2.83 E F1 2.83(,t)C .33(he e)-2.83 F .33(xpansion is)-.15 F +(the number of elements in the array)108 436.8 Q(.)-.65 E .386(If the) +108 453.6 R F0(subscript)3.226 E F1 .386 +(used to reference an element of an inde)3.566 F -.15(xe)-.15 G 2.886 +(da).15 G .386(rray e)-2.886 F -.25(va)-.25 G .386 +(luates to a number less than zero, it is).25 F .687 +(interpreted as relati)108 465.6 R .987 -.15(ve t)-.25 H 3.187(oo).15 G +.687(ne greater than the maximum inde)-3.187 F 3.186(xo)-.15 G 3.186(ft) +-3.186 G .686(he array)-3.186 F 3.186(,s)-.65 G 3.186(on)-3.186 G -2.25 +-.15(eg a)-3.186 H(ti).15 E .986 -.15(ve i)-.25 H .686 +(ndices count back).15 F(from the end of the array)108 477.6 Q 2.5(,a) +-.65 G(nd an inde)-2.5 E 2.5(xo)-.15 G 2.5<66ad>-2.5 G 2.5(1r)-2.5 G +(eferences the last element.)-2.5 E .595(Referencing an array v)108 +494.4 R .595(ariable without a subscript is equi)-.25 F -.25(va)-.25 G +.595(lent to referencing the array with a subscript of).25 F 2.5(0. An) +108 506.4 R 2.5(yr)-.15 G(eference to a v)-2.5 E(ariable using a v)-.25 +E(alid subscript is v)-.25 E(alid;)-.25 E F2(bash)2.5 E F1 +(creates an array if necessary)2.5 E(.)-.65 E(An array v)108 523.2 Q +(ariable is considered set if a subscript has been assigned a v)-.25 E +2.5(alue. The)-.25 F(null string is a v)2.5 E(alid v)-.25 E(alue.)-.25 E +.418(It is possible to obtain the k)108 540 R -.15(ey)-.1 G 2.918(s\() +.15 G .418(indices\) of an array as well as the v)-2.918 F 2.917 +(alues. ${)-.25 F F2(!)A F0(name)A F1([)A F0(@)A F1 .417(]} and ${)B F2 +(!)A F0(name)A F1([)A F0(*)A F1(]})A -.15(ex)108 552 S .749 +(pand to the indices assigned in array v).15 F(ariable)-.25 E F0(name) +3.249 E F1 5.749(.T)C .75 +(he treatment when in double quotes is similar to)-5.749 F(the e)108 564 +Q(xpansion of the special parameters)-.15 E F0(@)2.5 E F1(and)2.5 E F0 +(*)2.5 E F1(within double quotes.)2.5 E(The)108 580.8 Q F2(unset)3.282 E +F1 -.2(bu)3.282 G .782(iltin is used to destro).2 F 3.281(ya)-.1 G +(rrays.)-3.281 E F2(unset)5.781 E F0(name)3.281 E F1([)A F0(subscript)A +F1 3.281(]u)C .781(nsets the array element at inde)-3.281 F(x)-.15 E F0 +(sub-)3.281 E(script)108 592.8 Q F1 2.858(,f)C .358(or both inde)-2.858 +F -.15(xe)-.15 G 2.858(da).15 G .358(nd associati)-2.858 F .658 -.15 +(ve a)-.25 H 2.858(rrays. Ne).15 F -.05(ga)-.15 G(ti).05 E .658 -.15 +(ve s)-.25 H .358(ubscripts to inde).15 F -.15(xe)-.15 G 2.858(da).15 G +.358(rrays are interpreted as de-)-2.858 F 1.205(scribed abo)108 604.8 R +-.15(ve)-.15 G 6.205(.U).15 G 1.205 +(nsetting the last element of an array v)-6.205 F 1.204 +(ariable does not unset the v)-.25 F(ariable.)-.25 E F2(unset)6.204 E F0 +(name)3.704 E F1(,)A(where)108 616.8 Q F0(name)2.907 E F1 .407 +(is an array)2.907 F 2.907(,r)-.65 G(emo)-2.907 E -.15(ve)-.15 G 2.907 +(st).15 G .407(he entire array)-2.907 F(.)-.65 E F2(unset)5.407 E F0 +(name)2.907 E F1([)A F0(subscript)A F1 2.907(]b)C(eha)-2.907 E -.15(ve) +-.2 G 2.907(sd).15 G(if)-2.907 E .408(ferently depending on)-.25 F +(whether)108 628.8 Q F0(name)2.915 E F1 .415(is an inde)2.915 F -.15(xe) +-.15 G 2.915(do).15 G 2.915(ra)-2.915 G(ssociati)-2.915 E .715 -.15 +(ve a)-.25 H .415(rray when).15 F F0(subscript)2.915 E F1(is)2.915 E F2 +(*)2.915 E F1(or)2.915 E F2(@)2.915 E F1 5.415(.I)C(f)-5.415 E F0(name) +2.914 E F1 .414(is an associati)2.914 F .714 -.15(ve a)-.25 H(rray).15 E +(,)-.65 E .937(this unsets the element with subscript)108 640.8 R F2(*) +3.437 E F1(or)3.437 E F2(@)3.437 E F1 5.937(.I)C(f)-5.937 E F0(name) +3.437 E F1 .937(is an inde)3.437 F -.15(xe)-.15 G 3.437(da).15 G(rray) +-3.437 E 3.437(,u)-.65 G .937(nset remo)-3.437 F -.15(ve)-.15 G 3.437 +(sa).15 G .937(ll of the ele-)-3.437 F(ments b)108 652.8 Q +(ut does not remo)-.2 E .3 -.15(ve t)-.15 H(he array itself.).15 E .029 +(When using a v)108 669.6 R .029(ariable name with a subscript as an ar) +-.25 F .028(gument to a command, such as with)-.18 F F2(unset)2.528 E F1 +2.528(,w)C .028(ithout us-)-2.528 F .515(ing the w)108 681.6 R .515 +(ord e)-.1 F .515(xpansion syntax described abo)-.15 F -.15(ve)-.15 G +3.015(,\().15 G .515(e.g., unset a[4]\), the ar)-3.015 F .515 +(gument is subject to pathname e)-.18 F(x-)-.15 E 2.5(pansion. Quote)108 +693.6 R(the ar)2.5 E(gument if pathname e)-.18 E +(xpansion is not desired \(e.g., unset \010a[4]\010\).)-.15 E(The)108 +710.4 Q F2(declar)2.684 E(e)-.18 E F1(,)A F2(local)2.684 E F1 2.684(,a)C +(nd)-2.684 E F2 -.18(re)2.684 G(adonly).18 E F1 -.2(bu)2.684 G .184 +(iltins each accept a).2 F F22.684 E F1 .184 +(option to specify an inde)2.684 F -.15(xe)-.15 G 2.683(da).15 G .183 +(rray and a)-2.683 F F22.683 E F1(op-)2.683 E .963 +(tion to specify an associati)108 722.4 R 1.263 -.15(ve a)-.25 H(rray) +.15 E 5.963(.I)-.65 G 3.463(fb)-5.963 G .963(oth options are supplied,) +-3.463 F F23.463 E F1(tak)3.463 E .963(es precedence.)-.1 F(The) +5.963 E F2 -.18(re)3.464 G(ad).18 E F1 -.2(bu)3.464 G(iltin).2 E +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(22)185.955 E 0 Cg EP +%%Page: 23 23 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .441(accepts a)108 84 R/F2 10/Times-Bold@0 SF +2.941 E F1 .441(option to assign a list of w)2.941 F .441 +(ords read from the standard input to an array)-.1 F 5.441(.T)-.65 G(he) +-5.441 E F2(set)2.941 E F1(and)2.941 E F2(declar)2.94 E(e)-.18 E F1 -.2 +(bu)108 96 S .685(iltins display array v).2 F .686(alues in a w)-.25 F +.686(ay that allo)-.1 F .686(ws them to be reused as assignments.)-.25 F +.686(Other b)5.686 F .686(uiltins accept)-.2 F .733(array name ar)108 +108 R .733(guments as well \(e.g.,)-.18 F F2(map\214le)3.233 E F1 .733 +(\); see the descriptions of indi)B .732(vidual b)-.25 F .732 +(uiltins belo)-.2 F 3.232(wf)-.25 G .732(or details.)-3.232 F +(The shell pro)108 120 Q(vides a number of b)-.15 E(uiltin array v)-.2 E +(ariables.)-.25 E/F3 10.95/Times-Bold@0 SF(EXP)72 136.8 Q(ANSION)-.81 E +F1 .764(Expansion is performed on the command line after it has been sp\ +lit into w)108 148.8 R 3.264(ords. The)-.1 F .765(shell performs these) +3.264 F -.15(ex)108 160.8 S(pansions:).15 E F0(br)3.797 E 1.027(ace e) +-.15 F(xpansion)-.2 E F1(,).24 E F0 1.027(tilde e)3.657 F(xpansion)-.2 E +F1(,).24 E F0(par)4.777 E 1.027(ameter and variable e)-.15 F(xpansion) +-.2 E F1(,).24 E F0 1.027(command substitution)3.727 F F1(,).24 E F0 +(arithmetic e)108.33 172.8 Q(xpansion)-.2 E F1(,).24 E F0(wor)2.84 E 2.5 +(ds)-.37 G(plitting)-2.5 E F1(,).22 E F0(pathname e)3.75 E(xpansion)-.2 +E F1 2.5(,a).24 G(nd)-2.5 E F0(quote r)2.75 E(emo)-.37 E(val)-.1 E F1(.) +.51 E .418(The order of e)108 189.6 R .418(xpansions is: brace e)-.15 F +.418(xpansion; tilde e)-.15 F .419(xpansion, parameter and v)-.15 F .419 +(ariable e)-.25 F .419(xpansion, arithmetic)-.15 F -.15(ex)108 201.6 S +.28(pansion, and command substitution \(done in a left-to-right f).15 F +.28(ashion\); w)-.1 F .28(ord splitting; pathname e)-.1 F(xpansion;)-.15 +E(and quote remo)108 213.6 Q -.25(va)-.15 G(l.).25 E .257 +(On systems that can support it, there is an additional e)108 230.4 R +.257(xpansion a)-.15 F -.25(va)-.2 G(ilable:).25 E F0(pr)2.757 E .257 +(ocess substitution)-.45 F F1 5.257(.T)C .257(his is per)-5.257 F(-)-.2 +E(formed at the same time as tilde, parameter)108 242.4 Q 2.5(,v)-.4 G +(ariable, and arithmetic e)-2.75 E(xpansion and command substitution.) +-.15 E F0 .25(Quote r)108 259.2 R(emo)-.37 E(val)-.1 E F1 .25(is al)2.75 +F -.1(wa)-.1 G .25(ys performed last.).1 F .249(It remo)5.25 F -.15(ve) +-.15 G 2.749(sq).15 G .249(uote characters present in the original w) +-2.749 F .249(ord, not ones)-.1 F(resulting from one of the other e)108 +271.2 Q(xpansions, unless the)-.15 E 2.5(yh)-.15 G -2.25 -.2(av e)-2.5 H +(been quoted themselv)2.7 E(es.)-.15 E .171(Only brace e)108 288 R .171 +(xpansion, w)-.15 F .171(ord splitting, and pathname e)-.1 F .171 +(xpansion can increase the number of w)-.15 F .172(ords of the e)-.1 F +(x-)-.15 E .777(pansion; other e)108 300 R .776(xpansions e)-.15 F .776 +(xpand a single w)-.15 F .776(ord to a single w)-.1 F 3.276(ord. The)-.1 +F .776(only e)3.276 F .776(xceptions to this are the e)-.15 F(x-)-.15 E +.328(pansions of)108 312 R F2("$@")2.828 E F1(and)2.828 E F2("${)2.828 E +F0(name)A F2([@]}")A F1 2.828(,a)C .328(nd, in most cases,)-2.828 F F2 +($*)2.828 E F1(and)2.828 E F2(${)2.828 E F0(name)A F2([*]})A F1 .329 +(as e)2.828 F .329(xplained abo)-.15 F .629 -.15(ve \()-.15 H(see).15 E +/F4 9/Times-Bold@0 SF -.666(PA)2.829 G(-).666 E(RAMETERS)108 324 Q/F5 9 +/Times-Roman@0 SF(\).)A F2(Brace Expansion)87 340.8 Q F0(Br)108.58 352.8 +Q .307(ace e)-.15 F(xpansion)-.2 E F1 .307(is a mechanism to generate a\ +rbitrary strings sharing a common pre\214x and suf)3.047 F .306 +(\214x, either of)-.25 F .577(which can be empty)108 364.8 R 5.577(.T) +-.65 G .577(his mechanism is similar to)-5.577 F F0 .577(pathname e) +3.077 F(xpansion)-.2 E F1 3.078(,b)C .578 +(ut the \214lenames generated need)-3.278 F .266(not e)108 376.8 R 2.766 +(xist. P)-.15 F .266(atterns to be brace e)-.15 F .265 +(xpanded are formed from an optional)-.15 F F0(pr)4.015 E(eamble)-.37 E +F1 2.765(,f).18 G(ollo)-2.765 E .265(wed by either a series)-.25 F 1.315 +(of comma-separated strings or a sequence e)108 388.8 R 1.315 +(xpression between a pair of braces, follo)-.15 F 1.316 +(wed by an optional)-.25 F F0(postscript)109.25 400.8 Q F1 5.66(.T).68 G +.66(he preamble is pre\214x)-5.66 F .659(ed to each string contained wi\ +thin the braces, and the postscript is then)-.15 F +(appended to each resulting string, e)108 412.8 Q +(xpanding left to right.)-.15 E .472(Brace e)108 429.6 R .472 +(xpansions may be nested.)-.15 F .472(The results of each e)5.472 F .473 +(xpanded string are not sorted; brace e)-.15 F .473(xpansion pre-)-.15 F +(serv)108 441.6 Q(es left to right order)-.15 E 5(.F)-.55 G(or e)-5.15 E +(xample, a)-.15 E F2({)A F1(d,c,b)A F2(})A F1 2.5(ee)C +(xpands into \231ade ace abe\232.)-2.65 E 3.149(As)108 458.4 S .649 +(equence e)-3.149 F .649(xpression tak)-.15 F .649(es the form)-.1 F F2 +({)3.149 E F0(x)A F2(..)A F0(y)A F2([..)A F0(incr)A F2(]})A F1 3.149(,w) +C(here)-3.149 E F0(x)3.149 E F1(and)3.149 E F0(y)3.149 E F1 .649 +(are either inte)3.149 F .648(gers or single letters, and)-.15 F F0 +(incr)108 470.4 Q F1 2.615(,a)C 2.615(no)-2.615 G .115 +(ptional increment, is an inte)-2.615 F(ger)-.15 E 5.115(.W)-.55 G .115 +(hen inte)-5.115 F .115(gers are supplied, the e)-.15 F .115 +(xpression e)-.15 F .115(xpands to each num-)-.15 F .911(ber between)108 +482.4 R F0(x)3.411 E F1(and)3.411 E F0(y)3.411 E F1 3.411(,i)C(nclusi) +-3.411 E -.15(ve)-.25 G 5.911(.I).15 G 3.411(fe)-5.911 G(ither)-3.411 E +F0(x)3.411 E F1(or)3.411 E F0(y)3.411 E F1(be)3.41 E .91(gins with)-.15 +F F0(0)3.41 E F1 3.41(,e)C .91(ach generated term will contain the same) +-3.41 F .513(number of digits, zero-padding where necessary)108 494.4 R +5.513(.W)-.65 G .513(hen either)-5.513 F F0(x)3.013 E F1(or)3.014 E F0 +(y)3.014 E F1(be)3.014 E .514(gins with a zero, the shell attempts)-.15 +F .086(to force all generated terms to contain the same number of digit\ +s, zero-padding where necessary)108 506.4 R 5.085(.W)-.65 G .085 +(hen let-)-5.085 F .16(ters are supplied, the e)108 518.4 R .16 +(xpression e)-.15 F .161(xpands to each character le)-.15 F .161 +(xicographically between)-.15 F F0(x)2.661 E F1(and)2.661 E F0(y)2.661 E +F1 2.661(,i)C(nclusi)-2.661 E -.15(ve)-.25 G 2.661(,u).15 G(s-)-2.661 E +.485(ing the def)108 530.4 R .485(ault C locale.)-.1 F .485 +(Note that both)5.485 F F0(x)2.985 E F1(and)2.985 E F0(y)2.985 E F1 .484 +(must be of the same type \(inte)2.985 F .484(ger or letter\).)-.15 F +.484(When the in-)5.484 F .271 +(crement is supplied, it is used as the dif)108 542.4 R .271 +(ference between each term.)-.25 F .271(The def)5.271 F .271 +(ault increment is 1 or \2551 as ap-)-.1 F(propriate.)108 554.4 Q .582 +(Brace e)108 571.2 R .582(xpansion is performed before an)-.15 F 3.082 +(yo)-.15 G .581(ther e)-3.082 F .581(xpansions, and an)-.15 F 3.081(yc) +-.15 G .581(haracters special to other e)-3.081 F(xpansions)-.15 E .015 +(are preserv)108 583.2 R .015(ed in the result.)-.15 F .015 +(It is strictly te)5.015 F(xtual.)-.15 E F2(Bash)5.016 E F1 .016 +(does not apply an)2.516 F 2.516(ys)-.15 G .016 +(yntactic interpretation to the con-)-2.516 F(te)108 595.2 Q +(xt of the e)-.15 E(xpansion or the te)-.15 E(xt between the braces.) +-.15 E 2.502(Ac)108 612 S .002(orrectly-formed brace e)-2.502 F .001(xp\ +ansion must contain unquoted opening and closing braces, and at least o\ +ne un-)-.15 F(quoted comma or a v)108 624 Q(alid sequence e)-.25 E 2.5 +(xpression. An)-.15 F 2.5(yi)-.15 G(ncorrectly formed brace e)-2.5 E +(xpansion is left unchanged.)-.15 E(A)108 640.8 Q F2({)2.521 E F1(or) +2.521 E F2(,)2.521 E F1 .021(may be quoted with a backslash to pre)2.521 +F -.15(ve)-.25 G .022(nt its being considered part of a brace e).15 F +2.522(xpression. T)-.15 F 2.522(oa)-.8 G -.2(vo)-2.722 G(id).2 E .172 +(con\215icts with parameter e)108 652.8 R .172(xpansion, the string)-.15 +F F2(${)2.672 E F1 .172(is not considered eligible for brace e)2.672 F +.172(xpansion, and inhibits)-.15 F(brace e)108 664.8 Q +(xpansion until the closing)-.15 E F2(})2.5 E F1(.)A 1.476(This constru\ +ct is typically used as shorthand when the common pre\214x of the strin\ +gs to be generated is)108 681.6 R(longer than in the abo)108 693.6 Q .3 +-.15(ve ex)-.15 H(ample:).15 E(mkdir /usr/local/src/bash/{old,ne)144 +710.4 Q -.65(w,)-.25 G(dist,b).65 E(ugs})-.2 E(or)108 722.4 Q +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(23)185.955 E 0 Cg EP +%%Page: 24 24 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(cho)144 84 Q(wn root /usr/{ucb/{e)-.25 E +(x,edit},lib/{e)-.15 E(x?.?*,ho)-.15 E(w_e)-.25 E(x}})-.15 E .618 +(Brace e)108 100.8 R .618 +(xpansion introduces a slight incompatibility with historical v)-.15 F +.618(ersions of)-.15 F/F2 10/Times-Bold@0 SF(sh)3.118 E F1(.)A F2(sh) +5.618 E F1 .618(does not treat open-)3.118 F .247 +(ing or closing braces specially when the)108 112.8 R 2.747(ya)-.15 G +.247(ppear as part of a w)-2.747 F .248(ord, and preserv)-.1 F .248 +(es them in the output.)-.15 F F2(Bash)5.248 E F1(remo)108 124.8 Q -.15 +(ve)-.15 G 3.53(sb).15 G 1.03(races from w)-3.53 F 1.03 +(ords as a consequence of brace e)-.1 F 3.53(xpansion. F)-.15 F 1.03 +(or e)-.15 F 1.03(xample, a w)-.15 F 1.03(ord entered to)-.1 F F2(sh) +3.53 E F1(as)3.53 E F0(\214le{1,2})108 136.8 Q F1 .061 +(appears identically in the output.)2.561 F F2(Bash)5.061 E F1 .061 +(outputs that w)2.561 F .061(ord as)-.1 F F0 .061(\214le1 \214le2)4.471 +F F1 .062(after brace e)2.582 F 2.562(xpansion. Start)-.15 F F2(bash)108 +148.8 Q F1 .845(with the)3.345 F F2(+B)3.345 E F1 .845 +(option or disable brace e)3.345 F .845(xpansion with the)-.15 F F2(+B) +3.345 E F1 .845(option to the)3.345 F F2(set)3.344 E F1 .844 +(command \(see)3.344 F/F3 9/Times-Bold@0 SF(SHELL)3.344 E -.09(BU)108 +160.8 S(IL).09 E(TIN COMMANDS)-.828 E F1(belo)2.25 E(w\) for strict)-.25 +E F2(sh)2.5 E F1(compatibility)2.5 E(.)-.65 E F2 -.18(Ti)87 177.6 S +(lde Expansion).18 E F1 .845(If a w)108 189.6 R .846(ord be)-.1 F .846 +(gins with an unquoted tilde character \(\231)-.15 F F2<01>A F1 .846 +(\232\), all of the characters preceding the \214rst unquoted)B .185(sl\ +ash \(or all characters, if there is no unquoted slash\) are considered\ + a)108 201.6 R F0(tilde-pr)2.685 E(e\214x)-.37 E F1 5.185(.I)C 2.685(fn) +-5.185 G .185(one of the characters)-2.685 F .725(in the tilde-pre\214x\ + are quoted, the characters in the tilde-pre\214x follo)108 213.6 R .726 +(wing the tilde are treated as a possible)-.25 F F0(lo)108 225.6 Q .523 +(gin name)-.1 F F1 5.523(.I)C 3.023(ft)-5.523 G .523 +(his login name is the null string, the tilde is replaced with the v) +-3.023 F .522(alue of the shell parameter)-.25 F F3(HOME)108 237.6 Q/F4 +9/Times-Roman@0 SF(.)A F1(If)5.076 E F3(HOME)3.076 E F1 .577 +(is unset, the tilde e)2.827 F .577 +(xpands to the home directory of the user e)-.15 F -.15(xe)-.15 G .577 +(cuting the shell instead.).15 F(Otherwise, the tilde-pre\214x is repla\ +ced with the home directory associated with the speci\214ed login name.) +108 249.6 Q .368(If the tilde-pre\214x is a \231\001+\232, the v)108 +266.4 R .368(alue of the shell v)-.25 F(ariable)-.25 E F3(PWD)2.868 E F1 +.368(replaces the tilde-pre\214x.)2.618 F .368(If the tilde-pre\214x) +5.368 F .227(is a \231\001\255\232, the shell substitutes the v)108 +278.4 R .227(alue of the shell v)-.25 F(ariable)-.25 E F3(OLDPWD)2.727 E +F4(,)A F1 .227(if it is set.)2.477 F .227(If the characters follo)5.227 +F(w-)-.25 E .296 +(ing the tilde in the tilde-pre\214x consist of a number)108 290.4 R F0 +(N)2.796 E F1 2.796(,o)C .296(ptionally pre\214x)-2.796 F .296 +(ed by a \231+\232 or a \231\255\232, the tilde-pre\214x)-.15 F .813(is\ + replaced with the corresponding element from the directory stack, as i\ +t w)108 302.4 R .814(ould be displayed by the)-.1 F F2(dirs)3.314 E F1 +-.2(bu)108 314.4 S .699(iltin in).2 F -.2(vo)-.4 G -.1(ke).2 G 3.199(dw) +.1 G .699(ith the characters follo)-3.199 F .699 +(wing the tilde in the tilde-pre\214x as an ar)-.25 F 3.198(gument. If) +-.18 F .698(the characters)3.198 F(follo)108 326.4 Q .482(wing the tild\ +e in the tilde-pre\214x consist of a number without a leading \231+\232\ + or \231\255\232, tilde e)-.25 F .482(xpansion as-)-.15 F +(sumes \231+\232.)108 338.4 Q .54(The results of tilde e)108 355.2 R .54 +(xpansion are treated as if the)-.15 F 3.04(yw)-.15 G .54 +(ere quoted, so the replacement is not subject to w)-3.04 F(ord)-.1 E +(splitting and pathname e)108 367.2 Q(xpansion.)-.15 E +(If the login name is in)108 384 Q -.25(va)-.4 G(lid, or the tilde e).25 +E(xpansion f)-.15 E(ails, the tilde-pre\214x is unchanged.)-.1 E F2 +(Bash)108 400.8 Q F1 .578(checks each v)3.078 F .578 +(ariable assignment for unquoted tilde-pre\214x)-.25 F .578 +(es immediately follo)-.15 F .578(wing a)-.25 F F2(:)3.078 E F1 .578 +(or the \214rst)3.078 F F2(=)3.078 E F1(,)A 1.042(and performs tilde e) +108 412.8 R 1.042(xpansion in these cases.)-.15 F(Consequently)6.041 E +3.541(,o)-.65 G 1.041(ne may use \214lenames with tildes in assign-) +-3.541 F(ments to)108 424.8 Q F3 -.666(PA)2.5 G(TH)-.189 E F4(,)A F3 +(MAILP)2.25 E -.855(AT)-.666 G(H).855 E F4(,)A F1(and)2.25 E F3(CDP)2.5 +E -.855(AT)-.666 G(H).855 E F4(,)A F1(and the shell assigns the e)2.25 E +(xpanded v)-.15 E(alue.)-.25 E F2(Bash)108 441.6 Q F1 1.768 +(also performs tilde e)4.268 F 1.768(xpansion on w)-.15 F 1.769 +(ords satisfying the conditions of v)-.1 F 1.769 +(ariable assignments \(as de-)-.25 F .464(scribed abo)108 453.6 R .764 +-.15(ve u)-.15 H(nder).15 E F3 -.666(PA)2.964 G(RAMETERS).666 E F4(\))A +F1 .464(when the)2.714 F 2.964(ya)-.15 G .464(ppear as ar)-2.964 F .463 +(guments to simple commands.)-.18 F F2(Bash)5.463 E F1 .463(does not) +2.963 F(do this, e)108 465.6 Q(xcept for the)-.15 E F0(declar)2.5 E +(ation)-.15 E F1(commands listed abo)2.5 E -.15(ve)-.15 G 2.5(,w).15 G +(hen in posix mode.)-2.5 E F2 -.1(Pa)87 482.4 S(rameter Expansion).1 E +F1 .014(The \231)108 494.4 R F2($)A F1 2.514<9a63>C .014 +(haracter introduces parameter e)-2.514 F .014 +(xpansion, command substitution, or arithmetic e)-.15 F 2.515 +(xpansion. The)-.15 F(pa-)2.515 E .314(rameter name or symbol to be e) +108 506.4 R .314 +(xpanded may be enclosed in braces, which are optional b)-.15 F .314 +(ut serv)-.2 F 2.813(et)-.15 G 2.813(op)-2.813 G(rotect)-2.813 E .414 +(the v)108 518.4 R .414(ariable to be e)-.25 F .414 +(xpanded from characters immediately follo)-.15 F .415 +(wing it which could be interpreted as part of)-.25 F(the name.)108 +530.4 Q 1.073 +(When braces are used, the matching ending brace is the \214rst \231)108 +547.2 R F2(})A F1 3.573<9a6e>C 1.072 +(ot escaped by a backslash or within a)-3.573 F .821 +(quoted string, and not within an embedded arithmetic e)108 559.2 R .822 +(xpansion, command substitution, or parameter e)-.15 F(x-)-.15 E +(pansion.)108 571.2 Q(The basic form of parameter e)108 588 Q +(xpansion is)-.15 E(${)108 604.8 Q F0(par)A(ameter)-.15 E F1(})A .285 +(which substitutes the v)108 621.6 R .285(alue of)-.25 F F0(par)2.785 E +(ameter)-.15 E F1 5.285(.T)C .285(he braces are required when)-5.285 F +F0(par)4.034 E(ameter)-.15 E F1 .284(is a positional parame-)3.514 F +.066(ter with more than one digit, or when)108 633.6 R F0(par)3.816 E +(ameter)-.15 E F1 .066(is follo)3.296 F .067 +(wed by a character which is not to be interpreted as)-.25 F .407 +(part of its name.)108 645.6 R(The)5.407 E F0(par)2.907 E(ameter)-.15 E +F1 .406(is a shell parameter as described abo)2.907 F -.15(ve)-.15 G F2 +-.74(PA)3.056 G(RAMETERS).74 E F1 2.906(\)o)C 2.906(ra)-2.906 G 2.906 +(na)-2.906 G .406(rray ref-)-2.906 F(erence \()108 657.6 Q F2(Arrays)A +F1(\).)A .346(If the \214rst character of)108 674.4 R F0(par)2.846 E +(ameter)-.15 E F1 .346(is an e)2.846 F .346(xclamation point \()-.15 F +F2(!)A F1 .346(\), and)B F0(par)2.846 E(ameter)-.15 E F1 .346(is not a) +2.846 F F0(namer)2.846 E(ef)-.37 E F1 2.847(,i)C 2.847(ti)-2.847 G +(ntroduces)-2.847 E 2.907(al)108 686.4 S -2.15 -.25(ev e)-2.907 H 2.907 +(lo).25 G 2.906(fi)-2.907 G(ndirection.)-2.906 E F2(Bash)5.406 E F1 .406 +(uses the v)2.906 F .406(alue formed by e)-.25 F .406 +(xpanding the rest of)-.15 F F0(par)2.906 E(ameter)-.15 E F1 .406 +(as the ne)2.906 F(w)-.25 E F0(par)2.906 E(ame-)-.15 E(ter)108 698.4 Q +F1 2.935(;t)C .435(his ne)-2.935 F 2.935(wp)-.25 G .435 +(arameter is then e)-2.935 F .435(xpanded and that v)-.15 F .436 +(alue is used in the rest of the e)-.25 F .436 +(xpansion, rather than the)-.15 F -.15(ex)108 710.4 S .292 +(pansion of the original).15 F F0(par)2.791 E(ameter)-.15 E F1 5.291(.T) +C .291(his is kno)-5.291 F .291(wn as)-.25 F F0(indir)2.791 E .291 +(ect e)-.37 F(xpansion)-.2 E F1 5.291(.T)C .291(he v)-5.291 F .291 +(alue is subject to tilde e)-.25 F(x-)-.15 E .163(pansion, parameter e) +108 722.4 R .163(xpansion, command substitution, and arithmetic e)-.15 F +2.663(xpansion. If)-.15 F F0(par)2.664 E(ameter)-.15 E F1 .164 +(is a nameref,)2.664 F(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E +(24)185.955 E 0 Cg EP +%%Page: 25 25 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .463(this e)108 84 R .463 +(xpands to the name of the parameter referenced by)-.15 F F0(par)2.962 E +(ameter)-.15 E F1 .462(instead of performing the complete in-)2.962 F +3.635(direct e)108 96 R 3.635(xpansion, for compatibility)-.15 F 8.635 +(.T)-.65 G 3.635(he e)-8.635 F 3.635(xceptions to this are the e)-.15 F +3.636(xpansions of ${)-.15 F/F2 10/Times-Bold@0 SF(!)A F0(pr)A(e\214x) +-.37 E F2(*)A F1 6.136(}a)C(nd)-6.136 E(${)108 108 Q F2(!)A F0(name)A F1 +([)A F0(@)A F1 .763(]} described belo)B 4.563 -.65(w. T)-.25 H .763 +(he e).65 F .763(xclamation point must immediately follo)-.15 F 3.263 +(wt)-.25 G .763(he left brace in order to)-3.263 F +(introduce indirection.)108 120 Q .334(In each of the cases belo)108 +136.8 R -.65(w,)-.25 G F0(wor)3.484 E(d)-.37 E F1 .334 +(is subject to tilde e)2.834 F .334(xpansion, parameter e)-.15 F .334 +(xpansion, command substitution,)-.15 F(and arithmetic e)108 148.8 Q +(xpansion.)-.15 E .067(When not performing substring e)108 165.6 R .067 +(xpansion, using the forms documented belo)-.15 F 2.567(w\()-.25 G +(e.g.,)-2.567 E F2(:-)2.567 E F1(\),)A F2(bash)2.567 E F1 .066 +(tests for a pa-)2.567 F(rameter that is unset or null.)108 177.6 Q +(Omitting the colon tests only for a parameter that is unset.)5 E(${)108 +194.4 Q F0(par)A(ameter)-.15 E F2<3aad>A F0(wor)A(d)-.37 E F1(})A F2 +.722(Use Default V)144 206.4 R(alues)-.92 E F1 5.722(.I)C(f)-5.722 E F0 +(par)4.472 E(ameter)-.15 E F1 .723(is unset or null, the e)3.952 F .723 +(xpansion of)-.15 F F0(wor)3.563 E(d)-.37 E F1 .723(is substituted.) +3.993 F(Other)5.723 E(-)-.2 E(wise, the v)144 218.4 Q(alue of)-.25 E F0 +(par)3.75 E(ameter)-.15 E F1(is substituted.)3.23 E(${)108 235.2 Q F0 +(par)A(ameter)-.15 E F2(:=)A F0(wor)A(d)-.37 E F1(})A F2 .266 +(Assign Default V)144 247.2 R(alues)-.92 E F1 5.266(.I)C(f)-5.266 E F0 +(par)4.016 E(ameter)-.15 E F1 .266(is unset or null, the e)3.496 F .265 +(xpansion of)-.15 F F0(wor)3.105 E(d)-.37 E F1 .265(is assigned to)3.535 +F F0(par)4.015 E(a-)-.15 E(meter)144 259.2 Q F1 2.957(,a).73 G .457 +(nd the e)-2.957 F .458(xpansion is the \214nal v)-.15 F .458(alue of) +-.25 F F0(par)4.208 E(ameter)-.15 E F1 5.458(.P).73 G .458 +(ositional parameters and special para-)-5.458 F +(meters may not be assigned in this w)144 271.2 Q(ay)-.1 E(.)-.65 E(${) +108 288 Q F0(par)A(ameter)-.15 E F2(:?)A F0(wor)A(d)-.37 E F1(})A F2 +.725(Display Err)144 300 R .724(or if Null or Unset)-.18 F F1 5.724(.I)C +(f)-5.724 E F0(par)4.474 E(ameter)-.15 E F1 .724 +(is null or unset, the shell writes the e)3.954 F .724(xpansion of)-.15 +F F0(wor)144 312 Q(d)-.37 E F1 .292(\(or a message to that ef)2.792 F +.292(fect if)-.25 F F0(wor)3.132 E(d)-.37 E F1 .293 +(is not present\) to the standard error and, if it is not inter)3.562 F +(-)-.2 E(acti)144 324 Q -.15(ve)-.25 G 3.639(,e).15 G 1.138 +(xits with a non-zero status.)-3.789 F 1.138(An interacti)6.138 F 1.438 +-.15(ve s)-.25 H 1.138(hell does not e).15 F 1.138(xit, b)-.15 F 1.138 +(ut does not e)-.2 F -.15(xe)-.15 G 1.138(cute the).15 F +(command associated with the e)144 336 Q 2.5(xpansion. Otherwise,)-.15 F +(the v)2.5 E(alue of)-.25 E F0(par)2.5 E(ameter)-.15 E F1 +(is substituted.)2.5 E(${)108 352.8 Q F0(par)A(ameter)-.15 E F2(:+)A F0 +(wor)A(d)-.37 E F1(})A F2 .745(Use Alter)144 364.8 R .745(nate V)-.15 F +(alue)-.92 E F1 5.745(.I)C(f)-5.745 E F0(par)4.495 E(ameter)-.15 E F1 +.745(is null or unset, nothing is substituted, otherwise the e)3.975 F +(xpan-)-.15 E(sion of)144 376.8 Q F0(wor)2.84 E(d)-.37 E F1 +(is substituted.)3.27 E(The v)5 E(alue of)-.25 E F0(par)2.5 E(ameter) +-.15 E F1(is not used.)2.5 E(${)108 393.6 Q F0(par)A(ameter)-.15 E F2(:) +A F0(of)A(fset)-.18 E F1(})A(${)108 405.6 Q F0(par)A(ameter)-.15 E F2(:) +A F0(of)A(fset)-.18 E F2(:)A F0(length)A F1(})A F2 .002 +(Substring Expansion)144 417.6 R F1 5.002(.E)C .002(xpands to up to) +-5.002 F F0(length)2.502 E F1 .002(characters of the v)2.502 F .002 +(alue of)-.25 F F0(par)2.502 E(ameter)-.15 E F1 .002(starting at the) +2.502 F .003(character speci\214ed by)144 429.6 R F0(of)2.503 E(fset) +-.18 E F1 5.003(.I)C(f)-5.003 E F0(par)2.503 E(ameter)-.15 E F1(is)2.503 +E F2(@)2.503 E F1(or)2.503 E F2(*)2.503 E F1 2.503(,a)C 2.503(ni)-2.503 +G(nde)-2.503 E -.15(xe)-.15 G 2.503(da).15 G .003(rray subscripted by) +-2.503 F F2(@)2.503 E F1(or)2.503 E F2(*)2.504 E F1 2.504(,o)C 2.504(ra) +-2.504 G(n)-2.504 E(associati)144 441.6 Q 1.022 -.15(ve a)-.25 H .722 +(rray name, the results dif).15 F .722(fer as described belo)-.25 F +4.522 -.65(w. I)-.25 H(f).65 E F0(length)3.222 E F1 .722(is omitted, e) +3.222 F .722(xpands to the)-.15 F .042(substring of the v)144 453.6 R +.042(alue of)-.25 F F0(par)2.542 E(ameter)-.15 E F1 .043 +(starting at the character speci\214ed by)2.542 F F0(of)2.543 E(fset) +-.18 E F1 .043(and e)2.543 F .043(xtending to the)-.15 F .847 +(end of the v)144 465.6 R(alue.)-.25 E F0(length)5.846 E F1(and)3.346 E +F0(of)3.346 E(fset)-.18 E F1 .846(are arithmetic e)3.346 F .846 +(xpressions \(see)-.15 F/F3 9/Times-Bold@0 SF .846(ARITHMETIC EV)3.346 F +(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E F1(belo)144 477.6 Q(w\).)-.25 E +(If)144 494.4 Q F0(of)3.028 E(fset)-.18 E F1 -.25(eva)3.029 G .529 +(luates to a number less than zero, the v).25 F .529 +(alue is used as an of)-.25 F .529(fset in characters from the)-.25 F +.046(end of the v)144 506.4 R .046(alue of)-.25 F F0(par)2.546 E(ameter) +-.15 E F1 5.046(.I)C(f)-5.046 E F0(length)2.546 E F1 -.25(eva)2.546 G +.046(luates to a number less than zero, it is interpreted as an).25 F +(of)144 518.4 Q .202(fset in characters from the end of the v)-.25 F +.202(alue of)-.25 F F0(par)2.702 E(ameter)-.15 E F1 .203 +(rather than a number of characters, and)2.702 F .558(the e)144 530.4 R +.558(xpansion is the characters between)-.15 F F0(of)3.058 E(fset)-.18 E +F1 .558(and that result.)3.058 F .557(Note that a ne)5.557 F -.05(ga) +-.15 G(ti).05 E .857 -.15(ve o)-.25 H -.25(ff).15 G .557(set must be).25 +F(separated from the colon by at least one space to a)144 542.4 Q -.2 +(vo)-.2 G(id being confused with the).2 E F2(:-)2.5 E F1 -.15(ex)2.5 G +(pansion.).15 E(If)144 559.2 Q F0(par)3.283 E(ameter)-.15 E F1(is)3.283 +E F2(@)3.283 E F1(or)3.283 E F2(*)3.284 E F1 3.284(,t)C .784 +(he result is)-3.284 F F0(length)3.284 E F1 .784 +(positional parameters be)3.284 F .784(ginning at)-.15 F F0(of)3.284 E +(fset)-.18 E F1 5.784(.A)C(ne)-2.5 E -.05(ga)-.15 G(ti).05 E -.15(ve) +-.25 G F0(of)144 571.2 Q(fset)-.18 E F1 .167(is tak)2.667 F .167 +(en relati)-.1 F .467 -.15(ve t)-.25 H 2.667(oo).15 G .167 +(ne greater than the greatest positional parameter)-2.667 F 2.666(,s)-.4 +G 2.666(oa)-2.666 G 2.666(no)-2.666 G -.25(ff)-2.666 G .166 +(set of \2551 e).25 F -.25(va)-.25 G(l-).25 E .023(uates to the last po\ +sitional parameter \(or 0 if there are no positional parameters\).)144 +583.2 R .023(It is an e)5.023 F(xpansion)-.15 E(error if)144 595.2 Q F0 +(length)2.5 E F1 -.25(eva)2.5 G(luates to a number less than zero.).25 E +(If)144 612 Q F0(par)3.014 E(ameter)-.15 E F1 .514(is an inde)3.014 F +-.15(xe)-.15 G 3.014(da).15 G .514 +(rray name subscripted by @ or *, the result is the)-3.014 F F0(length) +3.014 E F1 .513(members of)3.013 F 1.081(the array be)144 624 R 1.081 +(ginning with ${)-.15 F F0(par)A(ameter)-.15 E F1([)A F0(of)A(fset)-.18 +E F1 3.581(]}. A)B(ne)3.581 E -.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G F0 +(of)3.732 E(fset)-.18 E F1 1.082(is tak)3.582 F 1.082(en relati)-.1 F +1.382 -.15(ve t)-.25 H 3.582(oo).15 G 1.082(ne greater)-3.582 F 1.08 +(than the maximum inde)144 636 R 3.58(xo)-.15 G 3.58(ft)-3.58 G 1.08 +(he speci\214ed array)-3.58 F 6.079(.I)-.65 G 3.579(ti)-6.079 G 3.579 +(sa)-3.579 G 3.579(ne)-3.579 G 1.079(xpansion error if)-3.729 F F0 +(length)3.579 E F1 -.25(eva)3.579 G 1.079(luates to a).25 F +(number less than zero.)144 648 Q(Substring e)144 664.8 Q +(xpansion applied to an associati)-.15 E .3 -.15(ve a)-.25 H +(rray produces unde\214ned results.).15 E .82(Substring inde)144 681.6 R +.821(xing is zero-based unless the positional parameters are used, in w\ +hich case the in-)-.15 F(de)144 693.6 Q .159(xing starts at 1 by def) +-.15 F 2.659(ault. If)-.1 F F0(of)2.659 E(fset)-.18 E F1 .159 +(is 0, and the positional parameters are used,)2.659 F F2($0)2.659 E F1 +.159(is pre\214x)2.659 F .158(ed to)-.15 F(the list.)144 705.6 Q +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(25)185.955 E 0 Cg EP +%%Page: 26 26 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(${)108 84 Q/F2 10/Times-Bold@0 SF(!)A F0(pr)A +(e\214x)-.37 E F2(*)A F1(})A(${)108 96 Q F2(!)A F0(pr)A(e\214x)-.37 E F2 +(@)A F1(})A F2 .084(Names matching pr)144 108 R(e\214x)-.18 E F1 5.084 +(.E)C .084(xpands to the names of v)-5.084 F .084 +(ariables whose names be)-.25 F .085(gin with)-.15 F F0(pr)2.585 E +(e\214x)-.37 E F1 2.585(,s)C(epa-)-2.585 E .258 +(rated by the \214rst character of the)144 120 R/F3 9/Times-Bold@0 SF +(IFS)2.758 E F1 .257(special v)2.507 F 2.757(ariable. When)-.25 F F0(@) +2.757 E F1 .257(is used and the e)2.757 F .257(xpansion appears)-.15 F +(within double quotes, each v)144 132 Q(ariable name e)-.25 E +(xpands to a separate w)-.15 E(ord.)-.1 E(${)108 148.8 Q F2(!)A F0(name) +A F1([)A F0(@)A F1(]})A(${)108 160.8 Q F2(!)A F0(name)A F1([)A F0(*)A F1 +(]})A F2 1.136(List of array k)144 172.8 R(eys)-.1 E F1 6.136(.I)C(f) +-6.136 E F0(name)3.636 E F1 1.136(is an array v)3.636 F 1.136 +(ariable, e)-.25 F 1.136(xpands to the list of array indices \(k)-.15 F +-.15(ey)-.1 G 1.137(s\) as-).15 F .397(signed in)144 184.8 R F0(name) +2.897 E F1 5.397(.I)C(f)-5.397 E F0(name)2.897 E F1 .397 +(is not an array)2.897 F 2.897(,e)-.65 G .397(xpands to 0 if)-3.047 F F0 +(name)2.897 E F1 .397(is set and null otherwise.)2.897 F(When)5.397 E F0 +(@)2.897 E F1(is used and the e)144 196.8 Q +(xpansion appears within double quotes, each k)-.15 E .3 -.15(ey ex)-.1 +H(pands to a separate w).15 E(ord.)-.1 E(${)108 213.6 Q F2(#)A F0(par)A +(ameter)-.15 E F1(})A F2 -.1(Pa)144 225.6 S 1.18(rameter length).1 F F1 +6.18(.S)C 1.18(ubstitutes the length in characters of the e)-6.18 F 1.18 +(xpanded v)-.15 F 1.18(alue of)-.25 F F0(par)3.68 E(ameter)-.15 E F1 +6.18(.I)C(f)-6.18 E F0(par)145.25 237.6 Q(ameter)-.15 E F1(is)3.282 E F2 +(*)2.552 E F1(or)2.552 E F2(@)2.552 E F1 2.552(,t)C .052(he v)-2.552 F +.052(alue substituted is the number of positional parameters.)-.25 F(If) +5.052 E F0(par)3.801 E(ameter)-.15 E F1(is)3.281 E .333 +(an array name subscripted by)144 249.6 R F2(*)2.833 E F1(or)2.833 E F2 +(@)2.833 E F1 2.833(,t)C .333(he v)-2.833 F .334 +(alue substituted is the number of elements in the array)-.25 F(.)-.65 E +(If)144 261.6 Q F0(par)5.022 E(ameter)-.15 E F1 1.272(is an inde)4.502 F +-.15(xe)-.15 G 3.772(da).15 G 1.272(rray name subscripted by a ne)-3.772 +F -.05(ga)-.15 G(ti).05 E 1.572 -.15(ve n)-.25 H(umber).15 E 3.772(,t) +-.4 G 1.272(hat number is inter)-3.772 F(-)-.2 E .565(preted as relati) +144 273.6 R .865 -.15(ve t)-.25 H 3.065(oo).15 G .565 +(ne greater than the maximum inde)-3.065 F 3.065(xo)-.15 G(f)-3.065 E F0 +(par)3.066 E(ameter)-.15 E F1 3.066(,s)C 3.066(on)-3.066 G -2.25 -.15 +(eg a)-3.066 H(ti).15 E .866 -.15(ve i)-.25 H .566(ndices count).15 F +(back from the end of the array)144 285.6 Q 2.5(,a)-.65 G(nd an inde) +-2.5 E 2.5(xo)-.15 G 2.5<66ad>-2.5 G 2.5(1r)-2.5 G +(eferences the last element.)-2.5 E(${)108 302.4 Q F0(par)A(ameter)-.15 +E F2(#)A F0(wor)A(d)-.37 E F1(})A(${)108 314.4 Q F0(par)A(ameter)-.15 E +F2(##)A F0(wor)A(d)-.37 E F1(})A F2(Remo)144 326.4 Q 1.396 -.1(ve m)-.1 +H 1.196(atching pr).1 F 1.196(e\214x patter)-.18 F(n)-.15 E F1 6.196(.T) +C(he)-6.196 E F0(wor)4.036 E(d)-.37 E F1 1.196(is e)4.466 F 1.196 +(xpanded to produce a pattern just as in path-)-.15 F .543(name e)144 +338.4 R .544(xpansion, and matched ag)-.15 F .544(ainst the e)-.05 F +.544(xpanded v)-.15 F .544(alue of)-.25 F F0(par)4.294 E(ameter)-.15 E +F1 .544(using the rules described)3.774 F(under)144 350.4 Q F2 -.1(Pa) +3.133 G(tter).1 E 3.133(nM)-.15 G(atching)-3.133 E F1(belo)3.132 E 4.432 +-.65(w. I)-.25 H 3.132(ft).65 G .632(he pattern matches the be)-3.132 F +.632(ginning of the v)-.15 F .632(alue of)-.25 F F0(par)4.382 E(ameter) +-.15 E F1(,).73 E 1.151(then the result of the e)144 362.4 R 1.151 +(xpansion is the e)-.15 F 1.151(xpanded v)-.15 F 1.151(alue of)-.25 F F0 +(par)4.902 E(ameter)-.15 E F1 1.152(with the shortest matching)4.382 F +.554(pattern \(the \231#\232 case\) or the longest matching pattern \(t\ +he \231##\232 case\) deleted.)144 374.4 R(If)5.553 E F0(par)4.303 E +(ameter)-.15 E F1(is)3.783 E F2(@)3.053 E F1(or)144 386.4 Q F2(*)3.018 E +F1 3.018(,t)C .518(he pattern remo)-3.018 F -.25(va)-.15 G 3.018(lo).25 +G .518 +(peration is applied to each positional parameter in turn, and the e) +-3.018 F(xpan-)-.15 E .304(sion is the resultant list.)144 398.4 R(If) +5.304 E F0(par)4.054 E(ameter)-.15 E F1 .303(is an array v)3.533 F .303 +(ariable subscripted with)-.25 F F2(@)2.803 E F1(or)2.803 E F2(*)2.803 E +F1 2.803(,t)C .303(he pattern re-)-2.803 F(mo)144 410.4 Q -.25(va)-.15 G +2.987(lo).25 G .487 +(peration is applied to each member of the array in turn, and the e) +-2.987 F .487(xpansion is the resultant)-.15 F(list.)144 422.4 Q(${)108 +439.2 Q F0(par)A(ameter)-.15 E F2(%)A F0(wor)A(d)-.37 E F1(})A(${)108 +451.2 Q F0(par)A(ameter)-.15 E F2(%%)A F0(wor)A(d)-.37 E F1(})A F2(Remo) +144 463.2 Q .347 -.1(ve m)-.1 H .147(atching suf\214x patter).1 F(n)-.15 +E F1 5.147(.T)C(he)-5.147 E F0(wor)2.647 E(d)-.37 E F1 .147(is e)2.647 F +.146(xpanded to produce a pattern just as in pathname)-.15 F -.15(ex)144 +475.2 S .458(pansion, and matched ag).15 F .458(ainst the e)-.05 F .458 +(xpanded v)-.15 F .458(alue of)-.25 F F0(par)4.209 E(ameter)-.15 E F1 +.459(using the rules described under)3.689 F F2 -.1(Pa)144 487.2 S(tter) +.1 E 2.732(nM)-.15 G(atching)-2.732 E F1(belo)2.732 E 4.032 -.65(w. I) +-.25 H 2.732(ft).65 G .231 +(he pattern matches a trailing portion of the e)-2.732 F .231(xpanded v) +-.15 F .231(alue of)-.25 F F0(par)3.981 E(a-)-.15 E(meter)144 499.2 Q F1 +4.399(,t).73 G 1.899(hen the result of the e)-4.399 F 1.899 +(xpansion is the e)-.15 F 1.899(xpanded v)-.15 F 1.9(alue of)-.25 F F0 +(par)5.65 E(ameter)-.15 E F1 1.9(with the shortest)5.13 F .019(matching\ + pattern \(the \231%\232 case\) or the longest matching pattern \(the \ +\231%%\232 case\) deleted.)144 511.2 R(If)5.019 E F0(par)3.769 E(a-)-.15 +E(meter)144 523.2 Q F1(is)3.559 E F2(@)2.829 E F1(or)2.829 E F2(*)2.829 +E F1 2.829(,t)C .329(he pattern remo)-2.829 F -.25(va)-.15 G 2.829(lo) +.25 G .33(peration is applied to each positional parameter in turn, and) +-2.829 F .64(the e)144 535.2 R .64(xpansion is the resultant list.)-.15 +F(If)5.64 E F0(par)4.39 E(ameter)-.15 E F1 .64(is an array v)3.87 F .64 +(ariable subscripted with)-.25 F F2(@)3.14 E F1(or)3.14 E F2(*)3.14 E F1 +3.14(,t)C(he)-3.14 E .422(pattern remo)144 547.2 R -.25(va)-.15 G 2.922 +(lo).25 G .422 +(peration is applied to each member of the array in turn, and the e) +-2.922 F .423(xpansion is the)-.15 F(resultant list.)144 559.2 Q(${)108 +576 Q F0(par)A(ameter)-.15 E F2(/)A F0(pattern)A F2(/)A F0(string)A F1 +(})A(${)108 588 Q F0(par)A(ameter)-.15 E F2(//)A F0(pattern)A F2(/)A F0 +(string)A F1(})A(${)108 600 Q F0(par)A(ameter)-.15 E F2(/#)A F0(pattern) +A F2(/)A F0(string)A F1(})A(${)108 612 Q F0(par)A(ameter)-.15 E F2(/%)A +F0(pattern)A F2(/)A F0(string)A F1(})A F2 -.1(Pa)144 624 S(tter).1 E +2.654(ns)-.15 G(ubstitution)-2.654 E F1 5.154(.T)C(he)-5.154 E F0 +(pattern)2.654 E F1 .154(is e)2.654 F .153 +(xpanded to produce a pattern just as in pathname e)-.15 F(xpansion)-.15 +E 1.452(and matched ag)144 636 R 1.452(ainst the e)-.05 F 1.452 +(xpanded v)-.15 F 1.452(alue of)-.25 F F0(par)3.952 E(ameter)-.15 E F1 +1.453(using the rules described under)3.952 F F2 -.1(Pa)3.953 G(tter).1 +E(n)-.15 E(Matching)144 648 Q F1(belo)4.037 E 5.337 -.65(w. T)-.25 H +1.537(he longest match of).65 F F0(pattern)4.037 E F1 1.536(in the e) +4.036 F 1.536(xpanded v)-.15 F 1.536(alue is replaced with)-.25 F F0 +(string)4.036 E F1(.)A F0(string)144 660 Q F1(under)3.778 E 1.278 +(goes tilde e)-.18 F 1.278(xpansion, parameter and v)-.15 F 1.278 +(ariable e)-.25 F 1.278(xpansion, arithmetic e)-.15 F 1.278 +(xpansion, com-)-.15 F(mand and process substitution, and quote remo)144 +672 Q -.25(va)-.15 G(l.).25 E .652(In the \214rst form abo)144 688.8 R +-.15(ve)-.15 G 3.151(,o).15 G .651(nly the \214rst match is replaced.) +-3.151 F .651(If there are tw)5.651 F 3.151(os)-.1 G .651 +(lashes separating)-3.151 F F0(par)3.151 E(a-)-.15 E(meter)144 700.8 Q +F1(and)2.673 E F0(pattern)2.673 E F1 .173(\(the second form abo)2.673 F +-.15(ve)-.15 G .173(\), all matches of).15 F F0(pattern)2.673 E F1 .173 +(are replaced with)2.673 F F0(string)2.673 E F1 5.174(.I)C(f)-5.174 E F0 +(pat-)2.674 E(tern)144 712.8 Q F1 .277(is preceded by)2.777 F F2(#)2.776 +E F1 .276(\(the third form abo)2.776 F -.15(ve)-.15 G .276 +(\), it must match at the be).15 F .276(ginning of the e)-.15 F .276 +(xpanded v)-.15 F(alue)-.25 E(of)144 724.8 Q F0(par)2.638 E(ameter)-.15 +E F1 5.138(.I)C(f)-5.138 E F0(pattern)2.638 E F1 .138(is preceded by) +2.638 F F2(%)2.638 E F1 .138(\(the fourth form abo)2.638 F -.15(ve)-.15 +G .139(\), it must match at the end of the).15 F(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(26)185.955 E 0 Cg EP +%%Page: 27 27 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E -.15(ex)144 84 S(panded v).15 E(alue of)-.25 E F0 +(par)2.5 E(ameter)-.15 E F1(.)A .034(If the e)144 100.8 R .034 +(xpansion of)-.15 F F0(string)2.534 E F1 .034(is null, matches of)2.534 +F F0(pattern)2.534 E F1 .034(are deleted and the)2.534 F/F2 10 +/Times-Bold@0 SF(/)2.534 E F1(follo)2.534 E(wing)-.25 E F0(pattern)2.534 +E F1 .033(may be)2.533 F(omitted.)144 112.8 Q .95(If the)144 129.6 R F2 +(patsub_r)3.45 E(eplacement)-.18 E F1 .95(shell option is enabled using) +3.45 F F2(shopt)3.45 E F1 3.45(,a)C 1.25 -.15(ny u)-3.45 H .95 +(nquoted instances of).15 F F2(&)3.45 E F1(in)3.45 E F0(string)144 141.6 +Q F1(are replaced with the matching portion of)2.5 E F0(pattern)2.5 E F1 +(.)A .75(Quoting an)144 158.4 R 3.25(yp)-.15 G .75(art of)-3.25 F F0 +(string)3.25 E F1 .749(inhibits replacement in the e)3.249 F .749 +(xpansion of the quoted portion, including)-.15 F .808 +(replacement strings stored in shell v)144 170.4 R 3.308 +(ariables. Backslash)-.25 F(escapes)3.308 E F2(&)3.308 E F1(in)3.308 E +F0(string)3.308 E F1 3.308(;t)C .808(he backslash is re-)-3.308 F(mo)144 +182.4 Q -.15(ve)-.15 G 3.101(di).15 G 3.101(no)-3.101 G .601 +(rder to permit a literal)-3.101 F F2(&)3.101 E F1 .601 +(in the replacement string.)3.101 F .6 +(Backslash can also be used to es-)5.6 F 1.428(cape a backslash;)144 +194.4 R F2(\\\\)3.928 E F1 1.428 +(results in a literal backslash in the replacement.)3.928 F 1.428 +(Users should tak)6.428 F 3.929(ec)-.1 G 1.429(are if)-3.929 F F0 +(string)144 206.4 Q F1 .292(is double-quoted to a)2.792 F -.2(vo)-.2 G +.292(id unw).2 F .292 +(anted interactions between the backslash and double-quoting,)-.1 F .053 +(since backslash has special meaning within double quotes.)144 218.4 R +-.15(Pa)5.053 G .054(ttern substitution performs the check).15 F .07 +(for unquoted)144 230.4 R F2(&)2.57 E F1 .07(after e)2.57 F(xpanding) +-.15 E F0(string)2.569 E F1 2.569(;s)C .069 +(hell programmers should quote an)-2.569 F 2.569(yo)-.15 G .069 +(ccurrences of)-2.569 F F2(&)2.569 E F1(the)2.569 E(y)-.15 E -.1(wa)144 +242.4 S 1.112(nt to be tak).1 F 1.112 +(en literally in the replacement and ensure an)-.1 F 3.612(yi)-.15 G +1.112(nstances of)-3.612 F F2(&)3.612 E F1(the)3.612 E 3.613(yw)-.15 G +1.113(ant to be re-)-3.713 F(placed are unquoted.)144 254.4 Q(Lik)144 +271.2 Q 2.547(et)-.1 G .047(he pattern remo)-2.547 F -.25(va)-.15 G +2.547(lo).25 G .047 +(perators, double quotes surrounding the replacement string quote the e) +-2.547 F(x-)-.15 E 1.061(panded characters, while double quotes enclosi\ +ng the entire parameter substitution do not, since)144 283.2 R(the e)144 +295.2 Q(xpansion is performed in a conte)-.15 E(xt that doesn')-.15 E +2.5(tt)-.18 G(ak)-2.5 E 2.5(ea)-.1 G .3 -.15(ny e)-2.5 H +(nclosing double quotes into account.).15 E .687(If the)144 312 R F2 +(nocasematch)3.187 E F1 .687 +(shell option is enabled, the match is performed without re)3.187 F -.05 +(ga)-.15 G .687(rd to the case of).05 F(alphabetic characters.)144 324 Q +(If)144 340.8 Q F0(par)4.334 E(ameter)-.15 E F1(is)3.814 E F2(@)3.084 E +F1(or)3.084 E F2(*)3.084 E F1 3.084(,t)C .585(he substitution operation\ + is applied to each positional parameter in turn,)-3.084 F .51 +(and the e)144 352.8 R .51(xpansion is the resultant list.)-.15 F(If) +5.51 E F0(par)4.259 E(ameter)-.15 E F1 .509(is an array v)3.739 F .509 +(ariable subscripted with)-.25 F F2(@)3.009 E F1(or)3.009 E F2(*)3.009 E +F1(,)A .495(the substitution operation is applied to each member of the\ + array in turn, and the e)144 364.8 R .496(xpansion is the)-.15 F +(resultant list.)144 376.8 Q(${)108 393.6 Q F0(par)A(ameter)-.15 E F2 +<00>A F0(pattern)A F1(})A(${)108 405.6 Q F0(par)A(ameter)-.15 E F2<0000> +A F0(pattern)A F1(})A(${)108 417.6 Q F0(par)A(ameter)-.15 E F2(,)A F0 +(pattern)A F1(})A(${)108 429.6 Q F0(par)A(ameter)-.15 E F2(,,)A F0 +(pattern)A F1(})A F2 .438(Case modi\214cation)144 441.6 R F1 5.438(.T)C +.438(his e)-5.438 F .437 +(xpansion modi\214es the case of alphabetic characters in)-.15 F F0(par) +2.937 E(ameter)-.15 E F1 5.437(.T)C(he)-5.437 E F0(pattern)144 453.6 Q +F1 .373(is e)2.873 F .374 +(xpanded to produce a pattern just as in pathname e)-.15 F 2.874 +(xpansion. Each)-.15 F .374(character in the e)2.874 F(x-)-.15 E .514 +(panded v)144 465.6 R .514(alue of)-.25 F F0(par)3.014 E(ameter)-.15 E +F1 .514(is tested ag)3.014 F(ainst)-.05 E F0(pattern)3.014 E F1 3.014 +(,a)C .513(nd, if it matches the pattern, its case is con-)-3.014 F -.15 +(ve)144 477.6 S 2.5(rted. The).15 F +(pattern should not attempt to match more than one character)2.5 E(.) +-.55 E(The)144 494.4 Q F2<00>3.523 E F1 1.023(operator con)3.523 F -.15 +(ve)-.4 G 1.023(rts lo).15 F 1.023(wercase letters matching)-.25 F F0 +(pattern)3.523 E F1 1.023(to uppercase; the)3.523 F F2(,)3.523 E F1 +1.024(operator con)3.523 F -.15(ve)-.4 G(rts).15 E .013 +(matching uppercase letters to lo)144 506.4 R 2.513(wercase. The)-.25 F +F2<0000>2.513 E F1(and)2.513 E F2(,,)2.513 E F1 -.15(ex)2.513 G .013 +(pansions con).15 F -.15(ve)-.4 G .013(rt each matched character).15 F +.346(in the e)144 518.4 R .346(xpanded v)-.15 F .346(alue; the)-.25 F F2 +<00>2.846 E F1(and)2.846 E F2(,)2.847 E F1 -.15(ex)2.847 G .347 +(pansions match and con).15 F -.15(ve)-.4 G .347 +(rt only the \214rst character in the e).15 F(x-)-.15 E(panded v)144 +530.4 Q 2.5(alue. If)-.25 F F0(pattern)2.5 E F1 +(is omitted, it is treated lik)2.5 E 2.5(ea)-.1 G F2(?)A F1 2.5(,w)C +(hich matches e)-2.5 E -.15(ve)-.25 G(ry character).15 E(.)-.55 E(If)144 +547.2 Q F0(par)4.18 E(ameter)-.15 E F1(is)3.66 E F2(@)2.93 E F1(or)2.93 +E F2(*)2.93 E F1 2.93(,t)C .429(he case modi\214cation operation is app\ +lied to each positional parameter in)-2.93 F .523(turn, and the e)144 +559.2 R .524(xpansion is the resultant list.)-.15 F(If)5.524 E F0(par) +4.274 E(ameter)-.15 E F1 .524(is an array v)3.754 F .524 +(ariable subscripted with)-.25 F F2(@)3.024 E F1(or)144 571.2 Q F2(*) +2.569 E F1 2.569(,t)C .068(he case modi\214cation operation is applied \ +to each member of the array in turn, and the e)-2.569 F(xpan-)-.15 E +(sion is the resultant list.)144 583.2 Q(${)108 600 Q F0(par)A(ameter) +-.15 E F2(@)A F0(oper)A(ator)-.15 E F1(})A F2 -.1(Pa)144 612 S .86 +(rameter transf).1 F(ormation)-.25 E F1 5.86(.T)C .86(he e)-5.86 F .86 +(xpansion is either a transformation of the v)-.15 F .86(alue of)-.25 F +F0(par)3.36 E(ameter)-.15 E F1 .154(or information about)144 624 R F0 +(par)2.654 E(ameter)-.15 E F1 .153(itself, depending on the v)2.654 F +.153(alue of)-.25 F F0(oper)2.653 E(ator)-.15 E F1 5.153(.E)C(ach)-5.153 +E F0(oper)2.653 E(ator)-.15 E F1 .153(is a sin-)2.653 F(gle letter:)144 +636 Q F2(U)144 648 Q F1 .142(The e)180 648 R .142 +(xpansion is a string that is the v)-.15 F .142(alue of)-.25 F F0(par) +2.642 E(ameter)-.15 E F1 .142(with lo)2.642 F .143 +(wercase alphabetic charac-)-.25 F(ters con)180 660 Q -.15(ve)-.4 G +(rted to uppercase.).15 E F2(u)144 672 Q F1 .43(The e)180 672 R .43 +(xpansion is a string that is the v)-.15 F .429(alue of)-.25 F F0(par) +2.929 E(ameter)-.15 E F1 .429(with the \214rst character con)2.929 F +-.15(ve)-.4 G(rted).15 E(to uppercase, if it is alphabetic.)180 684 Q F2 +(L)144 696 Q F1 .124(The e)180 696 R .124 +(xpansion is a string that is the v)-.15 F .124(alue of)-.25 F F0(par) +2.624 E(ameter)-.15 E F1 .125(with uppercase alphabetic charac-)2.625 F +(ters con)180 708 Q -.15(ve)-.4 G(rted to lo).15 E(wercase.)-.25 E +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(27)185.955 E 0 Cg EP +%%Page: 28 28 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(Q)144 84 Q F1 1.065(The e)180 +84 R 1.065(xpansion is a string that is the v)-.15 F 1.065(alue of)-.25 +F F0(par)3.565 E(ameter)-.15 E F1 1.064(quoted in a format that can be) +3.565 F(reused as input.)180 96 Q F2(E)144 108 Q F1 .44(The e)180 108 R +.441(xpansion is a string that is the v)-.15 F .441(alue of)-.25 F F0 +(par)2.941 E(ameter)-.15 E F1 .441(with backslash escape sequences)2.941 +F -.15(ex)180 120 S(panded as with the).15 E F2<2408>2.5 E F1 1.666(...) +C F2<08>-1.666 E F1(quoting mechanism.)2.5 E F2(P)144 132 Q F1 1.073 +(The e)180 132 R 1.073(xpansion is a string that is the result of e)-.15 +F 1.073(xpanding the v)-.15 F 1.073(alue of)-.25 F F0(par)3.573 E +(ameter)-.15 E F1 1.073(as if it)3.573 F(were a prompt string \(see)180 +144 Q F2(PR)2.5 E(OMPTING)-.3 E F1(belo)2.5 E(w\).)-.25 E F2(A)144 156 Q +F1 1.137(The e)180 156 R 1.138 +(xpansion is a string in the form of an assignment statement or)-.15 F +F2(declar)3.638 E(e)-.18 E F1(command)3.638 E(that, if e)180 168 Q -.25 +(va)-.25 G(luated, recreates).25 E F0(par)2.5 E(ameter)-.15 E F1 +(with its attrib)2.5 E(utes and v)-.2 E(alue.)-.25 E F2(K)144 180 Q F1 +1.34(Produces a possibly-quoted v)180 180 R 1.339(ersion of the v)-.15 F +1.339(alue of)-.25 F F0(par)3.839 E(ameter)-.15 E F1 3.839(,e)C 1.339 +(xcept that it prints the)-3.989 F -.25(va)180 192 S .257(lues of inde) +.25 F -.15(xe)-.15 G 2.757(da).15 G .257(nd associati)-2.757 F .557 -.15 +(ve a)-.25 H .257(rrays as a sequence of quoted k).15 F -.15(ey)-.1 G +(-v).15 E .257(alue pairs \(see)-.25 F F2(Ar)2.758 E(-)-.37 E(rays)180 +204 Q F1(abo)2.5 E -.15(ve)-.15 G 2.5(\). The).15 F -.1(ke)2.5 G +(ys and v)-.05 E +(alues are quoted in a format that can be reused as input.)-.25 E F2(a) +144 216 Q F1(The e)180 216 Q +(xpansion is a string consisting of \215ag v)-.15 E(alues representing) +-.25 E F0(par)2.5 E(ameter)-.15 E F1 1.1 -.55('s a)D(ttrib).55 E(utes.) +-.2 E F2(k)144 228 Q F1(Lik)180 228 Q 2.658(et)-.1 G .157 +(he K transformation, b)-2.658 F .157(ut e)-.2 F .157(xpands the k)-.15 +F -.15(ey)-.1 G 2.657(sa).15 G .157(nd v)-2.657 F .157(alues of inde) +-.25 F -.15(xe)-.15 G 2.657(da).15 G .157(nd associati)-2.657 F .457 +-.15(ve a)-.25 H -.2(r-).15 G(rays to separate w)180 240 Q(ords after w) +-.1 E(ord splitting.)-.1 E(If)144 256.8 Q F0(par)4.402 E(ameter)-.15 E +F1(is)3.882 E F2(@)3.152 E F1(or)3.152 E F2(*)3.153 E F1 3.153(,t)C .653 +(he operation is applied to each positional parameter in turn, and the \ +e)-3.153 F(x-)-.15 E .403(pansion is the resultant list.)144 268.8 R(If) +5.403 E F0(par)4.153 E(ameter)-.15 E F1 .403(is an array v)3.633 F .403 +(ariable subscripted with)-.25 F F2(@)2.903 E F1(or)2.903 E F2(*)2.903 E +F1 2.903(,t)C .402(he opera-)-2.903 F +(tion is applied to each member of the array in turn, and the e)144 +280.8 Q(xpansion is the resultant list.)-.15 E .708(The result of the e) +144 297.6 R .708(xpansion is subject to w)-.15 F .708 +(ord splitting and pathname e)-.1 F .708(xpansion as described be-)-.15 +F(lo)144 309.6 Q -.65(w.)-.25 G F2(Command Substitution)87 326.4 Q F0 +.324(Command substitution)108 338.4 R F1(allo)2.824 E .324 +(ws the output of a command to replace the command itself.)-.25 F .323 +(There are tw)5.323 F 2.823(os)-.1 G(tan-)-2.823 E(dard forms:)108 350.4 +Q F2($\()144 367.2 Q F0(command)A F2(\))1.666 E F1(or \(deprecated\))108 +379.2 Q F2<92>144 391.2 Q F0(command)A F2<92>A F1(.)A F2(Bash)108 408 Q +F1 .088(performs the e)2.588 F .088(xpansion by e)-.15 F -.15(xe)-.15 G +(cuting).15 E F0(command)2.588 E F1 .089(in a subshell en)2.589 F .089 +(vironment and replacing the command)-.4 F .41 +(substitution with the standard output of the command, with an)108 420 R +2.91(yt)-.15 G .41(railing ne)-2.91 F .41(wlines deleted.)-.25 F .41 +(Embedded ne)5.41 F(w-)-.25 E .191(lines are not deleted, b)108 432 R +.192(ut the)-.2 F 2.692(ym)-.15 G .192(ay be remo)-2.692 F -.15(ve)-.15 +G 2.692(dd).15 G .192(uring w)-2.692 F .192(ord splitting.)-.1 F .192 +(The command substitution)5.192 F F2($\(cat)2.692 E F0(\214le)2.692 E F2 +(\))A F1(can be replaced by the equi)108 444 Q -.25(va)-.25 G(lent b).25 +E(ut f)-.2 E(aster)-.1 E F2($\(<)2.5 E F0(\214le)2.5 E F2(\))A F1(.)A +-.4(Wi)108 460.8 S 1.237(th the old-style backquote form of substitutio\ +n, backslash retains its literal meaning e).4 F 1.237(xcept when fol-) +-.15 F(lo)108 472.8 Q .527(wed by)-.25 F F2($)3.027 E F1(,)A F2<92>3.027 +E F1 3.027(,o)C(r)-3.027 E F2(\\)3.027 E F1 5.527(.T)C .528(he \214rst \ +backquote not preceded by a backslash terminates the command substituti\ +on.)-5.527 F .092(When using the $\()108 484.8 R F0(command).833 E F1 +2.592(\)f)1.666 G .092(orm, all characters between the parentheses mak) +-2.592 F 2.592(eu)-.1 G 2.592(pt)-2.592 G .092(he command; none are) +-2.592 F(treated specially)108 496.8 Q(.)-.65 E +(There is an alternate form of command substitution:)108 513.6 Q F2(${) +144 530.4 Q F0 2.5(cc)C(ommand)-2.5 E F2 1.666(;})C F1 .639(which e)108 +547.2 R -.15(xe)-.15 G(cutes).15 E F0(command)3.139 E F1 .639 +(in the current e)3.139 F -.15(xe)-.15 G .639(cution en).15 F .639 +(vironment and captures its output, ag)-.4 F .64(ain with trailing)-.05 +F(ne)108 559.2 Q(wlines remo)-.25 E -.15(ve)-.15 G(d.).15 E .271 +(The character)108 576 R F0(c)2.771 E F1(follo)2.771 E .271 +(wing the open brace must be a space, tab, ne)-.25 F .271(wline, or)-.25 +F F2(|)2.771 E F1 2.771(,a)C .271(nd the close brace must be in)-2.771 F +2.821(ap)108 588 S .321(osition where a reserv)-2.821 F .321(ed w)-.15 F +.321(ord may appear \(i.e., preceded by a command terminator such as se\ +micolon\).)-.1 F F2(Bash)108 600 Q F1(allo)2.71 E .21 +(ws the close brace to be joined to the remaining characters in the w) +-.25 F .209(ord without being follo)-.1 F .209(wed by)-.25 F 2.5(as)108 +612 S(hell metacharacter as a reserv)-2.5 E(ed w)-.15 E(ord w)-.1 E +(ould usually require.)-.1 E(An)108 628.8 Q 3.384(ys)-.15 G .884(ide ef) +-3.384 F .884(fects of)-.25 F F0(command)3.384 E F1(tak)3.384 E 3.384 +(ee)-.1 G -.25(ff)-3.384 G .884(ect immediately in the current e).25 F +-.15(xe)-.15 G .884(cution en).15 F .884(vironment and persist in)-.4 F +(the current en)108 640.8 Q +(vironment after the command completes \(e.g., the)-.4 E F2(exit)2.5 E +F1 -.2(bu)2.5 G(iltin e).2 E(xits the shell\).)-.15 E .221 +(This type of command substitution super\214cially resembles e)108 657.6 +R -.15(xe)-.15 G .221(cuting an unnamed shell function: local v).15 F +(ari-)-.25 E .172(ables are created as when a shell function is e)108 +669.6 R -.15(xe)-.15 G .172(cuting, and the).15 F F2 -.18(re)2.672 G +(tur).18 E(n)-.15 E F1 -.2(bu)2.672 G .172(iltin forces).2 F F0(command) +2.672 E F1 .172(to complete;)2.672 F(ho)108 681.6 Q(we)-.25 E -.15(ve) +-.25 G 2.521 -.4(r, t).15 H 1.721(he rest of the e).4 F -.15(xe)-.15 G +1.721(cution en).15 F 1.721 +(vironment, including the positional parameters, is shared with the)-.4 +F(caller)108 693.6 Q(.)-.55 E .392(If the \214rst character follo)108 +710.4 R .392(wing the open brace is a)-.25 F F2(|)2.892 E F1 2.892(,t)C +.392(he construct e)-2.892 F .392(xpands to the v)-.15 F .392 +(alue of the)-.25 F F2(REPL)2.892 E(Y)-.92 E F1(shell)2.892 E -.25(va) +108 722.4 S 2.274(riable after).25 F F0(command)4.774 E F1 -.15(exe) +4.774 G 2.274(cutes, without remo).15 F 2.274(ving an)-.15 F 4.774(yt) +-.15 G 2.274(railing ne)-4.774 F 2.274 +(wlines, and the standard output of)-.25 F(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(28)185.955 E 0 Cg EP +%%Page: 29 29 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E F0(command)108 84 Q F1 .167 +(remains the same as in the calling shell.)2.666 F/F2 10/Times-Bold@0 SF +(Bash)5.167 E F1(creates)2.667 E F2(REPL)2.667 E(Y)-.92 E F1 .167 +(as an initially-unset local v)2.667 F(ariable)-.25 E(when)108 96 Q F0 +(command)3.514 E F1 -.15(exe)3.514 G 1.014(cutes, and restores).15 F F2 +(REPL)3.514 E(Y)-.92 E F1 1.014(to the v)3.514 F 1.014 +(alue it had before the command substitution after)-.25 F F0(command)108 +108 Q F1(completes, as with an)2.5 E 2.5(yl)-.15 G(ocal v)-2.5 E +(ariable.)-.25 E .894(Command substitutions may be nested.)108 124.8 R +2.494 -.8(To n)5.894 H .894 +(est when using the backquoted form, escape the inner back-).8 F +(quotes with backslashes.)108 136.8 Q .004 +(If the substitution appears within double quotes,)108 153.6 R F2(bash) +2.504 E F1 .004(does not perform w)2.504 F .004 +(ord splitting and pathname e)-.1 F(xpan-)-.15 E(sion on the results.) +108 165.6 Q F2(Arithmetic Expansion)87 182.4 Q F1 1.139(Arithmetic e)108 +194.4 R 1.139(xpansion e)-.15 F -.25(va)-.25 G 1.139 +(luates an arithmetic e).25 F 1.139 +(xpression and substitutes the result.)-.15 F 1.14 +(The format for arith-)6.139 F(metic e)108 206.4 Q(xpansion is:)-.15 E +F2($\(\()144 223.2 Q F0 -.2(ex)C(pr).2 E(ession)-.37 E F2(\)\))A F1(The) +108 240 Q F0 -.2(ex)2.736 G(pr).2 E(ession)-.37 E F1(under)2.976 E .236 +(goes the same e)-.18 F .236 +(xpansions as if it were within double quotes, b)-.15 F .235 +(ut double quote charac-)-.2 F .42(ters in)108 252 R F0 -.2(ex)2.92 G +(pr).2 E(ession)-.37 E F1 .42(are not treated specially and are remo) +2.92 F -.15(ve)-.15 G 2.921(d. All).15 F(tok)2.921 E .421(ens in the e) +-.1 F .421(xpression under)-.15 F .421(go parame-)-.18 F 1.21(ter and v) +108 264 R 1.21(ariable e)-.25 F 1.209 +(xpansion, command substitution, and quote remo)-.15 F -.25(va)-.15 G +3.709(l. The).25 F 1.209(result is treated as the arith-)3.709 F +(metic e)108 276 Q(xpression to be e)-.15 E -.25(va)-.25 G 2.5 +(luated. Arithmetic).25 F -.15(ex)2.5 G(pansions may be nested.).15 E +1.378(The e)108 292.8 R -.25(va)-.25 G 1.378 +(luation is performed according to the rules listed belo).25 F 3.878(wu) +-.25 G(nder)-3.878 E/F3 9/Times-Bold@0 SF 1.378(ARITHMETIC EV)3.878 F +(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E/F4 9/Times-Roman@0 SF(.)A F1 +(If)5.879 E F0 -.2(ex)108 304.8 S(pr).2 E(ession)-.37 E F1 .022(is in) +2.762 F -.25(va)-.4 G(lid,).25 E F2(bash)2.522 E F1 .022 +(prints a message to standard error indicating f)2.522 F .022 +(ailure, does not perform the substi-)-.1 F(tution, and does not e)108 +316.8 Q -.15(xe)-.15 G(cute the command associated with the e).15 E +(xpansion.)-.15 E F2(Pr)87 333.6 Q(ocess Substitution)-.18 E F0(Pr)108 +345.6 Q .405(ocess substitution)-.45 F F1(allo)2.905 E .405 +(ws a process')-.25 F 2.905(si)-.55 G .405 +(nput or output to be referred to using a \214lename.)-2.905 F .405 +(It tak)5.405 F .405(es the form)-.1 F(of)108 357.6 Q F2(<\()3.251 E F0 +(list)A F2(\)).833 E F1(or)3.251 E F2(>\()3.251 E F0(list)A F2(\)).833 E +F1 5.751(.T)C .751(he process)-5.751 F F0(list)3.251 E F1 .751 +(is run asynchronously)3.251 F 3.251(,a)-.65 G .751 +(nd its input or output appears as a \214lename.)-3.251 F +(This \214lename is passed as an ar)108 369.6 Q +(gument to the current command as the result of the e)-.18 E(xpansion.) +-.15 E .447(If the)108 386.4 R F2(>\()2.947 E F0(list)A F2(\)).833 E F1 +.447(form is used, writing to the \214le pro)2.947 F .447 +(vides input for)-.15 F F0(list)2.947 E F1 5.447(.I)C 2.948(ft)-5.447 G +(he)-2.948 E F2(<\()2.948 E F0(list)A F2(\)).833 E F1 .448 +(form is used, reading the)2.948 F .504(\214le obtains the output of)108 +398.4 R F0(list)3.003 E F1 5.503(.N)C 3.003(os)-5.503 G .503 +(pace may appear between the)-3.003 F F2(<)3.003 E F1(or)3.003 E F2(>) +3.003 E F1 .503(and the left parenthesis, otherwise)3.003 F +(the construct w)108 410.4 Q(ould be interpreted as a redirection.)-.1 E +1.014(Process substitution is supported on systems that support named p\ +ipes \()108 427.2 R F0(FIFOs)A F1 3.515(\)o)C 3.515(rt)-3.515 G(he) +-3.515 E F2(/de)3.515 E(v/fd)-.15 E F1 1.015(method of)3.515 F +(naming open \214les.)108 439.2 Q .897(When a)108 456 R -.25(va)-.2 G +.896(ilable, process substitution is performed simultaneously with para\ +meter and v).25 F .896(ariable e)-.25 F(xpansion,)-.15 E +(command substitution, and arithmetic e)108 468 Q(xpansion.)-.15 E F2 +-.75(Wo)87 484.8 S(rd Splitting).75 E F1 1.142 +(The shell scans the results of parameter e)108 496.8 R 1.143 +(xpansion, command substitution, and arithmetic e)-.15 F 1.143 +(xpansion that)-.15 F(did not occur within double quotes for)108 508.8 Q +F0(wor)2.84 E 2.5(ds)-.37 G(plitting)-2.5 E F1 5(.W).22 G +(ords that were not e)-5.8 E(xpanded are not split.)-.15 E .063 +(The shell treats each character of)108 525.6 R F3(IFS)2.563 E F1 .063 +(as a delimiter)2.313 F 2.563(,a)-.4 G .063 +(nd splits the results of the other e)-2.563 F .063(xpansions into w) +-.15 F(ords)-.1 E(using these characters as \214eld terminators.)108 +537.6 Q(An)108 554.4 Q F0 .686(IFS whitespace)3.186 F F1 .686 +(character is whitespace as de\214ned abo)3.186 F .986 -.15(ve \()-.15 H +(see).15 E F2(De\214nitions)3.186 E F1 3.186(\)t)C .687 +(hat appears in the v)-3.186 F .687(alue of)-.25 F F3(IFS)108 566.4 Q F4 +(.)A F1 .002(Space, tab, and ne)4.502 F .002(wline are al)-.25 F -.1(wa) +-.1 G .002(ys considered IFS whitespace, e).1 F -.15(ve)-.25 G 2.501(ni) +.15 G 2.501(ft)-2.501 G(he)-2.501 E 2.501(yd)-.15 G(on')-2.501 E 2.501 +(ta)-.18 G .001(ppear in the locale')-2.501 F(s)-.55 E F2(space)108 +578.4 Q F1(cate)2.5 E(gory)-.15 E(.)-.65 E(If)108 595.2 Q F3(IFS)2.911 E +F1 .411(is unset, \214eld splitting acts as if its v)2.661 F .411 +(alue were)-.25 F F2()2.911 E F1 2.911(,a)C .411 +(nd treats these characters)-2.911 F .197(as IFS whitespace.)108 607.2 R +.197(If the v)5.197 F .197(alue of)-.25 F F3(IFS)2.697 E F1 .197 +(is null, no w)2.447 F .196(ord splitting occurs, b)-.1 F .196 +(ut implicit null ar)-.2 F .196(guments \(see be-)-.18 F(lo)108 619.2 Q +(w\) are still remo)-.25 E -.15(ve)-.15 G(d.).15 E -.8(Wo)108 636 S .573 +(rd splitting be).8 F .573(gins by remo)-.15 F .573 +(ving sequences of IFS whitespace characters from the be)-.15 F .574 +(ginning and end of)-.15 F(the results of the pre)108 648 Q(vious e)-.25 +E(xpansions, then splits the remaining w)-.15 E(ords.)-.1 E .383 +(If the v)108 664.8 R .383(alue of)-.25 F F3(IFS)2.883 E F1 .383 +(consists solely of IFS whitespace, an)2.633 F 2.883(ys)-.15 G .382 +(equence of IFS whitespace characters delimits a)-2.883 F .299(\214eld,\ + so a \214eld consists of characters that are not unquoted IFS whitespa\ +ce, and null \214elds result only from)108 676.8 R(quoting.)108 688.8 Q +(If)108 705.6 Q F3(IFS)3.679 E F1 1.179 +(contains a non-whitespace character)3.429 F 3.679(,t)-.4 G 1.179 +(hen an)-3.679 F 3.679(yc)-.15 G 1.179(haracter in the v)-3.679 F 1.179 +(alue of)-.25 F F3(IFS)3.679 E F1 1.179(that is not IFS white-)3.429 F +.722(space, along with an)108 717.6 R 3.222(ya)-.15 G .723 +(djacent IFS whitespace characters, delimits a \214eld.)-3.222 F .723 +(This means that adjacent non-)5.723 F 1.101 +(IFS-whitespace delimiters produce a null \214eld.)108 729.6 R 3.601(As) +6.101 G 1.1(equence of IFS whitespace characters also delimits a)-3.601 +F(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(29)185.955 E 0 Cg EP +%%Page: 30 30 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(\214eld.)108 84 Q .782(Explicit null ar)108 100.8 R +.782(guments \()-.18 F/F2 10/Times-Bold@0 SF .833("").833 G F1(or)2.449 +E F2 .833<0808>4.115 G F1 3.282(\)a)C .782 +(re retained and passed to commands as empty strings.)-3.282 F .783 +(Unquoted im-)5.783 F 1.165(plicit null ar)108 112.8 R 1.165 +(guments, resulting from the e)-.18 F 1.165 +(xpansion of parameters that ha)-.15 F 1.464 -.15(ve n)-.2 H 3.664(ov) +.15 G 1.164(alues, are remo)-3.914 F -.15(ve)-.15 G 3.664(d. Ex-).15 F +.234(panding a parameter with no v)108 124.8 R .234(alue within double \ +quotes produces a null \214eld, which is retained and passed)-.25 F +(to a command as an empty string.)108 136.8 Q 1.166 +(When a quoted null ar)108 153.6 R 1.166(gument appears as part of a w) +-.18 F 1.166(ord whose e)-.1 F 1.166(xpansion is non-null, w)-.15 F +1.165(ord splitting re-)-.1 F(mo)108 165.6 Q -.15(ve)-.15 G 3.336(st).15 +G .836(he null ar)-3.336 F .836(gument portion, lea)-.18 F .836 +(ving the non-null e)-.2 F 3.337(xpansion. That)-.15 F .837(is, the w) +3.337 F .837<6f72642099ad6408>-.1 F .837(\010\232 becomes \231\255d\232) +.833 F(after w)108 177.6 Q(ord splitting and null ar)-.1 E(gument remo) +-.18 E -.25(va)-.15 G(l.).25 E F2 -.1(Pa)87 194.4 S(thname Expansion).1 +E F1 .371(After w)108 206.4 R .371(ord splitting, unless the)-.1 F F2 +2.871 E F1 .371(option has been set,)2.871 F F2(bash)2.871 E F1 +.37(scans each w)2.87 F .37(ord for the characters)-.1 F F2(*)2.87 E F1 +(,)A F2(?)2.87 E F1 2.87(,a)C(nd)-2.87 E F2([)2.87 E F1(.)A .633 +(If one of these characters appears, and is not quoted, then the w)108 +218.4 R .634(ord is re)-.1 F -.05(ga)-.15 G .634(rded as a).05 F F0 +(pattern)4.384 E F1 3.134(,a).24 G .634(nd replaced)-3.134 F .282 +(with a sorted list of \214lenames matching the pattern \(see)108 230.4 +R/F3 9/Times-Bold@0 SF -.09(Pa)2.781 G(tter).09 E 2.531(nM)-.135 G +(atching)-2.531 E F1(belo)2.531 E .281(w\) subject to the v)-.25 F .281 +(alue of the)-.25 F F2(GLOBSOR)108 242.4 Q(T)-.4 E F1(shell v)2.5 E +(ariable.)-.25 E 1.754 +(If no matching \214lenames are found, and the shell option)108 259.2 R +F2(nullglob)4.254 E F1 1.754(is not enabled, the w)4.254 F 1.754 +(ord is left un-)-.1 F 2.614(changed. If)108 271.2 R(the)2.614 E F2 +(nullglob)2.614 E F1 .114 +(option is set, and no matches are found, the w)2.614 F .113 +(ord is remo)-.1 F -.15(ve)-.15 G 2.613(d. If).15 F(the)2.613 E F2 +(failglob)2.613 E F1(shell)2.613 E .579 +(option is set, and no matches are found,)108 283.2 R F2(bash)3.079 E F1 +.579(prints an error message and does not e)3.079 F -.15(xe)-.15 G .579 +(cute the command.).15 F .689(If the shell option)108 295.2 R F2 +(nocaseglob)3.189 E F1 .689 +(is enabled, the match is performed without re)3.189 F -.05(ga)-.15 G +.688(rd to the case of alphabetic).05 F(characters.)108 307.2 Q .309 +(When a pattern is used for pathname e)108 324 R .309(xpansion, the cha\ +racter \231.\232 at the start of a name or immediately fol-)-.15 F(lo) +108 336 Q .191(wing a slash must be matched e)-.25 F(xplicitly)-.15 E +2.691(,u)-.65 G .191(nless the shell option)-2.691 F F2(dotglob)2.69 E +F1 .19(is set.)2.69 F .19(In order to match the \214le-)5.19 F(names)108 +348 Q F0(.)4.359 E F1(and)4.359 E F0(..)4.359 E F1 2.693(,t)1.666 G .193 +(he pattern must be)-2.693 F .193(gin with \231.\232 \(for e)-.15 F .193 +(xample, \231.?\232\), e)-.15 F -.15(ve)-.25 G 2.693(ni).15 G(f)-2.693 E +F2(dotglob)2.694 E F1 .194(is set.)2.694 F .194(If the)5.194 F F2 +(globskip-)2.694 E(dots)108 360 Q F1 1.445 +(shell option is enabled, the \214lenames)3.946 F F0(.)5.611 E F1(and) +5.611 E F0(..)5.611 E F1(ne)5.611 E -.15(ve)-.25 G 3.945(rm).15 G 1.445 +(atch, e)-3.945 F -.15(ve)-.25 G 3.945(ni).15 G 3.945(ft)-3.945 G 1.445 +(he pattern be)-3.945 F 1.445(gins with a \231.\232.)-.15 F(When not ma\ +tching pathnames, the \231.\232 character is not treated specially)108 +372 Q(.)-.65 E .061 +(When matching a pathname, the slash character must al)108 388.8 R -.1 +(wa)-.1 G .061(ys be matched e).1 F .061 +(xplicitly by a slash in the pattern,)-.15 F -.2(bu)108 400.8 S 3.395 +(ti).2 G 3.395(no)-3.395 G .894(ther matching conte)-3.395 F .894 +(xts it can be matched by a special pattern character as described belo) +-.15 F 3.394(wu)-.25 G(nder)-3.394 E F3 -.09(Pa)108 412.8 S(tter).09 E +2.25(nM)-.135 G(atching)-2.25 E/F4 9/Times-Roman@0 SF(.)A F1 .711 +(See the description of)108 429.6 R F2(shopt)3.211 E F1(belo)3.212 E +3.212(wu)-.25 G(nder)-3.212 E F3 .712(SHELL B)3.212 F(UIL)-.09 E .712 +(TIN COMMANDS)-.828 F F1 .712(for a description of the)2.962 F F2 +(nocase-)3.212 E(glob)108 441.6 Q F1(,)A F2(nullglob)2.5 E F1(,)A F2 +(globskipdots)2.5 E F1(,)A F2(failglob)2.5 E F1 2.5(,a)C(nd)-2.5 E F2 +(dotglob)2.5 E F1(shell options.)2.5 E(The)108 458.4 Q F3(GLOBIGNORE) +2.562 E F1 .062(shell v)2.312 F .061 +(ariable may be used to restrict the set of \214le names matching a)-.25 +F F0(pattern)3.811 E F1 5.061(.I).24 G(f)-5.061 E F3(GLO-)2.561 E +(BIGNORE)108 470.4 Q F1 1.096(is set, each matching \214le name that al\ +so matches one of the patterns in)3.346 F F3(GLOBIGNORE)3.597 E F1 1.097 +(is re-)3.347 F(mo)108 482.4 Q -.15(ve)-.15 G 2.851(df).15 G .351 +(rom the list of matches.)-2.851 F .351(If the)5.351 F F2(nocaseglob) +2.851 E F1 .351(option is set, the matching ag)2.851 F .351 +(ainst the patterns in)-.05 F F3(GLO-)2.85 E(BIGNORE)108 494.4 Q F1 .096 +(is performed without re)2.346 F -.05(ga)-.15 G .097(rd to case.).05 F +.097(The \214lenames)5.097 F F0(.)4.263 E F1(and)4.263 E F0(..)4.263 E +F1 .097(are al)4.263 F -.1(wa)-.1 G .097(ys ignored when).1 F F3 +(GLOBIG-)2.597 E(NORE)108 506.4 Q F1 .754(is set and not null.)3.004 F +(Ho)5.753 E(we)-.25 E -.15(ve)-.25 G 1.553 -.4(r, s).15 H(etting).4 E F3 +(GLOBIGNORE)3.253 E F1 .753(to a non-null v)3.003 F .753 +(alue has the ef)-.25 F .753(fect of enabling)-.25 F(the)108 518.4 Q F2 +(dotglob)3.062 E F1 .562(shell option, so all other \214lenames be)3.062 +F .562(ginning with a \231.\232 match.)-.15 F 2.162 -.8(To g)5.562 H +.562(et the old beha).8 F .563(vior of ig-)-.2 F .555 +(noring \214lenames be)108 530.4 R .554(ginning with a \231.\232, mak) +-.15 F 3.054<6599>-.1 G 3.054(.*\232 one)-3.054 F .554 +(of the patterns in)3.054 F F3(GLOBIGNORE)3.054 E F4(.)A F1(The)5.054 E +F2(dotglob)3.054 E F1(op-)3.054 E .021(tion is disabled when)108 542.4 R +F3(GLOBIGNORE)2.521 E F1 .021(is unset.)2.271 F(The)5.021 E F2 +(GLOBIGNORE)2.521 E F1 .021(pattern matching honors the setting of)2.521 +F(the)108 554.4 Q F2(extglob)2.5 E F1(shell option.)2.5 E(The)108 571.2 +Q F3(GLOBSOR)3.912 E(T)-.36 E F1 1.412(shell v)3.662 F 1.412 +(ariable controls ho)-.25 F 3.912(wt)-.25 G 1.412 +(he results of pathname e)-3.912 F 1.411 +(xpansion are sorted, as described)-.15 F(abo)108 583.2 Q -.15(ve)-.15 G +(.).15 E F2 -.1(Pa)108 600 S(tter).1 E 2.5(nM)-.15 G(atching)-2.5 E F1 +(An)108 616.8 Q 3.138(yc)-.15 G .638(haracter that appears in a pattern\ +, other than the special pattern characters described belo)-3.138 F +1.938 -.65(w, m)-.25 H(atches).65 E 2.722(itself. The)108 628.8 R .221 +(NUL character may not occur in a pattern.)2.722 F 2.721(Ab)5.221 G .221 +(ackslash escapes the follo)-2.721 F .221(wing character; the es-)-.25 F +.418(caping backslash is discarded when matching.)108 640.8 R .418 +(The special pattern characters must be quoted if the)5.418 F 2.919(ya) +-.15 G .419(re to)-2.919 F(be matched literally)108 652.8 Q(.)-.65 E +(The special pattern characters ha)108 669.6 Q .3 -.15(ve t)-.2 H +(he follo).15 E(wing meanings:)-.25 E F2(*)144 686.4 Q F1 .377 +(Matches an)180 686.4 R 2.877(ys)-.15 G .376 +(tring, including the null string.)-2.877 F .376(When the)5.376 F F2 +(globstar)2.876 E F1 .376(shell option is enabled,)2.876 F(and)180 698.4 +Q F2(*)3.275 E F1 .775(is used in a pathname e)3.275 F .775 +(xpansion conte)-.15 F .775(xt, tw)-.15 F 3.275(oa)-.1 G(djacent)-3.275 +E F2(*)3.275 E F1 3.275(su)C .775(sed as a single pattern)-3.275 F .079 +(match all \214les and zero or more directories and subdirectories.)180 +710.4 R .079(If follo)5.079 F .079(wed by a)-.25 F F2(/)2.578 E F1 2.578 +(,t)C .278 -.1(wo a)-2.578 H(d-).1 E(jacent)180 722.4 Q F2(*)2.5 E F1 +2.5(sm)C(atch only directories and subdirectories.)-2.5 E(GNU Bash 5.3) +72 768 Q(2024 December 12)136.795 E(30)185.955 E 0 Cg EP +%%Page: 31 31 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(?)144 84 Q F1(Matches an)180 +84 Q 2.5(ys)-.15 G(ingle character)-2.5 E(.)-.55 E F2([)144 96 Q F1 +1.666(...)C F2(])-1.666 E F1 1.312(Matches an)180 96 R 3.812(yo)-.15 G +1.312(ne of the characters enclosed between the brack)-3.812 F 3.812 +(ets. This)-.1 F 1.312(is kno)3.812 F 1.313(wn as a)-.25 F F0(br)180 108 +Q(ac)-.15 E -.1(ke)-.2 G 3.677(te).1 G(xpr)-3.877 E(ession)-.37 E F1 +1.177(and matches a single character)3.677 F 6.177(.A)-.55 G 1.177 +(pair of characters separated by a)-2.5 F -.05(hy)180 120 S .179 +(phen denotes a).05 F F0 -.15(ra)2.679 G(ng).15 E 2.679(ee)-.1 G(xpr) +-2.879 E(ession)-.37 E F1 2.679(;a)C .479 -.15(ny c)-2.679 H .179 +(haracter that f).15 F .179(alls between those tw)-.1 F 2.68(oc)-.1 G +(haracters,)-2.68 E(inclusi)180 132 Q -.15(ve)-.25 G 3.004(,u).15 G .504 +(sing the current locale')-3.004 F 3.003(sc)-.55 G .503 +(ollating sequence and character set, matches.)-3.003 F .503(If the) +5.503 F 2.039(\214rst character follo)180 144 R 2.039(wing the)-.25 F F2 +([)4.539 E F1 2.039(is a)4.539 F F2(!)4.539 E F1 2.039(or a)7.039 F F2 +<00>4.539 E F1 2.04(then an)4.54 F 4.54(yc)-.15 G 2.04 +(haracter not within the range)-4.54 F 2.632(matches. T)180 156 R 2.632 +(om)-.8 G .132(atch a)-2.632 F F22.632 E F1 2.632(,i)C .132 +(nclude it as the \214rst or last character in the set.)-2.632 F 1.731 +-.8(To m)5.131 H .131(atch a).8 F F2(])2.631 E F1 2.631(,i)C(n-)-2.631 E +(clude it as the \214rst character in the set.)180 168 Q 1.044 +(The sorting order of characters in range e)180 184.8 R 1.045 +(xpressions, and the characters included in the)-.15 F 2.34 +(range, are determined by the current locale and the v)180 196.8 R 2.34 +(alues of the)-.25 F/F3 9/Times-Bold@0 SF(LC_COLLA)4.84 E(TE)-.855 E F1 +(or)4.59 E F3(LC_ALL)180 208.8 Q F1 1.078(shell v)3.328 F 1.078 +(ariables, if set.)-.25 F 2.679 -.8(To o)6.079 H 1.079 +(btain the traditional interpretation of range e).8 F(xpres-)-.15 E +2.408(sions, where)180 220.8 R F2([a\255d])4.908 E F1 2.408(is equi) +4.908 F -.25(va)-.25 G 2.408(lent to).25 F F2([abcd])4.908 E F1 4.908 +(,s)C 2.408(et the v)-4.908 F 2.407(alue of the)-.25 F F2(LC_COLLA)4.907 +E(TE)-.95 E F1(or)4.907 E F2(LC_ALL)180 232.8 Q F1(shell v)2.5 E +(ariables to)-.25 E F2(C)2.5 E F1 2.5(,o)C 2.5(re)-2.5 G(nable the)-2.5 +E F2(globasciiranges)2.5 E F1(shell option.)2.5 E -.4(Wi)180 249.6 S +.177(thin a brack).4 F .177(et e)-.1 F(xpression,)-.15 E F0 -.15(ch) +2.677 G(ar).15 E .177(acter classes)-.15 F F1 .178 +(can be speci\214ed using the syntax)2.677 F F2([:)2.678 E F0(class)A F2 +(:])A F1(,)A(where)180 261.6 Q F0(class)2.5 E F1(is one of the follo)2.5 +E(wing classes de\214ned in the POSIX standard:)-.25 E F2 5.889 +(alnum alpha ascii blank cntrl digit graph lo)180 278.4 R 5.889 +(wer print punct space up-)-.1 F 5(per w)180 290.4 R 5(ord xdigit)-.1 F +F1 4.289(Ac)180 307.2 S 1.789(haracter class matches an)-4.289 F 4.289 +(yc)-.15 G 1.789(haracter belonging to that class.)-4.289 F(The)6.789 E +F2 -.1(wo)4.29 G(rd).1 E F1(character)4.29 E +(class matches letters, digits, and the character _.)180 319.2 Q -.4(Wi) +180 336 S .013(thin a brack).4 F .013(et e)-.1 F .013(xpression, an)-.15 +F F0 .012(equivalence class)2.512 F F1 .012 +(can be speci\214ed using the syntax)2.512 F F2([=)2.512 E F0(c)A F2(=]) +A F1(,)A .124(which matches all characters with the same collation weig\ +ht \(as de\214ned by the current lo-)180 348 R(cale\) as the character) +180 360 Q F0(c)2.5 E F1(.)A -.4(Wi)180 376.8 S(thin a brack).4 E(et e) +-.1 E(xpression, the syntax)-.15 E F2([.)2.5 E F0(symbol)A F2(.])A F1 +(matches the collating symbol)2.5 E F0(symbol)2.5 E F1(.)A .54(If the) +108 393.6 R F2(extglob)3.04 E F1 .54(shell option is enabled using the) +3.04 F F2(shopt)3.039 E F1 -.2(bu)3.039 G .539 +(iltin, the shell recognizes se).2 F -.15(ve)-.25 G .539(ral e).15 F +.539(xtended pattern)-.15 F .037(matching operators.)108 405.6 R .037 +(In the follo)5.037 F .037(wing description, a)-.25 F F0(pattern-list) +2.538 E F1 .038(is a list of one or more patterns separated by)2.538 F +(a)108 417.6 Q F2(|)2.5 E F1 5(.C)C +(omposite patterns may be formed using one or more of the follo)-5 E +(wing sub-patterns:)-.25 E F2(?\()144 434.4 Q F0(pattern-list).833 E F2 +(\)).833 E F1(Matches zero or one occurrence of the gi)180 446.4 Q -.15 +(ve)-.25 G 2.5(np).15 G(atterns.)-2.5 E F2(*\()144 458.4 Q F0 +(pattern-list).833 E F2(\)).833 E F1 +(Matches zero or more occurrences of the gi)180 470.4 Q -.15(ve)-.25 G +2.5(np).15 G(atterns.)-2.5 E F2(+\()144 482.4 Q F0(pattern-list).833 E +F2(\)).833 E F1(Matches one or more occurrences of the gi)180 494.4 Q +-.15(ve)-.25 G 2.5(np).15 G(atterns.)-2.5 E F2(@\()144 506.4 Q F0 +(pattern-list).833 E F2(\)).833 E F1(Matches one of the gi)180 518.4 Q +-.15(ve)-.25 G 2.5(np).15 G(atterns.)-2.5 E F2(!\()144 530.4 Q F0 +(pattern-list).833 E F2(\)).833 E F1(Matches an)180 542.4 Q(ything e) +-.15 E(xcept one of the gi)-.15 E -.15(ve)-.25 G 2.5(np).15 G(atterns.) +-2.5 E(The)108 559.2 Q F2(extglob)2.792 E F1 .292 +(option changes the beha)2.792 F .291(vior of the parser)-.2 F 2.791(,s) +-.4 G .291(ince the parentheses are normally treated as opera-)-2.791 F +.104(tors with syntactic meaning.)108 571.2 R 1.704 -.8(To e)5.104 H +.105(nsure that e).8 F .105 +(xtended matching patterns are parsed correctly)-.15 F 2.605(,m)-.65 G +(ak)-2.605 E 2.605(es)-.1 G .105(ure that)-2.605 F F2(extglob)108 583.2 +Q F1 1.355(is enabled before parsing constructs containing the patterns\ +, including shell functions and com-)3.855 F(mand substitutions.)108 +595.2 Q .988(When matching \214lenames, the)108 612 R F2(dotglob)3.488 E +F1 .988 +(shell option determines the set of \214lenames that are tested: when) +3.488 F F2(dotglob)108 624 Q F1 .345 +(is enabled, the set of \214lenames includes all \214les be)2.845 F .344 +(ginning with \231.\232, b)-.15 F(ut)-.2 E F0(.)4.51 E F1(and)4.51 E F0 +(..)4.51 E F1 .344(must be matched)4.51 F .075 +(by a pattern or sub-pattern that be)108 636 R .076 +(gins with a dot; when it is disabled, the set does not include an)-.15 +F 2.576<798c>-.15 G(lenames)-2.576 E(be)108 648 Q .807 +(ginning with \231.\232 unless the pattern or sub-pattern be)-.15 F .806 +(gins with a \231.\232.)-.15 F .806(If the)5.806 F F2(globskipdots)3.306 +E F1 .806(shell option is)3.306 F 1.009(enabled, the \214lenames)108 660 +R F0(.)5.175 E F1(and)5.175 E F0(..)5.176 E F1(ne)5.176 E -.15(ve)-.25 G +3.51(ra).15 G 1.01(ppear in the set.)-3.51 F 1.01(As abo)6.01 F -.15(ve) +-.15 G 3.51<2c99>.15 G 1.01(.\232 only has a special meaning when)-3.51 +F(matching \214lenames.)108 672 Q .969(Complicated e)108 688.8 R .969 +(xtended pattern matching ag)-.15 F .969(ainst long strings is slo)-.05 +F 2.268 -.65(w, e)-.25 H .968(specially when the patterns contain).65 F +.09(alternations and the strings contain multiple matches.)108 700.8 R +.091(Using separate matches ag)5.091 F .091 +(ainst shorter strings, or us-)-.05 F +(ing arrays of strings instead of a single long string, may be f)108 +712.8 Q(aster)-.1 E(.)-.55 E(GNU Bash 5.3)72 768 Q(2024 December 12) +136.795 E(31)185.955 E 0 Cg EP +%%Page: 32 32 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(Quote Remo)87 84 Q -.1(va)-.1 +G(l).1 E F1 1.113(After the preceding e)108 96 R 1.113 +(xpansions, all unquoted occurrences of the characters)-.15 F F2(\\) +3.613 E F1(,)A F2<08>3.612 E F1 3.612(,a)C(nd)-3.612 E F2(")4.445 E F1 +1.112(that did not result)4.445 F(from one of the abo)108 108 Q .3 -.15 +(ve ex)-.15 H(pansions are remo).15 E -.15(ve)-.15 G(d.).15 E/F3 10.95 +/Times-Bold@0 SF(REDIRECTION)72 124.8 Q F1 .545(Before a command is e) +108 136.8 R -.15(xe)-.15 G .545(cuted, its input and output may be).15 F +F0 -.37(re)3.045 G(dir).37 E(ected)-.37 E F1 .545 +(using a special notation interpreted)3.815 F .429(by the shell.)108 +148.8 R F0(Redir)5.428 E(ection)-.37 E F1(allo)2.928 E .428(ws commands\ +' \214le handles to be duplicated, opened, closed, made to refer to)-.25 +F(dif)108 160.8 Q .763(ferent \214les, and can change the \214les the c\ +ommand reads from and writes to.)-.25 F .763(When used with the)5.763 F +F2(exec)3.263 E F1 -.2(bu)108 172.8 S .418 +(iltin, redirections modify \214le handles in the current shell e).2 F +-.15(xe)-.15 G .417(cution en).15 F 2.917(vironment. The)-.4 F(follo) +2.917 E .417(wing redirec-)-.25 F 1.694 +(tion operators may precede or appear an)108 184.8 R 1.695 +(ywhere within a)-.15 F F0 1.695(simple command)4.535 F F1 1.695 +(or may follo)4.965 F 4.195(wa)-.25 G F0(command).2 E F1(.).77 E +(Redirections are processed in the order the)108 196.8 Q 2.5(ya)-.15 G +(ppear)-2.5 E 2.5(,f)-.4 G(rom left to right.)-2.5 E .771(Each redirect\ +ion that may be preceded by a \214le descriptor number may instead be p\ +receded by a w)108 213.6 R .771(ord of)-.1 F .367(the form {)108 225.6 R +F0(varname)A F1 2.867(}. In)B .368 +(this case, for each redirection operator e)2.867 F(xcept)-.15 E F2 +(>&\255)2.868 E F1(and)2.868 E F2(<&\255)2.868 E F1 2.868(,t)C .368 +(he shell allocates a)-2.868 F .461 +(\214le descriptor greater than or equal to 10 and assigns it to)108 +237.6 R F0(varname)2.961 E F1 5.461(.I)C 2.961(f{)-5.461 G F0(varname) +-2.961 E F1 2.961(}p)C(recedes)-2.961 E F2(>&\255)2.961 E F1(or)2.961 E +F2(<&\255)2.961 E F1(,)A .534(the v)108 249.6 R .534(alue of)-.25 F F0 +(varname)3.034 E F1 .534(de\214nes the \214le descriptor to close.)3.034 +F .535(If {)5.534 F F0(varname)A F1 3.035(}i)C 3.035(ss)-3.035 G .535 +(upplied, the redirection persists)-3.035 F(be)108 261.6 Q .45 +(yond the scope of the command, which allo)-.15 F .449 +(ws the shell programmer to manage the \214le descriptor')-.25 F 2.949 +(sl)-.55 G(ife-)-2.949 E(time manually without using the)108 273.6 Q F2 +(exec)2.5 E F1 -.2(bu)2.5 G 2.5(iltin. The).2 F F2 -.1(va)2.5 G(rr).1 E +(edir_close)-.18 E F1(shell option manages this beha)2.5 E(vior)-.2 E(.) +-.55 E .447(In the follo)108 290.4 R .447(wing descriptions, if the \ +\214le descriptor number is omitted, and the \214rst character of the r\ +edirec-)-.25 F .714(tion operator is \231<\232, the redirection refers \ +to the standard input \(\214le descriptor 0\).)108 302.4 R .714 +(If the \214rst character of)5.714 F(the redirection operator is \231>\ +\232, the redirection refers to the standard output \(\214le descriptor\ + 1\).)108 314.4 Q(The)108 331.2 Q F0(wor)3.342 E(d)-.37 E F1(follo)3.342 +E .843(wing the redirection operator in the follo)-.25 F .843 +(wing descriptions, unless otherwise noted, is sub-)-.25 F .463 +(jected to brace e)108 343.2 R .463(xpansion, tilde e)-.15 F .462 +(xpansion, parameter and v)-.15 F .462(ariable e)-.25 F .462 +(xpansion, command substitution, arith-)-.15 F .866(metic e)108 355.2 R +.866(xpansion, quote remo)-.15 F -.25(va)-.15 G .866(l, pathname e).25 F +.867(xpansion, and w)-.15 F .867(ord splitting.)-.1 F .867(If it e)5.867 +F .867(xpands to more than one)-.15 F -.1(wo)108 367.2 S(rd,).1 E F2 +(bash)2.5 E F1(reports an error)2.5 E(.)-.55 E +(The order of redirections is signi\214cant.)108 384 Q -.15(Fo)5 G 2.5 +(re).15 G(xample, the command)-2.65 E(ls)144 400.8 Q F2(>)2.5 E F1 +(dirlist 2)2.5 E F2(>&)A F1(1)A +(directs both standard output and standard error to the \214le)108 417.6 +Q F0(dirlist)2.85 E F1 2.5(,w).68 G(hile the command)-2.5 E(ls 2)144 +434.4 Q F2(>&)A F1(1)A F2(>)2.5 E F1(dirlist)2.5 E .067 +(directs only the standard output to \214le)108 451.2 R F0(dirlist)2.917 +E F1 2.567(,b).68 G .066(ecause the standard error w)-2.567 F .066 +(as directed to the standard output)-.1 F(before the standard output w) +108 463.2 Q(as redirected to)-.1 E F0(dirlist)2.85 E F1(.).68 E F2(Bash) +108 480 Q F1 .598(handles se)3.098 F -.15(ve)-.25 G .598 +(ral \214lenames specially when the).15 F 3.099(ya)-.15 G .599 +(re used in redirections, as described in the follo)-3.099 F(wing)-.25 E +2.673(table. If)108 492 R .173(the operating system on which)2.673 F F2 +(bash)2.672 E F1 .172(is running pro)2.672 F .172 +(vides these special \214les,)-.15 F F2(bash)2.672 E F1 .172 +(uses them; other)2.672 F(-)-.2 E +(wise it emulates them internally with the beha)108 504 Q +(vior described belo)-.2 E -.65(w.)-.25 G F2(/de)144 520.8 Q(v/fd/)-.15 +E F0(fd)A F1(If)180 532.8 Q F0(fd)2.5 E F1(is a v)2.5 E(alid inte)-.25 E +(ger)-.15 E 2.5(,d)-.4 G(uplicate \214le descriptor)-2.5 E F0(fd)2.5 E +F1(.)A F2(/de)144 544.8 Q(v/stdin)-.15 E F1 +(File descriptor 0 is duplicated.)180 556.8 Q F2(/de)144 568.8 Q +(v/stdout)-.15 E F1(File descriptor 1 is duplicated.)180 580.8 Q F2(/de) +144 592.8 Q(v/stderr)-.15 E F1(File descriptor 2 is duplicated.)180 +604.8 Q F2(/de)144 616.8 Q(v/tcp/)-.15 E F0(host)A F2(/)A F0(port)A F1 +(If)180 628.8 Q F0(host)2.996 E F1 .496(is a v)2.996 F .496 +(alid hostname or Internet address, and)-.25 F F0(port)2.997 E F1 .497 +(is an inte)2.997 F .497(ger port number or ser)-.15 F(-)-.2 E +(vice name,)180 640.8 Q F2(bash)2.5 E F1 +(attempts to open the corresponding TCP sock)2.5 E(et.)-.1 E F2(/de)144 +652.8 Q(v/udp/)-.15 E F0(host)A F2(/)A F0(port)A F1(If)180 664.8 Q F0 +(host)2.997 E F1 .497(is a v)2.997 F .497 +(alid hostname or Internet address, and)-.25 F F0(port)2.996 E F1 .496 +(is an inte)2.996 F .496(ger port number or ser)-.15 F(-)-.2 E +(vice name,)180 676.8 Q F2(bash)2.5 E F1 +(attempts to open the corresponding UDP sock)2.5 E(et.)-.1 E 2.5(Af)108 +693.6 S(ailure to open or create a \214le causes the redirection to f) +-2.6 E(ail.)-.1 E .045(Redirections using \214le descriptors greater th\ +an 9 should be used with care, as the)108 710.4 R 2.546(ym)-.15 G .046 +(ay con\215ict with \214le de-)-2.546 F +(scriptors the shell uses internally)108 722.4 Q(.)-.65 E(GNU Bash 5.3) +72 768 Q(2024 December 12)136.795 E(32)185.955 E 0 Cg EP +%%Page: 33 33 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(Redir)87 84 Q(ecting Input) +-.18 E F1 .136 +(Redirecting input opens the \214le whose name results from the e)108 96 +R .135(xpansion of)-.15 F F0(wor)2.975 E(d)-.37 E F1 .135 +(for reading on \214le descrip-)3.405 F(tor)108 108 Q F0(n)2.86 E F1 2.5 +(,o).24 G 2.5(rt)-2.5 G(he standard input \(\214le descriptor 0\) if) +-2.5 E F0(n)2.86 E F1(is not speci\214ed.)2.74 E +(The general format for redirecting input is:)108 124.8 Q([)144 141.6 Q +F0(n)A F1(])A F2(<)A F0(wor)A(d)-.37 E F2(Redir)87 158.4 Q +(ecting Output)-.18 E F1 1.049 +(Redirecting output opens the \214le whose name results from the e)108 +170.4 R 1.05(xpansion of)-.15 F F0(wor)3.89 E(d)-.37 E F1 1.05 +(for writing on \214le de-)4.32 F(scriptor)108 182.4 Q F0(n)3.449 E F1 +3.089(,o).24 G 3.089(rt)-3.089 G .588 +(he standard output \(\214le descriptor 1\) if)-3.089 F F0(n)3.448 E F1 +.588(is not speci\214ed.)3.328 F .588(If the \214le does not e)5.588 F +.588(xist it is cre-)-.15 F(ated; if it does e)108 194.4 Q +(xist it is truncated to zero size.)-.15 E +(The general format for redirecting output is:)108 211.2 Q([)144 228 Q +F0(n)A F1(])A F2(>)A F0(wor)A(d)-.37 E F1 .154 +(If the redirection operator is)108 244.8 R F2(>)2.654 E F1 2.654(,a)C +.154(nd the)-2.654 F F2(noclob)2.654 E(ber)-.1 E F1 .154(option to the) +2.654 F F2(set)2.655 E F1 -.2(bu)2.655 G .155 +(iltin has been enabled, the redirection).2 F -.1(fa)108 256.8 S .177 +(ils if the \214le whose name results from the e).1 F .177(xpansion of) +-.15 F F0(wor)2.677 E(d)-.37 E F1 -.15(ex)2.677 G .177(ists and is a re) +.15 F .177(gular \214le.)-.15 F .177(If the redirection)5.177 F .693 +(operator is)108 268.8 R F2(>|)3.193 E F1 3.193(,o)C 3.193(rt)-3.193 G +.693(he redirection operator is)-3.193 F F2(>)3.194 E F1 .694(and the) +3.194 F F2(noclob)3.194 E(ber)-.1 E F1 .694(option to the)3.194 F F2 +(set)3.194 E F1 -.2(bu)3.194 G .694(iltin command is not).2 F(enabled,) +108 280.8 Q F2(bash)2.5 E F1(attempts the redirection e)2.5 E -.15(ve) +-.25 G 2.5(ni).15 G 2.5(ft)-2.5 G(he \214le named by)-2.5 E F0(wor)2.5 E +(d)-.37 E F1 -.15(ex)2.5 G(ists.).15 E F2 -.25(Ap)87 297.6 S +(pending Redir).25 E(ected Output)-.18 E F1 3.409(Redirecting output)108 +309.6 R .909(in this f)3.409 F .908 +(ashion opens the \214le whose name results from the e)-.1 F .908 +(xpansion of)-.15 F F0(wor)3.748 E(d)-.37 E F1 .908(for ap-)4.178 F .639 +(pending on \214le descriptor)108 321.6 R F0(n)3.499 E F1 3.139(,o).24 G +3.139(rt)-3.139 G .639(he standard output \(\214le descriptor 1\) if) +-3.139 F F0(n)3.5 E F1 .64(is not speci\214ed.)3.38 F .64 +(If the \214le does)5.64 F(not e)108 333.6 Q(xist it is created.)-.15 E +(The general format for appending output is:)108 350.4 Q([)144 367.2 Q +F0(n)A F1(])A F2(>>)A F0(wor)A(d)-.37 E F2(Redir)87 384 Q +(ecting Standard Output and Standard Err)-.18 E(or)-.18 E F1 .928(This \ +construct redirects both the standard output \(\214le descriptor 1\) an\ +d the standard error output \(\214le de-)108 396 R +(scriptor 2\) to the \214le whose name is the e)108 408 Q(xpansion of) +-.15 E F0(wor)2.84 E(d)-.37 E F1(.).77 E(There are tw)108 424.8 Q 2.5 +(of)-.1 G(ormats for redirecting standard output and standard error:) +-2.5 E F2(&>)144 441.6 Q F0(wor)A(d)-.37 E F1(and)108 453.6 Q F2(>&)144 +465.6 Q F0(wor)A(d)-.37 E F1(Of the tw)108 482.4 Q 2.5(of)-.1 G +(orms, the \214rst is preferred.)-2.5 E(This is semantically equi)5 E +-.25(va)-.25 G(lent to).25 E F2(>)144 499.2 Q F0(wor)A(d)-.37 E F1(2)2.5 +E F2(>&)A F1(1)A .114(When using the second form,)108 516 R F0(wor)2.614 +E(d)-.37 E F1 .114(may not e)2.614 F .114(xpand to a number or)-.15 F F2 +2.614 E F1 5.114(.I)C 2.614(fi)-5.114 G 2.615(td)-2.614 G .115 +(oes, other redirection operators)-2.615 F(apply \(see)108 528 Q F2 +(Duplicating File Descriptors)2.5 E F1(belo)2.5 E +(w\) for compatibility reasons.)-.25 E F2 -.25(Ap)87 544.8 S +(pending Standard Output and Standard Err).25 E(or)-.18 E F1 1.032(This\ + construct appends both the standard output \(\214le descriptor 1\) and\ + the standard error output \(\214le de-)108 556.8 R +(scriptor 2\) to the \214le whose name is the e)108 568.8 Q(xpansion of) +-.15 E F0(wor)2.84 E(d)-.37 E F1(.).77 E +(The format for appending standard output and standard error is:)108 +585.6 Q F2(&>>)144 602.4 Q F0(wor)A(d)-.37 E F1 +(This is semantically equi)108 619.2 Q -.25(va)-.25 G(lent to).25 E F2 +(>>)144 636 Q F0(wor)A(d)-.37 E F1(2)2.5 E F2(>&)A F1(1)A(\(see)108 +652.8 Q F2(Duplicating File Descriptors)2.5 E F1(belo)2.5 E(w\).)-.25 E +F2(Her)87 669.6 Q 2.5(eD)-.18 G(ocuments)-2.5 E F1 .211(This type of re\ +direction instructs the shell to read input from the current source unt\ +il it reads a line contain-)108 681.6 R .27(ing only)108 693.6 R F0 +(delimiter)3.12 E F1 .27(\(with no trailing blanks\).)3.5 F .269 +(All of the lines read up to that point then become the standard)5.27 F +(input \(or \214le descriptor)108 705.6 Q F0(n)2.5 E F1(if)2.5 E F0(n) +2.5 E F1(is speci\214ed\) for a command.)2.5 E +(The format of here-documents is:)108 722.4 Q(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(33)185.955 E 0 Cg EP +%%Page: 34 34 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E([)144 84 Q F0(n)A F1(])A/F2 10/Times-Bold@0 SF(<<)A +F1([)A F2A F1(])A F0(wor)A(d)-.37 E(her)164 96 Q(e-document)-.37 E +(delimiter)144 108 Q F1 .241(The shell does not perform parameter and v) +108 124.8 R .241(ariable e)-.25 F .241 +(xpansion, command substitution, arithmetic e)-.15 F(xpansion,)-.15 E +(or pathname e)108 136.8 Q(xpansion is performed on)-.15 E F0(wor)2.84 E +(d)-.37 E F1(.).77 E .053(If an)108 153.6 R 2.553(yp)-.15 G .053(art of) +-2.553 F F0(wor)2.893 E(d)-.37 E F1 .053(is quoted, the)3.323 F F0 +(delimiter)2.902 E F1 .052(is the result of quote remo)3.282 F -.25(va) +-.15 G 2.552(lo).25 G(n)-2.552 E F0(wor)2.892 E(d)-.37 E F1 2.552(,a).77 +G .052(nd the lines in the here-)-2.552 F .101(document are not e)108 +165.6 R 2.601(xpanded. If)-.15 F F0(wor)2.602 E(d)-.37 E F1 .102 +(is unquoted, the)2.602 F F0(delimiter)2.952 E F1(is)3.332 E F0(wor) +2.602 E(d)-.37 E F1 .102(itself, and the here-document te)2.602 F .102 +(xt is)-.15 F .131(treated similarly to a double-quoted string: all lin\ +es of the here-document are subjected to parameter e)108 177.6 R(xpan-) +-.15 E .894(sion, command substitution, and arithmetic e)108 189.6 R +.894(xpansion, the character sequence)-.15 F F2(\\)3.394 E F1 +.895(is treated liter)3.394 F(-)-.2 E(ally)108 201.6 Q 2.624(,a)-.65 G +(nd)-2.624 E F2(\\)2.624 E F1 .124(must be used to quote the characters) +2.624 F F2(\\)2.624 E F1(,)A F2($)2.624 E F1 2.624(,a)C(nd)-2.624 E F2 +<92>2.624 E F1 2.624(;h)C -.25(ow)-2.624 G -2.15 -.25(ev e).25 H .924 +-.4(r, d).25 H .124(ouble quote characters ha).4 F .424 -.15(ve n)-.2 H +2.624(os).15 G(pecial)-2.624 E(meaning.)108 213.6 Q .97 +(If the redirection operator is)108 230.4 R F2(<<\255)3.47 E F1 3.47(,t) +C .971(hen the shell strips all leading tab characters from input lines\ + and the)-3.47 F .366(line containing)108 242.4 R F0(delimiter)3.216 E +F1 5.366(.T).73 G .366(his allo)-5.366 F .365 +(ws here-documents within shell scripts to be indented in a natural f) +-.25 F(ash-)-.1 E(ion.)108 254.4 Q .797 +(If the delimiter is not quoted, the)108 271.2 R F2(\\)3.298 E +F1 .798(sequence is treated as a line continuation: the tw)3.298 F 3.298 +(ol)-.1 G .798(ines are)-3.298 F .973(joined and the backslash-ne)108 +283.2 R .973(wline is remo)-.25 F -.15(ve)-.15 G 3.472(d. This).15 F +.972(happens while reading the here-document, before the)3.472 F +(check for the ending delimiter)108 295.2 Q 2.5(,s)-.4 G 2.5(oj)-2.5 G +(oined lines can form the end delimiter)-2.5 E(.)-.55 E F2(Her)87 312 Q +2.5(eS)-.18 G(trings)-2.5 E F1 2.5(Av)108 324 S +(ariant of here documents, the format is:)-2.75 E([)144 340.8 Q F0(n)A +F1(])A F2(<<<)A F0(wor)A(d)-.37 E F1(The)108 357.6 Q F0(wor)3.291 E(d) +-.37 E F1(under)3.291 E .792(goes tilde e)-.18 F .792 +(xpansion, parameter and v)-.15 F .792(ariable e)-.25 F .792 +(xpansion, command substitution, arithmetic)-.15 F -.15(ex)108 369.6 S +1.188(pansion, and quote remo).15 F -.25(va)-.15 G 3.687(l. P).25 F +1.187(athname e)-.15 F 1.187(xpansion and w)-.15 F 1.187 +(ord splitting are not performed.)-.1 F 1.187(The result is)6.187 F .374 +(supplied as a single string, with a ne)108 381.6 R .375(wline appended\ +, to the command on its standard input \(or \214le descrip-)-.25 F(tor) +108 393.6 Q F0(n)2.5 E F1(if)2.5 E F0(n)2.5 E F1(is speci\214ed\).)2.5 E +F2(Duplicating File Descriptors)87 410.4 Q F1(The redirection operator) +108 422.4 Q([)144 439.2 Q F0(n)A F1(])A F2(<&)A F0(wor)A(d)-.37 E F1 +.512(is used to duplicate input \214le descriptors.)108 456 R(If)5.512 E +F0(wor)3.352 E(d)-.37 E F1 -.15(ex)3.782 G .512 +(pands to one or more digits, \214le descriptor).15 F F0(n)3.372 E F1 +.512(is made)3.252 F .097(to be a cop)108 468 R 2.597(yo)-.1 G 2.598(ft) +-2.597 G .098(hat \214le descriptor)-2.598 F 5.098(.I)-.55 G 2.598(ti) +-5.098 G 2.598(sar)-2.598 G .098(edirection error if the digits in) +-2.598 F F0(wor)2.938 E(d)-.37 E F1 .098 +(do not specify a \214le descrip-)3.368 F 1.04(tor open for input.)108 +480 R(If)6.04 E F0(wor)3.88 E(d)-.37 E F1 -.25(eva)4.31 G 1.04 +(luates to).25 F F23.54 E F1 3.54<2c8c>C 1.04(le descriptor)-3.54 F +F0(n)3.9 E F1 1.04(is closed.)3.78 F(If)6.04 E F0(n)3.9 E F1 1.04 +(is not speci\214ed, this uses the)3.78 F +(standard input \(\214le descriptor 0\).)108 492 Q(The operator)108 +508.8 Q([)144 525.6 Q F0(n)A F1(])A F2(>&)A F0(wor)A(d)-.37 E F1 .31 +(is used similarly to duplicate output \214le descriptors.)108 542.4 R +(If)5.31 E F0(n)3.17 E F1 .31 +(is not speci\214ed, this uses the standard output \(\214le)3.05 F .552 +(descriptor 1\).)108 554.4 R .552 +(It is a redirection error if the digits in)5.552 F F0(wor)3.392 E(d) +-.37 E F1 .552(do not specify a \214le descriptor open for output.)3.822 +F(If)108 566.4 Q F0(wor)3.227 E(d)-.37 E F1 -.25(eva)3.657 G .387 +(luates to).25 F F22.887 E F1 2.887<2c8c>C .387(le descriptor)-2.887 +F F0(n)3.248 E F1 .388(is closed.)3.128 F .388(As a special case, if) +5.388 F F0(n)2.888 E F1 .388(is omitted, and)2.888 F F0(wor)2.888 E(d) +-.37 E F1 .388(does not e)2.888 F(x-)-.15 E 1.063 +(pand to one or more digits or)108 578.4 R F23.563 E F1 3.563(,t)C +1.063 +(his redirects the standard output and standard error as described pre) +-3.563 F(vi-)-.25 E(ously)108 590.4 Q(.)-.65 E F2(Mo)87 607.2 Q +(ving File Descriptors)-.1 E F1(The redirection operator)108 619.2 Q([) +144 636 Q F0(n)A F1(])A F2(<&)A F0(digit)A F2A F1(mo)108 652.8 Q +-.15(ve)-.15 G 3.017(st).15 G .517(he \214le descriptor)-3.017 F F0 +(digit)3.017 E F1 .517(to \214le descriptor)3.017 F F0(n)3.377 E F1 +3.017(,o).24 G 3.017(rt)-3.017 G .518 +(he standard input \(\214le descriptor 0\) if)-3.017 F F0(n)3.018 E F1 +.518(is not speci-)3.018 F(\214ed.)108 664.8 Q F0(digit)5 E F1 +(is closed after being duplicated to)2.5 E F0(n)2.5 E F1(.)A(Similarly) +108 681.6 Q 2.5(,t)-.65 G(he redirection operator)-2.5 E([)144 698.4 Q +F0(n)A F1(])A F2(>&)A F0(digit)A F2A F1(mo)108 715.2 Q -.15(ve)-.15 +G 2.768(st).15 G .268(he \214le descriptor)-2.768 F F0(digit)2.768 E F1 +.268(to \214le descriptor)2.768 F F0(n)3.128 E F1 2.768(,o).24 G 2.768 +(rt)-2.768 G .267(he standard output \(\214le descriptor 1\) if)-2.768 F +F0(n)2.767 E F1 .267(is not speci-)2.767 F(\214ed.)108 727.2 Q +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(34)185.955 E 0 Cg EP +%%Page: 35 35 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(Opening File Descriptors f)87 +84 Q(or Reading and Writing)-.25 E F1(The redirection operator)108 96 Q +([)144 112.8 Q F0(n)A F1(])A F2(<>)A F0(wor)A(d)-.37 E F1 .279 +(opens the \214le whose name is the e)108 129.6 R .279(xpansion of)-.15 +F F0(wor)3.119 E(d)-.37 E F1 .279 +(for both reading and writing on \214le descriptor)3.549 F F0(n)3.139 E +F1 2.779(,o).24 G 2.779(ro)-2.779 G(n)-2.779 E(\214le descriptor 0 if) +108 141.6 Q F0(n)2.86 E F1(is not speci\214ed.)2.74 E +(If the \214le does not e)5 E(xist, it is created.)-.15 E/F3 10.95 +/Times-Bold@0 SF(ALIASES)72 158.4 Q F0(Aliases)108 170.4 Q F1(allo)3.002 +E 3.002(was)-.25 G .502(tring to be substituted for a w)-3.002 F .502 +(ord that is in a position in the input where it can be the \214rst)-.1 +F -.1(wo)108 182.4 S .408(rd of a simple command.).1 F .408(Aliases ha) +5.408 F .708 -.15(ve n)-.2 H .408(ames and corresponding v).15 F .409 +(alues that are set and unset using the)-.25 F F2(alias)108 194.4 Q F1 +(and)2.5 E F2(unalias)2.5 E F1 -.2(bu)2.5 G(iltin commands \(see).2 E/F4 +9/Times-Bold@0 SF(SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS)-.828 E F1(belo) +2.25 E(w\).)-.25 E 1.034(If the shell reads an unquoted w)108 211.2 R +1.033(ord in the right position, it checks the w)-.1 F 1.033 +(ord to see if it matches an alias)-.1 F 3.038(name. If)108 223.2 R .538 +(it matches, the shell replaces the w)3.038 F .538(ord with the alias v) +-.1 F .538(alue, and reads that v)-.25 F .538(alue as if it had been) +-.25 F 1.082(read instead of the w)108 235.2 R 3.582(ord. The)-.1 F +1.082(shell doesn')3.582 F 3.582(tl)-.18 G 1.082(ook at an)-3.582 F +3.582(yc)-.15 G 1.082(haracters follo)-3.582 F 1.082(wing the w)-.25 F +1.081(ord before attempting)-.1 F(alias substitution.)108 247.2 Q .264 +(The characters)108 264 R F2(/)2.764 E F1(,)A F2($)2.764 E F1(,)A F2<92> +2.764 E F1 2.764(,a)C(nd)-2.764 E F2(=)2.764 E F1 .264(and an)2.764 F +2.764(yo)-.15 G 2.764(ft)-2.764 G .264(he shell)-2.764 F F0(metac)2.764 +E(har)-.15 E(acter)-.15 E(s)-.1 E F1 .264 +(or quoting characters listed abo)2.764 F .565 -.15(ve m)-.15 H .265 +(ay not).15 F .299(appear in an alias name.)108 276 R .298 +(The replacement te)5.298 F .298(xt may contain an)-.15 F 2.798(yv)-.15 +G .298(alid shell input, including shell metachar)-3.048 F(-)-.2 E 2.625 +(acters. The)108 288 R .125(\214rst w)2.625 F .125 +(ord of the replacement te)-.1 F .125(xt is tested for aliases, b)-.15 F +.125(ut a w)-.2 F .126(ord that is identical to an alias be-)-.1 F .666 +(ing e)108 300 R .666(xpanded is not e)-.15 F .666 +(xpanded a second time.)-.15 F .666(This means that one may alias)5.666 +F F2(ls)3.166 E F1(to)3.166 E F2 .666(ls \255F)3.166 F F1 3.166(,f)C +.666(or instance, and)-3.166 F F2(bash)108 312 Q F1 +(does not try to recursi)2.5 E -.15(ve)-.25 G(ly e).15 E +(xpand the replacement te)-.15 E(xt.)-.15 E 1.035 +(If the last character of the alias v)108 328.8 R 1.035(alue is a)-.25 F +F0(blank)3.805 E F1 3.535(,t).67 G 1.035(he shell checks the ne)-3.535 F +1.036(xt command w)-.15 F 1.036(ord follo)-.1 F 1.036(wing the)-.25 F +(alias for alias e)108 340.8 Q(xpansion.)-.15 E +(Aliases are created and listed with the)108 357.6 Q F2(alias)2.5 E F1 +(command, and remo)2.5 E -.15(ve)-.15 G 2.5(dw).15 G(ith the)-2.5 E F2 +(unalias)2.5 E F1(command.)2.5 E .742 +(There is no mechanism for using ar)108 374.4 R .741 +(guments in the replacement te)-.18 F 3.241(xt. If)-.15 F(ar)3.241 E +.741(guments are needed, use a shell)-.18 F(function \(see)108 386.4 Q +F4(FUNCTIONS)2.5 E F1(belo)2.25 E(w\) instead.)-.25 E .282 +(Aliases are not e)108 403.2 R .282 +(xpanded when the shell is not interacti)-.15 F -.15(ve)-.25 G 2.782(,u) +.15 G .282(nless the)-2.782 F F2(expand_aliases)2.783 E F1 .283 +(shell option is set us-)2.783 F(ing)108 415.2 Q F2(shopt)2.5 E F1 +(\(see the description of)2.5 E F2(shopt)2.5 E F1(under)2.5 E F4 +(SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS)-.828 E F1(belo)2.25 E(w\).)-.25 +E .436 +(The rules concerning the de\214nition and use of aliases are some)108 +432 R .435(what confusing.)-.25 F F2(Bash)5.435 E F1(al)2.935 E -.1(wa) +-.1 G .435(ys reads at least).1 F .67 +(one complete line of input, and all lines that mak)108 444 R 3.17(eu) +-.1 G 3.17(pac)-3.17 G .67(ompound command, before e)-3.17 F -.15(xe) +-.15 G .67(cuting an).15 F 3.17(yo)-.15 G 3.17(ft)-3.17 G(he)-3.17 E +1.059(commands on that line or the compound command.)108 456 R 1.059 +(Aliases are e)6.059 F 1.058(xpanded when a command is read, not)-.15 F +.074(when it is e)108 468 R -.15(xe)-.15 G 2.574(cuted. Therefore,).15 F +.075(an alias de\214nition appearing on the same line as another comman\ +d does not)2.574 F(tak)108 480 Q 2.839(ee)-.1 G -.25(ff)-2.839 G .339 +(ect until the shell reads the ne).25 F .339 +(xt line of input, and an alias de\214nition in a compound command does) +-.15 F .031(not tak)108 492 R 2.531(ee)-.1 G -.25(ff)-2.531 G .031 +(ect until the shell parses and e).25 F -.15(xe)-.15 G .031 +(cutes the entire compound command.).15 F .032(The commands follo)5.032 +F(wing)-.25 E .726(the alias de\214nition on that line, or in the rest \ +of a compound command, are not af)108 504 R .725(fected by the ne)-.25 F +3.225(wa)-.25 G(lias.)-3.225 E .657(This beha)108 516 R .657 +(vior is also an issue when functions are e)-.2 F -.15(xe)-.15 G 3.158 +(cuted. Aliases).15 F .658(are e)3.158 F .658 +(xpanded when a function de\214ni-)-.15 F .081 +(tion is read, not when the function is e)108 528 R -.15(xe)-.15 G .08 +(cuted, because a function de\214nition is itself a command.).15 F .08 +(As a con-)5.08 F .264 +(sequence, aliases de\214ned in a function are not a)108 540 R -.25(va) +-.2 G .265(ilable until after that function is e).25 F -.15(xe)-.15 G +2.765(cuted. T).15 F 2.765(ob)-.8 G 2.765(es)-2.765 G .265(afe, al-) +-2.765 F -.1(wa)108 552 S +(ys put alias de\214nitions on a separate line, and do not use).1 E F2 +(alias)2.5 E F1(in compound commands.)2.5 E -.15(Fo)108 568.8 S 2.5(ra) +.15 G(lmost e)-2.5 E -.15(ve)-.25 G +(ry purpose, shell functions are preferable to aliases.).15 E F3 +(FUNCTIONS)72 585.6 Q F1 3.468(As)108 597.6 S .968 +(hell function, de\214ned as described abo)-3.468 F 1.267 -.15(ve u)-.15 +H(nder).15 E F4 .967(SHELL GRAMMAR)3.467 F/F5 9/Times-Roman@0 SF(,)A F1 +.967(stores a series of commands for)3.217 F .534(later e)108 609.6 R +-.15(xe)-.15 G 3.034(cution. When).15 F .535(the name of a shell functi\ +on is used as a simple command name, the shell e)3.034 F -.15(xe)-.15 G +(cutes).15 E .295 +(the list of commands associated with that function name.)108 621.6 R +.295(Functions are e)5.295 F -.15(xe)-.15 G .294(cuted in the conte).15 +F .294(xt of the call-)-.15 F 1.626(ing shell; there is no ne)108 633.6 +R 4.126(wp)-.25 G 1.627 +(rocess created to interpret them \(contrast this with the e)-4.126 F +-.15(xe)-.15 G 1.627(cution of a shell).15 F(script\).)108 645.6 Q .256 +(When a function is e)108 662.4 R -.15(xe)-.15 G .256(cuted, the ar).15 +F .255 +(guments to the function become the positional parameters during its e) +-.18 F(x-)-.15 E 2.507(ecution. The)108 674.4 R .007(special parameter) +2.507 F F2(#)2.507 E F1 .007(is updated to re\215ect the ne)2.507 F +2.508(wp)-.25 G .008(ositional parameters.)-2.508 F .008 +(Special parameter)5.008 F F2(0)2.508 E F1(is)2.508 E 2.638 +(unchanged. The)108 686.4 R .138(\214rst element of the)2.638 F F4 +(FUNCN)2.638 E(AME)-.18 E F1 -.25(va)2.388 G .138 +(riable is set to the name of the function while the func-).25 F +(tion is e)108 698.4 Q -.15(xe)-.15 G(cuting.).15 E 1.25 +(All other aspects of the shell e)108 715.2 R -.15(xe)-.15 G 1.25 +(cution en).15 F 1.25 +(vironment are identical between a function and its caller with)-.4 F +1.215(these e)108 727.2 R 1.215(xceptions: the)-.15 F F4(DEB)3.715 E(UG) +-.09 E F1(and)3.465 E F2(RETURN)3.715 E F1 1.215 +(traps \(see the description of the)3.715 F F2(trap)3.714 E F1 -.2(bu) +3.714 G 1.214(iltin under).2 F F4(SHELL)3.714 E F1(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(35)185.955 E 0 Cg EP +%%Page: 36 36 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 9/Times-Bold@0 SF -.09(BU)108 84 S(IL).09 E .478 +(TIN COMMANDS)-.828 F F1(belo)2.728 E .479 +(w\) are not inherited unless the function has been gi)-.25 F -.15(ve) +-.25 G 2.979(nt).15 G(he)-2.979 E/F3 10/Times-Bold@0 SF(trace)2.979 E F1 +(attrib)2.979 E .479(ute \(see)-.2 F .421(the description of the)108 96 +R F2(declar)2.92 E(e)-.162 E F1 -.2(bu)2.67 G .42(iltin belo).2 F .42 +(w\) or the)-.25 F F3 .42(\255o functrace)2.92 F F1 .42 +(shell option has been enabled with the)2.92 F F3(set)2.92 E F1 -.2(bu) +108 108 S .071(iltin \(in which case all functions inherit the).2 F F3 +(DEB)2.572 E(UG)-.1 E F1(and)2.572 E F3(RETURN)2.572 E F1 .072 +(traps\), and the)2.572 F F2(ERR)2.572 E F1 .072(trap is not inher)2.322 +F(-)-.2 E(ited unless the)108 120 Q F3(\255o errtrace)2.5 E F1 +(shell option has been enabled.)2.5 E -1.11(Va)108 136.8 S .942 +(riables local to the function are declared with the)1.11 F F3(local) +3.442 E F1 -.2(bu)3.442 G .942(iltin command \().2 F F0 .942 +(local variables)B F1 3.442(\). Ordinarily)B(,)-.65 E -.25(va)108 148.8 +S .39(riables and their v).25 F .39 +(alues are shared between the function and its caller)-.25 F 5.391(.I) +-.55 G 2.891(fav)-5.391 G .391(ariable is declared)-3.141 F F3(local) +2.891 E F1 2.891(,t)C(he)-2.891 E -.25(va)108 160.8 S(riable').25 E 2.5 +(sv)-.55 G(isible scope is restricted to that function and its children\ + \(including the functions it calls\).)-2.5 E .727(In the follo)108 +177.6 R .727(wing description, the)-.25 F F0(curr)3.227 E .727 +(ent scope)-.37 F F1 .726(is a currently- e)3.226 F -.15(xe)-.15 G .726 +(cuting function.).15 F(Pre)5.726 E .726(vious scopes consist)-.25 F +.965(of that function')108 189.6 R 3.465(sc)-.55 G .966(aller and so on\ +, back to the \231global\232 scope, where the shell is not e)-3.465 F +-.15(xe)-.15 G .966(cuting an).15 F 3.466(ys)-.15 G(hell)-3.466 E 3.159 +(function. A)108 201.6 R .659(local v)3.159 F .658 +(ariable at the current scope is a v)-.25 F .658 +(ariable declared using the)-.25 F F3(local)3.158 E F1(or)3.158 E F3 +(declar)3.158 E(e)-.18 E F1 -.2(bu)3.158 G .658(iltins in).2 F +(the function that is currently e)108 213.6 Q -.15(xe)-.15 G(cuting.).15 +E .587(Local v)108 230.4 R .587(ariables \231shado)-.25 F .587(w\232 v) +-.25 F .587(ariables with the same name declared at pre)-.25 F .588 +(vious scopes.)-.25 F -.15(Fo)5.588 G 3.088(ri).15 G .588 +(nstance, a local)-3.088 F -.25(va)108 242.4 S .782 +(riable declared in a function hides v).25 F .782 +(ariables with the same name declared at pre)-.25 F .782 +(vious scopes, including)-.25 F 1.247(global v)108 254.4 R 1.248 +(ariables: references and assignments refer to the local v)-.25 F 1.248 +(ariable, lea)-.25 F 1.248(ving the v)-.2 F 1.248(ariables at pre)-.25 F +(vious)-.25 E(scopes unmodi\214ed.)108 266.4 Q +(When the function returns, the global v)5 E(ariable is once ag)-.25 E +(ain visible.)-.05 E .727(The shell uses)108 283.2 R F0 .727 +(dynamic scoping)3.227 F F1 .726(to control a v)3.227 F(ariable')-.25 E +3.226(sv)-.55 G .726(isibility within functions.)-3.226 F -.4(Wi)5.726 G +.726(th dynamic scoping,).4 F .007(visible v)108 295.2 R .007 +(ariables and their v)-.25 F .007 +(alues are a result of the sequence of function calls that caused e)-.25 +F -.15(xe)-.15 G .008(cution to reach).15 F .814(the current function.) +108 307.2 R .813(The v)5.814 F .813(alue of a v)-.25 F .813 +(ariable that a function sees depends on its v)-.25 F .813 +(alue within its caller)-.25 F 3.313(,i)-.4 G(f)-3.313 E(an)108 319.2 Q +1.427 -.65(y, w)-.15 H .127 +(hether that caller is the global scope or another shell function.).65 F +.127(This is also the v)5.127 F .127(alue that a local v)-.25 F(ari-) +-.25 E(able declaration shado)108 331.2 Q(ws, and the v)-.25 E +(alue that is restored when the function returns.)-.25 E -.15(Fo)108 348 +S 2.724(re).15 G .224(xample, if a v)-2.874 F(ariable)-.25 E F0(var) +2.724 E F1 .223(is declared as local in function)2.724 F F0(func1)2.723 +E F1 2.723(,a)C(nd)-2.723 E F0(func1)2.723 E F1 .223 +(calls another function)2.723 F F0(func2)2.723 E F1(,)A 1.621 +(references to)108 360 R F0(var)4.121 E F1 1.621(made from within)4.121 +F F0(func2)4.121 E F1(resolv)4.121 E 4.121(et)-.15 G 4.121(ot)-4.121 G +1.621(he local v)-4.121 F(ariable)-.25 E F0(var)4.121 E F1(from)4.122 E +F0(func1)4.122 E F1 4.122(,s)C(hado)-4.122 E 1.622(wing an)-.25 F(y)-.15 +E(global v)108 372 Q(ariable named)-.25 E F0(var)2.5 E F1(.)A(The)108 +388.8 Q F3(unset)2.983 E F1 -.2(bu)2.983 G .483 +(iltin also acts using the same dynamic scope: if a v).2 F .482 +(ariable is local to the current scope,)-.25 F F3(unset)2.982 E F1 .57 +(unsets it; otherwise the unset will refer to the v)108 400.8 R .571 +(ariable found in an)-.25 F 3.071(yc)-.15 G .571 +(alling scope as described abo)-3.071 F -.15(ve)-.15 G 5.571(.I).15 G +3.071(fa)-5.571 G -.25(va)108 412.8 S .11(riable at the current local s\ +cope is unset, it remains so \(appearing as unset\) until it is reset i\ +n that scope or).25 F .88(until the function returns.)108 424.8 R .88 +(Once the function returns, an)5.88 F 3.38(yi)-.15 G .88 +(nstance of the v)-3.38 F .88(ariable at a pre)-.25 F .88 +(vious scope be-)-.25 F .275(comes visible.)108 436.8 R .275 +(If the unset acts on a v)5.275 F .275(ariable at a pre)-.25 F .274 +(vious scope, an)-.25 F 2.774(yi)-.15 G .274(nstance of a v)-2.774 F +.274(ariable with that name)-.25 F .62(that had been shado)108 448.8 R +.62(wed becomes visible \(see belo)-.25 F 3.12(wh)-.25 G 1.12 -.25(ow t) +-3.12 H(he).25 E F3(localv)3.12 E(ar_unset)-.1 E F1 .62 +(shell option changes this be-)3.12 F(ha)108 460.8 Q(vior\).)-.2 E(The) +108 477.6 Q F2(FUNCNEST)3.881 E F1 -.25(va)3.631 G 1.381 +(riable, if set to a numeric v).25 F 1.38 +(alue greater than 0, de\214nes a maximum function nesting)-.25 F(le)108 +489.6 Q -.15(ve)-.25 G 2.5(l. Function).15 F(in)2.5 E -.2(vo)-.4 G +(cations that e).2 E(xceed the limit cause the entire command to abort.) +-.15 E .043(If the b)108 506.4 R .043(uiltin command)-.2 F F3 -.18(re) +2.543 G(tur).18 E(n)-.15 E F1 .043(is e)2.543 F -.15(xe)-.15 G .043 +(cuted in a function, the function completes and e).15 F -.15(xe)-.15 G +.044(cution resumes with).15 F .683(the ne)108 518.4 R .683 +(xt command after the function call.)-.15 F(If)5.683 E F3 -.18(re)3.183 +G(tur).18 E(n)-.15 E F1 .683(is supplied a numeric ar)3.183 F .683 +(gument, that is the function')-.18 F(s)-.55 E .851 +(return status; otherwise the function')108 530.4 R 3.351(sr)-.55 G .851 +(eturn status is the e)-3.351 F .851(xit status of the last command e) +-.15 F -.15(xe)-.15 G .852(cuted before).15 F(the)108 542.4 Q F3 -.18 +(re)4.667 G(tur).18 E(n)-.15 E F1 7.167(.A)C 2.466 -.15(ny c)-7.167 H +2.166(ommand associated with the).15 F F3(RETURN)4.666 E F1 2.166 +(trap is e)4.666 F -.15(xe)-.15 G 2.166(cuted before e).15 F -.15(xe) +-.15 G 2.166(cution resumes.).15 F .13(When a function completes, the v) +108 554.4 R .13 +(alues of the positional parameters and the special parameter)-.25 F F3 +(#)2.63 E F1 .13(are restored)2.63 F(to the v)108 566.4 Q(alues the)-.25 +E 2.5(yh)-.15 G(ad prior to the function')-2.5 E 2.5(se)-.55 G -.15(xe) +-2.65 G(cution.).15 E(The)108 583.2 Q F32.707 E F1 .207 +(option to the)2.707 F F3(declar)2.707 E(e)-.18 E F1(or)2.707 E F3 +(typeset)2.707 E F1 -.2(bu)2.707 G .206 +(iltin commands lists function names and de\214nitions.).2 F(The)5.206 E +F32.706 E F1(op-)2.706 E .655(tion to)108 595.2 R F3(declar)3.155 +E(e)-.18 E F1(or)3.155 E F3(typeset)3.155 E F1 .655(lists the function \ +names only \(and optionally the source \214le and line number)3.155 F +3.155(,i)-.4 G(f)-3.155 E(the)108 607.2 Q F3(extdeb)3.032 E(ug)-.2 E F1 +.532(shell option is enabled\).)3.032 F .532(Functions may be e)5.532 F +.532(xported so that child shell processes \(those cre-)-.15 F .441 +(ated when e)108 619.2 R -.15(xe)-.15 G .441(cuting a separate shell in) +.15 F -.2(vo)-.4 G .441(cation\) automatically ha).2 F .741 -.15(ve t) +-.2 H .441(hem de\214ned with the).15 F F32.942 E F1 .442 +(option to the)2.942 F F3(export)108 631.2 Q F1 -.2(bu)2.5 G 2.5 +(iltin. The).2 F F32.5 E F1(option to the)2.5 E F3(unset)2.5 E F1 +-.2(bu)2.5 G(iltin deletes a function de\214nition.).2 E .372 +(Functions may be recursi)108 648 R -.15(ve)-.25 G 5.371(.T).15 G(he) +-5.371 E F3(FUNCNEST)2.871 E F1 -.25(va)2.871 G .371 +(riable may be used to limit the depth of the function call).25 F .421 +(stack and restrict the number of function in)108 660 R -.2(vo)-.4 G +2.922(cations. By).2 F(def)2.922 E(ault,)-.1 E F3(bash)2.922 E F1 .422 +(imposes no limit on the number of)2.922 F(recursi)108 672 Q .3 -.15 +(ve c)-.25 H(alls.).15 E/F4 10.95/Times-Bold@0 SF(ARITHMETIC EV)72 688.8 +Q(ALU)-1.478 E -1.04(AT)-.657 G(ION)1.04 E F1 1.089(The shell allo)108 +700.8 R 1.089(ws arithmetic e)-.25 F 1.089(xpressions to be e)-.15 F +-.25(va)-.25 G 1.089(luated, under certain circumstances \(see the).25 F +F3(let)3.588 E F1(and)3.588 E F3(de-)3.588 E(clar)108 712.8 Q(e)-.18 E +F1 -.2(bu)3.187 G .687(iltin commands, the).2 F F3(\(\()3.188 E F1 .688 +(compound command, the arithmetic)3.188 F F3 -.25(fo)3.188 G(r).25 E F1 +.688(command, the)3.188 F F3([[)3.188 E F1 .688(conditional com-)3.188 F +(mand, and)108 724.8 Q F3(Arithmetic Expansion)2.5 E F1(\).)A +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(36)185.955 E 0 Cg EP +%%Page: 37 37 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(Ev)108 84 Q .256(aluation is done in the lar)-.25 F +.256(gest \214x)-.18 F .256(ed-width inte)-.15 F .256(gers a)-.15 F -.25 +(va)-.2 G .256(ilable, with no check for o).25 F -.15(ve)-.15 G(r\215o) +.15 E 1.556 -.65(w, t)-.25 H .256(hough di).65 F(vision)-.25 E .057 +(by 0 is trapped and \215agged as an error)108 96 R 5.058(.T)-.55 G .058 +(he operators and their precedence, associati)-5.058 F(vity)-.25 E 2.558 +(,a)-.65 G .058(nd v)-2.558 F .058(alues are the)-.25 F .222 +(same as in the C language.)108 108 R .222(The follo)5.222 F .222 +(wing list of operators is grouped into le)-.25 F -.15(ve)-.25 G .221 +(ls of equal-precedence oper).15 F(-)-.2 E 2.5(ators. The)108 120 R(le) +2.5 E -.15(ve)-.25 G(ls are listed in order of decreasing precedence.) +.15 E F0(id)108 136.8 Q/F2 10/Times-Bold@0 SF(++)A F0(id)2.5 E F2A +F1 -.25(va)144 148.8 S(riable post-increment and post-decrement).25 E F2 +(++)108 160.8 Q F0(id)A F22.5 E F0(id)A F1 -.25(va)144 172.8 S +(riable pre-increment and pre-decrement).25 E F2 2.5108 184.8 S F1 +(unary minus and plus)144 184.8 Q F2 2.5<2101>108 196.8 S F1 +(logical and bitwise ne)144 196.8 Q -.05(ga)-.15 G(tion).05 E F2(**)108 +208.8 Q F1 -.15(ex)144 208.8 S(ponentiation).15 E F2 2.5(*/%)108 220.8 S +F1(multiplication, di)144 220.8 Q(vision, remainder)-.25 E F2 2.5<2bad> +108 232.8 S F1(addition, subtraction)144 232.8 Q F2(<< >>)108 244.8 Q F1 +(left and right bitwise shifts)144 244.8 Q F2(<= >= < >)108 256.8 Q F1 +(comparison)144 268.8 Q F2(== !=)108 280.8 Q F1(equality and inequality) +144 280.8 Q F2(&)108 292.8 Q F1(bitwise AND)144 292.8 Q F2<00>108 304.8 +Q F1(bitwise e)144 304.8 Q(xclusi)-.15 E .3 -.15(ve O)-.25 H(R).15 E F2 +(|)108 316.8 Q F1(bitwise OR)144 316.8 Q F2(&&)108 328.8 Q F1 +(logical AND)144 328.8 Q F2(||)108 340.8 Q F1(logical OR)144 340.8 Q F0 +-.2(ex)108 352.8 S(pr).2 E F2(?)A F0 -.2(ex)C(pr).2 E F2(:)A F0 -.2(ex)C +(pr).2 E F1(conditional operator)144 364.8 Q F2 2.5(=*)108 376.8 S 2.5 +(=/)-2.5 G 2.5(=%)-2.5 G 2.5(=+)-2.5 G 2.5<3dad>-2.5 G 2.5(=<)-2.5 G +(<= >>= &= \000= |=)-2.5 E F1(assignment)144 388.8 Q F0 -.2(ex)108 400.8 +S(pr1).2 E F2(,)2.5 E F0 -.2(ex)2.5 G(pr2).2 E F1(comma)144 412.8 Q .68 +(Shell v)108 429.6 R .68(ariables are allo)-.25 F .68 +(wed as operands; parameter e)-.25 F .68 +(xpansion is performed before the e)-.15 F .68(xpression is e)-.15 F +-.25(va)-.25 G(lu-).25 E 3.508(ated. W)108 441.6 R 1.008(ithin an e)-.4 +F 1.008(xpression, shell v)-.15 F 1.007 +(ariables may also be referenced by name without using the parameter) +-.25 F -.15(ex)108 453.6 S .68(pansion syntax.).15 F .68 +(This means you can use "x", where)5.68 F F0(x)3.181 E F1 .681 +(is a shell v)3.181 F .681(ariable name, in an arithmetic e)-.25 F +(xpres-)-.15 E .206(sion, and the shell will e)108 465.6 R -.25(va)-.25 +G .205(luate its v).25 F .205(alue as an e)-.25 F .205 +(xpression and use the result.)-.15 F 2.705(As)5.205 G .205(hell v) +-2.705 F .205(ariable that is null or)-.25 F(unset e)108 477.6 Q -.25 +(va)-.25 G(luates to 0 when referenced by name in an e).25 E(xpression.) +-.15 E .828(The v)108 494.4 R .828(alue of a v)-.25 F .828(ariable is e) +-.25 F -.25(va)-.25 G .828(luated as an arithmetic e).25 F .829 +(xpression when it is referenced, or when a v)-.15 F(ariable)-.25 E .192 +(which has been gi)108 506.4 R -.15(ve)-.25 G 2.692(nt).15 G(he)-2.692 E +F0(inte)2.692 E -.1(ge)-.4 G(r).1 E F1(attrib)2.692 E .192(ute using)-.2 +F F2(declar)2.692 E 2.692<65ad>-.18 G(i)-2.692 E F1 .191 +(is assigned a v)2.692 F 2.691(alue. A)-.25 F .191(null v)2.691 F .191 +(alue e)-.25 F -.25(va)-.25 G .191(luates to 0.).25 F 2.5(As)108 518.4 S +(hell v)-2.5 E(ariable need not ha)-.25 E .3 -.15(ve i)-.2 H(ts).15 E F0 +(inte)2.5 E -.1(ge)-.4 G(r).1 E F1(attrib)2.5 E +(ute turned on to be used in an e)-.2 E(xpression.)-.15 E(Inte)108 535.2 +Q .517(ger constants follo)-.15 F 3.017(wt)-.25 G .518 +(he C language de\214nition, without suf)-3.017 F<8c78>-.25 E .518 +(es or character constants.)-.15 F .518(Constants with)5.518 F 3.283(al) +108 547.2 S .783(eading 0 are interpreted as octal numbers.)-3.283 F +3.282(Al)5.783 G .782(eading 0x or 0X denotes he)-3.282 F 3.282 +(xadecimal. Otherwise,)-.15 F(num-)3.282 E .815(bers tak)108 559.2 R +3.315(et)-.1 G .815(he form [)-3.315 F F0(base#)A F1 .815 +(]n, where the optional)B F0(base)3.315 E F1 .816 +(is a decimal number between 2 and 64 representing)3.315 F .35 +(the arithmetic base, and)108 571.2 R F0(n)2.85 E F1 .35 +(is a number in that base.)2.85 F(If)5.35 E F0(base#)2.849 E F1 .349 +(is omitted, then base 10 is used.)2.849 F .349(When speci-)5.349 F +(fying)108 583.2 Q F0(n)2.974 E F1 2.974(,i)C 2.974(fan)-2.974 G .474(o\ +n-digit is required, the digits greater than 9 are represented by the l\ +o)-2.974 F .475(wercase letters, the up-)-.25 F .518 +(percase letters, @, and _, in that order)108 595.2 R 5.518(.I)-.55 G(f) +-5.518 E F0(base)3.018 E F1 .518(is less than or equal to 36, lo)3.018 F +.518(wercase and uppercase letters)-.25 F +(may be used interchangeably to represent numbers between 10 and 35.)108 +607.2 Q 1.127(Operators are e)108 624 R -.25(va)-.25 G 1.127 +(luated in precedence order).25 F 6.128(.S)-.55 G(ub-e)-6.128 E 1.128 +(xpressions in parentheses are e)-.15 F -.25(va)-.25 G 1.128 +(luated \214rst and may).25 F -.15(ove)108 636 S +(rride the precedence rules abo).15 E -.15(ve)-.15 G(.).15 E/F3 10.95 +/Times-Bold@0 SF(CONDITION)72 652.8 Q(AL EXPRESSIONS)-.219 E F1 .256 +(Conditional e)108 664.8 R .256(xpressions are used by the)-.15 F F2([[) +2.755 E F1 .255(compound command and the)2.755 F F2(test)2.755 E F1(and) +2.755 E F2([)2.755 E F1 -.2(bu)2.755 G .255(iltin commands to test).2 F +.133(\214le attrib)108 676.8 R .133 +(utes and perform string and arithmetic comparisons.)-.2 F(The)5.133 E +F2(test)2.633 E F1(and)2.633 E F2([)2.634 E F1 .134 +(commands determine their be-)2.634 F(ha)108 688.8 Q .198 +(vior based on the number of ar)-.2 F .197 +(guments; see the descriptions of those commands for an)-.18 F 2.697(yo) +-.15 G .197(ther command-)-2.697 F(speci\214c actions.)108 700.8 Q .413 +(Expressions are formed from the unary or binary primaries listed belo) +108 717.6 R 4.214 -.65(w. U)-.25 H .414(nary e).65 F .414 +(xpressions are often used)-.15 F 1.465(to e)108 729.6 R 1.465 +(xamine the status of a \214le or shell v)-.15 F 3.964(ariable. Binary) +-.25 F 1.464(operators are used for string, numeric, and \214le)3.964 F +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(37)185.955 E 0 Cg EP +%%Page: 38 38 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(attrib)108 84 Q(ute comparisons.)-.2 E/F2 10 +/Times-Bold@0 SF(Bash)108 100.8 Q F1 1.202(handles se)3.702 F -.15(ve) +-.25 G 1.202(ral \214lenames specially when the).15 F 3.703(ya)-.15 G +1.203(re used in e)-3.703 F 3.703(xpressions. If)-.15 F 1.203 +(the operating system on)3.703 F(which)108 112.8 Q F2(bash)2.64 E F1 .14 +(is running pro)2.64 F .139(vides these special \214les, bash will use \ +them; otherwise it will emulate them inter)-.15 F(-)-.2 E .991 +(nally with this beha)108 124.8 R .991(vior: If an)-.2 F(y)-.15 E F0 +(\214le)3.491 E F1(ar)3.491 E .991 +(gument to one of the primaries is of the form)-.18 F F0(/de)5.157 E +(v/fd/n)-.15 E F1 3.491(,t)1.666 G(hen)-3.491 E F2(bash)3.491 E F1 .882 +(checks \214le descriptor)108 136.8 R F0(n)3.382 E F1 5.882(.I)C 3.382 +(ft)-5.882 G(he)-3.382 E F0(\214le)3.382 E F1(ar)3.382 E .882 +(gument to one of the primaries is one of)-.18 F F0(/de)5.048 E(v/stdin) +-.15 E F1(,)1.666 E F0(/de)5.048 E(v/stdout)-.15 E F1 3.382(,o)1.666 G +(r)-3.382 E F0(/de)109.666 148.8 Q(v/stderr)-.15 E F1(,)1.666 E F2(bash) +2.5 E F1(checks \214le descriptor 0, 1, or 2, respecti)2.5 E -.15(ve) +-.25 G(ly).15 E(.)-.65 E .721 +(Unless otherwise speci\214ed, primaries that operate on \214les follo) +108 165.6 R 3.221(ws)-.25 G .722(ymbolic links and operate on the tar) +-3.221 F(get)-.18 E(of the link, rather than the link itself.)108 177.6 +Q .642(When used with)108 194.4 R F2([[)3.142 E F1 3.142(,o)C 3.142(rw) +-3.142 G .642(hen the shell is in posix mode, the)-3.142 F F2(<)3.141 E +F1(and)3.141 E F2(>)3.141 E F1 .641(operators sort le)3.141 F .641 +(xicographically using)-.15 F(the current locale.)108 206.4 Q +(When the shell is not in posix mode, the)5 E F2(test)2.5 E F1 +(command sorts using ASCII ordering.)2.5 E F2108 223.2 Q F0 +(\214le)2.5 E F1 -.35(Tr)144 223.2 S(ue if).35 E F0(\214le)2.5 E F1 -.15 +(ex)2.5 G(ists.).15 E F2108 235.2 Q F0(\214le)2.5 E F1 -.35(Tr)144 +235.2 S(ue if).35 E F0(\214le)2.5 E F1 -.15(ex)2.5 G +(ists and is a block special \214le.).15 E F2108 247.2 Q F0 +(\214le)2.5 E F1 -.35(Tr)144 247.2 S(ue if).35 E F0(\214le)2.5 E F1 -.15 +(ex)2.5 G(ists and is a character special \214le.).15 E F2108 +259.2 Q F0(\214le)2.5 E F1 -.35(Tr)144 259.2 S(ue if).35 E F0(\214le)2.5 +E F1 -.15(ex)2.5 G(ists and is a directory).15 E(.)-.65 E F2108 +271.2 Q F0(\214le)2.5 E F1 -.35(Tr)144 271.2 S(ue if).35 E F0(\214le)2.5 +E F1 -.15(ex)2.5 G(ists.).15 E F2108 283.2 Q F0(\214le)2.5 E F1 +-.35(Tr)144 283.2 S(ue if).35 E F0(\214le)2.5 E F1 -.15(ex)2.5 G +(ists and is a re).15 E(gular \214le.)-.15 E F2108 295.2 Q F0 +(\214le)2.5 E F1 -.35(Tr)144 295.2 S(ue if).35 E F0(\214le)2.5 E F1 -.15 +(ex)2.5 G(ists and is set-group-id.).15 E F2108 307.2 Q F0(\214le) +2.5 E F1 -.35(Tr)144 307.2 S(ue if).35 E F0(\214le)2.5 E F1 -.15(ex)2.5 +G(ists and is a symbolic link.).15 E F2108 319.2 Q F0(\214le)2.5 E +F1 -.35(Tr)144 319.2 S(ue if).35 E F0(\214le)2.5 E F1 -.15(ex)2.5 G +(ists and its \231stick).15 E(y\232 bit is set.)-.15 E F2108 331.2 +Q F0(\214le)2.5 E F1 -.35(Tr)144 331.2 S(ue if).35 E F0(\214le)2.5 E F1 +-.15(ex)2.5 G(ists and is a named pipe \(FIFO\).).15 E F2108 343.2 +Q F0(\214le)2.5 E F1 -.35(Tr)144 343.2 S(ue if).35 E F0(\214le)2.5 E F1 +-.15(ex)2.5 G(ists and is readable.).15 E F2108 355.2 Q F0(\214le) +2.5 E F1 -.35(Tr)144 355.2 S(ue if).35 E F0(\214le)2.5 E F1 -.15(ex)2.5 +G(ists and has a size greater than zero.).15 E F2108 367.2 Q F0 +(fd)2.5 E F1 -.35(Tr)144 367.2 S(ue if \214le descriptor).35 E F0(fd) +4.47 E F1(is open and refers to a terminal.)3.27 E F2108 379.2 Q +F0(\214le)2.5 E F1 -.35(Tr)144 379.2 S(ue if).35 E F0(\214le)2.5 E F1 +-.15(ex)2.5 G(ists and its set-user).15 E(-id bit is set.)-.2 E F2 +108 391.2 Q F0(\214le)2.5 E F1 -.35(Tr)144 391.2 S(ue if).35 E F0 +(\214le)2.5 E F1 -.15(ex)2.5 G(ists and is writable.).15 E F2108 +403.2 Q F0(\214le)2.5 E F1 -.35(Tr)144 403.2 S(ue if).35 E F0(\214le)2.5 +E F1 -.15(ex)2.5 G(ists and is e).15 E -.15(xe)-.15 G(cutable.).15 E F2 +108 415.2 Q F0(\214le)2.5 E F1 -.35(Tr)144 415.2 S(ue if).35 E F0 +(\214le)2.5 E F1 -.15(ex)2.5 G(ists and is o).15 E(wned by the ef)-.25 E +(fecti)-.25 E .3 -.15(ve g)-.25 H(roup id.).15 E F2108 427.2 Q F0 +(\214le)2.5 E F1 -.35(Tr)144 427.2 S(ue if).35 E F0(\214le)2.5 E F1 -.15 +(ex)2.5 G(ists and is a symbolic link.).15 E F2108 439.2 Q F0 +(\214le)2.5 E F1 -.35(Tr)144 439.2 S(ue if).35 E F0(\214le)2.5 E F1 -.15 +(ex)2.5 G(ists and has been modi\214ed since it w).15 E +(as last accessed.)-.1 E F2108 451.2 Q F0(\214le)2.5 E F1 -.35(Tr) +144 451.2 S(ue if).35 E F0(\214le)2.5 E F1 -.15(ex)2.5 G(ists and is o) +.15 E(wned by the ef)-.25 E(fecti)-.25 E .3 -.15(ve u)-.25 H(ser id.).15 +E F2108 463.2 Q F0(\214le)2.5 E F1 -.35(Tr)144 463.2 S(ue if).35 E +F0(\214le)2.5 E F1 -.15(ex)2.5 G(ists and is a sock).15 E(et.)-.1 E F2 +108 475.2 Q F0(optname)2.5 E F1 -.35(Tr)144 487.2 S .262 +(ue if the shell option).35 F F0(optname)2.992 E F1 .262(is enabled.) +2.942 F .262(See the list of options under the description of the)5.262 +F F22.763 E F1(option to the)144 499.2 Q F2(set)2.5 E F1 -.2(bu) +2.5 G(iltin belo).2 E -.65(w.)-.25 G F2108 511.2 Q F0(varname)2.5 +E F1 -.35(Tr)144 523.2 S .327(ue if the shell v).35 F(ariable)-.25 E F0 +(varname)3.116 E F1 .326(is set \(has been assigned a v)3.006 F 2.826 +(alue\). If)-.25 F F0(varname)2.826 E F1 .326(is an inde)2.826 F -.15 +(xe)-.15 G 2.826(da).15 G -.2(r-)-2.826 G .131(ray v)144 535.2 R .131 +(ariable name subscripted by)-.25 F F0(@)2.631 E F1(or)2.631 E F0(*) +2.631 E F1 2.631(,t)C .131(his returns true if the array has an)-2.631 F +2.631(ys)-.15 G .131(et elements.)-2.631 F(If)5.131 E F0(var)2.632 E(-) +-.2 E(name)144 547.2 Q F1 .737(is an associati)3.238 F 1.037 -.15(ve a) +-.25 H .737(rray v).15 F .737(ariable name subscripted by)-.25 F F0(@) +3.237 E F1(or)3.237 E F0(*)3.237 E F1 3.237(,t)C .737 +(his returns true if an element)-3.237 F(with that k)144 559.2 Q .3 -.15 +(ey i)-.1 H 2.5(ss).15 G(et.)-2.5 E F2108 571.2 Q F0(varname)2.5 E +F1 -.35(Tr)144 583.2 S(ue if the shell v).35 E(ariable)-.25 E F0 +(varname)2.79 E F1(is set and is a name reference.)2.68 E F2108 +595.2 Q F0(string)2.5 E F1 -.35(Tr)144 607.2 S(ue if the length of).35 E +F0(string)2.5 E F1(is zero.)2.5 E F0(string)108 619.2 Q F2108 +631.2 Q F0(string)2.5 E F1 -.35(Tr)144 643.2 S(ue if the length of).35 E +F0(string)2.84 E F1(is non-zero.)2.72 E F0(string1)108 660 Q F2(==)2.5 E +F0(string2)2.5 E(string1)108 672 Q F2(=)2.5 E F0(string2)2.5 E F1 -.35 +(Tr)144 684 S .861(ue if the strings are equal.).35 F F2(=)5.861 E F1 +.861(should be used with the)3.361 F F2(test)3.361 E F1 .862 +(command for POSIX conformance.)3.362 F .447(When used with the)144 696 +R F2([[)2.946 E F1 .446 +(command, this performs pattern matching as described abo)2.946 F .746 +-.15(ve \()-.15 H F2(Compound).15 E(Commands)144 708 Q F1(\).)A +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(38)185.955 E 0 Cg EP +%%Page: 39 39 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E F0(string1)108 84 Q/F2 10/Times-Bold@0 SF(!=)2.5 E +F0(string2)2.5 E F1 -.35(Tr)144 96 S(ue if the strings are not equal.) +.35 E F0(string1)108 108 Q F2(<)2.5 E F0(string2)2.5 E F1 -.35(Tr)144 +120 S(ue if).35 E F0(string1)2.5 E F1(sorts before)2.5 E F0(string2)2.5 +E F1(le)2.5 E(xicographically)-.15 E(.)-.65 E F0(string1)108 132 Q F2(>) +2.5 E F0(string2)2.5 E F1 -.35(Tr)144 144 S(ue if).35 E F0(string1)2.5 E +F1(sorts after)2.5 E F0(string2)2.5 E F1(le)2.5 E(xicographically)-.15 E +(.)-.65 E F0(\214le1)108 160.8 Q F2(\255ef)2.5 E F0(\214le2)2.5 E F1 +-.35(Tr)144 172.8 S(ue if).35 E F0(\214le1)2.5 E F1(and)2.5 E F0 +(\214le2)2.5 E F1(refer to the same de)2.5 E(vice and inode numbers.) +-.25 E F0(\214le1)108 184.8 Q F12.5 E F2(nt)A F0(\214le2)2.5 E F1 +-.35(Tr)144 196.8 S(ue if).35 E F0(\214le1)2.5 E F1(is ne)2.5 E +(wer \(according to modi\214cation date\) than)-.25 E F0(\214le2)2.5 E +F1 2.5(,o)C 2.5(ri)-2.5 G(f)-2.5 E F0(\214le1)2.5 E F1 -.15(ex)2.5 G +(ists and).15 E F0(\214le2)2.5 E F1(does not.)2.5 E F0(\214le1)108 208.8 +Q F12.5 E F2(ot)A F0(\214le2)2.5 E F1 -.35(Tr)144 220.8 S(ue if).35 +E F0(\214le1)2.5 E F1(is older than)2.5 E F0(\214le2)2.5 E F1 2.5(,o)C +2.5(ri)-2.5 G(f)-2.5 E F0(\214le2)2.5 E F1 -.15(ex)2.5 G(ists and).15 E +F0(\214le1)2.5 E F1(does not.)2.5 E F0(ar)108.33 237.6 Q(g1)-.37 E F2 +(OP)2.5 E F0(ar)2.5 E(g2)-.37 E/F3 9/Times-Bold@0 SF(OP)144 249.6 Q F1 +.385(is one of)2.634 F F2(\255eq)2.885 E F1(,)A F2(\255ne)2.885 E F1(,)A +F2(\255lt)2.885 E F1(,)A F2(\255le)2.885 E F1(,)A F2(\255gt)2.885 E F1 +2.885(,o)C(r)-2.885 E F2(\255ge)2.885 E F1 5.385(.T)C .385 +(hese arithmetic binary operators return true if)-5.385 F F0(ar)2.885 E +(g1)-.37 E F1 .845(is equal to, not equal to, less than, less than or e\ +qual to, greater than, or greater than or equal to)144 261.6 R F0(ar)144 +273.6 Q(g2)-.37 E F1 3.708(,r)C(especti)-3.708 E -.15(ve)-.25 G(ly).15 E +(.)-.65 E F0(ar)6.538 E(g1)-.37 E F1(and)3.708 E F0(ar)4.038 E(g2)-.37 E +F1 1.209(may be positi)3.728 F 1.509 -.15(ve o)-.25 H 3.709(rn).15 G +-2.25 -.15(eg a)-3.709 H(ti).15 E 1.509 -.15(ve i)-.25 H(nte).15 E 3.709 +(gers. When)-.15 F 1.209(used with the)3.709 F F2([[)3.709 E F1 +(command,)144 285.6 Q F0(ar)4.093 E(g1)-.37 E F1(and)3.763 E F0(ar)4.093 +E(g2)-.37 E F1 1.263(are e)3.783 F -.25(va)-.25 G 1.262 +(luated as arithmetic e).25 F 1.262(xpressions \(see)-.15 F F3 1.262 +(ARITHMETIC EV)3.762 F(ALU)-1.215 E(A-)-.54 E(TION)144 297.6 Q F1(abo) +2.25 E -.15(ve)-.15 G(\).).15 E/F4 10.95/Times-Bold@0 SF +(SIMPLE COMMAND EXP)72 314.4 Q(ANSION)-.81 E F1 .772(When the shell e) +108 326.4 R -.15(xe)-.15 G .772 +(cutes a simple command, it performs the follo).15 F .772(wing e)-.25 F +.773(xpansions, assignments, and redi-)-.15 F +(rections, from left to right, in the follo)108 338.4 Q(wing order)-.25 +E(.)-.55 E(1.)108 355.2 Q 1.849(The w)144 355.2 R 1.849 +(ords that the parser has mark)-.1 F 1.848(ed as v)-.1 F 1.848 +(ariable assignments \(those preceding the command)-.25 F +(name\) and redirections are sa)144 367.2 Q -.15(ve)-.2 G 2.5(df).15 G +(or later processing.)-2.5 E(2.)108 384 Q .179(The w)144 384 R .179 +(ords that are not v)-.1 F .179 +(ariable assignments or redirections are e)-.25 F 2.68(xpanded. If)-.15 +F(an)2.68 E 2.68(yw)-.15 G .18(ords remain af-)-2.78 F .347(ter e)144 +396 R .347(xpansion, the \214rst w)-.15 F .347(ord is tak)-.1 F .347 +(en to be the name of the command and the remaining w)-.1 F .346 +(ords are)-.1 F(the ar)144 408 Q(guments.)-.18 E(3.)108 424.8 Q +(Redirections are performed as described abo)144 424.8 Q .3 -.15(ve u) +-.15 H(nder).15 E F3(REDIRECTION)2.5 E/F5 9/Times-Roman@0 SF(.)A F1(4.) +108 441.6 Q .716(The te)144 441.6 R .717(xt after the)-.15 F F2(=)3.217 +E F1 .717(in each v)3.217 F .717(ariable assignment under)-.25 F .717 +(goes tilde e)-.18 F .717(xpansion, parameter e)-.15 F(xpansion,)-.15 E +.34(command substitution, arithmetic e)144 453.6 R .339 +(xpansion, and quote remo)-.15 F -.25(va)-.15 G 2.839(lb).25 G .339 +(efore being assigned to the v)-2.839 F(ari-)-.25 E(able.)144 465.6 Q +.586(If no command name results, the v)108 482.4 R .586 +(ariable assignments af)-.25 F .586(fect the current shell en)-.25 F +3.087(vironment. In)-.4 F .587(the case of)3.087 F .371(such a command \ +\(one that consists only of assignment statements and redirections\), a\ +ssignment statements)108 494.4 R .835 +(are performed before redirections.)108 506.4 R .835(Otherwise, the v) +5.835 F .835(ariables are added to the en)-.25 F .835 +(vironment of the e)-.4 F -.15(xe)-.15 G(cuted).15 E .839 +(command and do not af)108 518.4 R .838(fect the current shell en)-.25 F +3.338(vironment. If)-.4 F(an)3.338 E 3.338(yo)-.15 G 3.338(ft)-3.338 G +.838(he assignments attempts to assign a)-3.338 F -.25(va)108 530.4 S +(lue to a readonly v).25 E(ariable, an error occurs, and the command e) +-.25 E(xits with a non-zero status.)-.15 E .149 +(If no command name results, redirections are performed, b)108 547.2 R +.149(ut do not af)-.2 F .15(fect the current shell en)-.25 F 2.65 +(vironment. A)-.4 F(redirection error causes the command to e)108 559.2 +Q(xit with a non-zero status.)-.15 E 1.064 +(If there is a command name left after e)108 576 R 1.064(xpansion, e) +-.15 F -.15(xe)-.15 G 1.064(cution proceeds as described belo).15 F +4.864 -.65(w. O)-.25 H 1.064(therwise, the).65 F .068(command e)108 588 +R 2.568(xits. If)-.15 F .069(one of the e)2.568 F .069 +(xpansions contained a command substitution, the e)-.15 F .069 +(xit status of the command)-.15 F .467(is the e)108 600 R .466 +(xit status of the last command substitution performed.)-.15 F .466 +(If there were no command substitutions, the)5.466 F(command e)108 612 Q +(xits with a zero status.)-.15 E F4(COMMAND EXECUTION)72 628.8 Q F1 .546 +(After a command has been split into w)108 640.8 R .547 +(ords, if it results in a simple command and an optional list of ar)-.1 +F(gu-)-.18 E(ments, the shell performs the follo)108 652.8 Q +(wing actions.)-.25 E .379(If the command name contains no slashes, the\ + shell attempts to locate it.)108 669.6 R .379(If there e)5.379 F .379 +(xists a shell function by)-.15 F .246(that name, that function is in) +108 681.6 R -.2(vo)-.4 G -.1(ke).2 G 2.746(da).1 G 2.746(sd)-2.746 G +.246(escribed abo)-2.746 F .546 -.15(ve i)-.15 H(n).15 E F3(FUNCTIONS) +2.746 E F5(.)A F1 .246(If the name does not match a func-)4.746 F +(tion, the shell searches for it in the list of shell b)108 693.6 Q 2.5 +(uiltins. If)-.2 F 2.5(am)2.5 G(atch is found, that b)-2.5 E +(uiltin is in)-.2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E .31 +(If the name is neither a shell function nor a b)108 710.4 R .309 +(uiltin, and contains no slashes,)-.2 F F2(bash)2.809 E F1 .309 +(searches each element of)2.809 F(the)108 722.4 Q F3 -.666(PA)3.162 G +(TH)-.189 E F1 .662(for a directory containing an e)2.912 F -.15(xe)-.15 +G .662(cutable \214le by that name.).15 F F2(Bash)5.662 E F1 .663 +(uses a hash table to remember)3.162 F(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(39)185.955 E 0 Cg EP +%%Page: 40 40 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .859(the full pathnames of e)108 84 R -.15(xe)-.15 +G .858(cutable \214les \(see).15 F/F2 10/Times-Bold@0 SF(hash)3.358 E F1 +(under)3.358 E/F3 9/Times-Bold@0 SF .858(SHELL B)3.358 F(UIL)-.09 E .858 +(TIN COMMANDS)-.828 F F1(belo)3.108 E 3.358(w\). Bash)-.25 F(per)3.358 E +(-)-.2 E .883(forms a full search of the directories in)108 96 R F3 +-.666(PA)3.383 G(TH)-.189 E F1 .883 +(only if the command is not found in the hash table.)3.133 F .884 +(If the)5.884 F .956(search is unsuccessful, the shell searches for a d\ +e\214ned shell function named)108 108 R F2(command_not_f)3.455 E +(ound_han-)-.25 E(dle)108 120 Q F1 6.005(.I)C 3.505(ft)-6.005 G 1.005 +(hat function e)-3.505 F 1.005(xists, it is in)-.15 F -.2(vo)-.4 G -.1 +(ke).2 G 3.506(di).1 G 3.506(nas)-3.506 G 1.006(eparate e)-3.506 F -.15 +(xe)-.15 G 1.006(cution en).15 F 1.006 +(vironment with the original command)-.4 F .256 +(and the original command')108 132 R 2.756(sa)-.55 G -.18(rg)-2.756 G +.256(uments as its ar).18 F .256(guments, and the function')-.18 F 2.755 +(se)-.55 G .255(xit status becomes the e)-2.905 F .255(xit sta-)-.15 F +.263(tus of that subshell.)108 144 R .263(If that function is not de\ +\214ned, the shell prints an error message and returns an e)5.263 F .263 +(xit sta-)-.15 F(tus of 127.)108 156 Q 1.089(If the search is successfu\ +l, or if the command name contains one or more slashes, the shell e)108 +172.8 R -.15(xe)-.15 G 1.089(cutes the).15 F .197 +(named program in a separate e)108 184.8 R -.15(xe)-.15 G .197 +(cution en).15 F 2.698(vironment. Ar)-.4 F .198 +(gument 0 is set to the name gi)-.18 F -.15(ve)-.25 G .198 +(n, and the remain-).15 F(ing ar)108 196.8 Q +(guments to the command are set to the ar)-.18 E(guments gi)-.18 E -.15 +(ve)-.25 G(n, if an).15 E -.65(y.)-.15 G 1.049(If this e)108 213.6 R +-.15(xe)-.15 G 1.049(cution f).15 F 1.049 +(ails because the \214le is not in e)-.1 F -.15(xe)-.15 G 1.048 +(cutable format, and the \214le is not a directory).15 F 3.548(,i)-.65 G +3.548(ti)-3.548 G 3.548(sa)-3.548 G(s-)-3.548 E .143(sumed to be a)108 +225.6 R F0 .143(shell script)2.643 F F1 2.643(,a\214)C .143 +(le containing shell commands, and the shell creates a ne)-2.643 F 2.643 +(wi)-.25 G .143(nstance of itself to)-2.643 F -.15(exe)108 237.6 S .322 +(cute it.).15 F .322(Bash tries to determine whether the \214le is a te) +5.322 F .321(xt \214le or a binary)-.15 F 2.821(,a)-.65 G .321 +(nd will not e)-2.821 F -.15(xe)-.15 G .321(cute \214les it de-).15 F +.503(termines to be binaries.)108 249.6 R .503 +(This subshell reinitializes itself, so that the ef)5.503 F .503 +(fect is as if a ne)-.25 F 3.003(ws)-.25 G .503(hell had been in-)-3.003 +F -.2(vo)108 261.6 S -.1(ke).2 G 3.474(dt).1 G 3.474(oh)-3.474 G .973 +(andle the script, with the e)-3.474 F .973 +(xception that the locations of commands remembered by the parent)-.15 F +(\(see)108 273.6 Q F2(hash)2.5 E F1(belo)2.5 E 2.5(wu)-.25 G(nder)-2.5 E +F3(SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS)-.828 E F1 +(are retained by the child.)2.25 E .347(If the program is a \214le be) +108 290.4 R .347(ginning with)-.15 F F2(#!)2.847 E F1 2.847(,t)C .348(h\ +e remainder of the \214rst line speci\214es an interpreter for the pro-) +-2.847 F 3.178(gram. The)108 302.4 R .678(shell e)3.178 F -.15(xe)-.15 G +.678(cutes the speci\214ed interpreter on operating systems that do not\ + handle this e).15 F -.15(xe)-.15 G(cutable).15 E .206(format themselv) +108 314.4 R 2.706(es. The)-.15 F(ar)2.706 E .206 +(guments to the interpreter consist of a single optional ar)-.18 F .206 +(gument follo)-.18 F .206(wing the in-)-.25 F .268 +(terpreter name on the \214rst line of the program, follo)108 326.4 R +.267(wed by the name of the program, follo)-.25 F .267(wed by the com-) +-.25 F(mand ar)108 338.4 Q(guments, if an)-.18 E -.65(y.)-.15 G/F4 10.95 +/Times-Bold@0 SF(COMMAND EXECUTION ENVIR)72 355.2 Q(ONMENT)-.329 E F1 +(The shell has an)108 367.2 Q F0 -.2(ex)2.5 G(ecution en).2 E(vir)-.4 E +(onment)-.45 E F1 2.5(,w)C(hich consists of the follo)-2.5 E(wing:)-.25 +E<83>108 384 Q 1.257(Open \214les inherited by the shell at in)144 384 R +-.2(vo)-.4 G 1.258 +(cation, as modi\214ed by redirections supplied to the).2 F F2(exec) +3.758 E F1 -.2(bu)144 396 S(iltin.).2 E<83>108 412.8 Q(The current w)144 +412.8 Q(orking directory as set by)-.1 E F2(cd)2.5 E F1(,)A F2(pushd)2.5 +E F1 2.5(,o)C(r)-2.5 E F2(popd)2.5 E F1 2.5(,o)C 2.5(ri)-2.5 G +(nherited by the shell at in)-2.5 E -.2(vo)-.4 G(cation.).2 E<83>108 +429.6 Q(The \214le creation mode mask as set by)144 429.6 Q F2(umask)2.5 +E F1(or inherited from the shell')2.5 E 2.5(sp)-.55 G(arent.)-2.5 E<83> +108 446.4 Q(Current traps set by)144 446.4 Q F2(trap)2.5 E F1(.)A<83>108 +463.2 Q .152(Shell parameters that are set by v)144 463.2 R .152 +(ariable assignment or with)-.25 F F2(set)2.652 E F1 .152 +(or inherited from the shell')2.652 F 2.651(sp)-.55 G(arent)-2.651 E +(in the en)144 475.2 Q(vironment.)-.4 E<83>108 492 Q +(Shell functions de\214ned during e)144 492 Q -.15(xe)-.15 G +(cution or inherited from the shell').15 E 2.5(sp)-.55 G +(arent in the en)-2.5 E(vironment.)-.4 E<83>108 508.8 Q +(Options enabled at in)144 508.8 Q -.2(vo)-.4 G(cation \(either by def) +.2 E(ault or with command-line ar)-.1 E(guments\) or by)-.18 E F2(set) +2.5 E F1(.)A<83>108 525.6 Q(Options enabled by)144 525.6 Q F2(shopt)2.5 +E F1(.)A<83>108 542.4 Q(Shell aliases de\214ned with)144 542.4 Q F2 +(alias)2.5 E F1(.)A<83>108 559.2 Q -1.11(Va)144 559.2 S +(rious process IDs, including those of background jobs, the v)1.11 E +(alue of)-.25 E F2($$)2.5 E F1 2.5(,a)C(nd the v)-2.5 E(alue of)-.25 E +F3(PPID)2.5 E/F5 9/Times-Roman@0 SF(.)A F1 .426 +(When a simple command other than a b)108 576 R .427 +(uiltin or shell function is to be e)-.2 F -.15(xe)-.15 G .427 +(cuted, it is in).15 F -.2(vo)-.4 G -.1(ke).2 G 2.927(di).1 G 2.927(nas) +-2.927 G(eparate)-2.927 E -.15(exe)108 588 S .134(cution en).15 F .134 +(vironment that consists of the follo)-.4 F 2.634(wing. Unless)-.25 F +.133(otherwise noted, the v)2.634 F .133(alues are inherited from)-.25 F +(the shell.)108 600 Q<83>108 616.8 Q .817(The shell')144 616.8 R 3.317 +(so)-.55 G .818(pen \214les, plus an)-3.317 F 3.318(ym)-.15 G .818 +(odi\214cations and additions speci\214ed by redirections to the com-) +-3.318 F(mand.)144 628.8 Q<83>108 645.6 Q(The current w)144 645.6 Q +(orking directory)-.1 E(.)-.65 E<83>108 662.4 Q +(The \214le creation mode mask.)144 662.4 Q<83>108 679.2 Q .729(Shell v) +144 679.2 R .729(ariables and functions mark)-.25 F .729(ed for e)-.1 F +.728(xport, along with v)-.15 F .728(ariables e)-.25 F .728 +(xported for the command,)-.15 F(passed in the en)144 691.2 Q +(vironment.)-.4 E(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(40) +185.955 E 0 Cg EP +%%Page: 41 41 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E<83>108 84 Q -.35(Tr)144 84 S .131 +(aps caught by the shell are reset to the v).35 F .131 +(alues inherited from the shell')-.25 F 2.631(sp)-.55 G .132 +(arent, and traps ignored)-2.631 F(by the shell are ignored.)144 96 Q +2.5(Ac)108 112.8 S(ommand in)-2.5 E -.2(vo)-.4 G -.1(ke).2 G 2.5(di).1 G +2.5(nt)-2.5 G(his separate en)-2.5 E(vironment cannot af)-.4 E +(fect the shell')-.25 E 2.5(se)-.55 G -.15(xe)-2.65 G(cution en).15 E +(vironment.)-.4 E(A)108 129.6 Q F0(subshell)2.5 E F1(is a cop)2.5 E 2.5 +(yo)-.1 G 2.5(ft)-2.5 G(he shell process.)-2.5 E .577(Command substitut\ +ion, commands grouped with parentheses, and asynchronous commands are i\ +n)108 146.4 R -.2(vo)-.4 G -.1(ke).2 G 3.077(di).1 G(n)-3.077 E 2.744 +(as)108 158.4 S .244(ubshell en)-2.744 F .244 +(vironment that is a duplicate of the shell en)-.4 F .245(vironment, e) +-.4 F .245(xcept that traps caught by the shell are)-.15 F .359 +(reset to the v)108 170.4 R .358 +(alues that the shell inherited from its parent at in)-.25 F -.2(vo)-.4 +G 2.858(cation. Builtin).2 F .358(commands that are in)2.858 F -.2(vo) +-.4 G -.1(ke).2 G(d).1 E .113(as part of a pipeline, e)108 182.4 R .114 +(xcept possibly in the last element depending on the v)-.15 F .114 +(alue of the)-.25 F/F2 10/Times-Bold@0 SF(lastpipe)2.614 E F1 .114 +(shell option,)2.614 F .692(are also e)108 194.4 R -.15(xe)-.15 G .692 +(cuted in a subshell en).15 F 3.191(vironment. Changes)-.4 F .691 +(made to the subshell en)3.191 F .691(vironment cannot af)-.4 F .691 +(fect the)-.25 F(shell')108 206.4 Q 2.5(se)-.55 G -.15(xe)-2.65 G +(cution en).15 E(vironment.)-.4 E .535 +(When the shell is in posix mode, subshells spa)108 223.2 R .535 +(wned to e)-.15 F -.15(xe)-.15 G .535 +(cute command substitutions inherit the v).15 F .535(alue of)-.25 F(the) +108 235.2 Q F22.636 E F1 .136(option from their parent shell.) +2.636 F .135(When not in posix mode,)5.135 F F2(bash)2.635 E F1 .135 +(clears the)2.635 F F22.635 E F1 .135(option in such subshells.) +2.635 F .613(See the description of the)108 247.2 R F2(inherit_err)3.113 +E(exit)-.18 E F1 .613(shell option belo)3.113 F 3.114(wf)-.25 G .614 +(or ho)-3.114 F 3.114(wt)-.25 G 3.114(oc)-3.114 G .614(ontrol this beha) +-3.114 F .614(vior when not in)-.2 F(posix mode.)108 259.2 Q .405 +(If a command is follo)108 276 R .405(wed by a)-.25 F F2(&)2.905 E F1 +.404(and job control is not acti)2.905 F -.15(ve)-.25 G 2.904(,t).15 G +.404(he def)-2.904 F .404(ault standard input for the command)-.1 F +1.414(is the empty \214le)108 288 R F0(/de)5.58 E(v/null)-.15 E F1 6.414 +(.O)1.666 G 1.414(therwise, the in)-6.414 F -.2(vo)-.4 G -.1(ke).2 G +3.915(dc).1 G 1.415 +(ommand inherits the \214le descriptors of the calling)-3.915 F +(shell as modi\214ed by redirections.)108 300 Q/F3 10.95/Times-Bold@0 SF +(ENVIR)72 316.8 Q(ONMENT)-.329 E F1 2.344(When a program is in)108 328.8 +R -.2(vo)-.4 G -.1(ke).2 G 4.843(di).1 G 4.843(ti)-4.843 G 4.843(sg) +-4.843 G -2.15 -.25(iv e)-4.843 H 4.843(na).25 G 4.843(na)-4.843 G 2.343 +(rray of strings called the)-4.843 F F0(en)5.033 E(vir)-.4 E(onment)-.45 +E F1 7.343(.T).68 G 2.343(his is a list of)-7.343 F F0(name)108 340.8 Q +F1A F0(value)A F1(pairs, of the form)2.5 E F0(name)2.86 E F1(=)A F0 +(value)A F1(.).18 E .438(The shell pro)108 357.6 R .438(vides se)-.15 F +-.15(ve)-.25 G .438(ral w).15 F .438(ays to manipulate the en)-.1 F +2.938(vironment. On)-.4 F(in)2.938 E -.2(vo)-.4 G .438 +(cation, the shell scans its o).2 F .439(wn en-)-.25 F 2.033(vironment \ +and creates a parameter for each name found, automatically marking it f\ +or)108 369.6 R F0 -.2(ex)4.533 G(port).2 E F1 2.033(to child)5.213 F +3.693(processes. Ex)108 381.6 R 1.193(ecuted commands inherit the en) +-.15 F 3.693(vironment. The)-.4 F F2(export)3.693 E F1(,)A F2(declar) +3.693 E 3.694<65ad>-.18 G(x)-3.694 E F1 3.694(,a)C(nd)-3.694 E F2(unset) +3.694 E F1(commands)3.694 E .047(modify the en)108 393.6 R .047 +(vironment by adding and deleting parameters and functions.)-.4 F .046 +(If the v)5.046 F .046(alue of a parameter in the)-.25 F(en)108 405.6 Q +.656(vironment is modi\214ed, the ne)-.4 F 3.156(wv)-.25 G .656 +(alue automatically becomes part of the en)-3.406 F .657 +(vironment, replacing the old.)-.4 F .155(The en)108 417.6 R .155 +(vironment inherited by an)-.4 F 2.654(ye)-.15 G -.15(xe)-2.804 G .154 +(cuted command consists of the shell').15 F 2.654(si)-.55 G .154 +(nitial en)-2.654 F .154(vironment, whose v)-.4 F(al-)-.25 E .789 +(ues may be modi\214ed in the shell, less an)108 429.6 R 3.289(yp)-.15 G +.789(airs remo)-3.289 F -.15(ve)-.15 G 3.289(db).15 G 3.289(yt)-3.289 G +(he)-3.289 E F2(unset)3.289 E F1(or)3.289 E F2 .789(export \255n)3.289 F +F1 .789(commands, plus an)3.289 F(y)-.15 E(additions via the)108 441.6 Q +F2(export)2.5 E F1(and)2.5 E F2(declar)2.5 E 2.5<65ad>-.18 G(x)-2.5 E F1 +(commands.)2.5 E .349(If an)108 458.4 R 2.849(yp)-.15 G .349 +(arameter assignments, as described abo)-2.849 F .649 -.15(ve i)-.15 H +(n).15 E/F4 9/Times-Bold@0 SF -.666(PA)2.849 G(RAMETERS).666 E/F5 9 +/Times-Roman@0 SF(,)A F1 .349(appear before a)2.599 F F0 .349 +(simple command)3.189 F F1 2.849(,t).77 G(he)-2.849 E -.25(va)108 470.4 +S .442(riable assignments are part of that command').25 F 2.942(se)-.55 +G -.4(nv)-2.942 G .442(ironment for as long as it e).4 F -.15(xe)-.15 G +2.942(cutes. These).15 F(assignment)2.942 E .014(statements af)108 482.4 +R .014(fect only the en)-.25 F .014(vironment seen by that command.)-.4 +F .013(If these assignments precede a call to a shell)5.014 F +(function, the v)108 494.4 Q(ariables are local to the function and e) +-.25 E(xported to that function')-.15 E 2.5(sc)-.55 G(hildren.)-2.5 E +.81(If the)108 511.2 R F23.31 E F1 .81(option is set \(see the) +3.31 F F2(set)3.31 E F1 -.2(bu)3.31 G .81(iltin command belo).2 F .81 +(w\), then)-.25 F F0(all)3.64 E F1 .81 +(parameter assignments are placed in)3.82 F(the en)108 523.2 Q +(vironment for a command, not just those that precede the command name.) +-.4 E(When)108 540 Q F2(bash)3.339 E F1(in)3.339 E -.2(vo)-.4 G -.1(ke) +.2 G 3.339(sa).1 G 3.339(ne)-3.339 G .839(xternal command, the v)-3.489 +F(ariable)-.25 E F2(_)3.339 E F1 .839 +(is set to the full pathname of the command and)3.339 F +(passed to that command in its en)108 552 Q(vironment.)-.4 E F3(EXIT ST) +72 568.8 Q -1.04(AT)-.986 G(US)1.04 E F1 .15(The e)108 580.8 R .15 +(xit status of an e)-.15 F -.15(xe)-.15 G .15(cuted command is the v).15 +F .151(alue returned by the)-.25 F F0(waitpid)2.651 E F1 .151 +(system call or equi)2.651 F -.25(va)-.25 G .151(lent func-).25 F 2.848 +(tion. Exit)108 592.8 R .348(statuses f)2.848 F .347 +(all between 0 and 255, though, as e)-.1 F .347(xplained belo)-.15 F +1.647 -.65(w, t)-.25 H .347(he shell may use v).65 F .347(alues abo)-.25 +F .647 -.15(ve 1)-.15 H(25).15 E(specially)108 604.8 Q 5.506(.E)-.65 G +.506(xit statuses from shell b)-5.506 F .507 +(uiltins and compound commands are also limited to this range.)-.2 F +(Under)5.507 E(certain circumstances, the shell will use special v)108 +616.8 Q(alues to indicate speci\214c f)-.25 E(ailure modes.)-.1 E -.15 +(Fo)108 633.6 S 3.435(rt).15 G .935(he shell')-3.435 F 3.435(sp)-.55 G +.935(urposes, a command which e)-3.435 F .934(xits with a zero e)-.15 F +.934(xit status has succeeded.)-.15 F .934(So while an e)5.934 F(xit) +-.15 E(status of zero indicates success, a non-zero e)108 645.6 Q +(xit status indicates f)-.15 E(ailure.)-.1 E +(When a command terminates on a f)108 662.4 Q(atal signal)-.1 E F0(N)2.5 +E F1(,)A F2(bash)2.5 E F1(uses the v)2.5 E(alue of 128+)-.25 E F0(N)A F1 +(as the e)2.5 E(xit status.)-.15 E .404 +(If a command is not found, the child process created to e)108 679.2 R +-.15(xe)-.15 G .404(cute it returns a status of 127.).15 F .405 +(If a command is)5.405 F(found b)108 691.2 Q(ut is not e)-.2 E -.15(xe) +-.15 G(cutable, the return status is 126.).15 E(If a command f)108 708 Q +(ails because of an error during e)-.1 E(xpansion or redirection, the e) +-.15 E(xit status is greater than zero.)-.15 E .081(Shell b)108 724.8 R +.081(uiltin commands return a status of 0 \()-.2 F F0(true)A F1 2.581 +(\)i)C 2.581(fs)-2.581 G .08(uccessful, and non-zero \()-2.581 F F0 +(false)A F1 2.58(\)i)C 2.58(fa)-2.58 G 2.58(ne)-2.58 G .08 +(rror occurs while)-2.58 F(GNU Bash 5.3)72 768 Q(2024 December 12) +136.795 E(41)185.955 E 0 Cg EP +%%Page: 42 42 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(the)108 84 Q 2.967(ye)-.15 G -.15(xe)-3.117 G 2.967 +(cute. All).15 F -.2(bu)2.967 G .467(iltins return an e).2 F .468 +(xit status of 2 to indicate incorrect usage, generally in)-.15 F -.25 +(va)-.4 G .468(lid options or).25 F(missing ar)108 96 Q(guments.)-.18 E +(The e)108 112.8 Q(xit status of the last command is a)-.15 E -.25(va) +-.2 G(ilable in the special parameter $?.).25 E/F2 10/Times-Bold@0 SF +(Bash)108 129.6 Q F1 .202(itself returns the e)2.702 F .202 +(xit status of the last command e)-.15 F -.15(xe)-.15 G .201 +(cuted, unless a syntax error occurs, in which case).15 F(it e)108 141.6 +Q(xits with a non-zero v)-.15 E 2.5(alue. See)-.25 F(also the)2.5 E F2 +(exit)2.5 E F1 -.2(bu)2.5 G(iltin command belo).2 E -.65(w.)-.25 G/F3 +10.95/Times-Bold@0 SF(SIGN)72 158.4 Q(ALS)-.219 E F1(When)108 170.4 Q F2 +(bash)2.502 E F1 .002(is interacti)2.502 F -.15(ve)-.25 G 2.502(,i).15 G +2.502(nt)-2.502 G .002(he absence of an)-2.502 F 2.502(yt)-.15 G .002 +(raps, it ignores)-2.502 F/F4 9/Times-Bold@0 SF(SIGTERM)2.502 E F1 .002 +(\(so that)2.252 F F2 .002(kill 0)2.502 F F1 .002(does not kill an in-) +2.502 F(teracti)108 182.4 Q .926 -.15(ve s)-.25 H .626 +(hell\), and catches and handles).15 F F4(SIGINT)3.126 E F1 .626 +(\(so that the)2.876 F F2(wait)3.126 E F1 -.2(bu)3.126 G .625 +(iltin is interruptible\).).2 F(When)5.625 E F2(bash)3.125 E F1(re-) +3.125 E(cei)108 194.4 Q -.15(ve)-.25 G(s).15 E F4(SIGINT)2.95 E/F5 9 +/Times-Roman@0 SF(,)A F1 .45(it breaks out of an)2.7 F 2.95(ye)-.15 G +-.15(xe)-3.1 G .45(cuting loops.).15 F .45(In all cases,)5.45 F F2(bash) +2.95 E F1(ignores)2.95 E F4(SIGQ)2.95 E(UIT)-.09 E F5(.)A F1 .45 +(If job control is)4.95 F(in ef)108 206.4 Q(fect,)-.25 E F2(bash)2.5 E +F1(ignores)2.5 E F4(SIGTTIN)2.5 E F5(,)A F4(SIGTT)2.25 E(OU)-.162 E F5 +(,)A F1(and)2.25 E F4(SIGTSTP)2.5 E F5(.)A F1(The)108 223.2 Q F2(trap) +2.5 E F1 -.2(bu)2.5 G(iltin modi\214es the shell').2 E 2.5(ss)-.55 G +(ignal handling, as described belo)-2.5 E -.65(w.)-.25 G(Non-b)108 240 Q +.613(uiltin commands)-.2 F F2(bash)3.113 E F1 -.15(exe)3.113 G .613 +(cutes ha).15 F .913 -.15(ve s)-.2 H .613(ignal handlers set to the v) +.15 F .612(alues inherited by the shell from its)-.25 F .064 +(parent, unless)108 252 R F2(trap)2.564 E F1 .065(sets them to be ignor\ +ed, in which case the child process will ignore them as well.)2.564 F +(When)5.065 E .682(job control is not in ef)108 264 R .682 +(fect, asynchronous commands ignore)-.25 F F4(SIGINT)3.182 E F1(and) +2.932 E F4(SIGQ)3.182 E(UIT)-.09 E F1 .682(in addition to these in-) +2.932 F 1.139(herited handlers.)108 276 R 1.139 +(Commands run as a result of command substitution ignore the k)6.139 F +-.15(ey)-.1 G 1.14(board-generated job).15 F(control signals)108 288 Q +F4(SIGTTIN)2.5 E F5(,)A F4(SIGTT)2.25 E(OU)-.162 E F5(,)A F1(and)2.25 E +F4(SIGTSTP)2.5 E F5(.)A F1 2.046(The shell e)108 304.8 R 2.046 +(xits by def)-.15 F 2.045(ault upon receipt of a)-.1 F F4(SIGHUP)4.545 E +F5(.)A F1 2.045(Before e)6.545 F 2.045(xiting, an interacti)-.15 F 2.345 +-.15(ve s)-.25 H 2.045(hell resends the).15 F F4(SIGHUP)108 316.8 Q F1 +.539(to all jobs, running or stopped.)2.789 F .54(The shell sends)5.54 F +F4(SIGCONT)3.04 E F1 .54(to stopped jobs to ensure that the)2.79 F 3.04 +(yr)-.15 G(e-)-3.04 E(cei)108 328.8 Q 1.045 -.15(ve t)-.25 H(he).15 E F4 +(SIGHUP)3.245 E F1(\(see)2.995 E F4 .745(JOB CONTR)3.245 F(OL)-.27 E F1 +(belo)2.995 E 3.245(wf)-.25 G .745 +(or more information about running and stopped jobs\).)-3.245 F -.8(To) +5.745 G(pre)108 340.8 Q -.15(ve)-.25 G .441 +(nt the shell from sending the signal to a particular job, remo).15 F +.742 -.15(ve i)-.15 H 2.942(tf).15 G .442(rom the jobs table with the) +-2.942 F F2(diso)2.942 E(wn)-.1 E F1 -.2(bu)108 352.8 S(iltin \(see).2 E +F4(SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS)-.828 E F1(belo)2.25 E +(w\) or mark it not to recei)-.25 E -.15(ve)-.25 G F4(SIGHUP)2.65 E F1 +(using)2.25 E F2(diso)2.5 E(wn \255h)-.1 E F1(.)A .555(If the)108 369.6 +R F2(huponexit)3.055 E F1 .555(shell option has been set using)3.055 F +F2(shopt)3.054 E F1(,)A F2(bash)3.054 E F1 .554(sends a)3.054 F F4 +(SIGHUP)3.054 E F1 .554(to all jobs when an interac-)2.804 F(ti)108 +381.6 Q .3 -.15(ve l)-.25 H(ogin shell e).15 E(xits.)-.15 E(If)108 398.4 +Q F2(bash)2.629 E F1 .129(is w)2.629 F .129 +(aiting for a command to complete and recei)-.1 F -.15(ve)-.25 G 2.629 +(sas).15 G .129(ignal for which a trap has been set, it will not)-2.629 +F -.15(exe)108 410.4 S .952(cute the trap until the command completes.) +.15 F(If)5.952 E F2(bash)3.452 E F1 .952(is w)3.452 F .952 +(aiting for an asynchronous command via the)-.1 F F2(wait)108 422.4 Q F1 +-.2(bu)2.986 G .486(iltin, and it recei).2 F -.15(ve)-.25 G 2.986(sas) +.15 G .486(ignal for which a trap has been set, the)-2.986 F F2(wait) +2.987 E F1 -.2(bu)2.987 G .487(iltin will return immediately).2 F +(with an e)108 434.4 Q +(xit status greater than 128, immediately after which the shell e)-.15 E +-.15(xe)-.15 G(cutes the trap.).15 E .499 +(When job control is not enabled, and)108 451.2 R F2(bash)2.998 E F1 +.498(is w)2.998 F .498(aiting for a fore)-.1 F .498 +(ground command to complete, the shell re-)-.15 F(cei)108 463.2 Q -.15 +(ve)-.25 G 3.213(sk).15 G -.15(ey)-3.313 G .713 +(board-generated signals such as).15 F F4(SIGINT)3.213 E F1 .713 +(\(usually generated by)2.963 F F2<0043>3.213 E F1 3.213(\)t)C .714 +(hat users commonly intend)-3.213 F .455(to send to that command.)108 +475.2 R .454(This happens because the shell and the command are in the \ +same process group)5.455 F .724(as the terminal, and)108 487.2 R F2 +<0043>3.224 E F1(sends)3.224 E F4(SIGINT)3.224 E F1 .724 +(to all processes in that process group.)2.974 F(Since)5.724 E F2(bash) +3.224 E F1 .724(does not enable)3.224 F 1.243(job control by def)108 +499.2 R 1.243(ault when the shell is not interacti)-.1 F -.15(ve)-.25 G +3.742(,t).15 G 1.242(his scenario is most common in non-interacti)-3.742 +F -.15(ve)-.25 G(shells.)108 511.2 Q .096 +(When job control is enabled, and)108 528 R F2(bash)2.596 E F1 .097 +(is w)2.597 F .097(aiting for a fore)-.1 F .097 +(ground command to complete, the shell does not)-.15 F(recei)108 540 Q +.975 -.15(ve k)-.25 H -.15(ey).05 G .675(board-generated signals, becau\ +se it is not in the same process group as the terminal.).15 F .675 +(This sce-)5.675 F .295(nario is most common in interacti)108 552 R .595 +-.15(ve s)-.25 H .295(hells, where).15 F F2(bash)2.796 E F1 .296 +(attempts to enable job control by def)2.796 F 2.796(ault. See)-.1 F F4 +(JOB)2.796 E(CONTR)108 564 Q(OL)-.27 E F1(belo)2.25 E 2.5(wf)-.25 G +(or more information about process groups.)-2.5 E .994 +(When job control is not enabled, and)108 580.8 R F2(bash)3.493 E F1 +(recei)3.493 E -.15(ve)-.25 G(s).15 E F4(SIGINT)3.493 E F1 .993(while w) +3.243 F .993(aiting for a fore)-.1 F .993(ground command, it)-.15 F -.1 +(wa)108 592.8 S(its until that fore).1 E +(ground command terminates and then decides what to do about the)-.15 E +F4(SIGINT)2.5 E F5(:)A F1(1.)108 609.6 Q .024 +(If the command terminates due to the)144 609.6 R F4(SIGINT)2.524 E F5 +(,)A F2(bash)2.274 E F1 .025(concludes that the user meant to send the) +2.525 F F4(SIG-)2.525 E(INT)144 621.6 Q F1 .3 +(to the shell as well, and acts on the)2.55 F F4(SIGINT)2.8 E F1 .3 +(\(e.g., by running a)2.55 F F4(SIGINT)2.8 E F1 .3(trap, e)2.55 F .3 +(xiting a non-in-)-.15 F(teracti)144 633.6 Q .3 -.15(ve s)-.25 H +(hell, or returning to the top le).15 E -.15(ve)-.25 G 2.5(lt).15 G 2.5 +(or)-2.5 G(ead a ne)-2.5 E 2.5(wc)-.25 G(ommand\).)-2.5 E(2.)108 650.4 Q +.288(If the command does not terminate due to)144 650.4 R F4(SIGINT) +2.788 E F5(,)A F1 .288(the program handled the)2.538 F F4(SIGINT)2.789 E +F1 .289(itself and did)2.539 F .728(not treat it as a f)144 662.4 R .728 +(atal signal.)-.1 F .728(In that case,)5.728 F F2(bash)3.228 E F1 .728 +(does not treat)3.228 F F4(SIGINT)3.228 E F1 .728(as a f)2.978 F .728 +(atal signal, either)-.1 F 3.228(,i)-.4 G(n-)-3.228 E .771 +(stead assuming that the)144 674.4 R F4(SIGINT)3.271 E F1 -.1(wa)3.021 G +3.271(su).1 G .771(sed as part of the program')-3.271 F 3.272(sn)-.55 G +.772(ormal operation \(e.g., emacs)-3.272 F .41 +(uses it to abort editing commands\) or deliberately discarded.)144 +686.4 R(Ho)5.409 E(we)-.25 E -.15(ve)-.25 G -.4(r,).15 G F2(bash)3.309 E +F1 .409(will run an)2.909 F 2.909(yt)-.15 G .409(rap set)-2.909 F(on)144 +698.4 Q F4(SIGINT)3.788 E F5(,)A F1 1.288(as it does with an)3.538 F +3.788(yo)-.15 G 1.288(ther trapped signal it recei)-3.788 F -.15(ve)-.25 +G 3.789(sw).15 G 1.289(hile it is w)-3.789 F 1.289(aiting for the fore-) +-.1 F(ground command to complete, for compatibility)144 710.4 Q(.)-.65 E +.49(When job control is enabled,)108 727.2 R F2(bash)2.99 E F1 .49 +(does not recei)2.99 F .79 -.15(ve k)-.25 H -.15(ey).05 G .49 +(board-generated signals such as).15 F F4(SIGINT)2.99 E F1 .49 +(while it is)2.74 F(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(42) +185.955 E 0 Cg EP +%%Page: 43 43 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E -.1(wa)108 84 S .646(iting for a fore).1 F .646 +(ground command.)-.15 F .646(An interacti)5.646 F .946 -.15(ve s)-.25 H +.647(hell does not pay attention to the).15 F/F2 9/Times-Bold@0 SF +(SIGINT)3.147 E/F3 9/Times-Roman@0 SF(,)A F1 -2.15 -.25(ev e)2.897 H +3.147(ni).25 G 3.147(ft)-3.147 G(he)-3.147 E(fore)108 96 Q .57 +(ground command terminates as a result, other than noting its e)-.15 F +.57(xit status.)-.15 F .57(If the shell is not interacti)5.57 F -.15(ve) +-.25 G(,).15 E 1.207(and the fore)108 108 R 1.207 +(ground command terminates due to the)-.15 F F2(SIGINT)3.707 E F3(,)A/F4 +10/Times-Bold@0 SF(bash)3.458 E F1 1.208(pretends it recei)3.708 F -.15 +(ve)-.25 G 3.708(dt).15 G(he)-3.708 E F2(SIGINT)3.708 E F1(itself)3.458 +E(\(scenario 1 abo)108 120 Q -.15(ve)-.15 G(\), for compatibility).15 E +(.)-.65 E/F5 10.95/Times-Bold@0 SF(JOB CONTR)72 136.8 Q(OL)-.329 E F0 +-.25(Jo)108 148.8 S 3.369(bc).25 G(ontr)-3.369 E(ol)-.45 E F1 .868 +(refers to the ability to selecti)3.879 F -.15(ve)-.25 G .868 +(ly stop \().15 F F0(suspend)A F1 3.368(\)t)C .868(he e)-3.368 F -.15 +(xe)-.15 G .868(cution of processes and continue \().15 F F0 -.37(re)C +(-).37 E(sume)108 160.8 Q F1 2.664(\)t)C .164(heir e)-2.664 F -.15(xe) +-.15 G .164(cution at a later point.).15 F 2.665(Au)5.165 G .165 +(ser typically emplo)-2.665 F .165(ys this f)-.1 F .165 +(acility via an interacti)-.1 F .465 -.15(ve i)-.25 H(nterf).15 E .165 +(ace sup-)-.1 F(plied jointly by the operating system k)108 172.8 Q +(ernel')-.1 E 2.5(st)-.55 G(erminal dri)-2.5 E -.15(ve)-.25 G 2.5(ra).15 +G(nd)-2.5 E F4(bash)2.5 E F1(.)A .599(The shell associates a)108 189.6 R +F0(job)4.839 E F1 .599(with each pipeline.)3.329 F .599(It k)5.599 F +.599(eeps a table of currently e)-.1 F -.15(xe)-.15 G .599 +(cuting jobs, which the).15 F F4(jobs)3.098 E F1 1.001 +(command will display)108 201.6 R 6.001(.E)-.65 G 1.001(ach job has a) +-6.001 F F0 1.001(job number)3.501 F F1 3.501(,w)C(hich)-3.501 E F4 +(jobs)3.501 E F1 1.002(displays between brack)3.502 F 3.502(ets. Job)-.1 +F(numbers)3.502 E(start at 1.)108 213.6 Q(When)5 E F4(bash)2.5 E F1 +(starts a job asynchronously \(in the)2.5 E F0(bac)2.77 E(kgr)-.2 E +(ound)-.45 E F1(\), it prints a line that looks lik).77 E(e:)-.1 E +([1] 25647)144 230.4 Q .241(indicating that this job is job number 1 an\ +d that the process ID of the last process in the pipeline associated)108 +247.2 R .732(with this job is 25647.)108 259.2 R .733 +(All of the processes in a single pipeline are members of the same job) +5.732 F(.)-.4 E F4(Bash)5.733 E F1(uses)3.233 E(the)108 271.2 Q F0(job) +4.24 E F1(abstraction as the basis for job control.)2.73 E 2.374 -.8 +(To f)108 288 T .774(acilitate the implementation of the user interf).7 +F .773(ace to job control, each process has a)-.1 F F0(pr)3.273 E .773 +(ocess gr)-.45 F .773(oup ID)-.45 F F1(,)A .368 +(and the operating system maintains the notion of a)108 300 R F0(curr) +2.868 E .368(ent terminal pr)-.37 F .368(ocess gr)-.45 F .368(oup ID) +-.45 F F1 5.368(.P)C .369(rocesses that ha)-5.368 F -.15(ve)-.2 G 1.53 +(the same process group ID are said to be part of the same)108 312 R F0 +(pr)4.029 E 1.529(ocess gr)-.45 F(oup)-.45 E F1 6.529(.M)C 1.529 +(embers of the)-6.529 F F0(for)4.029 E -.4(eg)-.37 G -.45(ro).4 G(und) +.45 E F1 .122(process group \(processes whose process group ID is equal\ + to the current terminal process group ID\) recei)108 324 R -.15(ve)-.25 +G -.1(ke)108 336 S .139(yboard-generated signals such as)-.05 F F2 +(SIGINT)2.639 E F3(.)A F1 .139(Processes in the fore)4.639 F .139 +(ground process group are said to be)-.15 F F0(for)4.608 E(e-)-.37 E(gr) +108 348 Q(ound)-.45 E F1(processes.)4.503 E F0(Bac)6.813 E(kgr)-.2 E +(ound)-.45 E F1 1.234(processes are those whose process group ID dif) +4.504 F 1.234(fers from the terminal')-.25 F(s;)-.55 E .533 +(such processes are immune to k)108 360 R -.15(ey)-.1 G .533 +(board-generated signals.).15 F .533(Only fore)5.533 F .533 +(ground processes are allo)-.15 F .533(wed to read)-.25 F .716(from or) +108 372 R 3.216(,i)-.4 G 3.216(ft)-3.216 G .716(he user so speci\214es \ +with \231stty tostop\232, write to the terminal.)-3.216 F .717 +(Background processes which at-)5.717 F .378 +(tempt to read from \(write to when \231tostop\232 is in ef)108 384 R +.377(fect\) the terminal are sent a)-.25 F F2 .377(SIGTTIN \(SIGTT)2.877 +F(OU\))-.162 E F1(signal)2.627 E(by the k)108 396 Q(ernel')-.1 E 2.5(st) +-.55 G(erminal dri)-2.5 E -.15(ve)-.25 G .8 -.4(r, w).15 H +(hich, unless caught, suspends the process.).4 E 1.087 +(If the operating system on which)108 412.8 R F4(bash)3.587 E F1 1.088 +(is running supports job control,)3.588 F F4(bash)3.588 E F1 1.088 +(contains f)3.588 F 1.088(acilities to use it.)-.1 F -.8(Ty)108 424.8 S +.878(ping the).8 F F0(suspend)3.718 E F1 .878(character \(typically) +4.148 F F4<005a>3.378 E F1 3.377(,C)C .877 +(ontrol-Z\) while a process is running stops that process and)-3.377 F +.007(returns control to)108 436.8 R F4(bash)2.508 E F1 5.008(.T)C .008 +(yping the)-5.808 F F0 .008(delayed suspend)2.858 F F1 .008 +(character \(typically)3.278 F F4<0059>2.508 E F1 2.508(,C)C .008 +(ontrol-Y\) causes the process)-2.508 F .561(stop when it attempts to r\ +ead input from the terminal, and returns control to)108 448.8 R F4(bash) +3.06 E F1 5.56(.T)C .56(he user then manipu-)-5.56 F .407 +(lates the state of this job, using the)108 460.8 R F4(bg)2.907 E F1 +.407(command to continue it in the background, the)2.907 F F4(fg)2.907 E +F1 .407(command to con-)2.907 F .728(tinue it in the fore)108 472.8 R +.728(ground, or the)-.15 F F4(kill)3.228 E F1 .728(command to kill it.) +3.228 F .727(The suspend character tak)5.727 F .727(es ef)-.1 F .727 +(fect immediately)-.25 F(,)-.65 E .553(and has the additional side ef) +108 484.8 R .553(fect of discarding an)-.25 F 3.053(yp)-.15 G .553 +(ending output and typeahead.)-3.053 F 2.153 -.8(To f)5.553 H .554 +(orce a background).8 F 2.261(process to stop, or stop a process that') +108 496.8 R 4.761(sn)-.55 G 2.26 +(ot associated with the current terminal session, send it the)-4.761 F +F2(SIGST)108 508.8 Q(OP)-.162 E F1(signal using)2.25 E F4(kill)2.5 E F1 +(.)A .777(There are a number of w)108 525.6 R .777 +(ays to refer to a job in the shell.)-.1 F(The)5.777 E F4(%)3.277 E F1 +.777(character introduces a job speci\214cation)3.277 F(\(jobspec\).)108 +537.6 Q .415(Job number)108 554.4 R F0(n)3.275 E F1 .415 +(may be referred to as)3.155 F F4(%n)2.915 E F1 5.415(.A)C .415 +(job may also be referred to using a pre\214x of the name used to)-2.5 F +.034(start it, or using a substring that appears in its command line.) +108 566.4 R -.15(Fo)5.035 G 2.535(re).15 G(xample,)-2.685 E F4(%ce)2.535 +E F1 .035(refers to a job whose com-)2.535 F .229(mand name be)108 578.4 +R .229(gins with)-.15 F F4(ce)2.729 E F1 5.229(.U)C(sing)-5.229 E F4 +(%?ce)2.729 E F1 2.729(,o)C 2.729(nt)-2.729 G .229 +(he other hand, refers to an)-2.729 F 2.729(yj)-.15 G .229 +(ob containing the string)-2.729 F F4(ce)2.729 E F1 .229(in its)2.729 F +(command line.)108 590.4 Q +(If the pre\214x or substring matches more than one job,)5 E F4(bash)2.5 +E F1(reports an error)2.5 E(.)-.55 E .441(The symbols)108 607.2 R F4(%%) +2.941 E F1(and)2.941 E F4(%+)2.941 E F1 .441(refer to the shell')2.941 F +2.941(sn)-.55 G .441(otion of the)-2.941 F F0(curr)3.141 E .441(ent job) +-.37 F F1 5.441(.A).23 G .441(single % \(with no accompan)-2.5 F(y-)-.15 +E .207(ing job speci\214cation\) also refers to the current job)108 +619.2 R(.)-.4 E F4<25ad>5.207 E F1 .207(refers to the)2.707 F F0(pr) +3.957 E -.15(ev)-.37 G .207(ious job).15 F F1 5.207(.W).23 G .207 +(hen a job starts in the)-5.207 F .185 +(background, a job stops while in the fore)108 631.2 R .186 +(ground, or a job is resumed in the background, it becomes the cur)-.15 +F(-)-.2 E .534(rent job)108 643.2 R 5.534(.T)-.4 G .534(he job that w) +-5.534 F .534(as the current job becomes the pre)-.1 F .534(vious job) +-.25 F 5.534(.W)-.4 G .534(hen the current job terminates, the)-5.534 F +(pre)108 655.2 Q .123(vious job becomes the current job)-.25 F 5.123(.I) +-.4 G 2.623(ft)-5.123 G .123(here is only a single job,)-2.623 F F4(%+) +2.623 E F1(and)2.623 E F4<25ad>2.623 E F1 .124 +(can both be used to refer to)2.623 F 1.474(that job)108 667.2 R 6.474 +(.I)-.4 G 3.974(no)-6.474 G 1.473 +(utput pertaining to jobs \(e.g., the output of the)-3.974 F F4(jobs) +3.973 E F1 1.473(command\), the current job is al)3.973 F -.1(wa)-.1 G +(ys).1 E(mark)108 679.2 Q(ed with a)-.1 E F4(+)2.5 E F1 2.5(,a)C +(nd the pre)-2.5 E(vious job with a)-.25 E F42.5 E F1(.)A .686 +(Simply naming a job can be used to bring it into the fore)108 696 R +(ground:)-.15 E F4(%1)3.186 E F1 .686(is a synon)3.186 F .686 +(ym for \231fg %1\232, bringing)-.15 F .069 +(job 1 from the background into the fore)108 708 R 2.568 +(ground. Similarly)-.15 F 2.568<2c99>-.65 G .068 +(%1 &\232 resumes job 1 in the background, equi)-2.568 F(v-)-.25 E +(alent to \231bg %1\232.)108 720 Q(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(43)185.955 E 0 Cg EP +%%Page: 44 44 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .13(The shell learns immediately whene)108 84 R +-.15(ve)-.25 G 2.63(raj).15 G .13(ob changes state.)-2.63 F(Normally) +5.131 E(,)-.65 E/F2 10/Times-Bold@0 SF(bash)2.631 E F1 -.1(wa)2.631 G +.131(its until it is about to print a).1 F 1.279 +(prompt before notifying the user about changes in a job')108 96 R 3.779 +(ss)-.55 G 1.279(tatus so as to not interrupt an)-3.779 F 3.778(yo)-.15 +G 1.278(ther output,)-3.778 F .015 +(though it will notify of changes in a job')108 108 R 2.515(ss)-.55 G +.015(tatus after a fore)-2.515 F .016 +(ground command in a list completes, before e)-.15 F -.15(xe)-.15 G(-) +.15 E .673(cuting the ne)108 120 R .672(xt command in the list.)-.15 F +.672(If the)5.672 F F23.172 E F1 .672(option to the)3.172 F F2 +(set)3.172 E F1 -.2(bu)3.172 G .672(iltin command is enabled,).2 F F2 +(bash)3.172 E F1(reports)3.172 E(status changes immediately)108 132 Q(.) +-.65 E F2(Bash)5 E F1 -.15(exe)2.5 G(cutes an).15 E 2.5(yt)-.15 G +(rap on)-2.5 E/F3 9/Times-Bold@0 SF(SIGCHLD)2.5 E F1 +(for each child that terminates.)2.25 E .352(When a job terminates and) +108 148.8 R F2(bash)2.852 E F1 .352(noti\214es the user about it,)2.852 +F F2(bash)2.852 E F1(remo)2.852 E -.15(ve)-.15 G 2.852(st).15 G .352 +(he job from the table.)-2.852 F .352(It will not)5.352 F .52(appear in) +108 160.8 R F2(jobs)3.02 E F1 .52(output, b)3.02 F(ut)-.2 E F2(wait)3.02 +E F1 .52(will report its e)3.02 F .52(xit status, as long as it')-.15 F +3.02(ss)-.55 G .52(upplied the process ID associated)-3.02 F +(with the job as an ar)108 172.8 Q 2.5(gument. When)-.18 F +(the table is empty)2.5 E 2.5(,j)-.65 G(ob numbers start o)-2.5 E -.15 +(ve)-.15 G 2.5(ra).15 G 2.5(t1)-2.5 G(.)-2.5 E .06 +(If a user attempts to e)108 189.6 R(xit)-.15 E F2(bash)2.56 E F1 .06 +(while jobs are stopped \(or)2.56 F 2.561(,i)-.4 G 2.561(ft)-2.561 G(he) +-2.561 E F2(checkjobs)2.561 E F1 .061(shell option has been enabled us-) +2.561 F .3(ing the)108 201.6 R F2(shopt)2.8 E F1 -.2(bu)2.8 G .3 +(iltin, running\), the shell prints a w).2 F .3 +(arning message, and, if the)-.1 F F2(checkjobs)2.8 E F1 .3 +(option is enabled,)2.8 F .074(lists the jobs and their statuses.)108 +213.6 R(The)5.074 E F2(jobs)2.574 E F1 .074 +(command may then be used to inspect their status.)2.574 F .074 +(If the user im-)5.074 F 1.03(mediately attempts to e)108 225.6 R 1.03 +(xit ag)-.15 F 1.03(ain, without an interv)-.05 F 1.03(ening command,) +-.15 F F2(bash)3.53 E F1 1.03(does not print another w)3.53 F(arning,) +-.1 E(and terminates an)108 237.6 Q 2.5(ys)-.15 G(topped jobs.)-2.5 E +.644(When the shell is w)108 254.4 R .644 +(aiting for a job or process using the)-.1 F F2(wait)3.145 E F1 -.2(bu) +3.145 G .645(iltin, and job control is enabled,).2 F F2(wait)3.145 E F1 +(will)3.145 E .151(return when the job changes state.)108 266.4 R(The) +5.151 E F22.651 E F1 .151(option causes)2.651 F F2(wait)2.651 E F1 +.15(to w)2.65 F .15(ait until the job or process terminates be-)-.1 F +(fore returning.)108 278.4 Q/F4 10.95/Times-Bold@0 SF(PR)72 295.2 Q +(OMPTING)-.329 E F1 .644(When e)108 307.2 R -.15(xe)-.15 G .644 +(cuting interacti).15 F -.15(ve)-.25 G(ly).15 E(,)-.65 E F2(bash)3.144 E +F1 .645(displays the primary prompt)3.145 F F3(PS1)3.145 E F1 .645 +(when it is ready to read a command,)2.895 F(and the secondary prompt) +108 319.2 Q F3(PS2)2.5 E F1 +(when it needs more input to complete a command.)2.25 E F2(Bash)108 336 +Q F1 -.15(ex)3.183 G .683(amines the v).15 F .682(alue of the array v) +-.25 F(ariable)-.25 E F2(PR)3.182 E(OMPT_COMMAND)-.3 E F1 .682 +(just before printing each primary)3.182 F 2.576(prompt. If)108 348 R +(an)2.576 E 2.576(ye)-.15 G .076(lements in)-2.576 F F2(PR)2.576 E +(OMPT_COMMAND)-.3 E F1 .076(are set and non-null, Bash e)2.576 F -.15 +(xe)-.15 G .076(cutes each v).15 F .076(alue, in nu-)-.25 F .344 +(meric order)108 360 R 2.844(,j)-.4 G .344 +(ust as if it had been typed on the command line.)-2.844 F F2(Bash)5.343 +E F1(displays)2.843 E F3(PS0)2.843 E F1 .343(after it reads a command) +2.593 F -.2(bu)108 372 S 2.5(tb).2 G(efore e)-2.5 E -.15(xe)-.15 G +(cuting it.).15 E F2(Bash)108 388.8 Q F1(displays)2.5 E F3(PS4)2.5 E F1 +(as described abo)2.25 E .3 -.15(ve b)-.15 H +(efore tracing each command when the).15 E F22.5 E F1 +(option is enabled.)2.5 E F2(Bash)108 405.6 Q F1(allo)2.934 E .434 +(ws the prompt strings)-.25 F F2(PS0)2.934 E F1(,)A F2(PS1)2.934 E F1(,) +A F2(PS2)2.934 E F1 2.934(,a)C(nd)-2.934 E F2(PS4)2.934 E F1 2.934(,t)C +2.935(ob)-2.934 G 2.935(ec)-2.935 G .435 +(ustomized by inserting a number of back-)-2.935 F +(slash-escaped special characters that are decoded as follo)108 417.6 Q +(ws:)-.25 E F2(\\a)144 434.4 Q F1(An ASCII bell character \(07\).)180 +434.4 Q F2(\\d)144 446.4 Q F1(The date in \231W)180 446.4 Q +(eekday Month Date\232 format \(e.g., \231T)-.8 E(ue May 26\232\).)-.45 +E F2(\\D{)144 458.4 Q F0(format)A F2(})A F1(The)180 470.4 Q F0(format) +3.67 E F1 1.17(is passed to)3.67 F F0(strftime)4.01 E F1 1.17 +(\(3\) and the result is inserted into the prompt string; an).18 F +(empty)180 482.4 Q F0(format)2.5 E F1 +(results in a locale-speci\214c time representation.)2.5 E +(The braces are required.)5 E F2(\\e)144 494.4 Q F1 +(An ASCII escape character \(033\).)180 494.4 Q F2(\\h)144 506.4 Q F1 +(The hostname up to the \214rst \231.)180 506.4 Q<9a2e>-.7 E F2(\\H)144 +518.4 Q F1(The hostname.)180 518.4 Q F2(\\j)144 530.4 Q F1 +(The number of jobs currently managed by the shell.)180 530.4 Q F2(\\l) +144 542.4 Q F1(The basename of the shell')180 542.4 Q 2.5(st)-.55 G +(erminal de)-2.5 E(vice name \(e.g., \231ttys0\232\).)-.25 E F2(\\n)144 +554.4 Q F1 2.5(An)180 554.4 S -.25(ew)-2.5 G(line.).25 E F2(\\r)144 +566.4 Q F1 2.5(Ac)180 566.4 S(arriage return.)-2.5 E F2(\\s)144 578.4 Q +F1(The name of the shell: the basename of)180 578.4 Q F2($0)2.5 E F1 +(\(the portion follo)2.5 E(wing the \214nal slash\).)-.25 E F2(\\t)144 +590.4 Q F1(The current time in 24-hour HH:MM:SS format.)180 590.4 Q F2 +(\\T)144 602.4 Q F1(The current time in 12-hour HH:MM:SS format.)180 +602.4 Q F2(\\@)144 614.4 Q F1(The current time in 12-hour am/pm format.) +180 614.4 Q F2(\\A)144 626.4 Q F1 +(The current time in 24-hour HH:MM format.)180 626.4 Q F2(\\u)144 638.4 +Q F1(The username of the current user)180 638.4 Q(.)-.55 E F2(\\v)144 +650.4 Q F1(The)180 650.4 Q F2(bash)2.5 E F1 -.15(ve)2.5 G +(rsion \(e.g., 2.00\).).15 E F2(\\V)144 662.4 Q F1(The)180 662.4 Q F2 +(bash)2.5 E F1(release, v)2.5 E(ersion + patch le)-.15 E -.15(ve)-.25 G +2.5(l\().15 G(e.g., 2.00.0\))-2.5 E F2(\\w)144 674.4 Q F1 1.645(The v) +180 674.4 R 1.645(alue of the)-.25 F F2(PWD)4.145 E F1 1.645(shell v) +4.145 F 1.645(ariable \()-.25 F F2($PWD)A F1 1.645(\), with)B F3($HOME) +4.145 E F1(abbre)3.895 E 1.646(viated with a tilde)-.25 F(\(uses the v) +180 686.4 Q(alue of the)-.25 E F3(PR)2.5 E(OMPT_DIR)-.27 E(TRIM)-.36 E +F1 -.25(va)2.25 G(riable\).).25 E F2(\\W)144 698.4 Q F1(The basename of) +180 698.4 Q F2($PWD)2.5 E F1 2.5(,w)C(ith)-2.5 E F3($HOME)2.5 E F1 +(abbre)2.25 E(viated with a tilde.)-.25 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(44)185.955 E 0 Cg EP +%%Page: 45 45 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(\\!)144 84 Q F1 +(The history number of this command.)180 84 Q F2(\\#)144 96 Q F1 +(The command number of this command.)180 96 Q F2(\\$)144 108 Q F1 +(If the ef)180 108 Q(fecti)-.25 E .3 -.15(ve U)-.25 H(ID is 0, a).15 E +F2(#)2.5 E F1 2.5(,o)C(therwise a)-2.5 E F2($)2.5 E F1(.)A F2(\\)144 120 +Q F0(nnn)A F1(The character corresponding to the octal number)180 120 Q +F0(nnn)2.5 E F1(.)A F2(\\\\)144 132 Q F1 2.5(Ab)180 132 S(ackslash.)-2.5 +E F2(\\[)144 144 Q F1(Be)180 144 Q 1.128(gin a sequence of non-printing\ + characters, which could be used to embed a terminal)-.15 F +(control sequence into the prompt.)180 156 Q F2(\\])144 168 Q F1 +(End a sequence of non-printing characters.)180 168 Q .119 +(The command number and the history number are usually dif)108 184.8 R +.12(ferent: the history number of a command is its)-.25 F .547(position\ + in the history list, which may include commands restored from the hist\ +ory \214le \(see)108 196.8 R/F3 9/Times-Bold@0 SF(HIST)3.046 E(OR)-.162 +E(Y)-.315 E F1(be-)2.796 E(lo)108 208.8 Q .354(w\), while the command n\ +umber is the position in the sequence of commands e)-.25 F -.15(xe)-.15 +G .355(cuted during the current).15 F .823(shell session.)108 220.8 R +.822(After the string is decoded, it is e)5.823 F .822 +(xpanded via parameter e)-.15 F .822(xpansion, command substitution,) +-.15 F .682(arithmetic e)108 232.8 R .682(xpansion, and quote remo)-.15 +F -.25(va)-.15 G .682(l, subject to the v).25 F .683(alue of the)-.25 F +F2(pr)3.183 E(omptv)-.18 E(ars)-.1 E F1 .683(shell option \(see the de-) +3.183 F 1.198(scription of the)108 244.8 R F2(shopt)3.698 E F1 1.198 +(command under)3.698 F F3 1.197(SHELL B)3.697 F(UIL)-.09 E 1.197 +(TIN COMMANDS)-.828 F F1(belo)3.447 E 3.697(w\). This)-.25 F 1.197 +(can ha)3.697 F 1.497 -.15(ve u)-.2 H(nw).15 E(anted)-.1 E .322(side ef) +108 256.8 R .322(fects if escaped portions of the string appear within \ +command substitution or contain characters spe-)-.25 F(cial to w)108 +268.8 Q(ord e)-.1 E(xpansion.)-.15 E/F4 10.95/Times-Bold@0 SF(READLINE) +72 285.6 Q F1 .151 +(This is the library that handles reading input when using an interacti) +108 297.6 R .45 -.15(ve s)-.25 H .15(hell, unless the).15 F F2 +(\255\255noediting)2.65 E F1(option)2.65 E .573(is supplied at shell in) +108 309.6 R -.2(vo)-.4 G 3.073(cation. Line).2 F .573 +(editing is also used when using the)3.073 F F23.073 E F1 .573 +(option to the)3.073 F F2 -.18(re)3.074 G(ad).18 E F1 -.2(bu)3.074 G +3.074(iltin. By).2 F(def)108 321.6 Q 1.244(ault, the line editing comma\ +nds are similar to those of emacs; a vi-style line editing interf)-.1 F +1.243(ace is also)-.1 F -.2(av)108 333.6 S 3.35(ailable. Line)-.05 F .85 +(editing can be enabled at an)3.35 F 3.35(yt)-.15 G .85(ime using the) +-3.35 F F2 .85(\255o emacs)3.35 F F1(or)3.35 E F2 .85(\255o vi)3.35 F F1 +.85(options to the)3.35 F F2(set)3.35 E F1 -.2(bu)3.35 G(iltin).2 E +(\(see)108 345.6 Q F3 .763(SHELL B)3.263 F(UIL)-.09 E .763(TIN COMMANDS) +-.828 F F1(belo)3.013 E 3.263(w\). T)-.25 F 3.263(ot)-.8 G .763(urn of) +-3.263 F 3.263(fl)-.25 G .763 +(ine editing after the shell is running, use the)-3.263 F F2(+o)3.262 E +(emacs)108 357.6 Q F1(or)2.5 E F2(+o vi)2.5 E F1(options to the)2.5 E F2 +(set)2.5 E F1 -.2(bu)2.5 G(iltin.).2 E F2(Readline Notation)87 374.4 Q +F1 .862(This section uses Emacs-style editing concepts and uses its not\ +ation for k)108 386.4 R -.15(ey)-.1 G(strok).15 E 3.362(es. Control)-.1 +F -.1(ke)3.362 G .862(ys are de-)-.05 F .55(noted by C\255)108 398.4 R +F0 -.1(ke)C(y)-.2 E F1 3.05(,e)C .55(.g., C\255n means Control\255N.) +-3.05 F(Similarly)5.55 E(,)-.65 E F0(meta)3.43 E F1 -.1(ke)3.31 G .55 +(ys are denoted by M\255)-.05 F F0 -.1(ke)C(y)-.2 E F1 3.05(,s)C 3.05 +(oM)-3.05 G .55(\255x means)-3.05 F 2.5(Meta\255X. The)108 410.4 R +(Meta k)2.5 E .3 -.15(ey i)-.1 H 2.5(so).15 G(ften labeled \231)-2.5 E +(Alt\232 or \231Option\232.)-.8 E .149(On k)108 427.2 R -.15(ey)-.1 G +.149(boards without a).15 F F0(Meta)3.329 E F1 -.1(ke)2.909 G 1.449 -.65 +(y, M)-.05 H.65 E F0(x)A F1 .149(means ESC)2.649 F F0(x)2.649 E F1 +2.649(,i)C .15(.e., press and release the Escape k)-2.649 F -.15(ey)-.1 +G 2.65(,t)-.5 G .15(hen press and)-2.65 F 1.217(release the)108 439.2 R +F0(x)4.487 E F1 -.1(ke)4.247 G 2.517 -.65(y, i)-.05 H 3.716(ns).65 G +3.716(equence. This)-3.716 F(mak)3.716 E 1.216(es ESC the)-.1 F F0 1.216 +(meta pr)3.716 F(e\214x)-.37 E F1 6.216(.T)C 1.216 +(he combination M\255C\255)-6.216 F F0(x)A F1 1.216(means ESC)3.716 F +(Control\255)108 451.2 Q F0(x)A F1 2.93(:p)C .43 +(ress and release the Escape k)-2.93 F -.15(ey)-.1 G 2.93(,t)-.5 G .43 +(hen press and hold the Control k)-2.93 F .73 -.15(ey w)-.1 H .43 +(hile pressing the).15 F F0(x)3.7 E F1 -.1(ke)3.46 G -.65(y,)-.05 G +(then release both.)108 463.2 Q .217(On some k)108 480 R -.15(ey)-.1 G +.217(boards, the Meta k).15 F .517 -.15(ey m)-.1 H .216 +(odi\214er produces characters with the eighth bit \(0200\) set.).15 F +-1.1(Yo)5.216 G 2.716(uc)1.1 G .216(an use)-2.716 F(the)108 492 Q F2 +(enable\255meta\255k)3.315 E(ey)-.1 E F1 -.25(va)3.315 G .816 +(riable to control whether or not it does this, if the k).25 F -.15(ey) +-.1 G .816(board allo).15 F .816(ws it.)-.25 F .816(On man)5.816 F(y) +-.15 E .568(others, the terminal or terminal emulator con)108 504 R -.15 +(ve)-.4 G .568(rts the meta\214ed k).15 F .868 -.15(ey t)-.1 H 3.068 +(oak).15 G .868 -.15(ey s)-3.168 H .568(equence be).15 F .568 +(ginning with ESC)-.15 F(as described in the preceding paragraph.)108 +516 Q .029(If your)108 532.8 R F0(Meta)2.529 E F1 -.1(ke)2.529 G 2.529 +(yp)-.05 G .029(roduces a k)-2.529 F .329 -.15(ey s)-.1 H .03 +(equence with the ESC meta pre\214x, you can mak).15 F 2.53(eM)-.1 G(-) +-2.53 E F0 -.1(ke)C(y)-.2 E F1 -.1(ke)2.53 G 2.53(yb)-.05 G .03 +(indings you)-2.53 F(specify \(see)108 544.8 Q F2(Readline K)2.5 E +(ey Bindings)-.25 E F1(belo)2.5 E(w\) do the same thing by setting the) +-.25 E F2 -.25(fo)2.5 G -.18(rc).25 G(e\255meta\255pr).18 E(e\214x)-.18 +E F1 -.25(va)2.5 G(riable.).25 E F2(Readline)108 561.6 Q F1 .437 +(commands may be gi)2.937 F -.15(ve)-.25 G 2.937(nn).15 G(umeric)-2.937 +E F0(ar)3.267 E(guments)-.37 E F1 2.936(,w).27 G .436 +(hich normally act as a repeat count.)-2.936 F(Sometimes,)5.436 E(ho)108 +573.6 Q(we)-.25 E -.15(ve)-.25 G 1.418 -.4(r, i).15 H 3.118(ti).4 G +3.119(st)-3.118 G .619(he sign of the ar)-3.119 F .619 +(gument that is signi\214cant.)-.18 F -.15(Pa)5.619 G .619(ssing a ne) +.15 F -.05(ga)-.15 G(ti).05 E .919 -.15(ve a)-.25 H -.18(rg).15 G .619 +(ument to a command that).18 F .296(acts in the forw)108 585.6 R .296 +(ard direction \(e.g.,)-.1 F F2(kill\255line)2.796 E F1 2.796(\)m)C(ak) +-2.796 E .296(es that command act in a backw)-.1 F .296(ard direction.) +-.1 F(Commands)5.296 E(whose beha)108 597.6 Q(vior with ar)-.2 E +(guments de)-.18 E(viates from this are noted belo)-.25 E -.65(w.)-.25 G +(The)108 614.4 Q F0(point)3.245 E F1 .745 +(is the current cursor position, and)3.245 F F0(mark)3.245 E F1 .745 +(refers to a sa)3.245 F -.15(ve)-.2 G 3.245(dc).15 G .745 +(ursor position.)-3.245 F .745(The te)5.745 F .745(xt between the)-.15 F +.447(point and mark is referred to as the)108 626.4 R F0 -.37(re)2.947 G +(gion)-.03 E F1(.)A F2(Readline)5.447 E F1 .447(has the concept of an) +2.947 F F0 .447(active r)2.947 F -.4(eg)-.37 G(ion).4 E F1 2.946(:w)C +.446(hen the re)-2.946 F(gion)-.15 E .304(is acti)108 638.4 R -.15(ve) +-.25 G(,).15 E F2 -.18(re)2.804 G(adline).18 E F1 .304 +(redisplay highlights the re)2.804 F .305(gion using the v)-.15 F .305 +(alue of the)-.25 F F2(acti)2.805 E -.1(ve)-.1 G(-r).1 E +(egion-start-color)-.18 E F1 -.25(va)2.805 G(riable.).25 E(The)108 650.4 +Q F2(enable\255acti)2.759 E -.1(ve)-.1 G.1 E(egion)-.18 E F1 -.25 +(va)2.759 G .259(riable turns this on and of).25 F 2.759(f. Se)-.25 F +-.15(ve)-.25 G .259(ral commands set the re).15 F .258(gion to acti)-.15 +F -.15(ve)-.25 G 2.758(;t).15 G(hose)-2.758 E(are noted belo)108 662.4 Q +-.65(w.)-.25 G .811(When a command is described as)108 679.2 R F0 +(killing)3.311 E F1(te)3.311 E .811(xt, the te)-.15 F .811 +(xt deleted is sa)-.15 F -.15(ve)-.2 G 3.311(df).15 G .812 +(or possible future retrie)-3.311 F -.25(va)-.25 G 3.312(l\().25 G F0 +(yank-)-3.312 E(ing)108 691.2 Q F1 3.674(\). The)B 1.174(killed te)3.674 +F 1.174(xt is sa)-.15 F -.15(ve)-.2 G 3.674(di).15 G 3.674(na)-3.674 G +F0 1.174(kill ring)B F1 6.174(.C)C(onsecuti)-6.174 E 1.474 -.15(ve k) +-.25 H 1.174(ills accumulate the deleted te).15 F 1.173 +(xt into one unit,)-.15 F .567(which can be yank)108 703.2 R .567 +(ed all at once.)-.1 F .567(Commands which do not kill te)5.567 F .567 +(xt separate the chunks of te)-.15 F .567(xt on the kill)-.15 F(ring.) +108 715.2 Q(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(45)185.955 +E 0 Cg EP +%%Page: 46 46 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(Readline Initialization)87 84 +Q(Readline)108 96 Q F1 .913 +(is customized by putting commands in an initialization \214le \(the) +3.413 F F0(inputr)3.412 E(c)-.37 E F1 3.412(\214le\). The)3.412 F .912 +(name of this)3.412 F 2.517(\214le is tak)108 108 R 2.517(en from the v) +-.1 F 2.517(alue of the)-.25 F/F3 9/Times-Bold@0 SF(INPUTRC)5.017 E F1 +2.518(shell v)4.767 F 5.018(ariable. If)-.25 F 2.518(that v)5.018 F +2.518(ariable is unset, the def)-.25 F 2.518(ault is)-.1 F F0 +(\001/.inputr)109.666 120 Q(c)-.37 E F1 5.389(.I)1.666 G 2.889(ft)-5.389 +G .389(hat \214le)-2.889 F .389(does not e)5.389 F .389 +(xist or cannot be read,)-.15 F F2 -.18(re)2.888 G(adline).18 E F1 .388 +(looks for)2.888 F F0(/etc/inputr)4.554 E(c)-.37 E F1 5.388(.W)1.666 G +.388(hen a program)-5.388 F .808(that uses the)108 132 R F2 -.18(re) +3.308 G(adline).18 E F1 .809(library starts up,)3.309 F F2 -.18(re)3.309 +G(adline).18 E F1 .809(reads the initialization \214le and sets the k) +3.309 F 1.109 -.15(ey b)-.1 H .809(indings and).15 F -.25(va)108 144 S +(riables found there, before reading an).25 E 2.5(yu)-.15 G(ser input.) +-2.5 E .34(There are only a fe)108 160.8 R 2.84(wb)-.25 G .34 +(asic constructs allo)-2.84 F .34(wed in the inputrc \214le.)-.25 F .34 +(Blank lines are ignored.)5.34 F .34(Lines be)5.34 F(ginning)-.15 E .778 +(with a)108 172.8 R F2(#)3.278 E F1 .778(are comments.)3.278 F .778 +(Lines be)5.778 F .778(ginning with a)-.15 F F2($)3.278 E F1 .778 +(indicate conditional constructs.)3.278 F .779(Other lines denote k) +5.778 F -.15(ey)-.1 G(bindings and v)108 184.8 Q(ariable settings.)-.25 +E .775(The def)108 201.6 R .775(ault k)-.1 F -.15(ey)-.1 G .775 +(-bindings in this section may be changed using k).15 F 1.075 -.15(ey b) +-.1 H .775(inding commands in the).15 F F0(inputr)3.285 E(c)-.37 E F1 +(\214le.)3.585 E(Programs that use the)108 213.6 Q F2 -.18(re)2.5 G +(adline).18 E F1(library)2.5 E 2.5(,i)-.65 G(ncluding)-2.5 E F2(bash)2.5 +E F1 2.5(,m)C(ay add their o)-2.5 E(wn commands and bindings.)-.25 E +-.15(Fo)108 230.4 S 2.5(re).15 G(xample, placing)-2.65 E +(M\255Control\255u: uni)144 247.2 Q -.15(ve)-.25 G(rsal\255ar).15 E +(gument)-.18 E(or)108 259.2 Q(C\255Meta\255u: uni)144 271.2 Q -.15(ve) +-.25 G(rsal\255ar).15 E(gument)-.18 E(into the)108 288 Q F0(inputr)2.51 +E(c)-.37 E F1 -.1(wo)2.81 G(uld mak).1 E 2.5(eM)-.1 G(\255C\255u e)-2.5 +E -.15(xe)-.15 G(cute the).15 E F2 -.18(re)2.5 G(adline).18 E F1 +(command)2.5 E F0(univer)2.58 E(sal\255ar)-.1 E(gument)-.37 E F1(.).68 E +-2.15 -.25(Ke y)108 304.8 T 1.442(bindings may contain the follo)4.192 F +1.442(wing symbolic character names:)-.25 F F0(DEL)4.522 E F1(,).53 E F0 +(ESC)4.453 E F1(,).72 E F0(ESCAPE)4.453 E F1(,).73 E F0(LFD)4.523 E F1 +(,).28 E F0(NEW)4.643 E(-)-.37 E(LINE)108 316.8 Q F1(,).73 E F0(RET)3.13 +E F1(,)1.27 E F0(RETURN)3.13 E F1(,)1.1 E F0 -.4(RU)2.5 G(BOUT).4 E F1 +(\(a destructi)3.77 E .3 -.15(ve b)-.25 H(ackspace\),).15 E F0(SP)2.83 E +-.3(AC)-.9 G(E).3 E F1(,).73 E F0(SPC)2.83 E F1 2.5(,a).72 G(nd)-2.5 E +F0 -.5(TA)2.5 G(B).5 E F1(.).27 E .079(In addition to command names,)108 +333.6 R F2 -.18(re)2.579 G(adline).18 E F1(allo)2.579 E .079(ws k)-.25 F +-.15(ey)-.1 G 2.579(st).15 G 2.579(ob)-2.579 G 2.579(eb)-2.579 G .078 +(ound to a string that is inserted when the k)-2.579 F .378 -.15(ey i) +-.1 H(s).15 E .192(pressed \(a)108 345.6 R F0(macr)2.692 E(o)-.45 E F1 +2.692(\). The)B(dif)2.692 E .192(ference between a macro and a command \ +is that a macro is enclosed in single or)-.25 F(double quotes.)108 357.6 +Q F2(Readline K)87 374.4 Q(ey Bindings)-.25 E F1 .366 +(The syntax for controlling k)108 386.4 R .666 -.15(ey b)-.1 H .366 +(indings in the).15 F F0(inputr)2.876 E(c)-.37 E F1 .366 +(\214le is simple.)3.176 F .366(All that is required is the name of the) +5.366 F .011(command or the te)108 398.4 R .011(xt of a macro and a k) +-.15 F .311 -.15(ey s)-.1 H .012(equence to which it should be bound.) +.15 F .012(The k)5.012 F .312 -.15(ey s)-.1 H .012(equence may be).15 F +.695(speci\214ed in one of tw)108 410.4 R 3.195(ow)-.1 G .695 +(ays: as a symbolic k)-3.295 F .995 -.15(ey n)-.1 H .695 +(ame, possibly with).15 F F0(Meta\255)3.195 E F1(or)3.195 E F0(Contr) +3.194 E(ol\255)-.45 E F1(pre\214x)3.194 E .694(es, or as a)-.15 F -.1 +(ke)108 422.4 S 2.802(ys)-.05 G .302 +(equence composed of one or more characters enclosed in double quotes.) +-2.802 F .303(The k)5.303 F .603 -.15(ey s)-.1 H .303(equence and name) +.15 F(are separated by a colon.)108 434.4 Q +(There can be no whitespace between the name and the colon.)5 E .161 +(When using the form)108 451.2 R F2 -.1(ke)2.661 G(yname).1 E F1(:)A F0 +(function\255name).833 E F1(or)2.661 E F0(macr)2.661 E(o)-.45 E F1(,)A +F0 -.1(ke)2.661 G(yname)-.2 E F1 .16(is the name of a k)2.84 F .46 -.15 +(ey s)-.1 H .16(pelled out in Eng-).15 F 2.5(lish. F)108 463.2 R(or e) +-.15 E(xample:)-.15 E/F4 10/Courier@0 SF +(Control-u: universal\255argument)144 480 Q +(Meta-Rubout: backward\255kill\255word)144 492 Q(Control-o: "> output") +144 504 Q F1 .698(In the abo)108 520.8 R .998 -.15(ve ex)-.15 H(ample,) +.15 E F0(C\255u)3.038 E F1 .698(is bound to the function)3.448 F F2(uni) +3.198 E -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F1(,)A F0(M\255DEL) +3.878 E F1 .698(is bound to the func-)3.728 F(tion)108 532.8 Q F2 +(backward\255kill\255w)2.759 E(ord)-.1 E F1 2.759(,a)C(nd)-2.759 E F0 +(C\255o)2.599 E F1 .258(is bound to run the macro e)2.939 F .258 +(xpressed on the right hand side \(that is, to)-.15 F(insert the te)108 +544.8 Q(xt \231> output\232 into the line\).)-.15 E .055 +(In the second form,)108 561.6 R F2("k)2.555 E(eyseq")-.1 E F1(:)A F0 +(function\255name).833 E F1(or)2.555 E F0(macr)2.555 E(o)-.45 E F1(,)A +F2 -.1(ke)2.555 G(yseq).1 E F1(dif)2.556 E .056(fers from)-.25 F F2 -.1 +(ke)2.556 G(yname).1 E F1(abo)2.556 E .356 -.15(ve i)-.15 H 2.556(nt).15 +G .056(hat strings)-2.556 F 1.284(denoting an entire k)108 573.6 R 1.584 +-.15(ey s)-.1 H 1.284(equence may be speci\214ed by placing the sequenc\ +e within double quotes.).15 F(Some)6.284 E .101(GNU Emacs style k)108 +585.6 R .401 -.15(ey e)-.1 H .102(scapes can be used, as in the follo) +.15 F .102(wing e)-.25 F .102(xample, b)-.15 F .102 +(ut none of the symbolic character)-.2 F(names are recognized.)108 597.6 +Q F4("\\C\255u": universal\255argument)144 614.4 Q +("\\C\255x\\C\255r": re\255read\255init\255file)144 626.4 Q +("\\e[11\001": "Function Key 1")144 638.4 Q F1 .315(In this e)108 655.2 +R(xample,)-.15 E F0(C\255u)2.655 E F1 .315(is ag)3.065 F .315 +(ain bound to the function)-.05 F F2(uni)2.815 E -.1(ve)-.1 G +(rsal\255ar).1 E(gument)-.1 E F1(.)A F0 .315(C\255x C\255r)5.155 F F1 +.314(is bound to the func-)3.544 F(tion)108 667.2 Q F2 -.18(re)2.5 G +.18 E(ead\255init\255\214le)-.18 E F1 2.5(,a)C(nd)-2.5 E F0 +(ESC [ 1 1 \001)3.01 E F1(is bound to insert the te)2.61 E +(xt \231Function K)-.15 E .3 -.15(ey 1)-.25 H<9a2e>.15 E +(The full set of GNU Emacs style escape sequences a)108 684 Q -.25(va) +-.2 G(ilable when specifying k).25 E .3 -.15(ey s)-.1 H(equences is).15 +E F2<5c43ad>144 696 Q F1 2.5(Ac)180 696 S(ontrol pre\214x.)-2.5 E +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(46)185.955 E 0 Cg EP +%%Page: 47 47 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF<5c4dad>144 84 Q F1 .747 +(Adding the meta pre\214x or con)180 84 R -.15(ve)-.4 G .747 +(rting the follo).15 F .747(wing character to a meta character)-.25 F +3.248(,a)-.4 G 3.248(sd)-3.248 G(e-)-3.248 E(scribed belo)180 96 Q 2.5 +(wu)-.25 G(nder)-2.5 E F2 -.25(fo)2.5 G -.18(rc).25 G(e-meta-pr).18 E +(e\214x)-.18 E F1(.)A F2(\\e)144 108 Q F1(An escape character)180 108 Q +(.)-.55 E F2(\\\\)144 120 Q F1(Backslash.)180 120 Q F2(\\")144 132 Q F1 +(Literal ", a double quote.)180 132 Q F2<5c08>144 144 Q F1 +(Literal \010, a single quote.)180 144 Q(In addition to the GNU Emacs s\ +tyle escape sequences, a second set of backslash escapes is a)108 160.8 +Q -.25(va)-.2 G(ilable:).25 E F2(\\a)144 172.8 Q F1(alert \(bell\))180 +172.8 Q F2(\\b)144 184.8 Q F1(backspace)180 184.8 Q F2(\\d)144 196.8 Q +F1(delete)180 196.8 Q F2(\\f)144 208.8 Q F1(form feed)180 208.8 Q F2 +(\\n)144 220.8 Q F1(ne)180 220.8 Q(wline)-.25 E F2(\\r)144 232.8 Q F1 +(carriage return)180 232.8 Q F2(\\t)144 244.8 Q F1(horizontal tab)180 +244.8 Q F2(\\v)144 256.8 Q F1 -.15(ve)180 256.8 S(rtical tab).15 E F2 +(\\)144 268.8 Q F0(nnn)A F1(The eight-bit character whose v)180 268.8 Q +(alue is the octal v)-.25 E(alue)-.25 E F0(nnn)2.5 E F1 +(\(one to three digits\).)2.5 E F2(\\x)144 280.8 Q F0(HH)A F1 +(The eight-bit character whose v)180 280.8 Q(alue is the he)-.25 E +(xadecimal v)-.15 E(alue)-.25 E F0(HH)2.5 E F1(\(one or tw)2.5 E 2.5(oh) +-.1 G .3 -.15(ex d)-2.5 H(igits\).).15 E 1.142(When entering the te)108 +297.6 R 1.141(xt of a macro, single or double quotes must be used to in\ +dicate a macro de\214nition.)-.15 F .62(Unquoted te)108 309.6 R .62 +(xt is assumed to be a function name.)-.15 F .62 +(The backslash escapes described abo)5.62 F .92 -.15(ve a)-.15 H .62 +(re e).15 F .62(xpanded in)-.15 F(the macro body)108 321.6 Q 5(.B)-.65 G +(ackslash quotes an)-5 E 2.5(yo)-.15 G(ther character in the macro te) +-2.5 E(xt, including " and \010.)-.15 E F2(Bash)108 338.4 Q F1 1.197 +(will display or modify the current)3.697 F F2 -.18(re)3.696 G(adline) +.18 E F1 -.1(ke)3.696 G 3.696(yb)-.05 G 1.196(indings with the)-3.696 F +F2(bind)3.696 E F1 -.2(bu)3.696 G 1.196(iltin command.).2 F(The)6.196 E +F23.696 E(emacs)108 350.4 Q F1(or)3.673 E F2 1.173(\255o vi)3.673 +F F1 1.173(options to the)3.673 F F2(set)3.673 E F1 -.2(bu)3.673 G 1.174 +(iltin \(see).2 F/F3 9/Times-Bold@0 SF 1.174(SHELL B)3.674 F(UIL)-.09 E +1.174(TIN COMMANDS)-.828 F F1(belo)3.424 E 1.174(w\) change the editing) +-.25 F(mode during interacti)108 362.4 Q .3 -.15(ve u)-.25 H(se.).15 E +F2(Readline V)87 379.2 Q(ariables)-.92 E(Readline)108 391.2 Q F1 .453 +(has v)2.953 F .452 +(ariables that can be used to further customize its beha)-.25 F(vior)-.2 +E 5.452(.A)-.55 G -.25(va)-2.5 G .452(riable may be set in the).25 F F0 +(in-)2.962 E(putr)108 403.2 Q(c)-.37 E F1 +(\214le with a statement of the form)2.81 E F2(set)144 420 Q F0 +(variable\255name value)2.5 E F1(or using the)108 432 Q F2(bind)2.5 E F1 +-.2(bu)2.5 G(iltin command \(see).2 E F3(SHELL B)2.5 E(UIL)-.09 E +(TIN COMMANDS)-.828 E F1(belo)2.25 E(w\).)-.25 E .626 +(Except where noted,)108 448.8 R F2 -.18(re)3.127 G(adline).18 E F1 -.25 +(va)3.127 G .627(riables can tak).25 F 3.127(et)-.1 G .627(he v)-3.127 F +(alues)-.25 E F2(On)3.127 E F1(or)3.127 E F2(Off)3.127 E F1 .627 +(\(without re)3.127 F -.05(ga)-.15 G .627(rd to case\).).05 F(Unrecog-) +5.627 E .345(nized v)108 460.8 R .345(ariable names are ignored.)-.25 F +(When)5.345 E F2 -.18(re)2.845 G(adline).18 E F1 .345(reads a v)2.845 F +.345(ariable v)-.25 F .345(alue, empty or null v)-.25 F .345 +(alues, \231on\232 \(case-)-.25 F(insensiti)108 472.8 Q -.15(ve)-.25 G +(\), and \2311\232 are equi).15 E -.25(va)-.25 G(lent to).25 E F2(On)2.5 +E F1 5(.A)C(ll other v)-5 E(alues are equi)-.25 E -.25(va)-.25 G +(lent to).25 E F2(Off)2.5 E F1(.)A(The)108 489.6 Q F2 .713(bind \255V) +3.213 F F1 .713(command lists the current)3.213 F F2 -.18(re)3.213 G +(adline).18 E F1 -.25(va)3.214 G .714(riable names and v).25 F .714 +(alues \(see)-.25 F F3 .714(SHELL B)3.214 F(UIL)-.09 E .714(TIN COM-) +-.828 F(MANDS)108 501.6 Q F1(belo)2.25 E(w\).)-.25 E(The v)108 518.4 Q +(ariables and their def)-.25 E(ault v)-.1 E(alues are:)-.25 E F2(acti) +108 535.2 Q -.1(ve)-.1 G.1 E(egion\255start\255color)-.18 E F1 +2.73(As)144 547.2 S .23(tring v)-2.73 F .23 +(ariable that controls the te)-.25 F .229 +(xt color and background when displaying the te)-.15 F .229 +(xt in the acti)-.15 F -.15(ve)-.25 G(re)144 559.2 Q 1.526 +(gion \(see the description of)-.15 F F2(enable\255acti)4.026 E -.1(ve) +-.1 G.1 E(egion)-.18 E F1(belo)4.026 E 4.026(w\). This)-.25 F +1.526(string must not tak)4.026 F 4.027(eu)-.1 G 4.027(pa)-4.027 G -.15 +(ny)-4.027 G(ph)144 571.2 Q .284 +(ysical character positions on the display)-.05 F 2.784(,s)-.65 G 2.784 +(oi)-2.784 G 2.784(ts)-2.784 G .283 +(hould consist only of terminal escape sequences.)-2.784 F .45 +(It is output to the terminal before displaying the te)144 583.2 R .45 +(xt in the acti)-.15 F .75 -.15(ve r)-.25 H -.15(eg).15 G 2.95 +(ion. This).15 F -.25(va)2.95 G .45(riable is reset to).25 F .379 +(the def)144 595.2 R .379(ault v)-.1 F .379(alue whene)-.25 F -.15(ve) +-.25 G 2.879(rt).15 G .379(he terminal type changes.)-2.879 F .379 +(The def)5.379 F .379(ault v)-.1 F .378 +(alue is the string that puts the)-.25 F .654 +(terminal in standout mode, as obtained from the terminal')144 607.2 R +3.155(st)-.55 G .655(erminfo description.)-3.155 F 3.155(As)5.655 G .655 +(ample v)-3.155 F(alue)-.25 E(might be \231\\e[01;33m\232.)144 619.2 Q +F2(acti)108 631.2 Q -.1(ve)-.1 G.1 E(egion\255end\255color)-.18 E +F1 3.778(As)144 643.2 S 1.278(tring v)-3.778 F 1.277 +(ariable that \231undoes\232 the ef)-.25 F 1.277(fects of)-.25 F F2 +(acti)3.777 E -.1(ve)-.1 G.1 E(egion\255start\255color)-.18 E F1 +1.277(and restores \231normal\232)3.777 F .216 +(terminal display appearance after displaying te)144 655.2 R .216 +(xt in the acti)-.15 F .516 -.15(ve r)-.25 H -.15(eg).15 G 2.716 +(ion. This).15 F .216(string must not tak)2.716 F 2.716(eu)-.1 G(p) +-2.716 E(an)144 667.2 Q 3.738(yp)-.15 G -.05(hy)-3.738 G 1.238 +(sical character positions on the display).05 F 3.737(,s)-.65 G 3.737 +(oi)-3.737 G 3.737(ts)-3.737 G 1.237 +(hould consist only of terminal escape se-)-3.737 F 2.927(quences. It) +144 679.2 R .427(is output to the terminal after displaying the te)2.927 +F .428(xt in the acti)-.15 F .728 -.15(ve r)-.25 H -.15(eg).15 G 2.928 +(ion. This).15 F -.25(va)2.928 G .428(riable is).25 F .519 +(reset to the def)144 691.2 R .518(ault v)-.1 F .518(alue whene)-.25 F +-.15(ve)-.25 G 3.018(rt).15 G .518(he terminal type changes.)-3.018 F +.518(The def)5.518 F .518(ault v)-.1 F .518(alue is the string that)-.25 +F .251(restores the terminal from standout mode, as obtained from the t\ +erminal')144 703.2 R 2.752(st)-.55 G .252(erminfo description.)-2.752 F +(A)5.252 E(sample v)144 715.2 Q(alue might be \231\\e[0m\232.)-.25 E +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(47)185.955 E 0 Cg EP +%%Page: 48 48 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(bell\255style \(audible\))108 +84 Q F1 1.284(Controls what happens when)144 96 R F2 -.18(re)3.784 G +(adline).18 E F1 -.1(wa)3.784 G 1.284(nts to ring the terminal bell.).1 +F 1.284(If set to)6.284 F F2(none)3.784 E F1(,)A F2 -.18(re)3.784 G +(adline).18 E F1(ne)144 108 Q -.15(ve)-.25 G 2.644(rr).15 G .144 +(ings the bell.)-2.644 F .144(If set to)5.144 F F2(visible)2.644 E F1(,) +A F2 -.18(re)2.644 G(adline).18 E F1 .145 +(uses a visible bell if one is a)2.644 F -.25(va)-.2 G 2.645(ilable. If) +.25 F .145(set to)2.645 F F2(audi-)2.645 E(ble)144 120 Q F1(,)A F2 -.18 +(re)2.5 G(adline).18 E F1(attempts to ring the terminal')2.5 E 2.5(sb) +-.55 G(ell.)-2.5 E F2(bind\255tty\255special\255chars \(On\))108 132 Q +F1 .516(If set to)144 144 R F2(On)3.016 E F1(,)A F2 -.18(re)3.016 G +(adline).18 E F1 .516(attempts to bind the control characters that are \ +treated specially by the k)3.016 F(er)-.1 E(-)-.2 E(nel')144 156 Q 3.605 +(st)-.55 G 1.105(erminal dri)-3.605 F -.15(ve)-.25 G 3.605(rt).15 G +3.605(ot)-3.605 G(heir)-3.605 E F2 -.18(re)3.605 G(adline).18 E F1(equi) +3.605 E -.25(va)-.25 G 3.605(lents. These).25 F -.15(ove)3.605 G 1.105 +(rride the def).15 F(ault)-.1 E F2 -.18(re)3.605 G(adline).18 E F1 +(bindings)3.605 E .859(described here.)144 168 R -.8(Ty)5.859 G .859 +(pe \231stty \255a\232 at a).8 F F2(bash)3.359 E F1 .858 +(prompt to see your current terminal settings, including)3.359 F +(the special control characters \(usually)144 180 Q F2(cchars)2.5 E F1 +(\).)A F2(blink\255matching\255par)108 192 Q(en \(Off\))-.18 E F1 .056 +(If set to)144 204 R F2(On)2.556 E F1(,)A F2 -.18(re)2.556 G(adline).18 +E F1 .056(attempts to brie\215y mo)2.556 F .356 -.15(ve t)-.15 H .057 +(he cursor to an opening parenthesis when a closing).15 F +(parenthesis is inserted.)144 216 Q F2(color)108 228 Q +(ed\255completion\255pr)-.18 E(e\214x \(Off\))-.18 E F1 .352(If set to) +144 240 R F2(On)2.852 E F1 2.852(,w)C .352(hen listing completions,) +-2.852 F F2 -.18(re)2.852 G(adline).18 E F1 .352 +(displays the common pre\214x of the set of possible)2.852 F 2.935 +(completions using a dif)144 252 R 2.935(ferent color)-.25 F 7.936(.T) +-.55 G 2.936(he color de\214nitions are tak)-7.936 F 2.936 +(en from the v)-.1 F 2.936(alue of the)-.25 F F2(LS_COLORS)144 264 Q F1 +(en)3.077 E .577(vironment v)-.4 F 3.077(ariable. If)-.25 F .577 +(there is a color de\214nition in)3.077 F F2($LS_COLORS)3.077 E F1 .577 +(for the cus-)3.077 F .926(tom suf)144 276 R .926 +(\214x \231.readline-colored-completion-pre\214x\232,)-.25 F F2 -.18(re) +3.426 G(adline).18 E F1 .926(uses this color for the common pre\214x) +3.426 F(instead of its def)144 288 Q(ault.)-.1 E F2(color)108 300 Q +(ed\255stats \(Off\))-.18 E F1 1.393(If set to)144 312 R F2(On)3.893 E +F1(,)A F2 -.18(re)3.893 G(adline).18 E F1 1.393 +(displays possible completions using dif)3.893 F 1.393 +(ferent colors to indicate their \214le)-.25 F 2.5(type. The)144 324 R +(color de\214nitions are tak)2.5 E(en from the v)-.1 E(alue of the)-.25 +E F2(LS_COLORS)2.5 E F1(en)2.5 E(vironment v)-.4 E(ariable.)-.25 E F2 +(comment\255begin \()108 336 Q F1<99>A F2(#)A F1<9a>A F2(\))A F1 .477 +(The string that the)144 348 R F2 -.18(re)2.977 G .477 +(adline insert\255comment).18 F F1 .477(command inserts.)2.977 F .477 +(This command is bound to)5.477 F F2(M\255#)2.977 E F1 +(in emacs mode and to)144 360 Q F2(#)2.5 E F1(in vi command mode.)2.5 E +F2(completion\255display\255width \(\2551\))108 372 Q F1 1.453(The numb\ +er of screen columns used to display possible matches when performing c\ +ompletion.)144 384 R 1.106(The v)144 396 R 1.106(alue is ignored if it \ +is less than 0 or greater than the terminal screen width.)-.25 F 3.606 +(Av)6.106 G 1.106(alue of 0)-3.856 F +(causes matches to be displayed one per line.)144 408 Q(The def)5 E +(ault v)-.1 E(alue is \2551.)-.25 E F2(completion\255ignor)108 420 Q +(e\255case \(Off\))-.18 E F1(If set to)144 432 Q F2(On)2.5 E F1(,)A F2 +-.18(re)2.5 G(adline).18 E F1 +(performs \214lename matching and completion in a case\255insensiti)2.5 +E .3 -.15(ve f)-.25 H(ashion.).05 E F2 +(completion\255map\255case \(Off\))108 444 Q F1 1.574(If set to)144 456 +R F2(On)4.074 E F1 4.074(,a)C(nd)-4.074 E F2(completion\255ignor)4.074 E +(e\255case)-.18 E F1 1.574(is enabled,)4.074 F F2 -.18(re)4.074 G +(adline).18 E F1 1.574(treats h)4.074 F 1.574(yphens \()-.05 F F0A +F1 4.073(\)a)C 1.573(nd under)-4.073 F(-)-.2 E(scores \()144 468 Q F0(_) +A F1 2.5(\)a)C 2.5(se)-2.5 G(qui)-2.5 E -.25(va)-.25 G +(lent when performing case\255insensiti).25 E .3 -.15(ve \214)-.25 H +(lename matching and completion.).15 E F2(completion\255pr)108 480 Q +(e\214x\255display\255length \(0\))-.18 E F1 .689(The maximum length in\ + characters of the common pre\214x of a list of possible completions th\ +at is)144 492 R .244(displayed without modi\214cation.)144 504 R .243 +(When set to a v)5.243 F .243(alue greater than zero,)-.25 F F2 -.18(re) +2.743 G(adline).18 E F1 .243(replaces common)2.743 F(pre\214x)144 516 Q +.102(es longer than this v)-.15 F .102 +(alue with an ellipsis when displaying possible completions.)-.25 F .103 +(If a comple-)5.102 F .135(tion be)144 528 R .135 +(gins with a period, and)-.15 F F2(eadline)2.635 E F1 .134 +(is completing \214lenames, it uses three underscores instead of)2.635 F +(an ellipsis.)144 540 Q F2(completion\255query\255items \(100\))108 552 +Q F1 .529(This determines when the user is queried about vie)144 564 R +.53(wing the number of possible completions gen-)-.25 F .561 +(erated by the)144 576 R F2(possible\255completions)3.061 E F1 3.061 +(command. It)3.061 F .561(may be set to an)3.061 F 3.06(yi)-.15 G(nte) +-3.06 E .56(ger v)-.15 F .56(alue greater than or)-.25 F .782 +(equal to zero.)144 588 R .783(If the number of possible completions is\ + greater than or equal to the v)5.782 F .783(alue of this)-.25 F -.25 +(va)144 600 S(riable,).25 E F2 -.18(re)3.529 G(adline).18 E F1 1.029 +(asks whether or not the user wishes to vie)3.529 F 3.528(wt)-.25 G +1.028(hem; otherwise)-3.528 F F2 -.18(re)3.528 G(adline).18 E F1(simply) +3.528 E 1.349(lists them on the terminal.)144 612 R 3.849(Az)6.349 G +1.349(ero v)-3.849 F 1.349(alue means)-.25 F F2 -.18(re)3.849 G(adline) +.18 E F1 1.35(should ne)3.849 F -.15(ve)-.25 G 3.85(ra).15 G 1.35 +(sk; ne)-3.85 F -.05(ga)-.15 G(ti).05 E 1.65 -.15(ve v)-.25 H 1.35 +(alues are)-.1 F(treated as zero.)144 624 Q F2(con)108 636 Q -.1(ve)-.4 +G(rt\255meta \(On\)).1 E F1 .536(If set to)144 648 R F2(On)3.036 E F1(,) +A F2 -.18(re)3.036 G(adline).18 E F1(con)3.036 E -.15(ve)-.4 G .535 +(rts characters it reads that ha).15 F .835 -.15(ve t)-.2 H .535 +(he eighth bit set to an ASCII k).15 F .835 -.15(ey s)-.1 H(e-).15 E +.425(quence by clearing the eighth bit and pre\214xing it with an escap\ +e character \(con)144 660 R -.15(ve)-.4 G .426(rting the charac-).15 F +1.044(ter to ha)144 672 R 1.344 -.15(ve t)-.2 H 1.044 +(he meta pre\214x\).).15 F 1.044(The def)6.044 F 1.044(ault is)-.1 F F0 +(On)3.544 E F1 3.544(,b)C(ut)-3.744 E F2 -.18(re)3.544 G(adline).18 E F1 +1.044(sets it to)3.544 F F0(Of)3.543 E(f)-.18 E F1 1.043 +(if the locale contains)3.543 F .53 +(characters whose encodings may include bytes with the eighth bit set.) +144 684 R .53(This v)5.53 F .53(ariable is dependent)-.25 F .476(on the) +144 696 R F2(LC_CTYPE)2.976 E F1 .476(locale cate)2.976 F(gory)-.15 E +2.976(,a)-.65 G .476(nd may change if the locale changes.)-2.976 F .476 +(This v)5.476 F .476(ariable also af-)-.25 F(fects k)144 708 Q .3 -.15 +(ey b)-.1 H(indings; see the description of).15 E F2 -.25(fo)2.5 G -.18 +(rc).25 G(e\255meta\255pr).18 E(e\214x)-.18 E F1(belo)2.5 E -.65(w.)-.25 +G(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(48)185.955 E 0 Cg EP +%%Page: 49 49 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF +(disable\255completion \(Off\))108 84 Q F1 .708(If set to)144 96 R F2 +(On)3.208 E F1(,)A F2 -.18(re)3.208 G(adline).18 E F1 .708(inhibits w) +3.208 F .709(ord completion.)-.1 F .709 +(Completion characters are inserted into the line)5.709 F(as if the)144 +108 Q 2.5(yh)-.15 G(ad been mapped to)-2.5 E F2(self-insert)2.5 E F1(.)A +F2(echo\255contr)108 120 Q(ol\255characters \(On\))-.18 E F1 1.037 +(When set to)144 132 R F2(On)3.537 E F1 3.537(,o)C 3.537(no)-3.537 G +1.037(perating systems that indicate the)-3.537 F 3.537(ys)-.15 G 1.036 +(upport it,)-3.537 F F2 -.18(re)3.536 G(adline).18 E F1 1.036 +(echoes a character)3.536 F +(corresponding to a signal generated from the k)144 144 Q -.15(ey)-.1 G +(board.).15 E F2(editing\255mode \(emacs\))108 156 Q F1 .013 +(Controls whether)144 168 R F2 -.18(re)2.513 G(adline).18 E F1 .013 +(uses a set of k)2.513 F .313 -.15(ey b)-.1 H .013(indings similar to) +.15 F F0(Emacs)2.513 E F1(or)2.513 E F0(vi)2.513 E F1(.)A F2 +(editing\255mode)5.013 E F1 .014(can be)2.514 F(set to either)144 180 Q +F2(emacs)2.5 E F1(or)2.5 E F2(vi)2.5 E F1(.)A F2 +(emacs\255mode\255string \(@\))108 192 Q F1 .518(If the)144 204 R F0 +(show\255mode\255in\255pr)3.018 E(ompt)-.45 E F1 -.25(va)3.018 G .517 +(riable is enabled, this string is displayed immediately before the).25 +F .622(last line of the primary prompt when emacs editing mode is acti) +144 216 R -.15(ve)-.25 G 5.622(.T).15 G .622(he v)-5.622 F .622 +(alue is e)-.25 F .622(xpanded lik)-.15 F 3.122(ea)-.1 G -.1(ke)144 228 +S 3.118(yb)-.05 G .617 +(inding, so the standard set of meta- and control- pre\214x)-3.118 F +.617(es and backslash escape sequences is)-.15 F -.2(av)144 240 S 2.576 +(ailable. The)-.05 F .076(\\1 and \\2 escapes be)2.576 F .077 +(gin and end sequences of non-printing characters, which can be)-.15 F +(used to embed a terminal control sequence into the mode string.)144 252 +Q F2(enable\255acti)108 264 Q -.1(ve)-.1 G.1 E(egion \(On\))-.18 E +F1 .622(When this v)144 276 R .622(ariable is set to)-.25 F F0(On)3.121 +E F1(,)A F2 -.18(re)3.121 G(adline).18 E F1(allo)3.121 E .621 +(ws certain commands to designate the re)-.25 F .621(gion as)-.15 F F0 +(ac-)3.121 E(tive)144 288 Q F1 5.082(.W)C .082(hen the re)-5.082 F .082 +(gion is acti)-.15 F -.15(ve)-.25 G(,).15 E F2 -.18(re)2.583 G(adline) +.18 E F1 .083(highlights the te)2.583 F .083(xt in the re)-.15 F .083 +(gion using the v)-.15 F .083(alue of the)-.25 F F2(ac-)2.583 E(ti)144 +300 Q -.1(ve)-.1 G.1 E(egion\255start\255color)-.18 E F1 -.25(va) +2.775 G .275(riable, which def).25 F .274 +(aults to the string that enables the terminal')-.1 F 2.774(ss)-.55 G +(tandout)-2.774 E 3.149(mode. The)144 312 R(acti)3.149 E .949 -.15(ve r) +-.25 H -.15(eg).15 G .649(ion sho).15 F .649(ws the te)-.25 F .649 +(xt inserted by brack)-.15 F .649(eted-paste and an)-.1 F 3.15(ym)-.15 G +.65(atching te)-3.15 F .65(xt found)-.15 F +(by incremental and non-incremental history searches.)144 324 Q F2 +(enable\255brack)108 336 Q(eted\255paste \(On\))-.1 E F1 .688 +(When set to)144 348 R F2(On)3.187 E F1(,)A F2 -.18(re)3.187 G(adline) +.18 E F1 .687 +(con\214gures the terminal to insert each paste into the editing b)3.187 +F(uf)-.2 E .687(fer as a)-.25 F .799(single string of characters, inste\ +ad of treating each character as if it had been read from the k)144 360 +R -.15(ey)-.1 G(-).15 E 2.625(board. This)144 372 R .125(is called)2.625 +F F0(br)2.625 E(ac)-.15 E -.1(ke)-.2 G .125(ted\255paste mode).1 F F1 +2.625(;i)C 2.625(tp)-2.625 G(re)-2.625 E -.15(ve)-.25 G(nts).15 E F2 +-.18(re)2.625 G(adline).18 E F1 .124(from e)2.624 F -.15(xe)-.15 G .124 +(cuting an).15 F 2.624(ye)-.15 G .124(diting com-)-2.624 F +(mands bound to k)144 384 Q .3 -.15(ey s)-.1 H +(equences appearing in the pasted te).15 E(xt.)-.15 E F2(enable\255k)108 +396 Q(eypad \(Off\))-.1 E F1 .403(When set to)144 408 R F2(On)2.903 E F1 +(,)A F2 -.18(re)2.903 G(adline).18 E F1 2.904(tries to)2.904 F .404 +(enable the application k)2.904 F -.15(ey)-.1 G .404 +(pad when it is called.).15 F .404(Some systems)5.404 F +(need this to enable the arro)144 420 Q 2.5(wk)-.25 G -.15(ey)-2.6 G(s.) +.15 E F2(enable\255meta\255k)108 432 Q(ey \(On\))-.1 E F1 .03 +(When set to)144 444 R F2(On)2.53 E F1(,)A F2 -.18(re)2.53 G(adline).18 +E F1 .03(tries to enable an)2.53 F 2.529(ym)-.15 G .029 +(eta modi\214er k)-2.529 F .329 -.15(ey t)-.1 H .029 +(he terminal claims to support.).15 F(On)5.029 E(man)144 456 Q 2.985(yt) +-.15 G .485(erminals, the Meta k)-2.985 F .785 -.15(ey i)-.1 H 2.985(su) +.15 G .485(sed to send eight-bit characters; this v)-2.985 F .485 +(ariable checks for the ter)-.25 F(-)-.2 E .656(minal capability that i\ +ndicates the terminal can enable and disable a mode that sets the eight\ +h bit)144 468 R(of a character \(0200\) if the Meta k)144 480 Q .3 -.15 +(ey i)-.1 H 2.5(sh).15 G(eld do)-2.5 E +(wn when the character is typed \(a meta character\).)-.25 E F2 +(expand\255tilde \(Off\))108 492 Q F1(If set to)144 504 Q F2(On)2.5 E F1 +(,)A F2 -.18(re)2.5 G(adline).18 E F1(performs tilde e)2.5 E +(xpansion when it attempts w)-.15 E(ord completion.)-.1 E F2 -.25(fo)108 +516 S -.18(rc).25 G(e\255meta\255pr).18 E(e\214x \(Off\))-.18 E F1 .481 +(If set to)144 528 R F2(On)2.981 E F1(,)A F2 -.18(re)2.981 G(adline).18 +E F1 .481(modi\214es its beha)2.981 F .481(vior when binding k)-.2 F +.782 -.15(ey s)-.1 H .482(equences containing \\M- or Meta-).15 F(\(see) +144 540 Q F2 -.25(Ke)2.785 G 2.785(yB).25 G(indings)-2.785 E F1(abo) +2.784 E -.15(ve)-.15 G 2.784(\)b).15 G 2.784(yc)-2.784 G(on)-2.784 E +-.15(ve)-.4 G .284(rting a k).15 F .584 -.15(ey s)-.1 H .284 +(equence of the form \\M\255).15 F F0(C)A F1 .284(or Meta\255)2.784 F F0 +(C)A F1 .284(to the tw)2.784 F(o-)-.1 E .78(character sequence)144 552 R +F2(ESC)3.28 E F0(C)3.28 E F1 .78(\(adding the meta pre\214x\).)3.28 F +(If)5.78 E F2 -.25(fo)3.28 G -.18(rc).25 G(e\255meta\255pr).18 E(e\214x) +-.18 E F1 .78(is set to)3.28 F F2(Off)3.28 E F1 .78(\(the de-)3.28 F -.1 +(fa)144 564 S(ult\),).1 E F2 -.18(re)2.917 G(adline).18 E F1 .417 +(uses the v)2.917 F .417(alue of the)-.25 F F2(con)2.916 E -.1(ve)-.4 G +(rt\255meta).1 E F1 -.25(va)2.916 G .416 +(riable to determine whether to perform this).25 F(con)144 576 Q -.15 +(ve)-.4 G .095(rsion: if).15 F F2(con)2.595 E -.1(ve)-.4 G(rt\255meta).1 +E F1(is)2.595 E F2(On)2.595 E F1(,)A F2 -.18(re)2.595 G(adline).18 E F1 +.095(performs the con)2.595 F -.15(ve)-.4 G .095(rsion described abo).15 +F -.15(ve)-.15 G 2.595(;i).15 G 2.595(fi)-2.595 G 2.595(ti)-2.595 G(s) +-2.595 E F2(Off)2.595 E F1(,)A F2 -.18(re)144 588 S(adline).18 E F1(con) +2.5 E -.15(ve)-.4 G(rts).15 E F0(C)2.5 E F1 +(to a meta character by setting the eighth bit \(0200\).)2.5 E F2 +(history\255pr)108 600 Q(eser)-.18 E -.1(ve)-.1 G(\255point \(Off\)).1 E +F1 .553(If set to)144 612 R F2(On)3.052 E F1 3.052(,t)C .552(he history\ + code attempts to place point at the same location on each history line\ + re-)-3.052 F(trie)144 624 Q -.15(ve)-.25 G 2.5(dw).15 G(ith)-2.5 E F2 +(pr)2.5 E -.15(ev)-.18 G(ious-history).15 E F1(or)2.5 E F2(next-history) +2.5 E F1(.)A F2(history\255size \(unset\))108 636 Q F1 .948 +(Set the maximum number of history entries sa)144 648 R -.15(ve)-.2 G +3.448(di).15 G 3.448(nt)-3.448 G .948(he history list.)-3.448 F .949 +(If set to zero, an)5.948 F 3.449(ye)-.15 G(xisting)-3.599 E .483 +(history entries are deleted and no ne)144 660 R 2.983(we)-.25 G .483 +(ntries are sa)-2.983 F -.15(ve)-.2 G 2.983(d. If).15 F .482(set to a v) +2.983 F .482(alue less than zero, the num-)-.25 F .228 +(ber of history entries is not limited.)144 672 R .229(By def)5.229 F +(ault,)-.1 E F2(bash)2.729 E F1 .229 +(sets the the maximum number of history en-)2.729 F 1.192 +(tries to the v)144 684 R 1.192(alue of the)-.25 F F2(HISTSIZE)3.692 E +F1 1.191(shell v)3.691 F 3.691(ariable. Setting)-.25 F F0 +(history\255size)3.691 E F1 1.191(to a non-numeric v)3.691 F(alue)-.25 E +(will set the maximum number of history entries to 500.)144 696 Q +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(49)185.955 E 0 Cg EP +%%Page: 50 50 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(horizontal\255scr)108 84 Q +(oll\255mode \(Off\))-.18 E F1 .848(Setting this v)144 96 R .848 +(ariable to)-.25 F F2(On)3.348 E F1(mak)3.349 E(es)-.1 E F2 -.18(re) +3.349 G(adline).18 E F1 .849(use a single line for display)3.349 F 3.349 +(,s)-.65 G .849(crolling the input hori-)-3.349 F .068(zontally on a si\ +ngle screen line when it becomes longer than the screen width rather th\ +an wrapping)144 108 R(to a ne)144 120 Q 2.5(wl)-.25 G 2.5(ine. This)-2.5 +F(setting is automatically enabled for terminals of height 1.)2.5 E F2 +(input\255meta \(Off\))108 132 Q F1 .371(If set to)144 144 R F2(On)2.871 +E F1(,)A F2 -.18(re)2.871 G(adline).18 E F1 .371(enables eight-bit inpu\ +t \(that is, it does not clear the eighth bit in the charac-)2.871 F +.718(ters it reads\), re)144 156 R -.05(ga)-.15 G .718 +(rdless of what the terminal claims it can support.).05 F .717(The def) +5.717 F .717(ault is)-.1 F F0(Of)3.217 E(f)-.18 E F1 3.217(,b)C(ut) +-3.417 E F2 -.18(re)3.217 G(ad-).18 E(line)144 168 Q F1 1.246 +(sets it to)3.746 F F0(On)3.746 E F1 1.246(if the locale contains chara\ +cters whose encodings may include bytes with the)3.746 F .786 +(eighth bit set.)144 180 R .786(This v)5.786 F .786 +(ariable is dependent on the)-.25 F F2(LC_CTYPE)3.286 E F1 .786 +(locale cate)3.286 F(gory)-.15 E 3.286(,a)-.65 G .786(nd its v)-3.286 F +.786(alue may)-.25 F(change if the locale changes.)144 192 Q(The name)5 +E F2(meta\255\215ag)2.5 E F1(is a synon)2.5 E(ym for)-.15 E F2 +(input\255meta)2.5 E F1(.)A F2(isear)108 204 Q(ch\255terminators \()-.18 +E F1<99>A F2(C\255[C\255j)A F1<9a>A F2(\))A F1 .439(The string of chara\ +cters that should terminate an incremental search without subsequently \ +e)144 216 R -.15(xe)-.15 G(cut-).15 E .935 +(ing the character as a command.)144 228 R .935(If this v)5.935 F .935 +(ariable has not been gi)-.25 F -.15(ve)-.25 G 3.434(nav).15 G .934 +(alue, the characters)-3.684 F F0(ESC)3.434 E F1(and)144 240 Q F2 +(C\255j)2.5 E F1(terminate an incremental search.)2.5 E F2 -.1(ke)108 +252 S(ymap \(emacs\)).1 E F1 1.82(Set the current)144 264 R F2 -.18(re) +4.32 G(adline).18 E F1 -.1(ke)4.32 G 4.32(ymap. The)-.05 F 1.82 +(set of v)4.32 F 1.82(alid k)-.25 F -.15(ey)-.1 G 1.82(map names is).15 +F F0 1.82(emacs, emacs\255standar)4.32 F(d,)-.37 E .042 +(emacs\255meta, emacs\255ctlx, vi, vi\255command)144 276 R F1 2.542(,a)C +(nd)-2.542 E F0(vi\255insert)2.832 E F1(.).68 E F0(vi)5.042 E F1 .042 +(is equi)2.542 F -.25(va)-.25 G .042(lent to).25 F F0(vi\255command) +2.541 E F1(;)A F0(emacs)2.541 E F1 .481(is equi)144 288 R -.25(va)-.25 G +.481(lent to).25 F F0(emacs\255standar)2.981 E(d)-.37 E F1 5.481(.T)C +.481(he def)-5.481 F .481(ault v)-.1 F .481(alue is)-.25 F F0(emacs) +2.981 E F1 2.982(;t)C .482(he v)-2.982 F .482(alue of)-.25 F F2 +(editing\255mode)2.982 E F1 .482(also af-)2.982 F(fects the def)144 300 +Q(ault k)-.1 E -.15(ey)-.1 G(map.).15 E F2 -.1(ke)108 312 S +(yseq\255timeout \(500\)).1 E F1 .235(Speci\214es the duration)144 324 R +F2 -.18(re)2.735 G(adline).18 E F1 .234(will w)2.735 F .234 +(ait for a character when reading an ambiguous k)-.1 F .534 -.15(ey s) +-.1 H(equence).15 E .524(\(one that can form a complete k)144 336 R .824 +-.15(ey s)-.1 H .524(equence using the input read so f).15 F(ar)-.1 E +3.025(,o)-.4 G 3.025(rc)-3.025 G .525(an tak)-3.025 F 3.025(ea)-.1 G +.525(dditional in-)-3.025 F .18(put to complete a longer k)144 348 R .48 +-.15(ey s)-.1 H 2.679(equence\). If).15 F F2 -.18(re)2.679 G(adline).18 +E F1 .179(does not recei)2.679 F .479 -.15(ve a)-.25 H .479 -.15(ny i) +.15 H .179(nput within the timeout,).15 F .15(it uses the shorter b)144 +360 R .15(ut complete k)-.2 F .45 -.15(ey s)-.1 H 2.651(equence. The).15 +F -.25(va)2.651 G .151(lue is speci\214ed in milliseconds, so a v).25 F +.151(alue of)-.25 F 1.35(1000 means that)144 372 R F2 -.18(re)3.85 G +(adline).18 E F1 1.35(will w)3.85 F 1.35 +(ait one second for additional input.)-.1 F 1.35(If this v)6.35 F 1.35 +(ariable is set to a)-.25 F -.25(va)144 384 S 1.283 +(lue less than or equal to zero, or to a non-numeric v).25 F(alue,)-.25 +E F2 -.18(re)3.783 G(adline).18 E F1 -.1(wa)3.783 G 1.283 +(its until another k).1 F 1.583 -.15(ey i)-.1 H(s).15 E +(pressed to decide which k)144 396 Q .3 -.15(ey s)-.1 H +(equence to complete.).15 E F2(mark\255dir)108 408 Q(ectories \(On\)) +-.18 E F1(If set to)144 420 Q F2(On)2.5 E F1 2.5(,c)C +(ompleted directory names ha)-2.5 E .3 -.15(ve a s)-.2 H(lash appended.) +.15 E F2(mark\255modi\214ed\255lines \(Off\))108 432 Q F1(If set to)144 +444 Q F2(On)2.5 E F1(,)A F2 -.18(re)2.5 G(adline).18 E F1 +(displays history lines that ha)2.5 E .3 -.15(ve b)-.2 H +(een modi\214ed with a preceding asterisk \().15 E F2(*)A F1(\).)A F2 +(mark\255symlink)108 456 Q(ed\255dir)-.1 E(ectories \(Off\))-.18 E F1 +.227(If set to)144 468 R F2(On)2.727 E F1 2.727(,c)C .227 +(ompleted names which are symbolic links to directories ha)-2.727 F .527 +-.15(ve a s)-.2 H .226(lash appended, sub-).15 F(ject to the v)144 480 Q +(alue of)-.25 E F2(mark\255dir)2.5 E(ectories)-.18 E F1(.)A F2 +(match\255hidden\255\214les \(On\))108 492 Q F1 .512(This v)144 504 R +.513(ariable, when set to)-.25 F F2(On)3.013 E F1 3.013(,f)C(orces) +-3.013 E F2 -.18(re)3.013 G(adline).18 E F1 .513 +(to match \214les whose names be)3.013 F .513(gin with a \231.)-.15 F +5.513<9a28>-.7 G(hid-)-5.513 E .737 +(den \214les\) when performing \214lename completion.)144 516 R .737 +(If set to)5.737 F F2(Off)3.237 E F1 3.237(,t)C .736 +(he user must include the leading)-3.237 F<992e>144 528 Q 5<9a69>-.7 G +2.5(nt)-5 G(he \214lename to be completed.)-2.5 E F2 +(menu\255complete\255display\255pr)108 540 Q(e\214x \(Off\))-.18 E F1 +1.585(If set to)144 552 R F2(On)4.085 E F1 4.085(,m)C 1.585(enu complet\ +ion displays the common pre\214x of the list of possible completions) +-4.085 F(\(which may be empty\) before c)144 564 Q +(ycling through the list.)-.15 E F2(output\255meta \(Off\))108 576 Q F1 +.27(If set to)144 588 R F2(On)2.77 E F1(,)A F2 -.18(re)2.77 G(adline).18 +E F1 .269(displays characters with the eighth bit set directly rather t\ +han as a meta-pre-)2.77 F<8c78>144 600 Q .437(ed escape sequence.)-.15 F +.437(The def)5.437 F .437(ault is)-.1 F F0(Of)2.937 E(f)-.18 E F1 2.938 +(,b)C(ut)-3.138 E F2 -.18(re)2.938 G(adline).18 E F1 .438(sets it to) +2.938 F F0(On)2.938 E F1 .438(if the locale contains charac-)2.938 F +.393(ters whose encodings may include bytes with the eighth bit set.)144 +612 R .393(This v)5.393 F .393(ariable is dependent on the)-.25 F F2 +(LC_CTYPE)144 624 Q F1(locale cate)2.5 E(gory)-.15 E 2.5(,a)-.65 G +(nd its v)-2.5 E(alue may change if the locale changes.)-.25 E F2 +(page\255completions \(On\))108 636 Q F1 .291(If set to)144 648 R F2(On) +2.791 E F1(,)A F2 -.18(re)2.791 G(adline).18 E F1 .291 +(uses an internal pager resembling)2.791 F F0(mor)3.171 E(e)-.37 E F1 +.292(\(1\) to display a screenful of possible).18 F +(completions at a time.)144 660 Q F2(pr)108 672 Q +(efer\255visible\255bell)-.18 E F1(See)144 684 Q F2(bell\255style)2.5 E +F1(.)A F2(print\255completions\255horizontally \(Off\))108 696 Q F1 .231 +(If set to)144 708 R F2(On)2.731 E F1(,)A F2 -.18(re)2.731 G(adline).18 +E F1 .231(displays completions with matches sorted horizontally in alph\ +abetical order)2.731 F(,)-.4 E(rather than do)144 720 Q(wn the screen.) +-.25 E(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(50)185.955 E 0 +Cg EP +%%Page: 51 51 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF -2.29 -.18(re v)108 84 T +(ert\255all\255at\255newline \(Off\)).08 E F1 .772(If set to)144 96 R F2 +(On)3.272 E F1(,)A F2 -.18(re)3.272 G(adline).18 E F1 .773 +(will undo all changes to history lines before returning when e)3.272 F +-.15(xe)-.15 G(cuting).15 E F2(ac-)3.273 E(cept\255line)144 108 Q F1 +5.663(.B)C 3.163(yd)-5.663 G(ef)-3.163 E .663 +(ault, history lines may be modi\214ed and retain indi)-.1 F .663 +(vidual undo lists across calls)-.25 F(to)144 120 Q F2 -.18(re)2.5 G +(adline).18 E F1(.)A F2(sear)108 132 Q(ch\255ignor)-.18 E +(e\255case \(Off\))-.18 E F1 .102(If set to)144 144 R F2(On)2.603 E F1 +(,)A F2 -.18(re)2.603 G(adline).18 E F1 .103(performs incremental and n\ +on-incremental history list searches in a case\255in-)2.603 F(sensiti) +144 156 Q .3 -.15(ve f)-.25 H(ashion.).05 E F2(sho)108 168 Q +(w\255all\255if\255ambiguous \(Off\))-.1 E F1 .304(This alters the def) +144 180 R .304(ault beha)-.1 F .304(vior of the completion functions.) +-.2 F .304(If set to)5.304 F F2(On)2.804 E F1 2.803(,w)C .303 +(ords which ha)-2.903 F .603 -.15(ve m)-.2 H(ore).15 E 1.264(than one p\ +ossible completion cause the matches to be listed immediately instead o\ +f ringing the)144 192 R(bell.)144 204 Q F2(sho)108 216 Q +(w\255all\255if\255unmodi\214ed \(Off\))-.1 E F1 5.346 +(This alters the def)144 228 R 5.346(ault beha)-.1 F 5.345 +(vior of the completion functions in a f)-.2 F 5.345(ashion similar to) +-.1 F F2(sho)144 240 Q(w\255all\255if\255ambiguous)-.1 E F1 6.69(.I)C +4.19(fs)-6.69 G 1.691(et to)-4.19 F F2(On)4.191 E F1 4.191(,w)C 1.691 +(ords which ha)-4.291 F 1.991 -.15(ve m)-.2 H 1.691 +(ore than one possible completion).15 F 1.04(without an)144 252 R 3.54 +(yp)-.15 G 1.039 +(ossible partial completion \(the possible completions don')-3.54 F +3.539(ts)-.18 G 1.039(hare a common pre\214x\))-3.539 F(cause the match\ +es to be listed immediately instead of ringing the bell.)144 264 Q F2 +(sho)108 276 Q(w\255mode\255in\255pr)-.1 E(ompt \(Off\))-.18 E F1 1.021 +(If set to)144 288 R F2(On)3.521 E F1 3.521(,a)C 1.022 +(dd a string to the be)-3.521 F 1.022 +(ginning of the prompt indicating the editing mode: emacs, vi)-.15 F +(command, or vi insertion.)144 300 Q(The mode strings are user)5 E +(-settable \(e.g.,)-.2 E F0(emacs\255mode\255string)2.5 E F1(\).)A F2 +(skip\255completed\255text \(Off\))108 312 Q F1 .095(If set to)144 324 R +F2(On)2.595 E F1 2.595(,t)C .095(his alters the def)-2.595 F .095 +(ault completion beha)-.1 F .094 +(vior when inserting a single match into the line.)-.2 F(It')144 336 Q +3.393(so)-.55 G .893(nly acti)-3.393 F 1.193 -.15(ve w)-.25 H .893 +(hen performing completion in the middle of a w).15 F 3.394(ord. If)-.1 +F(enabled,)3.394 E F2 -.18(re)3.394 G(adline).18 E F1(does)3.394 E .283 +(not insert characters from the completion that match characters after \ +point in the w)144 348 R .282(ord being com-)-.1 F +(pleted, so portions of the w)144 360 Q(ord follo)-.1 E +(wing the cursor are not duplicated.)-.25 E F2 +(vi\255cmd\255mode\255string \(\(cmd\)\))108 372 Q F1 .517(If the)144 +384 R F0(show\255mode\255in\255pr)3.017 E(ompt)-.45 E F1 -.25(va)3.017 G +.518(riable is enabled, this string is displayed immediately before the) +.25 F .475(last line of the primary prompt when vi editing mode is acti) +144 396 R .775 -.15(ve a)-.25 H .475(nd in command mode.).15 F .475 +(The v)5.475 F(alue)-.25 E .134(is e)144 408 R .134(xpanded lik)-.15 F +2.634(eak)-.1 G .434 -.15(ey b)-2.734 H .134 +(inding, so the standard set of meta- and control- pre\214x).15 F .135 +(es and backslash es-)-.15 F .405(cape sequences is a)144 420 R -.25(va) +-.2 G 2.905(ilable. The).25 F .405(\\1 and \\2 escapes be)2.905 F .404 +(gin and end sequences of non-printing char)-.15 F(-)-.2 E(acters, whic\ +h can be used to embed a terminal control sequence into the mode string\ +.)144 432 Q F2(vi\255ins\255mode\255string \(\(ins\)\))108 444 Q F1 .517 +(If the)144 456 R F0(show\255mode\255in\255pr)3.017 E(ompt)-.45 E F1 +-.25(va)3.017 G .518 +(riable is enabled, this string is displayed immediately before the).25 +F .186(last line of the primary prompt when vi editing mode is acti)144 +468 R .486 -.15(ve a)-.25 H .186(nd in insertion mode.).15 F .186(The v) +5.186 F .186(alue is)-.25 F -.15(ex)144 480 S .715(panded lik).15 F +3.215(eak)-.1 G 1.015 -.15(ey b)-3.315 H .716 +(inding, so the standard set of meta- and control- pre\214x).15 F .716 +(es and backslash es-)-.15 F .405(cape sequences is a)144 492 R -.25(va) +-.2 G 2.905(ilable. The).25 F .405(\\1 and \\2 escapes be)2.905 F .404 +(gin and end sequences of non-printing char)-.15 F(-)-.2 E(acters, whic\ +h can be used to embed a terminal control sequence into the mode string\ +.)144 504 Q F2(visible\255stats \(Off\))108 516 Q F1 .846(If set to)144 +528 R F2(On)3.346 E F1 3.346(,ac)C .846(haracter denoting a \214le') +-3.346 F 3.346(st)-.55 G .846(ype as reported by)-3.346 F F0(stat)3.346 +E F1 .846(\(2\) is appended to the \214lename)B +(when listing possible completions.)144 540 Q F2 +(Readline Conditional Constructs)87 556.8 Q(Readline)108 568.8 Q F1 .494 +(implements a f)2.994 F .494(acility similar in spirit to the condition\ +al compilation features of the C preproces-)-.1 F .774(sor which allo) +108 580.8 R .774(ws k)-.25 F 1.074 -.15(ey b)-.1 H .774(indings and v) +.15 F .775(ariable settings to be performed as the result of tests.)-.25 +F .775(There are four)5.775 F(parser directi)108 592.8 Q -.15(ve)-.25 G +2.5(sa).15 G -.25(va)-2.7 G(ilable.).25 E F2($if)108 609.6 Q F1(The)144 +609.6 Q F2($if)2.963 E F1 .463(construct allo)2.963 F .462(ws bindings \ +to be made based on the editing mode, the terminal being used,)-.25 F +.787(or the application using)144 621.6 R F2 -.18(re)3.287 G(adline).18 +E F1 5.787(.T)C .787(he te)-5.787 F .787(xt of the test, after an)-.15 F +3.288(yc)-.15 G .788(omparison operator)-3.288 F 3.288(,e)-.4 G .788 +(xtends to)-3.438 F(the end of the line; unless otherwise noted, no cha\ +racters are required to isolate it.)144 633.6 Q F2(mode)144 650.4 Q F1 +(The)180 650.4 Q F2(mode=)3.558 E F1 1.058(form of the)3.558 F F2($if) +3.558 E F1(directi)3.558 E 1.358 -.15(ve i)-.25 H 3.558(su).15 G 1.058 +(sed to test whether)-3.558 F F2 -.18(re)3.557 G(adline).18 E F1 1.057 +(is in emacs or vi)3.557 F 3.065(mode. This)180 662.4 R .565 +(may be used in conjunction with the)3.065 F F2 .565(set k)3.065 F +(eymap)-.1 E F1 .565(command, for instance, to)3.065 F .518 +(set bindings in the)180 674.4 R F0(emacs\255standar)3.018 E(d)-.37 E F1 +(and)3.018 E F0(emacs\255ctlx)3.018 E F1 -.1(ke)3.017 G .517 +(ymaps only if)-.05 F F2 -.18(re)3.017 G(adline).18 E F1 .517 +(is starting)3.017 F(out in emacs mode.)180 686.4 Q F2(term)144 703.2 Q +F1(The)180 703.2 Q F2(term=)3.196 E F1 .696 +(form may be used to include terminal-speci\214c k)3.196 F .996 -.15 +(ey b)-.1 H .697(indings, perhaps to bind).15 F .654(the k)180 715.2 R +.954 -.15(ey s)-.1 H .654(equences output by the terminal').15 F 3.154 +(sf)-.55 G .654(unction k)-3.154 F -.15(ey)-.1 G 3.154(s. The).15 F -.1 +(wo)3.154 G .654(rd on the right side of).1 F(the)180 727.2 Q F2(=)3.231 +E F1 .731(is tested ag)3.231 F .732(ainst both the full name of the ter\ +minal and the portion of the terminal)-.05 F(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(51)185.955 E 0 Cg EP +%%Page: 52 52 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .16(name before the \214rst)180 84 R/F2 10 +/Times-Bold@0 SF2.66 E F1 5.159(.T)C .159(his allo)-5.159 F(ws)-.25 +E F0(xterm)3.429 E F1 .159(to match both)2.979 F F0(xterm)3.429 E F1 +(and)2.979 E F0(xterm\255256color)3.429 E F1 2.659(,f).73 G(or)-2.659 E +(instance.)180 96 Q F2 -.1(ve)144 112.8 S(rsion).1 E F1(The)180 124.8 Q +F2 -.1(ve)2.89 G(rsion).1 E F1 .391 +(test may be used to perform comparisons ag)2.89 F .391 +(ainst speci\214c)-.05 F F2 -.18(re)2.891 G(adline).18 E F1 -.15(ve) +2.891 G(rsions.).15 E(The)180 136.8 Q F2 -.1(ve)2.571 G(rsion).1 E F1 +-.15(ex)2.571 G .071(pands to the current).15 F F2 -.18(re)2.571 G +(adline).18 E F1 -.15(ve)2.571 G 2.571(rsion. The).15 F .07 +(set of comparison operators in-)2.571 F(cludes)180 148.8 Q F2(=)3.063 E +F1 3.063(,\()C(and)-3.063 E F2(==)3.063 E F1(\),)A F2(!=)3.063 E F1(,)A +F2(<=)3.063 E F1(,)A F2(>=)3.063 E F1(,)A F2(<)3.063 E F1 3.063(,a)C(nd) +-3.063 E F2(>)3.064 E F1 5.564(.T)C .564(he v)-5.564 F .564 +(ersion number supplied on the right side)-.15 F .318 +(of the operator consists of a major v)180 160.8 R .318(ersion number) +-.15 F 2.818(,a)-.4 G 2.818(no)-2.818 G .318 +(ptional decimal point, and an op-)-2.818 F .46(tional minor v)180 172.8 +R .46(ersion \(e.g.,)-.15 F F2(7.1)2.96 E F1 2.96(\). If)B .461 +(the minor v)2.96 F .461(ersion is omitted, it def)-.15 F .461(aults to) +-.1 F F2(0)2.961 E F1 5.461(.T)C .461(he op-)-5.461 F .83 +(erator may be separated from the string)180 184.8 R F2 -.1(ve)3.329 G +(rsion).1 E F1 .829(and from the v)3.329 F .829(ersion number ar)-.15 F +(gument)-.18 E(by whitespace.)180 196.8 Q F0(application)144.33 213.6 Q +F1(The)180 225.6 Q F0(application)3.226 E F1 .726 +(construct is used to include application-speci\214c settings.)3.226 F +.726(Each program)5.726 F .432(using the)180 237.6 R F2 -.18(re)2.932 G +(adline).18 E F1 .432(library sets the)2.932 F F0 .431(application name) +2.932 F F1 2.931(,a)C .431(nd an initialization \214le can test for) +-2.931 F 2.535(ap)180 249.6 S .035(articular v)-2.535 F 2.535 +(alue. This)-.25 F .036(could be used to bind k)2.535 F .336 -.15(ey s) +-.1 H .036(equences to functions useful for a spe-).15 F .397 +(ci\214c program.)180 261.6 R -.15(Fo)5.397 G 2.896(ri).15 G .396 +(nstance, the follo)-2.896 F .396(wing command adds a k)-.25 F .696 -.15 +(ey s)-.1 H .396(equence that quotes the).15 F(current or pre)180 273.6 +Q(vious w)-.25 E(ord in)-.1 E F2(bash)2.5 E F1(:)A/F3 10/Courier-Bold@0 +SF($if)180 290.4 Q/F4 10/Courier@0 SF(Bash)6 E 6(#Q)180 302.4 S +(uote the current or previous word)-6 E("\\C-xq": "\\eb\\"\\ef\\"")180 +314.4 Q F3($endif)180 326.4 Q F0(variable)144.29 343.2 Q F1(The)180 +355.2 Q F0(variable)3.539 E F1 1.039(construct pro)3.539 F 1.039 +(vides simple equality tests for)-.15 F F2 -.18(re)3.539 G(adline).18 E +F1 -.25(va)3.539 G 1.039(riables and v).25 F(alues.)-.25 E .08 +(The permitted comparison operators are)180 367.2 R F0(=)2.579 E F1(,)A +F0(==)2.579 E F1 2.579(,a)C(nd)-2.579 E F0(!=)2.579 E F1 5.079(.T)C .079 +(he v)-5.079 F .079(ariable name must be sepa-)-.25 F .98(rated from th\ +e comparison operator by whitespace; the operator may be separated from) +180 379.2 R 1.588(the v)180 391.2 R 1.587 +(alue on the right hand side by whitespace.)-.25 F 1.587 +(String and boolean v)6.587 F 1.587(ariables may be)-.25 F 2.5 +(tested. Boolean)180 403.2 R -.25(va)2.5 G(riables must be tested ag).25 +E(ainst the v)-.05 E(alues)-.25 E F0(on)2.5 E F1(and)2.5 E F0(of)2.5 E +(f)-.18 E F1(.)A F2($else)108 420 Q F1(Commands in this branch of the) +144 420 Q F2($if)2.5 E F1(directi)2.5 E .3 -.15(ve a)-.25 H(re e).15 E +-.15(xe)-.15 G(cuted if the test f).15 E(ails.)-.1 E F2($endif)108 436.8 +Q F1(This command, as seen in the pre)144 436.8 Q(vious e)-.25 E +(xample, terminates an)-.15 E F2($if)2.5 E F1(command.)2.5 E F2 +($include)108 453.6 Q F1 .41(This directi)144 465.6 R .71 -.15(ve t)-.25 +H(ak).15 E .41(es a single \214lename as an ar)-.1 F .411 +(gument and reads commands and k)-.18 F .711 -.15(ey b)-.1 H .411 +(indings from).15 F(that \214le.)144 477.6 Q -.15(Fo)5 G 2.5(re).15 G +(xample, the follo)-2.65 E(wing directi)-.25 E .3 -.15(ve w)-.25 H +(ould read).05 E F0(/etc/inputr)4.166 E(c)-.37 E F1(:)1.666 E F2 +($include)144 494.4 Q F0(/etc/inputr)5.833 E(c)-.37 E F2(Sear)87 511.2 Q +(ching)-.18 E(Readline)108 523.2 Q F1(pro)3.163 E .663 +(vides commands for searching through the command history \(see)-.15 F +/F5 9/Times-Bold@0 SF(HIST)3.163 E(OR)-.162 E(Y)-.315 E F1(belo)2.913 E +.663(w\) for lines)-.25 F(containing a speci\214ed string.)108 535.2 Q +(There are tw)5 E 2.5(os)-.1 G(earch modes:)-2.5 E F0(incr)2.51 E +(emental)-.37 E F1(and)3.01 E F0(non-incr)2.86 E(emental)-.37 E F1(.).51 +E .697(Incremental searches be)108 552 R .697 +(gin before the user has \214nished typing the search string.)-.15 F +.698(As each character of the)5.698 F .979(search string is typed,)108 +564 R F2 -.18(re)3.479 G(adline).18 E F1 .978(displays the ne)3.478 F +.978(xt entry from the history matching the string typed so f)-.15 F(ar) +-.1 E(.)-.55 E .528(An incremental search requires only as man)108 576 R +3.029(yc)-.15 G .529 +(haracters as needed to \214nd the desired history entry)-3.029 F 5.529 +(.W)-.65 G(hen)-5.529 E .517(using emacs editing mode, type)108 588 R F2 +(C\255r)3.017 E F1 .517(to search backw)3.017 F .517 +(ard in the history for a particular string.)-.1 F -.8(Ty)5.517 G(ping) +.8 E F2(C\255s)3.017 E F1 .452(searches forw)108 600 R .452 +(ard through the history)-.1 F 5.452(.T)-.65 G .452 +(he characters present in the v)-5.452 F .452(alue of the)-.25 F F2 +(isear)2.953 E(ch-terminators)-.18 E F1 -.25(va)2.953 G(ri-).25 E .747 +(able are used to terminate an incremental search.)108 612 R .747 +(If that v)5.747 F .746(ariable has not been assigned a v)-.25 F(alue,) +-.25 E F0(ESC)3.246 E F1(and)3.246 E F2(C\255j)108 624 Q F1 1.776 +(terminate an incremental search.)4.276 F F2(C\255g)6.776 E F1 1.777 +(aborts an incremental search and restores the original line.)4.276 F(W\ +hen the search is terminated, the history entry containing the search s\ +tring becomes the current line.)108 636 Q 2.052 -.8(To \214)108 652.8 T +.452(nd other matching entries in the history list, type).8 F F2(C\255r) +2.952 E F1(or)2.952 E F2(C\255s)2.952 E F1 .451(as appropriate.)2.952 F +.451(This searches backw)5.451 F(ard)-.1 E .134(or forw)108 664.8 R .134 +(ard in the history for the ne)-.1 F .135 +(xt entry matching the search string typed so f)-.15 F(ar)-.1 E 5.135 +(.A)-.55 G .435 -.15(ny o)-5.135 H .135(ther k).15 F .435 -.15(ey s)-.1 +H(equence).15 E .716(bound to a)108 676.8 R F2 -.18(re)3.216 G(adline) +.18 E F1 .715(command terminates the search and e)3.216 F -.15(xe)-.15 G +.715(cutes that command.).15 F -.15(Fo)5.715 G 3.215(ri).15 G .715 +(nstance, a ne)-3.215 F(wline)-.25 E .601 +(terminates the search and accepts the line, thereby e)108 688.8 R -.15 +(xe)-.15 G .601(cuting the command from the history list.).15 F 3.102 +(Am)5.602 G -.15(ove)-3.102 G(-).15 E +(ment command will terminate the search, mak)108 700.8 Q 2.5(et)-.1 G +(he last line found the current line, and be)-2.5 E(gin editing.)-.15 E +F2(Readline)108 717.6 Q F1 1.476 +(remembers the last incremental search string.)3.976 F 1.476(If tw)6.476 +F(o)-.1 E F2(C\255r)3.976 E F1 3.976(sa)C 1.475(re typed without an) +-3.976 F 3.975(yi)-.15 G(nterv)-3.975 E(ening)-.15 E +(characters de\214ning a ne)108 729.6 Q 2.5(ws)-.25 G(earch string,)-2.5 +E F2 -.18(re)2.5 G(adline).18 E F1(uses an)2.5 E 2.5(yr)-.15 G +(emembered search string.)-2.5 E(GNU Bash 5.3)72 768 Q(2024 December 12) +136.795 E(52)185.955 E 0 Cg EP +%%Page: 53 53 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .012(Non-incremental searches read the entire sear\ +ch string before starting to search for matching history entries.)108 84 +R(The search string may be typed by the user or be part of the contents\ + of the current line.)108 96 Q/F2 10/Times-Bold@0 SF +(Readline Command Names)87 112.8 Q F1 1.392(The follo)108 124.8 R 1.391 +(wing is a list of the names of the commands and the def)-.25 F 1.391 +(ault k)-.1 F 1.691 -.15(ey s)-.1 H 1.391(equences to which the).15 F +3.891(ya)-.15 G(re)-3.891 E 2.5(bound. Command)108 136.8 R +(names without an accompan)2.5 E(ying k)-.15 E .3 -.15(ey s)-.1 H +(equence are unbound by def).15 E(ault.)-.1 E .054(In the follo)108 +153.6 R .054(wing descriptions,)-.25 F F0(point)2.554 E F1 .055 +(refers to the current cursor position, and)2.554 F F0(mark)2.555 E F1 +.055(refers to a cursor position)2.555 F(sa)108 165.6 Q -.15(ve)-.2 G +2.679(db).15 G 2.679(yt)-2.679 G(he)-2.679 E F2(set\255mark)2.679 E F1 +2.679(command. The)2.679 F(te)2.679 E .178 +(xt between the point and mark is referred to as the)-.15 F F0 -.37(re) +2.678 G(gion)-.03 E F1(.)A F2(Read-)5.178 E(line)108 177.6 Q F1 .381 +(has the concept of an)2.881 F F0 .381(active r)2.881 F -.4(eg)-.37 G +(ion).4 E F1 2.881(:w)C .381(hen the re)-2.881 F .381(gion is acti)-.15 +F -.15(ve)-.25 G(,).15 E F2 -.18(re)2.881 G(adline).18 E F1 .382 +(redisplay highlights the re)2.881 F(gion)-.15 E 1.027(using the v)108 +189.6 R 1.027(alue of the)-.25 F F2(acti)3.527 E -.1(ve)-.1 G.1 E +(egion\255start\255color)-.18 E F1 -.25(va)3.527 G 3.527(riable. The).25 +F F2(enable\255acti)3.527 E -.1(ve)-.1 G.1 E 1.027(egion r)-.18 F +(eadline)-.18 E F1 -.25(va)3.527 G(riable).25 E(turns this on and of)108 +201.6 Q 2.5(f. Se)-.25 F -.15(ve)-.25 G(ral commands set the re).15 E +(gion to acti)-.15 E -.15(ve)-.25 G 2.5(;t).15 G(hose are noted belo) +-2.5 E -.65(w.)-.25 G F2(Commands f)87 218.4 Q(or Mo)-.25 E(ving)-.1 E +(beginning\255of\255line \(C\255a\))108 230.4 Q F1(Mo)144 242.4 Q .3 +-.15(ve t)-.15 H 2.5(ot).15 G(he start of the current line.)-2.5 E +(This may also be bound to the Home k)5 E .3 -.15(ey o)-.1 H 2.5(ns).15 +G(ome k)-2.5 E -.15(ey)-.1 G(boards.).15 E F2 +(end\255of\255line \(C\255e\))108 254.4 Q F1(Mo)144 266.4 Q .3 -.15 +(ve t)-.15 H 2.5(ot).15 G(he end of the line.)-2.5 E +(This may also be bound to the End k)5 E .3 -.15(ey o)-.1 H 2.5(ns).15 G +(ome k)-2.5 E -.15(ey)-.1 G(boards.).15 E F2 -.25(fo)108 278.4 S +(rward\255char \(C\255f\)).25 E F1(Mo)144 290.4 Q .3 -.15(ve f)-.15 H +(orw).15 E(ard a character)-.1 E 5(.T)-.55 G +(his may also be bound to the right arro)-5 E 2.5(wk)-.25 G .3 -.15 +(ey o)-2.6 H 2.5(ns).15 G(ome k)-2.5 E -.15(ey)-.1 G(boards.).15 E F2 +(backward\255char \(C\255b\))108 302.4 Q F1(Mo)144 314.4 Q .3 -.15(ve b) +-.15 H(ack a character).15 E 5(.T)-.55 G +(his may also be bound to the left arro)-5 E 2.5(wk)-.25 G .3 -.15(ey o) +-2.6 H 2.5(ns).15 G(ome k)-2.5 E -.15(ey)-.1 G(boards.).15 E F2 -.25(fo) +108 326.4 S(rward\255w).25 E(ord \(M\255f\))-.1 E F1(Mo)144 338.4 Q .822 +-.15(ve f)-.15 H(orw).15 E .522(ard to the end of the ne)-.1 F .523 +(xt w)-.15 F 3.023(ord. W)-.1 F .523 +(ords are composed of alphanumeric characters \(let-)-.8 F +(ters and digits\).)144 350.4 Q F2(backward\255w)108 362.4 Q +(ord \(M\255b\))-.1 E F1(Mo)144 374.4 Q 1.71 -.15(ve b)-.15 H 1.41 +(ack to the start of the current or pre).15 F 1.41(vious w)-.25 F 3.91 +(ord. W)-.1 F 1.41(ords are composed of alphanumeric)-.8 F +(characters \(letters and digits\).)144 386.4 Q F2(shell\255f)108 398.4 +Q(orward\255w)-.25 E(ord)-.1 E F1(Mo)144 410.4 Q .784 -.15(ve f)-.15 H +(orw).15 E .484(ard to the end of the ne)-.1 F .484(xt w)-.15 F 2.984 +(ord. W)-.1 F .484(ords are delimited by non-quoted shell metacharac-) +-.8 F(ters.)144 422.4 Q F2(shell\255backward\255w)108 434.4 Q(ord)-.1 E +F1(Mo)144 446.4 Q .909 -.15(ve b)-.15 H .609 +(ack to the start of the current or pre).15 F .609(vious w)-.25 F 3.109 +(ord. W)-.1 F .608(ords are delimited by non-quoted shell)-.8 F +(metacharacters.)144 458.4 Q F2(pr)108 470.4 Q -.15(ev)-.18 G +(ious\255scr).15 E(een\255line)-.18 E F1 .89(Attempt to mo)144 482.4 R +1.19 -.15(ve p)-.15 H .89(oint to the same ph).15 F .891 +(ysical screen column on the pre)-.05 F .891(vious ph)-.25 F .891 +(ysical screen line.)-.05 F .911(This will not ha)144 494.4 R 1.211 -.15 +(ve t)-.2 H .911(he desired ef).15 F .911(fect if the current)-.25 F F2 +-.18(re)3.411 G(adline).18 E F1 .91(line does not tak)3.41 F 3.41(eu)-.1 +G 3.41(pm)-3.41 G .91(ore than one)-3.41 F(ph)144 506.4 Q(ysical line o\ +r if point is not greater than the length of the prompt plus the screen\ + width.)-.05 E F2(next\255scr)108 518.4 Q(een\255line)-.18 E F1 .481 +(Attempt to mo)144 530.4 R .781 -.15(ve p)-.15 H .481 +(oint to the same ph).15 F .481(ysical screen column on the ne)-.05 F +.482(xt ph)-.15 F .482(ysical screen line.)-.05 F(This)5.482 E .05 +(will not ha)144 542.4 R .35 -.15(ve t)-.2 H .05(he desired ef).15 F .05 +(fect if the current)-.25 F F2 -.18(re)2.549 G(adline).18 E F1 .049 +(line does not tak)2.549 F 2.549(eu)-.1 G 2.549(pm)-2.549 G .049 +(ore than one ph)-2.549 F(ysical)-.05 E .033 +(line or if the length of the current)144 554.4 R F2 -.18(re)2.533 G +(adline).18 E F1 .034 +(line is not greater than the length of the prompt plus the)2.533 F +(screen width.)144 566.4 Q F2(clear\255display \(M\255C\255l\))108 578.4 +Q F1 1.499(Clear the screen and, if possible, the terminal')144 590.4 R +3.999(ss)-.55 G 1.498(crollback b)-3.999 F(uf)-.2 E(fer)-.25 E 3.998(,t) +-.4 G 1.498(hen redra)-3.998 F 3.998(wt)-.15 G 1.498(he current line,) +-3.998 F(lea)144 602.4 Q +(ving the current line at the top of the screen.)-.2 E F2(clear\255scr) +108 614.4 Q(een \(C\255l\))-.18 E F1 1.36(Clear the screen, then redra) +144 626.4 R 3.86(wt)-.15 G 1.36(he current line, lea)-3.86 F 1.36 +(ving the current line at the top of the screen.)-.2 F -.4(Wi)144 638.4 +S(th an ar).4 E +(gument, refresh the current line without clearing the screen.)-.18 E F2 +-.18(re)108 650.4 S(draw\255curr).18 E(ent\255line)-.18 E F1 +(Refresh the current line.)144 662.4 Q F2(Commands f)87 679.2 Q +(or Manipulating the History)-.25 E(accept\255line \(Newline, Retur)108 +691.2 Q(n\))-.15 E F1 .159(Accept the line re)144 703.2 R -.05(ga)-.15 G +.159(rdless of where the cursor is.).05 F .158 +(If this line is non-empty)5.158 F 2.658(,a)-.65 G .158 +(dd it to the history list)-2.658 F .337(according to the state of the) +144 715.2 R/F3 9/Times-Bold@0 SF(HISTCONTR)2.838 E(OL)-.27 E F1(and) +2.588 E F2(HISTIGNORE)2.838 E F1 -.25(va)2.838 G 2.838(riables. If).25 F +.338(the line is a modi-)2.838 F +(\214ed history line, restore the history line to its original state.) +144 727.2 Q(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(53)185.955 +E 0 Cg EP +%%Page: 54 54 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(pr)108 84 Q -.15(ev)-.18 G +(ious\255history \(C\255p\)).15 E F1 1.669(Fetch the pre)144 96 R 1.668 +(vious command from the history list, mo)-.25 F 1.668 +(ving back in the list.)-.15 F 1.668(This may also be)6.668 F +(bound to the up arro)144 108 Q 2.5(wk)-.25 G .3 -.15(ey o)-2.6 H 2.5 +(ns).15 G(ome k)-2.5 E -.15(ey)-.1 G(boards.).15 E F2 +(next\255history \(C\255n\))108 120 Q F1 .214(Fetch the ne)144 132 R +.214(xt command from the history list, mo)-.15 F .214(ving forw)-.15 F +.214(ard in the list.)-.1 F .214(This may also be bound)5.214 F +(to the do)144 144 Q(wn arro)-.25 E 2.5(wk)-.25 G .3 -.15(ey o)-2.6 H +2.5(ns).15 G(ome k)-2.5 E -.15(ey)-.1 G(boards.).15 E F2 +(beginning\255of\255history \(M\255<\))108 156 Q F1(Mo)144 168 Q .3 -.15 +(ve t)-.15 H 2.5(ot).15 G(he \214rst line in the history)-2.5 E(.)-.65 E +F2(end\255of\255history \(M\255>\))108 180 Q F1(Mo)144 192 Q .3 -.15 +(ve t)-.15 H 2.5(ot).15 G(he end of the input history)-2.5 E 2.5(,i)-.65 +G(.e., the line currently being entered.)-2.5 E F2 +(operate\255and\255get\255next \(C\255o\))108 204 Q F1 .24 +(Accept the current line for e)144 216 R -.15(xe)-.15 G .24 +(cution as if a ne).15 F .24(wline had been entered, and fetch the ne) +-.25 F .24(xt line rela-)-.15 F(ti)144 228 Q .61 -.15(ve t)-.25 H 2.81 +(ot).15 G .31(he current line from the history for editing.)-2.81 F 2.81 +(An)5.31 G .31(umeric ar)-2.81 F .31 +(gument, if supplied, speci\214es the)-.18 F +(history entry to use instead of the current line.)144 240 Q F2 +(fetch\255history)108 252 Q F1 -.4(Wi)144 264 S .257(th a numeric ar).4 +F .257(gument, fetch that entry from the history list and mak)-.18 F +2.756(ei)-.1 G 2.756(tt)-2.756 G .256(he current line.)-2.756 F -.4(Wi) +5.256 G(th-).4 E(out an ar)144 276 Q(gument, mo)-.18 E .3 -.15(ve b)-.15 +H(ack to the \214rst entry in the history list.).15 E F2 -2.29 -.18 +(re v)108 288 T(erse\255sear).08 E(ch\255history \(C\255r\))-.18 E F1 +1.312(Search backw)144 300 R 1.312 +(ard starting at the current line and mo)-.1 F 1.312 +(ving \231up\232 through the history as necessary)-.15 F(.)-.65 E .29 +(This is an incremental search.)144 312 R .29(This command sets the re) +5.29 F .29(gion to the matched te)-.15 F .29(xt and acti)-.15 F -.25(va) +-.25 G .29(tes the).25 F(re)144 324 Q(gion.)-.15 E F2 -.25(fo)108 336 S +(rward\255sear).25 E(ch\255history \(C\255s\))-.18 E F1 .972 +(Search forw)144 348 R .973(ard starting at the current line and mo)-.1 +F .973(ving \231do)-.15 F .973(wn\232 through the history as necessary) +-.25 F(.)-.65 E .29(This is an incremental search.)144 360 R .29 +(This command sets the re)5.29 F .29(gion to the matched te)-.15 F .29 +(xt and acti)-.15 F -.25(va)-.25 G .29(tes the).25 F(re)144 372 Q(gion.) +-.15 E F2(non\255incr)108 384 Q(emental\255r)-.18 E -2.3 -.15(ev e)-.18 +H(rse\255sear).15 E(ch\255history \(M\255p\))-.18 E F1 .164 +(Search backw)144 396 R .164(ard through the history starting at the cu\ +rrent line using a non-incremental search for)-.1 F 2.5(as)144 408 S +(tring supplied by the user)-2.5 E 5(.T)-.55 G +(he search string may match an)-5 E(ywhere in a history line.)-.15 E F2 +(non\255incr)108 420 Q(emental\255f)-.18 E(orward\255sear)-.25 E +(ch\255history \(M\255n\))-.18 E F1 1.354(Search forw)144 432 R 1.354(a\ +rd through the history using a non-incremental search for a string supp\ +lied by the)-.1 F(user)144 444 Q 5(.T)-.55 G +(he search string may match an)-5 E(ywhere in a history line.)-.15 E F2 +(history\255sear)108 456 Q(ch\255backward)-.18 E F1 .95(Search backw)144 +468 R .951(ard through the history for the string of characters between\ + the start of the current)-.1 F .34(line and the point.)144 480 R .34 +(The search string must match at the be)5.34 F .34 +(ginning of a history line.)-.15 F .34(This is a non-)5.34 F +(incremental search.)144 492 Q(This may be bound to the P)5 E(age Up k) +-.15 E .3 -.15(ey o)-.1 H 2.5(ns).15 G(ome k)-2.5 E -.15(ey)-.1 G +(boards.).15 E F2(history\255sear)108 504 Q(ch\255f)-.18 E(orward)-.25 E +F1 .248(Search forw)144 516 R .249(ard through the history for the stri\ +ng of characters between the start of the current line)-.1 F .036 +(and the point.)144 528 R .036(The search string must match at the be) +5.036 F .035(ginning of a history line.)-.15 F .035 +(This is a non-incre-)5.035 F(mental search.)144 540 Q +(This may be bound to the P)5 E(age Do)-.15 E(wn k)-.25 E .3 -.15(ey o) +-.1 H 2.5(ns).15 G(ome k)-2.5 E -.15(ey)-.1 G(boards.).15 E F2 +(history\255substring\255sear)108 552 Q(ch\255backward)-.18 E F1 .95 +(Search backw)144 564 R .951(ard through the history for the string of \ +characters between the start of the current)-.1 F .676 +(line and the point.)144 576 R .676(The search string may match an)5.676 +F .676(ywhere in a history line.)-.15 F .675(This is a non-incre-)5.676 +F(mental search.)144 588 Q F2(history\255substring\255sear)108 600 Q +(ch\255f)-.18 E(orward)-.25 E F1 .248(Search forw)144 612 R .249(ard th\ +rough the history for the string of characters between the start of the\ + current line)-.1 F .319(and the point.)144 624 R .319 +(The search string may match an)5.319 F .319(ywhere in a history line.) +-.15 F .318(This is a non-incremental)5.318 F(search.)144 636 Q F2 +(yank\255nth\255ar)108 648 Q 2.5(g\()-.1 G<4dad43ad7929>-2.5 E F1 .622 +(Insert the \214rst ar)144 660 R .622(gument to the pre)-.18 F .622 +(vious command \(usually the second w)-.25 F .622(ord on the pre)-.1 F +.622(vious line\))-.25 F .773(at point.)144 672 R -.4(Wi)5.773 G .773 +(th an ar).4 F(gument)-.18 E F0(n)3.633 E F1 3.273(,i).24 G .773 +(nsert the)-3.273 F F0(n)3.273 E F1 .773(th w)B .773(ord from the pre) +-.1 F .773(vious command \(the w)-.25 F .773(ords in the)-.1 F(pre)144 +684 Q .291(vious command be)-.25 F .291(gin with w)-.15 F .291(ord 0\).) +-.1 F 2.791(An)5.291 G -2.25 -.15(eg a)-2.791 H(ti).15 E .591 -.15(ve a) +-.25 H -.18(rg).15 G .291(ument inserts the).18 F F0(n)2.791 E F1 .291 +(th w)B .292(ord from the end of)-.1 F .699(the pre)144 696 R .699 +(vious command.)-.25 F .699(Once the ar)5.699 F(gument)-.18 E F0(n)3.199 +E F1 .698(is computed, this uses the history e)3.199 F .698(xpansion f) +-.15 F(acili-)-.1 E(ties to e)144 708 Q(xtract the)-.15 E F0(n)2.5 E F1 +(th w)A(ord, as if the \231!)-.1 E F0(n)A F1 2.5<9a68>C(istory e)-2.5 E +(xpansion had been speci\214ed.)-.15 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(54)185.955 E 0 Cg EP +%%Page: 55 55 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(yank\255last\255ar)108 84 Q +2.5(g\()-.1 G -1.667(M\255. ,)-2.5 F -1.667(M\255_ \))2.5 F F1 1.307 +(Insert the last ar)144 96 R 1.307(gument to the pre)-.18 F 1.307 +(vious command \(the last w)-.25 F 1.308(ord of the pre)-.1 F 1.308 +(vious history entry\).)-.25 F -.4(Wi)144 108 S .204(th a numeric ar).4 +F .204(gument, beha)-.18 F .504 -.15(ve ex)-.2 H .204(actly lik).15 F(e) +-.1 E F2(yank\255nth\255ar)2.704 E(g)-.1 E F1 5.203(.S)C(uccessi)-5.203 +E .503 -.15(ve c)-.25 H .203(alls to).15 F F2(yank\255last\255ar)2.703 E +(g)-.1 E F1(mo)144 120 Q .806 -.15(ve b)-.15 H .507 +(ack through the history list, inserting the last w).15 F .507 +(ord \(or the w)-.1 F .507(ord speci\214ed by the ar)-.1 F(gument)-.18 E +.416(to the \214rst call\) of each line in turn.)144 132 R(An)5.416 E +2.916(yn)-.15 G .416(umeric ar)-2.916 F .416 +(gument supplied to these successi)-.18 F .715 -.15(ve c)-.25 H .415 +(alls de-).15 F 1.217(termines the direction to mo)144 144 R 1.518 -.15 +(ve t)-.15 H 1.218(hrough the history).15 F 6.218(.A)-.65 G(ne)-2.5 E +-.05(ga)-.15 G(ti).05 E 1.518 -.15(ve a)-.25 H -.18(rg).15 G 1.218 +(ument switches the direction).18 F .419 +(through the history \(back or forw)144 156 R 2.919(ard\). This)-.1 F +.419(uses the history e)2.919 F .418(xpansion f)-.15 F .418 +(acilities to e)-.1 F .418(xtract the last)-.15 F -.1(wo)144 168 S +(rd, as if the \231!$\232 history e).1 E(xpansion had been speci\214ed.) +-.15 E F2(shell\255expand\255line \(M\255C\255e\))108 180 Q F1 .367 +(Expand the line by performing shell w)144 192 R .368(ord e)-.1 F 2.868 +(xpansions. This)-.15 F .368(performs alias and history e)2.868 F +(xpansion,)-.15 E F2($)144 204 Q F1<08>A F0(string)A F1 3.358<0861>C(nd) +-3.358 E F2($)3.358 E F1(")A F0(string)A F1 3.358("q)C .857 +(uoting, tilde e)-3.358 F .857(xpansion, parameter and v)-.15 F .857 +(ariable e)-.25 F .857(xpansion, arithmetic e)-.15 F(x-)-.15 E .548 +(pansion, command and process substitution, w)144 216 R .548 +(ord splitting, and quote remo)-.1 F -.25(va)-.15 G 3.049(l. An).25 F +-.15(ex)3.049 G .549(plicit ar).15 F(gu-)-.18 E .61 +(ment suppresses command and process substitution.)144 228 R(See)5.61 E +/F3 9/Times-Bold@0 SF(HIST)3.109 E(OR)-.162 E 2.859(YE)-.315 G(XP)-2.859 +E(ANSION)-.666 E F1(belo)2.859 E 3.109(wf)-.25 G .609(or a de-)-3.109 F +(scription of history e)144 240 Q(xpansion.)-.15 E F2 +(history\255expand\255line \(M\255\000\))108 252 Q F1 .938 +(Perform history e)144 264 R .939(xpansion on the current line.)-.15 F +(See)5.939 E F3(HIST)3.439 E(OR)-.162 E 3.189(YE)-.315 G(XP)-3.189 E +(ANSION)-.666 E F1(belo)3.189 E 3.439(wf)-.25 G .939(or a descrip-) +-3.439 F(tion of history e)144 276 Q(xpansion.)-.15 E F2(magic\255space) +108 288 Q F1 .438(Perform history e)144 300 R .438 +(xpansion on the current line and insert a space.)-.15 F(See)5.437 E F3 +(HIST)2.937 E(OR)-.162 E 2.687(YE)-.315 G(XP)-2.687 E(ANSION)-.666 E F1 +(be-)2.687 E(lo)144 312 Q 2.5(wf)-.25 G(or a description of history e) +-2.5 E(xpansion.)-.15 E F2(alias\255expand\255line)108 324 Q F1 .394 +(Perform alias e)144 336 R .394(xpansion on the current line.)-.15 F +(See)5.395 E F3(ALIASES)2.895 E F1(abo)2.645 E .695 -.15(ve f)-.15 H +.395(or a description of alias e).15 F(xpan-)-.15 E(sion.)144 348 Q F2 +(history\255and\255alias\255expand\255line)108 360 Q F1 +(Perform history and alias e)144 372 Q(xpansion on the current line.) +-.15 E F2(insert\255last\255ar)108 384 Q(gument \(M\255.)-.1 E 2.5(,M) +.833 G -1.667(\255_ \))-2.5 F F1 2.5(As)144 396 S(ynon)-2.5 E(ym for) +-.15 E F2(yank\255last\255ar)2.5 E(g)-.1 E F1(.)A F2 +(edit\255and\255execute\255command \(C\255x C\255e\))108 408 Q F1(In)144 +420 Q -.2(vo)-.4 G .347 -.1(ke a).2 H 2.647(ne).1 G .146 +(ditor on the current command line, and e)-2.647 F -.15(xe)-.15 G .146 +(cute the result as shell commands.).15 F F2(Bash)5.146 E F1(at-)2.646 E +(tempts to in)144 432 Q -.2(vo)-.4 G -.1(ke).2 G F3($VISU)2.6 E(AL)-.54 +E/F4 9/Times-Roman@0 SF(,)A F3($EDIT)2.25 E(OR)-.162 E F4(,)A F1(and) +2.25 E F0(emacs)2.5 E F1(as the editor)2.5 E 2.5(,i)-.4 G 2.5(nt)-2.5 G +(hat order)-2.5 E(.)-.55 E F2(Commands f)87 448.8 Q(or Changing T)-.25 E +(ext)-.92 E F0(end\255of\255\214le)108 460.8 Q F2(\(usually C\255d\))2.5 +E F1 .651(The character indicating end-of-\214le as set, for e)144 472.8 +R .651(xample, by)-.15 F F0(stty)3.491 E F1 3.151(\(1\). If).32 F .652 +(this character is read when)3.152 F .03 +(there are no characters on the line, and point is at the be)144 484.8 R +.029(ginning of the line,)-.15 F F2 -.18(re)2.529 G(adline).18 E F1 .029 +(interprets it as)2.529 F(the end of input and returns)144 496.8 Q F3 +(EOF)2.5 E F4(.)A F2(delete\255char \(C\255d\))108 508.8 Q F1 .441 +(Delete the character at point.)144 520.8 R .442 +(If this function is bound to the same character as the tty)5.441 F F2 +(EOF)2.942 E F1(char)2.942 E(-)-.2 E(acter)144 532.8 Q 2.539(,a)-.4 G(s) +-2.539 E F2(C\255d)2.539 E F1 .039(commonly is, see abo)2.539 F .339 +-.15(ve f)-.15 H .039(or the ef).15 F 2.539(fects. This)-.25 F .039 +(may also be bound to the Delete k)2.539 F .338 -.15(ey o)-.1 H(n).15 E +(some k)144 544.8 Q -.15(ey)-.1 G(boards.).15 E F2 +(backward\255delete\255char \(Rubout\))108 556.8 Q F1 .552 +(Delete the character behind the cursor)144 568.8 R 5.553(.W)-.55 G .553 +(hen gi)-5.553 F -.15(ve)-.25 G 3.053(nan).15 G .553(umeric ar)-3.053 F +.553(gument, sa)-.18 F .853 -.15(ve t)-.2 H .553(he deleted te).15 F +.553(xt on)-.15 F(the kill ring.)144 580.8 Q F2 -.25(fo)108 592.8 S +(rward\255backward\255delete\255char).25 E F1 .474 +(Delete the character under the cursor)144 604.8 R 2.974(,u)-.4 G .474 +(nless the cursor is at the end of the line, in which case the)-2.974 F +(character behind the cursor is deleted.)144 616.8 Q F2 +(quoted\255insert \(C\255q, C\255v\))108 628.8 Q F1 .778(Add the ne)144 +640.8 R .779(xt character typed to the line v)-.15 F 3.279 +(erbatim. This)-.15 F .779(is ho)3.279 F 3.279(wt)-.25 G 3.279(oi)-3.279 +G .779(nsert characters lik)-3.279 F(e)-.1 E F2(C\255q)3.279 E F1 3.279 +(,f)C(or)-3.279 E -.15(ex)144 652.8 S(ample.).15 E F2 +(tab\255insert \(C\255v T)108 664.8 Q(AB\))-.9 E F1 +(Insert a tab character)144 676.8 Q(.)-.55 E F2 +(self\255insert \(a, b, A, 1, !,)108 688.8 Q F1 1.666(...)2.5 G F2(\)) +-1.666 E F1(Insert the character typed.)144 700.8 Q(GNU Bash 5.3)72 768 +Q(2024 December 12)136.795 E(55)185.955 E 0 Cg EP +%%Page: 56 56 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(brack)108 84 Q +(eted\255paste\255begin)-.1 E F1 .573 +(This function is intended to be bound to the \231brack)144 96 R .572 +(eted paste\232 escape sequence sent by some ter)-.1 F(-)-.2 E .45 +(minals, and such a binding is assigned by def)144 108 R 2.95(ault. It) +-.1 F(allo)2.95 E(ws)-.25 E F2 -.18(re)2.95 G(adline).18 E F1 .45 +(to insert the pasted te)2.95 F .45(xt as a)-.15 F .952(single unit wit\ +hout treating each character as if it had been read from the k)144 120 R +-.15(ey)-.1 G 3.451(board. The).15 F(pasted)3.451 E 1.118 +(characters are inserted as if each one w)144 132 R 1.119(as bound to) +-.1 F F2(self\255insert)3.619 E F1 1.119(instead of e)3.619 F -.15(xe) +-.15 G 1.119(cuting an).15 F 3.619(ye)-.15 G(diting)-3.619 E(commands.) +144 144 Q(Brack)144 156 Q(eted paste sets the re)-.1 E +(gion to the inserted te)-.15 E(xt and acti)-.15 E -.25(va)-.25 G +(tes the re).25 E(gion.)-.15 E F2(transpose\255chars \(C\255t\))108 168 +Q F1 .322(Drag the character before point forw)144 180 R .321(ard o)-.1 +F -.15(ve)-.15 G 2.821(rt).15 G .321(he character at point, mo)-2.821 F +.321(ving point forw)-.15 F .321(ard as well.)-.1 F .372 +(If point is at the end of the line, then this transposes the tw)144 192 +R 2.872(oc)-.1 G .373(haracters before point.)-2.872 F(Ne)5.373 E -.05 +(ga)-.15 G(ti).05 E .673 -.15(ve a)-.25 H -.2(r-).15 G(guments ha)144 +204 Q .3 -.15(ve n)-.2 H 2.5(oe).15 G -.25(ff)-2.5 G(ect.).25 E F2 +(transpose\255w)108 216 Q(ords \(M\255t\))-.1 E F1 .024(Drag the w)144 +228 R .024(ord before point past the w)-.1 F .023(ord after point, mo) +-.1 F .023(ving point o)-.15 F -.15(ve)-.15 G 2.523(rt).15 G .023(hat w) +-2.523 F .023(ord as well.)-.1 F .023(If point)5.023 F +(is at the end of the line, this transposes the last tw)144 240 Q 2.5 +(ow)-.1 G(ords on the line.)-2.6 E F2(shell\255transpose\255w)108 252 Q +(ords \(M-C-t\))-.1 E F1 .562(Drag the w)144 264 R .562 +(ord before point past the w)-.1 F .562(ord after point, mo)-.1 F .562 +(ving point past that w)-.15 F .563(ord as well.)-.1 F .563(If the)5.563 +F .019 +(insertion point is at the end of the line, this transposes the last tw) +144 276 R 2.519(ow)-.1 G .019(ords on the line.)-2.619 F -.8(Wo)5.019 G +.018(rd bound-).8 F(aries are the same as)144 288 Q F2(shell\255f)2.5 E +(orward\255w)-.25 E(ord)-.1 E F1(and)2.5 E F2(shell\255backward\255w)2.5 +E(ord)-.1 E F1(.)A F2(upcase\255w)108 300 Q(ord \(M\255u\))-.1 E F1 +1.698(Uppercase the current \(or follo)144 312 R 1.698(wing\) w)-.25 F +4.198(ord. W)-.1 F 1.698(ith a ne)-.4 F -.05(ga)-.15 G(ti).05 E 1.999 +-.15(ve a)-.25 H -.18(rg).15 G 1.699(ument, uppercase the pre).18 F +(vious)-.25 E -.1(wo)144 324 S(rd, b).1 E(ut do not mo)-.2 E .3 -.15 +(ve p)-.15 H(oint.).15 E F2(do)108 336 Q(wncase\255w)-.1 E +(ord \(M\255l\))-.1 E F1(Lo)144 348 Q 1.648 +(wercase the current \(or follo)-.25 F 1.648(wing\) w)-.25 F 4.148 +(ord. W)-.1 F 1.647(ith a ne)-.4 F -.05(ga)-.15 G(ti).05 E 1.947 -.15 +(ve a)-.25 H -.18(rg).15 G 1.647(ument, lo).18 F 1.647(wercase the pre) +-.25 F(vious)-.25 E -.1(wo)144 360 S(rd, b).1 E(ut do not mo)-.2 E .3 +-.15(ve p)-.15 H(oint.).15 E F2(capitalize\255w)108 372 Q +(ord \(M\255c\))-.1 E F1 1.974(Capitalize the current \(or follo)144 384 +R 1.974(wing\) w)-.25 F 4.474(ord. W)-.1 F 1.974(ith a ne)-.4 F -.05(ga) +-.15 G(ti).05 E 2.274 -.15(ve a)-.25 H -.18(rg).15 G 1.975 +(ument, capitalize the pre).18 F(vious)-.25 E -.1(wo)144 396 S(rd, b).1 +E(ut do not mo)-.2 E .3 -.15(ve p)-.15 H(oint.).15 E F2 -.1(ove)108 408 +S(rwrite\255mode).1 E F1 -.8(To)144 420 S .438(ggle o).8 F -.15(ve)-.15 +G .438(rwrite mode.).15 F -.4(Wi)5.438 G .438(th an e).4 F .438 +(xplicit positi)-.15 F .737 -.15(ve n)-.25 H .437(umeric ar).15 F .437 +(gument, switches to o)-.18 F -.15(ve)-.15 G .437(rwrite mode.).15 F -.4 +(Wi)144 432 S .78(th an e).4 F .781(xplicit non-positi)-.15 F 1.081 -.15 +(ve n)-.25 H .781(umeric ar).15 F .781(gument, switches to insert mode.) +-.18 F .781(This command af)5.781 F(fects)-.25 E(only)144 444 Q F2 +(emacs)4.395 E F1(mode;)4.395 E F2(vi)4.395 E F1 1.894(mode does o)4.395 +F -.15(ve)-.15 G 1.894(rwrite dif).15 F(ferently)-.25 E 6.894(.E)-.65 G +1.894(ach call to)-6.894 F F0 -.37(re)4.394 G(adline\(\)).37 E F1 1.894 +(starts in insert)4.394 F(mode.)144 456 Q .092(In o)144 468 R -.15(ve) +-.15 G .092(rwrite mode, characters bound to).15 F F2(self\255insert) +2.593 E F1 .093(replace the te)2.593 F .093 +(xt at point rather than pushing the)-.15 F(te)144 480 Q .774 +(xt to the right.)-.15 F .773(Characters bound to)5.774 F F2 +(backward\255delete\255char)3.273 E F1 .773 +(replace the character before point)3.273 F .52(with a space.)144 492 R +.52(By def)5.52 F .52(ault, this command is unbound, b)-.1 F .52 +(ut may be bound to the Insert k)-.2 F .82 -.15(ey o)-.1 H 3.02(ns).15 G +(ome)-3.02 E -.1(ke)144 504 S(yboards.)-.05 E F2(Killing and Y)87 520.8 +Q(anking)-.85 E(kill\255line \(C\255k\))108 532.8 Q F1 1.415 +(Kill the te)144 544.8 R 1.414 +(xt from point to the end of the current line.)-.15 F -.4(Wi)6.414 G +1.414(th a ne).4 F -.05(ga)-.15 G(ti).05 E 1.714 -.15(ve n)-.25 H 1.414 +(umeric ar).15 F 1.414(gument, kill)-.18 F(backw)144 556.8 Q +(ard from the cursor to the be)-.1 E(ginning of the line.)-.15 E F2 +(backward\255kill\255line \(C\255x Rubout\))108 568.8 Q F1 .025 +(Kill backw)144 580.8 R .025(ard to the be)-.1 F .025 +(ginning of the current line.)-.15 F -.4(Wi)5.025 G .025(th a ne).4 F +-.05(ga)-.15 G(ti).05 E .326 -.15(ve n)-.25 H .026(umeric ar).15 F .026 +(gument, kill forw)-.18 F(ard)-.1 E +(from the cursor to the end of the line.)144 592.8 Q F2 +(unix\255line\255discard \(C\255u\))108 604.8 Q F1(Kill backw)144 616.8 +Q(ard from point to the be)-.1 E(ginning of the line, sa)-.15 E +(ving the killed te)-.2 E(xt on the kill-ring.)-.15 E F2 +(kill\255whole\255line)108 628.8 Q F1 +(Kill all characters on the current line, no matter where point is.)144 +640.8 Q F2(kill\255w)108 652.8 Q(ord \(M\255d\))-.1 E F1 .729 +(Kill from point to the end of the current w)144 664.8 R .728 +(ord, or if between w)-.1 F .728(ords, to the end of the ne)-.1 F .728 +(xt w)-.15 F(ord.)-.1 E -.8(Wo)144 676.8 S +(rd boundaries are the same as those used by).8 E F2 -.25(fo)2.5 G +(rward\255w).25 E(ord)-.1 E F1(.)A F2(backward\255kill\255w)108 688.8 Q +(ord \(M\255Rubout\))-.1 E F1(Kill the w)144 700.8 Q(ord behind point.) +-.1 E -.8(Wo)5 G(rd boundaries are the same as those used by).8 E F2 +(backward\255w)2.5 E(ord)-.1 E F1(.)A(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(56)185.955 E 0 Cg EP +%%Page: 57 57 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(shell\255kill\255w)108 84 Q +(ord \(M\255C\255d\))-.1 E F1 .728 +(Kill from point to the end of the current w)144 96 R .729 +(ord, or if between w)-.1 F .729(ords, to the end of the ne)-.1 F .729 +(xt w)-.15 F(ord.)-.1 E -.8(Wo)144 108 S +(rd boundaries are the same as those used by).8 E F2(shell\255f)2.5 E +(orward\255w)-.25 E(ord)-.1 E F1(.)A F2(shell\255backward\255kill\255w) +108 120 Q(ord)-.1 E F1 3.025(Kill the w)144 132 R 3.025 +(ord behind point.)-.1 F -.8(Wo)8.025 G 3.025 +(rd boundaries are the same as those used by).8 F F2(shell\255back-) +5.525 E(ward\255w)144 144 Q(ord)-.1 E F1(.)A F2(unix\255w)108 156 Q +(ord\255rubout \(C\255w\))-.1 E F1 1.062(Kill the w)144 168 R 1.063 +(ord behind point, using white space as a w)-.1 F 1.063(ord boundary)-.1 +F 3.563(,s)-.65 G -.2(av)-3.563 G 1.063(ing the killed te).2 F 1.063 +(xt on the)-.15 F(kill-ring.)144 180 Q F2(unix\255\214lename\255rubout) +108 192 Q F1 .266(Kill the w)144 204 R .266 +(ord behind point, using white space and the slash character as the w) +-.1 F .265(ord boundaries, sa)-.1 F(v-)-.2 E(ing the killed te)144 216 Q +(xt on the kill-ring.)-.15 E F2 +(delete\255horizontal\255space \(M\255\\\))108 228 Q F1 +(Delete all spaces and tabs around point.)144 240 Q F2(kill\255r)108 252 +Q(egion)-.18 E F1(Kill the te)144 264 Q(xt in the current re)-.15 E +(gion.)-.15 E F2(copy\255r)108 276 Q(egion\255as\255kill)-.18 E F1(Cop) +144 288 Q 2.5(yt)-.1 G(he te)-2.5 E(xt in the re)-.15 E +(gion to the kill b)-.15 E(uf)-.2 E(fer)-.25 E 2.5(,s)-.4 G 2.5(oi)-2.5 +G 2.5(tc)-2.5 G(an be yank)-2.5 E(ed immediately)-.1 E(.)-.65 E F2 +(copy\255backward\255w)108 300 Q(ord)-.1 E F1(Cop)144 312 Q 4.8(yt)-.1 G +2.3(he w)-4.8 F 2.3(ord before point to the kill b)-.1 F(uf)-.2 E(fer) +-.25 E 7.301(.T)-.55 G 2.301(he w)-7.301 F 2.301 +(ord boundaries are the same as)-.1 F F2(back-)4.801 E(ward\255w)144 324 +Q(ord)-.1 E F1(.)A F2(copy\255f)108 336 Q(orward\255w)-.25 E(ord)-.1 E +F1(Cop)144 348 Q 4.508(yt)-.1 G 2.008(he w)-4.508 F 2.008(ord follo)-.1 +F 2.008(wing point to the kill b)-.25 F(uf)-.2 E(fer)-.25 E 7.007(.T) +-.55 G 2.007(he w)-7.007 F 2.007(ord boundaries are the same as)-.1 F F2 +-.25(fo)4.507 G -.37(r-).25 G(ward\255w)144 360 Q(ord)-.1 E F1(.)A F2 +(yank \(C\255y\))108 372 Q F1 -1(Ya)144 384 S +(nk the top of the kill ring into the b)1 E(uf)-.2 E(fer at point.)-.25 +E F2(yank\255pop \(M\255y\))108 396 Q F1 +(Rotate the kill ring, and yank the ne)144 408 Q 2.5(wt)-.25 G 2.5 +(op. Only)-2.5 F -.1(wo)2.5 G(rks follo).1 E(wing)-.25 E F2(yank)2.5 E +F1(or)2.5 E F2(yank\255pop)2.5 E F1(.)A F2(Numeric Ar)87 424.8 Q +(guments)-.1 E(digit\255ar)108 436.8 Q(gument \(M\2550, M\2551,)-.1 E F1 +1.666(...)2.5 G F2 2.5(,M)-1.666 G-2.5 E F1 .367 +(Add this digit to the ar)144 448.8 R .367 +(gument already accumulating, or start a ne)-.18 F 2.867(wa)-.25 G -.18 +(rg)-2.867 G 2.867(ument. M\255\255).18 F .367(starts a ne)2.867 F -.05 +(ga)-.15 G(-).05 E(ti)144 460.8 Q .3 -.15(ve a)-.25 H -.18(rg).15 G +(ument.).18 E F2(uni)108 472.8 Q -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 +E F1 .779(This is another w)144 484.8 R .779(ay to specify an ar)-.1 F +3.279(gument. If)-.18 F .779(this command is follo)3.279 F .778 +(wed by one or more digits,)-.25 F 1.376 +(optionally with a leading minus sign, those digits de\214ne the ar)144 +496.8 R 3.876(gument. If)-.18 F 1.376(the command is fol-)3.876 F(lo)144 +508.8 Q 1.17(wed by digits, e)-.25 F -.15(xe)-.15 G(cuting).15 E F2(uni) +3.67 E -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F1(ag)3.67 E 1.17 +(ain ends the numeric ar)-.05 F 1.17(gument, b)-.18 F 1.17(ut is other) +-.2 F(-)-.2 E .898(wise ignored.)144 520.8 R .898 +(As a special case, if this command is immediately follo)5.898 F .898 +(wed by a character that is)-.25 F 1.23 +(neither a digit nor minus sign, the ar)144 532.8 R 1.23 +(gument count for the ne)-.18 F 1.23(xt command is multiplied by four) +-.15 F(.)-.55 E .822(The ar)144 544.8 R .822 +(gument count is initially one, so e)-.18 F -.15(xe)-.15 G .823 +(cuting this function the \214rst time mak).15 F .823(es the ar)-.1 F +(gument)-.18 E(count four)144 556.8 Q 2.5(,as)-.4 G(econd time mak)-2.5 +E(es the ar)-.1 E(gument count sixteen, and so on.)-.18 E F2(Completing) +87 573.6 Q(complete \(T)108 585.6 Q(AB\))-.9 E F1 .203 +(Attempt to perform completion on the te)144 597.6 R .203 +(xt before point.)-.15 F F2(Bash)5.203 E F1 .203 +(attempts completion by \214rst check-)2.703 F .767(ing for an)144 609.6 +R 3.267(yp)-.15 G .767(rogrammable completions for the command w)-3.267 +F .768(ord \(see)-.1 F F2(Pr)3.268 E .768(ogrammable Completion)-.18 F +F1(belo)144 621.6 Q .06(w\), otherwise treating the te)-.25 F .06 +(xt as a v)-.15 F .059(ariable \(if the te)-.25 F .059(xt be)-.15 F .059 +(gins with)-.15 F F2($)2.559 E F1 .059(\), username \(if the te)B .059 +(xt be-)-.15 F .474(gins with)144 633.6 R F2<01>2.974 E F1 .474 +(\), hostname \(if the te)B .474(xt be)-.15 F .474(gins with)-.15 F F2 +(@)2.974 E F1 .474(\), or command \(including aliases, functions, and)B +-.2(bu)144 645.6 S(iltins\) in turn.).2 E +(If none of these produces a match, it f)5 E +(alls back to \214lename completion.)-.1 E F2 +(possible\255completions \(M\255?\))108 657.6 Q F1 .061 +(List the possible completions of the te)144 669.6 R .061 +(xt before point.)-.15 F .061(When displaying completions,)5.061 F F2 +-.18(re)2.56 G(adline).18 E F1(sets)2.56 E 1.002 +(the number of columns used for display to the v)144 681.6 R 1.002 +(alue of)-.25 F F2(completion-display-width)3.502 E F1 3.502(,t)C 1.003 +(he v)-3.502 F 1.003(alue of)-.25 F(the shell v)144 693.6 Q(ariable)-.25 +E/F3 9/Times-Bold@0 SF(COLUMNS)2.5 E/F4 9/Times-Roman@0 SF(,)A F1 +(or the screen width, in that order)2.25 E(.)-.55 E F2 +(insert\255completions \(M\255*\))108 705.6 Q F1 .783 +(Insert all completions of the te)144 717.6 R .783 +(xt before point that w)-.15 F .783(ould ha)-.1 F 1.083 -.15(ve b)-.2 H +.783(een generated by).15 F F2(possible\255com-)3.282 E(pletions)144 +729.6 Q F1 2.5(,s)C(eparated by a space.)-2.5 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(57)185.955 E 0 Cg EP +%%Page: 58 58 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(menu\255complete)108 84 Q F1 +.928(Similar to)144 96 R F2(complete)3.428 E F1 3.428(,b)C .929 +(ut replaces the w)-3.628 F .929 +(ord to be completed with a single match from the list of)-.1 F 1.618 +(possible completions.)144 108 R 1.618(Repeatedly e)6.618 F -.15(xe)-.15 +G(cuting).15 E F2(menu\255complete)4.118 E F1 1.618 +(steps through the list of possible)4.118 F .42 +(completions, inserting each match in turn.)144 120 R .421 +(At the end of the list of completions,)5.421 F F2(menu\255complete) +2.921 E F1 .22(rings the bell \(subject to the setting of)144 132 R F2 +(bell\255style)2.719 E F1 2.719(\)a)C .219(nd restores the original te) +-2.719 F 2.719(xt. An)-.15 F(ar)2.719 E .219(gument of)-.18 F F0(n)2.719 +E F1(mo)144 144 Q -.15(ve)-.15 G(s).15 E F0(n)2.546 E F1 .046 +(positions forw)2.546 F .046(ard in the list of matches; a ne)-.1 F -.05 +(ga)-.15 G(ti).05 E .346 -.15(ve a)-.25 H -.18(rg).15 G .046(ument mo) +.18 F -.15(ve)-.15 G 2.546(sb).15 G(ackw)-2.546 E .046(ard through the) +-.1 F 2.5(list. This)144 156 R(command is intended to be bound to)2.5 E +F2 -.9(TA)2.5 G(B).9 E F1 2.5(,b)C(ut is unbound by def)-2.7 E(ault.)-.1 +E F2(menu\255complete\255backward)108 168 Q F1 .82(Identical to)144 180 +R F2(menu\255complete)3.32 E F1 3.32(,b)C .82(ut mo)-3.52 F -.15(ve)-.15 +G 3.32(sb).15 G(ackw)-3.32 E .82 +(ard through the list of possible completions, as if)-.1 F F2 +(menu\255complete)144 192 Q F1(had been gi)2.5 E -.15(ve)-.25 G 2.5(nan) +.15 G -2.25 -.15(eg a)-2.5 H(ti).15 E .3 -.15(ve a)-.25 H -.18(rg).15 G +2.5(ument. This).18 F(command is unbound by def)2.5 E(ault.)-.1 E F2 +(export\255completions)108 204 Q F1 1.412(Perform completion on the w) +144 216 R 1.412(ord before point as described abo)-.1 F 1.712 -.15(ve a) +-.15 H 1.412(nd write the list of possible).15 F .56(completions to)144 +228 R F2 -.18(re)3.06 G(adline).18 E F1 1.66 -.55('s o)D .56 +(utput stream using the follo).55 F .56 +(wing format, writing information on sepa-)-.25 F(rate lines:)144 240 Q +<83>144 256.8 Q(the number of matches)180 256.8 Q F0(N)2.5 E F1(;)A<83> +144 268.8 Q(the w)180 268.8 Q(ord being completed;)-.1 E<83>144 280.8 Q +F0(S)180 280.8 Q F1(:)A F0(E)A F1 3.252(,w)C .753 +(here S and E are the start and end of)-3.252 F .753(fsets of the w)-.25 +F .753(ord in the)-.1 F F2 -.18(re)3.253 G(adline).18 E F1 .753(line b) +3.253 F(uf)-.2 E(fer;)-.25 E(then)180 292.8 Q<83>144 304.8 Q +(each match, one per line)180 304.8 Q .195(If there are no matches, the\ + \214rst line will be \2310\232, and this command does not print an)144 +321.6 R 2.695(yo)-.15 G .195(utput after)-2.695 F(the)144 333.6 Q F0(S) +2.704 E F1(:)A F0(E)A F1 5.204(.I)C 2.704(ft)-5.204 G .204 +(here is only a single match, this prints a single line containing it.) +-2.704 F .205(If there is more than)5.205 F .233(one match, this prints\ + the common pre\214x of the matches, which may be empty)144 345.6 R +2.733(,o)-.65 G 2.732(nt)-2.733 G .232(he \214rst line af-)-2.732 F .097 +(ter the)144 357.6 R F0(S)2.597 E F1(:)A F0(E)A F1 2.598(,t)C .098 +(hen the matches on subsequent lines.)-2.598 F .098(In this case,)5.098 +F F0(N)2.598 E F1 .098(will include the \214rst line with the)2.598 F +(common pre\214x.)144 369.6 Q .482(The user or application should be ab\ +le to accommodate the possibility of a blank line.)144 386.4 R .481 +(The intent)5.481 F .844(is that the user or application reads)144 398.4 +R F0(N)3.344 E F1 .844(lines after the line containing)3.344 F F0(S) +3.345 E F1(:)A F0(E)A F1 .845(to obtain the match list.)3.345 F +(This command is unbound by def)144 410.4 Q(ault.)-.1 E F2 +(delete\255char\255or\255list)108 427.2 Q F1 .234 +(Deletes the character under the cursor if not at the be)144 439.2 R +.234(ginning or end of the line \(lik)-.15 F(e)-.1 E F2(delete\255char) +2.734 E F1(\).)A .305(At the end of the line, it beha)144 451.2 R -.15 +(ve)-.2 G 2.805(si).15 G .305(dentically to)-2.805 F F2 +(possible\255completions)2.805 E F1 5.305(.T)C .305 +(his command is unbound)-5.305 F(by def)144 463.2 Q(ault.)-.1 E F2 +(complete\255\214lename \(M\255/\))108 480 Q F1 +(Attempt \214lename completion on the te)144 492 Q(xt before point.)-.15 +E F2(possible\255\214lename\255completions \(C\255x /\))108 508.8 Q F1 +(List the possible completions of the te)144 520.8 Q +(xt before point, treating it as a \214lename.)-.15 E F2 +(complete\255user)108 537.6 Q(name \(M\255\001\))-.15 E F1 +(Attempt completion on the te)144 549.6 Q +(xt before point, treating it as a username.)-.15 E F2(possible\255user) +108 566.4 Q(name\255completions \(C\255x \001\))-.15 E F1 +(List the possible completions of the te)144 578.4 Q +(xt before point, treating it as a username.)-.15 E F2(complete\255v)108 +595.2 Q(ariable \(M\255$\))-.1 E F1(Attempt completion on the te)144 +607.2 Q(xt before point, treating it as a shell v)-.15 E(ariable.)-.25 E +F2(possible\255v)108 624 Q(ariable\255completions \(C\255x $\))-.1 E F1 +(List the possible completions of the te)144 636 Q +(xt before point, treating it as a shell v)-.15 E(ariable.)-.25 E F2 +(complete\255hostname \(M\255@\))108 652.8 Q F1 +(Attempt completion on the te)144 664.8 Q +(xt before point, treating it as a hostname.)-.15 E F2 +(possible\255hostname\255completions \(C\255x @\))108 681.6 Q F1 +(List the possible completions of the te)144 693.6 Q +(xt before point, treating it as a hostname.)-.15 E(GNU Bash 5.3)72 768 +Q(2024 December 12)136.795 E(58)185.955 E 0 Cg EP +%%Page: 59 59 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF +(complete\255command \(M\255!\))108 84 Q F1 .581 +(Attempt completion on the te)144 96 R .581 +(xt before point, treating it as a command name.)-.15 F .58 +(Command comple-)5.58 F .715(tion attempts to match the te)144 108 R +.715(xt ag)-.15 F .715(ainst aliases, reserv)-.05 F .715(ed w)-.15 F +.715(ords, shell functions, shell b)-.1 F .715(uiltins, and)-.2 F +(\214nally e)144 120 Q -.15(xe)-.15 G +(cutable \214lenames, in that order).15 E(.)-.55 E F2 +(possible\255command\255completions \(C\255x !\))108 136.8 Q F1 +(List the possible completions of the te)144 148.8 Q +(xt before point, treating it as a command name.)-.15 E F2 +(dynamic\255complete\255history \(M\255T)108 165.6 Q(AB\))-.9 E F1 .092 +(Attempt completion on the te)144 177.6 R .092 +(xt before point, comparing the te)-.15 F .092(xt ag)-.15 F .092 +(ainst history list entries for pos-)-.05 F(sible completion matches.) +144 189.6 Q F2(dab)108 206.4 Q(br)-.1 E -.15(ev)-.18 G(\255expand).15 E +F1 .61(Attempt menu completion on the te)144 218.4 R .611 +(xt before point, comparing the te)-.15 F .611(xt ag)-.15 F .611 +(ainst lines from the his-)-.05 F +(tory list for possible completion matches.)144 230.4 Q F2 +(complete\255into\255braces \(M\255{\))108 247.2 Q F1 .4(Perform \214le\ +name completion and insert the list of possible completions enclosed wi\ +thin braces so)144 259.2 R(the list is a)144 271.2 Q -.25(va)-.2 G +(ilable to the shell \(see).25 E F2(Brace Expansion)2.5 E F1(abo)2.5 E +-.15(ve)-.15 G(\).).15 E F2 -.25(Ke)87 288 S(yboard Macr).25 E(os)-.18 E +(start\255kbd\255macr)108 300 Q 2.5(o\()-.18 G(C\255x \()-2.5 E(\)).833 +E F1(Be)144 312 Q(gin sa)-.15 E +(ving the characters typed into the current k)-.2 E -.15(ey)-.1 G +(board macro.).15 E F2(end\255kbd\255macr)108 324 Q 2.5(o\()-.18 G +(C\255x \))-2.5 E(\)).833 E F1(Stop sa)144 336 Q +(ving the characters typed into the current k)-.2 E -.15(ey)-.1 G +(board macro and store the de\214nition.).15 E F2 +(call\255last\255kbd\255macr)108 348 Q 2.5(o\()-.18 G(C\255x e\))-2.5 E +F1(Re-e)144 360 Q -.15(xe)-.15 G .999(cute the last k).15 F -.15(ey)-.1 +G .999(board macro de\214ned, by making the characters in the macro app\ +ear as if).15 F(typed at the k)144 372 Q -.15(ey)-.1 G(board.).15 E F2 +(print\255last\255kbd\255macr)108 384 Q 2.5(o\()-.18 G(\))-2.5 E F1 +(Print the last k)144 396 Q -.15(ey)-.1 G +(board macro de\214ned in a format suitable for the).15 E F0(inputr)2.5 +E(c)-.37 E F1(\214le.)2.5 E F2(Miscellaneous)87 412.8 Q -.18(re)108 +424.8 S.18 E(ead\255init\255\214le \(C\255x C\255r\))-.18 E F1 +1.777(Read in the contents of the)144 436.8 R F0(inputr)4.277 E(c)-.37 E +F1 1.776(\214le, and incorporate an)4.276 F 4.276(yb)-.15 G 1.776 +(indings or v)-4.276 F 1.776(ariable assignments)-.25 F(found there.)144 +448.8 Q F2(abort \(C\255g\))108 460.8 Q F1 3.248 +(Abort the current editing command and ring the terminal')144 472.8 R +5.749(sb)-.55 G 3.249(ell \(subject to the setting of)-5.749 F F2 +(bell\255style)144 484.8 Q F1(\).)A F2(do\255lo)108 496.8 Q(wer)-.1 E +(case\255v)-.18 E(ersion \(M\255A, M\255B, M\255)-.1 E F0(x)A F2(,)A F1 +1.666(...)2.5 G F2(\))-1.666 E F1 1.739(If the meta\214ed character)144 +508.8 R F0(x)4.239 E F1 1.739 +(is uppercase, run the command that is bound to the corresponding)4.239 +F(meta\214ed lo)144 520.8 Q(wercase character)-.25 E 5(.T)-.55 G +(he beha)-5 E(vior is unde\214ned if)-.2 E F0(x)2.5 E F1(is already lo) +2.5 E(wercase.)-.25 E F2(pr)108 532.8 Q(e\214x\255meta \(ESC\))-.18 E F1 +(Metafy the ne)144 544.8 Q(xt character typed.)-.15 E/F3 9/Times-Bold@0 +SF(ESC)5 E F2(f)2.25 E F1(is equi)2.5 E -.25(va)-.25 G(lent to).25 E F2 +(Meta\255f)2.5 E F1(.)A F2(undo \(C\255_, C\255x C\255u\))108 556.8 Q F1 +(Incremental undo, separately remembered for each line.)144 568.8 Q F2 +-2.29 -.18(re v)108 580.8 T(ert\255line \(M\255r\)).08 E F1 .23 +(Undo all changes made to this line.)144 592.8 R .231(This is lik)5.23 F +2.731(ee)-.1 G -.15(xe)-2.881 G .231(cuting the).15 F F2(undo)2.731 E F1 +.231(command enough times to re-)2.731 F +(turn the line to its initial state.)144 604.8 Q F2 +(tilde\255expand \(M\255&\))108 616.8 Q F1(Perform tilde e)144 628.8 Q +(xpansion on the current w)-.15 E(ord.)-.1 E F2 +(set\255mark \(C\255@, M\255\))108 640.8 Q F1 +(Set the mark to the point.)144 652.8 Q(If a numeric ar)5 E +(gument is supplied, set the mark to that position.)-.18 E F2 +(exchange\255point\255and\255mark \(C\255x C\255x\))108 664.8 Q F1(Sw) +144 676.8 Q .872(ap the point with the mark.)-.1 F .871 +(Set the current cursor position to the sa)5.871 F -.15(ve)-.2 G 3.371 +(dp).15 G .871(osition, then set the)-3.371 F +(mark to the old cursor position.)144 688.8 Q F2(character\255sear)108 +700.8 Q(ch \(C\255]\))-.18 E F1 1.1(Read a character and mo)144 712.8 R +1.4 -.15(ve p)-.15 H 1.101(oint to the ne).15 F 1.101 +(xt occurrence of that character)-.15 F 6.101(.A)-.55 G(ne)-2.5 E -.05 +(ga)-.15 G(ti).05 E 1.401 -.15(ve a)-.25 H -.18(rg).15 G(ument).18 E +(searches for pre)144 724.8 Q(vious occurrences.)-.25 E(GNU Bash 5.3)72 +768 Q(2024 December 12)136.795 E(59)185.955 E 0 Cg EP +%%Page: 60 60 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(character\255sear)108 84 Q +(ch\255backward \(M\255C\255]\))-.18 E F1 1.071(Read a character and mo) +144 96 R 1.371 -.15(ve p)-.15 H 1.071(oint to the pre).15 F 1.071 +(vious occurrence of that character)-.25 F 6.07(.A)-.55 G(ne)-2.5 E -.05 +(ga)-.15 G(ti).05 E 1.37 -.15(ve a)-.25 H -.18(rg).15 G(u-).18 E +(ment searches for subsequent occurrences.)144 108 Q F2 +(skip\255csi\255sequence)108 120 Q F1 1.826 +(Read enough characters to consume a multi-k)144 132 R 2.126 -.15(ey s) +-.1 H 1.827(equence such as those de\214ned for k).15 F -.15(ey)-.1 G +4.327(sl).15 G(ik)-4.327 E(e)-.1 E .345(Home and End.)144 144 R .345 +(CSI sequences be)5.345 F .345 +(gin with a Control Sequence Indicator \(CSI\), usually)-.15 F F0 .344 +(ESC [)3.354 F F1 5.344(.I).52 G(f)-5.344 E 1.437 +(this sequence is bound to \231\\e[\232, k)144 156 R -.15(ey)-.1 G 3.937 +(sp).15 G 1.437(roducing CSI sequences ha)-3.937 F 1.737 -.15(ve n)-.2 H +3.937(oe).15 G -.25(ff)-3.937 G 1.438(ect unless e).25 F(xplicitly)-.15 +E .297(bound to a)144 168 R F2 -.18(re)2.797 G(adline).18 E F1 .297 +(command, instead of inserting stray characters into the editing b)2.797 +F(uf)-.2 E(fer)-.25 E 5.296(.T)-.55 G .296(his is)-5.296 F +(unbound by def)144 180 Q(ault, b)-.1 E(ut usually bound to)-.2 E F0 +(ESC [)3.01 E F1(.).52 E F2(insert\255comment \(M\255#\))108 192 Q F1 +-.4(Wi)144 204 S .532(thout a numeric ar).4 F .533(gument, insert the v) +-.18 F .533(alue of the)-.25 F F2 -.18(re)3.033 G .533 +(adline comment\255begin).18 F F1 -.25(va)3.033 G .533 +(riable at the be-).25 F .792(ginning of the current line.)144 216 R +.791(If a numeric ar)5.791 F .791 +(gument is supplied, this command acts as a toggle: if)-.18 F .863 +(the characters at the be)144 228 R .864 +(ginning of the line do not match the v)-.15 F .864(alue of)-.25 F F2 +(comment\255begin)3.364 E F1 3.364(,i)C .864(nsert the)-3.364 F -.25(va) +144 240 S .305(lue; otherwise delete the characters in).25 F F2 +(comment-begin)2.804 E F1 .304(from the be)2.804 F .304 +(ginning of the line.)-.15 F .304(In either)5.304 F .947 +(case, the line is accepted as if a ne)144 252 R .948 +(wline had been typed.)-.25 F .948(The def)5.948 F .948(ault v)-.1 F +.948(alue of)-.25 F F2(comment\255begin)3.448 E F1 .363 +(causes this command to mak)144 264 R 2.863(et)-.1 G .363 +(he current line a shell comment.)-2.863 F .362(If a numeric ar)5.362 F +.362(gument causes the)-.18 F(comment character to be remo)144 276 Q +-.15(ve)-.15 G(d, the line will be e).15 E -.15(xe)-.15 G +(cuted by the shell.).15 E F2(spell\255corr)108 288 Q(ect\255w)-.18 E +(ord \(C\255x s\))-.1 E F1 .42 +(Perform spelling correction on the current w)144 300 R .421 +(ord, treating it as a directory or \214lename, in the same)-.1 F -.1 +(wa)144 312 S 4.718(ya).1 G 4.718(st)-4.718 G(he)-4.718 E F2(cdspell) +4.718 E F1 2.218(shell option.)4.718 F -.8(Wo)7.217 G 2.217 +(rd boundaries are the same as those used by).8 F F2(shell\255f)4.717 E +(or)-.25 E(-)-.37 E(ward\255w)144 324 Q(ord)-.1 E F1(.)A F2 +(glob\255complete\255w)108 336 Q(ord \(M\255g\))-.1 E F1 -.35(Tr)144 348 +S 1.037(eat the w).35 F 1.037 +(ord before point as a pattern for pathname e)-.1 F 1.038 +(xpansion, with an asterisk implicitly ap-)-.15 F(pended, then use the \ +pattern to generate a list of matching \214le names for possible comple\ +tions.)144 360 Q F2(glob\255expand\255w)108 372 Q(ord \(C\255x *\))-.1 E +F1 -.35(Tr)144 384 S .033(eat the w).35 F .033 +(ord before point as a pattern for pathname e)-.1 F .033 +(xpansion, and insert the list of matching \214le)-.15 F .083 +(names, replacing the w)144 396 R 2.583(ord. If)-.1 F 2.583(an)2.583 G +.083(umeric ar)-2.583 F .083(gument is supplied, append a)-.18 F F2(*) +2.584 E F1 .084(before pathname e)2.584 F(xpan-)-.15 E(sion.)144 408 Q +F2(glob\255list\255expansions \(C\255x g\))108 420 Q F1 .689 +(Display the list of e)144 432 R .689(xpansions that w)-.15 F .688 +(ould ha)-.1 F .988 -.15(ve b)-.2 H .688(een generated by).15 F F2 +(glob\255expand\255w)3.188 E(ord)-.1 E F1 .688(and redis-)3.188 F +(play the line.)144 444 Q(If a numeric ar)5 E +(gument is supplied, append a)-.18 E F2(*)2.5 E F1(before pathname e)2.5 +E(xpansion.)-.15 E F2(dump\255functions)108 456 Q F1 .473 +(Print all of the functions and their k)144 468 R .773 -.15(ey b)-.1 H +.473(indings to the).15 F F2 -.18(re)2.973 G(adline).18 E F1 .473 +(output stream.)2.973 F .473(If a numeric ar)5.473 F(gu-)-.18 E +(ment is supplied, the output is formatted in such a w)144 480 Q +(ay that it can be made part of an)-.1 E F0(inputr)2.5 E(c)-.37 E F1 +(\214le.)2.5 E F2(dump\255v)108 492 Q(ariables)-.1 E F1 .456 +(Print all of the settable)144 504 R F2 -.18(re)2.956 G(adline).18 E F1 +-.25(va)2.955 G .455(riables and their v).25 F .455(alues to the)-.25 F +F2 -.18(re)2.955 G(adline).18 E F1 .455(output stream.)2.955 F .455 +(If a nu-)5.455 F .108(meric ar)144 516 R .108 +(gument is supplied, the output is formatted in such a w)-.18 F .109 +(ay that it can be made part of an)-.1 F F0(in-)2.609 E(putr)144 528 Q +(c)-.37 E F1(\214le.)2.5 E F2(dump\255macr)108 540 Q(os)-.18 E F1 .089 +(Print all of the)144 552 R F2 -.18(re)2.589 G(adline).18 E F1 -.1(ke) +2.589 G 2.589(ys)-.05 G .089 +(equences bound to macros and the strings the)-2.589 F 2.589(yo)-.15 G +.088(utput to the)-2.589 F F2 -.18(re)2.588 G(adline).18 E F1 .243 +(output stream.)144 564 R .243(If a numeric ar)5.243 F .243 +(gument is supplied, the output is formatted in such a w)-.18 F .244 +(ay that it can)-.1 F(be made part of an)144 576 Q F0(inputr)2.5 E(c) +-.37 E F1(\214le.)2.5 E F2(execute\255named\255command \(M-x\))108 588 Q +F1 1.084(Read a bindable)144 600 R F2 -.18(re)3.584 G(adline).18 E F1 +1.083(command name from the input and e)3.584 F -.15(xe)-.15 G 1.083 +(cute the function to which it').15 F(s)-.55 E .278(bound, as if the k) +144 612 R .578 -.15(ey s)-.1 H .278(equence to which it w).15 F .279 +(as bound appeared in the input.)-.1 F .279(If this function is sup-) +5.279 F(plied with a numeric ar)144 624 Q(gument, it passes that ar)-.18 +E(gument to the function it e)-.18 E -.15(xe)-.15 G(cutes.).15 E F2 +(display\255shell\255v)108 636 Q(ersion \(C\255x C\255v\))-.1 E F1 +(Display v)144 648 Q(ersion information about the current instance of) +-.15 E F2(bash)2.5 E F1(.)A F2(Pr)87 664.8 Q(ogrammable Completion)-.18 +E F1 .379(When a user attempts w)108 676.8 R .378 +(ord completion for a command or an ar)-.1 F .378 +(gument to a command for which a comple-)-.18 F .92 +(tion speci\214cation \(a)108 688.8 R F0(compspec)3.42 E F1 3.42(\)h)C +.92(as been de\214ned using the)-3.42 F F2(complete)3.42 E F1 -.2(bu) +3.42 G .92(iltin \(see).2 F/F3 9/Times-Bold@0 SF .921(SHELL B)3.421 F +(UIL)-.09 E .921(TIN COM-)-.828 F(MANDS)108 700.8 Q F1(belo)2.25 E(w\),) +-.25 E F2 -.18(re)2.5 G(adline).18 E F1(in)2.5 E -.2(vo)-.4 G -.1(ke).2 +G 2.5(st).1 G(he programmable completion f)-2.5 E(acilities.)-.1 E +(First,)108 717.6 Q F2(bash)2.664 E F1 .163 +(identi\214es the command name.)2.664 F .163 +(If a compspec has been de\214ned for that command, the compspec)5.163 F +.454(is used to generate the list of possible completions for the w)108 +729.6 R 2.954(ord. If)-.1 F .454(the command w)2.954 F .455 +(ord is the empty string)-.1 F(GNU Bash 5.3)72 768 Q(2024 December 12) +136.795 E(60)185.955 E 0 Cg EP +%%Page: 61 61 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .129(\(completion attempted at the be)108 84 R .129 +(ginning of an empty line\),)-.15 F/F2 10/Times-Bold@0 SF(bash)2.629 E +F1 .129(uses an)2.629 F 2.629(yc)-.15 G .129(ompspec de\214ned with the) +-2.629 F F22.628 E F1(op-)2.628 E .506(tion to)108 96 R F2 +(complete)3.006 E F1 5.506(.T)C(he)-5.506 E F23.006 E F1 .506 +(option to)3.006 F F2(complete)3.006 E F1 .506 +(indicates that the command w)3.006 F .507 +(ord is the \214rst non-assignment)-.1 F -.1(wo)108 108 S .437 +(rd on the line, or after a command delimiter such as).1 F F2(;)2.937 E +F1(or)2.937 E F2(|)2.937 E F1 5.437(.T)C .436 +(his usually indicates command name com-)-5.437 F(pletion.)108 120 Q .29 +(If the command w)108 136.8 R .29(ord is a full pathname,)-.1 F F2(bash) +2.79 E F1 .291(searches for a compspec for the full pathname \214rst.) +2.79 F .291(If there)5.291 F .451(is no compspec for the full pathname,) +108 148.8 R F2(bash)2.951 E F1 .45 +(attempts to \214nd a compspec for the portion follo)2.951 F .45 +(wing the \214nal)-.25 F 3.594(slash. If)108 160.8 R 1.094(those search\ +es do not result in a compspec, or if there is no compspec for the comm\ +and w)3.594 F(ord,)-.1 E F2(bash)108 172.8 Q F1 1.515(uses an)4.015 F +4.015(yc)-.15 G 1.515(ompspec de\214ned with the)-4.015 F F24.015 +E F1 1.514(option to)4.015 F F2(complete)4.014 E F1 1.514(as the def) +4.014 F 4.014(ault. If)-.1 F 1.514(there is no def)4.014 F(ault)-.1 E +(compspec,)108 184.8 Q F2(bash)3.566 E F1 1.066(performs alias e)3.566 F +1.066(xpansion on the command w)-.15 F 1.067 +(ord as a \214nal resort, and attempts to \214nd a)-.1 F +(compspec for the command w)108 196.8 Q(ord resulting from an)-.1 E 2.5 +(ys)-.15 G(uccessful e)-2.5 E(xpansion.)-.15 E .96 +(If a compspec is not found,)108 213.6 R F2(bash)3.46 E F1 .96 +(performs its def)3.46 F .96(ault completion as described abo)-.1 F 1.26 +-.15(ve u)-.15 H(nder).15 E F2(Completing)3.46 E F1(.)A +(Otherwise, once a compspec has been found,)108 225.6 Q F2(bash)2.5 E F1 +(uses it to generate the list of matching w)2.5 E(ords.)-.1 E(First,)108 +242.4 Q F2(bash)3.128 E F1 .628(performs the)3.128 F F0(actions)3.128 E +F1 .628(speci\214ed by the compspec.)3.128 F .628 +(This only returns matches which are pre\214x)5.628 F(es)-.15 E .12 +(of the w)108 254.4 R .12(ord being completed.)-.1 F .12(When the)5.12 F +F22.62 E F1(or)2.62 E F22.619 E F1 .119 +(option is used for \214lename or directory name completion,)2.619 F F2 +(bash)108 266.4 Q F1(uses the shell v)2.5 E(ariable)-.25 E/F3 9 +/Times-Bold@0 SF(FIGNORE)2.5 E F1(to \214lter the matches.)2.25 E(Ne)108 +283.2 Q .592(xt, programmable completion generates matches speci\214ed \ +by a pathname e)-.15 F .592(xpansion pattern supplied as)-.15 F .869 +(an ar)108 295.2 R .869(gument to the)-.18 F F23.369 E F1 3.369 +(option. The)3.369 F -.1(wo)3.369 G .869 +(rds generated by the pattern need not match the w).1 F .868 +(ord being com-)-.1 F(pleted.)108 307.2 Q F2(Bash)5.858 E F1 .858 +(uses the)3.358 F F3(FIGNORE)3.358 E F1 -.25(va)3.108 G .858 +(riable to \214lter the matches, b).25 F .859(ut does not use the)-.2 F +F3(GLOBIGNORE)3.359 E F1(shell)3.109 E -.25(va)108 319.2 S(riable.).25 E +(Ne)108 336 Q .718 +(xt, completion considers the string speci\214ed as the ar)-.15 F .718 +(gument to the)-.18 F F23.218 E F1 3.217(option. The)3.217 F .717 +(string is \214rst split)3.217 F .175(using the characters in the)108 +348 R F3(IFS)2.675 E F1 .175(special v)2.425 F .175 +(ariable as delimiters.)-.25 F .175 +(This honors shell quoting within the string, in)5.175 F 1.02 +(order to pro)108 360 R 1.02(vide a mechanism for the w)-.15 F 1.019 +(ords to contain shell metacharacters or characters in the v)-.1 F 1.019 +(alue of)-.25 F F3(IFS)108 372 Q/F4 9/Times-Roman@0 SF(.)A F1 .004 +(Each w)4.504 F .004(ord is then e)-.1 F .005(xpanded using brace e)-.15 +F .005(xpansion, tilde e)-.15 F .005(xpansion, parameter and v)-.15 F +.005(ariable e)-.25 F(xpansion,)-.15 E 1.003 +(command substitution, and arithmetic e)108 384 R 1.003 +(xpansion, as described abo)-.15 F 1.303 -.15(ve u)-.15 H(nder).15 E F3 +(EXP)3.503 E(ANSION)-.666 E F4(.)A F1 1.003(The results are)5.503 F +2.124(split using the rules described abo)108 396 R 2.424 -.15(ve u)-.15 +H(nder).15 E F2 -.75(Wo)4.624 G 2.124(rd Splitting).75 F F1 7.124(.T)C +2.124(he results of the e)-7.124 F 2.124(xpansion are pre\214x-)-.15 F +(matched ag)108 408 Q(ainst the w)-.05 E +(ord being completed, and the matching w)-.1 E +(ords become possible completions.)-.1 E .489(After these matches ha)108 +424.8 R .789 -.15(ve b)-.2 H .489(een generated,).15 F F2(bash)2.989 E +F1 -.15(exe)2.989 G .489(cutes an).15 F 2.989(ys)-.15 G .488 +(hell function or command speci\214ed with the)-2.989 F F2108 +436.8 Q F1(and)3.127 E F23.127 E F1 3.127(options. When)3.127 F +.627(the command or function is in)3.127 F -.2(vo)-.4 G -.1(ke).2 G(d,) +.1 E F2(bash)3.128 E F1 .628(assigns v)3.128 F .628(alues to the)-.25 F +F3(COMP_LINE)3.128 E F4(,)A F3(COMP_POINT)108 448.8 Q F4(,)A F3 +(COMP_KEY)3.047 E F4(,)A F1(and)3.047 E F3(COMP_TYPE)3.297 E F1 -.25(va) +3.047 G .796(riables as described abo).25 F 1.096 -.15(ve u)-.15 H(nder) +.15 E F2 .796(Shell V)3.296 F(ariables)-.92 E F1 5.796(.I)C 3.296(fa) +-5.796 G .696(shell function is being in)108 460.8 R -.2(vo)-.4 G -.1 +(ke).2 G(d,).1 E F2(bash)3.196 E F1 .696(also sets the)3.196 F F3 +(COMP_W)3.196 E(ORDS)-.09 E F1(and)2.947 E F3(COMP_CW)3.197 E(ORD)-.09 E +F1 -.25(va)2.947 G 3.197(riables. When).25 F .347 +(the function or command is in)108 472.8 R -.2(vo)-.4 G -.1(ke).2 G .347 +(d, the \214rst ar).1 F .346(gument \()-.18 F F2($1)A F1 2.846(\)i)C +2.846(st)-2.846 G .346(he name of the command whose ar)-2.846 F(guments) +-.18 E .263(are being completed, the second ar)108 484.8 R .263 +(gument \()-.18 F F2($2)A F1 2.763(\)i)C 2.763(st)-2.763 G .264(he w) +-2.763 F .264(ord being completed, and the third ar)-.1 F .264 +(gument \()-.18 F F2($3)A F1 2.764(\)i)C(s)-2.764 E 1.098(the w)108 +496.8 R 1.098(ord preceding the w)-.1 F 1.098 +(ord being completed on the current command line.)-.1 F 1.097 +(There is no \214ltering of the)6.097 F .576(generated completions ag) +108 508.8 R .577(ainst the w)-.05 F .577 +(ord being completed; the function or command has complete freedom)-.1 F +(in generating the matches and the)108 520.8 Q 2.5(yd)-.15 G 2.5(on)-2.5 +G(ot need to match a pre\214x of the w)-2.5 E(ord.)-.1 E(An)108 537.6 Q +2.938(yf)-.15 G .437(unction speci\214ed with)-2.938 F F22.937 E +F1 .437(is in)2.937 F -.2(vo)-.4 G -.1(ke).2 G 2.937<648c>.1 G 2.937 +(rst. The)-2.937 F .437(function may use an)2.937 F 2.937(yo)-.15 G +2.937(ft)-2.937 G .437(he shell f)-2.937 F .437(acilities, including)-.1 +F(the)108 549.6 Q F2(compgen)2.505 E F1(and)2.505 E F2(compopt)2.505 E +F1 -.2(bu)2.505 G .005(iltins described belo).2 F 1.306 -.65(w, t)-.25 H +2.506(og).65 G .006(enerate the matches.)-2.506 F .006 +(It must put the possible com-)5.006 F(pletions in the)108 561.6 Q F3 +(COMPREPL)2.5 E(Y)-.828 E F1(array v)2.25 E +(ariable, one per array element.)-.25 E(Ne)108 578.4 Q .081(xt, an)-.15 +F 2.581(yc)-.15 G .081(ommand speci\214ed with the)-2.581 F F2 +2.581 E F1 .081(option is in)2.581 F -.2(vo)-.4 G -.1(ke).2 G 2.581(di) +.1 G 2.58(na)-2.581 G 2.58(ne)-2.58 G -.4(nv)-2.58 G .08(ironment equi) +.4 F -.25(va)-.25 G .08(lent to command sub-).25 F 2.766(stitution. It) +108 590.4 R .267(should print a list of completions, one per line, to t\ +he standard output.)2.766 F .267(Backslash will escape a)5.267 F(ne)108 +602.4 Q(wline, if necessary)-.25 E 5(.T)-.65 G +(hese are added to the set of possible completions.)-5 E .349 +(After generating all of the possible completions,)108 619.2 R F2(bash) +2.848 E F1 .348(applies an)2.848 F 2.848<798c>-.15 G .348 +(lter speci\214ed with the)-2.848 F F22.848 E F1 .348 +(option to the)2.848 F .055(completions in the list.)108 631.2 R .055 +(The \214lter is a pattern as used for pathname e)5.055 F .055 +(xpansion; a)-.15 F F2(&)2.555 E F1 .055(in the pattern is replaced) +2.555 F .576(with the te)108 643.2 R .576(xt of the w)-.15 F .575 +(ord being completed.)-.1 F 3.075(Al)5.575 G(iteral)-3.075 E F2(&)3.075 +E F1 .575(may be escaped with a backslash; the backslash is)3.075 F +(remo)108 655.2 Q -.15(ve)-.15 G 2.988(db).15 G .488 +(efore attempting a match.)-2.988 F(An)5.488 E 2.988(yc)-.15 G .488 +(ompletion that matches the pattern is remo)-2.988 F -.15(ve)-.15 G +2.988(df).15 G .488(rom the list.)-2.988 F(A)5.489 E(leading)108 667.2 Q +F2(!)2.898 E F1(ne)2.898 E -.05(ga)-.15 G .397 +(tes the pattern; in this case).05 F F2(bash)2.897 E F1(remo)2.897 E +-.15(ve)-.15 G 2.897(sa).15 G .697 -.15(ny c)-2.897 H .397 +(ompletion that does not match the pattern.).15 F(If)5.397 E(the)108 +679.2 Q F2(nocasematch)2.797 E F1 .297(shell option is enabled,)2.797 F +F2(bash)2.797 E F1 .298(performs the match without re)2.797 F -.05(ga) +-.15 G .298(rd to the case of alphabetic).05 F(characters.)108 691.2 Q +(Finally)108 708 Q 2.78(,p)-.65 G .28(rogrammable completion adds an) +-2.78 F 2.78(yp)-.15 G .279(re\214x and suf)-2.78 F .279 +(\214x speci\214ed with the)-.25 F F22.779 E F1(and)2.779 E F2 +2.779 E F1 .279(options, respec-)2.779 F(ti)108 720 Q -.15(ve)-.25 +G(ly).15 E 2.5(,t)-.65 G 2.5(oe)-2.5 G +(ach completion, and returns the result to)-2.5 E F2 -.18(re)2.5 G +(adline).18 E F1(as the list of possible completions.)2.5 E +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(61)185.955 E 0 Cg EP +%%Page: 62 62 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .246(If the pre)108 84 R .247 +(viously-applied actions do not generate an)-.25 F 2.747(ym)-.15 G .247 +(atches, and the)-2.747 F/F2 10/Times-Bold@0 SF .247(\255o dir)2.747 F +(names)-.15 E F1 .247(option w)2.747 F .247(as supplied to)-.1 F F2 +(complete)108 96 Q F1(when the compspec w)2.5 E(as de\214ned,)-.1 E F2 +(bash)2.5 E F1(attempts directory name completion.)2.5 E .53(If the)108 +112.8 R F2 .53(\255o plusdirs)3.03 F F1 .53(option w)3.03 F .53 +(as supplied to)-.1 F F2(complete)3.03 E F1 .53(when the compspec w)3.03 +F .53(as de\214ned,)-.1 F F2(bash)3.03 E F1 .53(attempts direc-)3.03 F +(tory name completion and adds an)108 124.8 Q 2.5(ym)-.15 G +(atches to the set of possible completions.)-2.5 E .559(By def)108 141.6 +R .559(ault, if a compspec is found, whate)-.1 F -.15(ve)-.25 G 3.059 +(ri).15 G 3.059(tg)-3.059 G .56 +(enerates is returned to the completion code as the full set)-3.059 F +.054(of possible completions.)108 153.6 R .054(The def)5.054 F(ault)-.1 +E F2(bash)2.554 E F1 .054(completions and the)2.554 F F2 -.18(re)2.553 G +(adline).18 E F1(def)2.553 E .053(ault of \214lename completion are)-.1 +F 2.822(disabled. If)108 165.6 R(the)2.822 E F2 .322(\255o bashdefault) +2.822 F F1 .322(option w)2.822 F .322(as supplied to)-.1 F F2(complete) +2.823 E F1 .323(when the compspec w)2.823 F .323(as de\214ned, and the) +-.1 F .373(compspec generates no matches,)108 177.6 R F2(bash)2.872 E F1 +.372(attempts its def)2.872 F .372(ault completions.)-.1 F .372 +(If the compspec and, if attempted,)5.372 F 1.214(the def)108 189.6 R +(ault)-.1 E F2(bash)3.714 E F1 1.214 +(completions generate no matches, and the)3.714 F F2 1.214 +(\255o default)3.714 F F1 1.214(option w)3.714 F 1.214(as supplied to) +-.1 F F2(complete)3.714 E F1(when the compspec w)108 201.6 Q +(as de\214ned, programmable completion performs)-.1 E F2 -.18(re)2.5 G +(adline).18 E F1 1.1 -.55('s d)D(ef).55 E(ault completion.)-.1 E .749 +(The options supplied to)108 218.4 R F2(complete)3.249 E F1(and)3.249 E +F2(compopt)3.249 E F1 .749(can control ho)3.249 F(w)-.25 E F2 -.18(re) +3.249 G(adline).18 E F1 .748(treats the completions.)3.248 F -.15(Fo) +5.748 G 3.248(ri).15 G(n-)-3.248 E .791(stance, the)108 230.4 R F0 .791 +(\255o fullquote)3.291 F F1 .791(option tells)3.291 F F2 -.18(re)3.291 G +(adline).18 E F1 .791(to quote the matches as if the)3.291 F 3.291(yw) +-.15 G .791(ere \214lenames.)-3.291 F .792(See the de-)5.791 F +(scription of)108 242.4 Q F2(complete)2.5 E F1(belo)2.5 E 2.5(wf)-.25 G +(or details.)-2.5 E .766(When a compspec indicates that it w)108 259.2 R +.765(ants directory name completion, the programmable completion func-) +-.1 F .469(tions force)108 271.2 R F2 -.18(re)2.969 G(adline).18 E F1 +.469(to append a slash to completed names which are symbolic links to d\ +irectories, subject)2.969 F 2.575(to the v)108 283.2 R 2.575 +(alue of the)-.25 F F2(mark\255dir)5.075 E 2.575(ectories r)-.18 F +(eadline)-.18 E F1 -.25(va)5.075 G 2.575(riable, re).25 F -.05(ga)-.15 G +2.575(rdless of the setting of the).05 F F2(mark-sym-)5.075 E(link)108 +295.2 Q(ed\255dir)-.1 E(ectories r)-.18 E(eadline)-.18 E F1 -.25(va)2.5 +G(riable.).25 E .19 +(There is some support for dynamically modifying completions.)108 312 R +.191(This is most useful when used in combina-)5.191 F 1.172 +(tion with a def)108 324 R 1.172(ault completion speci\214ed with)-.1 F +F2 1.172(complete \255D)3.672 F F1 6.172(.I)C(t')-6.172 E 3.672(sp)-.55 +G 1.172(ossible for shell functions e)-3.672 F -.15(xe)-.15 G 1.172 +(cuted as).15 F .733(completion functions to indicate that completion s\ +hould be retried by returning an e)108 336 R .734(xit status of 124.) +-.15 F .734(If a)5.734 F .1(shell function returns 124, and changes the\ + compspec associated with the command on which completion is)108 348 R +.665(being attempted \(supplied as the \214rst ar)108 360 R .666 +(gument when the function is e)-.18 F -.15(xe)-.15 G .666 +(cuted\), programmable completion).15 F .1(restarts from the be)108 372 +R .1(ginning, with an attempt to \214nd a ne)-.15 F 2.6(wc)-.25 G .1 +(ompspec for that command.)-2.6 F .1(This can be used to)5.1 F -.2(bu) +108 384 S(ild a set of completions dynamically as completion is attempt\ +ed, rather than loading them all at once.).2 E -.15(Fo)108 400.8 S 2.636 +(ri).15 G .137 +(nstance, assuming that there is a library of compspecs, each k)-2.636 F +.137(ept in a \214le corresponding to the name of)-.1 F +(the command, the follo)108 412.8 Q(wing def)-.25 E +(ault completion function w)-.1 E(ould load completions dynamically:)-.1 +E/F3 10/Courier@0 SF(_completion_loader\(\))144 424.8 Q({)144 436.8 Q 6 +(.")156 448.8 S +(/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124)-6 E(})144 +460.8 Q(complete \255D \255F _completion_loader \255o bashdefault \255o\ + default)144 472.8 Q/F4 10.95/Times-Bold@0 SF(HIST)72 489.6 Q(OR)-.197 E +(Y)-.383 E F1 .372(When the)108 501.6 R F2 .372(\255o history)2.872 F F1 +.372(option to the)2.872 F F2(set)2.872 E F1 -.2(bu)2.872 G .372 +(iltin is enabled, the shell pro).2 F .371(vides access to the)-.15 F F0 +.371(command history)2.871 F F1(,)A .304(the list of commands pre)108 +513.6 R .304(viously typed.)-.25 F .304(The v)5.304 F .304(alue of the) +-.25 F/F5 9/Times-Bold@0 SF(HISTSIZE)2.804 E F1 -.25(va)2.554 G .305 +(riable is used as the number of com-).25 F .488(mands to sa)108 525.6 R +.788 -.15(ve i)-.2 H 2.988(nah).15 G .488(istory list: the shell sa) +-2.988 F -.15(ve)-.2 G 2.988(st).15 G .488(he te)-2.988 F .488 +(xt of the last)-.15 F F5(HISTSIZE)2.988 E F1 .487(commands \(def)2.738 +F .487(ault 500\).)-.1 F(The)5.487 E .805 +(shell stores each command in the history list prior to parameter and v) +108 537.6 R .805(ariable e)-.25 F .805(xpansion \(see)-.15 F F5(EXP) +3.305 E(ANSION)-.666 E F1(abo)108 549.6 Q -.15(ve)-.15 G 3.218(\)b).15 G +.717(ut after history e)-3.418 F .717 +(xpansion is performed, subject to the v)-.15 F .717 +(alues of the shell v)-.25 F(ariables)-.25 E F5(HISTIGNORE)3.217 E F1 +(and)108 561.6 Q F5(HISTCONTR)2.5 E(OL)-.27 E/F6 9/Times-Roman@0 SF(.)A +F1 .571(On startup,)108 578.4 R F2(bash)3.071 E F1 .571(initializes the\ + history list by reading history entries from the the \214le named by t\ +he)3.071 F F5(HIST)3.072 E(-)-.828 E(FILE)108 590.4 Q F1 -.25(va)2.65 G +.4(riable \(def).25 F(ault)-.1 E F0(\001/.bash_history)4.566 E F1 2.9 +(\). That)1.666 F .4(\214le is referred to as the)2.9 F F0 .399 +(history \214le)2.899 F F1 5.399(.T)C .399(he history \214le is trun-) +-5.399 F .006(cated, if necessary)108 602.4 R 2.507(,t)-.65 G 2.507(oc) +-2.507 G .007 +(ontain no more than the number of history entries speci\214ed by the v) +-2.507 F .007(alue of the)-.25 F F5(HIST)2.507 E(-)-.828 E(FILESIZE)108 +614.4 Q F1 -.25(va)2.537 G 2.787(riable. If).25 F F5(HISTFILESIZE)2.787 +E F1 .287(is unset, or set to null, a non-numeric v)2.537 F .287 +(alue, or a numeric v)-.25 F .286(alue less)-.25 F +(than zero, the history \214le is not truncated.)108 626.4 Q .385 +(When the history \214le is read, lines be)108 643.2 R .385 +(ginning with the history comment character follo)-.15 F .386 +(wed immediately by)-.25 F 3.486(ad)108 655.2 S .986 +(igit are interpreted as timestamps for the follo)-3.486 F .986 +(wing history line.)-.25 F .986(These timestamps are optionally dis-) +5.986 F .328(played depending on the v)108 667.2 R .328(alue of the)-.25 +F F5(HISTTIMEFORMA)2.828 E(T)-.855 E F1 -.25(va)2.578 G 2.828 +(riable. When).25 F .329(present, history timestamps de-)2.828 F +(limit history entries, making multi-line entries possible.)108 679.2 Q +1.197(When a shell with history enabled e)108 696 R(xits,)-.15 E F2 +(bash)3.697 E F1 1.196(copies the last)3.696 F F5($HISTSIZE)3.696 E F1 +1.196(entries from the history list to)3.446 F F5($HISTFILE)108 708 Q F6 +(.)A F1 .056(If the)4.556 F F2(histappend)2.556 E F1 .056 +(shell option is enabled \(see the description of)2.556 F F2(shopt)2.556 +E F1(under)2.556 E F5 .056(SHELL B)2.556 F(UIL)-.09 E(TIN)-.828 E +(COMMANDS)108 720 Q F1(belo)2.359 E(w\),)-.25 E F2(bash)2.609 E F1 .108 +(appends the entries to the history \214le, otherwise it o)2.608 F -.15 +(ve)-.15 G .108(rwrites the history \214le.).15 F(If)5.108 E +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(62)185.955 E 0 Cg EP +%%Page: 63 63 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 9/Times-Bold@0 SF(HISTFILE)108 84 Q F1 .265(is \ +unset or null, or if the history \214le is unwritable, the history is n\ +ot sa)2.515 F -.15(ve)-.2 G 2.766(d. After).15 F(sa)2.766 E .266 +(ving the his-)-.2 F(tory)108 96 Q(,)-.65 E/F3 10/Times-Bold@0 SF(bash) +2.5 E F1(truncates the history \214le to contain no more than)2.5 E F2 +(HISTFILESIZE)2.5 E F1(lines as described abo)2.25 E -.15(ve)-.15 G(.) +.15 E .544(If the)108 112.8 R F2(HISTTIMEFORMA)3.044 E(T)-.855 E F1 -.25 +(va)2.794 G .544(riable is set, the shell writes the timestamp informat\ +ion associated with each).25 F .94 +(history entry to the history \214le, mark)108 124.8 R .94 +(ed with the history comment character)-.1 F 3.44(,s)-.4 G 3.44(ot)-3.44 +G .94(imestamps are preserv)-3.44 F(ed)-.15 E .105 +(across shell sessions.)108 136.8 R .105(This uses the history comment \ +character to distinguish timestamps from other history)5.105 F 2.5 +(lines. As)108 148.8 R(abo)2.5 E -.15(ve)-.15 G 2.5(,w).15 G(hen using) +-2.5 E F2(HISTTIMEFORMA)2.5 E(T)-.855 E/F4 9/Times-Roman@0 SF(,)A F1 +(the timestamps delimit multi-line history entries.)2.25 E(The)108 165.6 +Q F3(fc)3.159 E F1 -.2(bu)3.159 G .659(iltin command \(see).2 F F2 .66 +(SHELL B)3.16 F(UIL)-.09 E .66(TIN COMMANDS)-.828 F F1(belo)2.91 E .66 +(w\) will list or edit and re-e)-.25 F -.15(xe)-.15 G .66(cute a por).15 +F(-)-.2 E .184(tion of the history list.)108 177.6 R(The)5.184 E F3 +(history)2.684 E F1 -.2(bu)2.684 G .184(iltin can display or modify the\ + history list and manipulate the history).2 F 3.027(\214le. When)108 +189.6 R .528(using command-line editing, search commands are a)3.027 F +-.25(va)-.2 G .528(ilable in each editing mode that pro).25 F(vide)-.15 +E(access to the history list.)108 201.6 Q 1.486(The shell allo)108 218.4 +R 1.486(ws control o)-.25 F -.15(ve)-.15 G 3.986(rw).15 G 1.486 +(hich commands are sa)-3.986 F -.15(ve)-.2 G 3.986(do).15 G 3.986(nt) +-3.986 G 1.486(he history list.)-3.986 F(The)6.485 E F2(HISTCONTR)3.985 +E(OL)-.27 E F1(and)3.735 E F2(HISTIGNORE)108 230.4 Q F1 -.25(va)2.816 G +.566(riables are used to sa).25 F .866 -.15(ve o)-.2 H .566 +(nly a subset of the commands entered.).15 F .567(If the)5.566 F F3 +(cmdhist)3.067 E F1 .567(shell op-)3.067 F 1.404 +(tion is enabled, the shell attempts to sa)108 242.4 R 1.703 -.15(ve e) +-.2 H 1.403(ach line of a multi-line command in the same history entry) +.15 F(,)-.65 E 1.712(adding semicolons where necessary to preserv)108 +254.4 R 4.212(es)-.15 G 1.713(yntactic correctness.)-4.212 F(The)6.713 E +F3(lithist)4.213 E F1 1.713(shell option modi\214es)4.213 F F3(cmdhist) +108 266.4 Q F1 .037(by sa)2.537 F .037 +(ving the command with embedded ne)-.2 F .037 +(wlines instead of semicolons.)-.25 F .036(See the description of the) +5.036 F F3(shopt)108 278.4 Q F1 -.2(bu)2.539 G .039(iltin belo).2 F +2.539(wu)-.25 G(nder)-2.539 E F2 .04(SHELL B)2.539 F(UIL)-.09 E .04 +(TIN COMMANDS)-.828 F F1 .04 +(for information on setting and unsetting shell op-)2.29 F(tions.)108 +290.4 Q/F5 10.95/Times-Bold@0 SF(HIST)72 307.2 Q(OR)-.197 E 2.738(YE) +-.383 G(XP)-2.738 E(ANSION)-.81 E F1 .611 +(The shell supports a history e)108 319.2 R .611 +(xpansion feature that is similar to the history e)-.15 F .61 +(xpansion in)-.15 F F3(csh)3.11 E F1 5.61(.T)C .61(his section)-5.61 F +(describes what syntax features are a)108 331.2 Q -.25(va)-.2 G(ilable.) +.25 E .771(History e)108 348 R .771(xpansion is enabled by def)-.15 F +.771(ault for interacti)-.1 F 1.071 -.15(ve s)-.25 H .771 +(hells, and can be disabled using the).15 F F3(+H)3.272 E F1 .772 +(option to)3.272 F(the)108 360 Q F3(set)2.513 E F1 -.2(bu)2.513 G .013 +(iltin command \(see).2 F F2 .013(SHELL B)2.513 F(UIL)-.09 E .013 +(TIN COMMANDS)-.828 F F1(belo)2.263 E 2.513(w\). Non-interacti)-.25 F +.313 -.15(ve s)-.25 H .012(hells do not perform).15 F(history e)108 372 +Q(xpansion by def)-.15 E(ault, b)-.1 E +(ut it can be enabled with \231set -H\232.)-.2 E 1.305(History e)108 +388.8 R 1.305(xpansions introduce w)-.15 F 1.306(ords from the history \ +list into the input stream, making it easy to repeat)-.1 F .21 +(commands, insert the ar)108 400.8 R .21(guments to a pre)-.18 F .209 +(vious command into the current input line, or \214x errors in pre)-.25 +F(vious)-.25 E(commands quickly)108 412.8 Q(.)-.65 E 1.163(History e)108 +429.6 R 1.163(xpansion is performed immediately after a complete line i\ +s read, before the shell breaks it into)-.15 F -.1(wo)108 441.6 S .113 +(rds, and is performed on each line indi).1 F(vidually)-.25 E 5.113(.T) +-.65 G .113(he shell attempts to inform the history e)-5.113 F .113 +(xpansion func-)-.15 F(tions about quoting still in ef)108 453.6 Q +(fect from pre)-.25 E(vious lines.)-.25 E .248(It tak)108 470.4 R .248 +(es place in tw)-.1 F 2.748(op)-.1 G 2.748(arts. The)-2.748 F .249(\214\ +rst is to determine which history list entry to use during substitution\ +.)2.748 F(The)5.249 E(second is to select portions of that entry to inc\ +lude into the current one.)108 482.4 Q .075 +(The entry selected from the history is the)108 499.2 R F0 -.15(ev)2.575 +G(ent).15 E F1 2.575(,a)C .074 +(nd the portions of that entry that are acted upon are)-2.575 F F0(wor) +2.574 E(ds)-.37 E F1(.)A -1.11(Va)108 511.2 S(rious)1.11 E F0 +(modi\214er)2.942 E(s)-.1 E F1 .443(are a)2.943 F -.25(va)-.2 G .443 +(ilable to manipulate the selected w).25 F 2.943(ords. The)-.1 F .443 +(entry is split into w)2.943 F .443(ords in the same)-.1 F -.1(fa)108 +523.2 S 1.427(shion as when reading input, so that se).1 F -.15(ve)-.25 +G(ral).15 E F0(metac)3.927 E(har)-.15 E(acter)-.15 E F1 1.427 +(-separated w)B 1.427(ords surrounded by quotes are)-.1 F .921 +(considered one w)108 535.2 R 3.421(ord. The)-.1 F F0 -.15(ev)3.421 G +.921(ent designator).15 F F1 .921(selects the e)3.421 F -.15(ve)-.25 G +.922(nt, the optional).15 F F0(wor)3.422 E 3.422(dd)-.37 G(esignator) +-3.422 E F1 .922(selects w)3.422 F(ords)-.1 E(from the e)108 547.2 Q +-.15(ve)-.25 G(nt, and v).15 E(arious optional)-.25 E F0(modi\214er)2.5 +E(s)-.1 E F1(are a)2.5 E -.25(va)-.2 G +(ilable to manipulate the selected w).25 E(ords.)-.1 E .575(History e) +108 564 R .575 +(xpansions are introduced by the appearance of the history e)-.15 F .574 +(xpansion character)-.15 F 3.074(,w)-.4 G .574(hich is)-3.074 F F3(!) +3.907 E F1 .574(by de-)3.907 F -.1(fa)108 576 S 2.5(ult. History).1 F +-.15(ex)2.5 G(pansions may appear an).15 E(ywhere in the input, b)-.15 E +(ut do not nest.)-.2 E .79(Only backslash \()108 592.8 R F3(\\).833 E F1 +3.29(\)a).833 G .79(nd single quotes can quote the history e)-3.29 F .79 +(xpansion character)-.15 F 3.291(,b)-.4 G .791(ut the history e)-3.491 F +(xpansion)-.15 E .789(character is also treated as quoted if it immedia\ +tely precedes the closing double quote in a double-quoted)108 604.8 R +(string.)108 616.8 Q(Se)108 633.6 Q -.15(ve)-.25 G .03 +(ral characters inhibit history e).15 F .03 +(xpansion if found immediately follo)-.15 F .03(wing the history e)-.25 +F .03(xpansion character)-.15 F(,)-.4 E -2.15 -.25(ev e)108 645.6 T +3.722(ni).25 G 3.722(fi)-3.722 G 3.722(ti)-3.722 G 3.722(su)-3.722 G +1.222(nquoted: space, tab, ne)-3.722 F 1.222(wline, carriage return,) +-.25 F F3(=)3.722 E F1 3.722(,a)C 1.222 +(nd the other shell metacharacters de\214ned)-3.722 F(abo)108 657.6 Q +-.15(ve)-.15 G(.).15 E 1.763(There is a special abbre)108 674.4 R 1.764 +(viation for substitution, acti)-.25 F 2.064 -.15(ve w)-.25 H 1.764 +(hen the).15 F F0(quic)4.264 E 4.264(ks)-.2 G(ubstitution)-4.264 E F1 +1.764(character \(described)4.264 F(abo)108 686.4 Q .99 -.15(ve u)-.15 H +(nder).15 E F3(histchars)3.19 E F1 3.19(\)i)C 3.19(st)-3.19 G .69 +(he \214rst character on the line.)-3.19 F .69(It selects the pre)5.69 F +.69(vious history list entry)-.25 F 3.19(,u)-.65 G .69(sing an)-3.19 F +-2.15 -.25(ev e)108 698.4 T .586(nt designator equi).25 F -.25(va)-.25 G +.586(lent to).25 F F3(!!)3.086 E F1 3.086(,a)C .586 +(nd substitutes one string for another in that entry)-3.086 F 5.587(.I) +-.65 G 3.087(ti)-5.587 G 3.087(sd)-3.087 G .587(escribed belo)-3.087 F +(w)-.25 E(under)108 710.4 Q F3(Ev)3.321 E .821(ent Designators)-.1 F F1 +5.821(.T)C .821(his is the only history e)-5.821 F .821 +(xpansion that does not be)-.15 F .82(gin with the history e)-.15 F +(xpan-)-.15 E(sion character)108 722.4 Q(.)-.55 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(63)185.955 E 0 Cg EP +%%Page: 64 64 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(Se)108 84 Q -.15(ve)-.25 G 1.216 +(ral shell options settable with the).15 F/F2 10/Times-Bold@0 SF(shopt) +3.717 E F1 -.2(bu)3.717 G 1.217(iltin will modify history e).2 F 1.217 +(xpansion beha)-.15 F 1.217(vior \(see the de-)-.2 F 1.284 +(scription of the)108 96 R F2(shopt)3.783 E F1 -.2(bu)3.783 G 1.283 +(iltin belo).2 F 1.283(w\).and If the)-.25 F F2(histv)3.783 E(erify)-.1 +E F1 1.283(shell option is enabled, and)3.783 F F2 -.18(re)3.783 G +(adline).18 E F1 1.283(is being)3.783 F .554(used, history substitution\ +s are not immediately passed to the shell parser)108 108 R 5.554(.I)-.55 +G .554(nstead, the e)-5.554 F .554(xpanded line is re-)-.15 F 2.746 +(loaded into the)108 120 R F2 -.18(re)5.246 G(adline).18 E F1 2.746 +(editing b)5.246 F(uf)-.2 E 2.746(fer for further modi\214cation.)-.25 F +(If)7.746 E F2 -.18(re)5.246 G(adline).18 E F1 2.746 +(is being used, and the)5.246 F F2(histr)108 132 Q(eedit)-.18 E F1 .825 +(shell option is enabled, a f)3.325 F .825 +(ailed history substitution is reloaded into the)-.1 F F2 -.18(re)3.326 +G(adline).18 E F1 .826(editing b)3.326 F(uf)-.2 E(fer)-.25 E +(for correction.)108 144 Q(The)108 160.8 Q F22.699 E F1 .199 +(option to the)2.699 F F2(history)2.699 E F1 -.2(bu)2.699 G .199 +(iltin command sho).2 F .199(ws what a history e)-.25 F .199 +(xpansion will do before using it.)-.15 F(The)5.198 E F2108 172.8 +Q F1 .377(option to the)2.877 F F2(history)2.877 E F1 -.2(bu)2.878 G +.378(iltin will add commands to the end of the history list without act\ +ually e).2 F -.15(xe)-.15 G(cuting).15 E(them, so that the)108 184.8 Q +2.5(ya)-.15 G(re a)-2.5 E -.25(va)-.2 G(ilable for subsequent recall.) +.25 E 1.109(The shell allo)108 201.6 R 1.108(ws control of the v)-.25 F +1.108(arious characters used by the history e)-.25 F 1.108 +(xpansion mechanism \(see the de-)-.15 F .162(scription of)108 213.6 R +F2(histchars)2.662 E F1(abo)2.662 E .462 -.15(ve u)-.15 H(nder).15 E F2 +.163(Shell V)2.662 F(ariables)-.92 E F1 2.663(\). The)B .163 +(shell uses the history comment character to mark)2.663 F +(history timestamps when writing the history \214le.)108 225.6 Q F2(Ev) +87 242.4 Q(ent Designators)-.1 E F1 .586(An e)108 254.4 R -.15(ve)-.25 G +.586(nt designator is a reference to an entry in the history list.).15 F +.586(The e)5.586 F -.15(ve)-.25 G .585 +(nt designator consists of the por).15 F(-)-.2 E 1.305(tion of the w)108 +266.4 R 1.305(ord be)-.1 F 1.305(ginning with the history e)-.15 F 1.306 +(xpansion character and ending with the w)-.15 F 1.306 +(ord designator if)-.1 F .445(present, or the end of the w)108 278.4 R +2.945(ord. Unless)-.1 F .444(the reference is absolute, e)2.945 F -.15 +(ve)-.25 G .444(nts are relati).15 F .744 -.15(ve t)-.25 H 2.944(ot).15 +G .444(he current position)-2.944 F(in the history list.)108 290.4 Q F2 +(!)108 307.2 Q F1 .078(Start a history substitution, e)144 307.2 R .078 +(xcept when follo)-.15 F .079(wed by a)-.25 F F2(blank)2.579 E F1 2.579 +(,n)C -.25(ew)-2.579 G .079(line, carriage return, =, or).25 F 2.579(,w) +-.4 G(hen)-2.579 E(the)144 319.2 Q F2(extglob)2.5 E F1 +(shell option is enabled using the)2.5 E F2(shopt)2.5 E F1 -.2(bu)2.5 G +(iltin, \(.).2 E F2(!)108 331.2 Q F0(n)A F1(Refer to history list entry) +144 331.2 Q F0(n)2.86 E F1(.).24 E F2<21ad>108 343.2 Q F0(n)A F1 +(Refer to the current entry minus)144 343.2 Q F0(n)2.86 E F1(.).24 E F2 +(!!)108 355.2 Q F1(Refer to the pre)144 355.2 Q(vious entry)-.25 E 5(.T) +-.65 G(his is a synon)-5 E(ym for \231!\2551\232.)-.15 E F2(!)108 367.2 +Q F0(string)A F1 .865(Refer to the most recent command preceding the cu\ +rrent position in the history list starting with)144 367.2 R F0(string) +144.34 379.2 Q F1(.).22 E F2(!?)108 391.2 Q F0(string)A F2([?])A F1 +1.503(Refer to the most recent command preceding the current position i\ +n the history list containing)144 403.2 R F0(string)144.34 415.2 Q F1 +5.497(.T).22 G .497(he trailing)-5.497 F F2(?)2.997 E F1 .497 +(may be omitted if)2.997 F F0(string)3.337 E F1 .496(is follo)3.216 F +.496(wed immediately by a ne)-.25 F 2.996(wline. If)-.25 F F0(string) +2.996 E F1(is)2.996 E .039(missing, this uses the string from the most \ +recent search; it is an error if there is no pre)144 427.2 R .04 +(vious search)-.25 F(string.)144 439.2 Q/F3 12/Times-Bold@0 SF<00>108 +456.2 Q F0(string1)-5 I F3<00>5 I F0(string2)-5 I F3<00>5 I F1 .753 +(Quick substitution.)144 463.2 R .753(Repeat the pre)5.753 F .753 +(vious command, replacing)-.25 F F0(string1)3.593 E F1(with)3.253 E F0 +(string2)3.592 E F1 5.752(.E).02 G(qui)-5.752 E -.25(va)-.25 G .752 +(lent to).25 F(\231!!:s)144 475.2 Q/F4 12/Times-Roman@0 SF<00>5 I F0 +(string1)-5 I F4<00>5 I F0(string2)-5 I F4<00>5 I F1 2.5<9a28>-5 K(see) +-2.5 E F2(Modi\214ers)2.5 E F1(belo)2.5 E(w\).)-.25 E F2(!#)108 487.2 Q +F1(The entire command line typed so f)144 487.2 Q(ar)-.1 E(.)-.55 E F2 +-.75(Wo)87 504 S(rd Designators).75 E F1 -.8(Wo)108 516 S .067 +(rd designators are used to select desired w).8 F .067(ords from the e) +-.1 F -.15(ve)-.25 G 2.567(nt. The).15 F 2.567(ya)-.15 G .067 +(re optional; if the w)-2.567 F .068(ord designator)-.1 F(isn')108 528 Q +3.516(ts)-.18 G 1.016(upplied, the history e)-3.516 F 1.016 +(xpansion uses the entire e)-.15 F -.15(ve)-.25 G 3.516(nt. A).15 F F2 +(:)3.516 E F1 1.015(separates the e)3.515 F -.15(ve)-.25 G 1.015 +(nt speci\214cation from the).15 F -.1(wo)108 540 S .331(rd designator) +.1 F 5.331(.I)-.55 G 2.832(tm)-5.331 G .332(ay be omitted if the w) +-2.832 F .332(ord designator be)-.1 F .332(gins with a)-.15 F F2<00> +2.832 E F1(,)A F2($)2.832 E F1(,)A F2(*)2.832 E F1(,)A F22.832 E F1 +2.832(,o)C(r)-2.832 E F2(%)2.832 E F1 5.332(.W)C .332(ords are num-) +-6.132 F .194(bered from the be)108 552 R .194 +(ginning of the line, with the \214rst w)-.15 F .194 +(ord being denoted by 0 \(zero\).)-.1 F -.8(Wo)5.193 G .193 +(rds are inserted into).8 F +(the current line separated by single spaces.)108 564 Q F2 2.5(0\()108 +580.8 S(zer)-2.5 E(o\))-.18 E F1(The zeroth w)144 592.8 Q 2.5(ord. F)-.1 +F(or the shell, this is the command w)-.15 E(ord.)-.1 E F0(n)108.36 +604.8 Q F1(The)144 604.8 Q F0(n)2.5 E F1(th w)A(ord.)-.1 E F2<00>108 +616.8 Q F1(The \214rst ar)144 616.8 Q(gument: w)-.18 E(ord 1.)-.1 E F2 +($)108 628.8 Q F1 .063(The last w)144 628.8 R 2.563(ord. This)-.1 F .063 +(is usually the last ar)2.563 F .064(gument, b)-.18 F .064(ut will e)-.2 +F .064(xpand to the zeroth w)-.15 F .064(ord if there is only)-.1 F +(one w)144 640.8 Q(ord in the line.)-.1 E F2(%)108 652.8 Q F1 1.125 +(The \214rst w)144 652.8 R 1.125(ord matched by the most recent \231?) +-.1 F F0(string)A F1 3.624(?\232 search,)B 1.124 +(if the search string be)3.624 F 1.124(gins with a)-.15 F .486 +(character that is part of a w)144 664.8 R 2.986(ord. By)-.1 F(def)2.986 +E .486(ault, searches be)-.1 F .487 +(gin at the end of each line and proceed to)-.15 F(the be)144 676.8 Q +(ginning, so the \214rst w)-.15 E +(ord matched is the one closest to the end of the line.)-.1 E F0(x) +108.77 688.8 Q F2A F0(y)A F1 2.5(Ar)144 688.8 S(ange of w)-2.5 E +(ords; \231\255)-.1 E F0(y)A F1 2.5<9a61>C(bbre)-2.5 E(viates \2310\255) +-.25 E F0(y)A F1<9a2e>A F2(*)108 700.8 Q F1 .219(All of the w)144 700.8 +R .219(ords b)-.1 F .219(ut the zeroth.)-.2 F .219(This is a synon)5.219 +F .219(ym for \231)-.15 F F0(1\255$)A F1 2.719(\232. It)B .218 +(is not an error to use)2.719 F F2(*)2.718 E F1 .218(if there is)2.718 F +(just one w)144 712.8 Q(ord in the e)-.1 E -.15(ve)-.25 G(nt; it e).15 E +(xpands to the empty string in that case.)-.15 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(64)185.955 E 0 Cg EP +%%Page: 65 65 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(x*)108 84 Q F1(Abbre)144 84 Q +(viates)-.25 E F0(x\255$)2.5 E F1(.)A F2<78ad>108 96 Q F1(Abbre)144 96 Q +(viates)-.25 E F0(x\255$)2.5 E F1(lik)2.5 E(e)-.1 E F2(x*)2.5 E F1 2.5 +(,b)C(ut omits the last w)-2.7 E 2.5(ord. If)-.1 F F2(x)2.5 E F1 +(is missing, it def)2.5 E(aults to 0.)-.1 E .368(If a w)108 112.8 R .368 +(ord designator is supplied without an e)-.1 F -.15(ve)-.25 G .368 +(nt speci\214cation, the pre).15 F .369(vious command is used as the e) +-.25 F -.15(ve)-.25 G(nt,).15 E(equi)108 124.8 Q -.25(va)-.25 G(lent to) +.25 E F2(!!)2.5 E F1(.)A F2(Modi\214ers)87 141.6 Q F1 .47 +(After the optional w)108 153.6 R .47(ord designator)-.1 F 2.97(,t)-.4 G +.47(he e)-2.97 F .469 +(xpansion may include a sequence of one or more of the follo)-.15 F +(wing)-.25 E(modi\214ers, each preceded by a \231:\232.)108 165.6 Q +(These modify)5 E 2.5(,o)-.65 G 2.5(re)-2.5 G(dit, the w)-2.5 E +(ord or w)-.1 E(ords selected from the history e)-.1 E -.15(ve)-.25 G +(nt.).15 E F2(h)108 182.4 Q F1(Remo)144 182.4 Q .3 -.15(ve a t)-.15 H +(railing pathname component, lea).15 E(ving only the head.)-.2 E F2(t) +108 194.4 Q F1(Remo)144 194.4 Q .3 -.15(ve a)-.15 H +(ll leading pathname components, lea).15 E(ving the tail.)-.2 E F2(r)108 +206.4 Q F1(Remo)144 206.4 Q .3 -.15(ve a t)-.15 H(railing suf).15 E +(\214x of the form)-.25 E F0(.xxx)2.5 E F1 2.5(,l)C(ea)-2.5 E +(ving the basename.)-.2 E F2(e)108 218.4 Q F1(Remo)144 218.4 Q .3 -.15 +(ve a)-.15 H(ll b).15 E(ut the trailing suf)-.2 E(\214x.)-.25 E F2(p)108 +230.4 Q F1(Print the ne)144 230.4 Q 2.5(wc)-.25 G(ommand b)-2.5 E +(ut do not e)-.2 E -.15(xe)-.15 G(cute it.).15 E F2(q)108 242.4 Q F1 +(Quote the substituted w)144 242.4 Q +(ords, escaping further substitutions.)-.1 E F2(x)108 254.4 Q F1 .385 +(Quote the substituted w)144 254.4 R .385(ords as with)-.1 F F2(q)2.885 +E F1 2.885(,b)C .386(ut break into w)-3.085 F .386(ords at)-.1 F F2 +(blanks)2.886 E F1 .386(and ne)2.886 F 2.886(wlines. The)-.25 F F2(q) +2.886 E F1(and)2.886 E F2(x)2.886 E F1(modi\214ers are mutually e)144 +266.4 Q(xclusi)-.15 E -.15(ve)-.25 G 2.5(;e).15 G +(xpansion uses the last one supplied.)-2.65 E F2(s/)108 278.4 Q F0(old)A +F2(/)A F0(ne)A(w)-.15 E F2(/)A F1(Substitute)144 290.4 Q F0(ne)3.329 E +(w)-.15 E F1 .469(for the \214rst occurrence of)3.279 F F0(old)3.199 E +F1 .469(in the e)3.739 F -.15(ve)-.25 G .469(nt line.).15 F(An)5.469 E +2.969(yc)-.15 G .469(haracter may be used as the)-2.969 F .294 +(delimiter in place of /.)144 302.4 R .295 +(The \214nal delimiter is optional if it is the last character of the e) +5.294 F -.15(ve)-.25 G .295(nt line.).15 F(A)5.295 E .229 +(single backslash quotes the delimiter in)144 314.4 R F0(old)2.959 E F1 +(and)3.498 E F0(ne)3.088 E(w)-.15 E F1 5.228(.I).31 G 2.728(f&a)-5.228 G +.228(ppears in)-2.728 F F0(ne)3.088 E(w)-.15 E F1 2.728(,i).31 G 2.728 +(ti)-2.728 G 2.728(sr)-2.728 G .228(eplaced with)-2.728 F F0(old)2.958 E +F1(.).77 E 2.986(As)144 326.4 S .486(ingle backslash quotes the &.) +-2.986 F(If)5.486 E F0(old)3.216 E F1 .486 +(is null, it is set to the last)3.756 F F0(old)3.216 E F1 .487 +(substituted, or)3.756 F 2.987(,i)-.4 G 2.987(fn)-2.987 G 2.987(op) +-2.987 G(re)-2.987 E(vi-)-.25 E 1.09 +(ous history substitutions took place, the last)144 338.4 R F0(string) +3.93 E F1 1.09(in a)3.81 F F2(!?)3.59 E F0(string)A F2([?])A F1 3.59 +(search. If)6.09 F F0(ne)3.95 E(w)-.15 E F1 1.09(is null, each)3.9 F +(matching)144 350.4 Q F0(old)2.73 E F1(is deleted.)3.27 E F2(&)108 362.4 +Q F1(Repeat the pre)144 362.4 Q(vious substitution.)-.25 E F2(g)108 +374.4 Q F1 .267(Cause changes to be applied o)144 374.4 R -.15(ve)-.15 G +2.767(rt).15 G .267(he entire e)-2.767 F -.15(ve)-.25 G .267(nt line.) +.15 F .267(This is used in conjunction with \231)5.267 F F2(:s)A F1 +2.768<9a28>C(e.g.,)-2.768 E<99>144 386.4 Q F2(:gs/)A F0(old)A F2(/)A F0 +(ne)A(w)-.15 E F2(/)A F1(\232\) or \231)A F2(:&)A F1 2.5(\232. If)B +(used with \231)2.5 E F2(:s)A F1(\232, an)A 2.5(yd)-.15 G +(elimiter can be used in place of /, and the \214nal de-)-2.5 E +(limiter is optional if it is the last character of the e)144 398.4 Q +-.15(ve)-.25 G(nt line.).15 E(An)5 E F2(a)2.5 E F1 +(may be used as a synon)2.5 E(ym for)-.15 E F2(g)2.5 E F1(.)A F2(G)108 +410.4 Q F1(Apply the follo)144 410.4 Q(wing \231)-.25 E F2(s)A F1 2.5 +<9a6f>C 2.5<7299>-2.5 G F2(&)-2.5 E F1 2.5<9a6d>C +(odi\214er once to each w)-2.5 E(ord in the e)-.1 E -.15(ve)-.25 G +(nt line.).15 E/F3 10.95/Times-Bold@0 SF(SHELL B)72 427.2 Q(UIL)-.11 E +(TIN COMMANDS)-1.007 E F1 .063(Unless otherwise noted, each b)108 439.2 +R .062(uiltin command documented in this section as accepting options p\ +receded by)-.2 F F2108 451.2 Q F1(accepts)3.077 E F23.077 E F1 +.577(to signify the end of the options.)3.077 F(The)5.577 E F2(:)3.077 E +F1(,)A F2(true)3.077 E F1(,)A F2(false)3.077 E F1 3.077(,a)C(nd)-3.077 E +F2(test)3.077 E F1(/)A F2([)A F1 -.2(bu)3.077 G .577 +(iltins do not accept options).2 F .462(and do not treat)108 463.2 R F2 +2.961 E F1(specially)2.961 E 5.461(.T)-.65 G(he)-5.461 E F2(exit) +2.961 E F1(,)A F2(logout)2.961 E F1(,)A F2 -.18(re)2.961 G(tur).18 E(n) +-.15 E F1(,)A F2(br)2.961 E(eak)-.18 E F1(,)A F2(continue)2.961 E F1(,)A +F2(let)2.961 E F1 2.961(,a)C(nd)-2.961 E F2(shift)2.961 E F1 -.2(bu) +2.961 G .461(iltins accept and).2 F .26(process ar)108 475.2 R .26 +(guments be)-.18 F .26(ginning with)-.15 F F22.76 E F1 .261 +(without requiring)2.76 F F22.761 E F1 5.261(.O)C .261(ther b) +-5.261 F .261(uiltins that accept ar)-.2 F .261(guments b)-.18 F .261 +(ut are not)-.2 F 1.154(speci\214ed as accepting options interpret ar) +108 487.2 R 1.154(guments be)-.18 F 1.154(ginning with)-.15 F F2 +3.654 E F1 1.154(as in)3.654 F -.25(va)-.4 G 1.154 +(lid options and require).25 F F23.654 E F1(to)3.654 E(pre)108 +499.2 Q -.15(ve)-.25 G(nt this interpretation.).15 E F2(:)108 516 Q F1 +([)2.5 E F0(ar)A(guments)-.37 E F1(])A .451(No ef)144 528 R .451 +(fect; the command does nothing be)-.25 F .452(yond e)-.15 F(xpanding) +-.15 E F0(ar)3.282 E(guments)-.37 E F1 .452(and performing an)3.222 F +2.952(ys)-.15 G(peci\214ed)-2.952 E 2.5(redirections. The)144 540 R +(return status is zero.)2.5 E F2(.)108 556.8 Q F1([)2.5 E F2A F0 +(path)2.5 E F1(])A F0(\214lename)2.5 E F1([)2.5 E F0(ar)A(guments)-.37 E +F1(])A F2(sour)108 568.8 Q(ce)-.18 E F1([)2.5 E F2A F0(path)2.5 E +F1(])A F0(\214lename)2.5 E F1([)2.5 E F0(ar)A(guments)-.37 E F1(])A(The) +144 580.8 Q F2(.)2.79 E F1 .29(command \()2.79 F F2(sour)A(ce)-.18 E F1 +2.79(\)r)C .289(eads and e)-2.79 F -.15(xe)-.15 G .289 +(cute commands from).15 F F0(\214lename)4.699 E F1 .289 +(in the current shell en)2.969 F(viron-)-.4 E(ment and returns the e)144 +592.8 Q(xit status of the last command e)-.15 E -.15(xe)-.15 G +(cuted from).15 E F0(\214lename)4.41 E F1(.).18 E(If)144 609.6 Q F0 +(\214lename)2.662 E F1 .162(does not contain a slash,)2.662 F F2(.)2.662 +E F1 .162(searches for it.)2.662 F .162(If the)5.162 F F22.662 E +F1 .163(option is supplied,)2.663 F F2(.)2.663 E F1(treats)2.663 E F0 +(path)2.663 E F1 .163(as a)2.663 F .598 +(colon-separated list of directories in which to \214nd)144 621.6 R F0 +(\214lename)3.097 E F1 3.097(;o)C(therwise,)-3.097 E F2(.)3.097 E F1 +.597(uses the entries in)3.097 F/F4 9/Times-Bold@0 SF -.666(PA)3.097 G +(TH)-.189 E F1 .302(to \214nd the directory containing)144 633.6 R F0 +(\214lename)4.712 E F1(.).18 E F0(\214lename)5.303 E F1 .303 +(does not need to be e)2.803 F -.15(xe)-.15 G 2.803(cutable. When).15 F +F2(bash)2.803 E F1(is)2.803 E .459 +(not in posix mode, it searches the current directory if)144 645.6 R F0 +(\214lename)2.959 E F1 .459(is not found in)2.959 F F4 -.666(PA)2.959 G +(TH)-.189 E/F5 9/Times-Roman@0 SF(,)A F1 -.2(bu)2.708 G 2.958(td).2 G +.458(oes not)-2.958 F .6(search the current directory if)144 657.6 R F2 +3.1 E F1 .6(is supplied.)3.1 F .6(If the)5.6 F F2(sour)3.1 E +(cepath)-.18 E F1 .6(option to the)3.1 F F2(shopt)3.1 E F1 -.2(bu)3.1 G +.6(iltin com-).2 F(mand is turned of)144 669.6 Q(f,)-.25 E F2(.)2.5 E F1 +(does not search)2.5 E F4 -.666(PA)2.5 G(TH)-.189 E F5(.)A F1 .65(If an) +144 686.4 R(y)-.15 E F0(ar)3.15 E(guments)-.37 E F1 .649 +(are supplied, the)3.15 F 3.149(yb)-.15 G .649 +(ecome the positional parameters when)-3.149 F F0(\214lename)3.149 E F1 +.649(is e)3.149 F -.15(xe)-.15 G(cuted.).15 E +(Otherwise the positional parameters are unchanged.)144 698.4 Q .498 +(If the)144 715.2 R F22.998 E F1 .498(option is enabled,)2.998 F +F2(.)2.998 E F1 .498(inherits an)2.998 F 2.998(yt)-.15 G .498(rap on) +-2.998 F F2(DEB)2.999 E(UG)-.1 E F1 2.999(;i)C 2.999(fi)-2.999 G 2.999 +(ti)-2.999 G 2.999(sn)-2.999 G .499(ot, an)-2.999 F(y)-.15 E F2(DEB) +2.999 E(UG)-.1 E F1 .499(trap string is)2.999 F(sa)144 727.2 Q -.15(ve) +-.2 G 3.26(da).15 G .76(nd restored around the call to)-3.26 F F2(.)3.26 +E F1 3.26(,a)C(nd)-3.26 E F2(.)3.26 E F1 .76(unsets the)3.26 F F2(DEB) +3.26 E(UG)-.1 E F1 .76(trap while it e)3.26 F -.15(xe)-.15 G 3.26 +(cutes. If).15 F F23.26 E F1(is)3.26 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(65)185.955 E 0 Cg EP +%%Page: 66 66 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E 1.076(not set, and the sourced \214le changes the) +144 84 R/F2 10/Times-Bold@0 SF(DEB)3.576 E(UG)-.1 E F1 1.076 +(trap, the ne)3.576 F 3.576(wv)-.25 G 1.077(alue persists after)-3.826 F +F2(.)3.577 E F1(completes.)3.577 E .424 +(The return status is the status of the last command e)144 96 R -.15(xe) +-.15 G .423(cuted from).15 F F0(\214lename)2.923 E F1 .423 +(\(0 if no commands are)2.923 F -.15(exe)144 108 S +(cuted\), and non-zero if).15 E F0(\214lename)4.41 E F1 +(is not found or cannot be read.)2.68 E F2(alias)108 124.8 Q F1([)2.5 E +F2A F1 2.5(][)C F0(name)-2.5 E F1([=)A F0(value)A F1 2.5(].)C +1.666(..)-.834 G(])-1.666 E -.4(Wi)144 136.8 S 2.6(th no ar).4 F 2.6 +(guments or with the)-.18 F F25.1 E F1(option,)5.1 E F2(alias) +5.101 E F1 2.601(prints the list of aliases in the form)5.101 F F2 +(alias)5.101 E F0(name)144 148.8 Q F1(=)A F0(value)A F1 1.715 +(on standard output.)4.215 F 1.715(When ar)6.715 F 1.714 +(guments are supplied, de\214ne an alias for each)-.18 F F0(name)4.214 E +F1(whose)144 160.8 Q F0(value)2.508 E F1 .009(is gi)2.508 F -.15(ve)-.25 +G 2.509(n. A).15 F .009(trailing space in)2.509 F F0(value)2.509 E F1 +.009(causes the ne)2.509 F .009(xt w)-.15 F .009(ord to be check)-.1 F +.009(ed for alias substi-)-.1 F .027(tution when the alias is e)144 +172.8 R .026(xpanded during command parsing.)-.15 F -.15(Fo)5.026 G +2.526(re).15 G(ach)-2.526 E F0(name)2.526 E F1 .026(in the ar)2.526 F +.026(gument list for)-.18 F .303(which no)144 184.8 R F0(value)2.803 E +F1 .304(is supplied, print the name and v)2.804 F .304 +(alue of the alias)-.25 F F0(name)2.804 E F1(.)A F2(alias)5.304 E F1 +.304(returns true unless a)2.804 F F0(name)144 196.8 Q F1(is gi)2.5 E +-.15(ve)-.25 G 2.5(n\().15 G(without a corresponding =)-2.5 E F0(value)A +F1 2.5(\)f)C(or which no alias has been de\214ned.)-2.5 E F2(bg)108 +213.6 Q F1([)2.5 E F0(jobspec)A F1 1.666(...)2.5 G(])-1.666 E .745 +(Resume each suspended job)144 225.6 R F0(jobspec)3.245 E F1 .745 +(in the background, as if it had been started with)3.245 F F2(&)3.244 E +F1 5.744(.I)C(f)-5.744 E F0(job-)4.984 E(spec)144 237.6 Q F1 .949 +(is not present, the shell uses its notion of the)3.759 F F0(curr)3.45 E +.95(ent job)-.37 F F1(.)A F2(bg)5.95 E F0(jobspec)5.19 E F1 .95 +(returns 0 unless run)3.76 F .419(when job control is disabled or)144 +249.6 R 2.919(,w)-.4 G .419(hen run with job control enabled, an)-2.919 +F 2.918(ys)-.15 G(peci\214ed)-2.918 E F0(jobspec)2.918 E F1 -.1(wa)2.918 +G 2.918(sn).1 G(ot)-2.918 E(found or w)144 261.6 Q +(as started without job control.)-.1 E F2(bind)108 278.4 Q F1([)2.5 E F2 +A F0 -.1(ke)2.5 G(ymap)-.2 E F1 2.5(][)C F2(\255lsvSVX)-2.5 E F1 +(])A F2(bind)108 290.4 Q F1([)2.5 E F2A F0 -.1(ke)2.5 G(ymap)-.2 E +F1 2.5(][)C F2-2.5 E F0(function)2.5 E F1 2.5(][)C F2-2.5 E +F0(function)2.5 E F1 2.5(][)C F2-2.5 E F0 -.1(ke)2.5 G(yseq)-.2 E +F1(])A F2(bind)108 302.4 Q F1([)2.5 E F2A F0 -.1(ke)2.5 G(ymap)-.2 +E F1(])A F22.5 E F0(\214lename)2.5 E F2(bind)108 314.4 Q F1([)2.5 +E F2A F0 -.1(ke)2.5 G(ymap)-.2 E F1(])A F22.5 E F0 -.1(ke) +2.5 G(yseq)-.2 E F1([:])A F0(shell\255command)2.5 E F2(bind)108 326.4 Q +F1([)2.5 E F2A F0 -.1(ke)2.5 G(ymap)-.2 E F1(])A F0 -.1(ke)2.5 G +(yseq)-.2 E F1(:)A F0(function\255name)A F2(bind)108 338.4 Q F1([)2.5 E +F2A F0 -.1(ke)2.5 G(ymap)-.2 E F1(])A F22.5 E F1(|)A F2 +A F1([)2.5 E F0 -.37(re)C(adline\255command).37 E F1(])A F2(bind) +108 350.4 Q F1([)2.5 E F2A F0 -.1(ke)2.5 G(ymap)-.2 E F1(])A F0 +-.1(ke)2.5 G(yseq)-.2 E F1(:)A F0 -.37(re)C(adline\255command).37 E F2 +(bind)108 362.4 Q F0 -.37(re)2.5 G(adline-command-line).37 E F1 .238 +(Display current)144 374.4 R F2 -.18(re)2.738 G(adline).18 E F1 -.1(ke) +2.738 G 2.738(ya)-.05 G .239(nd function bindings, bind a k)-2.738 F +.539 -.15(ey s)-.1 H .239(equence to a).15 F F2 -.18(re)2.739 G(adline) +.18 E F1 .239(function or)2.739 F .211 +(macro or to a shell command, or set a)144 386.4 R F2 -.18(re)2.711 G +(adline).18 E F1 -.25(va)2.711 G 2.711(riable. Each).25 F .211 +(non-option ar)2.711 F .211(gument is a k)-.18 F .511 -.15(ey b)-.1 H +(ind-).15 E .258(ing or command as it w)144 398.4 R .259 +(ould appear in a)-.1 F F2 -.18(re)2.759 G(adline).18 E F1 .259 +(initialization \214le such as)2.759 F F0(.inputr)2.989 E(c)-.37 E F1 +2.759(,b).31 G .259(ut each bind-)-2.959 F .782 +(ing or command must be passed as a separate ar)144 410.4 R .781(gument\ +; e.g., \010"\\C\255x\\C\255r": re\255read\255init\255\214le\010.)-.18 F +(In)5.781 E .192(the follo)144 422.4 R .192(wing descriptions, output a) +-.25 F -.25(va)-.2 G .192 +(ilable to be re-read is formatted as commands that w).25 F .193 +(ould ap-)-.1 F .941(pear in a)144 434.4 R F2 -.18(re)3.441 G(adline).18 +E F1 .941(initialization \214le or that w)3.441 F .941 +(ould be supplied as indi)-.1 F .94(vidual ar)-.25 F .94(guments to a) +-.18 F F2(bind)3.44 E F1 2.5(command. Options,)144 446.4 R +(if supplied, ha)2.5 E .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:) +-.25 E F2144 458.4 Q F0 -.1(ke)2.5 G(ymap)-.2 E F1(Use)180 470.4 Q +F0 -.1(ke)5.158 G(ymap)-.2 E F1 2.658(as the k)5.348 F -.15(ey)-.1 G +2.658(map to be af).15 F 2.659(fected by the subsequent bindings.)-.25 F +(Acceptable)7.659 E F0 -.1(ke)180 482.4 S(ymap)-.2 E F1 3.193(names are) +5.883 F F0 3.193(emacs, emacs\255standar)5.693 F 3.192 +(d, emacs\255meta, emacs\255ctlx, vi, vi\255mo)-.37 F(ve)-.1 E(,)-.1 E +(vi\255command)180 494.4 Q F1 4.089(,a)C(nd)-4.089 E F0(vi\255insert) +4.379 E F1(.).68 E F0(vi)6.589 E F1 1.589(is equi)4.089 F -.25(va)-.25 G +1.589(lent to).25 F F0(vi\255command)4.089 E F1(\()4.089 E F0(vi\255mo)A +(ve)-.1 E F1 1.59(is also a syn-)4.089 F(on)180 506.4 Q(ym\);)-.15 E F0 +(emacs)2.5 E F1(is equi)2.5 E -.25(va)-.25 G(lent to).25 E F0 +(emacs\255standar)2.5 E(d)-.37 E F1(.)A F2144 518.4 Q F1 +(List the names of all)180 518.4 Q F2 -.18(re)2.5 G(adline).18 E F1 +(functions.)2.5 E F2144 530.4 Q F1(Display)180 530.4 Q F2 -.18(re) +2.982 G(adline).18 E F1 .481(function names and bindings in such a w) +2.982 F .481(ay that the)-.1 F 2.981(yc)-.15 G .481(an be used as an) +-2.981 F(ar)180 542.4 Q .192(gument to a subsequent)-.18 F F2(bind)2.692 +E F1 .192(command or in a)2.692 F F2 -.18(re)2.692 G(adline).18 E F1 +.193(initialization \214le.)2.693 F .193(If ar)5.193 F(guments)-.18 E +1.524(remain after option processing,)180 554.4 R F2(bind)4.024 E F1 +1.523(treats them as)4.023 F F2 -.18(re)4.023 G(adline).18 E F1 1.523 +(command names and re-)4.023 F(stricts output to those names.)180 566.4 +Q F2144 578.4 Q F1 .173(List current)180 578.4 R F2 -.18(re)2.673 +G(adline).18 E F1 .173(function names and bindings.)2.673 F .173(If ar) +5.173 F .174(guments remain after option pro-)-.18 F(cessing,)180 590.4 +Q F2(bind)4.855 E F1 2.354(treats them as)4.855 F F2 -.18(re)4.854 G +(adline).18 E F1 2.354(command names and restricts output to those)4.854 +F(names.)180 602.4 Q F2144 614.4 Q F1(Display)180 614.4 Q F2 -.18 +(re)3.655 G(adline).18 E F1 -.1(ke)3.655 G 3.655(ys)-.05 G 1.155 +(equences bound to macros and the strings the)-3.655 F 3.655(yo)-.15 G +1.155(utput in such a)-3.655 F -.1(wa)180 626.4 S 2.555(yt).1 G .055 +(hat the)-2.555 F 2.555(yc)-.15 G .055(an be used as an ar)-2.555 F .055 +(gument to a subsequent)-.18 F F2(bind)2.555 E F1 .054(command or in a) +2.554 F F2 -.18(re)2.554 G(adline).18 E F1(initialization \214le.)180 +638.4 Q F2144 650.4 Q F1(Display)180 650.4 Q F2 -.18(re)2.5 G +(adline).18 E F1 -.1(ke)2.5 G 2.5(ys)-.05 G +(equences bound to macros and the strings the)-2.5 E 2.5(yo)-.15 G +(utput.)-2.5 E F2144 662.4 Q F1(Display)180 662.4 Q F2 -.18(re) +2.783 G(adline).18 E F1 -.25(va)2.783 G .283(riable names and v).25 F +.283(alues in such a w)-.25 F .284(ay that the)-.1 F 2.784(yc)-.15 G +.284(an be used as an ar)-2.784 F(-)-.2 E(gument to a subsequent)180 +674.4 Q F2(bind)2.5 E F1(command or in a)2.5 E F2 -.18(re)2.5 G(adline) +.18 E F1(initialization \214le.)2.5 E F2144 686.4 Q F1 +(List current)180 686.4 Q F2 -.18(re)2.5 G(adline).18 E F1 -.25(va)2.5 G +(riable names and v).25 E(alues.)-.25 E F2144 698.4 Q F0 +(\214lename)2.5 E F1(Read k)180 710.4 Q .3 -.15(ey b)-.1 H(indings from) +.15 E F0(\214lename)2.5 E F1(.)A(GNU Bash 5.3)72 768 Q(2024 December 12) +136.795 E(66)185.955 E 0 Cg EP +%%Page: 67 67 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF144 84 Q F0(function)2.5 +E F1(Display k)180 96 Q .3 -.15(ey s)-.1 H(equences that in).15 E -.2 +(vo)-.4 G .2 -.1(ke t).2 H(he named).1 E F2 -.18(re)2.5 G(adline).18 E +F0(function)2.5 E F1(.)A F2144 108 Q F0(function)2.5 E F1 +(Unbind all k)180 120 Q .3 -.15(ey s)-.1 H(equences bound to the named) +.15 E F2 -.18(re)2.5 G(adline).18 E F0(function)2.5 E F1(.)A F2144 +132 Q F0 -.1(ke)2.5 G(yseq)-.2 E F1(Remo)180 144 Q .3 -.15(ve a)-.15 H +.3 -.15(ny c).15 H(urrent binding for).15 E F0 -.1(ke)2.5 G(yseq)-.2 E +F1(.)A F2144 156 Q F0 -.1(ke)2.5 G(yseq)-.2 E F2([: ])A F0 +(shell\255command)A F1(Cause)180 168 Q F0(shell\255command)4.345 E F1 +1.845(to be e)4.345 F -.15(xe)-.15 G 1.845(cuted whene).15 F -.15(ve) +-.25 G(r).15 E F0 -.1(ke)4.345 G(yseq)-.2 E F1 1.844(is entered.)4.344 F +1.844(The separator be-)6.844 F(tween)180 180 Q F0 -.1(ke)3.015 G(yseq) +-.2 E F1(and)3.015 E F0(shell\255command)3.016 E F1 .516 +(is either whitespace or a colon optionally follo)3.016 F .516(wed by) +-.25 F 3.459(whitespace. If)180 192 R .958(the separator is whitespace,) +3.459 F F0(shell\255command)3.458 E F1 .958(must be enclosed in double) +3.458 F .622(quotes and)180 204 R F2 -.18(re)3.122 G(adline).18 E F1 +-.15(ex)3.122 G .623(pands an).15 F 3.123(yo)-.15 G 3.123(fi)-3.123 G +.623(ts special backslash-escapes in)-3.123 F F0(shell\255command)3.123 +E F1(be-)3.123 E .713(fore sa)180 216 R .713(ving it.)-.2 F .713 +(If the separator is a colon, an)5.713 F 3.213(ye)-.15 G .712 +(nclosing double quotes are optional, and)-3.213 F F2 -.18(re)180 228 S +(adline).18 E F1 .098(does not e)2.598 F .098 +(xpand the command string before sa)-.15 F .099(ving it.)-.2 F .099 +(Since the entire k)5.099 F .399 -.15(ey b)-.1 H(ind-).15 E .641(ing e) +180 240 R .641(xpression must be a single ar)-.15 F .641 +(gument, it should be enclosed in single quotes.)-.18 F(When)5.64 E F0 +(shell\255command)180 252 Q F1 .563(is e)3.063 F -.15(xe)-.15 G .563 +(cuted, the shell sets the).15 F/F3 9/Times-Bold@0 SF(READLINE_LINE) +3.063 E F1 -.25(va)2.813 G .563(riable to the contents).25 F .32(of the) +180 264 R F2 -.18(re)2.82 G(adline).18 E F1 .32(line b)2.82 F(uf)-.2 E +.32(fer and the)-.25 F F3(READLINE_POINT)2.82 E F1(and)2.57 E F3 +(READLINE_MARK)2.82 E F1 -.25(va)2.569 G(riables).25 E .545 +(to the current location of the insertion point and the sa)180 276 R +-.15(ve)-.2 G 3.046(di).15 G .546(nsertion point \(the mark\), re-) +-3.046 F(specti)180 288 Q -.15(ve)-.25 G(ly).15 E 7.188(.T)-.65 G 2.188 +(he shell assigns an)-7.188 F 4.688(yn)-.15 G 2.188(umeric ar)-4.688 F +2.188(gument the user supplied to the)-.18 F F3(READ-)4.688 E +(LINE_ARGUMENT)180 300 Q F1 -.25(va)2.398 G 2.648(riable. If).25 F .148 +(there w)2.648 F .148(as no ar)-.1 F .148(gument, that v)-.18 F .149 +(ariable is not set.)-.25 F .149(If the e)5.149 F(x-)-.15 E .583 +(ecuted command changes the v)180 312 R .583(alue of an)-.25 F 3.083(yo) +-.15 G(f)-3.083 E F3(READLINE_LINE)3.083 E/F4 9/Times-Roman@0 SF(,)A F3 +(READLINE_POINT)2.832 E F4(,)A F1(or)2.832 E F3(READLINE_MARK)180 324 Q +F4(,)A F1(those ne)2.25 E 2.5(wv)-.25 G +(alues will be re\215ected in the editing state.)-2.75 E F2144 336 +Q F1 .829(List all k)180 336 R 1.129 -.15(ey s)-.1 H .829 +(equences bound to shell commands and the associated commands in a for) +.15 F(-)-.2 E(mat that can be reused as an ar)180 348 Q +(gument to a subsequent)-.18 E F2(bind)2.5 E F1(command.)2.5 E +(The return v)144 364.8 Q(alue is 0 unless an unrecognized option is su\ +pplied or an error occurred.)-.25 E F2(br)108 381.6 Q(eak)-.18 E F1([) +2.5 E F0(n)A F1(])A .012(Exit from within a)144 393.6 R F2 -.25(fo)2.512 +G(r).25 E F1(,)A F2(while)2.512 E F1(,)A F2(until)2.512 E F1 2.512(,o)C +(r)-2.512 E F2(select)2.512 E F1 2.512(loop. If)2.512 F F0(n)2.512 E F1 +.011(is speci\214ed,)2.512 F F2(br)2.511 E(eak)-.18 E F1 -.15(ex)2.511 G +(its).15 E F0(n)2.511 E F1 .011(enclosing loops.)2.511 F F0(n)144.36 +405.6 Q F1 .632(must be)3.372 F/F5 10/Symbol SF3.132 E F1 3.132 +(1. If)3.132 F F0(n)3.492 E F1 .632(is greater than the number of enclo\ +sing loops, all enclosing loops are e)3.372 F(xited.)-.15 E +(The return v)144 417.6 Q(alue is 0 unless)-.25 E F0(n)2.5 E F1 +(is not greater than or equal to 1.)2.5 E F2 -.2(bu)108 434.4 S(iltin).2 +E F0(shell\255b)2.5 E(uiltin)-.2 E F1([)2.5 E F0(ar)A(guments)-.37 E F1 +(])A(Ex)144 446.4 Q 1.261(ecute the speci\214ed shell b)-.15 F(uiltin) +-.2 E F0(shell\255b)3.761 E(uiltin)-.2 E F1 3.761(,p)C 1.261(assing it) +-3.761 F F0(ar)4.091 E(guments)-.37 E F1 3.761(,a).27 G 1.26 +(nd return its e)-3.761 F 1.26(xit status.)-.15 F 1.053(This is useful \ +when de\214ning a function whose name is the same as a shell b)144 458.4 +R 1.053(uiltin, retaining the)-.2 F 1.166(functionality of the b)144 +470.4 R 1.166(uiltin within the function.)-.2 F(The)6.166 E F2(cd)3.666 +E F1 -.2(bu)3.666 G 1.165(iltin is commonly rede\214ned this w).2 F(ay) +-.1 E(.)-.65 E(The return status is f)144 482.4 Q(alse if)-.1 E F0 +(shell\255b)2.84 E(uiltin)-.2 E F1(is not a shell b)2.74 E +(uiltin command.)-.2 E F2(caller)108 499.2 Q F1([)2.5 E F0 -.2(ex)C(pr) +.2 E F1(])A .253(Returns the conte)144 511.2 R .254(xt of an)-.15 F +2.754(ya)-.15 G(cti)-2.754 E .554 -.15(ve s)-.25 H .254 +(ubroutine call \(a shell function or a script e).15 F -.15(xe)-.15 G +.254(cuted with the).15 F F2(.)2.754 E F1(or)2.754 E F2(sour)144 523.2 Q +(ce)-.18 E F1 -.2(bu)2.5 G(iltins\).).2 E -.4(Wi)144 540 S(thout).4 E F0 +-.2(ex)3.294 G(pr).2 E F1(,)A F2(caller)3.294 E F1 .793(displays the li\ +ne number and source \214lename of the current subroutine call.)3.294 F +.124(If a non-ne)144 552 R -.05(ga)-.15 G(ti).05 E .424 -.15(ve i)-.25 H +(nte).15 E .124(ger is supplied as)-.15 F F0 -.2(ex)2.624 G(pr).2 E F1 +(,)A F2(caller)2.624 E F1 .124(displays the line number)2.624 F 2.624 +(,s)-.4 G .124(ubroutine name, and)-2.624 F .743 +(source \214le corresponding to that position in the current e)144 564 R +-.15(xe)-.15 G .743(cution call stack.).15 F .742(This e)5.743 F .742 +(xtra informa-)-.15 F(tion may be used, for e)144 576 Q +(xample, to print a stack trace.)-.15 E(The current frame is frame 0.)5 +E .1(The return v)144 592.8 R .1(alue is 0 unless the shell is not e) +-.25 F -.15(xe)-.15 G .101(cuting a subroutine call or).15 F F0 -.2(ex) +2.601 G(pr).2 E F1 .101(does not correspond)2.601 F(to a v)144 604.8 Q +(alid position in the call stack.)-.25 E F2(cd)108 621.6 Q F1([)2.5 E F2 +A F1 2.5(][)C F2-2.5 E F1 2.5(][)C F0(dir)-2.5 E F1(])A F2 +(cd \255P)108 633.6 Q F1([)2.5 E F2A F1 2.5(][)C F2-2.5 E F1 +2.5(][)C F0(dir)-2.5 E F1(])A .322(Change the current directory to)144 +645.6 R F0(dir)2.822 E F1 5.322(.i)C(f)-5.322 E F0(dir)2.822 E F1 .321 +(is not supplied, the v)2.822 F .321(alue of the)-.25 F F3(HOME)2.821 E +F1 .321(shell v)2.571 F .321(ariable is)-.25 F .74(used as)144 657.6 R +F0(dir)3.24 E F1 5.74(.T)C .74(he v)-5.74 F(ariable)-.25 E F3(CDP)3.24 E +-.855(AT)-.666 G(H).855 E F1 -.15(ex)2.99 G .74(ists, and).15 F F0(dir) +3.24 E F1 .74(does not be)3.24 F .74(gin with a slash \(/\),)-.15 F F2 +(cd)3.24 E F1 .741(uses it as a)3.24 F 1.837 +(search path: the shell searches each directory name in)144 669.6 R F3 +(CDP)4.336 E -.855(AT)-.666 G(H).855 E F1(for)4.086 E F0(dir)4.336 E F1 +6.836(.A)C(lternati)-6.836 E 2.136 -.15(ve d)-.25 H(irectory).15 E .447 +(names in)144 681.6 R F3(CDP)2.947 E -.855(AT)-.666 G(H).855 E F1 .447 +(are separated by a colon \(:\).)2.697 F 2.948(An)5.448 G .448 +(ull directory name in)-2.948 F F3(CDP)2.948 E -.855(AT)-.666 G(H).855 E +F1 .448(is the same as)2.698 F(the current directory)144 693.6 Q 2.5(,i) +-.65 G(.e., \231.\232.)-2.5 E(The)144 710.4 Q F22.915 E F1 .415 +(option causes)2.915 F F2(cd)2.915 E F1 .415(to use the ph)2.915 F .414 +(ysical directory structure by resolving symbolic links while)-.05 F +(tra)144 722.4 Q -.15(ve)-.2 G(rsing).15 E F0(dir)2.673 E F1 .173 +(and before processing instances of)2.673 F F0 1.666(..)4.339 G F1(in) +2.673 E F0(dir)2.673 E F1 .174(\(see also the)2.673 F F22.674 E F1 +.174(option to the)2.674 F F2(set)2.674 E F1 -.2(bu)2.674 G(iltin).2 E +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(67)185.955 E 0 Cg EP +%%Page: 68 68 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(command\).)144 84 Q(The)144 100.8 Q/F2 10 +/Times-Bold@0 SF3.039 E F1 .539(option forces)3.039 F F2(cd)3.039 +E F1 .539(to follo)3.039 F 3.039(ws)-.25 G .538 +(ymbolic links by resolving the link after processing instances)-3.039 F +(of)144 112.8 Q F0 1.666(..)4.414 G F1(in)2.748 E F0(dir)2.748 E F1 +5.248(.I)C(f)-5.248 E F0 1.666(..)4.414 G F1 .248(appears in)2.748 F F0 +(dir)2.748 E F1(,)A F2(cd)2.748 E F1 .249(processes it by remo)2.749 F +.249(ving the immediately pre)-.15 F .249(vious pathname)-.25 F .202 +(component from)144 124.8 R F0(dir)2.702 E F1 2.702(,b)C .202 +(ack to a slash or the be)-2.702 F .202(ginning of)-.15 F F0(dir)2.702 E +F1 2.701(,a)C .201(nd v)-2.701 F .201(erifying that the portion of)-.15 +F F0(dir)2.701 E F1(it)2.701 E .282 +(has processed to that point is still a v)144 136.8 R .282 +(alid directory name after remo)-.25 F .282 +(ving the pathname component.)-.15 F .624(If it is not a v)144 148.8 R +.624(alid directory name,)-.25 F F2(cd)3.124 E F1 .624 +(returns a non-zero status.)3.124 F .623(If neither)5.624 F F2 +3.123 E F1(nor)3.123 E F23.123 E F1 .623(is supplied,)3.123 F F2 +(cd)144 160.8 Q F1(beha)2.5 E -.15(ve)-.2 G 2.5(sa).15 G 2.5(si)-2.5 G +(f)-2.5 E F22.5 E F1(had been supplied.)2.5 E .245(If the)144 +177.6 R F22.745 E F1 .245(option is supplied with)2.745 F F2 +2.745 E F1 2.745(,a)C(nd)-2.745 E F2(cd)2.745 E F1 .245 +(cannot successfully determine the current w)2.745 F .245(orking di-)-.1 +F(rectory after a successful directory change, it returns a non-zero st\ +atus.)144 189.6 Q .243(On systems that support it, the)144 206.4 R F2 +2.743 E F1 .242(option presents the e)2.743 F .242(xtended attrib) +-.15 F .242(utes associated with a \214le as)-.2 F 2.5(ad)144 218.4 S +(irectory)-2.5 E(.)-.65 E(An ar)144 235.2 Q(gument of)-.18 E F22.5 E +F1(is con)2.5 E -.15(ve)-.4 G(rted to).15 E/F3 9/Times-Bold@0 SF +($OLDPWD)2.5 E F1(before attempting the directory change.)2.25 E(If)144 +252 Q F2(cd)3 E F1 .5(uses a non-empty directory name from)3 F F3(CDP) +3.001 E -.855(AT)-.666 G(H,).855 E F1 .501(or if)2.751 F F23.001 E +F1 .501(is the \214rst ar)3.001 F .501(gument, and the direc-)-.18 F +1.243(tory change is successful,)144 264 R F2(cd)3.743 E F1 1.243 +(writes the absolute pathname of the ne)3.743 F 3.742(ww)-.25 G 1.242 +(orking directory to the)-3.842 F(standard output.)144 276 Q 1.113 +(If the directory change is successful,)144 292.8 R F2(cd)3.613 E F1 +1.113(sets the v)3.613 F 1.113(alue of the)-.25 F F2(PWD)3.613 E F1(en) +3.613 E 1.113(vironment v)-.4 F 1.114(ariable to the)-.25 F(ne)144 304.8 +Q 4.306(wd)-.25 G 1.806(irectory name, and sets the)-4.306 F F2(OLDPWD) +4.306 E F1(en)4.306 E 1.806(vironment v)-.4 F 1.806(ariable to the v) +-.25 F 1.805(alue of the current)-.25 F -.1(wo)144 316.8 S +(rking directory before the change.).1 E(The return v)144 333.6 Q +(alue is true if the directory w)-.25 E(as successfully changed; f)-.1 E +(alse otherwise.)-.1 E F2(command)108 350.4 Q F1([)2.5 E F2(\255pVv)A F1 +(])A F0(command)2.5 E F1([)2.5 E F0(ar)A(g)-.37 E F1 1.666(...)2.5 G(]) +-1.666 E(The)144 362.4 Q F2(command)3.078 E F1 -.2(bu)3.078 G .578 +(iltin runs).2 F F0(command)3.278 E F1(with)3.848 E F0(ar)3.408 E(gs) +-.37 E F1 .579(suppressing the normal shell function lookup for)3.348 F +F0(command)144 374.4 Q F1 6.346(.O)C 1.346(nly b)-6.346 F 1.345 +(uiltin commands or commands found in the)-.2 F F3 -.666(PA)3.845 G(TH) +-.189 E F1(named)3.595 E F0(command)3.845 E F1 1.345(are e)3.845 F -.15 +(xe)-.15 G(-).15 E 2.714(cuted. If)144 386.4 R(the)2.714 E F22.714 +E F1 .214(option is supplied, the search for)2.714 F F0(command)2.914 E +F1 .214(is performed using a def)3.484 F .215(ault v)-.1 F .215 +(alue for)-.25 F F3 -.666(PA)144 398.4 S(TH)-.189 E F1 +(that is guaranteed to \214nd all of the standard utilities.)2.25 E .273 +(If either the)144 415.2 R F22.773 E F1(or)2.773 E F22.773 E +F1 .273(option is supplied,)2.773 F F2(command)2.773 E F1 .273 +(prints a description of)2.773 F F0(command)2.973 E F1 5.273(.T).77 G +(he)-5.273 E F22.773 E F1(op-)2.772 E .436 +(tion displays a single w)144 427.2 R .437 +(ord indicating the command or \214lename used to in)-.1 F -.2(vo)-.4 G +-.1(ke).2 G F0(command)3.237 E F1 2.937(;t).77 G(he)-2.937 E F2 +2.937 E F1(option produces a more v)144 439.2 Q(erbose description.)-.15 +E .632(If the)144 456 R F23.131 E F1(or)3.131 E F23.131 E F1 +.631(option is supplied, the e)3.131 F .631(xit status is zero if)-.15 F +F0(command)3.331 E F1 -.1(wa)3.901 G 3.131(sf).1 G .631 +(ound, and non-zero if)-3.131 F 2.809(not. If)144 468 R .309 +(neither option is supplied and an error occurred or)2.809 F F0(command) +3.01 E F1 .31(cannot be found, the e)3.58 F .31(xit sta-)-.15 F +(tus is 127.)144 480 Q(Otherwise, the e)5 E(xit status of the)-.15 E F2 +(command)2.5 E F1 -.2(bu)2.5 G(iltin is the e).2 E(xit status of)-.15 E +F0(command)2.7 E F1(.).77 E F2(compgen)108 496.8 Q F1([)2.5 E F2A +F0(varname)2.5 E F1 2.5(][)C F0(option)-2.5 E F1 2.5(][)C F0(wor)-2.5 E +(d)-.37 E F1(])A .013(Generate possible completion matches for)144 508.8 +R F0(wor)2.513 E(d)-.37 E F1 .013(according to the)2.513 F F0(option) +2.513 E F1 .013(s, which may be an)B 2.512(yo)-.15 G(ption)-2.512 E +1.216(accepted by the)144 520.8 R F2(complete)3.716 E F1 -.2(bu)3.716 G +1.216(iltin with the e).2 F 1.216(xceptions of)-.15 F F23.716 E F1 +(,)A F23.717 E F1(,)A F23.717 E F1(,)A F23.717 E F1 +3.717(,a)C(nd)-3.717 E F23.717 E F1 3.717(,a)C 1.217(nd write the) +-3.717 F(matches to the standard output.)144 532.8 Q 1.376(If the)144 +549.6 R F23.876 E F1 1.376(option is supplied,)3.876 F F2(compgen) +3.876 E F1 1.376(stores the generated completions into the inde)3.876 F +-.15(xe)-.15 G 3.875(da).15 G(rray)-3.875 E -.25(va)144 561.6 S(riable) +.25 E F0(varname)2.5 E F1 +(instead of writing them to the standard output.)2.5 E .194 +(When using the)144 578.4 R F22.694 E F1(or)2.694 E F22.694 +E F1 .195(options, the v)2.695 F .195(arious shell v)-.25 F .195 +(ariables set by the programmable completion)-.25 F -.1(fa)144 590.4 S +(cilities, while a).1 E -.25(va)-.2 G(ilable, will not ha).25 E .3 -.15 +(ve u)-.2 H(seful v).15 E(alues.)-.25 E .352 +(The matches will be generated in the same w)144 607.2 R .352 +(ay as if the programmable completion code had gen-)-.1 F .02(erated th\ +em directly from a completion speci\214cation with the same \215ags.)144 +619.2 R(If)5.02 E F0(wor)2.52 E(d)-.37 E F1 .02(is speci\214ed, only) +2.52 F(those completions matching)144 631.2 Q F0(wor)2.5 E(d)-.37 E F1 +(will be displayed or stored.)2.5 E(The return v)144 648 Q +(alue is true unless an in)-.25 E -.25(va)-.4 G +(lid option is supplied, or no matches were generated.).25 E F2 +(complete)108 664.8 Q F1([)2.5 E F2(\255abcdefgjksuv)A F1 2.5(][)C F2 +-2.5 E F0(comp-option)2.5 E F1 2.5(][)C F2(\255DEI)-2.5 E F1 2.5 +(][)C F2-2.5 E F0(action)2.5 E F1(])A([)144 676.8 Q F2A F0 +(globpat)2.5 E F1 2.5(][)C F2-2.5 E F0(wor)2.5 E(dlist)-.37 E F1 +2.5(][)C F2-2.5 E F0(function)2.5 E F1 2.5(][)C F2-2.5 E F0 +(command)2.5 E F1(])A([)144 688.8 Q F2A F0(\214lterpat)2.5 E F1 +2.5(][)C F2-2.5 E F0(pr)2.5 E(e\214x)-.37 E F1 2.5(][)C F2 +-2.5 E F0(suf)2.5 E<8c78>-.18 E F1(])A F0(name)2.5 E F1([)2.5 E F0(name) +A F1 1.666(...)2.5 G(])-1.666 E F2(complete \255pr)108 700.8 Q F1([)2.5 +E F2(\255DEI)A F1 2.5(][)C F0(name)-2.5 E F1 1.666(...)2.5 G(])-1.666 E +(Specify ho)144 712.8 Q 2.5(wa)-.25 G -.18(rg)-2.5 G(uments to each).18 +E F0(name)2.5 E F1(should be completed.)2.5 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(68)185.955 E 0 Cg EP +%%Page: 69 69 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .11(If the)144 84 R/F2 10/Times-Bold@0 SF2.61 +E F1 .11(option is supplied, or if no options or)2.61 F F0(name)2.609 E +F1 2.609(sa)C .109(re supplied, print e)-2.609 F .109 +(xisting completion spec-)-.15 F .924(i\214cations in a w)144 96 R .924 +(ay that allo)-.1 F .924(ws them to be reused as input.)-.25 F(The)5.924 +E F23.424 E F1 .924(option remo)3.424 F -.15(ve)-.15 G 3.425(sac) +.15 G(ompletion)-3.425 E(speci\214cation for each)144 108 Q F0(name)2.5 +E F1 2.5(,o)C .8 -.4(r, i)-2.5 H 2.5(fn).4 G(o)-2.5 E F0(name)2.5 E F1 +2.5(sa)C(re supplied, all completion speci\214cations.)-2.5 E(The)144 +124.8 Q F22.585 E F1 .085(option indicates that other supplied op\ +tions and actions should apply to the \231def)2.585 F .084 +(ault\232 com-)-.1 F .032(mand completion; that is, completion attempte\ +d on a command for which no completion has pre)144 136.8 R(vi-)-.25 E +.46(ously been de\214ned.)144 148.8 R(The)5.46 E F22.96 E F1 .459 +(option indicates that other supplied options and actions should apply) +2.959 F .169(to \231empty\232 command completion; that is, completion a\ +ttempted on a blank line.)144 160.8 R(The)5.17 E F22.67 E F1 .17 +(option in-)2.67 F 1.025(dicates that other supplied options and action\ +s should apply to completion on the initial non-as-)144 172.8 R .281 +(signment w)144 184.8 R .281 +(ord on the line, or after a command delimiter such as)-.1 F F2(;)2.781 +E F1(or)2.781 E F2(|)2.781 E F1 2.781(,w)C .282(hich is usually command) +-2.781 F .6(name completion.)144 196.8 R .599 +(If multiple options are supplied, the)5.6 F F23.099 E F1 .599 +(option tak)3.099 F .599(es precedence o)-.1 F -.15(ve)-.15 G(r).15 E F2 +3.099 E F1 3.099(,a)C(nd)-3.099 E .186(both tak)144 208.8 R 2.686 +(ep)-.1 G .186(recedence o)-2.686 F -.15(ve)-.15 G(r).15 E F22.686 +E F1 5.186(.I)C 2.686(fa)-5.186 G .486 -.15(ny o)-2.686 H(f).15 E F2 +2.686 E F1(,)A F22.686 E F1 2.686(,o)C(r)-2.686 E F2 +2.686 E F1 .186(are supplied, an)2.686 F 2.686(yo)-.15 G(ther)-2.686 E +F0(name)2.686 E F1(ar)2.687 E .187(guments are)-.18 F(ignored; these co\ +mpletions only apply to the case speci\214ed by the option.)144 220.8 Q +.443(The process of applying these completion speci\214cations when att\ +empting w)144 237.6 R .442(ord completion)-.1 F .442(is de-)5.442 F +(scribed abo)144 249.6 Q .3 -.15(ve u)-.15 H(nder).15 E F2(Pr)2.5 E +(ogrammable Completion)-.18 E F1(.)A .555 +(Other options, if speci\214ed, ha)144 266.4 R .855 -.15(ve t)-.2 H .555 +(he follo).15 F .555(wing meanings.)-.25 F .555(The ar)5.555 F .555 +(guments to the)-.18 F F23.056 E F1(,)A F23.056 E F1 3.056 +(,a)C(nd)-3.056 E F23.056 E F1 .723(options \(and, if necessary) +144 278.4 R 3.223(,t)-.65 G(he)-3.223 E F23.223 E F1(and)3.223 E +F23.223 E F1 .722 +(options\) should be quoted to protect them from e)3.223 F(xpan-)-.15 E +(sion before the)144 290.4 Q F2(complete)2.5 E F1 -.2(bu)2.5 G +(iltin is in).2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E F2144 307.2 Q +F0(comp-option)2.5 E F1(The)184 319.2 Q F0(comp-option)2.79 E F1 .291 +(controls se)2.791 F -.15(ve)-.25 G .291(ral aspects of the compspec') +.15 F 2.791(sb)-.55 G(eha)-2.791 E .291(vior be)-.2 F .291 +(yond the simple)-.15 F(generation of completions.)184 331.2 Q F0 +(comp-option)5 E F1(may be one of:)2.5 E F2(bashdefault)184 343.2 Q F1 +.281(Perform the rest of the def)224 355.2 R(ault)-.1 E F2(bash)2.781 E +F1 .281(completions if the compspec generates no)2.781 F(matches.)224 +367.2 Q F2(default)184 379.2 Q F1(Use)224 379.2 Q F2 -.18(re)5.085 G +(adline).18 E F1 3.685 -.55('s d)D(ef).55 E 2.586 +(ault \214lename completion if the compspec generates no)-.1 F(matches.) +224 391.2 Q F2(dir)184 403.2 Q(names)-.15 E F1(Perform directory name c\ +ompletion if the compspec generates no matches.)224 415.2 Q F2 +(\214lenames)184 427.2 Q F1 -.7(Te)224 439.2 S(ll).7 E F2 -.18(re)4.104 +G(adline).18 E F1 1.604 +(that the compspec generates \214lenames, so it can perform an)4.104 F +(y)-.15 E .291(\214lename\255speci\214c processing \(such as adding a s\ +lash to directory names, quot-)224 451.2 R .904 +(ing special characters, or suppressing trailing spaces\).)224 463.2 R +.903(This is intended to be)5.904 F(used with shell functions.)224 475.2 +Q F2(fullquote)184 487.2 Q F1 -.7(Te)224 499.2 S(ll).7 E F2 -.18(re)2.5 +G(adline).18 E F1(to quote all the completed w)2.5 E(ords e)-.1 E -.15 +(ve)-.25 G 2.5(ni).15 G 2.5(ft)-2.5 G(he)-2.5 E 2.5(ya)-.15 G +(re not \214lenames.)-2.5 E F2(noquote)184 511.2 Q F1 -.7(Te)224 511.2 S +(ll).7 E F2 -.18(re)3.096 G(adline).18 E F1 .597 +(not to quote the completed w)3.096 F .597(ords if the)-.1 F 3.097(ya) +-.15 G .597(re \214lenames \(quoting)-3.097 F(\214lenames is the def)224 +523.2 Q(ault\).)-.1 E F2(nosort)184 535.2 Q F1 -.7(Te)224 535.2 S(ll).7 +E F2 -.18(re)2.5 G(adline).18 E F1 +(not to sort the list of possible completions alphabetically)2.5 E(.) +-.65 E F2(nospace)184 547.2 Q F1 -.7(Te)224 547.2 S(ll).7 E F2 -.18(re) +2.534 G(adline).18 E F1 .034(not to append a space \(the def)2.534 F +.033(ault\) to w)-.1 F .033(ords completed at the end)-.1 F +(of the line.)224 559.2 Q F2(plusdirs)184 571.2 Q F1 2.542 +(After generating an)224 571.2 R 5.042(ym)-.15 G 2.542 +(atches de\214ned by the compspec, attempt directory)-5.042 F +(name completion and add an)224 583.2 Q 2.5(ym)-.15 G +(atches to the results of the other actions.)-2.5 E F2144 595.2 Q +F0(action)2.5 E F1(The)184 607.2 Q F0(action)2.5 E F1 +(may be one of the follo)2.5 E +(wing to generate a list of possible completions:)-.25 E F2(alias)184 +619.2 Q F1(Alias names.)224 619.2 Q(May also be speci\214ed as)5 E F2 +2.5 E F1(.)A F2(arrayv)184 631.2 Q(ar)-.1 E F1(Array v)224 643.2 Q +(ariable names.)-.25 E F2(binding)184 655.2 Q(Readline)224 655.2 Q F1 +-.1(ke)2.5 G 2.5(yb)-.05 G(inding names.)-2.5 E F2 -.2(bu)184 667.2 S +(iltin).2 E F1(Names of shell b)224 667.2 Q(uiltin commands.)-.2 E +(May also be speci\214ed as)5 E F22.5 E F1(.)A F2(command)184 +679.2 Q F1(Command names.)224 691.2 Q(May also be speci\214ed as)5 E F2 +2.5 E F1(.)A F2(dir)184 703.2 Q(ectory)-.18 E F1(Directory names.) +224 715.2 Q(May also be speci\214ed as)5 E F22.5 E F1(.)A +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(69)185.955 E 0 Cg EP +%%Page: 70 70 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(disabled)184 84 Q F1 +(Names of disabled shell b)224 96 Q(uiltins.)-.2 E F2(enabled)184 108 Q +F1(Names of enabled shell b)224 108 Q(uiltins.)-.2 E F2(export)184 120 Q +F1(Names of e)224 120 Q(xported shell v)-.15 E 2.5(ariables. May)-.25 F +(also be speci\214ed as)2.5 E F22.5 E F1(.)A F2(\214le)184 132 Q +F1 .092(File and directory names, similar to)224 132 R F2 -.18(re)2.592 +G(adline).18 E F1 1.192 -.55('s \214)D .092(lename completion.).55 F +.092(May also)5.092 F(be speci\214ed as)224 144 Q F22.5 E F1(.)A +F2(function)184 156 Q F1(Names of shell functions.)224 168 Q F2(gr)184 +180 Q(oup)-.18 E F1(Group names.)224 180 Q(May also be speci\214ed as)5 +E F22.5 E F1(.)A F2(helptopic)184 192 Q F1 +(Help topics as accepted by the)224 204 Q F2(help)2.5 E F1 -.2(bu)2.5 G +(iltin.).2 E F2(hostname)184 216 Q F1(Hostnames, as tak)224 228 Q +(en from the \214le speci\214ed by the)-.1 E/F3 9/Times-Bold@0 SF +(HOSTFILE)2.5 E F1(shell v)2.25 E(ariable.)-.25 E F2(job)184 240 Q F1 +(Job names, if job control is acti)224 240 Q -.15(ve)-.25 G 5(.M).15 G +(ay also be speci\214ed as)-5 E F22.5 E F1(.)A F2 -.1(ke)184 252 S +(yw).1 E(ord)-.1 E F1(Shell reserv)224 264 Q(ed w)-.15 E 2.5(ords. May) +-.1 F(also be speci\214ed as)2.5 E F22.5 E F1(.)A F2(running)184 +276 Q F1(Names of running jobs, if job control is acti)224 276 Q -.15 +(ve)-.25 G(.).15 E F2(ser)184 288 Q(vice)-.1 E F1(Service names.)224 288 +Q(May also be speci\214ed as)5 E F22.5 E F1(.)A F2(setopt)184 300 +Q F1 -1.11(Va)224 300 S(lid ar)1.11 E(guments for the)-.18 E F22.5 +E F1(option to the)2.5 E F2(set)2.5 E F1 -.2(bu)2.5 G(iltin.).2 E F2 +(shopt)184 312 Q F1(Shell option names as accepted by the)224 312 Q F2 +(shopt)2.5 E F1 -.2(bu)2.5 G(iltin.).2 E F2(signal)184 324 Q F1 +(Signal names.)224 324 Q F2(stopped)184 336 Q F1 +(Names of stopped jobs, if job control is acti)224 336 Q -.15(ve)-.25 G +(.).15 E F2(user)184 348 Q F1(User names.)224 348 Q +(May also be speci\214ed as)5 E F22.5 E F1(.)A F2 -.1(va)184 360 S +(riable).1 E F1(Names of all shell v)224 360 Q 2.5(ariables. May)-.25 F +(also be speci\214ed as)2.5 E F22.5 E F1(.)A F2144 372 Q F0 +(command)2.5 E(command)184 384 Q F1 1.055(is e)3.555 F -.15(xe)-.15 G +1.055(cuted in a subshell en).15 F 1.056 +(vironment, and its output is used as the possible)-.4 F 2.5 +(completions. Ar)184 396 R(guments are passed as with the)-.18 E F2 +2.5 E F1(option.)2.5 E F2144 408 Q F0(function)2.5 E F1 .114 +(The shell function)184 420 R F0(function)2.614 E F1 .114(is e)2.614 F +-.15(xe)-.15 G .114(cuted in the current shell en).15 F 2.614 +(vironment. When)-.4 F .113(the func-)2.613 F .816(tion is e)184 432 R +-.15(xe)-.15 G .816(cuted, the \214rst ar).15 F .816(gument \()-.18 F F2 +($1)A F1 3.316(\)i)C 3.316(st)-3.316 G .817 +(he name of the command whose ar)-3.316 F(guments)-.18 E 1.407 +(are being completed, the second ar)184 444 R 1.407(gument \()-.18 F F2 +($2)A F1 3.907(\)i)C 3.907(st)-3.907 G 1.407(he w)-3.907 F 1.407 +(ord being completed, and the)-.1 F .103(third ar)184 456 R .103 +(gument \()-.18 F F2($3)A F1 2.603(\)i)C 2.603(st)-2.603 G .103(he w) +-2.603 F .104(ord preceding the w)-.1 F .104 +(ord being completed on the current com-)-.1 F 2.135(mand line.)184 468 +R(When)7.135 E F0(function)4.635 E F1 2.134 +(\214nishes, programmable completion retrie)4.635 F -.15(ve)-.25 G 4.634 +(st).15 G 2.134(he possible)-4.634 F(completions from the v)184 480 Q +(alue of the)-.25 E F3(COMPREPL)2.5 E(Y)-.828 E F1(array v)2.25 E +(ariable.)-.25 E F2144 492 Q F0(globpat)2.5 E F1 +(Expand the pathname e)184 504 Q(xpansion pattern)-.15 E F0(globpat)2.5 +E F1(to generate the possible completions.)2.5 E F2144 516 Q F0 +(pr)2.5 E(e\214x)-.37 E F1(Add)184 528 Q F0(pr)2.597 E(e\214x)-.37 E F1 +.098(to the be)2.597 F .098 +(ginning of each possible completion after all other options ha)-.15 F +.398 -.15(ve b)-.2 H(een).15 E(applied.)184 540 Q F2144 552 Q F0 +(suf)2.5 E<8c78>-.18 E F1(Append)184 552 Q F0(suf)2.5 E<8c78>-.18 E F1 +(to each possible completion after all other options ha)2.5 E .3 -.15 +(ve b)-.2 H(een applied.).15 E F2144 564 Q F0(wor)2.5 E(dlist)-.37 +E F1 .834(Split the)184 576 R F0(wor)3.334 E(dlist)-.37 E F1 .833 +(using the characters in the)3.334 F F3(IFS)3.333 E F1 .833(special v) +3.083 F .833(ariable as delimiters, and e)-.25 F(x-)-.15 E .017 +(pand each resulting w)184 588 R 2.518(ord. Shell)-.1 F .018 +(quoting is honored within)2.518 F F0(wor)2.518 E(dlist)-.37 E F1 2.518 +(,i)C 2.518(no)-2.518 G .018(rder to pro)-2.518 F .018(vide a)-.15 F +1.158(mechanism for the w)184 600 R 1.158 +(ords to contain shell metacharacters or characters in the v)-.1 F 1.157 +(alue of)-.25 F F3(IFS)184 612 Q/F4 9/Times-Roman@0 SF(.)A F1 .04(The p\ +ossible completions are the members of the resultant list which match a\ + pre\214x)4.54 F(of the w)184 624 Q(ord being completed.)-.1 E F2 +144 636 Q F0(\214lterpat)2.5 E(\214lterpat)184 648 Q F1 .456 +(is a pattern as used for pathname e)2.956 F 2.956(xpansion. It)-.15 F +.455(is applied to the list of possible)2.956 F 1.596 +(completions generated by the preceding options and ar)184 660 R 1.596 +(guments, and each completion)-.18 F(matching)184 672 Q F0(\214lterpat) +3.205 E F1 .705(is remo)3.205 F -.15(ve)-.15 G 3.205(df).15 G .704 +(rom the list.)-3.205 F 3.204(Al)5.704 G(eading)-3.204 E F2(!)3.204 E F1 +(in)3.204 E F0(\214lterpat)3.204 E F1(ne)3.204 E -.05(ga)-.15 G .704 +(tes the pattern;).05 F(in this case, an)184 684 Q 2.5(yc)-.15 G +(ompletion not matching)-2.5 E F0(\214lterpat)2.5 E F1(is remo)2.5 E +-.15(ve)-.15 G(d.).15 E .46(The return v)144 700.8 R .46 +(alue is true unless an in)-.25 F -.25(va)-.4 G .461 +(lid option is supplied, an option other than).25 F F22.961 E F1 +(,)A F22.961 E F1(,)A F22.961 E F1(,)A F22.961 E F1(,) +A(or)144 712.8 Q F22.986 E F1 .486(is supplied without a)2.986 F +F0(name)2.986 E F1(ar)2.986 E .486(gument, an attempt is made to remo) +-.18 F .785 -.15(ve a c)-.15 H .485(ompletion speci\214ca-).15 F 2.896 +(tion for a)144 724.8 R F0(name)5.396 E F1 2.896 +(for which no speci\214cation e)5.396 F 2.896 +(xists, or an error occurs adding a completion)-.15 F(GNU Bash 5.3)72 +768 Q(2024 December 12)136.795 E(70)185.955 E 0 Cg EP +%%Page: 71 71 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(speci\214cation.)144 84 Q/F2 10/Times-Bold@0 SF +(compopt)108 100.8 Q F1([)2.5 E F2A F0(option)2.5 E F1 2.5(][)C F2 +(\255DEI)-2.5 E F1 2.5(][)C F2(+o)-2.5 E F0(option)2.5 E F1 2.5(][)C F0 +(name)-2.5 E F1(])A .447(Modify completion options for each)144 112.8 R +F0(name)2.947 E F1 .447(according to the)2.947 F F0(option)2.947 E F1 +.447(s, or for the currently-e)B -.15(xe)-.15 G(cuting).15 E .926 +(completion if no)144 124.8 R F0(name)3.426 E F1 3.426(sa)C .926 +(re supplied.)-3.426 F .926(If no)5.926 F F0(option)3.426 E F1 3.427(sa) +C .927(re supplied, display the completion options)-3.427 F 1.314 +(for each)144 136.8 R F0(name)3.814 E F1 1.314 +(or the current completion.)3.814 F 1.314(The possible v)6.314 F 1.314 +(alues of)-.25 F F0(option)3.814 E F1 1.313(are those v)3.814 F 1.313 +(alid for the)-.25 F F2(complete)144 148.8 Q F1 -.2(bu)2.5 G +(iltin described abo).2 E -.15(ve)-.15 G(.).15 E(The)144 165.6 Q F2 +3.007 E F1 .507(option indicates that other supplied options shou\ +ld apply to the \231def)3.007 F .508(ault\232 command com-)-.1 F 1.413 +(pletion; the)144 177.6 R F23.913 E F1 1.412(option indicates tha\ +t other supplied options should apply to \231empty\232 command)3.913 F +.378(completion; and the)144 189.6 R F22.878 E F1 .379(option ind\ +icates that other supplied options should apply to completion on)2.878 F +(the initial w)144 201.6 Q(ord on the line.)-.1 E +(These are determined in the same w)5 E(ay as the)-.1 E F2(complete)2.5 +E F1 -.2(bu)2.5 G(iltin.).2 E 1.216 +(If multiple options are supplied, the)144 218.4 R F23.715 E F1 +1.215(option tak)3.715 F 1.215(es precedence o)-.1 F -.15(ve)-.15 G(r) +.15 E F23.715 E F1 3.715(,a)C 1.215(nd both tak)-3.715 F 3.715(ep) +-.1 G(rece-)-3.715 E(dence o)144 230.4 Q -.15(ve)-.15 G(r).15 E F2 +2.5 E F1(.)A .431(The return v)144 247.2 R .431 +(alue is true unless an in)-.25 F -.25(va)-.4 G .431 +(lid option is supplied, an attempt is made to modify the op-).25 F +(tions for a)144 259.2 Q F0(name)2.5 E F1 +(for which no completion speci\214cation e)2.5 E +(xists, or an output error occurs.)-.15 E F2(continue)108 276 Q F1([)2.5 +E F0(n)A F1(])A F2(continue)144 288 Q F1 .148(resumes the ne)2.648 F +.148(xt iteration of the enclosing)-.15 F F2 -.25(fo)2.648 G(r).25 E F1 +(,)A F2(while)2.648 E F1(,)A F2(until)2.648 E F1 2.648(,o)C(r)-2.648 E +F2(select)2.647 E F1 2.647(loop. If)2.647 F F0(n)3.007 E F1 .147 +(is speci-)2.887 F(\214ed,)144 300 Q F2(bash)3.092 E F1 .592 +(resumes the)3.092 F F0(n)3.092 E F1 .592(th enclosing loop.)B F0(n) +5.952 E F1 .592(must be)3.332 F/F3 10/Symbol SF3.092 E F1 3.093 +(1. If)3.093 F F0(n)3.453 E F1 .593(is greater than the number of en-) +3.333 F .41(closing loops, the shell resumes the last enclosing loop \(\ +the \231top-le)144 312 R -.15(ve)-.25 G .409(l\232 loop\).).15 F .409 +(The return v)5.409 F .409(alue is)-.25 F 2.5(0u)144 324 S(nless)-2.5 E +F0(n)2.5 E F1(is not greater than or equal to 1.)2.5 E F2(declar)108 +340.8 Q(e)-.18 E F1([)2.5 E F2(\255aAfFgiIlnrtux)A F1 2.5(][)C F2 +-2.5 E F1 2.5(][)C F0(name)-2.5 E F1([=)A F0(value)A F1 2.5(].)C 1.666 +(..)-.834 G(])-1.666 E F2(typeset)108 352.8 Q F1([)2.5 E F2 +(\255aAfFgiIlnrtux)A F1 2.5(][)C F2-2.5 E F1 2.5(][)C F0(name)-2.5 +E F1([=)A F0(value)A F1 2.5(].)C 1.666(..)-.834 G(])-1.666 E 1.264 +(Declare v)144 364.8 R 1.264(ariables and/or gi)-.25 F 1.564 -.15(ve t) +-.25 H 1.264(hem attrib).15 F 3.765(utes. If)-.2 F(no)3.765 E F0(name) +3.765 E F1 3.765(sa)C 1.265(re gi)-3.765 F -.15(ve)-.25 G 3.765(nt).15 G +1.265(hen display the v)-3.765 F 1.265(alues of)-.25 F -.25(va)144 376.8 +S .572(riables or functions.).25 F(The)5.572 E F23.072 E F1 .571 +(option will display the attrib)3.072 F .571(utes and v)-.2 F .571 +(alues of each)-.25 F F0(name)3.431 E F1 5.571(.W).18 G(hen)-5.571 E F2 +144 388.8 Q F1(is used with)2.5 E F0(name)2.5 E F1(ar)2.5 E +(guments, additional options, other than)-.18 E F22.5 E F1(and)2.5 +E F22.5 E F1 2.5(,a)C(re ignored.)-2.5 E(When)144 405.6 Q F2 +2.761 E F1 .261(is supplied without)2.761 F F0(name)2.761 E F1(ar)2.761 +E(guments,)-.18 E F2(declar)2.761 E(e)-.18 E F1 .261 +(will display the attrib)2.761 F .262(utes and v)-.2 F .262 +(alues of all)-.25 F -.25(va)144 417.6 S .28(riables ha).25 F .28 +(ving the attrib)-.2 F .279(utes speci\214ed by the additional options.) +-.2 F .279(If no other options are supplied)5.279 F(with)144 429.6 Q F2 +2.515 E F1(,)A F2(declar)2.515 E(e)-.18 E F1 .015 +(will display the attrib)2.515 F .015(utes and v)-.2 F .015 +(alues of all shell v)-.25 F 2.515(ariables. The)-.25 F F22.515 E +F1 .015(option restricts)2.515 F(the display to shell functions.)144 +441.6 Q(The)144 458.4 Q F23.489 E F1 .989(option inhibits the dis\ +play of function de\214nitions; only the function name and attrib)3.489 +F(utes)-.2 E 1.31(are printed.)144 470.4 R 1.31(If the)6.31 F F2(extdeb) +3.81 E(ug)-.2 E F1 1.31(shell option is enabled using)3.81 F F2(shopt) +3.81 E F1 3.81(,t)C 1.31(he source \214le name and line)-3.81 F +(number where each)144 482.4 Q F0(name)2.5 E F1 +(is de\214ned are displayed as well.)2.5 E(The)5 E F22.5 E F1 +(option implies)2.5 E F22.5 E F1(.)A(The)144 499.2 Q F22.735 +E F1 .235(option forces v)2.735 F .235 +(ariables to be created or modi\214ed at the global scope, e)-.25 F -.15 +(ve)-.25 G 2.734(nw).15 G(hen)-2.734 E F2(declar)2.734 E(e)-.18 E F1(is) +2.734 E -.15(exe)144 511.2 S(cuted in a shell function.).15 E +(It is ignored when)5 E F2(declar)2.5 E(e)-.18 E F1(is not e)2.5 E -.15 +(xe)-.15 G(cuted in a shell function.).15 E(The)144 528 Q F23.998 +E F1 1.498(option causes local v)3.998 F 1.499 +(ariables to inherit the attrib)-.25 F 1.499(utes \(e)-.2 F 1.499 +(xcept the)-.15 F F0(namer)3.999 E(ef)-.37 E F1(attrib)3.999 E 1.499 +(ute\) and)-.2 F -.25(va)144 540 S .658(lue of an).25 F 3.158(ye)-.15 G +.658(xisting v)-3.308 F .658(ariable with the same)-.25 F F0(name)3.158 +E F1 .658(at a surrounding scope.)3.158 F .657(If there is no e)5.657 F +(xisting)-.15 E -.25(va)144 552 S(riable, the local v).25 E +(ariable is initially unset.)-.25 E .698(The follo)144 568.8 R .699 +(wing options can be used to restrict output to v)-.25 F .699 +(ariables with the speci\214ed attrib)-.25 F .699(ute or to)-.2 F(gi)144 +580.8 Q .3 -.15(ve v)-.25 H(ariables attrib)-.1 E(utes:)-.2 E F2 +144 592.8 Q F1(Each)180 592.8 Q F0(name)2.5 E F1(is an inde)2.5 E -.15 +(xe)-.15 G 2.5(da).15 G(rray v)-2.5 E(ariable \(see)-.25 E F2(Arrays)2.5 +E F1(abo)2.5 E -.15(ve)-.15 G(\).).15 E F2144 604.8 Q F1(Each)180 +604.8 Q F0(name)2.5 E F1(is an associati)2.5 E .3 -.15(ve a)-.25 H +(rray v).15 E(ariable \(see)-.25 E F2(Arrays)2.5 E F1(abo)2.5 E -.15(ve) +-.15 G(\).).15 E F2144 616.8 Q F1(Each)180 616.8 Q F0(name)2.5 E +F1(refers to a shell function.)2.5 E F2144 628.8 Q F1 .558(The v) +180 628.8 R .558(ariable is treated as an inte)-.25 F .558 +(ger; arithmetic e)-.15 F -.25(va)-.25 G .558(luation \(see).25 F/F4 9 +/Times-Bold@0 SF .557(ARITHMETIC EV)3.058 F(ALU)-1.215 E(A-)-.54 E(TION) +180 640.8 Q F1(abo)2.25 E -.15(ve)-.15 G 2.5(\)i).15 G 2.5(sp)-2.5 G +(erformed when the v)-2.5 E(ariable is assigned a v)-.25 E(alue.)-.25 E +F2144 652.8 Q F1 .909(When the v)180 652.8 R .909 +(ariable is assigned a v)-.25 F .909(alue, all upper)-.25 F .909 +(-case characters are con)-.2 F -.15(ve)-.4 G .91(rted to lo).15 F(wer) +-.25 E(-)-.2 E 2.5(case. The)180 664.8 R(upper)2.5 E(-case attrib)-.2 E +(ute is disabled.)-.2 E F2144 676.8 Q F1(Gi)180 676.8 Q 1.62 -.15 +(ve e)-.25 H(ach).15 E F0(name)3.82 E F1(the)3.82 E F0(namer)3.819 E(ef) +-.37 E F1(attrib)3.819 E 1.319 +(ute, making it a name reference to another v)-.2 F(ariable.)-.25 E .477 +(That other v)180 688.8 R .478(ariable is de\214ned by the v)-.25 F .478 +(alue of)-.25 F F0(name)2.978 E F1 5.478(.A)C .478 +(ll references, assignments, and at-)-5.478 F(trib)180 700.8 Q .782 +(ute modi\214cations to)-.2 F F0(name)3.282 E F1 3.282(,e)C .782 +(xcept those using or changing the)-3.432 F F23.281 E F1(attrib) +3.281 E .781(ute itself, are)-.2 F .808(performed on the v)180 712.8 R +.808(ariable referenced by)-.25 F F0(name)3.308 E F1 1.908 -.55('s v)D +3.308(alue. The).3 F .809(nameref attrib)3.309 F .809(ute cannot be)-.2 +F(applied to array v)180 724.8 Q(ariables.)-.25 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(71)185.955 E 0 Cg EP +%%Page: 72 72 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF144 84 Q F1(Mak)180 84 Q +(e)-.1 E F0(name)3.655 E F1 3.655(sr)C(eadonly)-3.655 E 6.154(.T)-.65 G +1.154(hese names cannot then be assigned v)-6.154 F 1.154 +(alues by subsequent as-)-.25 F(signment statements or unset.)180 96 Q +F2144 108 Q F1(Gi)180 108 Q .729 -.15(ve e)-.25 H(ach).15 E F0 +(name)2.929 E F1(the)2.929 E F0(tr)2.929 E(ace)-.15 E F1(attrib)2.929 E +2.929(ute. T)-.2 F .429(raced functions inherit the)-.35 F F2(DEB)2.929 +E(UG)-.1 E F1(and)2.93 E F2(RETURN)2.93 E F1 +(traps from the calling shell.)180 120 Q(The trace attrib)5 E +(ute has no special meaning for v)-.2 E(ariables.)-.25 E F2144 132 +Q F1 .91(When the v)180 132 R .909(ariable is assigned a v)-.25 F .909 +(alue, all lo)-.25 F(wer)-.25 E .909(-case characters are con)-.2 F -.15 +(ve)-.4 G .909(rted to upper).15 F(-)-.2 E 2.5(case. The)180 144 R(lo) +2.5 E(wer)-.25 E(-case attrib)-.2 E(ute is disabled.)-.2 E F2144 +156 Q F1(Mark each)180 156 Q F0(name)2.5 E F1(for e)2.5 E +(xport to subsequent commands via the en)-.15 E(vironment.)-.4 E .657 +(Using \231+\232 instead of \231\255\232 turns of)144 172.8 R 3.157(ft) +-.25 G .657(he speci\214ed attrib)-3.157 F .657(ute instead, with the e) +-.2 F .657(xceptions that)-.15 F F2(+a)3.157 E F1(and)3.157 E F2(+A)144 +184.8 Q F1(may not be used to destro)2.5 E 2.5(ya)-.1 G(rray v)-2.5 E +(ariables and)-.25 E F2(+r)2.5 E F1(will not remo)2.5 E .3 -.15(ve t) +-.15 H(he readonly attrib).15 E(ute.)-.2 E .415 +(When used in a function,)144 201.6 R F2(declar)2.915 E(e)-.18 E F1(and) +2.915 E F2(typeset)2.915 E F1(mak)2.915 E 2.915(ee)-.1 G(ach)-2.915 E F0 +(name)2.915 E F1 .415(local, as with the)2.915 F F2(local)2.915 E F1 +(command,)2.915 E .703(unless the)144 213.6 R F23.203 E F1 .703 +(option is supplied.)3.203 F .703(If a v)5.703 F .703 +(ariable name is follo)-.25 F .703(wed by =)-.25 F F0(value)A F1 3.204 +(,t)C .704(he v)-3.204 F .704(alue of the v)-.25 F(ari-)-.25 E .879 +(able is set to)144 225.6 R F0(value)3.379 E F1 5.879(.W)C .879 +(hen using)-5.879 F F23.379 E F1(or)3.379 E F23.379 E F1 +.879(and the compound assignment syntax to create array)3.379 F -.25(va) +144 237.6 S(riables, additional attrib).25 E(utes do not tak)-.2 E 2.5 +(ee)-.1 G -.25(ff)-2.5 G(ect until subsequent assignments.).25 E .432 +(The return v)144 254.4 R .433(alue is 0 unless an in)-.25 F -.25(va)-.4 +G .433 +(lid option is encountered, an attempt is made to de\214ne a func-).25 F +.278(tion using \231\255f foo=bar\232.)144 266.4 R .278 +(an attempt is made to assign a v)5.278 F .278(alue to a readonly v)-.25 +F .277(ariable, an attempt is)-.25 F .974(made to assign a v)144 278.4 R +.974(alue to an array v)-.25 F .974 +(ariable without using the compound assignment syntax \(see)-.25 F F2 +(Arrays)144 290.4 Q F1(abo)2.86 E -.15(ve)-.15 G .36(\), one of the).15 +F F0(names)2.86 E F1 .36(is not a v)2.86 F .36(alid shell v)-.25 F .36 +(ariable name, an attempt is made to turn of)-.25 F(f)-.25 E .056 +(readonly status for a readonly v)144 302.4 R .057 +(ariable, an attempt is made to turn of)-.25 F 2.557(fa)-.25 G .057 +(rray status for an array v)-2.557 F(ari-)-.25 E +(able, or an attempt is made to display a non-e)144 314.4 Q +(xistent function with)-.15 E F22.5 E F1(.)A F2 +(dirs [\255clpv] [+)108 331.2 Q F0(n)A F2 2.5(][)C-2.5 E F0(n)A F2 +(])A F1 -.4(Wi)144 343.2 S .607 +(thout options, display the list of currently remembered directories.).4 +F .606(The def)5.606 F .606(ault display is on a)-.1 F 1.238 +(single line with directory names separated by spaces.)144 355.2 R 1.238 +(Directories are added to the list with the)6.238 F F2(pushd)144 367.2 Q +F1 .928(command; the)3.428 F F2(popd)3.428 E F1 .928(command remo)3.428 +F -.15(ve)-.15 G 3.428(se).15 G .928(ntries from the list.)-3.428 F .928 +(The current directory is al-)5.928 F -.1(wa)144 379.2 S +(ys the \214rst directory in the stack.).1 E(Options, if supplied, ha) +144 396 Q .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F2 +144 408 Q F1 +(Clears the directory stack by deleting all of the entries.)180 408 Q F2 +144 420 Q F1 .881 +(Produces a listing using full pathnames; the def)180 420 R .882 +(ault listing format uses a tilde to denote)-.1 F(the home directory)180 +432 Q(.)-.65 E F2144 444 Q F1 +(Print the directory stack with one entry per line.)180 444 Q F2 +144 456 Q F1 .273(Print the directory stack with one entry per line, pr\ +e\214xing each entry with its inde)180 456 R 2.772(xi)-.15 G 2.772(nt) +-2.772 G(he)-2.772 E(stack.)180 468 Q F2(+)144 480 Q F0(n)A F1 1.564 +(Displays the)180 480 R F0(n)4.064 E F1 1.565 +(th entry counting from the left of the list sho)B 1.565(wn by)-.25 F F2 +(dirs)4.065 E F1 1.565(when in)4.065 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E +(without options, starting with zero.)180 492 Q F2144 504 Q F0(n)A +F1 1.194(Displays the)180 504 R F0(n)3.694 E F1 1.194 +(th entry counting from the right of the list sho)B 1.194(wn by)-.25 F +F2(dirs)3.694 E F1 1.194(when in)3.694 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E +(without options, starting with zero.)180 516 Q .257(The return v)144 +532.8 R .258(alue is 0 unless an in)-.25 F -.25(va)-.4 G .258 +(lid option is supplied or).25 F F0(n)2.758 E F1(inde)2.758 E -.15(xe) +-.15 G 2.758(sb).15 G -.15(ey)-2.758 G .258(ond the end of the direc-) +.15 F(tory stack.)144 544.8 Q F2(diso)108 561.6 Q(wn)-.1 E F1([)2.5 E F2 +(\255ar)A F1 2.5(][)C F2-2.5 E F1 2.5(][)C F0(id)-2.5 E F1 1.666 +(...)2.5 G(])-1.666 E -.4(Wi)144 573.6 S .343(thout options, remo).4 F +.643 -.15(ve e)-.15 H(ach).15 E F0(id)2.853 E F1 .342 +(from the table of acti)3.613 F .642 -.15(ve j)-.25 H 2.842(obs. Each) +.15 F F0(id)2.842 E F1 .342(may be a job speci\214cation)2.842 F F0 +(jobspec)144 585.6 Q F1(or a process ID)2.5 E F0(pid)2.5 E F1 2.5(;i)C +(f)-2.5 E F0(id)2.5 E F1(is a)2.5 E F0(pid)2.5 E F1(,)A F2(diso)2.5 E +(wn)-.1 E F1(uses the job containing)2.5 E F0(pid)2.5 E F1(as)2.5 E F0 +(jobspec)2.5 E F1(.)A .682(If the)144 602.4 R F23.183 E F1 .683 +(option is supplied,)3.183 F F2(diso)3.183 E(wn)-.1 E F1 .683 +(does not remo)3.183 F .983 -.15(ve t)-.15 H .683 +(he jobs corresponding to each).15 F F0(id)3.193 E F1 .683(from the) +3.953 F .184(jobs table, b)144 614.4 R .184 +(ut rather marks them so the shell does not send)-.2 F/F3 9/Times-Bold@0 +SF(SIGHUP)2.684 E F1 .184(to the job if the shell recei)2.434 F -.15(ve) +-.25 G(s).15 E(a)144 626.4 Q F3(SIGHUP)2.5 E/F4 9/Times-Roman@0 SF(.)A +F1 .57(If no)144 643.2 R F0(id)3.08 E F1 .57(is supplied, the)3.84 F F2 +3.07 E F1 .57(option means to remo)3.07 F .871 -.15(ve o)-.15 H +3.071(rm).15 G .571(ark all jobs; the)-3.071 F F23.071 E F1 .571 +(option without an)3.071 F F0(id)3.081 E F1(ar)144 655.2 Q .659 +(gument remo)-.18 F -.15(ve)-.15 G 3.159(so).15 G 3.159(rm)-3.159 G .659 +(arks running jobs.)-3.159 F .658(If no)5.659 F F0(id)3.168 E F1 .658 +(is supplied, and neither the)3.928 F F23.158 E F1 .658(nor the) +3.158 F F23.158 E F1(op-)3.158 E(tion is supplied,)144 667.2 Q F2 +(diso)2.5 E(wn)-.1 E F1(remo)2.5 E -.15(ve)-.15 G 2.5(so).15 G 2.5(rm) +-2.5 G(arks the current job)-2.5 E(.)-.4 E(The return v)144 684 Q +(alue is 0 unless an)-.25 E F0(id)2.51 E F1(does not specify a v)3.27 E +(alid job)-.25 E(.)-.4 E F2(echo)108 700.8 Q F1([)2.5 E F2(\255neE)A F1 +2.5(][)C F0(ar)-2.5 E(g)-.37 E F1 1.666(...)2.5 G(])-1.666 E .424 +(Output the)144 712.8 R F0(ar)2.924 E(g)-.37 E F1 .424 +(s, separated by spaces, follo)B .424(wed by a ne)-.25 F 2.924 +(wline. The)-.25 F .424(return status is 0 unless a write)2.924 F +(error occurs.)144 724.8 Q(If)5 E F22.5 E F1 +(is speci\214ed, the trailing ne)2.5 E(wline is not printed.)-.25 E +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(72)185.955 E 0 Cg EP +%%Page: 73 73 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .48(If the)144 84 R/F2 10/Times-Bold@0 SF2.98 +E F1 .48(option is gi)2.98 F -.15(ve)-.25 G(n,).15 E F2(echo)2.98 E F1 +.48(interprets the follo)2.98 F .48(wing backslash-escaped characters.) +-.25 F(The)5.48 E F22.98 E F1(op-)2.98 E .469 +(tion disables interpretation of these escape characters, e)144 96 R +-.15(ve)-.25 G 2.969(no).15 G 2.969(ns)-2.969 G .469(ystems where the) +-2.969 F 2.97(ya)-.15 G .47(re interpreted)-2.97 F .41(by def)144 108 R +2.91(ault. The)-.1 F F2(xpg_echo)2.91 E F1 .41 +(shell option determines whether or not)2.91 F F2(echo)2.91 E F1 .41 +(interprets an)2.91 F 2.91(yo)-.15 G .41(ptions and)-2.91 F -.15(ex)144 +120 S(pands these escape characters.).15 E F2(echo)5 E F1 +(does not interpret)2.5 E F22.5 E F1(to mean the end of options.) +2.5 E F2(echo)144 136.8 Q F1(interprets the follo)2.5 E +(wing escape sequences:)-.25 E F2(\\a)144 148.8 Q F1(alert \(bell\))180 +148.8 Q F2(\\b)144 160.8 Q F1(backspace)180 160.8 Q F2(\\c)144 172.8 Q +F1(suppress further output)180 172.8 Q F2(\\e)144 184.8 Q(\\E)144 196.8 +Q F1(an escape character)180 196.8 Q F2(\\f)144 208.8 Q F1(form feed)180 +208.8 Q F2(\\n)144 220.8 Q F1(ne)180 220.8 Q 2.5(wl)-.25 G(ine)-2.5 E F2 +(\\r)144 232.8 Q F1(carriage return)180 232.8 Q F2(\\t)144 244.8 Q F1 +(horizontal tab)180 244.8 Q F2(\\v)144 256.8 Q F1 -.15(ve)180 256.8 S +(rtical tab).15 E F2(\\\\)144 268.8 Q F1(backslash)180 268.8 Q F2(\\0) +144 280.8 Q F0(nnn)A F1(The eight-bit character whose v)180 280.8 Q +(alue is the octal v)-.25 E(alue)-.25 E F0(nnn)2.5 E F1 +(\(zero to three octal digits\).)2.5 E F2(\\x)144 292.8 Q F0(HH)A F1 +(The eight-bit character whose v)180 292.8 Q(alue is the he)-.25 E +(xadecimal v)-.15 E(alue)-.25 E F0(HH)2.5 E F1(\(one or tw)2.5 E 2.5(oh) +-.1 G .3 -.15(ex d)-2.5 H(igits\).).15 E F2(\\u)144 304.8 Q F0(HHHH)A F1 +1.203(The Unicode \(ISO/IEC 10646\) character whose v)180 316.8 R 1.204 +(alue is the he)-.25 F 1.204(xadecimal v)-.15 F(alue)-.25 E F0(HHHH) +3.704 E F1(\(one to four he)180 328.8 Q 2.5(xd)-.15 G(igits\).)-2.5 E F2 +(\\U)144 340.8 Q F0(HHHHHHHH)A F1 .245 +(The Unicode \(ISO/IEC 10646\) character whose v)180 352.8 R .244 +(alue is the he)-.25 F .244(xadecimal v)-.15 F(alue)-.25 E F0(HHHHH-) +2.744 E(HHH)180 364.8 Q F1(\(one to eight he)2.5 E 2.5(xd)-.15 G +(igits\).)-2.5 E F2(echo)144 381.6 Q F1(writes an)2.5 E 2.5(yu)-.15 G +(nrecognized backslash-escaped characters unchanged.)-2.5 E F2(enable) +108 398.4 Q F1([)2.5 E F2A F1 2.5(][)C F2(\255dnps)-2.5 E F1 2.5 +(][)C F2-2.5 E F0(\214lename)2.5 E F1 2.5(][)C F0(name)-2.5 E F1 +1.666(...)2.5 G(])-1.666 E 1.199(Enable and disable b)144 410.4 R 1.199 +(uiltin shell commands.)-.2 F 1.199(Disabling a b)6.199 F 1.199 +(uiltin allo)-.2 F 1.199(ws an e)-.25 F -.15(xe)-.15 G 1.2 +(cutable \214le which).15 F 1.737(has the same name as a shell b)144 +422.4 R 1.737(uiltin to be e)-.2 F -.15(xe)-.15 G 1.737 +(cuted without specifying a full pathname, e).15 F -.15(ve)-.25 G(n).15 +E(though the shell normally searches for b)144 434.4 Q +(uiltins before \214les.)-.2 E(If)144 451.2 Q F23.357 E F1 .857 +(is supplied, each)3.357 F F0(name)3.357 E F1 .857 +(is disabled; otherwise,)3.357 F F0(name)3.358 E F1 3.358(sa)C .858 +(re enabled.)-3.358 F -.15(Fo)5.858 G 3.358(re).15 G .858 +(xample, to use the)-3.508 F F2(test)144 463.2 Q F1(binary found usin g) +2.5 E/F3 9/Times-Bold@0 SF -.666(PA)2.5 G(TH)-.189 E F1 +(instead of the shell b)2.25 E(uiltin v)-.2 E +(ersion, run \231enable \255n test\232.)-.15 E 1.165(If no)144 480 R F0 +(name)3.665 E F1(ar)3.665 E 1.165(guments are supplied, or if the)-.18 F +F23.665 E F1 1.165(option is supplied, print a list of shell b) +3.665 F(uiltins.)-.2 E -.4(Wi)144 492 S 1.005(th no other option ar).4 F +1.005(guments, the list consists of all enabled shell b)-.18 F 3.505 +(uiltins. If)-.2 F F23.505 E F1 1.005(is supplied,)3.505 F .46 +(print only disabled b)144 504 R 2.96(uiltins. If)-.2 F F22.96 E +F1 .46(is supplied, the list printed includes all b)2.96 F .46 +(uiltins, with an indica-)-.2 F .79 +(tion of whether or not each is enabled.)144 516 R(The)5.79 E F2 +3.291 E F1 .791(option means to restrict the output to the POSIX)3.291 F +F0(special)144 528 Q F1 -.2(bu)2.5 G(iltins.).2 E(The)144 544.8 Q F2 +2.785 E F1 .285(option means to load the ne)2.785 F 2.785(wb)-.25 +G .285(uiltin command)-2.985 F F0(name)3.145 E F1 .285 +(from shared object)2.965 F F0(\214lename)4.695 E F1 2.785(,o).18 G +2.785(ns)-2.785 G(ys-)-2.785 E .01(tems that support dynamic loading.) +144 556.8 R(If)5.01 E F0(\214lename)2.51 E F1 .01 +(does not contain a slash,)2.51 F F2(Bash)2.51 E F1 .01(will use the v) +2.51 F .01(alue of)-.25 F(the)144 568.8 Q F2 -.3(BA)4.457 G(SH_LO).3 E +(AD)-.4 E(ABLES_P)-.35 E -.95(AT)-.74 G(H).95 E F1 -.25(va)4.457 G 1.956 +(riable as a colon-separated list of directories in which to).25 F .305 +(search for)144 580.8 R F0(\214lename)2.805 E F1 5.305(.T)C .305(he def) +-5.305 F .305(ault for)-.1 F F2 -.3(BA)2.805 G(SH_LO).3 E(AD)-.4 E +(ABLES_P)-.35 E -.95(AT)-.74 G(H).95 E F1 .305 +(is system-dependent, and may)2.805 F .054 +(include \231.\232 to force a search of the current directory)144 592.8 +R 5.054(.T)-.65 G(he)-5.054 E F22.554 E F1 .054 +(option will delete a b)2.554 F .054(uiltin pre)-.2 F(viously)-.25 E +(loaded with)144 604.8 Q F22.5 E F1 5(.I)C(f)-5 E F02.5 E F1 +(is used with)2.5 E F02.5 E F1 2.5(,t)C(he ne)-2.5 E 2.5(wb)-.25 G +(uiltin becomes a POSIX special b)-2.7 E(uiltin.)-.2 E .269 +(If no options are supplied and a)144 621.6 R F0(name)2.769 E F1 .269 +(is not a shell b)2.769 F(uiltin,)-.2 E F2(enable)2.769 E F1 .269 +(will attempt to load)2.769 F F0(name)2.769 E F1(from)2.769 E 2.5(as)144 +633.6 S(hared object named)-2.5 E F0(name)2.5 E F1 2.5(,a)C 2.5(si)-2.5 +G 2.5(ft)-2.5 G(he command were \231enable \255f)-2.5 E F0(name name)2.5 +E F1<9a2e>A .478(The return v)144 650.4 R .477(alue is 0 unless a)-.25 F +F0(name)3.337 E F1 .477(is not a shell b)3.157 F .477 +(uiltin or there is an error loading a ne)-.2 F 2.977(wb)-.25 G(uiltin) +-3.177 E(from a shared object.)144 662.4 Q F2 -2.3 -.15(ev a)108 679.2 T +(l).15 E F1([)2.5 E F0(ar)A(g)-.37 E F1 1.666(...)2.5 G(])-1.666 E 1.347 +(Concatenate the)144 691.2 R F0(ar)3.847 E(g)-.37 E F1 3.847(st)C 1.348 +(ogether into a single command, separating them with spaces.)-3.847 F F2 +(Bash)6.348 E F1(then)3.848 E .177(reads and e)144 703.2 R -.15(xe)-.15 +G .176(cute this command, and returns its e).15 F .176 +(xit status as the return status of)-.15 F F2 -2.3 -.15(ev a)2.676 H(l) +.15 E F1 5.176(.I)C 2.676(ft)-5.176 G .176(here are)-2.676 F(no)144 +715.2 Q F0(ar)2.83 E(gs)-.37 E F1 2.5(,o).27 G 2.5(ro)-2.5 G +(nly null ar)-2.5 E(guments,)-.18 E F2 -2.3 -.15(ev a)2.5 H(l).15 E F1 +(returns 0.)2.5 E(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(73) +185.955 E 0 Cg EP +%%Page: 74 74 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(exec)108 84 Q F1([)2.5 E F2 +(\255cl)A F1 2.5(][)C F2-2.5 E F0(name)2.5 E F1 2.5(][)C F0 +(command)-2.5 E F1([)2.5 E F0(ar)A(guments)-.37 E F1(]])A(If)144 96 Q F0 +(command)2.983 E F1 .283 +(is speci\214ed, it replaces the shell without creating a ne)3.553 F +2.784(wp)-.25 G(rocess.)-2.784 E F0(command)5.284 E F1 .284(cannot be) +2.784 F 2.878(as)144 108 S .378(hell b)-2.878 F .378 +(uiltin or function.)-.2 F(The)5.378 E F0(ar)3.208 E(guments)-.37 E F1 +.378(become the ar)3.148 F .377(guments to)-.18 F F0(command)2.877 E F1 +5.377(.I)C 2.877(ft)-5.377 G(he)-2.877 E F22.877 E F1 .377 +(option is)2.877 F .078(supplied, the shell places a dash at the be)144 +120 R .078(ginning of the zeroth ar)-.15 F .078(gument passed to)-.18 F +F0(command)2.779 E F1 5.079(.T).77 G(his)-5.079 E .139(is what)144 132 R +F0(lo)2.729 E(gin)-.1 E F1 .139(\(1\) does.).24 F(The)5.139 E F2 +2.639 E F1 .139(option causes)2.639 F F0(command)2.839 E F1 .139 +(to be e)3.409 F -.15(xe)-.15 G .138(cuted with an empty en).15 F +(vironment.)-.4 E(If)144 144 Q F22.5 E F1 +(is supplied, the shell passes)2.5 E F0(name)2.86 E F1(as the zeroth ar) +2.68 E(gument to the e)-.18 E -.15(xe)-.15 G(cuted command.).15 E(If)144 +160.8 Q F0(command)3.245 E F1 .545(cannot be e)3.815 F -.15(xe)-.15 G +.546(cuted for some reason, a non-interacti).15 F .846 -.15(ve s)-.25 H +.546(hell e).15 F .546(xits, unless the)-.15 F F2(execfail)3.046 E F1 +1.22(shell option is enabled.)144 172.8 R 1.22 +(In that case, it returns a non-zero status.)6.22 F 1.22(An interacti) +6.22 F 1.52 -.15(ve s)-.25 H 1.22(hell returns a).15 F +(non-zero status if the \214le cannot be e)144 184.8 Q -.15(xe)-.15 G +2.5(cuted. A).15 F(subshell e)2.5 E(xits unconditionally if)-.15 E F2 +(exec)2.5 E F1 -.1(fa)2.5 G(ils.).1 E(If)144 201.6 Q F0(command)3.224 E +F1 .524(is not speci\214ed, an)3.794 F 3.024(yr)-.15 G .524 +(edirections tak)-3.024 F 3.024(ee)-.1 G -.25(ff)-3.024 G .525 +(ect in the current shell, and the return status).25 F(is 0.)144 213.6 Q +(If there is a redirection error)5 E 2.5(,t)-.4 G +(he return status is 1.)-2.5 E F2(exit)108 230.4 Q F1([)2.5 E F0(n)A F1 +(])A .096(Cause the shell to e)144 230.4 R .096(xit with a status of) +-.15 F F0(n)2.596 E F1 5.096(.I)C(f)-5.096 E F0(n)2.955 E F1 .095 +(is omitted, the e)2.835 F .095(xit status is that of the last command) +-.15 F -.15(exe)144 242.4 S 2.5(cuted. An).15 F 2.5(yt)-.15 G(rap on) +-2.5 E/F3 9/Times-Bold@0 SF(EXIT)2.5 E F1(is e)2.25 E -.15(xe)-.15 G +(cuted before the shell terminates.).15 E F2(export)108 259.2 Q F1([)2.5 +E F2(\255fn)A F1 2.5(][).833 G F0(name)-2.5 E F1([=)A F0(value)A F1 +(]] .)A 1.666(..)1.666 G F2(export \255p)108 271.2 Q F1 .256 +(The supplied)144 283.2 R F0(names)3.117 E F1 .257(are mark)3.027 F .257 +(ed for automatic e)-.1 F .257(xport to the en)-.15 F .257 +(vironment of subsequently e)-.4 F -.15(xe)-.15 G(cuted).15 E 2.5 +(commands. If)144 295.2 R(the)2.5 E F22.5 E F1(option is gi)2.5 E +-.15(ve)-.25 G(n, the).15 E F0(names)2.86 E F1(refer to functions.)2.77 +E(The)144 312 Q F22.681 E F1 .181(option une)2.681 F .181 +(xports, or remo)-.15 F -.15(ve)-.15 G 2.681(st).15 G .181(he e)-2.681 F +.181(xport attrib)-.15 F .181(ute, from each)-.2 F F0(name)2.68 E F1 +5.18(.I)C 2.68(fn)-5.18 G(o)-2.68 E F0(names)3.04 E F1 .18(are gi)2.95 F +-.15(ve)-.25 G(n,).15 E .535(or if the)144 324 R F23.035 E F1 .536 +(option is supplied,)3.035 F F2(export)3.036 E F1 .536 +(prints a list of names of all e)3.036 F .536(xported v)-.15 F .536 +(ariables on the stan-)-.25 F(dard output.)144 336 Q F2(export)144 352.8 +Q F1(allo)2.94 E .44(ws the v)-.25 F .44(alue of a v)-.25 F .44 +(ariable to be set when it is e)-.25 F .44(xported or une)-.15 F .44 +(xported by follo)-.15 F .44(wing the)-.25 F -.25(va)144 364.8 S .151 +(riable name with =).25 F F0(value)A F1 5.152(.T)C .152(his sets the v) +-5.152 F .152(alue of the v)-.25 F .152(ariable to)-.25 F F0(value)2.652 +E F1 .152(while modifying the e)2.652 F(xport)-.15 E(attrib)144 376.8 Q +(ute.)-.2 E F2(export)6.361 E F1 1.361(returns an e)3.861 F 1.361 +(xit status of 0 unless an in)-.15 F -.25(va)-.4 G 1.36 +(lid option is encountered, one of the).25 F F0(names)144 388.8 Q F1 +(is not a v)2.5 E(alid shell v)-.25 E(ariable name, or)-.25 E F2 +2.5 E F1(is supplied with a)2.5 E F0(name)2.86 E F1 +(that is not a function.)2.68 E F2(false)108 405.6 Q F1 +(Does nothing; returns a non-zero status.)144 405.6 Q F2(fc)108 422.4 Q +F1([)2.5 E F2A F0(ename)2.5 E F1 2.5(][)C F2(\255lnr)-2.5 E F1 2.5 +(][)C F0<8c72>-2.5 E(st)-.1 E F1 2.5(][)C F0(last)-2.5 E F1(])A F2 +(fc \255s)108 434.4 Q F1([)2.5 E F0(pat)A F1(=)A F0 -.37(re)C(p).37 E F1 +2.5(][)C F0(cmd)-2.5 E F1(])A .431 +(The \214rst form selects a range of commands from)144 446.4 R F0<8c72> +4.842 E(st)-.1 E F1(to)3.612 E F0(last)3.022 E F1 .432 +(from the history list and displays or)3.612 F .142(edits and re-e)144 +458.4 R -.15(xe)-.15 G .142(cutes them.).15 F F0 -.45(Fi)5.141 G -.1(rs) +.45 G(t).1 E F1(and)3.321 E F0(last)2.731 E F1 .141 +(may be speci\214ed as a string \(to locate the last command)3.321 F(be) +144 470.4 Q .31(ginning with that string\) or as a number \(an inde)-.15 +F 2.811(xi)-.15 G .311(nto the history list, where a ne)-2.811 F -.05 +(ga)-.15 G(ti).05 E .611 -.15(ve n)-.25 H(umber).15 E(is used as an of) +144 482.4 Q(fset from the current command number\).)-.25 E .747 +(When listing, a)144 499.2 R F0<8c72>3.247 E(st)-.1 E F1(or)3.247 E F0 +(last)3.247 E F1 .746(of 0 is equi)3.247 F -.25(va)-.25 G .746 +(lent to \2551 and \2550 is equi).25 F -.25(va)-.25 G .746 +(lent to the current command).25 F .778(\(usually the)144 511.2 R F2(fc) +3.278 E F1 .779(command\); otherwise 0 is equi)3.279 F -.25(va)-.25 G +.779(lent to \2551 and \2550 is in).25 F -.25(va)-.4 G 3.279(lid. If).25 +F F0(last)3.369 E F1 .779(is not speci-)3.959 F .513(\214ed, it is set \ +to the current command for listing \(so that \231fc \255l \25510\232 pr\ +ints the last 10 commands\))144 523.2 R .766(and to)144 535.2 R F0<8c72> +5.176 E(st)-.1 E F1 3.266(otherwise. If)3.946 F F0<8c72>5.176 E(st)-.1 E +F1 .766(is not speci\214ed, it is set to the pre)3.946 F .766 +(vious command for editing and)-.25 F(\25516 for listing.)144 547.2 Q +.697(If the)144 564 R F23.197 E F1 .697 +(option is supplied, the commands are listed on the standard output.) +3.197 F(The)5.696 E F23.196 E F1 .696(option sup-)3.196 F +(presses the command numbers when listing.)144 576 Q(The)5 E F22.5 +E F1(option re)2.5 E -.15(ve)-.25 G(rses the order of the commands.).15 +E(Otherwise,)144 592.8 Q F2(fc)2.902 E F1(in)2.902 E -.2(vo)-.4 G -.1 +(ke).2 G 2.902(st).1 G .402(he editor named by)-2.902 F F0(ename)3.092 E +F1 .402(on a \214le containing those commands.)3.082 F(If)5.402 E F0 +(ename)3.092 E F1 .542(is not supplied,)144 604.8 R F2(fc)3.042 E F1 +.542(uses the v)3.042 F .542(alue of the)-.25 F F3(FCEDIT)3.042 E F1 +-.25(va)2.792 G .542(riable, and the v).25 F .542(alue of)-.25 F F3 +(EDIT)3.042 E(OR)-.162 E F1(if)2.791 E F3(FCEDIT)3.041 E F1(is)2.791 E +.212(not set.)144 616.8 R .212(If neither v)5.212 F .212 +(ariable is set,)-.25 F F2(fc)2.712 E F1(uses)2.712 E F0(vi.)4.378 E F1 +.212(When editing is complete,)4.378 F F2(fc)2.712 E F1 .213 +(reads the \214le containing)2.712 F +(the edited commands and echoes and e)144 628.8 Q -.15(xe)-.15 G +(cutes them.).15 E .712(In the second form,)144 645.6 R F2(fc)3.212 E F1 +(re-e)3.212 E -.15(xe)-.15 G(cutes).15 E F0(command)3.211 E F1 .711 +(after replacing each instance of)3.211 F F0(pat)3.211 E F1(with)3.211 E +F0 -.37(re)3.211 G(p).37 E F1(.)A F0(Com-)5.711 E(mand)144 657.6 Q F1 +(is interpreted the same as)2.5 E F0<8c72>2.5 E(st)-.1 E F1(abo)2.5 E +-.15(ve)-.15 G(.).15 E 2.826(Au)144 674.4 S .326 +(seful alias to use with)-2.826 F F2(fc)2.827 E F1 .327(is \231r="fc \ +\255s"\232, so that typing \231r cc\232 runs the last command be)2.827 F +(ginning)-.15 E(with \231cc\232 and typing \231r\232 re-e)144 686.4 Q +-.15(xe)-.15 G(cutes the last command.).15 E .44 +(If the \214rst form is used, the return v)144 703.2 R .439 +(alue is zero unless an in)-.25 F -.25(va)-.4 G .439 +(lid option is encountered or).25 F F0<8c72>4.849 E(st)-.1 E F1(or)3.619 +E F0(last)144.09 715.2 Q F1 .402(specify history lines out of range.) +3.581 F .402(When editing and re-e)5.402 F -.15(xe)-.15 G .402 +(cuting a \214le of commands, the re-).15 F 2.421(turn v)144 727.2 R +2.421(alue is the v)-.25 F 2.421(alue of the last command e)-.25 F -.15 +(xe)-.15 G 2.421(cuted or f).15 F 2.42 +(ailure if an error occurs with the)-.1 F(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(74)185.955 E 0 Cg EP +%%Page: 75 75 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .884(temporary \214le.)144 84 R .884 +(If the second form is used, the return status is that of the re-e)5.884 +F -.15(xe)-.15 G .885(cuted command,).15 F(unless)144 96 Q F0(cmd)2.7 E +F1(does not specify a v)3.27 E(alid history entry)-.25 E 2.5(,i)-.65 G +2.5(nw)-2.5 G(hich case)-2.5 E/F2 10/Times-Bold@0 SF(fc)2.5 E F1 +(returns a non-zero status.)2.5 E F2(fg)108 112.8 Q F1([)2.5 E F0 +(jobspec)A F1(])A(Resume)144 124.8 Q F0(jobspec)4.639 E F1 .399 +(in the fore)3.209 F .399(ground, and mak)-.15 F 2.899(ei)-.1 G 2.899 +(tt)-2.899 G .399(he current job)-2.899 F 5.399(.I)-.4 G(f)-5.399 E F0 +(jobspec)4.639 E F1 .399(is not present,)3.209 F F2(fg)2.898 E F1(uses) +2.898 E .247(the shell')144 136.8 R 2.747(sn)-.55 G .247(otion of the) +-2.747 F F0(curr)2.747 E .247(ent job)-.37 F F1 5.247(.T)C .247 +(he return v)-5.247 F .247 +(alue is that of the command placed into the fore-)-.25 F .098 +(ground, or f)144 148.8 R .098 +(ailure if run when job control is disabled or)-.1 F 2.598(,w)-.4 G .098 +(hen run with job control enabled, if)-2.598 F F0(job-)4.337 E(spec)144 +160.8 Q F1(does not specify a v)2.81 E(alid job or)-.25 E F0(jobspec) +4.24 E F1(speci\214es a job that w)2.81 E +(as started without job control.)-.1 E F2(getopts)108 177.6 Q F0 +(optstring name)2.5 E F1([)2.5 E F0(ar)A(g)-.37 E F1 1.666(...)2.5 G(]) +-1.666 E F2(getopts)144 189.6 Q F1 .051(is used by shell scripts and fu\ +nctions to parse positional parameters and obtain options and)2.55 F +1.13(their ar)144 201.6 R(guments.)-.18 E F0(optstring)6.36 E F1 1.129(\ +contains the option characters to be recognized; if a character is fol-) +3.85 F(lo)144 213.6 Q .656(wed by a colon, the option is e)-.25 F .656 +(xpected to ha)-.15 F .957 -.15(ve a)-.2 H 3.157(na).15 G -.18(rg)-3.157 +G .657(ument, which should be separated from it).18 F(by white space.) +144 225.6 Q(The colon and question mark characters may not be used as o\ +ption characters.)5 E .032(Each time it is in)144 242.4 R -.2(vo)-.4 G +-.1(ke).2 G(d,).1 E F2(getopts)2.531 E F1 .031(places the ne)2.531 F +.031(xt option in the shell v)-.15 F(ariable)-.25 E F0(name)2.891 E F1 +2.531(,i).18 G(nitializing)-2.531 E F0(name)2.891 E F1 .522 +(if it does not e)144 254.4 R .522(xist, and the inde)-.15 F 3.022(xo) +-.15 G 3.022(ft)-3.022 G .522(he ne)-3.022 F .522(xt ar)-.15 F .522 +(gument to be processed into the v)-.18 F(ariable)-.25 E/F3 9 +/Times-Bold@0 SF(OPTIND)3.023 E/F4 9/Times-Roman@0 SF(.)A F3(OPTIND)144 +266.4 Q F1 .079 +(is initialized to 1 each time the shell or a shell script is in)2.33 F +-.2(vo)-.4 G -.1(ke).2 G 2.579(d. When).1 F .079(an option requires) +2.579 F(an ar)144 278.4 Q(gument,)-.18 E F2(getopts)2.5 E F1 +(places that ar)2.5 E(gument into the v)-.18 E(ariable)-.25 E F3(OPT)2.5 +E(ARG)-.81 E F4(.)A F1 .647(The shell does not reset)144 295.2 R F3 +(OPTIND)3.147 E F1 .647 +(automatically; it must be manually reset between multiple calls)2.897 F +(to)144 307.2 Q F2(getopts)2.5 E F1(within the same shell in)2.5 E -.2 +(vo)-.4 G(cation to use a ne).2 E 2.5(ws)-.25 G(et of parameters.)-2.5 E +.102(When it reaches the end of options,)144 324 R F2(getopts)2.602 E F1 +-.15(ex)2.602 G .102(its with a return v).15 F .101 +(alue greater than zero.)-.25 F F3(OPTIND)5.101 E F1(is)2.351 E +(set to the inde)144 336 Q 2.5(xo)-.15 G 2.5(ft)-2.5 G +(he \214rst non-option ar)-2.5 E(gument, and)-.18 E F0(name)2.5 E F1 +(is set to ?.)2.5 E F2(getopts)144 352.8 Q F1 .485 +(normally parses the positional parameters, b)2.985 F .485 +(ut if more ar)-.2 F .485(guments are supplied as)-.18 F F0(ar)3.315 E +(g)-.37 E F1 -.25(va)3.205 G(l-).25 E(ues,)144 364.8 Q F2(getopts)2.5 E +F1(parses those instead.)2.5 E F2(getopts)144 381.6 Q F1 .833 +(can report errors in tw)3.333 F 3.333(ow)-.1 G 3.333(ays. If)-3.433 F +.833(the \214rst character of)3.333 F F0(optstring)3.563 E F1 .833 +(is a colon,)3.553 F F2(getopts)3.333 E F1(uses)3.332 E F0(silent)144.34 +393.6 Q F1 .211(error reporting.)3.391 F .211(In normal operation,)5.211 +F F2(getopts)2.712 E F1 .212 +(prints diagnostic messages when it encounters)2.712 F(in)144 405.6 Q +-.25(va)-.4 G .32(lid options or missing option ar).25 F 2.82 +(guments. If)-.18 F .32(the v)2.82 F(ariable)-.25 E F3(OPTERR)2.82 E F1 +.32(is set to 0,)2.57 F F2(getopts)2.819 E F1 .319(does not)2.819 F +(display an)144 417.6 Q 2.5(ye)-.15 G(rror messages, e)-2.5 E -.15(ve) +-.25 G 2.5(ni).15 G 2.5(ft)-2.5 G(he \214rst character of)-2.5 E F0 +(optstring)2.73 E F1(is not a colon.)2.72 E(If)144 434.4 Q F2(getopts) +2.672 E F1 .172(detects an in)2.672 F -.25(va)-.4 G .173 +(lid option, it places ? into).25 F F0(name)3.033 E F1 .173 +(and, if not silent, prints an error message)2.853 F 1.148(and unsets) +144 446.4 R F3(OPT)3.647 E(ARG)-.81 E F4(.)A F1(If)5.647 E F2(getopts) +3.647 E F1 1.147(is silent, it assigns the option character found to) +3.647 F F3(OPT)3.647 E(ARG)-.81 E F1(and)3.397 E +(does not print a diagnostic message.)144 458.4 Q .602(If a required ar) +144 475.2 R .602(gument is not found, and)-.18 F F2(getopts)3.102 E F1 +.602(is not silent, it sets the v)3.102 F .602(alue of)-.25 F F0(name) +3.102 E F1 .602(to a ques-)3.102 F 1.056(tion mark \()144 487.2 R F2(?) +.833 E F1 1.056(\), unsets).833 F F3(OPT)3.556 E(ARG)-.81 E F4(,)A F1 +1.056(and prints a diagnostic message.)3.306 F(If)6.056 E F2(getopts) +3.556 E F1 1.055(is silent, it sets the)3.556 F -.25(va)144 499.2 S +(lue of).25 E F0(name)2.5 E F1(to a colon \()2.5 E F2(:).833 E F1 2.5 +(\)a).833 G(nd sets)-2.5 E F3(OPT)2.5 E(ARG)-.81 E F1 +(to the option character found.)2.25 E F2(getopts)144 516 Q F1 .902 +(returns true if an option, speci\214ed or unspeci\214ed, is found.) +3.401 F .902(It returns f)5.902 F .902(alse if the end of)-.1 F +(options is encountered or an error occurs.)144 528 Q F2(hash)108 544.8 +Q F1([)2.5 E F2(\255lr)A F1 2.5(][)C F2-2.5 E F0(\214lename)2.5 E +F1 2.5(][)C F2(\255dt)-2.5 E F1 2.5(][)C F0(name)-2.5 E F1(])A .636 +(Each time)144 556.8 R F2(hash)3.136 E F1 .636(is in)3.136 F -.2(vo)-.4 +G -.1(ke).2 G .636(d, it remembers the full pathname of the command).1 F +F0(name)3.496 E F1 .636(as determined)3.316 F 1.427 +(by searching the directories in)144 568.8 R F2($P)3.927 E -.95(AT)-.74 +G(H).95 E F1 6.427(.A)C 1.727 -.15(ny p)-6.427 H(re).15 E 1.427 +(viously-remembered pathname associated with)-.25 F F0(name)144 580.8 Q +F1 .943(is discarded.)3.443 F .943(If the)5.943 F F23.443 E F1 +.942(option is supplied,)3.443 F F2(hash)3.442 E F1(uses)3.442 E F0 +(\214lename)5.352 E F1 .942(as the full pathname of the)3.622 F +(command.)144 592.8 Q(The)144 609.6 Q F23.312 E F1 .812 +(option causes the shell to for)3.312 F .813 +(get all remembered locations.)-.18 F .813(Assigning to the)5.813 F F2 +-.74(PA)3.313 G(TH)-.21 E F1 -.25(va)3.313 G(ri-).25 E .278 +(able also clears all hashed \214lenames.)144 621.6 R(The)5.278 E F2 +2.778 E F1 .277(option causes the shell to for)2.778 F .277 +(get the remembered lo-)-.18 F(cation of each)144 633.6 Q F0(name)2.5 E +F1(.)A .107(If the)144 650.4 R F22.607 E F1 .107 +(option is supplied,)2.607 F F2(hash)2.607 E F1 .108 +(prints the full pathname corresponding to each)2.607 F F0(name)2.608 E +F1 5.108(.I)C 2.608(fm)-5.108 G(ultiple)-2.608 E F0(name)144 662.4 Q F1 +(ar)3.154 E .654(guments are supplied with)-.18 F F23.154 E F1(,)A +F2(hash)3.154 E F1 .654(prints the)3.154 F F0(name)3.153 E F1 .653 +(before the corresponding hashed full)3.153 F 2.5(pathname. The)144 +674.4 R F22.5 E F1 +(option displays output in a format that may be reused as input.)2.5 E +1.19(If no ar)144 691.2 R 1.19(guments are gi)-.18 F -.15(ve)-.25 G +1.191(n, or if only).15 F F23.691 E F1 1.191(is supplied,)3.691 F +F2(hash)3.691 E F1 1.191(prints information about remembered)3.691 F +2.723(commands. The)144 703.2 R F22.723 E F1(,)A F22.723 E +F1 2.723(,a)C(nd)-2.723 E F22.723 E F1 .222 +(options \(the options that act on the)2.723 F F0(name)2.722 E F1(ar) +2.722 E .222(guments\) are mutually)-.18 F -.15(ex)144 715.2 S(clusi).15 +E -.15(ve)-.25 G 5.737(.O).15 G .737(nly one will be acti)-5.737 F -.15 +(ve)-.25 G 5.737(.I).15 G 3.238(fm)-5.737 G .738 +(ore than one is supplied,)-3.238 F F23.238 E F1 .738 +(has higher priority than)3.238 F F23.238 E F1(,)A(and both ha)144 +727.2 Q .3 -.15(ve h)-.2 H(igher priority than).15 E F22.5 E F1(.) +A(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(75)185.955 E 0 Cg EP +%%Page: 76 76 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(The return status is zero unless a)144 84 Q F0 +(name)2.86 E F1(is not found or an in)2.68 E -.25(va)-.4 G +(lid option is supplied.).25 E/F2 10/Times-Bold@0 SF(help)108 100.8 Q F1 +([)2.5 E F2(\255dms)A F1 2.5(][)C F0(pattern)-2.5 E F1(])A .867 +(Display helpful information about b)144 112.8 R .867(uiltin commands.) +-.2 F(If)5.867 E F0(pattern)4.617 E F1 .866(is speci\214ed,)3.607 F F2 +(help)3.366 E F1(gi)3.366 E -.15(ve)-.25 G 3.366(sd).15 G(etailed)-3.366 +E 1.093(help on all commands matching)144 124.8 R F0(pattern)4.843 E F1 +3.593(;o).24 G 1.093(therwise it displays a list of all the b)-3.593 F +1.094(uiltins and shell)-.2 F(compound commands.)144 136.8 Q F2144 +148.8 Q F1(Display a short description of each)180 148.8 Q F0(pattern) +2.5 E F2144 160.8 Q F1(Display the description of each)180 160.8 Q +F0(pattern)2.5 E F1(in a manpage-lik)2.5 E 2.5(ef)-.1 G(ormat)-2.5 E F2 +144 172.8 Q F1(Display only a short usage synopsis for each)180 +172.8 Q F0(pattern)2.5 E F1 +(The return status is 0 unless no command matches)144 189.6 Q F0 +(pattern)3.75 E F1(.).24 E F2(history [)108 206.4 Q F0(n)A F2(])A +(history \255c)108 218.4 Q(history \255d)108 230.4 Q F0(of)2.5 E(fset) +-.18 E F2(history \255d)108 242.4 Q F0(start)2.5 E F1(-)A F0(end)A F2 +(history \255anrw)108 254.4 Q F1([)2.5 E F0(\214lename)A F1(])A F2 +(history \255p)108 266.4 Q F0(ar)2.5 E(g)-.37 E F1([)2.5 E F0(ar)A(g) +-.37 E F1 1.666(...)2.5 G(])-1.666 E F2(history \255s)108 278.4 Q F0(ar) +2.5 E(g)-.37 E F1([)2.5 E F0(ar)A(g)-.37 E F1 1.666(...)2.5 G(])-1.666 E +-.4(Wi)144 290.4 S .832 +(th no options, display the command history list with numbers.).4 F .831 +(Entries pre\214x)5.831 F .831(ed with a)-.15 F F2(*)3.331 E F1(ha)3.331 +E -.15(ve)-.2 G 1.081(been modi\214ed.)144 302.4 R 1.082(An ar)6.081 F +1.082(gument of)-.18 F F0(n)3.942 E F1 1.082(lists only the last)3.822 F +F0(n)3.942 E F1 3.582(entries. If)3.822 F 1.082(the shell v)3.582 F +(ariable)-.25 E/F3 9/Times-Bold@0 SF(HISTTIME-)3.582 E(FORMA)144 314.4 Q +(T)-.855 E F1 .464 +(is set and not null, it is used as a format string for)2.715 F F0 +(strftime)3.304 E F1 .464(\(3\) to display the time stamp).18 F 1.715 +(associated with each displayed history entry)144 326.4 R 6.715(.I)-.65 +G(f)-6.715 E F2(history)4.216 E F1(uses)4.216 E F3(HISTTIMEFORMA)4.216 E +(T)-.855 E/F4 9/Times-Roman@0 SF(,)A F1 1.716(it does not)3.966 F +(print an interv)144 338.4 Q +(ening space between the formatted time stamp and the history entry)-.15 +E(.)-.65 E(If)144 355.2 Q F0(\214lename)3.37 E F1 .87(is supplied,)3.37 +F F2(history)3.37 E F1 .869 +(uses it as the name of the history \214le; if not, it uses the v)3.37 F +.869(alue of)-.25 F F3(HISTFILE)144 367.2 Q F4(.)A F1(If)4.938 E F0 +(\214lename)2.938 E F1 .438(is not supplied and)2.938 F F3(HISTFILE) +2.938 E F1 .438(is unset or null, the)2.688 F F2 .438 +(\255a, \255n, \255r)2.938 F(,)-.92 E F1(and)2.939 E F22.939 E F1 +(op-)2.939 E(tions ha)144 379.2 Q .3 -.15(ve n)-.2 H 2.5(oe).15 G -.25 +(ff)-2.5 G(ect.).25 E(Options, if supplied, ha)144 396 Q .3 -.15(ve t) +-.2 H(he follo).15 E(wing meanings:)-.25 E F2144 408 Q F1 .018 +(Clear the history list by deleting all the entries.)180 408 R .017 +(This can be used with the other options to)5.018 F +(replace the history list.)180 420 Q F2144 432 Q F0(of)2.5 E(fset) +-.18 E F1 .389(Delete the history entry at position)180 444 R F0(of) +2.889 E(fset)-.18 E F1 5.389(.I)C(f)-5.389 E F0(of)2.889 E(fset)-.18 E +F1 .389(is ne)2.889 F -.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G 2.89(,i).15 +G 2.89(ti)-2.89 G 2.89(si)-2.89 G .39(nterpreted as relati)-2.89 F -.15 +(ve)-.25 G .599(to one greater than the last history position, so ne)180 +456 R -.05(ga)-.15 G(ti).05 E .899 -.15(ve i)-.25 H .598 +(ndices count back from the end).15 F(of the history)180 468 Q 2.5(,a) +-.65 G(nd an inde)-2.5 E 2.5(xo)-.15 G 2.5<66ad>-2.5 G 2.5(1r)-2.5 G +(efers to the current)-2.5 E F2(history \255d)2.5 E F1(command.)2.5 E F2 +144 480 Q F0(start)2.5 E F1A F0(end)A F1 1.25 +(Delete the range of history entries between positions)180 492 R F0 +(start)3.75 E F1(and)3.75 E F0(end)3.75 E F1 3.75(,i)C(nclusi)-3.75 E +-.15(ve)-.25 G 6.25(.P).15 G(ositi)-6.25 E -.15(ve)-.25 G(and ne)180 504 +Q -.05(ga)-.15 G(ti).05 E .3 -.15(ve v)-.25 H(alues for)-.1 E F0(start) +2.5 E F1(and)2.5 E F0(end)2.5 E F1(are interpreted as described abo)2.5 +E -.15(ve)-.15 G(.).15 E F2144 516 Q F1 .776(Append the \231ne)180 +516 R .776(w\232 history lines to the history \214le.)-.25 F .775 +(These are history lines entered since)5.776 F(the be)180 528 Q +(ginning of the current)-.15 E F2(bash)2.5 E F1(session, b)2.5 E +(ut not already appended to the history \214le.)-.2 E F2144 540 Q +F1 .732(Read the history lines not already read from the history \214le\ + and add them to the current)180 540 R .143(history list.)180 552 R .143 +(These are lines appended to the history \214le since the be)5.143 F +.142(ginning of the current)-.15 F F2(bash)180 564 Q F1(session.)2.5 E +F2144 576 Q F1(Read the history \214le and append its contents to\ + the current history list.)180 576 Q F2144 588 Q F1 +(Write the current history list to the history \214le, o)180 588 Q -.15 +(ve)-.15 G(rwriting the history \214le.).15 E F2144 600 Q F1 .625 +(Perform history substitution on the follo)180 600 R(wing)-.25 E F0(ar) +3.125 E(gs)-.37 E F1 .626(and display the result on the standard)3.125 F +.469(output, without storing the results in the history list.)180 612 R +(Each)5.469 E F0(ar)2.969 E(g)-.37 E F1 .468(must be quoted to disable) +2.968 F(normal history e)180 624 Q(xpansion.)-.15 E F2144 636 Q F1 +.362(Store the)180 636 R F0(ar)3.192 E(gs)-.37 E F1 .363 +(in the history list as a single entry)3.132 F 5.363(.T)-.65 G .363 +(he last command in the history list is)-5.363 F(remo)180 648 Q -.15(ve) +-.15 G 2.5(db).15 G(efore adding the)-2.5 E F0(ar)2.83 E(gs)-.37 E F1(.) +.27 E 1.153(If the)144 664.8 R F3(HISTTIMEFORMA)3.653 E(T)-.855 E F1 +-.25(va)3.402 G 1.152(riable is set,).25 F F2(history)3.652 E F1 1.152 +(writes the time stamp information associated)3.652 F .188 +(with each history entry to the history \214le, mark)144 676.8 R .189 +(ed with the history comment character as described)-.1 F(abo)144 688.8 +Q -.15(ve)-.15 G 5.265(.W).15 G .264 +(hen the history \214le is read, lines be)-5.265 F .264 +(ginning with the history comment character follo)-.15 F(wed)-.25 E +(immediately by a digit are interpreted as timestamps for the follo)144 +700.8 Q(wing history entry)-.25 E(.)-.65 E .051(The return v)144 717.6 R +.051(alue is 0 unless an in)-.25 F -.25(va)-.4 G .051 +(lid option is encountered, an error occurs while reading or writ-).25 F +1.586(ing the history \214le, an in)144 729.6 R -.25(va)-.4 G(lid).25 E +F0(of)4.086 E(fset)-.18 E F1 1.586(or range is supplied as an ar)4.086 F +1.586(gument to)-.18 F F24.086 E F1 4.086(,o)C 4.086(rt)-4.086 G +1.586(he history)-4.086 F(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 +E(76)185.955 E 0 Cg EP +%%Page: 77 77 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E -.15(ex)144 84 S(pansion supplied as an ar).15 E +(gument to)-.18 E/F2 10/Times-Bold@0 SF2.5 E F1 -.1(fa)2.5 G(ils.) +.1 E F2(jobs)108 100.8 Q F1([)2.5 E F2(\255lnprs)A F1 2.5(][)C F0 +(jobspec)A F1 -3.332 1.666(... ])2.5 H F2(jobs \255x)108 112.8 Q F0 +(command)2.5 E F1([)2.5 E F0(ar)2.5 E(gs)-.37 E F1 -3.332 1.666(... ]) +2.5 H(The \214rst form lists the acti)144 124.8 Q .3 -.15(ve j)-.25 H +2.5(obs. The).15 F(options ha)2.5 E .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E F2144 136.8 Q F1 +(List process IDs in addition to the normal information.)180 136.8 Q F2 +144 148.8 Q F1 .193(Display information only about jobs that ha) +180 148.8 R .494 -.15(ve c)-.2 H .194(hanged status since the user w).15 +F .194(as last noti-)-.1 F(\214ed of their status.)180 160.8 Q F2 +144 172.8 Q F1(List only the process ID of the job')180 172.8 Q 2.5(sp) +-.55 G(rocess group leader)-2.5 E(.)-.55 E F2144 184.8 Q F1 +(Display only running jobs.)180 184.8 Q F2144 196.8 Q F1 +(Display only stopped jobs.)180 196.8 Q(If)144 213.6 Q F0(jobspec)5.19 E +F1 .95(is supplied,)3.76 F F2(jobs)3.45 E F1 .95 +(restricts output to information about that job)3.45 F 5.95(.T)-.4 G .95 +(he return status is 0)-5.95 F(unless an in)144 225.6 Q -.25(va)-.4 G +(lid option is encountered or an in).25 E -.25(va)-.4 G(lid).25 E F0 +(jobspec)4.24 E F1(is supplied.)2.81 E .394(If the)144 242.4 R F2 +2.894 E F1 .394(option is supplied,)2.894 F F2(jobs)2.894 E F1 .394 +(replaces an)2.894 F(y)-.15 E F0(jobspec)4.634 E F1 .394(found in)3.204 +F F0(command)3.094 E F1(or)3.664 E F0(ar)3.224 E(gs)-.37 E F1 .395 +(with the corre-)3.164 F(sponding process group ID, and e)144 254.4 Q +-.15(xe)-.15 G(cutes).15 E F0(command)2.7 E F1 2.5(,p).77 G(assing it) +-2.5 E F0(ar)2.83 E(gs)-.37 E F1 2.5(,r).27 G(eturning its e)-2.5 E +(xit status.)-.15 E F2(kill)108 271.2 Q F1([)2.5 E F2A F0(sigspec) +2.5 E F1(|)2.5 E F22.5 E F0(signum)2.5 E F1(|)2.5 E F22.5 E F0 +(sigspec)A F1(])A F0(id)2.5 E F1 2.5([.)2.5 G -3.332 1.666(.. ])-.834 H +F2(kill \255l)108 283.2 Q F1(|)A F2A F1([)2.5 E F0(sigspec)A F1(|) +2.5 E F0 -.2(ex)2.5 G(it_status).2 E F1(])A .662 +(Send the signal speci\214ed by)144 295.2 R F0(sigspec)3.501 E F1(or) +3.471 E F0(signum)3.501 E F1 .661(to the processes named by each)3.481 F +F0(id)3.171 E F1 5.661(.E).77 G(ach)-5.661 E F0(id)3.171 E F1(may)3.931 +E .294(be a job speci\214cation)144 307.2 R F0(jobspec)2.794 E F1 .294 +(or a process ID)2.794 F F0(pid)2.794 E F1(.)A F0(sigspec)5.634 E F1 +.295(is either a case-insensiti)3.105 F .595 -.15(ve s)-.25 H .295 +(ignal name).15 F .465(such as)144 319.2 R/F3 9/Times-Bold@0 SF(SIGKILL) +2.965 E F1 .465(\(with or without the)2.715 F F3(SIG)2.965 E F1 .464 +(pre\214x\) or a signal number;)2.715 F F0(signum)3.304 E F1 .464 +(is a signal number)3.284 F(.)-.55 E(If)144 331.2 Q F0(sigspec)2.84 E F1 +(is not supplied, then)2.81 E F2(kill)2.5 E F1(sends)2.5 E F3(SIGTERM) +2.5 E/F4 9/Times-Roman@0 SF(.)A F1(The)144 348 Q F22.873 E F1 .374 +(option lists the signal names.)2.873 F .374(If an)5.374 F 2.874(ya)-.15 +G -.18(rg)-2.874 G .374(uments are supplied when).18 F F22.874 E +F1 .374(is gi)2.874 F -.15(ve)-.25 G(n,).15 E F2(kill)2.874 E F1 .374 +(lists the)2.874 F .12(names of the signals corresponding to the ar)144 +360 R .119(guments, and the return status is 0.)-.18 F(The)5.119 E F0 +-.2(ex)2.619 G(it_status).2 E F1(ar)2.619 E(-)-.2 E .799(gument to)144 +372 R F23.299 E F1 .799 +(is a number specifying either a signal number or the e)3.299 F .8 +(xit status of a process termi-)-.15 F .381 +(nated by a signal; if it is supplied,)144 384 R F2(kill)2.881 E F1 .381 +(prints the name of the signal that caused the process to ter)2.881 F(-) +-.2 E(minate.)144 396 Q F2(kill)6.09 E F1 1.09(assumes that process e) +3.59 F 1.091(xit statuses are greater than 128; an)-.15 F 1.091 +(ything less than that is a)-.15 F(signal number)144 408 Q 5(.T)-.55 G +(he)-5 E F22.5 E F1(option is equi)2.5 E -.25(va)-.25 G(lent to) +.25 E F22.5 E F1(.)A F2(kill)144 424.8 Q F1 .277 +(returns true if at least one signal w)2.777 F .277 +(as successfully sent, or f)-.1 F .277(alse if an error occurs or an in) +-.1 F -.25(va)-.4 G(lid).25 E(option is encountered.)144 436.8 Q F2(let) +108 453.6 Q F0(ar)2.5 E(g)-.37 E F1([)2.5 E F0(ar)A(g)-.37 E F1 1.666 +(...)2.5 G(])-1.666 E(Each)144 465.6 Q F0(ar)3.992 E(g)-.37 E F1 1.162 +(is e)3.882 F -.25(va)-.25 G 1.162(luated as an arithmetic e).25 F 1.162 +(xpression \(see)-.15 F F3 1.162(ARITHMETIC EV)3.662 F(ALU)-1.215 E +-.855(AT)-.54 G(ION).855 E F1(abo)3.412 E -.15(ve)-.15 G 3.663(\). If) +.15 F(the last)144 477.6 Q F0(ar)2.83 E(g)-.37 E F1 -.25(eva)2.72 G +(luates to 0,).25 E F2(let)2.5 E F1(returns 1; otherwise)2.5 E F2(let) +2.5 E F1(returns 0.)2.5 E F2(local)108 494.4 Q F1([)2.5 E F0(option)A F1 +2.5(][)C F0(name)-2.5 E F1([=)A F0(value)A F1 2.5(].)C -3.332 1.666 +(.. | \255 ])-.834 H -.15(Fo)144 506.4 S 2.614(re).15 G .114(ach ar) +-2.614 F .114(gument, create a local v)-.18 F .114(ariable named)-.25 F +F0(name)2.974 E F1 .113(and assign it)2.794 F F0(value)2.903 E F1 5.113 +(.T).18 G(he)-5.113 E F0(option)2.613 E F1 .113(can be an)2.613 F(y)-.15 +E .909(of the options accepted by)144 518.4 R F2(declar)3.409 E(e)-.18 E +F1 5.909(.W)C(hen)-5.909 E F2(local)3.409 E F1 .91 +(is used within a function, it causes the v)3.409 F(ariable)-.25 E F0 +(name)144.36 530.4 Q F1 .441(to ha)3.121 F .741 -.15(ve a v)-.2 H .441 +(isible scope restricted to that function and its children.).15 F .44 +(It is an error to use)5.44 F F2(local)2.94 E F1 +(when not within a function.)144 542.4 Q(If)144 559.2 Q F0(name)3.08 E +F1 .58(is \255, it mak)3.08 F .581 +(es the set of shell options local to the function in which)-.1 F F2 +(local)3.081 E F1 .581(is in)3.081 F -.2(vo)-.4 G -.1(ke).2 G .581 +(d: an).1 F(y)-.15 E .352(shell options changed using the)144 571.2 R F2 +(set)2.851 E F1 -.2(bu)2.851 G .351 +(iltin inside the function after the call to).2 F F2(local)2.851 E F1 +.351(are restored to)2.851 F .324(their original v)144 583.2 R .324 +(alues when the function returns.)-.25 F .324 +(The restore is performed as if a series of)5.324 F F2(set)2.825 E F1 +(com-)2.825 E(mands were e)144 595.2 Q -.15(xe)-.15 G +(cuted to restore the v).15 E +(alues that were in place before the function.)-.25 E -.4(Wi)144 612 S +(th no operands,).4 E F2(local)2.5 E F1(writes a list of local v)2.5 E +(ariables to the standard output.)-.25 E .341 +(The return status is 0 unless)144 628.8 R F2(local)2.841 E F1 .341 +(is used outside a function, an in)2.841 F -.25(va)-.4 G(lid).25 E F0 +(name)3.201 E F1 .341(is supplied, or)3.021 F F0(name)2.841 E F1 +(is a readonly v)144 640.8 Q(ariable.)-.25 E F2(logout [)108 657.6 Q F0 +(n)A F2(])A F1(Exit a login shell, returning a status of)144 669.6 Q F0 +(n)2.5 E F1(to the shell')2.5 E 2.5(sp)-.55 G(arent.)-2.5 E F2 +(map\214le)108 686.4 Q F1([)2.5 E F2A F0(delim)2.5 E F1 2.5(][)C +F2-2.5 E F0(count)2.5 E F1 2.5(][)C F2-2.5 E F0(origin)2.5 E +F1 2.5(][)C F2-2.5 E F0(count)2.5 E F1 2.5(][)C F2-2.5 E F1 +2.5(][)C F2-2.5 E F0(fd)2.5 E F1 2.5(][)C F2-2.5 E F0 +(callbac)2.5 E(k)-.2 E F1 2.5(][)C F2-2.5 E F0(quantum)2.5 E F1 +2.5(][)C F0(arr)-2.5 E(ay)-.15 E F1(])A F2 -.18(re)108 698.4 S(adarray) +.18 E F1([)2.5 E F2A F0(delim)2.5 E F1 2.5(][)C F2-2.5 E F0 +(count)2.5 E F1 2.5(][)C F2-2.5 E F0(origin)2.5 E F1 2.5(][)C F2 +-2.5 E F0(count)2.5 E F1 2.5(][)C F2-2.5 E F1 2.5(][)C F2 +-2.5 E F0(fd)2.5 E F1 2.5(][)C F2-2.5 E F0(callbac)2.5 E(k) +-.2 E F1 2.5(][)C F2-2.5 E F0(quantum)2.5 E F1 2.5(][)C F0(arr) +-2.5 E(ay)-.15 E F1(])A .328 +(Read lines from the standard input, or from \214le descriptor)144 710.4 +R F0(fd)4.798 E F1 .328(if the)3.598 F F22.829 E F1 .329 +(option is supplied, into the)2.829 F(inde)144 722.4 Q -.15(xe)-.15 G +3.49(da).15 G .99(rray v)-3.49 F(ariable)-.25 E F0(arr)3.82 E(ay)-.15 E +F1 5.99(.T).32 G .989(he v)-5.99 F(ariable)-.25 E F3(MAPFILE)3.489 E F1 +.989(is the def)3.239 F(ault)-.1 E F0(arr)3.489 E(ay)-.15 E F1 5.989(.O) +C .989(ptions, if supplied,)-5.989 F(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(77)185.955 E 0 Cg EP +%%Page: 78 78 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(ha)144 84 Q .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E/F2 10/Times-Bold@0 SF144 96 Q F1 .281 +(Use the \214rst character of)180 96 R F0(delim)2.781 E F1 .281 +(to terminate each input line, rather than ne)2.781 F 2.782(wline. If) +-.25 F F0(delim)2.782 E F1(is the empty string,)180 108 Q F2(map\214le) +2.5 E F1(will terminate a line when it reads a NUL character)2.5 E(.) +-.55 E F2144 120 Q F1(Cop)180 120 Q 2.5(ya)-.1 G 2.5(tm)-2.5 G +(ost)-2.5 E F0(count)2.7 E F1 2.5(lines. If)3.18 F F0(count)2.5 E F1 +(is 0, cop)2.5 E 2.5(ya)-.1 G(ll lines.)-2.5 E F2144 132 Q F1(Be) +180 132 Q(gin assigning to)-.15 E F0(arr)2.83 E(ay)-.15 E F1(at inde) +2.82 E(x)-.15 E F0(origin)2.73 E F1 5(.T).24 G(he def)-5 E(ault inde)-.1 +E 2.5(xi)-.15 G 2.5(s0)-2.5 G(.)-2.5 E F2144 144 Q F1 +(Discard the \214rst)180 144 Q F0(count)2.5 E F1(lines read.)2.5 E F2 +144 156 Q F1(Remo)180 156 Q .3 -.15(ve a t)-.15 H(railing).15 E F0 +(delim)2.5 E F1(\(def)2.5 E(ault ne)-.1 E(wline\) from each line read.) +-.25 E F2144 168 Q F1(Read lines from \214le descriptor)180 168 Q +F0(fd)2.5 E F1(instead of the standard input.)2.5 E F2144 180 Q F1 +(Ev)180 180 Q(aluate)-.25 E F0(callbac)2.7 E(k)-.2 E F1(each time)3.17 E +F0(quantum)2.5 E F1(lines are read.)2.5 E(The)5 E F22.5 E F1 +(option speci\214es)2.5 E F0(quantum)2.75 E F1(.).32 E F2144 192 Q +F1(Specify the number of lines read between each call to)180 192 Q F0 +(callbac)2.7 E(k)-.2 E F1(.).67 E(If)144 208.8 Q F22.968 E F1 .467 +(is speci\214ed without)2.967 F F22.967 E F1 2.967(,t)C .467 +(he def)-2.967 F .467(ault quantum is 5000.)-.1 F(When)5.467 E F0 +(callbac)2.967 E(k)-.2 E F1 .467(is e)2.967 F -.25(va)-.25 G .467 +(luated, it is sup-).25 F .261(plied the inde)144 220.8 R 2.761(xo)-.15 +G 2.761(ft)-2.761 G .261(he ne)-2.761 F .262(xt array element to be ass\ +igned and the line to be assigned to that element)-.15 F .275 +(as additional ar)144 232.8 R(guments.)-.18 E F0(callbac)5.275 E(k)-.2 E +F1 .275(is e)2.775 F -.25(va)-.25 G .274 +(luated after the line is read b).25 F .274 +(ut before the array element is)-.2 F(assigned.)144 244.8 Q +(If not supplied with an e)144 261.6 Q(xplicit origin,)-.15 E F2 +(map\214le)2.5 E F1(will clear)2.5 E F0(arr)2.5 E(ay)-.15 E F1 +(before assigning to it.)2.5 E F2(map\214le)144 278.4 Q F1 1.065 +(returns zero unless an in)3.565 F -.25(va)-.4 G 1.065 +(lid option or option ar).25 F 1.065(gument is supplied,)-.18 F F0(arr) +3.566 E(ay)-.15 E F1 1.066(is in)3.566 F -.25(va)-.4 G 1.066(lid or).25 +F(unassignable, or if)144 290.4 Q F0(arr)2.5 E(ay)-.15 E F1 +(is not an inde)2.5 E -.15(xe)-.15 G 2.5(da).15 G(rray)-2.5 E(.)-.65 E +F2(popd)108 307.2 Q F1<5bad>2.5 E F2(n)A F1 2.5(][)C(+)-2.5 E F0(n)A F1 +2.5(][)C-2.5 E F0(n)A F1(])A(Remo)144 319.2 Q 1.151 -.15(ve e)-.15 H +.851(ntries from the directory stack.).15 F .85 +(The elements are numbered from 0 starting at the \214rst)5.851 F .848 +(directory listed by)144 331.2 R F2(dirs)3.348 E F1 3.348(,s)C(o)-3.348 +E F2(popd)3.348 E F1 .848(is equi)3.348 F -.25(va)-.25 G .848 +(lent to \231popd +0.).25 F 5.848<9a57>-.7 G .848(ith no ar)-6.248 F +(guments,)-.18 E F2(popd)3.348 E F1(remo)3.348 E -.15(ve)-.15 G(s).15 E +1.143(the top directory from the stack, and changes to the ne)144 343.2 +R 3.642(wt)-.25 G 1.142(op directory)-3.642 F 6.142(.A)-.65 G -.18(rg) +-6.142 G 1.142(uments, if supplied,).18 F(ha)144 355.2 Q .3 -.15(ve t) +-.2 H(he follo).15 E(wing meanings:)-.25 E F2144 367.2 Q F1 .504 +(Suppress the normal change of directory when remo)180 367.2 R .504 +(ving directories from the stack, only)-.15 F(manipulate the stack.)180 +379.2 Q F2(+)144 391.2 Q F0(n)A F1(Remo)180 391.2 Q .684 -.15(ve t)-.15 +H(he).15 E F0(n)2.884 E F1 .383 +(th entry counting from the left of the list sho)B .383(wn by)-.25 F F2 +(dirs)2.883 E F1 2.883(,s)C .383(tarting with zero,)-2.883 F .776 +(from the stack.)180 403.2 R -.15(Fo)5.776 G 3.276(re).15 G .776 +(xample: \231popd +0\232 remo)-3.426 F -.15(ve)-.15 G 3.276(st).15 G +.777(he \214rst directory)-3.276 F 3.277<2c99>-.65 G .777 +(popd +1\232 the sec-)-3.277 F(ond.)180 415.2 Q F2144 427.2 Q F0(n)A +F1(Remo)180 427.2 Q .336 -.15(ve t)-.15 H(he).15 E F0(n)2.536 E F1 .036 +(th entry counting from the right of the list sho)B .035(wn by)-.25 F F2 +(dirs)2.535 E F1 2.535(,s)C .035(tarting with zero.)-2.535 F -.15(Fo)180 +439.2 S 2.5(re).15 G(xample: \231popd \2550\232 remo)-2.65 E -.15(ve) +-.15 G 2.5(st).15 G(he last directory)-2.5 E 2.5<2c99>-.65 G +(popd \2551\232 the ne)-2.5 E(xt to last.)-.15 E 1.057 +(If the top element of the directory stack is modi\214ed, and the)144 +456 R F03.558 E F1 1.058(option w)3.558 F 1.058(as not supplied,) +-.1 F F2(popd)3.558 E F1 .25(uses the)144 468 R F2(cd)2.749 E F1 -.2(bu) +2.749 G .249(iltin to change to the directory at the top of the stack.) +.2 F .249(If the)5.249 F F2(cd)2.749 E F1 -.1(fa)2.749 G(ils,).1 E F2 +(popd)2.749 E F1 .249(returns a)2.749 F(non-zero v)144 480 Q(alue.)-.25 +E(Otherwise,)144 496.8 Q F2(popd)3.571 E F1 1.072(returns f)3.571 F +1.072(alse if an in)-.1 F -.25(va)-.4 G 1.072 +(lid option is supplied, the directory stack is empty).25 F 3.572(,o) +-.65 G(r)-3.572 E F0(n)3.572 E F1(speci\214es a non-e)144 508.8 Q +(xistent directory stack entry)-.15 E(.)-.65 E 1.451(If the)144 525.6 R +F2(popd)3.951 E F1 1.451(command is successful,)3.951 F F2(bash)3.951 E +F1(runs)3.951 E F2(dirs)3.951 E F1 1.451(to sho)3.951 F 3.95(wt)-.25 G +1.45(he \214nal contents of the directory)-3.95 F +(stack, and the return status is 0.)144 537.6 Q F2(printf)108 554.4 Q F1 +([)2.5 E F2A F0(var)2.5 E F1(])A F0(format)2.5 E F1([)2.5 E F0(ar) +A(guments)-.37 E F1(])A .357(Write the formatted)144 566.4 R F0(ar)2.857 +E(guments)-.37 E F1 .357 +(to the standard output under the control of the)2.857 F F0(format)2.858 +E F1 5.358(.T)C(he)-5.358 E F22.858 E F1(op-)2.858 E +(tion assigns the output to the v)144 578.4 Q(ariable)-.25 E F0(var)2.5 +E F1(rather than printing it to the standard output.)2.5 E(The)144 595.2 +Q F0(format)3.018 E F1 .517(is a character string which contains three \ +types of objects: plain characters, which are)3.018 F .704(simply copie\ +d to standard output, character escape sequences, which are con)144 +607.2 R -.15(ve)-.4 G .704(rted and copied to).15 F .036(the standard o\ +utput, and format speci\214cations, each of which causes printing of th\ +e ne)144 619.2 R .036(xt successi)-.15 F -.15(ve)-.25 G F0(ar)144 631.2 +Q(gument)-.37 E F1 7.824(.I)C 5.324(na)-7.824 G 2.824 +(ddition to the standard)-5.324 F F0(printf)6.575 E F1 2.825 +(\(3\) format characters)1.96 F F2(cCsSndiouxXeEfFgGaA)5.325 E F1(,)A F2 +(printf)144 643.2 Q F1(interprets the follo)2.5 E +(wing additional format speci\214ers:)-.25 E F2(%b)144 655.2 Q F1 +(causes)180 655.2 Q F2(printf)2.596 E F1 .096(to e)2.596 F .096 +(xpand backslash escape sequences in the corresponding)-.15 F F0(ar) +2.596 E(gument)-.37 E F1 .095(in the)2.595 F(same w)180 667.2 Q(ay as) +-.1 E F2(echo \255e)2.5 E F1(.)A F2(%q)144 679.2 Q F1(causes)180 679.2 Q +F2(printf)2.51 E F1 .01(to output the corresponding)2.51 F F0(ar)2.51 E +(gument)-.37 E F1 .01(in a format that can be reused as shell)2.51 F +(input.)180 691.2 Q F2(%q)5.544 E F1(and)3.044 E F2(%Q)3.044 E F1 .544 +(use the)3.044 F F2<240808>3.044 E F1 .544(quoting style if an)3.044 F +3.044(yc)-.15 G .543(haracters in the ar)-3.044 F .543 +(gument string re-)-.18 F 1.285 +(quire it, and backslash quoting otherwise.)180 703.2 R 1.286 +(If the format string uses the)6.285 F F0(printf)3.786 E F1(alternate) +3.786 E(form, these tw)180 715.2 Q 2.5(of)-.1 G(ormats quote the ar)-2.5 +E(gument string using single quotes.)-.18 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(78)185.955 E 0 Cg EP +%%Page: 79 79 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(%Q)144 84 Q F1(lik)180 84 Q +(e)-.1 E F2(%q)2.5 E F1 2.5(,b)C(ut applies an)-2.7 E 2.5(ys)-.15 G +(upplied precision to the)-2.5 E F0(ar)2.5 E(gument)-.37 E F1 +(before quoting it.)2.5 E F2(%\()144 96 Q F0(datefmt)A F2(\)T)A F1 +(causes)180 108 Q F2(printf)4.404 E F1 1.904 +(to output the date-time string resulting from using)4.404 F F0(datefmt) +4.404 E F1 1.903(as a format)4.404 F .333(string for)180 120 R F0 +(strftime)3.173 E F1 2.833(\(3\). The).18 F(corresponding)2.833 E F0(ar) +2.834 E(gument)-.37 E F1 .334(is an inte)2.834 F .334 +(ger representing the number)-.15 F .977(of seconds since the epoch.)180 +132 R .977(This format speci\214er recognizes tw)5.977 F 3.476(os)-.1 G +.976(pecial ar)-3.476 F .976(gument v)-.18 F(al-)-.25 E .602(ues: \2551\ + represents the current time, and \2552 represents the time the shell w) +180 144 R .602(as in)-.1 F -.2(vo)-.4 G -.1(ke).2 G 3.102(d. If).1 F +.747(no ar)180 156 R .747(gument is speci\214ed, con)-.18 F -.15(ve)-.4 +G .747(rsion beha).15 F -.15(ve)-.2 G 3.247(sa).15 G 3.247(si)-3.247 G +3.247<66ad>-3.247 G 3.247(1h)-3.247 G .747(ad been supplied.)-3.247 F +.746(This is an e)5.746 F(x-)-.15 E(ception to the usual)180 168 Q F2 +(printf)2.5 E F1(beha)2.5 E(vior)-.2 E(.)-.55 E .946(The %b, %q, and %T\ + format speci\214ers all use the \214eld width and precision ar)144 +184.8 R .946(guments from the)-.18 F .339 +(format speci\214cation and write that man)144 196.8 R 2.838(yb)-.15 G +.338(ytes from \(or use that wide a \214eld for\) the e)-2.838 F .338 +(xpanded ar)-.15 F(-)-.2 E +(gument, which usually contains more characters than the original.)144 +208.8 Q(The %n format speci\214er accepts a corresponding ar)144 225.6 Q +(gument that is treated as a shell v)-.18 E(ariable name.)-.25 E .393 +(The %s and %c format speci\214ers accept an l \(long\) modi\214er)144 +242.4 R 2.894(,w)-.4 G .394(hich forces them to con)-2.894 F -.15(ve)-.4 +G .394(rt the ar).15 F(-)-.2 E .321 +(gument string to a wide-character string and apply an)144 254.4 R 2.821 +(ys)-.15 G .32(upplied \214eld width and precision in terms)-2.821 F +.308(of characters, not bytes.)144 266.4 R .308 +(The %S and %C format speci\214ers are equi)5.308 F -.25(va)-.25 G .308 +(lent to %ls and %lc, respec-).25 F(ti)144 278.4 Q -.15(ve)-.25 G(ly).15 +E(.)-.65 E(Ar)144 295.2 Q .464(guments to non-string format speci\214er\ +s are treated as C constants, e)-.18 F .463 +(xcept that a leading plus or)-.15 F .359(minus sign is allo)144 307.2 R +.359 +(wed, and if the leading character is a single or double quote, the v) +-.25 F .36(alue is the nu-)-.25 F(meric v)144 319.2 Q(alue of the follo) +-.25 E(wing character)-.25 E 2.5(,u)-.4 G(sing the current locale.)-2.5 +E(The)144 336 Q F0(format)2.515 E F1 .015 +(is reused as necessary to consume all of the)2.515 F F0(ar)2.515 E +(guments)-.37 E F1 5.015(.I)C 2.514(ft)-5.015 G(he)-2.514 E F0(format) +2.514 E F1 .014(requires more)2.514 F F0(ar)2.514 E(-)-.2 E(guments)144 +348 Q F1 .565(than are supplied, the e)3.065 F .566 +(xtra format speci\214cations beha)-.15 F .866 -.15(ve a)-.2 H 3.066(si) +.15 G 3.066(faz)-3.066 G .566(ero v)-3.066 F .566(alue or null string,) +-.25 F .542(as appropriate, had been supplied.)144 360 R .541 +(The return v)5.541 F .541(alue is zero on success, non-zero if an in) +-.25 F -.25(va)-.4 G .541(lid op-).25 F +(tion is supplied or a write or assignment error occurs.)144 372 Q F2 +(pushd)108 388.8 Q F1([)2.5 E F2A F1 2.5(][)C(+)-2.5 E F0(n)A F1 +2.5(][)C-2.5 E F0(n)A F1(])A F2(pushd)108 400.8 Q F1([)2.5 E F2 +A F1 2.5(][)C F0(dir)-2.5 E F1(])A 1.049(Add a directory to the t\ +op of the directory stack, or rotate the stack, making the ne)144 412.8 +R 3.549(wt)-.25 G 1.049(op of the)-3.549 F .089(stack the current w)144 +424.8 R .089(orking directory)-.1 F 5.089(.W)-.65 G .089(ith no ar) +-5.489 F(guments,)-.18 E F2(pushd)2.589 E F1 -.15(ex)2.588 G .088 +(changes the top tw).15 F 2.588(oe)-.1 G .088(lements of)-2.588 F +(the directory stack.)144 436.8 Q(Ar)5 E(guments, if supplied, ha)-.18 E +.3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F2144 +448.8 Q F1 .347(Suppress the normal change of directory when rotating o\ +r adding directories to the stack,)180 448.8 R +(only manipulate the stack.)180 460.8 Q F2(+)144 472.8 Q F0(n)A F1 .147 +(Rotate the stack so that the)180 472.8 R F0(n)2.647 E F1 .147 +(th directory \(counting from the left of the list sho)B .147(wn by)-.25 +F F2(dirs)2.647 E F1(,)A(starting with zero\) is at the top.)180 484.8 Q +F2144 496.8 Q F0(n)A F1 .92(Rotates the stack so that the)180 496.8 +R F0(n)3.42 E F1 .92 +(th directory \(counting from the right of the list sho)B .92(wn by)-.25 +F F2(dirs)180 508.8 Q F1 2.5(,s)C(tarting with zero\) is at the top.) +-2.5 E F0(dir)144.35 520.8 Q F1(Adds)180 520.8 Q F0(dir)2.85 E F1 +(to the directory stack at the top.)3.23 E .435 +(After the stack has been modi\214ed, if the)144 537.6 R F22.935 E +F1 .434(option w)2.934 F .434(as not supplied,)-.1 F F2(pushd)2.934 E F1 +.434(uses the)2.934 F F2(cd)2.934 E F1 -.2(bu)2.934 G .434(iltin to).2 F +(change to the directory at the top of the stack.)144 549.6 Q(If the)5 E +F2(cd)2.5 E F1 -.1(fa)2.5 G(ils,).1 E F2(pushd)2.5 E F1 +(returns a non-zero v)2.5 E(alue.)-.25 E .907(Otherwise, if no ar)144 +566.4 R .908(guments are supplied,)-.18 F F2(pushd)3.408 E F1 .908 +(returns zero unless the directory stack is empty)3.408 F(.)-.65 E 1.478 +(When rotating the directory stack,)144 578.4 R F2(pushd)3.978 E F1 +1.477(returns zero unless the directory stack is empty or)3.977 F F0(n) +3.977 E F1(speci\214es a non-e)144 590.4 Q +(xistent directory stack element.)-.15 E 1.172(If the)144 607.2 R F2 +(pushd)3.672 E F1 1.172(command is successful,)3.672 F F2(bash)3.672 E +F1(runs)3.672 E F2(dirs)3.672 E F1 1.173(to sho)3.673 F 3.673(wt)-.25 G +1.173(he \214nal contents of the directory)-3.673 F(stack.)144 619.2 Q +F2(pwd)108 636 Q F1([)2.5 E F2(\255LP)A F1(])A .845 +(Print the absolute pathname of the current w)144 648 R .845 +(orking directory)-.1 F 5.844(.T)-.65 G .844 +(he pathname printed contains no)-5.844 F .181(symbolic links if the)144 +660 R F22.681 E F1 .181(option is supplied or the)2.681 F F2 .181 +(\255o ph)2.681 F(ysical)-.15 E F1 .181(option to the)2.681 F F2(set) +2.681 E F1 -.2(bu)2.681 G .182(iltin command is).2 F 3.264(enabled. If) +144 672 R(the)3.264 E F23.264 E F1 .763 +(option is used, the pathname printed may contain symbolic links.)3.264 +F .763(The return)5.763 F .405(status is 0 unless an error occurs while\ + reading the name of the current directory or an in)144 684 R -.25(va) +-.4 G .405(lid op-).25 F(tion is supplied.)144 696 Q(GNU Bash 5.3)72 768 +Q(2024 December 12)136.795 E(79)185.955 E 0 Cg EP +%%Page: 80 80 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF -.18(re)108 84 S(ad).18 E F1 +([)2.5 E F2(\255Eers)A F1 2.5(][)C F2-2.5 E F0(aname)2.5 E F1 2.5 +(][)C F2-2.5 E F0(delim)2.5 E F1 2.5(][)C F2-2.5 E F0(te)2.5 +E(xt)-.2 E F1 2.5(][)C F2-2.5 E F0(nc)2.5 E(har)-.15 E(s)-.1 E F1 +2.5(][)C F2-2.5 E F0(nc)2.5 E(har)-.15 E(s)-.1 E F1 2.5(][)C F2 +-2.5 E F0(pr)2.5 E(ompt)-.45 E F1 2.5(][)C F2-2.5 E F0 +(timeout)2.5 E F1 2.5(][)C F2-2.5 E F0(fd)2.5 E F1(])A([)108 96 Q +F0(name)A F1 1.666(...)2.5 G(])-1.666 E .146 +(Read one line from the standard input, or from the \214le descriptor) +144 108 R F0(fd)2.645 E F1 .145(supplied as an ar)2.645 F .145 +(gument to the)-.18 F F2144 120 Q F1 .618(option, split it into w) +3.118 F .618(ords as described abo)-.1 F .918 -.15(ve u)-.15 H(nder).15 +E F2 -.75(Wo)3.118 G .618(rd Splitting).75 F F1 3.118(,a)C .618 +(nd assign the \214rst w)-3.118 F(ord)-.1 E .844(to the \214rst)144 132 +R F0(name)3.704 E F1 3.344(,t).18 G .844(he second w)-3.344 F .844 +(ord to the second)-.1 F F0(name)3.704 E F1 3.344(,a).18 G .844 +(nd so on.)-3.344 F .843(If there are more w)5.843 F .843(ords than)-.1 +F .052(names, the remaining w)144 144 R .052(ords and their interv)-.1 F +.052(ening delimiters are assigned to the last)-.15 F F0(name)2.912 E F1 +5.052(.I).18 G 2.552(ft)-5.052 G(here)-2.552 E .541(are fe)144 156 R +.541(wer w)-.25 F .541(ords read from the input stream than names, the \ +remaining names are assigned empty)-.1 F -.25(va)144 168 S 3.2 +(lues. The).25 F .7(characters in the v)3.2 F .7(alue of the)-.25 F/F3 9 +/Times-Bold@0 SF(IFS)3.2 E F1 -.25(va)2.95 G .701 +(riable are used to split the line into w).25 F .701(ords using)-.1 F +.956(the same rules the shell uses for e)144 180 R .956 +(xpansion \(described abo)-.15 F 1.256 -.15(ve u)-.15 H(nder).15 E F2 +-.75(Wo)3.455 G .955(rd Splitting).75 F F1 3.455(\). The)B(back-)3.455 E +1.183(slash character \()144 192 R F2(\\)A F1 3.683(\)r)C(emo)-3.683 E +-.15(ve)-.15 G 3.683(sa).15 G 1.484 -.15(ny s)-3.683 H 1.184 +(pecial meaning for the ne).15 F 1.184 +(xt character read and is used for line)-.15 F(continuation.)144 204 Q +(Options, if supplied, ha)144 220.8 Q .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E F2144 232.8 Q F0(aname)2.5 E F1 1.026 +(The w)180 244.8 R 1.026 +(ords are assigned to sequential indices of the array v)-.1 F(ariable) +-.25 E F0(aname)3.855 E F1 3.525(,s).18 G 1.025(tarting at 0.)-3.525 F +F0(aname)180.33 256.8 Q F1(is unset before an)2.68 E 2.5(yn)-.15 G .5 +-.25(ew va)-2.5 H(lues are assigned.).25 E(Other)5 E F0(name)2.5 E F1 +(ar)2.5 E(guments are ignored.)-.18 E F2144 268.8 Q F0(delim)2.5 E +F1 .502(The \214rst character of)180 280.8 R F0(delim)3.002 E F1 .503 +(terminates the input line, rather than ne)3.002 F 3.003(wline. If)-.25 +F F0(delim)3.003 E F1 .503(is the)3.003 F(empty string,)180 292.8 Q F2 +-.18(re)2.5 G(ad).18 E F1 +(will terminate a line when it reads a NUL character)2.5 E(.)-.55 E F2 +144 304.8 Q F1 1.762 +(If the standard input is coming from a terminal,)180 304.8 R F2 -.18 +(re)4.261 G(ad).18 E F1(uses)4.261 E F2 -.18(re)4.261 G(adline).18 E F1 +(\(see)4.261 E F3(READLINE)4.261 E F1(abo)180 316.8 Q -.15(ve)-.15 G +3.573(\)t).15 G 3.573(oo)-3.573 G 1.073(btain the line.)-3.573 F F2 +(Readline)6.073 E F1 1.073(uses the current \(or def)3.573 F 1.074 +(ault, if line editing w)-.1 F 1.074(as not)-.1 F(pre)180 328.8 Q +(viously acti)-.25 E -.15(ve)-.25 G 2.5(\)e).15 G(diting settings, b) +-2.5 E(ut uses)-.2 E F2 -.18(re)2.5 G(adline).18 E F1 1.1 -.55('s d)D +(ef).55 E(ault \214lename completion.)-.1 E F2144 340.8 Q F1 1.762 +(If the standard input is coming from a terminal,)180 340.8 R F2 -.18 +(re)4.261 G(ad).18 E F1(uses)4.261 E F2 -.18(re)4.261 G(adline).18 E F1 +(\(see)4.261 E F3(READLINE)4.261 E F1(abo)180 352.8 Q -.15(ve)-.15 G +3.573(\)t).15 G 3.573(oo)-3.573 G 1.073(btain the line.)-3.573 F F2 +(Readline)6.073 E F1 1.073(uses the current \(or def)3.573 F 1.074 +(ault, if line editing w)-.1 F 1.074(as not)-.1 F(pre)180 364.8 Q .042 +(viously acti)-.25 F -.15(ve)-.25 G 2.542(\)e).15 G .042 +(diting settings, b)-2.542 F .042(ut uses bash')-.2 F 2.542(sd)-.55 G +(ef)-2.542 E .042(ault completion, including program-)-.1 F +(mable completion.)180 376.8 Q F2144 388.8 Q F0(te)2.5 E(xt)-.2 E +F1(If)180 388.8 Q F2 -.18(re)3.313 G(adline).18 E F1 .814 +(is being used to read the line,)3.313 F F2 -.18(re)3.314 G(ad).18 E F1 +(places)3.314 E F0(te)3.314 E(xt)-.2 E F1 .814(into the editing b)3.314 +F(uf)-.2 E .814(fer before)-.25 F(editing be)180 400.8 Q(gins.)-.15 E F2 +144 412.8 Q F0(nc)2.5 E(har)-.15 E(s)-.1 E F2 -.18(re)180 424.8 S +(ad).18 E F1 .323(returns after reading)2.823 F F0(nc)2.823 E(har)-.15 E +(s)-.1 E F1 .323(characters rather than w)2.823 F .323 +(aiting for a complete line of in-)-.1 F .736 +(put, unless it encounters EOF or)180 436.8 R F2 -.18(re)3.236 G(ad).18 +E F1 .736(times out, b)3.236 F .737 +(ut honors a delimiter if it reads fe)-.2 F(wer)-.25 E(than)180 448.8 Q +F0(nc)2.5 E(har)-.15 E(s)-.1 E F1(characters before the delimiter)2.5 E +(.)-.55 E F2144 460.8 Q F0(nc)2.5 E(har)-.15 E(s)-.1 E F2 -.18(re) +180 472.8 S(ad).18 E F1 1.269(returns after reading e)3.77 F(xactly)-.15 +E F0(nc)3.769 E(har)-.15 E(s)-.1 E F1 1.269(characters rather than w) +3.769 F 1.269(aiting for a complete)-.1 F .172 +(line of input, unless it encounters EOF or)180 484.8 R F2 -.18(re)2.673 +G(ad).18 E F1 .173(times out.)2.673 F(An)5.173 E 2.673(yd)-.15 G .173 +(elimiter characters in the)-2.673 F 1.246 +(input are not treated specially and do not cause)180 496.8 R F2 -.18 +(re)3.746 G(ad).18 E F1 1.245(to return until it has read)3.746 F F0(nc) +3.745 E(har)-.15 E(s)-.1 E F1 2.566(characters. The)180 508.8 R .066 +(result is not split on the characters in)2.566 F F2(IFS)2.567 E F1 +2.567(;t)C .067(he intent is that the v)-2.567 F .067(ariable is)-.25 F +.895(assigned e)180 520.8 R .895 +(xactly the characters read \(with the e)-.15 F .894 +(xception of backslash; see the)-.15 F F23.394 E F1(option)3.394 E +(belo)180 532.8 Q(w\).)-.25 E F2144 544.8 Q F0(pr)2.5 E(ompt)-.45 +E F1(Display)180 556.8 Q F0(pr)3.66 E(ompt)-.45 E F1 1.161 +(on standard error)3.66 F 3.661(,w)-.4 G 1.161(ithout a trailing ne) +-3.661 F 1.161(wline, before attempting to read)-.25 F(an)180 568.8 Q +2.5(yi)-.15 G(nput, b)-2.5 E +(ut only if input is coming from a terminal.)-.2 E F2144 580.8 Q +F1 .544(Backslash does not act as an escape character)180 580.8 R 5.543 +(.T)-.55 G .543(he backslash is considered to be part of)-5.543 F .492 +(the line.)180 592.8 R .492(In particular)5.492 F 2.992(,ab)-.4 G +(ackslash-ne)-2.992 E .493 +(wline pair may not then be used as a line continua-)-.25 F(tion.)180 +604.8 Q F2144 616.8 Q F1(Silent mode.)180 616.8 Q +(If input is coming from a terminal, characters are not echoed.)5 E F2 +144 628.8 Q F0(timeout)2.5 E F1(Cause)180 640.8 Q F2 -.18(re)2.767 +G(ad).18 E F1 .267(to time out and return f)2.767 F .266 +(ailure if it does not read a complete line of input \(or a)-.1 F .468 +(speci\214ed number of characters\) within)180 652.8 R F0(timeout)2.968 +E F1(seconds.)2.968 E F0(timeout)5.468 E F1 .469(may be a decimal num-) +2.968 F .464(ber with a fractional portion follo)180 664.8 R .464 +(wing the decimal point.)-.25 F .463(This option is only ef)5.463 F +(fecti)-.25 E .763 -.15(ve i)-.25 H(f).15 E F2 -.18(re)180 676.8 S(ad) +.18 E F1 1.176(is reading input from a terminal, pipe, or other special\ + \214le; it has no ef)3.676 F 1.177(fect when)-.25 F .108 +(reading from re)180 688.8 R .108(gular \214les.)-.15 F(If)5.108 E F2 +-.18(re)2.608 G(ad).18 E F1 .108(times out, it sa)2.608 F -.15(ve)-.2 G +2.607(sa).15 G .407 -.15(ny p)-2.607 H .107 +(artial input read into the speci-).15 F .942(\214ed v)180 700.8 R +(ariable)-.25 E F0(name)3.442 E F1 3.442(,a)C .942(nd the e)-3.442 F +.942(xit status is greater than 128.)-.15 F(If)5.943 E F0(timeout)3.443 +E F1 .943(is 0,)3.443 F F2 -.18(re)3.443 G(ad).18 E F1(returns)3.443 E +(immediately)180 712.8 Q 3.26(,w)-.65 G .76(ithout trying to read an) +-3.26 F 3.26(yd)-.15 G 3.26(ata. In)-3.26 F .759(this case, the e)3.259 +F .759(xit status is 0 if input is)-.15 F -.2(av)180 724.8 S +(ailable on the speci\214ed \214le descriptor)-.05 E 2.5(,o)-.4 G 2.5 +(rt)-2.5 G(he read will return EOF)-2.5 E 2.5(,n)-.8 G +(on-zero otherwise.)-2.5 E(GNU Bash 5.3)72 768 Q(2024 December 12) +136.795 E(80)185.955 E 0 Cg EP +%%Page: 81 81 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF144 84 Q F0(fd)2.5 E F1 +(Read input from \214le descriptor)180 84 Q F0(fd)2.5 E F1 +(instead of the standard input.)2.5 E(Other than the case where)144 +100.8 Q F0(delim)2.5 E F1(is the empty string,)2.5 E F2 -.18(re)2.5 G +(ad).18 E F1(ignores an)2.5 E 2.5(yN)-.15 G(UL characters in the input.) +-2.5 E .96(If no)144 117.6 R F0(names)3.82 E F1 .96(are supplied,)3.73 F +F2 -.18(re)3.46 G(ad).18 E F1 .961 +(assigns the line read, without the ending delimiter b)3.461 F .961 +(ut otherwise)-.2 F(unmodi\214ed, to the v)144 129.6 Q(ariable)-.25 E/F3 +9/Times-Bold@0 SF(REPL)2.5 E(Y)-.828 E/F4 9/Times-Roman@0 SF(.)A F1 .033 +(The e)144 146.4 R .033 +(xit status is zero, unless end-of-\214le is encountered,)-.15 F F2 -.18 +(re)2.532 G(ad).18 E F1 .032(times out \(in which case the status is) +2.532 F .31(greater than 128\), a v)144 158.4 R .311 +(ariable assignment error \(such as assigning to a readonly v)-.25 F +.311(ariable\) occurs, or)-.25 F(an in)144 170.4 Q -.25(va)-.4 G +(lid \214le descriptor is supplied as the ar).25 E(gument to)-.18 E F2 +2.5 E F1(.)A F2 -.18(re)108 187.2 S(adonly).18 E F1([)2.5 E F2 +(\255aAf)A F1 2.5(][)C F2-2.5 E F1 2.5(][)C F0(name)-2.5 E F1([=)A +F0(wor)A(d)-.37 E F1 2.5(].)C 1.666(..)-.834 G(])-1.666 E .77(The gi)144 +199.2 R -.15(ve)-.25 G(n).15 E F0(names)3.27 E F1 .77(are mark)3.27 F +.77(ed readonly; the v)-.1 F .77(alues of these)-.25 F F0(names)3.63 E +F1 .77(may not be changed by subse-)3.54 F .445 +(quent assignment or unset.)144 211.2 R .446(If the)5.446 F F2 +2.946 E F1 .446(option is supplied, each)2.946 F F0(name)2.946 E F1 .446 +(refers to a shell function.)2.946 F(The)5.446 E F2144 223.2 Q F1 +.383(option restricts the v)2.883 F .383(ariables to inde)-.25 F -.15 +(xe)-.15 G 2.883(da).15 G .383(rrays; the)-2.883 F F22.883 E F1 +.382(option restricts the v)2.883 F .382(ariables to associa-)-.25 F(ti) +144 235.2 Q 1.558 -.15(ve a)-.25 H 3.758(rrays. If).15 F 1.258 +(both options are supplied,)3.758 F F23.758 E F1(tak)3.758 E 1.258 +(es precedence.)-.1 F 1.258(If no)6.258 F F0(name)4.118 E F1(ar)3.938 E +1.258(guments are sup-)-.18 F .412(plied, or if the)144 247.2 R F2 +2.912 E F1 .412(option is supplied, print a list of all readonly names.) +2.912 F .411(The other options may be)5.411 F .327 +(used to restrict the output to a subset of the set of readonly names.) +144 259.2 R(The)5.327 E F22.827 E F1 .327(option displays output) +2.827 F(in a format that may be reused as input.)144 271.2 Q F2 -.18(re) +144 288 S(adonly).18 E F1(allo)2.653 E .153(ws the v)-.25 F .153 +(alue of a v)-.25 F .153 +(ariable to be set at the same time the readonly attrib)-.25 F .152 +(ute is changed)-.2 F .687(by follo)144 300 R .687(wing the v)-.25 F +.687(ariable name with =)-.25 F F0(value)A F1 5.688(.T)C .688 +(his sets the v)-5.688 F .688(alue of the v)-.25 F .688(ariable is to) +-.25 F F0(value)3.188 E F1(while)3.188 E(modifying the readonly attrib) +144 312 Q(ute.)-.2 E .303(The return status is 0 unless an in)144 328.8 +R -.25(va)-.4 G .303(lid option is encountered, one of the).25 F F0 +(names)3.162 E F1 .302(is not a v)3.072 F .302(alid shell)-.25 F -.25 +(va)144 340.8 S(riable name, or).25 E F22.5 E F1 +(is supplied with a)2.5 E F0(name)2.86 E F1(that is not a function.)2.68 +E F2 -.18(re)108 357.6 S(tur).18 E(n)-.15 E F1([)2.5 E F0(n)A F1(])A +.182(Stop e)144 369.6 R -.15(xe)-.15 G .182 +(cuting a shell function or sourced \214le and return the v).15 F .182 +(alue speci\214ed by)-.25 F F0(n)3.042 E F1 .182(to its caller)2.922 F +5.183(.I)-.55 G(f)-5.183 E F0(n)3.043 E F1 .589 +(is omitted, the return status is that of the last command e)144 381.6 R +-.15(xe)-.15 G 3.089(cuted. If).15 F F2 -.18(re)3.089 G(tur).18 E(n)-.15 +E F1 .589(is e)3.089 F -.15(xe)-.15 G .588(cuted by a trap).15 F +(handler)144 393.6 Q 3.469(,t)-.4 G .969 +(he last command used to determine the status is the last command e) +-3.469 F -.15(xe)-.15 G .97(cuted before the).15 F .13(trap handler)144 +405.6 R 5.13(.I)-.55 G(f)-5.13 E F2 -.18(re)2.63 G(tur).18 E(n)-.15 E F1 +.13(is e)2.63 F -.15(xe)-.15 G .13(cuted during a).15 F F2(DEB)2.629 E +(UG)-.1 E F1 .129(trap, the last command used to determine the)2.629 F +(status is the last command e)144 417.6 Q -.15(xe)-.15 G +(cuted by the trap handler before).15 E F2 -.18(re)2.5 G(tur).18 E(n) +-.15 E F1 -.1(wa)2.5 G 2.5(si).1 G -1.9 -.4(nv o)-2.5 H -.1(ke).4 G(d.) +.1 E(When)144 434.4 Q F2 -.18(re)3.817 G(tur).18 E(n)-.15 E F1 1.317 +(is used to terminate e)3.817 F -.15(xe)-.15 G 1.318 +(cution of a script being e).15 F -.15(xe)-.15 G 1.318(cuted by the).15 +F F2(.)3.818 E F1(\()6.318 E F2(sour)A(ce)-.18 E F1 3.818(\)c)C(om-) +-3.818 E .808(mand, it causes the shell to stop e)144 446.4 R -.15(xe) +-.15 G .807(cuting that script and return either).15 F F0(n)3.667 E F1 +.807(or the e)3.547 F .807(xit status of the)-.15 F .314(last command e) +144 458.4 R -.15(xe)-.15 G .314(cuted within the script as the e).15 F +.314(xit status of the script.)-.15 F(If)5.315 E F0(n)2.815 E F1 .315 +(is supplied, the return)2.815 F -.25(va)144 470.4 S +(lue is its least signi\214cant 8 bits.).25 E(An)144 487.2 Q 3.176(yc) +-.15 G .676(ommand associated with the)-3.176 F F2(RETURN)3.176 E F1 +.675(trap is e)3.175 F -.15(xe)-.15 G .675(cuted before e).15 F -.15(xe) +-.15 G .675(cution resumes after the).15 F(function or script.)144 499.2 +Q .948(The return status is non-zero if)144 516 R F2 -.18(re)3.449 G +(tur).18 E(n)-.15 E F1 .949(is supplied a non-numeric ar)3.449 F .949 +(gument, or is used outside a)-.18 F(function and not during e)144 528 Q +-.15(xe)-.15 G(cution of a script by).15 E F2(.)2.5 E F1(or)3.333 E F2 +(sour)2.5 E(ce)-.18 E F1(.)A F2(set)108 544.8 Q F1([)2.5 E F2 +(\255abefhkmnptuvxBCEHPT)A F1 2.5(][)C F2-2.5 E F0(option\255name) +2.5 E F1 2.5(][)C F2-2.5 E F1 2.5(][)C F2-2.5 E F1 2.5(][)C F0 +(ar)-2.5 E(g)-.37 E F1 1.666(...)2.5 G(])-1.666 E F2(set)108 556.8 Q F1 +([)2.5 E F2(+abefhkmnptuvxBCEHPT)A F1 2.5(][)C F2(+o)-2.5 E F0 +(option\255name)2.5 E F1 2.5(][)C F2-2.5 E F1 2.5(][)C F2-2.5 +E F1 2.5(][)C F0(ar)-2.5 E(g)-.37 E F1 1.666(...)2.5 G(])-1.666 E F2 +(set \255o)108 568.8 Q(set +o)108 580.8 Q F1 -.4(Wi)144 580.8 S .574 +(thout options, display the name and v).4 F .574(alue of each shell v) +-.25 F .573(ariable in a format that can be reused)-.25 F .113 +(as input for setting or resetting the currently-set v)144 592.8 R 2.613 +(ariables. Read-only)-.25 F -.25(va)2.613 G .113 +(riables cannot be reset.).25 F(In)5.113 E .958 +(posix mode, only shell v)144 604.8 R .958(ariables are listed.)-.25 F +.957(The output is sorted according to the current locale.)5.957 F .58 +(When options are speci\214ed, the)144 616.8 R 3.081(ys)-.15 G .581 +(et or unset shell attrib)-3.081 F 3.081(utes. An)-.2 F 3.081(ya)-.15 G +-.18(rg)-3.081 G .581(uments remaining after op-).18 F .161 +(tion processing are treated as v)144 628.8 R .161 +(alues for the positional parameters and are assigned, in order)-.25 F +2.66(,t)-.4 G(o)-2.66 E F2($1)2.66 E F1(,)A F2($2)144 640.8 Q F1 2.5(,.) +C 1.666(..)-.834 G(,)-1.666 E F2($)2.5 E F0(n)A F1 5(.O)C +(ptions, if speci\214ed, ha)-5 E .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E F2144 652.8 Q F1 1.377(Each v)184 652.8 R +1.377(ariable or function that is created or modi\214ed is gi)-.25 F +-.15(ve)-.25 G 3.877(nt).15 G 1.377(he e)-3.877 F 1.378(xport attrib) +-.15 F 1.378(ute and)-.2 F(mark)184 664.8 Q(ed for e)-.1 E +(xport to the en)-.15 E(vironment of subsequent commands.)-.4 E F2 +144 676.8 Q F1 .132 +(Report the status of terminated background jobs immediately)184 676.8 R +2.632(,r)-.65 G .131(ather than before the ne)-2.632 F(xt)-.15 E .48 +(primary prompt or after a fore)184 688.8 R .48 +(ground command terminates.)-.15 F .48(This is ef)5.48 F(fecti)-.25 E +.78 -.15(ve o)-.25 H .48(nly when).15 F(job control is enabled.)184 +700.8 Q(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(81)185.955 E 0 +Cg EP +%%Page: 82 82 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF144 84 Q F1 .088 +(Exit immediately if a)184 84 R F0(pipeline)2.588 E F1 .087 +(\(which may consist of a single)2.588 F F0 .087(simple command)2.587 F +F1 .087(\), a)B F0(list)2.587 E F1 2.587(,o)C(r)-2.587 E(a)184 96 Q F0 +1.52(compound command)4.02 F F1(\(see)4.021 E/F3 9/Times-Bold@0 SF 1.521 +(SHELL GRAMMAR)4.021 F F1(abo)3.771 E -.15(ve)-.15 G 1.521(\), e).15 F +1.521(xits with a non-zero status.)-.15 F .08(The shell does not e)184 +108 R .079(xit if the command that f)-.15 F .079 +(ails is part of the command list immediately)-.1 F(follo)184 120 Q +1.654(wing a)-.25 F F2(while)4.154 E F1(or)4.154 E F2(until)4.154 E F1 +-.1(ke)4.154 G(yw)-.05 E 1.655(ord, part of the test follo)-.1 F 1.655 +(wing the)-.25 F F2(if)4.155 E F1(or)4.155 E F2(elif)4.155 E F1(reserv) +4.155 E(ed)-.15 E -.1(wo)184 132 S .582(rds, part of an).1 F 3.082(yc) +-.15 G .582(ommand e)-3.082 F -.15(xe)-.15 G .581(cuted in a).15 F F2 +(&&)3.081 E F1(or)3.081 E F2(||)3.081 E F1 .581(list e)3.081 F .581 +(xcept the command follo)-.15 F(wing)-.25 E 1.206(the \214nal)184 144 R +F2(&&)3.706 E F1(or)3.706 E F2(||)3.706 E F1 3.706(,a)C 1.506 -.15(ny c) +-3.706 H 1.206(ommand in a pipeline b).15 F 1.206 +(ut the last \(subject to the state of the)-.2 F F2(pipefail)184 156 Q +F1 1.308(shell option\), or if the command')3.808 F 3.807(sr)-.55 G +1.307(eturn v)-3.807 F 1.307(alue is being in)-.25 F -.15(ve)-.4 G 1.307 +(rted with).15 F F2(!)3.807 E F1 6.307(.I)C 3.807(fa)-6.307 G .274(comp\ +ound command other than a subshell returns a non-zero status because a \ +command)184 168 R -.1(fa)184 180 S .195(iled while).1 F F22.695 E +F1 -.1(wa)2.695 G 2.695(sb).1 G .195(eing ignored, the shell does not e) +-2.695 F 2.694(xit. A)-.15 F .194(trap on)2.694 F F2(ERR)2.694 E F1 +2.694(,i)C 2.694(fs)-2.694 G .194(et, is e)-2.694 F -.15(xe)-.15 G(-).15 +E .59(cuted before the shell e)184 192 R 3.09(xits. This)-.15 F .59 +(option applies to the shell en)3.09 F .59(vironment and each sub-)-.4 F +1.492(shell en)184 204 R 1.492(vironment separately \(see)-.4 F F3 1.492 +(COMMAND EXECUTION ENVIR)3.992 F(ONMENT)-.27 E F1(abo)3.741 E -.15(ve) +-.15 G(\),).15 E(and may cause subshells to e)184 216 Q(xit before e) +-.15 E -.15(xe)-.15 G(cuting all the commands in the subshell.).15 E +.998(If a compound command or shell function e)184 232.8 R -.15(xe)-.15 +G .999(cutes in a conte).15 F .999(xt where)-.15 F F23.499 E F1 +.999(is being ig-)3.499 F .089(nored, none of the commands e)184 244.8 R +-.15(xe)-.15 G .089(cuted within the compound command or function body) +.15 F .502(will be af)184 256.8 R .502(fected by the)-.25 F F2 +3.002 E F1 .502(setting, e)3.002 F -.15(ve)-.25 G 3.002(ni).15 G(f) +-3.002 E F23.002 E F1 .502(is set and a command returns a f)3.002 +F .503(ailure sta-)-.1 F 4.184(tus. If)184 268.8 R 4.184(ac)4.184 G +1.684(ompound command or shell function sets)-4.184 F F24.183 E F1 +1.683(while e)4.183 F -.15(xe)-.15 G 1.683(cuting in a conte).15 F(xt) +-.15 E(where)184 280.8 Q F23.153 E F1 .653 +(is ignored, that setting will not ha)3.153 F .954 -.15(ve a)-.2 H .954 +-.15(ny e).15 H -.25(ff).15 G .654(ect until the compound command).25 F +(or the command containing the function call completes.)184 292.8 Q F2 +144 304.8 Q F1(Disable pathname e)184 304.8 Q(xpansion.)-.15 E F2 +144 316.8 Q F1 .988(Remember the location of commands as the)184 +316.8 R 3.488(ya)-.15 G .988(re look)-3.488 F .988(ed up for e)-.1 F +-.15(xe)-.15 G 3.488(cution. This).15 F .987(is en-)3.487 F +(abled by def)184 328.8 Q(ault.)-.1 E F2144 340.8 Q F1 .513 +(All ar)184 340.8 R .514 +(guments in the form of assignment statements are placed in the en)-.18 +F .514(vironment for a)-.4 F +(command, not just those that precede the command name.)184 352.8 Q F2 +144 364.8 Q F1 .149(Monitor mode.)184 364.8 R .149 +(Job control is enabled.)5.149 F .148(This option is on by def)5.149 F +.148(ault for interacti)-.1 F .448 -.15(ve s)-.25 H(hells).15 E .65 +(on systems that support it \(see)184 376.8 R F3 .651(JOB CONTR)3.151 F +(OL)-.27 E F1(abo)2.901 E -.15(ve)-.15 G 3.151(\). All).15 F .651 +(processes run in a separate)3.151 F .679(process group.)184 388.8 R +.678(When a background job completes, the shell prints a line containin\ +g its)5.679 F -.15(ex)184 400.8 S(it status.).15 E F2144 412.8 Q +F1 .652(Read commands b)184 412.8 R .652(ut do not e)-.2 F -.15(xe)-.15 +G .652(cute them.).15 F .653 +(This may be used to check a shell script for)5.652 F(syntax errors.)184 +424.8 Q(This is ignored by interacti)5 E .3 -.15(ve s)-.25 H(hells.).15 +E F2144 436.8 Q F0(option\255name)2.5 E F1(The)184 448.8 Q F0 +(option\255name)2.5 E F1(can be one of the follo)2.5 E(wing:)-.25 E F2 +(allexport)184 460.8 Q F1(Same as)224 472.8 Q F22.5 E F1(.)A F2 +(braceexpand)184 484.8 Q F1(Same as)224 496.8 Q F22.5 E F1(.)A F2 +(emacs)184 508.8 Q F1 .089 +(Use an emacs-style command line editing interf)224 508.8 R 2.589 +(ace. This)-.1 F .089(is enabled by def)2.589 F(ault)-.1 E .95 +(when the shell is interacti)224 520.8 R -.15(ve)-.25 G 3.45(,u).15 G +.95(nless the shell is started with the)-3.45 F F2(\255\255noediting) +3.45 E F1 2.5(option. This)224 532.8 R(also af)2.5 E +(fects the editing interf)-.25 E(ace used for)-.1 E F2 -.18(re)2.5 G +(ad \255e).18 E F1(.)A F2(err)184 544.8 Q(exit)-.18 E F1(Same as)224 +544.8 Q F22.5 E F1(.)A F2(errtrace)184 556.8 Q F1(Same as)224 +556.8 Q F22.5 E F1(.)A F2(functrace)184 568.8 Q F1(Same as)224 +580.8 Q F22.5 E F1(.)A F2(hashall)184 592.8 Q F1(Same as)224 592.8 +Q F22.5 E F1(.)A F2(histexpand)184 604.8 Q F1(Same as)224 616.8 Q +F22.5 E F1(.)A F2(history)184 628.8 Q F1 .587 +(Enable command history)224 628.8 R 3.087(,a)-.65 G 3.087(sd)-3.087 G +.587(escribed abo)-3.087 F .887 -.15(ve u)-.15 H(nder).15 E F3(HIST) +3.087 E(OR)-.162 E(Y)-.315 E/F4 9/Times-Roman@0 SF(.)A F1 .587 +(This option is)5.087 F(on by def)224 640.8 Q(ault in interacti)-.1 E .3 +-.15(ve s)-.25 H(hells.).15 E F2(ignor)184 652.8 Q(eeof)-.18 E F1 .821 +(The ef)224 664.8 R .822 +(fect is as if the shell command \231IGNOREEOF=10\232 had been e)-.25 F +-.15(xe)-.15 G(cuted).15 E(\(see)224 676.8 Q F2(Shell V)2.5 E(ariables) +-.92 E F1(abo)2.5 E -.15(ve)-.15 G(\).).15 E F2 -.1(ke)184 688.8 S(yw).1 +E(ord)-.1 E F1(Same as)224 700.8 Q F22.5 E F1(.)A(GNU Bash 5.3)72 +768 Q(2024 December 12)136.795 E(82)185.955 E 0 Cg EP +%%Page: 83 83 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(monitor)184 84 Q F1(Same as) +224 84 Q F22.5 E F1(.)A F2(noclob)184 96 Q(ber)-.1 E F1(Same as) +224 108 Q F22.5 E F1(.)A F2(noexec)184 120 Q F1(Same as)224 120 Q +F22.5 E F1(.)A F2(noglob)184 132 Q F1(Same as)224 132 Q F2 +2.5 E F1(.)A F2(nolog)184 144 Q F1(Currently ignored.)224 144 Q F2 +(notify)184 156 Q F1(Same as)224 156 Q F22.5 E F1(.)A F2(nounset) +184 168 Q F1(Same as)224 168 Q F22.5 E F1(.)A F2(onecmd)184 180 Q +F1(Same as)224 180 Q F22.5 E F1(.)A F2(ph)184 192 Q(ysical)-.15 E +F1(Same as)224 192 Q F22.5 E F1(.)A F2(pipefail)184 204 Q F1 1.03 +(If set, the return v)224 204 R 1.029(alue of a pipeline is the v)-.25 F +1.029(alue of the last \(rightmost\) com-)-.25 F 1.136(mand to e)224 216 +R 1.136 +(xit with a non-zero status, or zero if all commands in the pipeline) +-.15 F -.15(ex)224 228 S(it successfully).15 E 5(.T)-.65 G +(his option is disabled by def)-5 E(ault.)-.1 E F2(posix)184 240 Q F1 +2.091(Change the beha)224 240 R 2.091(vior of)-.2 F F2(bash)4.591 E F1 +2.091(where the def)4.591 F 2.091(ault operation dif)-.1 F 2.091 +(fers from the)-.25 F 1.212(POSIX standard to match the standard \()224 +252 R F0 1.212(posix mode)B F1 3.712(\). See)B/F3 9/Times-Bold@0 SF +1.212(SEE ALSO)3.712 F F1(belo)3.463 E(w)-.25 E .955 +(for a reference to a document that details ho)224 264 R 3.454(wp)-.25 G +.954(osix mode af)-3.454 F .954(fects bash')-.25 F 3.454(sb)-.55 G(e-) +-3.454 E(ha)224 276 Q(vior)-.2 E(.)-.55 E F2(pri)184 288 Q(vileged)-.1 E +F1(Same as)224 300 Q F22.5 E F1(.)A F2 -.1(ve)184 312 S(rbose).1 E +F1(Same as)224 312 Q F22.5 E F1(.)A F2(vi)184 324 Q F1 .209 +(Use a vi-style command line editing interf)224 324 R 2.709(ace. This) +-.1 F .209(also af)2.709 F .21(fects the editing in-)-.25 F(terf)224 336 +Q(ace used for)-.1 E F2 -.18(re)2.5 G(ad \255e).18 E F1(.)A F2(xtrace) +184 348 Q F1(Same as)224 348 Q F22.5 E F1(.)A(If)184 360 Q F2 +2.766 E F1 .266(is supplied with no)2.766 F F0(option\255name) +2.765 E F1(,)A F2(set)2.765 E F1 .265 +(prints the current shell option settings.)2.765 F(If)5.265 E F2(+o) +2.765 E F1 .078(is supplied with no)184 372 R F0(option\255name)2.578 E +F1(,)A F2(set)2.578 E F1 .079(prints a series of)2.579 F F2(set)2.579 E +F1 .079(commands to recreate the cur)2.579 F(-)-.2 E +(rent option settings on the standard output.)184 384 Q F2144 396 +Q F1 -.45(Tu)184 396 S 3.278(rn on).45 F F0(privile)7.028 E -.1(ge)-.4 G +(d).1 E F1 5.777(mode. In)6.548 F 3.277 +(this mode, the shell does not read the)5.777 F F3($ENV)5.777 E F1(and) +5.527 E F3($B)184 408 Q(ASH_ENV)-.27 E F1 .018 +(\214les, shell functions are not inherited from the en)2.267 F .018 +(vironment, and the)-.4 F F3(SHEL-)2.518 E(LOPTS)184 420 Q/F4 9 +/Times-Roman@0 SF(,)A F3 -.27(BA)2.59 G(SHOPTS).27 E F4(,)A F3(CDP)2.59 +E -.855(AT)-.666 G(H).855 E F4(,)A F1(and)2.59 E F3(GLOBIGNORE)2.84 E F1 +-.25(va)2.589 G .339(riables, if the).25 F 2.839(ya)-.15 G .339 +(ppear in the en)-2.839 F(vi-)-.4 E .02(ronment, are ignored.)184 432 R +.021(If the shell is started with the ef)5.02 F(fecti)-.25 E .321 -.15 +(ve u)-.25 H .021(ser \(group\) id not equal to).15 F .043 +(the real user \(group\) id, and the)184 444 R F22.543 E F1 .043 +(option is not supplied, these actions are tak)2.543 F .043(en and the) +-.1 F(ef)184 456 Q(fecti)-.25 E .878 -.15(ve u)-.25 H .579 +(ser id is set to the real user id.).15 F .579(If the)5.579 F F2 +3.079 E F1 .579(option is supplied at startup, the ef-)3.079 F(fecti)184 +468 Q 1.21 -.15(ve u)-.25 H .91(ser id is not reset.).15 F -.45(Tu)5.91 +G .91(rning this option of).45 F 3.41(fc)-.25 G .91(auses the ef)-3.41 F +(fecti)-.25 E 1.21 -.15(ve u)-.25 H .91(ser and group).15 F +(ids to be set to the real user and group ids.)184 480 Q F2144 492 +Q F1(Enable restricted shell mode.)184 492 Q +(This option cannot be unset once it has been set.)5 E F2144 504 Q +F1(Exit after reading and e)184 504 Q -.15(xe)-.15 G +(cuting one command.).15 E F2144 516 Q F1 -.35(Tr)184 516 S .662 +(eat unset v).35 F .662(ariables and parameters other than the special \ +parameters \231@\232 and \231*\232, or)-.25 F .349(array v)184 528 R +.348(ariables subscripted with \231@\232 or \231*\232, as an error when\ + performing parameter e)-.25 F(x-)-.15 E 2.89(pansion. If)184 540 R -.15 +(ex)2.89 G .391(pansion is attempted on an unset v).15 F .391 +(ariable or parameter)-.25 F 2.891(,t)-.4 G .391(he shell prints an) +-2.891 F(error message, and, if not interacti)184 552 Q -.15(ve)-.25 G +2.5(,e).15 G(xits with a non-zero status.)-2.65 E F2144 564 Q F1 +(Print shell input lines as the)184 564 Q 2.5(ya)-.15 G(re read.)-2.5 E +F2144 576 Q F1 .315(After e)184 576 R .315(xpanding each)-.15 F F0 +.315(simple command)2.815 F F1(,)A F2 -.25(fo)2.815 G(r).25 E F1 +(command,)2.815 E F2(case)2.815 E F1(command,)2.815 E F2(select)2.815 E +F1(command,)2.815 E 1.235(or arithmetic)184 588 R F2 -.25(fo)3.736 G(r) +.25 E F1 1.236(command, display the e)3.736 F 1.236(xpanded v)-.15 F +1.236(alue of)-.25 F F3(PS4)3.736 E F4(,)A F1(follo)3.486 E 1.236 +(wed by the com-)-.25 F(mand and its e)184 600 Q(xpanded ar)-.15 E +(guments or associated w)-.18 E(ord list, to the standard error)-.1 E(.) +-.55 E F2144 612 Q F1 1.206(The shell performs brace e)184 612 R +1.206(xpansion \(see)-.15 F F2 1.205(Brace Expansion)3.705 F F1(abo) +3.705 E -.15(ve)-.15 G 3.705(\). This).15 F 1.205(is on by de-)3.705 F +-.1(fa)184 624 S(ult.).1 E F2144 636 Q F1 .213(If set,)184 636 R +F2(bash)2.713 E F1 .213(does not o)2.713 F -.15(ve)-.15 G .214 +(rwrite an e).15 F .214(xisting \214le with the)-.15 F F2(>)2.714 E F1 +(,)A F2(>&)2.714 E F1 2.714(,a)C(nd)-2.714 E F2(<>)2.714 E F1 .214 +(redirection opera-)2.714 F 3.148(tors. Using)184 648 R .648 +(the redirection operator)3.148 F F2(>|)3.148 E F1 .648(instead of)3.148 +F F2(>)3.148 E F1 .648(will o)3.148 F -.15(ve)-.15 G .648 +(rride this and force the cre-).15 F(ation of an output \214le.)184 660 +Q F2144 672 Q F1 .103(If set, an)184 672 R 2.603(yt)-.15 G .103 +(rap on)-2.603 F F2(ERR)2.603 E F1 .104 +(is inherited by shell functions, command substitutions, and com-)2.603 +F .839(mands e)184 684 R -.15(xe)-.15 G .839(cuted in a subshell en).15 +F 3.339(vironment. The)-.4 F F2(ERR)3.338 E F1 .838 +(trap is normally not inherited in)3.338 F(such cases.)184 696 Q +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(83)185.955 E 0 Cg EP +%%Page: 84 84 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF144 84 Q F1(Enable)184 +84 Q F2(!)3.031 E F1 .531(style history substitution.)5.531 F .531 +(This option is on by def)5.531 F .532(ault when the shell is inter)-.1 +F(-)-.2 E(acti)184 96 Q -.15(ve)-.25 G(.).15 E F2144 108 Q F1 .96 +(If set, the shell does not resolv)184 108 R 3.459(es)-.15 G .959 +(ymbolic links when e)-3.459 F -.15(xe)-.15 G .959 +(cuting commands such as).15 F F2(cd)3.459 E F1 1.452 +(that change the current w)184 120 R 1.452(orking directory)-.1 F 6.452 +(.I)-.65 G 3.953(tu)-6.452 G 1.453(ses the ph)-3.953 F 1.453 +(ysical directory structure in-)-.05 F 3.335(stead. By)184 132 R(def) +3.335 E(ault,)-.1 E F2(bash)3.334 E F1(follo)3.334 E .834 +(ws the logical chain of directories when performing com-)-.25 F +(mands which change the current directory)184 144 Q(.)-.65 E F2144 +156 Q F1 .89(If set, an)184 156 R 3.39(yt)-.15 G .89(raps on)-3.39 F F2 +(DEB)3.39 E(UG)-.1 E F1(and)3.39 E F2(RETURN)3.39 E F1 .89 +(are inherited by shell functions, command)3.39 F 1.932 +(substitutions, and commands e)184 168 R -.15(xe)-.15 G 1.932 +(cuted in a subshell en).15 F 4.432(vironment. The)-.4 F F2(DEB)4.432 E +(UG)-.1 E F1(and)4.432 E F2(RETURN)184 180 Q F1 +(traps are normally not inherited in such cases.)2.5 E F2144 192 Q +F1 .909(If no ar)184 192 R .909(guments follo)-.18 F 3.409(wt)-.25 G +.909(his option, unset the positional parameters.)-3.409 F .91 +(Otherwise, set the)5.909 F(positional parameters to the)184 204 Q F0 +(ar)2.5 E(g)-.37 E F1(s, e)A -.15(ve)-.25 G 2.5(ni).15 G 2.5(fs)-2.5 G +(ome of them be)-2.5 E(gin with a)-.15 E F22.5 E F1(.)A F2144 +216 Q F1 1.368(Signal the end of options, and assign all remaining)184 +216 R F0(ar)3.868 E(g)-.37 E F1 3.867(st)C 3.867(ot)-3.867 G 1.367 +(he positional parameters.)-3.867 F(The)184 228 Q F22.848 E F1 +(and)2.848 E F22.848 E F1 .349(options are turned of)2.848 F 2.849 +(f. If)-.25 F .349(there are no)2.849 F F0(ar)2.849 E(g)-.37 E F1 .349 +(s, the positional parameters re-)B(main unchanged.)184 240 Q .425 +(The options are of)144 256.8 R 2.925(fb)-.25 G 2.925(yd)-2.925 G(ef) +-2.925 E .425(ault unless otherwise noted.)-.1 F .425 +(Using + rather than \255 causes these options)5.425 F .177 +(to be turned of)144 268.8 R 2.677(f. The)-.25 F .178 +(options can also be speci\214ed as ar)2.678 F .178(guments to an in) +-.18 F -.2(vo)-.4 G .178(cation of the shell.).2 F(The)5.178 E .654 +(current set of options may be found in)144 280.8 R F2<24ad>3.153 E F1 +5.653(.T)C .653(he return status is al)-5.653 F -.1(wa)-.1 G .653 +(ys zero unless an in).1 F -.25(va)-.4 G .653(lid op-).25 F +(tion is encountered.)144 292.8 Q F2(shift)108 309.6 Q F1([)2.5 E F0(n)A +F1(])A .596(Rename positional parameters from)144 321.6 R F0(n)3.097 E +F1 .597(+1 .)B -2.735 1.666(.. t)1.666 H(o)-1.666 E F2 .597($1 .)3.097 F +1.666(..)1.666 G(.)-1.666 E F1 -.15(Pa)5.597 G .597 +(rameters represented by the numbers).15 F F2($#)3.097 E F1(do)144 333.6 +Q .079(wn to)-.25 F F2($#)2.579 E F1A F0(n)A F1 .078(+1 are unset.)B +F0(n)5.438 E F1 .078(must be a non-ne)2.818 F -.05(ga)-.15 G(ti).05 E +.378 -.15(ve n)-.25 H .078(umber less than or equal to).15 F F2($#)2.578 +E F1 5.078(.I)C(f)-5.078 E F0(n)2.938 E F1 .078(is 0, no)2.818 F .502 +(parameters are changed.)144 345.6 R(If)5.502 E F0(n)3.362 E F1 .502 +(is not gi)3.242 F -.15(ve)-.25 G .502(n, it is assumed to be 1.).15 F +(If)5.503 E F0(n)3.363 E F1 .503(is greater than)3.243 F F2($#)3.003 E +F1 3.003(,t)C .503(he posi-)-3.003 F .46 +(tional parameters are not changed.)144 357.6 R .46 +(The return status is greater than zero if)5.46 F F0(n)3.32 E F1 .46 +(is greater than)3.2 F F2($#)2.96 E F1(or)2.96 E +(less than zero; otherwise 0.)144 369.6 Q F2(shopt)108 386.4 Q F1([)2.5 +E F2(\255pqsu)A F1 2.5(][)C F2-2.5 E F1 2.5(][)C F0(optname)-2.5 E +F1 1.666(...)2.5 G(])-1.666 E -.8(To)144 398.4 S .639(ggle the v).8 F +.639(alues of settings controlling optional shell beha)-.25 F(vior)-.2 E +5.639(.T)-.55 G .64(he settings can be either those)-5.639 F .375 +(listed belo)144 410.4 R 1.675 -.65(w, o)-.25 H 1.175 -.4(r, i).65 H +2.875(ft).4 G(he)-2.875 E F22.875 E F1 .375 +(option is used, those a)2.875 F -.25(va)-.2 G .375(ilable with the).25 +F F22.875 E F1 .374(option to the)2.875 F F2(set)2.874 E F1 -.2 +(bu)2.874 G .374(iltin com-).2 F(mand.)144 422.4 Q -.4(Wi)144 439.2 S +.547(th no options, or with the).4 F F23.048 E F1 .548 +(option, display a list of all settable options, with an indication of) +3.048 F .675(whether or not each is set; if an)144 451.2 R(y)-.15 E F0 +(optnames)3.175 E F1 .674 +(are supplied, the output is restricted to those options.)3.175 F(The) +144 463.2 Q F22.5 E F1 +(option displays output in a form that may be reused as input.)2.5 E +(Other options ha)144 480 Q .3 -.15(ve t)-.2 H(he follo).15 E +(wing meanings:)-.25 E F2144 492 Q F1(Enable \(set\) each)180 492 +Q F0(optname)2.5 E F1(.)A F2144 504 Q F1(Disable \(unset\) each) +180 504 Q F0(optname)2.5 E F1(.)A F2144 516 Q F1 .003(Suppresses \ +normal output \(quiet mode\); the return status indicates whether the) +180 516 R F0(optname)2.504 E F1(is)2.504 E .042(set or unset.)180 528 R +.042(If multiple)5.042 F F0(optname)2.542 E F1(ar)2.542 E .042 +(guments are supplied with)-.18 F F22.542 E F1 2.542(,t)C .042 +(he return status is zero)-2.542 F(if all)180 540 Q F0(optnames)2.5 E F1 +(are enabled; non-zero otherwise.)2.5 E F2144 552 Q F1 +(Restricts the v)180 552 Q(alues of)-.25 E F0(optname)2.5 E F1 +(to be those de\214ned for the)2.5 E F22.5 E F1(option to the)2.5 +E F2(set)2.5 E F1 -.2(bu)2.5 G(iltin.).2 E .624(If either)144 568.8 R F2 +3.124 E F1(or)3.124 E F23.124 E F1 .624(is used with no) +3.124 F F0(optname)3.124 E F1(ar)3.124 E(guments,)-.18 E F2(shopt)3.124 +E F1(sho)3.124 E .624(ws only those options which are)-.25 F .984 +(set or unset, respecti)144 580.8 R -.15(ve)-.25 G(ly).15 E 5.984(.U) +-.65 G .984(nless otherwise noted, the)-5.984 F F2(shopt)3.484 E F1 .983 +(options are disabled \(unset\) by de-)3.483 F -.1(fa)144 592.8 S(ult.) +.1 E 1.544(The return status when listing options is zero if all)144 +609.6 R F0(optnames)4.044 E F1 1.545(are enabled, non-zero otherwise.) +4.045 F .696 +(When setting or unsetting options, the return status is zero unless an) +144 621.6 R F0(optname)3.196 E F1 .696(is not a v)3.196 F .695 +(alid shell)-.25 F(option.)144 633.6 Q(The list of)144 650.4 Q F2(shopt) +2.5 E F1(options is:)2.5 E F2(array_expand_once)144 667.2 Q F1 1.831 +(If set, the shell suppresses multiple e)184 679.2 R -.25(va)-.25 G +1.832(luation of associati).25 F 2.132 -.15(ve a)-.25 H 1.832(nd inde) +.15 F -.15(xe)-.15 G 4.332(da).15 G 1.832(rray sub-)-4.332 F .025 +(scripts during arithmetic e)184 691.2 R .025(xpression e)-.15 F -.25 +(va)-.25 G .025(luation, while e).25 F -.15(xe)-.15 G .025(cuting b).15 +F .025(uiltins that can perform)-.2 F -.25(va)184 703.2 S +(riable assignments, and while e).25 E -.15(xe)-.15 G(cuting b).15 E +(uiltins that perform array dereferencing.)-.2 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(84)185.955 E 0 Cg EP +%%Page: 85 85 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(assoc_expand_once)144 84 Q F1 +(Deprecated; a synon)184 96 Q(ym for)-.15 E F2(array_expand_once)2.5 E +F1(.)A F2(autocd)144 108 Q F1 .199 +(If set, a command name that is the name of a directory is e)184 108 R +-.15(xe)-.15 G .2(cuted as if it were the ar).15 F(gu-)-.18 E +(ment to the)184 120 Q F2(cd)2.5 E F1 2.5(command. This)2.5 F +(option is only used by interacti)2.5 E .3 -.15(ve s)-.25 H(hells.).15 E +F2(bash_sour)144 132 Q(ce_fullpath)-.18 E F1 .124 +(If set, \214lenames added to the)184 144 R F2 -.3(BA)2.624 G(SH_SOURCE) +.3 E F1 .124(array v)2.624 F .124(ariable are con)-.25 F -.15(ve)-.4 G +.123(rted to full path-).15 F(names \(see)184 156 Q F2(Shell V)2.5 E +(ariables)-.92 E F1(abo)2.5 E -.15(ve)-.15 G(\).).15 E F2(cdable_v)144 +168 Q(ars)-.1 E F1 .155(If set, an ar)184 180 R .155(gument to the)-.18 +F F2(cd)2.655 E F1 -.2(bu)2.655 G .156 +(iltin command that is not a directory is assumed to be the).2 F +(name of a v)184 192 Q(ariable whose v)-.25 E +(alue is the directory to change to.)-.25 E F2(cdspell)144 204 Q F1 +1.293(If set, the)184 204 R F2(cd)3.793 E F1 1.293(command attempts to \ +correct minor errors in the spelling of a directory)3.793 F 3.982 +(component. Minor)184 216 R 1.482 +(errors include transposed characters, a missing character)3.982 F 3.982 +(,a)-.4 G 1.482(nd one)-3.982 F -.15(ex)184 228 S .973(tra character).15 +F 5.973(.I)-.55 G(f)-5.973 E F2(cd)3.473 E F1 .972 +(corrects the directory name, it prints the corrected \214lename, and) +3.473 F(the command proceeds.)184 240 Q +(This option is only used by interacti)5 E .3 -.15(ve s)-.25 H(hells.) +.15 E F2(checkhash)144 252 Q F1 .736(If set,)184 264 R F2(bash)3.236 E +F1 .736(checks that a command found in the hash table e)3.236 F .737 +(xists before trying to e)-.15 F -.15(xe)-.15 G(-).15 E(cute it.)184 276 +Q(If a hashed command no longer e)5 E(xists,)-.15 E F2(bash)2.5 E F1 +(performs a normal path search.)2.5 E F2(checkjobs)144 288 Q F1 .449 +(If set,)184 300 R F2(bash)2.949 E F1 .449(lists the status of an)2.949 +F 2.949(ys)-.15 G .448(topped and running jobs before e)-2.949 F .448 +(xiting an interacti)-.15 F -.15(ve)-.25 G 2.783(shell. If)184 312 R(an) +2.783 E 2.783(yj)-.15 G .283(obs are running,)-2.783 F F2(bash)2.784 E +F1 .284(defers the e)2.784 F .284(xit until a second e)-.15 F .284 +(xit is attempted with-)-.15 F .835(out an interv)184 324 R .835 +(ening command \(see)-.15 F/F3 9/Times-Bold@0 SF .835(JOB CONTR)3.335 F +(OL)-.27 E F1(abo)3.085 E -.15(ve)-.15 G 3.334(\). The).15 F .834 +(shell al)3.334 F -.1(wa)-.1 G .834(ys postpones).1 F -.15(ex)184 336 S +(iting if an).15 E 2.5(yj)-.15 G(obs are stopped.)-2.5 E F2 +(checkwinsize)144 348 Q F1 1.09(If set,)184 360 R F2(bash)3.59 E F1 1.09 +(checks the windo)3.59 F 3.59(ws)-.25 G 1.09(ize after each e)-3.59 F +1.09(xternal \(non-b)-.15 F 1.09(uiltin\) command and, if)-.2 F +(necessary)184 372 Q 2.938(,u)-.65 G .438(pdates the v)-2.938 F .438 +(alues of)-.25 F F3(LINES)2.938 E F1(and)2.688 E F3(COLUMNS)2.938 E/F4 9 +/Times-Roman@0 SF(,)A F1 .437(using the \214le descriptor associ-)2.688 +F(ated with the standard error if it is a terminal.)184 384 Q +(This option is enabled by def)5 E(ault.)-.1 E F2(cmdhist)144 396 Q F1 +.172(If set,)184 396 R F2(bash)2.672 E F1 .172(attempts to sa)2.672 F +.472 -.15(ve a)-.2 H .173 +(ll lines of a multiple-line command in the same history en-).15 F(try) +184 408 Q 5.597(.T)-.65 G .597(his allo)-5.597 F .597 +(ws easy re-editing of multi-line commands.)-.25 F .597 +(This option is enabled by de-)5.597 F -.1(fa)184 420 S 1.287(ult, b).1 +F 1.288(ut only has an ef)-.2 F 1.288 +(fect if command history is enabled, as described abo)-.25 F 1.588 -.15 +(ve u)-.15 H(nder).15 E F3(HIST)184 432 Q(OR)-.162 E(Y)-.315 E F4(.)A F2 +(compat31)144 444 Q(compat32)144 456 Q(compat40)144 468 Q(compat41)144 +480 Q(compat42)144 492 Q(compat43)144 504 Q(compat44)144 516 Q(compat50) +144 528 Q F1 .889(These control aspects of the shell')184 540 R 3.389 +(sc)-.55 G .889(ompatibility mode \(see)-3.389 F F3 .889(SHELL COMP) +3.389 F -.855(AT)-.666 G(IBILITY).855 E(MODE)184 552 Q F1(belo)2.25 E +(w\).)-.25 E F2(complete_fullquote)144 564 Q F1 .653(If set,)184 576 R +F2(bash)3.153 E F1 .653(quotes all shell metacharacters in \214lenames \ +and directory names when per)3.153 F(-)-.2 E 1.525(forming completion.) +184 588 R 1.524(If not set,)6.525 F F2(bash)4.024 E F1(remo)4.024 E -.15 +(ve)-.15 G 4.024(sm).15 G 1.524(etacharacters such as the dollar sign) +-4.024 F 2.667(from the set of characters that will be quoted in comple\ +ted \214lenames when these)184 600 R .029 +(metacharacters appear in shell v)184 612 R .028 +(ariable references in w)-.25 F .028(ords to be completed.)-.1 F .028 +(This means)5.028 F 1.072(that dollar signs in v)184 624 R 1.073 +(ariable names that e)-.25 F 1.073 +(xpand to directories will not be quoted; ho)-.15 F(w-)-.25 E -2.15 -.25 +(ev e)184 636 T 1.923 -.4(r, a).25 H 1.423 -.15(ny d).4 H 1.123 +(ollar signs appearing in \214lenames will not be quoted, either).15 F +6.123(.T)-.55 G 1.122(his is acti)-6.123 F -.15(ve)-.25 G .59 +(only when bash is using backslashes to quote completed \214lenames.)184 +648 R .59(This v)5.59 F .59(ariable is set)-.25 F(by def)184 660 Q +(ault, which is the def)-.1 E(ault bash beha)-.1 E(vior in v)-.2 E +(ersions through 4.2.)-.15 E F2(dir)144 672 Q(expand)-.18 E F1 .487 +(If set,)184 684 R F2(bash)2.987 E F1 .486 +(replaces directory names with the results of w)2.986 F .486(ord e)-.1 F +.486(xpansion when perform-)-.15 F 1.25(ing \214lename completion.)184 +696 R 1.25(This changes the contents of the)6.25 F F2 -.18(re)3.75 G +(adline).18 E F1 1.25(editing b)3.75 F(uf)-.2 E(fer)-.25 E 6.25(.I)-.55 +G(f)-6.25 E(not set,)184 708 Q F2(bash)2.5 E F1(attempts to preserv)2.5 +E 2.5(ew)-.15 G(hat the user typed.)-2.5 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(85)185.955 E 0 Cg EP +%%Page: 86 86 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(dirspell)144 84 Q F1 .859 +(If set,)184 84 R F2(bash)3.359 E F1 .858 +(attempts spelling correction on directory names during w)3.359 F .858 +(ord completion if)-.1 F +(the directory name initially supplied does not e)184 96 Q(xist.)-.15 E +F2(dotglob)144 108 Q F1 1.087(If set,)184 108 R F2(bash)3.587 E F1 1.088 +(includes \214lenames be)3.588 F 1.088 +(ginning with a \231.\232 in the results of pathname e)-.15 F(xpan-)-.15 +E 2.5(sion. The)184 120 R(\214lenames)2.5 E F0(.)4.166 E F1(and)4.166 E +F0(..)4.166 E F1(must al)4.166 E -.1(wa)-.1 G(ys be matched e).1 E +(xplicitly)-.15 E 2.5(,e)-.65 G -.15(ve)-2.75 G 2.5(ni).15 G(f)-2.5 E F2 +(dotglob)2.5 E F1(is set.)2.5 E F2(execfail)144 132 Q F1 .517 +(If set, a non-interacti)184 132 R .817 -.15(ve s)-.25 H .517 +(hell will not e).15 F .516(xit if it cannot e)-.15 F -.15(xe)-.15 G +.516(cute the \214le speci\214ed as an ar).15 F(-)-.2 E(gument to the) +184 144 Q F2(exec)2.5 E F1 -.2(bu)2.5 G 2.5(iltin. An).2 F(interacti)2.5 +E .3 -.15(ve s)-.25 H(hell does not e).15 E(xit if)-.15 E F2(exec)2.5 E +F1 -.1(fa)2.5 G(ils.).1 E F2(expand_aliases)144 156 Q F1 .716 +(If set, aliases are e)184 168 R .717(xpanded as described abo)-.15 F +1.017 -.15(ve u)-.15 H(nder).15 E/F3 9/Times-Bold@0 SF(ALIASES)3.217 E +/F4 9/Times-Roman@0 SF(.)A F1 .717(This option is enabled)5.217 F +(by def)184 180 Q(ault for interacti)-.1 E .3 -.15(ve s)-.25 H(hells.) +.15 E F2(extdeb)144 192 Q(ug)-.2 E F1 .17(If set at shell in)184 204 R +-.2(vo)-.4 G .17(cation, or in a shell startup \214le, arrange to e).2 F +-.15(xe)-.15 G .17(cute the deb).15 F .17(ugger pro\214le)-.2 F 1.081 +(before the shell starts, identical to the)184 216 R F23.582 +E(ugger)-.2 E F1 3.582(option. If)3.582 F 1.082(set after in)3.582 F -.2 +(vo)-.4 G 1.082(cation, be-).2 F(ha)184 228 Q +(vior intended for use by deb)-.2 E(uggers is enabled:)-.2 E F2(1.)184 +240 Q F1(The)220 240 Q F24.251 E F1 1.751(option to the)4.251 F F2 +(declar)4.251 E(e)-.18 E F1 -.2(bu)4.251 G 1.751 +(iltin displays the source \214le name and line).2 F +(number corresponding to each function name supplied as an ar)220 252 Q +(gument.)-.18 E F2(2.)184 264 Q F1 1.667(If the command run by the)220 +264 R F2(DEB)4.167 E(UG)-.1 E F1 1.667(trap returns a non-zero v)4.167 F +1.667(alue, the ne)-.25 F(xt)-.15 E(command is skipped and not e)220 276 +Q -.15(xe)-.15 G(cuted.).15 E F2(3.)184 288 Q F1 .841 +(If the command run by the)220 288 R F2(DEB)3.341 E(UG)-.1 E F1 .841 +(trap returns a v)3.341 F .84(alue of 2, and the shell is)-.25 F -.15 +(exe)220 300 S .488 +(cuting in a subroutine \(a shell function or a shell script e).15 F +-.15(xe)-.15 G .488(cuted by the).15 F F2(.)2.988 E F1(or)2.988 E F2 +(sour)220 312 Q(ce)-.18 E F1 -.2(bu)2.5 G +(iltins\), the shell simulates a call to).2 E F2 -.18(re)2.5 G(tur).18 E +(n)-.15 E F1(.)A F2(4.)184 324 Q F3 -.27(BA)220 324 S(SH_ARGC).27 E F1 +(and)3.154 E F3 -.27(BA)3.404 G(SH_ARGV).27 E F1 .904 +(are updated as described in their descriptions)3.154 F(abo)220 336 Q +-.15(ve)-.15 G(\).).15 E F2(5.)184 348 Q F1 1.637(Function tracing is e\ +nabled: command substitution, shell functions, and sub-)220 348 R +(shells in)220 360 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F2 +(\()2.5 E F0(command)2.5 E F2(\))2.5 E F1(inherit the)2.5 E F2(DEB)2.5 E +(UG)-.1 E F1(and)2.5 E F2(RETURN)2.5 E F1(traps.)2.5 E F2(6.)184 372 Q +F1 1.082(Error tracing is enabled: command substitution, shell function\ +s, and subshells)220 372 R(in)220 384 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw) +.1 G(ith)-2.5 E F2(\()2.5 E F0(command)2.5 E F2(\))2.5 E F1(inherit the) +2.5 E F2(ERR)2.5 E F1(trap.)2.5 E F2(extglob)144 396 Q F1 .856 +(If set, enable the e)184 396 R .856 +(xtended pattern matching features described abo)-.15 F 1.157 -.15(ve u) +-.15 H(nder).15 E F2 -.1(Pa)3.357 G(thname).1 E(Expansion)184 408 Q F1 +(.)A F2(extquote)144 420 Q F1 .86(If set,)184 432 R F2($)3.36 E F1<08>A +F0(string)A F1 3.36<0861>C(nd)-3.36 E F2($)3.36 E F1(")A F0(string)A F1 +3.36("q)C .86(uoting is performed within)-3.36 F F2(${)3.36 E F0(par)A +(ameter)-.15 E F2(})A F1 -.15(ex)3.36 G .86(pansions en-).15 F +(closed in double quotes.)184 444 Q(This option is enabled by def)5 E +(ault.)-.1 E F2(failglob)144 456 Q F1 .242(If set, patterns which f)184 +456 R .243(ail to match \214lenames during pathname e)-.1 F .243 +(xpansion result in an e)-.15 F(x-)-.15 E(pansion error)184 468 Q(.)-.55 +E F2 -.25(fo)144 480 S -.18(rc).25 G(e_\214gnor).18 E(e)-.18 E F1 .937 +(If set, the suf)184 492 R<8c78>-.25 E .936(es speci\214ed by the)-.15 F +F3(FIGNORE)3.436 E F1 .936(shell v)3.186 F .936(ariable cause w)-.25 F +.936(ords to be ignored)-.1 F .32(when performing w)184 504 R .32 +(ord completion e)-.1 F -.15(ve)-.25 G 2.82(ni).15 G 2.82(ft)-2.82 G .32 +(he ignored w)-2.82 F .32(ords are the only possible com-)-.1 F 3.239 +(pletions. See)184 516 R F2 .739(Shell V)3.239 F(ariables)-.92 E F1(abo) +3.238 E 1.038 -.15(ve f)-.15 H .738(or a description of).15 F F3 +(FIGNORE)3.238 E F4(.)A F1 .738(This option is en-)5.238 F(abled by def) +184 528 Q(ault.)-.1 E F2(globasciiranges)144 540 Q F1 2.518 +(If set, range e)184 552 R 2.519 +(xpressions used in pattern matching brack)-.15 F 2.519(et e)-.1 F 2.519 +(xpressions \(see)-.15 F F3 -.09(Pa)5.019 G(tter).09 E(n)-.135 E +(Matching)184 564 Q F1(abo)2.965 E -.15(ve)-.15 G 3.215(\)b).15 G(eha) +-3.215 E 1.015 -.15(ve a)-.2 H 3.214(si).15 G 3.214(fi)-3.214 G 3.214 +(nt)-3.214 G .714(he traditional C locale when performing comparisons.) +-3.214 F .987(That is, pattern matching does not tak)184 576 R 3.487(et) +-.1 G .987(he current locale')-3.487 F 3.487(sc)-.55 G .987 +(ollating sequence into ac-)-3.487 F 1.552(count, so)184 588 R F2(b) +4.052 E F1 1.552(will not collate between)4.052 F F2(A)4.051 E F1(and) +4.051 E F2(B)4.051 E F1 4.051(,a)C 1.551(nd upper)-4.051 F 1.551 +(-case and lo)-.2 F(wer)-.25 E 1.551(-case ASCII)-.2 F +(characters will collate together)184 600 Q(.)-.55 E F2(globskipdots)144 +612 Q F1 .727(If set, pathname e)184 624 R .727(xpansion will ne)-.15 F +-.15(ve)-.25 G 3.227(rm).15 G .727(atch the \214lenames)-3.227 F F0(.) +4.893 E F1(and)4.893 E F0(..)4.893 E F1 3.227(,e)1.666 G -.15(ve)-3.477 +G 3.227(ni).15 G 3.227(ft)-3.227 G .728(he pattern)-3.227 F(be)184 636 Q +(gins with a \231.\232.)-.15 E(This option is enabled by def)5 E(ault.) +-.1 E F2(globstar)144 648 Q F1 .519(If set, the pattern)184 648 R F2(**) +3.019 E F1 .519(used in a pathname e)3.019 F .519(xpansion conte)-.15 F +.518(xt will match all \214les and zero)-.15 F .431 +(or more directories and subdirectories.)184 660 R .431 +(If the pattern is follo)5.431 F .432(wed by a)-.25 F F2(/)2.932 E F1 +2.932(,o)C .432(nly directories)-2.932 F(and subdirectories match.)184 +672 Q F2(gnu_errfmt)144 684 Q F1(If set, shell error messages are writt\ +en in the standard GNU error message format.)184 696 Q(GNU Bash 5.3)72 +768 Q(2024 December 12)136.795 E(86)185.955 E 0 Cg EP +%%Page: 87 87 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(histappend)144 84 Q F1 .676 +(If set, the history list is appended to the \214le named by the v)184 +96 R .676(alue of the)-.25 F/F3 9/Times-Bold@0 SF(HISTFILE)3.176 E F1 +-.25(va)2.926 G(ri-).25 E(able when the shell e)184 108 Q +(xits, rather than o)-.15 E -.15(ve)-.15 G(rwriting the \214le.).15 E F2 +(histr)144 120 Q(eedit)-.18 E F1 .117(If set, and)184 132 R F2 -.18(re) +2.617 G(adline).18 E F1 .118(is being used, the user is gi)2.617 F -.15 +(ve)-.25 G 2.618(nt).15 G .118(he opportunity to re-edit a f)-2.618 F +.118(ailed his-)-.1 F(tory substitution.)184 144 Q F2(histv)144 156 Q +(erify)-.1 E F1 .403(If set, and)184 168 R F2 -.18(re)2.903 G(adline).18 +E F1 .403 +(is being used, the results of history substitution are not immediately) +2.903 F .661(passed to the shell parser)184 180 R 5.661(.I)-.55 G .662 +(nstead, the resulting line is loaded into the)-5.661 F F2 -.18(re)3.162 +G(adline).18 E F1(editing)3.162 E -.2(bu)184 192 S -.25(ff).2 G(er).25 E +2.5(,a)-.4 G(llo)-2.5 E(wing further modi\214cation.)-.25 E F2 +(hostcomplete)144 204 Q F1 1.182(If set, and)184 216 R F2 -.18(re)3.682 +G(adline).18 E F1 1.182(is being used,)3.682 F F2(bash)3.682 E F1 1.181 +(will attempt to perform hostname completion)3.681 F 1.38(when a w)184 +228 R 1.38(ord containing a)-.1 F F2(@)3.881 E F1 1.381 +(is being completed \(see)3.881 F F2(Completing)3.881 E F1(under)3.881 E +F3(READLINE)3.881 E F1(abo)184 240 Q -.15(ve)-.15 G 2.5(\). This).15 F +(is enabled by def)2.5 E(ault.)-.1 E F2(huponexit)144 252 Q F1(If set,) +184 264 Q F2(bash)2.5 E F1(will send)2.5 E F3(SIGHUP)2.5 E F1 +(to all jobs when an interacti)2.25 E .3 -.15(ve l)-.25 H(ogin shell e) +.15 E(xits.)-.15 E F2(inherit_err)144 276 Q(exit)-.18 E F1 .22 +(If set, command substitution inherits the v)184 288 R .219(alue of the) +-.25 F F2(err)2.719 E(exit)-.18 E F1 .219(option, instead of unsetting) +2.719 F(it in the subshell en)184 300 Q 2.5(vironment. This)-.4 F +(option is enabled when posix mode is enabled.)2.5 E F2(interacti)144 +312 Q -.1(ve)-.1 G(_comments).1 E F1 .208(In an interacti)184 324 R .508 +-.15(ve s)-.25 H .208(hell, a w).15 F .209(ord be)-.1 F .209 +(ginning with)-.15 F F2(#)2.709 E F1 .209(causes that w)2.709 F .209 +(ord and all remaining char)-.1 F(-)-.2 E .612 +(acters on that line to be ignored, as in a non-interacti)184 336 R .912 +-.15(ve s)-.25 H .612(hell \(see).15 F F3(COMMENTS)3.112 E F1(abo)2.862 +E -.15(ve)-.15 G(\).).15 E(This option is enabled by def)184 348 Q +(ault.)-.1 E F2(lastpipe)144 360 Q F1 .066 +(If set, and job control is not acti)184 360 R -.15(ve)-.25 G 2.566(,t) +.15 G .066(he shell runs the last command of a pipeline not e)-2.566 F +-.15(xe)-.15 G(-).15 E(cuted in the background in the current shell en) +184 372 Q(vironment.)-.4 E F2(lithist)144 384 Q F1 .655(If set, and the) +184 384 R F2(cmdhist)3.155 E F1 .654 +(option is enabled, multi-line commands are sa)3.154 F -.15(ve)-.2 G +3.154(dt).15 G 3.154(ot)-3.154 G .654(he history)-3.154 F +(with embedded ne)184 396 Q +(wlines rather than using semicolon separators where possible.)-.25 E F2 +(localv)144 408 Q(ar_inherit)-.1 E F1 .421(If set, local v)184 420 R +.422(ariables inherit the v)-.25 F .422(alue and attrib)-.25 F .422 +(utes of a v)-.2 F .422(ariable of the same name that)-.25 F -.15(ex)184 +432 S .174(ists at a pre).15 F .174(vious scope before an)-.25 F 2.673 +(yn)-.15 G .673 -.25(ew va)-2.673 H .173(lue is assigned.).25 F .173 +(The nameref attrib)5.173 F .173(ute is not)-.2 F(inherited.)184 444 Q +F2(localv)144 456 Q(ar_unset)-.1 E F1 .328(If set, calling)184 468 R F2 +(unset)2.828 E F1 .328(on local v)2.828 F .329(ariables in pre)-.25 F +.329(vious function scopes marks them so subse-)-.25 F .365 +(quent lookups \214nd them unset until that function returns.)184 480 R +.364(This is identical to the beha)5.364 F(v-)-.2 E +(ior of unsetting local v)184 492 Q +(ariables at the current function scope.)-.25 E F2(login_shell)144 504 Q +F1 .486 +(The shell sets this option if it is started as a login shell \(see)184 +516 R F3(INV)2.987 E(OCA)-.405 E(TION)-.855 E F1(abo)2.737 E -.15(ve) +-.15 G 2.987(\). The).15 F -.25(va)184 528 S(lue may not be changed.).25 +E F2(mailwar)144 540 Q(n)-.15 E F1 .815(If set, and a \214le that)184 +552 R F2(bash)3.315 E F1 .814 +(is checking for mail has been accessed since the last time it)3.315 F +-.1(wa)184 564 S 2.5(sc).1 G(heck)-2.5 E(ed,)-.1 E F2(bash)2.5 E F1 +(displays the message \231The mail in)2.5 E F0(mail\214le)2.5 E F1 +(has been read\232.)2.5 E F2(no_empty_cmd_completion)144 576 Q F1 .609 +(If set, and)184 588 R F2 -.18(re)3.109 G(adline).18 E F1 .609 +(is being used,)3.109 F F2(bash)3.109 E F1 .609(does not search)3.109 F +F3 -.666(PA)3.109 G(TH)-.189 E F1 .61(for possible completions)2.86 F +(when completion is attempted on an empty line.)184 600 Q F2(nocaseglob) +144 612 Q F1 .437(If set,)184 624 R F2(bash)2.937 E F1 .436 +(matches \214lenames in a case\255insensiti)2.937 F .736 -.15(ve f)-.25 +H .436(ashion when performing pathname).05 F -.15(ex)184 636 S +(pansion \(see).15 E F2 -.1(Pa)2.5 G(thname Expansion).1 E F1(abo)2.5 E +-.15(ve)-.15 G(\).).15 E F2(nocasematch)144 648 Q F1 1.193(If set,)184 +660 R F2(bash)3.693 E F1 1.194(matches patterns in a case\255insensiti) +3.693 F 1.494 -.15(ve f)-.25 H 1.194(ashion when performing matching).05 +F .551(while e)184 672 R -.15(xe)-.15 G(cuting).15 E F2(case)3.051 E F1 +(or)3.051 E F2([[)3.051 E F1 .551 +(conditional commands, when performing pattern substitution)3.051 F -.1 +(wo)184 684 S .622(rd e).1 F .623(xpansions, or when \214ltering possib\ +le completions as part of programmable com-)-.15 F(pletion.)184 696 Q +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(87)185.955 E 0 Cg EP +%%Page: 88 88 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(noexpand_translation)144 84 Q +F1 .67(If set,)184 96 R F2(bash)3.17 E F1 .669 +(encloses the translated results of)3.169 F F2($")3.169 E F1 1.666(...)C +F2(")-1.666 E F1 .669(quoting in single quotes instead of)3.169 F +(double quotes.)184 108 Q +(If the string is not translated, this has no ef)5 E(fect.)-.25 E F2 +(nullglob)144 120 Q F1 1.581(If set, pathname e)184 132 R 1.581 +(xpansion patterns which match no \214les \(see)-.15 F F2 -.1(Pa)4.081 G +1.581(thname Expansion).1 F F1(abo)184 144 Q -.15(ve)-.15 G 2.5(\)e).15 +G(xpand to nothing and are remo)-2.65 E -.15(ve)-.15 G(d, rather than e) +.15 E(xpanding to themselv)-.15 E(es.)-.15 E F2(patsub_r)144 156 Q +(eplacement)-.18 E F1 .106(If set,)184 168 R F2(bash)2.606 E F1 -.15(ex) +2.606 G .106(pands occurrences of).15 F F2(&)2.606 E F1 .105 +(in the replacement string of pattern substitution to)2.606 F .527 +(the te)184 180 R .527(xt matched by the pattern, as described under) +-.15 F F2 -.1(Pa)3.028 G .528(rameter Expansion).1 F F1(abo)3.028 E -.15 +(ve)-.15 G 5.528(.T).15 G(his)-5.528 E(option is enabled by def)184 192 +Q(ault.)-.1 E F2(pr)144 204 Q(ogcomp)-.18 E F1 .767 +(If set, enable the programmable completion f)184 216 R .766 +(acilities \(see)-.1 F F2(Pr)3.266 E .766(ogrammable Completion)-.18 F +F1(abo)184 228 Q -.15(ve)-.15 G 2.5(\). This).15 F +(option is enabled by def)2.5 E(ault.)-.1 E F2(pr)144 240 Q +(ogcomp_alias)-.18 E F1 2.124 +(If set, and programmable completion is enabled,)184 252 R F2(bash)4.624 +E F1 2.124(treats a command name that)4.624 F(doesn')184 264 Q 3.11(th) +-.18 G -2.25 -.2(av e)-3.11 H(an)3.31 E 3.11(yc)-.15 G .61 +(ompletions as a possible alias and attempts alias e)-3.11 F 3.11 +(xpansion. If)-.15 F .61(it has)3.11 F 1.473(an alias,)184 276 R F2 +(bash)3.973 E F1 1.473 +(attempts programmable completion using the command w)3.973 F 1.473 +(ord resulting)-.1 F(from the e)184 288 Q(xpanded alias.)-.15 E F2(pr) +144 300 Q(omptv)-.18 E(ars)-.1 E F1 1.448(If set, prompt strings under) +184 312 R 1.448(go parameter e)-.18 F 1.447 +(xpansion, command substitution, arithmetic)-.15 F -.15(ex)184 324 S .17 +(pansion, and quote remo).15 F -.25(va)-.15 G 2.67(la).25 G .17 +(fter being e)-2.67 F .17(xpanded as described in)-.15 F/F3 9 +/Times-Bold@0 SF(PR)2.671 E(OMPTING)-.27 E F1(abo)2.421 E -.15(ve)-.15 G +(.).15 E(This option is enabled by def)184 336 Q(ault.)-.1 E F2 -.18(re) +144 348 S(stricted_shell).18 E F1 1.069 +(The shell sets this option if it is started in restricted mode \(see) +184 360 R F3 1.069(RESTRICTED SHELL)3.569 F F1(belo)184 372 Q 2.86 +(w\). The)-.25 F -.25(va)2.86 G .36(lue may not be changed.).25 F .36 +(This is not reset when the startup \214les are e)5.36 F -.15(xe)-.15 G +(-).15 E(cuted, allo)184 384 Q(wing the startup \214les to disco)-.25 E +-.15(ve)-.15 G 2.5(rw).15 G(hether or not a shell is restricted.)-2.5 E +F2(shift_v)144 396 Q(erbose)-.1 E F1 .502(If set, the)184 408 R F2 +(shift)3.002 E F1 -.2(bu)3.002 G .501 +(iltin prints an error message when the shift count e).2 F .501 +(xceeds the number)-.15 F(of positional parameters.)184 420 Q F2(sour) +144 432 Q(cepath)-.18 E F1 .77(If set, the)184 444 R F2(.)3.27 E F1(\() +3.27 E F2(sour)A(ce)-.18 E F1 3.27(\)b)C .77(uiltin uses the v)-3.47 F +.771(alue of)-.25 F F3 -.666(PA)3.271 G(TH)-.189 E F1 .771 +(to \214nd the directory containing the)3.021 F .422 +(\214le supplied as an ar)184 456 R .422(gument when the)-.18 F F2 +2.921 E F1 .421(option is not supplied.)2.921 F .421 +(This option is enabled)5.421 F(by def)184 468 Q(ault.)-.1 E F2 -.1(va) +144 480 S(rr).1 E(edir_close)-.18 E F1 .74(If set, the shell automatica\ +lly closes \214le descriptors assigned using the)184 492 R F0({varname}) +3.24 E F1(redi-)3.24 E .424(rection syntax \(see)184 504 R F3 +(REDIRECTION)2.924 E F1(abo)2.674 E -.15(ve)-.15 G 2.924(\)i).15 G .424 +(nstead of lea)-2.924 F .424(ving them open when the com-)-.2 F +(mand completes.)184 516 Q F2(xpg_echo)144 528 Q F1 .073(If set, the)184 +540 R F2(echo)2.574 E F1 -.2(bu)2.574 G .074(iltin e).2 F .074 +(xpands backslash-escape sequences by def)-.15 F 2.574(ault. If)-.1 F +(the)2.574 E F2(posix)2.574 E F1(shell)2.574 E(option is also enabled,) +184 552 Q F2(echo)2.5 E F1(does not interpret an)2.5 E 2.5(yo)-.15 G +(ptions.)-2.5 E F2(suspend)108 568.8 Q F1([)2.5 E F2A F1(])A .91 +(Suspend the e)144 580.8 R -.15(xe)-.15 G .91 +(cution of this shell until it recei).15 F -.15(ve)-.25 G 3.41(sa).15 G +F3(SIGCONT)-.001 E F1 3.409(signal. A)3.159 F .909 +(login shell, or a shell)3.409 F 1.043 +(without job control enabled, cannot be suspended; the)144 592.8 R F2 +3.543 E F1 1.043(option will o)3.543 F -.15(ve)-.15 G 1.044 +(rride this and force the).15 F 2.744(suspension. The)144 604.8 R .244(\ +return status is 0 unless the shell is a login shell or job control is \ +not enabled and)2.744 F F2144 616.8 Q F1(is not supplied.)2.5 E F2 +(test)108 633.6 Q F0 -.2(ex)2.5 G(pr).2 E F2([)108 645.6 Q F0 -.2(ex)2.5 +G(pr).2 E F2(])2.5 E F1 .877(Return a status of 0 \(true\) or 1 \(f)144 +645.6 R .878(alse\) depending on the e)-.1 F -.25(va)-.25 G .878 +(luation of the conditional e).25 F(xpression)-.15 E F0 -.2(ex)144 657.6 +S(pr).2 E F1 5.53(.E).73 G .53 +(ach operator and operand must be a separate ar)-5.53 F 3.03 +(gument. Expressions)-.18 F .53(are composed of the)3.03 F 1.36 +(primaries described abo)144 669.6 R 1.66 -.15(ve u)-.15 H(nder).15 E F3 +(CONDITION)3.86 E 1.36(AL EXPRESSIONS)-.18 F/F4 9/Times-Roman@0 SF(.)A +F2(test)5.86 E F1 1.361(does not accept an)3.86 F 3.861(yo)-.15 G(p-) +-3.861 E(tions, nor does it accept and ignore an ar)144 681.6 Q +(gument of)-.18 E F22.5 E F1(as signifying the end of options.)2.5 +E .786(Expressions may be combined using the follo)144 698.4 R .785 +(wing operators, listed in decreasing order of prece-)-.25 F 2.93 +(dence. The)144 710.4 R -.25(eva)2.93 G .43 +(luation depends on the number of ar).25 F .43(guments; see belo)-.18 F +-.65(w.)-.25 G F2(test)6.08 E F1 .43(uses operator prece-)2.93 F +(dence when there are \214v)144 722.4 Q 2.5(eo)-.15 G 2.5(rm)-2.5 G +(ore ar)-2.5 E(guments.)-.18 E(GNU Bash 5.3)72 768 Q(2024 December 12) +136.795 E(88)185.955 E 0 Cg EP +%%Page: 89 89 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E/F2 10/Times-Bold@0 SF(!)144 84 Q F0 -.2(ex)2.5 G +(pr).2 E F1 -.35(Tr)180 84 S(ue if).35 E F0 -.2(ex)2.5 G(pr).2 E F1 +(is f)3.23 E(alse.)-.1 E F2(\()144 96 Q F0 -.2(ex)2.5 G(pr).2 E F2(\)) +2.5 E F1(Returns the v)180 96 Q(alue of)-.25 E F0 -.2(ex)2.5 G(pr).2 E +F1 5(.T)C(his may be used to o)-5 E -.15(ve)-.15 G +(rride normal operator precedence.).15 E F0 -.2(ex)144 108 S(pr1).2 E F1 +2.5 E F2(a)A F0 -.2(ex)2.5 G(pr2).2 E F1 -.35(Tr)180 120 S +(ue if both).35 E F0 -.2(ex)2.5 G(pr1).2 E F1(and)2.5 E F0 -.2(ex)2.5 G +(pr2).2 E F1(are true.)2.52 E F0 -.2(ex)144 132 S(pr1).2 E F12.5 E +F2(o)A F0 -.2(ex)2.5 G(pr2).2 E F1 -.35(Tr)180 144 S(ue if either).35 E +F0 -.2(ex)2.5 G(pr1).2 E F1(or)2.5 E F0 -.2(ex)2.5 G(pr2).2 E F1 +(is true.)2.52 E F2(test)144 160.8 Q F1(and)2.5 E F2([)2.5 E F1 -.25 +(eva)2.5 G(luate conditional e).25 E +(xpressions using a set of rules based on the number of ar)-.15 E +(guments.)-.18 E 2.5(0a)144 177.6 S -.18(rg)-2.5 G(uments).18 E(The e) +180 189.6 Q(xpression is f)-.15 E(alse.)-.1 E 2.5(1a)144 201.6 S -.18 +(rg)-2.5 G(ument).18 E(The e)180 213.6 Q +(xpression is true if and only if the ar)-.15 E(gument is not null.)-.18 +E 2.5(2a)144 225.6 S -.18(rg)-2.5 G(uments).18 E .37(If the \214rst ar) +180 237.6 R .37(gument is)-.18 F F2(!)2.87 E F1 2.87(,t)C .37(he e)-2.87 +F .37(xpression is true if and only if the second ar)-.15 F .37 +(gument is null.)-.18 F .379(If the \214rst ar)180 249.6 R .38 +(gument is one of the unary conditional operators listed abo)-.18 F .68 +-.15(ve u)-.15 H(nder).15 E/F3 9/Times-Bold@0 SF(CONDI-)2.88 E(TION)180 +261.6 Q .553(AL EXPRESSIONS)-.18 F/F4 9/Times-Roman@0 SF(,)A F1 .552 +(the e)2.802 F .552(xpression is true if the unary test is true.)-.15 F +.552(If the \214rst ar)5.552 F(gu-)-.18 E(ment is not a v)180 273.6 Q +(alid unary conditional operator)-.25 E 2.5(,t)-.4 G(he e)-2.5 E +(xpression is f)-.15 E(alse.)-.1 E 2.5(3a)144 285.6 S -.18(rg)-2.5 G +(uments).18 E .236(The follo)180 297.6 R .236 +(wing conditions are applied in the order listed.)-.25 F .236 +(If the second ar)5.236 F .236(gument is one of)-.18 F .855 +(the binary conditional operators listed abo)180 309.6 R 1.155 -.15 +(ve u)-.15 H(nder).15 E F3(CONDITION)3.355 E .855(AL EXPRESSIONS)-.18 F +F4(,)A F1(the)3.104 E .578(result of the e)180 321.6 R .578(xpression i\ +s the result of the binary test using the \214rst and third ar)-.15 F +(guments)-.18 E 1.333(as operands.)180 333.6 R(The)6.333 E F23.833 +E F1(and)3.833 E F23.832 E F1 1.332 +(operators are considered binary operators when there are)3.832 F .558 +(three ar)180 345.6 R 3.058(guments. If)-.18 F .558(the \214rst ar)3.058 +F .558(gument is)-.18 F F2(!)3.058 E F1 3.058(,t)C .558(he v)-3.058 F +.558(alue is the ne)-.25 F -.05(ga)-.15 G .558(tion of the tw).05 F +(o-ar)-.1 E(gument)-.18 E .521(test using the second and third ar)180 +357.6 R 3.021(guments. If)-.18 F .521(the \214rst ar)3.021 F .52 +(gument is e)-.18 F(xactly)-.15 E F2(\()3.02 E F1 .52(and the third)3.02 +F(ar)180 369.6 Q .485(gument is e)-.18 F(xactly)-.15 E F2(\))2.985 E F1 +2.985(,t)C .485(he result is the one-ar)-2.985 F .485 +(gument test of the second ar)-.18 F 2.985(gument. Other)-.18 F(-)-.2 E +(wise, the e)180 381.6 Q(xpression is f)-.15 E(alse.)-.1 E 2.5(4a)144 +393.6 S -.18(rg)-2.5 G(uments).18 E .43(The follo)180 405.6 R .43 +(wing conditions are applied in the order listed.)-.25 F .429 +(If the \214rst ar)5.429 F .429(gument is)-.18 F F2(!)2.929 E F1 2.929 +(,t)C .429(he re-)-2.929 F 1.314(sult is the ne)180 417.6 R -.05(ga)-.15 +G 1.314(tion of the three-ar).05 F 1.314(gument e)-.18 F 1.314 +(xpression composed of the remaining ar)-.15 F(gu-)-.18 E 2.902 +(ments. If)180 429.6 R .402(the \214rst ar)2.902 F .401(gument is e)-.18 +F(xactly)-.15 E F2(\()2.901 E F1 .401(and the fourth ar)2.901 F .401 +(gument is e)-.18 F(xactly)-.15 E F2(\))2.901 E F1 2.901(,t)C .401 +(he result is)-2.901 F 1.235(the tw)180 441.6 R(o-ar)-.1 E 1.236 +(gument test of the second and third ar)-.18 F 3.736 +(guments. Otherwise,)-.18 F 1.236(the e)3.736 F 1.236(xpression is)-.15 +F(parsed and e)180 453.6 Q -.25(va)-.25 G +(luated according to precedence using the rules listed abo).25 E -.15 +(ve)-.15 G(.).15 E 2.5(5o)144 465.6 S 2.5(rm)-2.5 G(ore ar)-2.5 E +(guments)-.18 E 1.635(The e)180 477.6 R 1.635(xpression is parsed and e) +-.15 F -.25(va)-.25 G 1.635 +(luated according to precedence using the rules listed).25 F(abo)180 +489.6 Q -.15(ve)-.15 G(.).15 E .163 +(When the shell is in posix mode, or if the e)144 506.4 R .163 +(xpression is part of the)-.15 F F2([[)2.663 E F1 .163(command, the) +2.663 F F2(<)2.663 E F1(and)2.663 E F2(>)2.663 E F1(opera-)2.663 E .669 +(tors sort using the current locale.)144 518.4 R .669 +(If the shell is not in posix mode, the)5.669 F F2(test)3.169 E F1(and) +3.169 E F2([)3.169 E F1 .668(commands sort)3.169 F(le)144 530.4 Q +(xicographically using ASCII ordering.)-.15 E .006 +(The historical operator)144 547.2 R .006 +(-precedence parsing with 4 or more ar)-.2 F .006 +(guments can lead to ambiguities when)-.18 F .632 +(it encounters strings that look lik)144 559.2 R 3.132(ep)-.1 G 3.132 +(rimaries. The)-3.132 F .632(POSIX standard has deprecated the)3.132 F +F23.132 E F1(and)3.132 E F23.132 E F1 .885 +(primaries and enclosing e)144 571.2 R .886 +(xpressions within parentheses.)-.15 F .886 +(Scripts should no longer use them.)5.886 F(It')5.886 E(s)-.55 E .066 +(much more reliable to restrict test in)144 583.2 R -.2(vo)-.4 G .066 +(cations to a single primary).2 F 2.566(,a)-.65 G .066 +(nd to replace uses of)-2.566 F F22.566 E F1(and)2.566 E F2 +2.566 E F1(with the shell')144 595.2 Q(s)-.55 E F2(&&)2.5 E F1(and)2.5 E +F2(||)2.5 E F1(list operators.)2.5 E F2(times)108 612 Q F1 1.229(Print \ +the accumulated user and system times for the shell and for processes r\ +un from the shell.)144 612 R(The return status is 0.)144 624 Q F2(trap) +108 640.8 Q F1([)2.5 E F2(\255lpP)A F1 2.5(][)C([)-2.5 E F0(action)A F1 +(])A F0(sigspec)2.5 E F1 1.666(...)2.5 G(])-1.666 E(The)144 652.8 Q F0 +(action)4.332 E F1 1.501(is a command that is read and e)4.242 F -.15 +(xe)-.15 G 1.501(cuted when the shell recei).15 F -.15(ve)-.25 G 4.001 +(sa).15 G 1.801 -.15(ny o)-4.001 H 4.001(ft).15 G 1.501(he signals) +-4.001 F F0(sigspec)144.34 664.8 Q F1 5.708(.I).31 G(f)-5.708 E F0 +(action)3.538 E F1 .709(is absent \(and there is a single)3.449 F F0 +(sigspec)3.209 E F1 3.209(\)o)C(r)-3.209 E F23.209 E F1 3.209(,e)C +.709(ach speci\214ed)-3.209 F F0(sigspec)3.209 E F1 .709(is reset to) +3.209 F .293(the v)144 676.8 R .292(alue it had when the shell w)-.25 F +.292(as started.)-.1 F(If)5.292 E F0(action)3.122 E F1 .292 +(is the null string the signal speci\214ed by each)3.032 F F0(sigspec) +144.34 688.8 Q F1(is ignored by the shell and by the commands it in)2.81 +E -.2(vo)-.4 G -.1(ke).2 G(s.).1 E .165(If no ar)144 705.6 R .165 +(guments are supplied,)-.18 F F2(trap)2.665 E F1 .165 +(displays the actions associated with each trapped signal as a set)2.665 +F(of)144 717.6 Q F2(trap)2.57 E F1 .069(commands that can be reused as \ +shell input to restore the current signal dispositions.)2.57 F(If)5.069 +E F22.569 E F1 .473(is gi)144 729.6 R -.15(ve)-.25 G .473(n, and) +.15 F F0(action)3.303 E F1 .473(is not present, then)3.213 F F2(trap) +2.973 E F1 .473(displays the actions associated with each)2.973 F F0 +(sigspec)3.314 E F1(or)3.284 E(,)-.4 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(89)185.955 E 0 Cg EP +%%Page: 90 90 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .364 +(if none are supplied, for all trapped signals, as a set of)144 84 R/F2 +10/Times-Bold@0 SF(trap)2.864 E F1 .363 +(commands that can be reused as shell)2.864 F .207 +(input to restore the current signal dispositions.)144 96 R(The)5.207 E +F22.707 E F1 .207(option beha)2.707 F -.15(ve)-.2 G 2.707(ss).15 G +(imilarly)-2.707 E 2.707(,b)-.65 G .208(ut displays only)-2.907 F 1.553 +(the actions associated with each)144 108 R F0(sigspec)4.052 E F1(ar) +4.052 E(gument.)-.18 E F26.552 E F1 1.552(requires at least one) +4.052 F F0(sigspec)4.052 E F1(ar)4.052 E(gument.)-.18 E(The)144 120 Q F2 +2.779 E F1(or)2.779 E F22.779 E F1 .279 +(options may be used in a subshell en)2.779 F .28 +(vironment \(e.g., command substitution\) and, as)-.4 F .239 +(long as the)144 132 R 2.739(ya)-.15 G .239(re used before)-2.739 F F2 +(trap)2.739 E F1 .238(is used to change a signal')2.739 F 2.738(sh)-.55 +G .238(andling, will display the state of its)-2.738 F(parent')144 144 Q +2.5(st)-.55 G(raps.)-2.5 E(The)144 160.8 Q F22.515 E F1 .016 +(option prints a list of signal names and their corresponding numbers.) +2.515 F(Each)5.016 E F0(sigspec)2.856 E F1 .016(is either)2.826 F 2.615 +(as)144 172.8 S .115(ignal name de\214ned in <)-2.615 F F0(signal.h)A F1 +.114(>, or a signal number)B 5.114(.S)-.55 G .114 +(ignal names are case insensiti)-5.114 F .414 -.15(ve a)-.25 H .114 +(nd the).15 F/F3 9/Times-Bold@0 SF(SIG)144 184.8 Q F1 .782 +(pre\214x is optional.)3.032 F(If)5.782 E F23.282 E F1 .782 +(is supplied with no)3.282 F F0(sigspec)3.282 E F1(ar)3.282 E .783 +(guments, it prints a list of v)-.18 F .783(alid signal)-.25 F(names.) +144 196.8 Q .017(If a)144 213.6 R F0(sigspec)2.857 E F1(is)2.827 E F3 +(EXIT)2.517 E F1(\(0\),)2.267 E F0(action)2.847 E F1 .017(is e)2.757 F +-.15(xe)-.15 G .017(cuted on e).15 F .016(xit from the shell.)-.15 F +.016(If a)5.016 F F0(sigspec)2.856 E F1(is)2.826 E F3(DEB)2.516 E(UG) +-.09 E/F4 9/Times-Roman@0 SF(,)A F0(action)2.596 E F1(is)2.756 E -.15 +(exe)144 225.6 S .797(cuted before e).15 F -.15(ve)-.25 G(ry).15 E F0 +.797(simple command)3.297 F F1(,)A F0(for)3.297 E F1(command,)3.297 E F0 +(case)3.298 E F1(command,)3.298 E F0(select)3.298 E F1 .798 +(command, \(\( arith-)3.298 F .574 +(metic command, [[ conditional command, arithmetic)144 237.6 R F0(for) +3.073 E F1 .573(command, and before the \214rst command)3.073 F -.15 +(exe)144 249.6 S 1.98(cutes in a shell function \(see).15 F F3 1.98 +(SHELL GRAMMAR)4.48 F F1(abo)4.23 E -.15(ve)-.15 G 4.48(\). Refer).15 F +1.98(to the description of the)4.48 F F2(extdeb)144 261.6 Q(ug)-.2 E F1 +.385(shell option \(see)2.885 F F2(shopt)2.884 E F1(abo)2.884 E -.15(ve) +-.15 G 2.884(\)f).15 G .384(or details of its ef)-2.884 F .384 +(fect on the)-.25 F F2(DEB)2.884 E(UG)-.1 E F1 2.884(trap. If)2.884 F(a) +2.884 E F0(sigspec)3.224 E F1(is)144 273.6 Q F3(RETURN)2.802 E F4(,)A F0 +(action)2.882 E F1 .302(is e)3.042 F -.15(xe)-.15 G .302 +(cuted each time a shell function or a script e).15 F -.15(xe)-.15 G +.303(cuted with the).15 F F2(.)2.803 E F1(or)2.803 E F2(sour)2.803 E(ce) +-.18 E F1 -.2(bu)144 285.6 S(iltins \214nishes e).2 E -.15(xe)-.15 G +(cuting.).15 E .349(If a)144 302.4 R F0(sigspec)3.189 E F1(is)3.159 E F3 +(ERR)2.849 E F4(,)A F0(action)2.929 E F1 .349(is e)3.089 F -.15(xe)-.15 +G .349(cuted whene).15 F -.15(ve)-.25 G 2.849(rap).15 G .349 +(ipeline \(which may consist of a single simple)-2.849 F .164 +(command\), a list, or a compound command returns a non\255zero e)144 +314.4 R .165(xit status, subject to the follo)-.15 F(wing)-.25 E 2.577 +(conditions. The)144 326.4 R F3(ERR)2.577 E F1 .077(trap is not e)2.327 +F -.15(xe)-.15 G .077(cuted if the f).15 F .076 +(ailed command is part of the command list imme-)-.1 F .506 +(diately follo)144 338.4 R .506(wing a)-.25 F F2(while)3.006 E F1(or) +3.006 E F2(until)3.006 E F1 -.1(ke)3.006 G(yw)-.05 E .506 +(ord, part of the test in an)-.1 F F0(if)3.016 E F1 .506 +(statement, part of a command)4.966 F -.15(exe)144 350.4 S .807 +(cuted in a).15 F F2(&&)3.307 E F1(or)3.307 E F2(||)3.307 E F1 .807 +(list e)3.307 F .807(xcept the command follo)-.15 F .807 +(wing the \214nal)-.25 F F2(&&)3.307 E F1(or)3.307 E F2(||)3.307 E F1 +3.307(,a)C 1.106 -.15(ny c)-3.307 H .806(ommand in a).15 F .758 +(pipeline b)144 362.4 R .758(ut the last \(subject to the state of the) +-.2 F F2(pipefail)3.258 E F1 .759(shell option\), or if the command') +3.258 F 3.259(sr)-.55 G(eturn)-3.259 E -.25(va)144 374.4 S +(lue is being in).25 E -.15(ve)-.4 G(rted using).15 E F2(!)2.5 E F1 5 +(.T)C(hese are the same conditions obe)-5 E(yed by the)-.15 E F2(err)2.5 +E(exit)-.18 E F1(\()2.5 E F2A F1 2.5(\)o)C(ption.)-2.5 E .07 +(When the shell is not interacti)144 391.2 R -.15(ve)-.25 G 2.57(,s).15 +G .069 +(ignals ignored upon entry to the shell cannot be trapped or reset.) +-2.57 F(Interacti)144 403.2 Q .951 -.15(ve s)-.25 H .651 +(hells permit trapping signals ignored on entry).15 F 5.651(.T)-.65 G +.652(rapped signals that are not being ig-)-6.001 F .577 +(nored are reset to their original v)144 415.2 R .576 +(alues in a subshell or subshell en)-.25 F .576 +(vironment when one is created.)-.4 F(The return status is f)144 427.2 Q +(alse if an)-.1 E(y)-.15 E F0(sigspec)2.84 E F1(is in)2.81 E -.25(va)-.4 +G(lid; otherwise).25 E F2(trap)2.5 E F1(returns true.)2.5 E F2(true)108 +444 Q F1(Does nothing, returns a 0 status.)144 444 Q F2(type)108 460.8 Q +F1([)2.5 E F2(\255aftpP)A F1(])A F0(name)2.5 E F1([)2.5 E F0(name)A F1 +1.666(...)2.5 G(])-1.666 E(Indicate ho)144 472.8 Q 2.5(we)-.25 G(ach) +-2.5 E F0(name)2.86 E F1 -.1(wo)2.68 G +(uld be interpreted if used as a command name.).1 E .8(If the)144 489.6 +R F23.3 E F1 .8(option is used,)3.3 F F2(type)3.3 E F1 .801 +(prints a string which is one of)3.3 F F0(alias)3.631 E F1(,).27 E F0 +-.1(ke)3.301 G(ywor)-.2 E(d)-.37 E F1(,).77 E F0(function)5.271 E F1(,) +.24 E F0 -.2(bu)3.301 G(iltin).2 E F1 3.301(,o).24 G(r)-3.301 E F0 +(\214le)145.91 501.6 Q F1(if)3.622 E F0(name)3.802 E F1 .942 +(is an alias, shell reserv)3.622 F .942(ed w)-.15 F .942 +(ord, function, b)-.1 F .942(uiltin, or e)-.2 F -.15(xe)-.15 G .942 +(cutable \214le, respecti).15 F -.15(ve)-.25 G(ly).15 E 5.942(.I)-.65 G +(f)-5.942 E(the)144 513.6 Q F0(name)2.86 E F1(is not found,)2.68 E F2 +(type)2.5 E F1(prints nothing and returns a non-zero e)2.5 E +(xit status.)-.15 E 1.482(If the)144 530.4 R F23.982 E F1 1.482 +(option is used,)3.982 F F2(type)3.982 E F1 1.482 +(either returns the pathname of the e)3.982 F -.15(xe)-.15 G 1.483 +(cutable \214le that w).15 F 1.483(ould be)-.1 F .441 +(found by searching)144 542.4 R F2($P)2.941 E -.95(AT)-.74 G(H).95 E F1 +(for)2.941 E F0(name)3.301 E F1 .441 +(or nothing if \231type \255t name\232 w)3.121 F .44(ould not return)-.1 +F F0(\214le)4.85 E F1 5.44(.T).18 G(he)-5.44 E F22.94 E F1 .205 +(option forces a)144 554.4 R F3 -.666(PA)2.705 G(TH)-.189 E F1 .205 +(search for each)2.455 F F0(name)2.705 E F1 2.705(,e)C -.15(ve)-2.955 G +2.705(ni).15 G 2.706<6699>-2.705 G .206(type \255t name\232 w)-2.706 F +.206(ould not return)-.1 F F0(\214le)4.616 E F1 5.206(.I).18 G(f)-5.206 +E F0(name)2.706 E F1 .242(is present in the table of hashed commands,) +144 566.4 R F22.742 E F1(and)2.742 E F22.742 E F1 .241 +(print the hashed v)2.742 F .241(alue, which is not neces-)-.25 F +(sarily the \214le that appears \214rst in)144 578.4 Q F3 -.666(PA)2.5 G +(TH)-.189 E F4(.)A F1 .652(If the)144 595.2 R F23.152 E F1 .652 +(option is used,)3.152 F F2(type)3.153 E F1 .653 +(prints all of the places that contain a command named)3.153 F F0(name) +3.513 E F1 5.653(.T).18 G(his)-5.653 E .736(includes aliases, reserv)144 +607.2 R .736(ed w)-.15 F .736(ords, functions, and b)-.1 F .736 +(uiltins, b)-.2 F .736(ut the path search options \()-.2 F F2A F1 +(and)3.235 E F23.235 E F1(\))A .291 +(can be supplied to restrict the output to e)144 619.2 R -.15(xe)-.15 G +.292(cutable \214les.).15 F F2(type)5.292 E F1 .292 +(does not consult the table of hashed)2.792 F(commands when using)144 +631.2 Q F22.5 E F1(with)2.5 E F22.5 E F1 2.5(,a)C +(nd only performs a)-2.5 E F3 -.666(PA)2.5 G(TH)-.189 E F1(search for) +2.25 E F0(name)2.5 E F1(.)A(The)144 648 Q F22.758 E F1 .257 +(option suppresses shell function lookup, as with the)2.758 F F2 +(command)2.757 E F1 -.2(bu)2.757 G(iltin.).2 E F2(type)5.257 E F1 .257 +(returns true if)2.757 F(all of the ar)144 660 Q(guments are found, f) +-.18 E(alse if an)-.1 E 2.5(ya)-.15 G(re not found.)-2.5 E F2(ulimit)108 +676.8 Q F1([)2.5 E F2(\255HS)A F1(])A F22.5 E(ulimit)108 688.8 Q +F1([)2.5 E F2(\255HS)A F1 2.5(][)C F2(\255bcde\214klmnpqrstuvxPR)-2.5 E +(T)-.4 E F1([)2.5 E F0(limit)A F1(]])A(Pro)144 700.8 Q .278 +(vides control o)-.15 F -.15(ve)-.15 G 2.778(rt).15 G .278 +(he resources a)-2.778 F -.25(va)-.2 G .278 +(ilable to the shell and to processes it starts, on systems that).25 F +(allo)144 712.8 Q 2.5(ws)-.25 G(uch control.)-2.5 E(GNU Bash 5.3)72 768 +Q(2024 December 12)136.795 E(90)185.955 E 0 Cg EP +%%Page: 91 91 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(The)144 84 Q/F2 10/Times-Bold@0 SF2.694 E F1 +(and)2.694 E F22.694 E F1 .193 +(options specify whether the hard or soft limit is set for the gi)2.693 +F -.15(ve)-.25 G 2.693(nr).15 G 2.693(esource. A)-2.693 F(hard)2.693 E +.497(limit cannot be increased by a non-root user once it is set; a sof\ +t limit may be increased up to the)144 96 R -.25(va)144 108 S +(lue of the hard limit.).25 E(If neither)5 E F22.5 E F1(nor)2.5 E +F22.5 E F1(is speci\214ed,)2.5 E F2(ulimit)2.5 E F1 +(sets both the soft and hard limits.)2.5 E .402(The v)144 124.8 R .402 +(alue of)-.25 F F0(limit)2.992 E F1 .402(can be a number in the unit sp\ +eci\214ed for the resource or one of the special v)3.582 F(al-)-.25 E +(ues)144 136.8 Q F2(hard)3.018 E F1(,)A F2(soft)3.018 E F1 3.018(,o)C(r) +-3.018 E F2(unlimited)3.018 E F1 3.018(,w)C .518 +(hich stand for the current hard limit, the current soft limit, and no) +-3.018 F 1.056(limit, respecti)144 148.8 R -.15(ve)-.25 G(ly).15 E 6.056 +(.I)-.65 G(f)-6.056 E F0(limit)3.646 E F1 1.056(is omitted,)4.236 F F2 +(ulimit)3.555 E F1 1.055(prints the current v)3.555 F 1.055 +(alue of the soft limit of the re-)-.25 F .636(source, unless the)144 +160.8 R F23.137 E F1 .637(option is gi)3.137 F -.15(ve)-.25 G +3.137(n. When).15 F .637 +(more than one resource is speci\214ed, the limit name)3.137 F +(and unit, if appropriate, are printed before the v)144 172.8 Q 2.5 +(alue. Other)-.25 F(options are interpreted as follo)2.5 E(ws:)-.25 E F2 +144 184.8 Q F1(Report all current limits; no limits are set.)180 +184.8 Q F2144 196.8 Q F1(The maximum sock)180 196.8 Q(et b)-.1 E +(uf)-.2 E(fer size.)-.25 E F2144 208.8 Q F1 +(The maximum size of core \214les created.)180 208.8 Q F2144 220.8 +Q F1(The maximum size of a process')180 220.8 Q 2.5(sd)-.55 G(ata se) +-2.5 E(gment.)-.15 E F2144 232.8 Q F1 +(The maximum scheduling priority \(\231nice\232\).)180 232.8 Q F2 +144 244.8 Q F1 +(The maximum size of \214les written by the shell and its children.)180 +244.8 Q F2144 256.8 Q F1(The maximum number of pending signals.) +180 256.8 Q F2144 268.8 Q F1 +(The maximum number of kqueues that may be allocated.)180 268.8 Q F2 +144 280.8 Q F1(The maximum size that may be lock)180 280.8 Q +(ed into memory)-.1 E(.)-.65 E F2144 292.8 Q F1 +(The maximum resident set size \(man)180 292.8 Q 2.5(ys)-.15 G +(ystems do not honor this limit\).)-2.5 E F2144 304.8 Q F1 .791(T\ +he maximum number of open \214le descriptors \(most systems do not allo) +180 304.8 R 3.29(wt)-.25 G .79(his v)-3.29 F .79(alue to)-.25 F +(be set\).)180 316.8 Q F2144 328.8 Q F1 +(The pipe size in 512-byte blocks \(this may not be set\).)180 328.8 Q +F2144 340.8 Q F1 +(The maximum number of bytes in POSIX message queues.)180 340.8 Q F2 +144 352.8 Q F1(The maximum real-time scheduling priority)180 352.8 +Q(.)-.65 E F2144 364.8 Q F1(The maximum stack size.)180 364.8 Q F2 +144 376.8 Q F1(The maximum amount of cpu time in seconds.)180 +376.8 Q F2144 388.8 Q F1(The maximum number of processes a)180 +388.8 Q -.25(va)-.2 G(ilable to a single user).25 E(.)-.55 E F2144 +400.8 Q F1 .47(The maximum amount of virtual memory a)180 400.8 R -.25 +(va)-.2 G .47(ilable to the shell and, on some systems, to).25 F +(its children.)180 412.8 Q F2144 424.8 Q F1 +(The maximum number of \214le locks.)180 424.8 Q F2144 436.8 Q F1 +(The maximum number of pseudoterminals.)180 436.8 Q F2144 448.8 Q +F1(The maximum time a real-time process can run before blocking, in mic\ +roseconds.)180 448.8 Q F2144 460.8 Q F1 +(The maximum number of threads.)180 460.8 Q(If)144 477.6 Q F0(limit) +3.062 E F1 .471(is supplied, and the)3.651 F F22.971 E F1 .471 +(option is not used,)2.971 F F0(limit)2.971 E F1 .471(is the ne)2.971 F +2.971(wv)-.25 G .471(alue of the speci\214ed resource.)-3.221 F +(If no option is supplied, then)144 489.6 Q F22.5 E F1 +(is assumed.)2.5 E -1.11(Va)144 506.4 S .388 +(lues are in 1024-byte increments, e)1.11 F .388(xcept for)-.15 F F2 +2.888 E F1 2.888(,w)C .388(hich is in seconds;)-2.888 F F2 +2.888 E F1 2.888(,w)C .389(hich is in microsec-)-2.888 F(onds;)144 518.4 +Q F23.287 E F1 3.287(,w)C .787 +(hich is in units of 512-byte blocks;)-3.287 F F23.287 E F1(,)A F2 +3.287 E F1(,)A F23.287 E F1(,)A F23.287 E F1(,)A F2 +3.286 E F1 3.286(,a)C(nd)-3.286 E F23.286 E F1 3.286(,w)C +.786(hich are unscaled)-3.286 F -.25(va)144 530.4 S .498 +(lues; and, when in posix mode,).25 F F22.998 E F1(and)2.998 E F2 +2.998 E F1 2.998(,w)C .498(hich are in 512-byte increments.)-2.998 +F .499(The return status)5.498 F(is 0 unless an in)144 542.4 Q -.25(va) +-.4 G(lid option or ar).25 E +(gument is supplied, or an error occurs while setting a ne)-.18 E 2.5 +(wl)-.25 G(imit.)-2.5 E F2(umask)108 559.2 Q F1([)2.5 E F2A F1 2.5 +(][)C F2-2.5 E F1 2.5(][)C F0(mode)-2.5 E F1(])A .792 +(Set the user \214le-creation mask to)144 571.2 R F0(mode)3.672 E F1 +5.792(.I).18 G(f)-5.792 E F0(mode)3.672 E F1(be)3.472 E .791 +(gins with a digit, it is interpreted as an octal)-.15 F .066(number; o\ +therwise it is interpreted as a symbolic mode mask similar to that acce\ +pted by)144 583.2 R F0 -.15(ch)2.566 G(mod).15 E F1(\(1\).).77 E(If)144 +595.2 Q F0(mode)3.032 E F1 .152(is omitted,)2.832 F F2(umask)2.652 E F1 +.152(prints the current v)2.652 F .152(alue of the mask.)-.25 F(The) +5.152 E F22.651 E F1 .151(option without a)2.651 F F0(mode)2.651 E +F1(ar)2.651 E(-)-.2 E .394 +(gument prints the mask in a symbolic format; the def)144 607.2 R .394 +(ault output is an octal number)-.1 F 5.394(.I)-.55 G 2.894(ft)-5.394 G +(he)-2.894 E F22.894 E F1(op-)2.894 E .329(tion is supplied, and) +144 619.2 R F0(mode)3.209 E F1 .329 +(is omitted, the output is in a form that may be reused as input.)3.009 +F .329(The re-)5.329 F .15(turn status is zero if the mode w)144 631.2 R +.151(as successfully changed or if no)-.1 F F0(mode)2.651 E F1(ar)2.651 +E .151(gument w)-.18 F .151(as supplied, and)-.1 F(non-zero otherwise.) +144 643.2 Q F2(unalias)108 660 Q F1<5bad>2.5 E F2(a)A F1 2.5(][)C F0 +(name)-2.5 E F1 1.666(...)2.5 G(])-1.666 E(Remo)144 672 Q .707 -.15 +(ve e)-.15 H(ach).15 E F0(name)2.907 E F1 .406 +(from the list of de\214ned aliases.)2.907 F(If)5.406 E F22.906 E +F1 .406(is supplied, remo)2.906 F .706 -.15(ve a)-.15 H .406 +(ll alias de\214nitions.).15 F(The return v)144 684 Q +(alue is true unless a supplied)-.25 E F0(name)2.86 E F1 +(is not a de\214ned alias.)2.68 E F2(unset)108 700.8 Q F1<5bad>2.5 E F2 +(fv)A F1 2.5(][)C-2.5 E F2(n)A F1 2.5(][)C F0(name)-2.5 E F1 1.666 +(...)2.5 G(])-1.666 E -.15(Fo)144 712.8 S 3.803(re).15 G(ach)-3.803 E F0 +(name)4.163 E F1 3.803(,r).18 G(emo)-3.803 E 1.603 -.15(ve t)-.15 H +1.303(he corresponding v).15 F 1.303(ariable or function.)-.25 F 1.303 +(If the)6.303 F F23.804 E F1 1.304(option is gi)3.804 F -.15(ve) +-.25 G 1.304(n, each).15 F F0(name)144.36 724.8 Q F1 .069 +(refers to a shell v)2.749 F .069(ariable, and that v)-.25 F .069 +(ariable is remo)-.25 F -.15(ve)-.15 G 2.569(d. If).15 F F22.569 E +F1 .069(is speci\214ed, each)2.569 F F0(name)2.929 E F1 .068(refers to) +2.748 F(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(91)185.955 E 0 +Cg EP +%%Page: 92 92 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E 2.565(as)144 84 S .065 +(hell function, and the function de\214nition is remo)-2.565 F -.15(ve) +-.15 G 2.566(d. If).15 F(the)2.566 E/F2 10/Times-Bold@0 SF2.566 E +F1 .066(option is supplied, and)2.566 F F0(name)2.566 E F1 .066(is a) +2.566 F -.25(va)144 96 S .875(riable with the).25 F F0(namer)3.375 E(ef) +-.37 E F1(attrib)3.375 E(ute,)-.2 E F0(name)3.375 E F1 .875 +(will be unset rather than the v)3.375 F .874(ariable it references.) +-.25 F F25.874 E F1 1.216(has no ef)144 108 R 1.216(fect if the) +-.25 F F23.716 E F1 1.216(option is supplied.)3.716 F 1.216 +(Read-only v)6.216 F 1.217(ariables and functions may not be unset.)-.25 +F .714(When v)144 120 R .714(ariables or functions are remo)-.25 F -.15 +(ve)-.15 G .714(d, the).15 F 3.214(ya)-.15 G .714(re also remo)-3.214 F +-.15(ve)-.15 G 3.213(df).15 G .713(rom the en)-3.213 F .713 +(vironment passed to)-.4 F 1.003(subsequent commands.)144 132 R 1.003 +(If no options are supplied, each)6.003 F F0(name)3.503 E F1 1.003 +(refers to a v)3.503 F 1.003(ariable; if there is no)-.25 F -.25(va)144 +144 S .177(riable by that name, a function with that name, if an).25 F +1.477 -.65(y, i)-.15 H 2.677(su).65 G 2.676(nset. Some)-2.677 F .176 +(shell v)2.676 F .176(ariables may not be)-.25 F 2.804(unset. If)144 156 +R(an)2.804 E 2.804(yo)-.15 G(f)-2.804 E/F3 9/Times-Bold@0 SF -.27(BA) +2.804 G(SH_ALIASES).27 E/F4 9/Times-Roman@0 SF(,)A F3 -.27(BA)2.554 G +(SH_ARGV0).27 E F4(,)A F3 -.27(BA)2.554 G(SH_CMDS).27 E F4(,)A F3 -.27 +(BA)2.555 G(SH_COMMAND).27 E F4(,)A F3 -.27(BA)2.555 G(SH_SUB-).27 E +(SHELL)144 168 Q F4(,)A F3 -.27(BA)2.79 G(SHPID).27 E F4(,)A F3(COMP_W) +2.79 E(ORDBREAKS)-.09 E F4(,)A F3(DIRST)2.79 E -.495(AC)-.81 G(K).495 E +F4(,)A F3(EPOCHREAL)2.79 E(TIME)-.828 E F4(,)A F3(EPOCHSECONDS)2.79 E F4 +(,)A F3(FUNCN)144 180 Q(AME)-.18 E F4(,)A F3(GR)4.367 E(OUPS)-.27 E F4 +(,)A F3(HISTCMD)4.368 E F4(,)A F3(LINENO)4.368 E F4(,)A F3(RANDOM)4.368 +E F4(,)A F3(SECONDS)4.368 E F4(,)A F1(or)4.368 E F3(SRANDOM)4.618 E F1 +2.118(are unset,)4.368 F(the)144 192 Q 2.742(yl)-.15 G .242 +(ose their special properties, e)-2.742 F -.15(ve)-.25 G 2.741(ni).15 G +2.741(ft)-2.741 G(he)-2.741 E 2.741(ya)-.15 G .241 +(re subsequently reset.)-2.741 F .241(The e)5.241 F .241 +(xit status is true unless)-.15 F(a)144 204 Q F0(name)2.86 E F1 +(is readonly or may not be unset.)2.68 E F2(wait)108 220.8 Q F1([)2.5 E +F2(\255fn)A F1 2.5(][)C F2-2.5 E F0(varname)2.5 E F1 2.5(][)C F0 +(id)-2.5 E F1 1.666(...)2.5 G(])-1.666 E -.8(Wa)144 232.8 S 1.008 +(it for each speci\214ed child process).8 F F0(id)3.508 E F1 1.008 +(and return the termination status of the last)3.508 F F0(id)3.509 E F1 +6.009(.E)C(ach)-6.009 E F0(id)3.509 E F1 .5(may be a process ID)144 +244.8 R F0(pid)3 E F1 .5(or a job speci\214cation)3 F F0(jobspec)2.999 E +F1 2.999(;i)C 2.999(faj)-2.999 G .499(obspec is supplied,)-2.999 F F2 +(wait)2.999 E F1 -.1(wa)2.999 G .499(its for all).1 F +(processes in the job)144 256.8 Q(.)-.4 E .386(If no options or)144 +273.6 R F0(id)2.886 E F1 2.886(sa)C .386(re supplied,)-2.886 F F2(wait) +2.886 E F1 -.1(wa)2.886 G .386 +(its for all running background jobs and the last-e).1 F -.15(xe)-.15 G +(cuted).15 E(process substitution, if its process id is the same as)144 +285.6 Q F2($!)2.5 E F1 2.5(,a)C(nd the return status is zero.)-2.5 E .47 +(If the)144 302.4 R F22.97 E F1 .47(option is supplied,)2.97 F F2 +(wait)2.97 E F1 -.1(wa)2.97 G .47(its for an).1 F 2.97(yo)-.15 G .47 +(ne of the gi)-2.97 F -.15(ve)-.25 G(n).15 E F0(id)2.97 E F1 2.97(so)C +1.27 -.4(r, i)-2.97 H 2.97(fn).4 G(o)-2.97 E F0(id)2.97 E F1 2.97(sa)C +.47(re supplied, an)-2.97 F(y)-.15 E .481 +(job or process substitution, to complete and returns its e)144 314.4 R +.482(xit status.)-.15 F .482(If none of the supplied)5.482 F F0(id)2.982 +E F1 2.982(si)C 2.982(sa)-2.982 G .376(child of the shell, or if no)144 +326.4 R F0(id)2.876 E F1 2.876(sa)C .376 +(re supplied and the shell has no unw)-2.876 F .375 +(aited-for children, the e)-.1 F .375(xit sta-)-.15 F(tus is 127.)144 +338.4 Q .346(If the)144 355.2 R F22.846 E F1 .347 +(option is supplied,)2.846 F F2(wait)2.847 E F1 .347 +(assigns the process or job identi\214er of the job for which the e) +2.847 F(xit)-.15 E .006(status is returned to the v)144 367.2 R(ariable) +-.25 E F0(varname)2.506 E F1 .006(named by the option ar)2.506 F 2.506 +(gument. The)-.18 F -.25(va)2.506 G .006(riable, which can-).25 F .224 +(not be readonly)144 379.2 R 2.724(,w)-.65 G .224 +(ill be unset initially)-2.724 F 2.724(,b)-.65 G .224(efore an)-2.724 F +2.724(ya)-.15 G 2.724(ssignment. This)-2.724 F .225 +(is useful only when used with)2.725 F(the)144 391.2 Q F22.5 E F1 +(option.)2.5 E .533(Supplying the)144 408 R F23.033 E F1 .533 +(option, when job control is enabled, forces)3.033 F F2(wait)3.033 E F1 +.533(to w)3.033 F .533(ait for each)-.1 F F0(id)3.033 E F1 .532 +(to terminate)3.033 F(before returning its status, instead of returning\ + when it changes status.)144 420 Q .311(If none of the)144 436.8 R F0 +(id)2.811 E F1 2.811(ss)C .311(pecify one of the shell')-2.811 F 2.811 +(sa)-.55 G(cti)-2.811 E .611 -.15(ve c)-.25 H .311 +(hild processes, the return status is 127.).15 F(If)5.311 E F2(wait) +2.812 E F1 .153(is interrupted by a signal, an)144 448.8 R(y)-.15 E F0 +(varname)2.653 E F1 .153 +(will remain unset, and the return status will be greater than)2.653 F +.21(128, as described under)144 460.8 R F2(SIGN)2.71 E(ALS)-.2 E F1(abo) +2.71 E -.15(ve)-.15 G 5.21(.O).15 G .21 +(therwise, the return status is the e)-5.21 F .21 +(xit status of the last)-.15 F F0(id)144 472.8 Q F1(.)A/F5 10.95 +/Times-Bold@0 SF(SHELL COMP)72 489.6 Q -1.04(AT)-.81 G(IBILITY MODE)1.04 +E F1 1.355(Bash-4.0 introduced the concept of a)108 501.6 R F0 1.355 +(shell compatibility le)3.855 F(vel)-.15 E F1 3.855(,s)C 1.354 +(peci\214ed as a set of options to the shopt)-3.855 F -.2(bu)108 513.6 S +.621(iltin \().2 F F2(compat31)A F1(,)A F2(compat32)3.121 E F1(,)A F2 +(compat40)3.121 E F1(,)A F2(compat41)3.121 E F1 3.121(,a)C .621 +(nd so on\).)-3.121 F .622(There is only one current compatibility)5.622 +F(le)108 525.6 Q -.15(ve)-.25 G 3.058<6c8a>.15 G .557 +(each option is mutually e)-.001 F(xclusi)-.15 E -.15(ve)-.25 G 5.557 +(.T).15 G .557(he compatibility le)-5.557 F -.15(ve)-.25 G 3.057(li).15 +G 3.057(si)-3.057 G .557(ntended to allo)-3.057 F 3.057(wu)-.25 G .557 +(sers to select be-)-3.057 F(ha)108 537.6 Q 1.083(vior from pre)-.2 F +1.083(vious v)-.25 F 1.083(ersions that is incompatible with ne)-.15 F +1.083(wer v)-.25 F 1.083(ersions while the)-.15 F 3.584(ym)-.15 G 1.084 +(igrate scripts to use)-3.584 F(current features and beha)108 549.6 Q +(vior)-.2 E 5(.I)-.55 G(t')-5 E 2.5(si)-.55 G +(ntended to be a temporary solution.)-2.5 E 1.457 +(This section does not mention beha)108 566.4 R 1.457 +(vior that is standard for a particular v)-.2 F 1.456 +(ersion \(e.g., setting)-.15 F F2(compat32)3.956 E F1 .445 +(means that quoting the right hand side of the re)108 578.4 R(ge)-.15 E +.446(xp matching operator quotes special re)-.15 F(ge)-.15 E .446 +(xp characters in)-.15 F(the w)108 590.4 Q(ord, which is def)-.1 E +(ault beha)-.1 E(vior in bash-3.2 and subsequent v)-.2 E(ersions\).)-.15 +E .523(If a user enables, say)108 607.2 R(,)-.65 E F2(compat32)3.023 E +F1 3.023(,i)C 3.023(tm)-3.023 G .523(ay af)-3.023 F .523(fect the beha) +-.25 F .523(vior of other compatibility le)-.2 F -.15(ve)-.25 G .522 +(ls up to and includ-).15 F .259(ing the current compatibility le)108 +619.2 R -.15(ve)-.25 G 2.759(l. The).15 F .259 +(idea is that each compatibility le)2.759 F -.15(ve)-.25 G 2.76(lc).15 G +.26(ontrols beha)-2.76 F .26(vior that changed)-.2 F 1.646(in that v)108 +631.2 R 1.646(ersion of)-.15 F F2(bash)4.146 E F1 4.146(,b)C 1.646 +(ut that beha)-4.346 F 1.646(vior may ha)-.2 F 1.946 -.15(ve b)-.2 H +1.646(een present in earlier v).15 F 4.146(ersions. F)-.15 F 1.645 +(or instance, the)-.15 F .76 +(change to use locale-based comparisons with the)108 643.2 R F2([[)3.261 +E F1 .761(command came in bash-4.1, and earlier v)3.261 F .761 +(ersions used)-.15 F 1.905(ASCII-based comparisons, so enabling)108 +655.2 R F2(compat32)4.405 E F1 1.904 +(will enable ASCII-based comparisons as well.)4.405 F(That)6.904 E .295 +(granularity may not be suf)108 667.2 R .296 +(\214cient for all uses, and as a result users should emplo)-.25 F 2.796 +(yc)-.1 G .296(ompatibility le)-2.796 F -.15(ve)-.25 G .296(ls care-).15 +F(fully)108 679.2 Q 5(.R)-.65 G(ead the documentation for a particular \ +feature to \214nd out the current beha)-5 E(vior)-.2 E(.)-.55 E .532 +(Bash-4.3 introduced a ne)108 696 R 3.032(ws)-.25 G .531(hell v)-3.032 F +(ariable:)-.25 E F3 -.27(BA)3.031 G(SH_COMP).27 E -.855(AT)-.666 G F4(.) +.855 E F1 .531(The v)5.031 F .531(alue assigned to this v)-.25 F .531 +(ariable \(a decimal)-.25 F -.15(ve)108 708 S .107(rsion number lik).15 +F 2.607(e4)-.1 G .107(.2, or an inte)-2.607 F .107 +(ger corresponding to the)-.15 F F2(compat)2.608 E F0(NN)A F1 .108 +(option, lik)2.608 F 2.608(e4)-.1 G .108(2\) determines the com-)-2.608 +F(patibility le)108 720 Q -.15(ve)-.25 G(l.).15 E(GNU Bash 5.3)72 768 Q +(2024 December 12)136.795 E(92)185.955 E 0 Cg EP +%%Page: 93 93 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E .734(Starting with bash-4.4,)108 84 R/F2 10 +/Times-Bold@0 SF(bash)3.233 E F1(be)3.233 E -.05(ga)-.15 G 3.233(nd).05 +G .733(eprecating older compatibility le)-3.233 F -.15(ve)-.25 G 3.233 +(ls. Ev).15 F(entually)-.15 E 3.233(,t)-.65 G .733(he options will be) +-3.233 F(remo)108 96 Q -.15(ve)-.15 G 2.5(di).15 G 2.5(nf)-2.5 G -.2 +(avo)-2.6 G 2.5(ro).2 G(f)-2.5 E/F3 9/Times-Bold@0 SF -.27(BA)2.5 G +(SH_COMP).27 E -.855(AT)-.666 G/F4 9/Times-Roman@0 SF(.).855 E F1 1.44 +(Bash-5.0 w)108 112.8 R 1.44(as the \214nal v)-.1 F 1.44 +(ersion for which there w)-.15 F 1.441(as an indi)-.1 F 1.441 +(vidual shopt option for the pre)-.25 F 1.441(vious v)-.25 F(ersion.) +-.15 E F3 -.27(BA)108 124.8 S(SH_COMP).27 E -.855(AT)-.666 G F1 +(is the only mechanism to control the compatibility le)3.105 E -.15(ve) +-.25 G 2.5(li).15 G 2.5(nv)-2.5 G(ersions ne)-2.65 E(wer than bash-5.0.) +-.25 E 1.614(The follo)108 141.6 R 1.613(wing table describes the beha) +-.25 F 1.613(vior changes controlled by each compatibility le)-.2 F -.15 +(ve)-.25 G 4.113(ls).15 G 4.113(etting. The)-4.113 F F2(compat)108 153.6 +Q F0(NN)A F1 1.186 +(tag is used as shorthand for setting the compatibility le)3.685 F -.15 +(ve)-.25 G 3.686(lt).15 G(o)-3.686 E F0(NN)3.686 E F1 1.186 +(using one of the follo)3.686 F(wing)-.25 E 3.807(mechanisms. F)108 +165.6 R 1.307(or v)-.15 F 1.307 +(ersions prior to bash-5.0, the compatibility le)-.15 F -.15(ve)-.25 G +3.806(lm).15 G 1.306(ay be set using the corresponding)-3.806 F F2 +(compat)108 177.6 Q F0(NN)A F1 .502(shopt option.)3.002 F -.15(Fo)5.502 +G 3.002(rb).15 G .502(ash-4.3 and later v)-3.002 F .502(ersions, the) +-.15 F F3 -.27(BA)3.002 G(SH_COMP).27 E -.855(AT)-.666 G F1 -.25(va) +3.607 G .502(riable is preferred, and it).25 F +(is required for bash-5.1 and later v)108 189.6 Q(ersions.)-.15 E F2 +(compat31)108 206.4 Q F1<83>144 218.4 Q(Quoting the rhs of the)180 218.4 +Q F2([[)2.5 E F1(command')2.5 E 2.5(sr)-.55 G -.15(eg)-2.5 G -.15(ex).15 +G 2.5(pm).15 G(atching operator \(=\001\) has no special ef)-2.5 E +(fect.)-.25 E F2(compat32)108 235.2 Q F1<83>144 247.2 Q(The)180 247.2 Q +F2(<)3.251 E F1(and)3.251 E F2(>)3.251 E F1 .751(operators to the)3.251 +F F2([[)3.251 E F1 .75 +(command do not consider the current locale when com-)3.251 F +(paring strings; the)180 259.2 Q 2.5(yu)-.15 G(se ASCII ordering.)-2.5 E +F2(compat40)108 276 Q F1<83>144 288 Q(The)180 288 Q F2(<)3.25 E F1(and) +3.25 E F2(>)3.25 E F1 .75(operators to the)3.25 F F2([[)3.251 E F1 .751 +(command do not consider the current locale when com-)3.251 F .496 +(paring strings; the)180 300 R 2.996(yu)-.15 G .496(se ASCII ordering.) +-2.996 F F2(Bash)5.495 E F1 -.15(ve)2.995 G .495 +(rsions prior to bash-4.1 use ASCII col-).15 F 1.173(lation and)180 312 +R F0(str)4.013 E(cmp)-.37 E F1 1.173 +(\(3\); bash-4.1 and later use the current locale').19 F 3.674(sc)-.55 G +1.174(ollation sequence and)-3.674 F F0(str)180.34 324 Q(coll)-.37 E F1 +(\(3\).).51 E F2(compat41)108 340.8 Q F1<83>144 352.8 Q(In)180 352.8 Q +F0(posix)3.754 E F1(mode,)3.754 E F2(time)3.754 E F1 1.254(may be follo) +3.754 F 1.253(wed by options and still be recognized as a reserv)-.25 F +(ed)-.15 E -.1(wo)180 364.8 S(rd \(this is POSIX interpretation 267\).) +.1 E<83>144 376.8 Q(In)180 376.8 Q F0(posix)2.673 E F1 .174 +(mode, the parser requires that an e)2.673 F -.15(ve)-.25 G 2.674(nn).15 +G .174(umber of single quotes occur in the)-2.674 F F0(wor)2.674 E(d) +-.37 E F1 .282(portion of a double-quoted parameter e)180 388.8 R .282 +(xpansion and treats them specially)-.15 F 2.781(,s)-.65 G 2.781(ot) +-2.781 G .281(hat charac-)-2.781 F(ters within the single quotes are co\ +nsidered quoted \(this is POSIX interpretation 221\).)180 400.8 Q F2 +(compat42)108 417.6 Q F1<83>144 429.6 Q .753(The replacement string in \ +double-quoted pattern substitution does not under)180 429.6 R .753 +(go quote re-)-.18 F(mo)180 441.6 Q -.25(va)-.15 G(l, as it does in v) +.25 E(ersions after bash-4.2.)-.15 E<83>144 453.6 Q .514 +(In posix mode, single quotes are considered special when e)180 453.6 R +.514(xpanding the)-.15 F F0(wor)3.014 E(d)-.37 E F1 .513(portion of) +3.013 F 3.39(ad)180 465.6 S .89(ouble-quoted parameter e)-3.39 F .89 +(xpansion and can be used to quote a closing brace or other)-.15 F 2.355 +(special character \(this is part of POSIX interpretation 221\); in lat\ +er v)180 477.6 R 2.355(ersions, single)-.15 F +(quotes are not special within double-quoted w)180 489.6 Q(ord e)-.1 E +(xpansions.)-.15 E F2(compat43)108 506.4 Q F1<83>144 518.4 Q -.8(Wo)180 +518.4 S .374(rd e).8 F .374(xpansion errors are considered non-f)-.15 F +.374(atal errors that cause the current command to)-.1 F -.1(fa)180 +530.4 S .605(il, e).1 F -.15(ve)-.25 G 3.105(ni).15 G 3.105(np)-3.105 G +.605(osix mode \(the def)-3.105 F .605(ault beha)-.1 F .605 +(vior is to mak)-.2 F 3.105(et)-.1 G .605(hem f)-3.105 F .605 +(atal errors that cause the)-.1 F(shell to e)180 542.4 Q(xit\).)-.15 E +<83>144 554.4 Q .195(When e)180 554.4 R -.15(xe)-.15 G .196 +(cuting a shell function, the loop state \(while/until/etc.\)).15 F .196 +(is not reset, so)5.196 F F2(br)2.696 E(eak)-.18 E F1(or)2.696 E F2 +(continue)180 566.4 Q F1 1.167 +(in that function will break or continue loops in the calling conte) +3.667 F 3.666(xt. Bash-4.4)-.15 F(and later reset the loop state to pre) +180 578.4 Q -.15(ve)-.25 G(nt this.).15 E F2(compat44)108 595.2 Q F1<83> +144 607.2 Q .481(The shell sets up the v)180 607.2 R .481(alues used by) +-.25 F F3 -.27(BA)2.981 G(SH_ARGV).27 E F1(and)2.731 E F3 -.27(BA)2.981 +G(SH_ARGC).27 E F1 .481(so the)2.731 F 2.981(yc)-.15 G .481(an e)-2.981 +F(xpand)-.15 E(to the shell')180 619.2 Q 2.5(sp)-.55 G +(ositional parameters e)-2.5 E -.15(ve)-.25 G 2.5(ni).15 G 2.5(fe)-2.5 G +(xtended deb)-2.65 E(ugging mode is not enabled.)-.2 E<83>144 631.2 Q +3.855(As)180 631.2 S 1.355(ubshell inherits loops from its parent conte) +-3.855 F 1.354(xt, so)-.15 F F2(br)3.854 E(eak)-.18 E F1(or)3.854 E F2 +(continue)3.854 E F1 1.354(will cause the)3.854 F(subshell to e)180 +643.2 Q 2.5(xit. Bash-5.0)-.15 F(and later reset the loop state to pre) +2.5 E -.15(ve)-.25 G(nt the e).15 E(xit)-.15 E<83>144 655.2 Q -1.11(Va) +180 655.2 S .494(riable assignments preceding b)1.11 F .494(uiltins lik) +-.2 F(e)-.1 E F2(export)2.994 E F1(and)2.995 E F2 -.18(re)2.995 G +(adonly).18 E F1 .495(that set attrib)2.995 F .495(utes con-)-.2 F .12 +(tinue to af)180 667.2 R .12(fect v)-.25 F .119 +(ariables with the same name in the calling en)-.25 F .119(vironment e) +-.4 F -.15(ve)-.25 G 2.619(ni).15 G 2.619(ft)-2.619 G .119(he shell is) +-2.619 F(not in posix mode.)180 679.2 Q F2(compat50)108 696 Q F1 +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(93)185.955 E 0 Cg EP +%%Page: 94 94 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E<83>144 84 Q 1.209(Bash-5.1 changed the w)180 84 R +(ay)-.1 E/F2 9/Times-Bold@0 SF($RANDOM)3.709 E F1 1.209 +(is generated to introduce slightly more random-)3.459 F 3.372(ness. If) +180 96 R .871(the shell compatibility le)3.372 F -.15(ve)-.25 G 3.371 +(li).15 G 3.371(ss)-3.371 G .871(et to 50 or lo)-3.371 F(wer)-.25 E +3.371(,i)-.4 G 3.371(tr)-3.371 G -2.15 -.25(ev e)-3.371 H .871 +(rts to the method from).25 F .732(bash-5.0 and pre)180 108 R .732 +(vious v)-.25 F .733 +(ersions, so seeding the random number generator by assigning a)-.15 F +-.25(va)180 120 S(lue to).25 E F2(RANDOM)2.5 E F1 +(will produce the same sequence as in bash-5.0.)2.25 E<83>144 132 Q .696 +(If the command hash table is empty)180 132 R 3.196(,b)-.65 G .696 +(ash v)-3.196 F .695(ersions prior to bash-5.1 printed an informa-)-.15 +F 1.32(tional message to that ef)180 144 R 1.321(fect, e)-.25 F -.15(ve) +-.25 G 3.821(nw).15 G 1.321 +(hen producing output that can be reused as input.)-3.821 F +(Bash-5.1 suppresses that message when the)180 156 Q/F3 10/Times-Bold@0 +SF2.5 E F1(option is supplied.)2.5 E F3(compat51)108 172.8 Q F1 +<83>144 184.8 Q(The)180 184.8 Q F3(unset)2.955 E F1 -.2(bu)2.955 G .455 +(iltin treats attempts to unset array subscripts).2 F F3(@)2.954 E F1 +(and)2.954 E F3(*)2.954 E F1(dif)2.954 E .454(ferently depending)-.25 F +(on whether the array is inde)180 196.8 Q -.15(xe)-.15 G 2.5(do).15 G +2.5(ra)-2.5 G(ssociati)-2.5 E -.15(ve)-.25 G 2.5(,a).15 G(nd dif)-2.5 E +(ferently than in pre)-.25 E(vious v)-.25 E(ersions.)-.15 E<83>144 208.8 +Q .234(Arithmetic commands \()180 208.8 R F3(\(\()2.734 E F1 1.666(...)C +F3(\)\))-1.666 E F1 2.734(\)a)2.734 G .234(nd the e)-2.734 F .234 +(xpressions in an arithmetic for statement can be)-.15 F -.15(ex)180 +220.8 S(panded more than once.).15 E<83>144 232.8 Q .251 +(Expressions used as ar)180 232.8 R .251 +(guments to arithmetic operators in the)-.18 F F3([[)2.751 E F1 .25 +(conditional command can)2.751 F(be e)180 244.8 Q +(xpanded more than once.)-.15 E<83>144 256.8 Q(The e)180 256.8 Q +(xpressions in substring parameter brace e)-.15 E(xpansion can be e)-.15 +E(xpanded more than once.)-.15 E<83>144 268.8 Q(The e)180 268.8 Q +(xpressions in the)-.15 E F3($\(\()2.5 E F1 1.666(...)C F3(\)\))-1.666 E +F1 -.1(wo)2.5 G(rd e).1 E(xpansion can be e)-.15 E +(xpanded more than once.)-.15 E<83>144 280.8 Q(Arithmetic e)180 280.8 Q +(xpressions used as inde)-.15 E -.15(xe)-.15 G 2.5(da).15 G +(rray subscripts can be e)-2.5 E(xpanded more than once.)-.15 E<83>144 +292.8 Q F3 .605(test \255v)180 292.8 R F1 3.105(,w)C .605(hen gi)-3.105 +F -.15(ve)-.25 G 3.105(na).15 G 3.105(na)-3.105 G -.18(rg)-3.105 G .605 +(ument of).18 F F3(A[@])3.105 E F1 3.105(,w)C(here)-3.105 E F3(A)3.105 E +F1 .606(is an e)3.105 F .606(xisting associati)-.15 F .906 -.15(ve a) +-.25 H(rray).15 E 3.106(,w)-.65 G(ill)-3.106 E .714 +(return true if the array has an)180 304.8 R 3.214(ys)-.15 G .714 +(et elements.)-3.214 F .714(Bash-5.2 will look for and report on a k) +5.714 F -.15(ey)-.1 G(named)180 316.8 Q F3(@)2.5 E F1(.)A<83>144 328.8 Q +1.362(The ${)180 328.8 R F0(par)A(ameter)-.15 E F3([:]=)A F0(value)A F1 +3.862(}w)C 1.362(ord e)-3.962 F 1.362(xpansion will return)-.15 F F0 +(value)3.862 E F1 3.862(,b)C 1.363(efore an)-3.862 F 3.863(yv)-.15 G +(ariable-spe-)-4.113 E .623(ci\214c transformations ha)180 340.8 R .923 +-.15(ve b)-.2 H .623(een performed \(e.g., con).15 F -.15(ve)-.4 G .623 +(rting to lo).15 F 3.123(wercase\). Bash-5.2)-.25 F(will)3.123 E +(return the \214nal v)180 352.8 Q(alue assigned to the v)-.25 E +(ariable.)-.25 E<83>144 364.8 Q -.15(Pa)180 364.8 S .945 +(rsing command substitutions will beha).15 F 1.245 -.15(ve a)-.2 H 3.445 +(si).15 G 3.446(fe)-3.445 G .946(xtended globbing \(see the description) +-3.596 F .339(of the)180 376.8 R F3(shopt)2.839 E F1 -.2(bu)2.839 G .339 +(iltin abo).2 F -.15(ve)-.15 G 2.839(\)i).15 G 2.839(se)-2.839 G .338 +(nabled, so that parsing a command substitution containing)-2.839 F .022 +(an e)180 388.8 R .022(xtglob pattern \(say)-.15 F 2.522(,a)-.65 G 2.522 +(sp)-2.522 G .022(art of a shell function\) will not f)-2.522 F 2.523 +(ail. This)-.1 F .023(assumes the intent is)2.523 F .04(to enable e)180 +400.8 R .039(xtglob before the command is e)-.15 F -.15(xe)-.15 G .039 +(cuted and w).15 F .039(ord e)-.1 F .039(xpansions are performed.)-.15 F +(It)5.039 E .4(will f)180 412.8 R .4(ail at w)-.1 F .4(ord e)-.1 F .4 +(xpansion time if e)-.15 F .4(xtglob hasn')-.15 F 2.9(tb)-.18 G .4 +(een enabled by the time the command)-2.9 F(is e)180 424.8 Q -.15(xe) +-.15 G(cuted.).15 E F3(compat52)108 441.6 Q F1<83>144 453.6 Q(The)180 +453.6 Q F3(test)3.168 E F1 -.2(bu)3.168 G .667 +(iltin uses its historical algorithm to parse parenthesized sube).2 F +.667(xpressions when)-.15 F(gi)180 465.6 Q -.15(ve)-.25 G 2.5<6e8c>.15 G +.3 -.15(ve o)-2.5 H 2.5(rm).15 G(ore ar)-2.5 E(guments.)-.18 E<83>144 +477.6 Q .483(If the)180 477.6 R F32.983 E F1(or)2.983 E F3 +2.983 E F1 .483(option is supplied to the)2.983 F F3(bind)2.983 E F1 -.2 +(bu)2.983 G(iltin,).2 E F3(bind)2.983 E F1 .483(treats an)2.983 F 2.984 +(ya)-.15 G -.18(rg)-2.984 G .484(uments remain-).18 F .339 +(ing after option processing as bindable command names, and displays an) +180 489.6 R 2.839(yk)-.15 G .639 -.15(ey s)-2.939 H(equences).15 E +(bound to those commands, instead of treating the ar)180 501.6 Q +(guments as k)-.18 E .3 -.15(ey s)-.1 H(equences to bind.).15 E/F4 10.95 +/Times-Bold@0 SF(RESTRICTED SHELL)72 518.4 Q F1(If)108 530.4 Q F3(bash) +3.571 E F1 1.071(is started with the name)3.571 F F3(rbash)3.571 E F1 +3.571(,o)C 3.571(rt)-3.571 G(he)-3.571 E F33.571 E F1 1.071 +(option is supplied at in)3.571 F -.2(vo)-.4 G 1.071 +(cation, the shell becomes).2 F F0 -.37(re)3.572 G(-).37 E(stricted)108 +542.4 Q F1 5.445(.A)C .445(restricted shell is used to set up an en)-2.5 +F .445(vironment more controlled than the standard shell.)-.4 F .445 +(It be-)5.445 F(ha)108 554.4 Q -.15(ve)-.2 G 2.5(si).15 G(dentically to) +-2.5 E F3(bash)2.5 E F1(with the e)2.5 E(xception that the follo)-.15 E +(wing are disallo)-.25 E(wed or not performed:)-.25 E<83>108 571.2 Q +(Changing directories with)144 571.2 Q F3(cd)2.5 E F1(.)A<83>108 588 Q +(Setting or unsetting the v)144 588 Q(alues of)-.25 E F2(SHELL)2.5 E/F5 +9/Times-Roman@0 SF(,)A F2 -.666(PA)2.25 G(TH)-.189 E F5(,)A F2(HISTFILE) +2.25 E F5(,)A F2(ENV)2.25 E F5(,)A F1(or)2.25 E F2 -.27(BA)2.5 G(SH_ENV) +.27 E F5(.)A F1<83>108 604.8 Q(Specifying command names containing)144 +604.8 Q F3(/)2.5 E F1(.)A<83>108 621.6 Q +(Specifying a \214lename containing a)144 621.6 Q F3(/)2.5 E F1 +(as an ar)2.5 E(gument to the)-.18 E F3(.)2.5 E F1 -.2(bu)5 G +(iltin command.).2 E<83>108 638.4 Q(Using the)144 638.4 Q F32.5 E +F1(option to the)2.5 E F3(.)2.5 E F1 -.2(bu)5 G +(iltin command to specify a search path.).2 E<83>108 655.2 Q +(Specifying a \214lename containing a slash as an ar)144 655.2 Q +(gument to the)-.18 E F3(history)2.5 E F1 -.2(bu)2.5 G(iltin command.).2 +E<83>108 672 Q .351(Specifying a \214lename containing a slash as an ar) +144 672 R .351(gument to the)-.18 F F32.851 E F1 .351 +(option to the)2.851 F F3(hash)2.852 E F1 -.2(bu)2.852 G .352 +(iltin com-).2 F(mand.)144 684 Q<83>108 700.8 Q +(Importing function de\214nitions from the shell en)144 700.8 Q +(vironment at startup.)-.4 E(GNU Bash 5.3)72 768 Q(2024 December 12) +136.795 E(94)185.955 E 0 Cg EP +%%Page: 95 95 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E<83>108 84 Q -.15(Pa)144 84 S(rsing the v).15 E +(alue of)-.25 E/F2 9/Times-Bold@0 SF(SHELLOPTS)2.5 E F1 +(from the shell en)2.25 E(vironment at startup.)-.4 E<83>108 100.8 Q(Re\ +directing output using the >, >|, <>, >&, &>, and >> redirection operat\ +ors.)144 100.8 Q<83>108 117.6 Q(Using the)144 117.6 Q/F3 10/Times-Bold@0 +SF(exec)2.5 E F1 -.2(bu)2.5 G +(iltin command to replace the shell with another command.).2 E<83>108 +134.4 Q(Adding or deleting b)144 134.4 Q(uiltin commands with the)-.2 E +F32.5 E F1(and)2.5 E F32.5 E F1(options to the)2.5 E F3 +(enable)2.5 E F1 -.2(bu)2.5 G(iltin command.).2 E<83>108 151.2 Q +(Using the)144 151.2 Q F3(enable)2.5 E F1 -.2(bu)2.5 G +(iltin command to enable disabled shell b).2 E(uiltins.)-.2 E<83>108 168 +Q(Specifying the)144 168 Q F32.5 E F1(option to the)2.5 E F3 +(command)2.5 E F1 -.2(bu)2.5 G(iltin command.).2 E<83>108 184.8 Q -.45 +(Tu)144 184.8 S(rning of).45 E 2.5(fr)-.25 G(estricted mode with)-2.5 E +F3(set +r)2.5 E F1(or)2.5 E F3(shopt \255u r)2.5 E(estricted_shell)-.18 +E F1(.)A(These restrictions are enforced after an)108 201.6 Q 2.5(ys) +-.15 G(tartup \214les are read.)-2.5 E 1.566 +(When a command that is found to be a shell script is e)108 218.4 R -.15 +(xe)-.15 G 1.566(cuted \(see).15 F F2 1.566(COMMAND EXECUTION)4.066 F F1 +(abo)3.816 E -.15(ve)-.15 G(\),).15 E F3(rbash)108 230.4 Q F1(turns of) +2.5 E 2.5(fa)-.25 G .3 -.15(ny r)-2.5 H(estrictions in the shell spa).15 +E(wned to e)-.15 E -.15(xe)-.15 G(cute the script.).15 E/F4 10.95 +/Times-Bold@0 SF(SEE ALSO)72 247.2 Q F0(Bash Refer)108 259.2 Q +(ence Manual)-.37 E F1 2.5(,B)C(rian F)-2.5 E(ox and Chet Rame)-.15 E(y) +-.15 E F0(The Gnu Readline Libr)108 271.2 Q(ary)-.15 E F1 2.5(,B)C +(rian F)-2.5 E(ox and Chet Rame)-.15 E(y)-.15 E F0(The Gnu History Libr) +108 283.2 Q(ary)-.15 E F1 2.5(,B)C(rian F)-2.5 E(ox and Chet Rame)-.15 E +(y)-.15 E F0 -.8(Po)108 295.2 S(rtable Oper).8 E +(ating System Interface \(POSIX\) P)-.15 E(art 2: Shell and Utilities) +-.8 E F1 2.5(,I)C(EEE \212)-2.5 E(http://pubs.opengroup.or)144 307.2 Q +(g/onlinepubs/9799919799/)-.18 E(http://tiswww)108 319.2 Q +(.case.edu/\001chet/bash/POSIX \212 a description of posix mode)-.65 E +F0(sh)108 331.2 Q F1(\(1\),)A F0(ksh)2.5 E F1(\(1\),)A F0(csh)2.5 E F1 +(\(1\))A F0(emacs)108 343.2 Q F1(\(1\),)A F0(vi)2.5 E F1(\(1\))A F0 -.37 +(re)108 355.2 S(adline).37 E F1(\(3\))A F4(FILES)72 372 Q F0(/bin/bash) +109.666 384 Q F1(The)144 396 Q F3(bash)2.5 E F1 -.15(exe)2.5 G(cutable) +.15 E F0(/etc/pr)109.666 408 Q(o\214le)-.45 E F1 +(The systemwide initialization \214le, e)144 420 Q -.15(xe)-.15 G +(cuted for login shells).15 E F0(\001/.bash_pr)109.666 432 Q(o\214le) +-.45 E F1(The personal initialization \214le, e)144 444 Q -.15(xe)-.15 G +(cuted for login shells).15 E F0(\001/.bashr)109.666 456 Q(c)-.37 E F1 +(The indi)144 468 Q(vidual per)-.25 E(-interacti)-.2 E -.15(ve)-.25 G +(-shell startup \214le).15 E F0(\001/.bash_lo)109.666 480 Q(gout)-.1 E +F1(The indi)144 492 Q(vidual login shell cleanup \214le, e)-.25 E -.15 +(xe)-.15 G(cuted when a login shell e).15 E(xits)-.15 E F0 +(\001/.bash_history)109.666 504 Q F1(The def)144 516 Q(ault v)-.1 E +(alue of)-.25 E F3(HISTFILE)2.5 E F1 2.5(,t)C +(he \214le in which bash sa)-2.5 E -.15(ve)-.2 G 2.5(st).15 G +(he command history)-2.5 E F0(\001/.inputr)109.666 528 Q(c)-.37 E F1 +(Indi)144 540 Q(vidual)-.25 E F0 -.37(re)2.5 G(adline).37 E F1 +(initialization \214le)2.5 E F4 -.548(AU)72 556.8 S(THORS).548 E F1 +(Brian F)108 568.8 Q(ox, Free Softw)-.15 E(are F)-.1 E(oundation)-.15 E +(bfox@gnu.or)108 580.8 Q(g)-.18 E(Chet Rame)108 597.6 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.rame)108 609.6 Q(y@case.edu)-.15 E F4 -.11(BU)72 +626.4 S 2.738(GR).11 G(EPOR)-2.738 E(TS)-.438 E F1 .567 +(If you \214nd a b)108 638.4 R .568(ug in)-.2 F F3(bash)3.068 E F1 3.068 +(,y)C .568(ou should report it.)-3.068 F .568 +(But \214rst, you should mak)5.568 F 3.068(es)-.1 G .568 +(ure that it really is a b)-3.068 F .568(ug, and)-.2 F 5.626 +(that it appears in the latest v)108 650.4 R 5.625(ersion of)-.15 F F3 +(bash)8.125 E F1 10.625(.T)C 5.625(he latest v)-10.625 F 5.625 +(ersion is al)-.15 F -.1(wa)-.1 G 5.625(ys a).1 F -.25(va)-.2 G 5.625 +(ilable from).25 F F0(ftp://ftp.gnu.or)108 662.4 Q(g/pub/gnu/bash/)-.37 +E F1(and)2.5 E F0(http://git.savannah.gnu.or)2.5 E +(g/cgit/bash.git/snapshot/bash-master)-.37 E(.tar)-1.11 E(.gz)-1.11 E F1 +(.)A .41(Once you ha)108 679.2 R .71 -.15(ve d)-.2 H .41 +(etermined that a b).15 F .41(ug actually e)-.2 F .411(xists, use the) +-.15 F F0(bashb)3.181 E(ug)-.2 E F1 .411(command to submit a b)3.131 F +.411(ug report.)-.2 F(If)5.411 E .022(you ha)108 691.2 R .322 -.15 +(ve a \214)-.2 H .021(x, you are encouraged to mail that as well!).15 F +-1.1(Yo)5.021 G 2.521(um)1.1 G .021 +(ay send suggestions and \231philosophical\232 b)-2.521 F(ug)-.2 E +(reports to)108 703.2 Q F0 -.2(bu)2.5 G(g-bash@gnu.or).2 E(g)-.37 E F1 +(or post them to the Usenet ne)2.5 E(wsgroup)-.25 E F3(gnu.bash.b)2.5 E +(ug)-.2 E F1(.)A(ALL b)108 720 Q(ug reports should include:)-.2 E +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(95)185.955 E 0 Cg EP +%%Page: 96 96 +%%BeginPageSetup +BP +%%EndPageSetup +/F0 10/Times-Italic@0 SF -.25(BA)72 48 S(SH).25 E/F1 10/Times-Roman@0 SF +138.32(\(1\) General).95 F(Commands Manual)2.5 E F0 -.25(BA)140.82 G(SH) +.25 E F1(\(1\)).95 E(The v)108 84 Q(ersion number of)-.15 E/F2 10 +/Times-Bold@0 SF(bash)2.5 E F1(The hardw)108 96 Q +(are and operating system)-.1 E(The compiler used to compile)108 108 Q +2.5(Ad)108 120 S(escription of the b)-2.5 E(ug beha)-.2 E(viour)-.2 E +2.5(As)108 132 S(hort script or \231recipe\232 which e)-2.5 E -.15(xe) +-.15 G(rcises the b).15 E(ug)-.2 E F0(bashb)108.27 148.8 Q(ug)-.2 E F1 +(inserts the \214rst three items automatically into the template it pro) +2.72 E(vides for \214ling a b)-.15 E(ug report.)-.2 E(Comments and b)108 +165.6 Q(ug reports concerning this manual page should be directed to)-.2 +E F0 -.15(ch)2.5 G(et.r).15 E(ame)-.15 E(y@case)-.3 E(.edu)-.15 E F1(.) +.25 E/F3 10.95/Times-Bold@0 SF -.11(BU)72 182.4 S(GS).11 E F1(It')108 +194.4 Q 2.5(st)-.55 G(oo big and too slo)-2.5 E -.65(w.)-.25 G 1.868 +(There are some subtle dif)108 211.2 R 1.868(ferences between)-.25 F F2 +(bash)4.369 E F1 1.869(and traditional v)4.369 F 1.869(ersions of)-.15 F +F2(sh)4.369 E F1 4.369(,m)C 1.869(ostly because of the)-4.369 F/F4 9 +/Times-Bold@0 SF(POSIX)108 223.2 Q F1(speci\214cation.)2.25 E +(Aliases are confusing in some uses.)108 240 Q(Shell b)108 256.8 Q +(uiltin commands and functions are not stoppable/restartable.)-.2 E .146 +(Compound commands and command lists of the form \231a ; b ; c\232 are \ +not handled gracefully when combined)108 273.6 R .5 +(with process suspension.)108 285.6 R .5 +(When a process is stopped, the shell immediately e)5.5 F -.15(xe)-.15 G +.5(cutes the ne).15 F .5(xt command in)-.15 F .941 +(the list or breaks out of an)108 297.6 R 3.441(ye)-.15 G .941 +(xisting loops.)-3.591 F .941(It suf)5.941 F .941 +(\214ces to enclose the command in parentheses to force it)-.25 F .824(\ +into a subshell, which may be stopped as a unit, or to start the comman\ +d in the background and immedi-)108 309.6 R +(ately bring it into the fore)108 321.6 Q(ground.)-.15 E(Array v)108 +338.4 Q(ariables may not \(yet\) be e)-.25 E(xported.)-.15 E +(GNU Bash 5.3)72 768 Q(2024 December 12)136.795 E(96)185.955 E 0 Cg EP +%%Trailer +end +%%EOF diff --git a/doc/bashref.dvi b/doc/bashref.dvi index bb959ffc..67a7f12c 100644 Binary files a/doc/bashref.dvi and b/doc/bashref.dvi differ diff --git a/doc/bashref.html b/doc/bashref.html index c86ab26f..f846ef0b 100644 --- a/doc/bashref.html +++ b/doc/bashref.html @@ -4,9 +4,9 @@