· 5 years ago · Apr 22, 2020, 09:48 AM
1Script started on 2020-04-22 05:40:53-04:00 [TERM="cygwin" TTY="/dev/cons0" COLUMNS="229" LINES="59"]
2INFO:root:/usr/bin/man bash
3INFO:root:^\s*((\+\||)(declare)([\s_\[].*|, .*|)|-.*\s(declare))$
4DEBUG:root:BASH(1) General Commands Manual BASH(1)
5DEBUG:root:[1mNAME[0m
6DEBUG:root: bash - GNU Bourne-Again SHell
7DEBUG:root:[1mSYNOPSIS[0m
8DEBUG:root: [1mbash [22m[options] [command_string | file]
9DEBUG:root:[1mCOPYRIGHT[0m
10DEBUG:root: Bash is Copyright (C) 1989-2016 by the Free Software Foundation, Inc.
11DEBUG:root:[1mDESCRIPTION[0m
12DEBUG:root: [1mBash [22mis an [1msh[22m-compatible command language interpreter that executes commands read from the standard input or from a file. [1mBash [22malso incorporates useful features from the [4mKorn[24m and [4mC[24m shells ([1mksh [22mand [1mcsh[22m).
13DEBUG:root: [1mBash [22mis intended to be a conformant implementation of the Shell and Utilities portion of the IEEE POSIX specification (IEEE Standard 1003.1). [1mBash [22mcan be configured to be POSIX-conformant by default.
14DEBUG:root:[1mOPTIONS[0m
15DEBUG:root: All of the single-character shell options documented in the description of the [1mset [22mbuiltin command can be used as options when the shell is invoked. In addition, [1mbash [22minterprets the following options when it is in‐
16DEBUG:root: voked:
17DEBUG:root: [1m-c [22mIf the [1m-c [22moption is present, then commands are read from the first non-option argument [4mcommand_string[24m. If there are arguments after the [4mcommand_string[24m, the first argument is assigned to [1m$0 [22mand any remain‐
18DEBUG:root: ing arguments are assigned to the positional parameters. The assignment to [1m$0 [22msets the name of the shell, which is used in warning and error messages.
19DEBUG:root: [1m-i [22mIf the [1m-i [22moption is present, the shell is [4minteractive[24m.
20DEBUG:root: [1m-l [22mMake [1mbash [22mact as if it had been invoked as a login shell (see [1mINVOCATION [22mbelow).
21DEBUG:root: [1m-r [22mIf the [1m-r [22moption is present, the shell becomes [4mrestricted[24m (see [1mRESTRICTED SHELL [22mbelow).
22DEBUG:root: [1m-s [22mIf the [1m-s [22moption is present, or if no arguments remain after option processing, then commands are read from the standard input. This option allows the positional parameters to be set when invoking an in‐
23DEBUG:root: teractive shell.
24DEBUG:root: [1m-D [22mA list of all double-quoted strings preceded by [1m$ [22mis printed on the standard output. These are the strings that are subject to language translation when the current locale is not [1mC [22mor [1mPOSIX[22m. This implies
25DEBUG:root: the [1m-n [22moption; no commands will be executed.
26DEBUG:root: [1m[-+]O [[4m[22mshopt_option[24m[1m][0m
27DEBUG:root: [4mshopt_option[24m is one of the shell options accepted by the [1mshopt [22mbuiltin (see [1mSHELL BUILTIN COMMANDS [22mbelow). If [4mshopt_option[24m is present, [1m-O [22msets the value of that option; [1m+O [22munsets it. If [4mshopt_option[24m is
28DEBUG:root: not supplied, the names and values of the shell options accepted by [1mshopt [22mare printed on the standard output. If the invocation option is [1m+O[22m, the output is displayed in a format that may be reused as in‐
29DEBUG:root: put.
30DEBUG:root: [1m-- [22mA [1m-- [22msignals the end of options and disables further option processing. Any arguments after the [1m-- [22mare treated as filenames and arguments. An argument of [1m- [22mis equivalent to [1m--[22m.
31DEBUG:root: [1mBash [22malso interprets a number of multi-character options. These options must appear on the command line before the single-character options to be recognized.
32DEBUG:root: [1m--debugger[0m
33DEBUG:root: Arrange for the debugger profile to be executed before the shell starts. Turns on extended debugging mode (see the description of the [1mextdebug [22moption to the [1mshopt [22mbuiltin below).
34DEBUG:root: [1m--dump-po-strings[0m
35DEBUG:root: Equivalent to [1m-D[22m, but the output is in the GNU [4mgettext[24m [1mpo [22m(portable object) file format.
36DEBUG:root: [1m--dump-strings[0m
37DEBUG:root: Equivalent to [1m-D[22m.
38DEBUG:root: [1m--help [22mDisplay a usage message on standard output and exit successfully.
39DEBUG:root: [1m--init-file [4m[22mfile[0m
40DEBUG:root: [1m--rcfile [4m[22mfile[0m
41DEBUG:root: Execute commands from [4mfile[24m instead of the standard personal initialization file [4m~/.bashrc[24m if the shell is interactive (see [1mINVOCATION [22mbelow).
42DEBUG:root: [1m--login[0m
43DEBUG:root: Equivalent to [1m-l[22m.
44DEBUG:root: [1m--noediting[0m
45DEBUG:root: Do not use the GNU [1mreadline [22mlibrary to read command lines when the shell is interactive.
46DEBUG:root: [1m--noprofile[0m
47DEBUG:root: Do not read either the system-wide startup file [4m/etc/profile[24m or any of the personal initialization files [4m~/.bash_profile[24m, [4m~/.bash_login[24m, or [4m~/.profile[24m. By default, [1mbash [22mreads these files when it is invoked as
48DEBUG:root: a login shell (see [1mINVOCATION [22mbelow).
49DEBUG:root: [1m--norc [22mDo not read and execute the personal initialization file [4m~/.bashrc[24m if the shell is interactive. This option is on by default if the shell is invoked as [1msh[22m.
50DEBUG:root: [1m--posix[0m
51DEBUG:root: Change the behavior of [1mbash [22mwhere the default operation differs from the POSIX standard to match the standard ([4mposix[24m [4mmode[24m). See [1mSEE ALSO [22mbelow for a reference to a document that details how posix mode affects
52DEBUG:root: bash's behavior.
53DEBUG:root: [1m--restricted[0m
54DEBUG:root: The shell becomes restricted (see [1mRESTRICTED SHELL [22mbelow).
55DEBUG:root: [1m--verbose[0m
56DEBUG:root: Equivalent to [1m-v[22m.
57DEBUG:root: [1m--version[0m
58DEBUG:root: Show version information for this instance of [1mbash [22mon the standard output and exit successfully.
59DEBUG:root:[1mARGUMENTS[0m
60DEBUG:root: If arguments remain after option processing, and neither the [1m-c [22mnor the [1m-s [22moption has been supplied, the first argument is assumed to be the name of a file containing shell commands. If [1mbash [22mis invoked in this fash‐
61DEBUG:root: ion, [1m$0 [22mis set to the name of the file, and the positional parameters are set to the remaining arguments. [1mBash [22mreads and executes commands from this file, then exits. [1mBash[22m's exit status is the exit status of the
62DEBUG:root: last command executed in the script. If no commands are executed, the exit status is 0. An attempt is first made to open the file in the current directory, and, if no file is found, then the shell searches the di‐
63DEBUG:root: rectories in [1mPATH [22mfor the script.
64DEBUG:root:[1mINVOCATION[0m
65DEBUG:root: A [4mlogin[24m [4mshell[24m is one whose first character of argument zero is a [1m-[22m, or one started with the [1m--login [22moption.
66DEBUG:root: An [4minteractive[24m shell is one started without non-option arguments (unless [1m-s [22mis specified) and without the [1m-c [22moption whose standard input and error are both connected to terminals (as determined by [4misatty[24m(3)), or one
67DEBUG:root: started with the [1m-i [22moption. [1mPS1 [22mis set and [1m$- [22mincludes [1mi [22mif [1mbash [22mis interactive, allowing a shell script or a startup file to test this state.
68DEBUG:root: The following paragraphs describe how [1mbash [22mexecutes its startup files. If any of the files exist but cannot be read, [1mbash [22mreports an error. Tildes are expanded in filenames as described below under [1mTilde Expansion[0m
69DEBUG:root: in the [1mEXPANSION [22msection.
70DEBUG:root: When [1mbash [22mis invoked as an interactive login shell, or as a non-interactive shell with the [1m--login [22moption, it first reads and executes commands from the file [4m/etc/profile[24m, if that file exists. After reading that
71DEBUG:root: file, it looks for [4m~/.bash_profile[24m, [4m~/.bash_login[24m, and [4m~/.profile[24m, in that order, and reads and executes commands from the first one that exists and is readable. The [1m--noprofile [22moption may be used when the shell is
72DEBUG:root: started to inhibit this behavior.
73DEBUG:root: When an interactive login shell exits, or a non-interactive login shell executes the [1mexit [22mbuiltin command, [1mbash [22mreads and executes commands from the file [4m~/.bash_logout[24m, if it exists.
74DEBUG:root: When an interactive shell that is not a login shell is started, [1mbash [22mreads and executes commands from [4m~/.bashrc[24m, if that file exists. This may be inhibited by using the [1m--norc [22moption. The [1m--rcfile [4m[22mfile[24m option will
75DEBUG:root: force [1mbash [22mto read and execute commands from [4mfile[24m instead of [4m~/.bashrc[24m.
76DEBUG:root: When [1mbash [22mis started non-interactively, to run a shell script, for example, it looks for the variable [1mBASH_ENV [22min the environment, expands its value if it appears there, and uses the expanded value as the name of a
77DEBUG:root: file to read and execute. [1mBash [22mbehaves as if the following command were executed:
78DEBUG:root: if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
79DEBUG:root: but the value of the [1mPATH [22mvariable is not used to search for the filename.
80DEBUG:root: If [1mbash [22mis invoked with the name [1msh[22m, it tries to mimic the startup behavior of historical versions of [1msh [22mas closely as possible, while conforming to the POSIX standard as well. When invoked as an interactive login
81DEBUG:root: shell, or a non-interactive shell with the [1m--login [22moption, it first attempts to read and execute commands from [4m/etc/profile[24m and [4m~/.profile[24m, in that order. The [1m--noprofile [22moption may be used to inhibit this behavior.
82DEBUG:root: When invoked as an interactive shell with the name [1msh[22m, [1mbash [22mlooks for the variable [1mENV[22m, expands its value if it is defined, and uses the expanded value as the name of a file to read and execute. Since a shell in‐
83DEBUG:root: voked as [1msh [22mdoes not attempt to read and execute commands from any other startup files, the [1m--rcfile [22moption has no effect. A non-interactive shell invoked with the name [1msh [22mdoes not attempt to read any other startup
84DEBUG:root: files. When invoked as [1msh[22m, [1mbash [22menters [4mposix[24m mode after the startup files are read.
85DEBUG:root: When [1mbash [22mis started in [4mposix[24m mode, as with the [1m--posix [22mcommand line option, it follows the POSIX standard for startup files. In this mode, interactive shells expand the [1mENV [22mvariable and commands are read and exe‐
86DEBUG:root: cuted from the file whose name is the expanded value. No other startup files are read.
87DEBUG:root: [1mBash [22mattempts to determine when it is being run with its standard input connected to a network connection, as when executed by the remote shell daemon, usually [4mrshd[24m, or the secure shell daemon [4msshd[24m. If [1mbash [22mdeter‐
88DEBUG:root: mines it is being run in this fashion, it reads and executes commands from [4m~/.bashrc[24m, if that file exists and is readable. It will not do this if invoked as [1msh[22m. The [1m--norc [22moption may be used to inhibit this behav‐
89DEBUG:root: ior, and the [1m--rcfile [22moption may be used to force another file to be read, but neither [4mrshd[24m nor [4msshd[24m generally invoke the shell with those options or allow them to be specified.
90DEBUG:root: If the shell is started with the effective user (group) id not equal to the real user (group) id, and the [1m-p [22moption is not supplied, no startup files are read, shell functions are not inherited from the environment,
91DEBUG:root: the [1mSHELLOPTS[22m, [1mBASHOPTS[22m, [1mCDPATH[22m, and [1mGLOBIGNORE [22mvariables, if they appear in the environment, are ignored, and the effective user id is set to the real user id. If the [1m-p [22moption is supplied at invocation, the
92DEBUG:root: startup behavior is the same, but the effective user id is not reset.
93DEBUG:root:[1mDEFINITIONS[0m
94DEBUG:root: The following definitions are used throughout the rest of this document.
95DEBUG:root: [1mblank [22mA space or tab.
96DEBUG:root: [1mword [22mA sequence of characters considered as a single unit by the shell. Also known as a [1mtoken[22m.
97DEBUG:root: [1mname [22mA [4mword[24m consisting only of alphanumeric characters and underscores, and beginning with an alphabetic character or an underscore. Also referred to as an [1midentifier[22m.
98DEBUG:root: [1mmetacharacter[0m
99DEBUG:root: A character that, when unquoted, separates words. One of the following:
100DEBUG:root: [1m| & ; ( ) < > space tab newline[0m
101DEBUG:root: [1mcontrol operator[0m
102DEBUG:root: A [4mtoken[24m that performs a control function. It is one of the following symbols:
103DEBUG:root: [1m|| & && ; ;; ;& ;;& ( ) | |& <newline>[0m
104DEBUG:root:[1mRESERVED WORDS[0m
105DEBUG:root: [4mReserved[24m [4mwords[24m are words that have a special meaning to the shell. The following words are recognized as reserved when unquoted and either the first word of a simple command (see [1mSHELL GRAMMAR [22mbelow) or the third
106DEBUG:root: word of a [1mcase [22mor [1mfor [22mcommand:
107DEBUG:root: [1m! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]][0m
108DEBUG:root:[1mSHELL GRAMMAR[0m
109DEBUG:root: [1mSimple Commands[0m
110DEBUG:root: A [4msimple[24m [4mcommand[24m is a sequence of optional variable assignments followed by [1mblank[22m-separated words and redirections, and terminated by a [4mcontrol[24m [4moperator[24m. The first word specifies the command to be executed, and is
111DEBUG:root: passed as argument zero. The remaining words are passed as arguments to the invoked command.
112DEBUG:root: The return value of a [4msimple[24m [4mcommand[24m is its exit status, or 128+[4mn[24m if the command is terminated by signal [4mn[24m.
113DEBUG:root: [1mPipelines[0m
114DEBUG:root: A [4mpipeline[24m is a sequence of one or more commands separated by one of the control operators [1m| [22mor [1m|&[22m. The format for a pipeline is:
115DEBUG:root: [[1mtime [22m[[1m-p[22m]] [ ! ] [4mcommand[24m [ [[1m|[22m⎪[1m|&[22m] [4mcommand2[24m ... ]
116DEBUG:root: The standard output of [4mcommand[24m is connected via a pipe to the standard input of [4mcommand2[24m. This connection is performed before any redirections specified by the command (see [1mREDIRECTION [22mbelow). If [1m|& [22mis used, [4mcom‐[0m
117DEBUG:root: [4mmand[24m's standard error, in addition to its standard output, is connected to [4mcommand2[24m's standard input through the pipe; it is shorthand for [1m2>&1 |[22m. This implicit redirection of the standard error to the standard out‐
118DEBUG:root: put is performed after any redirections specified by the command.
119DEBUG:root: The return status of a pipeline is the exit status of the last command, unless the [1mpipefail [22moption is enabled. If [1mpipefail [22mis enabled, the pipeline's return status is the value of the last (rightmost) command to
120DEBUG:root: exit with a non-zero status, or zero if all commands exit successfully. If the reserved word [1m! [22mprecedes a pipeline, the exit status of that pipeline is the logical negation of the exit status as described above.
121DEBUG:root: The shell waits for all commands in the pipeline to terminate before returning a value.
122DEBUG:root: If the [1mtime [22mreserved word precedes a pipeline, the elapsed as well as user and system time consumed by its execution are reported when the pipeline terminates. The [1m-p [22moption changes the output format to that speci‐
123DEBUG:root: fied by POSIX. When the shell is in [4mposix[24m [4mmode[24m, it does not recognize [1mtime [22mas a reserved word if the next token begins with a `-'. The [1mTIMEFORMAT [22mvariable may be set to a format string that specifies how the timing
124DEBUG:root: information should be displayed; see the description of [1mTIMEFORMAT [22munder [1mShell Variables [22mbelow.
125DEBUG:root: When the shell is in [4mposix[24m [4mmode[24m, [1mtime [22mmay be followed by a newline. In this case, the shell displays the total user and system time consumed by the shell and its children. The [1mTIMEFORMAT [22mvariable may be used to
126DEBUG:root: specify the format of the time information.
127DEBUG:root: Each command in a pipeline is executed as a separate process (i.e., in a subshell).
128DEBUG:root: [1mLists[0m
129DEBUG:root: A [4mlist[24m is a sequence of one or more pipelines separated by one of the operators [1m;[22m, [1m&[22m, [1m&&[22m, or [1m||[22m, and optionally terminated by one of [1m;[22m, [1m&[22m, or [1m<newline>[22m.
130DEBUG:root: Of these list operators, [1m&& [22mand [1m|| [22mhave equal precedence, followed by [1m; [22mand [1m&[22m, which have equal precedence.
131DEBUG:root: A sequence of one or more newlines may appear in a [4mlist[24m instead of a semicolon to delimit commands.
132DEBUG:root: If a command is terminated by the control operator [1m&[22m, the shell executes the command in the [4mbackground[24m in a subshell. The shell does not wait for the command to finish, and the return status is 0. Commands sepa‐
133DEBUG:root: rated by a [1m; [22mare executed sequentially; the shell waits for each command to terminate in turn. The return status is the exit status of the last command executed.
134DEBUG:root: AND and OR lists are sequences of one or more pipelines separated by the [1m&& [22mand [1m|| [22mcontrol operators, respectively. AND and OR lists are executed with left associativity. An AND list has the form
135DEBUG:root: [4mcommand1[24m [1m&& [4m[22mcommand2[0m
136DEBUG:root: [4mcommand2[24m is executed if, and only if, [4mcommand1[24m returns an exit status of zero.
137DEBUG:root: An OR list has the form
138DEBUG:root: [4mcommand1[24m [1m|| [4m[22mcommand2[0m
139DEBUG:root: [4mcommand2[24m is executed if and only if [4mcommand1[24m returns a non-zero exit status. The return status of AND and OR lists is the exit status of the last command executed in the list.
140DEBUG:root: [1mCompound Commands[0m
141DEBUG:root: A [4mcompound[24m [4mcommand[24m is one of the following. In most cases a [4mlist[24m in a command's description may be separated from the rest of the command by one or more newlines, and may be followed by a newline in place of a semi‐
142DEBUG:root: colon.
143DEBUG:root: ([4mlist[24m) [4mlist[24m is executed in a subshell environment (see [1mCOMMAND EXECUTION ENVIRONMENT [22mbelow). Variable assignments and builtin commands that affect the shell's environment do not remain in effect after the command
144DEBUG:root: completes. The return status is the exit status of [4mlist[24m.
145DEBUG:root: { [4mlist[24m; }
146DEBUG:root: [4mlist[24m is simply executed in the current shell environment. [4mlist[24m must be terminated with a newline or semicolon. This is known as a [4mgroup[24m [4mcommand[24m. The return status is the exit status of [4mlist[24m. Note that un‐
147DEBUG:root: like the metacharacters [1m( [22mand [1m)[22m, [1m{ [22mand [1m} [22mare [4mreserved[24m [4mwords[24m and must occur where a reserved word is permitted to be recognized. Since they do not cause a word break, they must be separated from [4mlist[24m by white‐
148DEBUG:root: space or another shell metacharacter.
149DEBUG:root: (([4mexpression[24m))
150DEBUG:root: The [4mexpression[24m is evaluated according to the rules described below under [1mARITHMETIC EVALUATION[22m. If the value of the expression is non-zero, the return status is 0; otherwise the return status is 1. This is
151DEBUG:root: exactly equivalent to [1mlet "[4m[22mexpression[24m[1m"[22m.
152DEBUG:root: [1m[[ [4m[22mexpression[24m [1m]][0m
153DEBUG:root: Return a status of 0 or 1 depending on the evaluation of the conditional expression [4mexpression[24m. Expressions are composed of the primaries described below under [1mCONDITIONAL EXPRESSIONS[22m. Word splitting and
154DEBUG:root: pathname expansion are not performed on the words between the [1m[[ [22mand [1m]][22m; tilde expansion, parameter and variable expansion, arithmetic expansion, command substitution, process substitution, and quote removal
155DEBUG:root: are performed. Conditional operators such as [1m-f [22mmust be unquoted to be recognized as primaries.
156DEBUG:root: When used with [1m[[[22m, the [1m< [22mand [1m> [22moperators sort lexicographically using the current locale.
157DEBUG:root: When the [1m== [22mand [1m!= [22moperators are used, the string to the right of the operator is considered a pattern and matched according to the rules described below under [1mPattern Matching[22m, as if the [1mextglob [22mshell option
158DEBUG:root: were enabled. The [1m= [22moperator is equivalent to [1m==[22m. If the [1mnocasematch [22mshell option is enabled, the match is performed without regard to the case of alphabetic characters. The return value is 0 if the string
159DEBUG:root: matches ([1m==[22m) or does not match ([1m!=[22m) the pattern, and 1 otherwise. Any part of the pattern may be quoted to force the quoted portion to be matched as a string.
160DEBUG:root: An additional binary operator, [1m=~[22m, is available, with the same precedence as [1m== [22mand [1m!=[22m. When it is used, the string to the right of the operator is considered an extended regular expression and matched ac‐
161DEBUG:root: cordingly (as in [4mregex[24m(3)). The return value is 0 if the string matches the pattern, and 1 otherwise. If the regular expression is syntactically incorrect, the conditional expression's return value is 2. If
162DEBUG:root: the [1mnocasematch [22mshell option is enabled, the match is performed without regard to the case of alphabetic characters. Any part of the pattern may be quoted to force the quoted portion to be matched as a
163DEBUG:root: string. Bracket expressions in regular expressions must be treated carefully, since normal quoting characters lose their meanings between brackets. If the pattern is stored in a shell variable, quoting the
164DEBUG:root: variable expansion forces the entire pattern to be matched as a string. Substrings matched by parenthesized subexpressions within the regular expression are saved in the array variable [1mBASH_REMATCH[22m. The ele‐
165DEBUG:root: ment of [1mBASH_REMATCH [22mwith index 0 is the portion of the string matching the entire regular expression. The element of [1mBASH_REMATCH [22mwith index [4mn[24m is the portion of the string matching the [4mn[24mth parenthesized sub‐
166DEBUG:root: expression.
167DEBUG:root: Expressions may be combined using the following operators, listed in decreasing order of precedence:
168DEBUG:root: [1m( [4m[22mexpression[24m [1m)[0m
169DEBUG:root: Returns the value of [4mexpression[24m. This may be used to override the normal precedence of operators.
170DEBUG:root: [1m! [4m[22mexpression[0m
171DEBUG:root: True if [4mexpression[24m is false.
172DEBUG:root: [4mexpression1[24m [1m&& [4m[22mexpression2[0m
173DEBUG:root: True if both [4mexpression1[24m and [4mexpression2[24m are true.
174DEBUG:root: [4mexpression1[24m [1m|| [4m[22mexpression2[0m
175DEBUG:root: True if either [4mexpression1[24m or [4mexpression2[24m is true.
176DEBUG:root: The [1m&& [22mand [1m|| [22moperators do not evaluate [4mexpression2[24m if the value of [4mexpression1[24m is sufficient to determine the return value of the entire conditional expression.
177DEBUG:root: [1mfor [4m[22mname[24m [ [ [1min [22m[ [4mword[24m [4m...[24m ] ] ; ] [1mdo [4m[22mlist[24m ; [1mdone[0m
178DEBUG:root: The list of words following [1min [22mis expanded, generating a list of items. The variable [4mname[24m is set to each element of this list in turn, and [4mlist[24m is executed each time. If the [1min [4m[22mword[24m is omitted, the [1mfor [22mcom‐
179DEBUG:root: mand executes [4mlist[24m once for each positional parameter that is set (see [1mPARAMETERS [22mbelow). The return status is the exit status of the last command that executes. If the expansion of the items following [1min[0m
180DEBUG:root: results in an empty list, no commands are executed, and the return status is 0.
181DEBUG:root: [1mfor [22m(( [4mexpr1[24m ; [4mexpr2[24m ; [4mexpr3[24m )) ; [1mdo [4m[22mlist[24m ; [1mdone[0m
182DEBUG:root: First, the arithmetic expression [4mexpr1[24m is evaluated according to the rules described below under [1mARITHMETIC EVALUATION[22m. The arithmetic expression [4mexpr2[24m is then evaluated repeatedly until it evaluates to zero.
183DEBUG:root: Each time [4mexpr2[24m evaluates to a non-zero value, [4mlist[24m is executed and the arithmetic expression [4mexpr3[24m is evaluated. If any expression is omitted, it behaves as if it evaluates to 1. The return value is the
184DEBUG:root: exit status of the last command in [4mlist[24m that is executed, or false if any of the expressions is invalid.
185DEBUG:root: [1mselect [4m[22mname[24m [ [1min [4m[22mword[24m ] ; [1mdo [4m[22mlist[24m ; [1mdone[0m
186DEBUG:root: The list of words following [1min [22mis expanded, generating a list of items. The set of expanded words is printed on the standard error, each preceded by a number. If the [1min [4m[22mword[24m is omitted, the positional param‐
187DEBUG:root: eters are printed (see [1mPARAMETERS [22mbelow). The [1mPS3 [22mprompt is then displayed and a line read from the standard input. If the line consists of a number corresponding to one of the displayed words, then the
188DEBUG:root: value of [4mname[24m is set to that word. If the line is empty, the words and prompt are displayed again. If EOF is read, the command completes. Any other value read causes [4mname[24m to be set to null. The line read
189DEBUG:root: is saved in the variable [1mREPLY[22m. The [4mlist[24m is executed after each selection until a [1mbreak [22mcommand is executed. The exit status of [1mselect [22mis the exit status of the last command executed in [4mlist[24m, or zero if no
190DEBUG:root: commands were executed.
191DEBUG:root: [1mcase [4m[22mword[24m [1min [22m[ [(] [4mpattern[24m [ [1m| [4m[22mpattern[24m ] ... ) [4mlist[24m ;; ] ... [1mesac[0m
192DEBUG:root: A [1mcase [22mcommand first expands [4mword[24m, and tries to match it against each [4mpattern[24m in turn, using the same matching rules as for pathname expansion (see [1mPathname Expansion [22mbelow). The [4mword[24m is expanded using tilde
193DEBUG:root: expansion, parameter and variable expansion, arithmetic expansion, command substitution, process substitution and quote removal. Each [4mpattern[24m examined is expanded using tilde expansion, parameter and variable
194DEBUG:root: expansion, arithmetic expansion, command substitution, and process substitution. If the [1mnocasematch [22mshell option is enabled, the match is performed without regard to the case of alphabetic characters. When a
195DEBUG:root: match is found, the corresponding [4mlist[24m is executed. If the [1m;; [22moperator is used, no subsequent matches are attempted after the first pattern match. Using [1m;& [22min place of [1m;; [22mcauses execution to continue with
196DEBUG:root: the [4mlist[24m associated with the next set of patterns. Using [1m;;& [22min place of [1m;; [22mcauses the shell to test the next pattern list in the statement, if any, and execute any associated [4mlist[24m on a successful match. The
197DEBUG:root: exit status is zero if no pattern matches. Otherwise, it is the exit status of the last command executed in [4mlist[24m.
198DEBUG:root: [1mif [4m[22mlist[24m; [1mthen [4m[22mlist[24m; [ [1melif [4m[22mlist[24m; [1mthen [4m[22mlist[24m; ] ... [ [1melse [4m[22mlist[24m; ] [1mfi[0m
199DEBUG:root: The [1mif [4m[22mlist[24m is executed. If its exit status is zero, the [1mthen [4m[22mlist[24m is executed. Otherwise, each [1melif [4m[22mlist[24m is executed in turn, and if its exit status is zero, the corresponding [1mthen [4m[22mlist[24m is executed and the
200DEBUG:root: command completes. Otherwise, the [1melse [4m[22mlist[24m is executed, if present. The exit status is the exit status of the last command executed, or zero if no condition tested true.
201DEBUG:root: [1mwhile [4m[22mlist-1[24m; [1mdo [4m[22mlist-2[24m; [1mdone[0m
202DEBUG:root: [1muntil [4m[22mlist-1[24m; [1mdo [4m[22mlist-2[24m; [1mdone[0m
203DEBUG:root: The [1mwhile [22mcommand continuously executes the list [4mlist-2[24m as long as the last command in the list [4mlist-1[24m returns an exit status of zero. The [1muntil [22mcommand is identical to the [1mwhile [22mcommand, except that the test
204DEBUG:root: is negated: [4mlist-2[24m is executed as long as the last command in [4mlist-1[24m returns a non-zero exit status. The exit status of the [1mwhile [22mand [1muntil [22mcommands is the exit status of the last command executed in [4mlist-2[24m,
205DEBUG:root: or zero if none was executed.
206DEBUG:root: [1mCoprocesses[0m
207DEBUG:root: A [4mcoprocess[24m is a shell command preceded by the [1mcoproc [22mreserved word. A coprocess is executed asynchronously in a subshell, as if the command had been terminated with the [1m& [22mcontrol operator, with a two-way pipe es‐
208DEBUG:root: tablished between the executing shell and the coprocess.
209DEBUG:root: The format for a coprocess is:
210DEBUG:root: [1mcoproc [22m[[4mNAME[24m] [4mcommand[24m [[4mredirections[24m]
211DEBUG:root: This creates a coprocess named [4mNAME[24m. If [4mNAME[24m is not supplied, the default name is [1mCOPROC[22m. [4mNAME[24m must not be supplied if [4mcommand[24m is a [4msimple[24m [4mcommand[24m (see above); otherwise, it is interpreted as the first word of the
212DEBUG:root: simple command. When the coprocess is executed, the shell creates an array variable (see [1mArrays [22mbelow) named [4mNAME[24m in the context of the executing shell. The standard output of [4mcommand[24m is connected via a pipe to a
213DEBUG:root: file descriptor in the executing shell, and that file descriptor is assigned to [4mNAME[24m[0]. The standard input of [4mcommand[24m is connected via a pipe to a file descriptor in the executing shell, and that file descriptor is
214DEBUG:root: assigned to [4mNAME[24m[1]. This pipe is established before any redirections specified by the command (see [1mREDIRECTION [22mbelow). The file descriptors can be utilized as arguments to shell commands and redirections using
215DEBUG:root: standard word expansions. The file descriptors are not available in subshells. The process ID of the shell spawned to execute the coprocess is available as the value of the variable [4mNAME[24m_PID. The [1mwait [22mbuiltin com‐
216DEBUG:root: mand may be used to wait for the coprocess to terminate.
217DEBUG:root: Since the coprocess is created as an asynchronous command, the [1mcoproc [22mcommand always returns success. The return status of a coprocess is the exit status of [4mcommand[24m.
218DEBUG:root: [1mShell Function Definitions[0m
219DEBUG:root: A shell function is an object that is called like a simple command and executes a compound command with a new set of positional parameters. Shell functions are declared as follows:
220DEBUG:root: [4mname[24m () [4mcompound-command[24m [[4mredirection[24m]
221DEBUG:root: [1mfunction [4m[22mname[24m [()] [4mcompound-command[24m [[4mredirection[24m]
222DEBUG:root: This defines a function named [4mname[24m. The reserved word [1mfunction [22mis optional. If the [1mfunction [22mreserved word is supplied, the parentheses are optional. The [4mbody[24m of the function is the compound command [4mcom‐[0m
223DEBUG:root: [4mpound-command[24m (see [1mCompound Commands [22mabove). That command is usually a [4mlist[24m of commands between { and }, but may be any command listed under [1mCompound Commands [22mabove, with one exception: If the [1mfunction [22mre‐
224DEBUG:root: served word is used, but the parentheses are not supplied, the braces are required. [4mcompound-command[24m is executed whenever [4mname[24m is specified as the name of a simple command. When in [4mposix[24m [4mmode[24m, [4mname[24m may not
225DEBUG:root: be the name of one of the POSIX [4mspecial[24m [4mbuiltins[24m. Any redirections (see [1mREDIRECTION [22mbelow) specified when a function is defined are performed when the function is executed. The exit status of a function def‐
226DEBUG:root: inition is zero unless a syntax error occurs or a readonly function with the same name already exists. When executed, the exit status of a function is the exit status of the last command executed in the body.
227DEBUG:root: (See [1mFUNCTIONS [22mbelow.)
228DEBUG:root:[1mCOMMENTS[0m
229DEBUG:root: In a non-interactive shell, or an interactive shell in which the [1minteractive_comments [22moption to the [1mshopt [22mbuiltin is enabled (see [1mSHELL BUILTIN COMMANDS [22mbelow), a word beginning with [1m# [22mcauses that word and all re‐
230DEBUG:root: maining characters on that line to be ignored. An interactive shell without the [1minteractive_comments [22moption enabled does not allow comments. The [1minteractive_comments [22moption is on by default in interactive shells.
231DEBUG:root:[1mQUOTING[0m
232DEBUG:root: [4mQuoting[24m is used to remove the special meaning of certain characters or words to the shell. Quoting can be used to disable special treatment for special characters, to prevent reserved words from being recognized as
233DEBUG:root: such, and to prevent parameter expansion.
234DEBUG:root: Each of the [4mmetacharacters[24m listed above under [1mDEFINITIONS [22mhas special meaning to the shell and must be quoted if it is to represent itself.
235DEBUG:root: When the command history expansion facilities are being used (see [1mHISTORY EXPANSION [22mbelow), the [4mhistory[24m [4mexpansion[24m character, usually [1m![22m, must be quoted to prevent history expansion.
236DEBUG:root: There are three quoting mechanisms: the [4mescape[24m [4mcharacter[24m, single quotes, and double quotes.
237DEBUG:root: A non-quoted backslash ([1m\[22m) is the [4mescape[24m [4mcharacter[24m. It preserves the literal value of the next character that follows, with the exception of <newline>. If a [1m\[22m<newline> pair appears, and the backslash is not itself
238DEBUG:root: quoted, the [1m\[22m<newline> is treated as a line continuation (that is, it is removed from the input stream and effectively ignored).
239DEBUG:root: Enclosing characters in single quotes preserves the literal value of each character within the quotes. A single quote may not occur between single quotes, even when preceded by a backslash.
240DEBUG:root: Enclosing characters in double quotes preserves the literal value of all characters within the quotes, with the exception of [1m$[22m, [1m`[22m, [1m\[22m, and, when history expansion is enabled, [1m![22m. When the shell is in [4mposix[24m [4mmode[24m, the [1m![0m
241DEBUG:root: has no special meaning within double quotes, even when history expansion is enabled. The characters [1m$ [22mand [1m` [22mretain their special meaning within double quotes. The backslash retains its special meaning only when
242DEBUG:root: followed by one of the following characters: [1m$[22m, [1m`[22m, [1m"[22m, [1m\[22m, or [1m<newline>[22m. A double quote may be quoted within double quotes by preceding it with a backslash. If enabled, history expansion will be performed unless an [1m![0m
243DEBUG:root: appearing in double quotes is escaped using a backslash. The backslash preceding the [1m! [22mis not removed.
244DEBUG:root: The special parameters [1m* [22mand [1m@ [22mhave special meaning when in double quotes (see [1mPARAMETERS [22mbelow).
245DEBUG:root: Words of the form [1m$[22m'[4mstring[24m' are treated specially. The word expands to [4mstring[24m, with backslash-escaped characters replaced as specified by the ANSI C standard. Backslash escape sequences, if present, are decoded as
246DEBUG:root: follows:
247DEBUG:root: [1m\a [22malert (bell)
248DEBUG:root: [1m\b [22mbackspace
249DEBUG:root: [1m\e[0m
250DEBUG:root: [1m\E [22man escape character
251DEBUG:root: [1m\f [22mform feed
252DEBUG:root: [1m\n [22mnew line
253DEBUG:root: [1m\r [22mcarriage return
254DEBUG:root: [1m\t [22mhorizontal tab
255DEBUG:root: [1m\v [22mvertical tab
256DEBUG:root: [1m\\ [22mbackslash
257DEBUG:root: [1m\' [22msingle quote
258DEBUG:root: [1m\" [22mdouble quote
259DEBUG:root: [1m\? [22mquestion mark
260DEBUG:root: [1m\[4m[22mnnn[24m the eight-bit character whose value is the octal value [4mnnn[24m (one to three digits)
261DEBUG:root: [1m\x[4m[22mHH[24m the eight-bit character whose value is the hexadecimal value [4mHH[24m (one or two hex digits)
262DEBUG:root: [1m\u[4m[22mHHHH[24m the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value [4mHHHH[24m (one to four hex digits)
263DEBUG:root: [1m\U[4m[22mHHHHHHHH[0m
264DEBUG:root: the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value [4mHHHHHHHH[24m (one to eight hex digits)
265DEBUG:root: [1m\c[4m[22mx[24m a control-[4mx[24m character
266DEBUG:root: The expanded result is single-quoted, as if the dollar sign had not been present.
267DEBUG:root: A double-quoted string preceded by a dollar sign ([1m$[22m"[4mstring[24m") will cause the string to be translated according to the current locale. If the current locale is [1mC [22mor [1mPOSIX[22m, the dollar sign is ignored. If the string is
268DEBUG:root: translated and replaced, the replacement is double-quoted.
269DEBUG:root:[1mPARAMETERS[0m
270DEBUG:root: A [4mparameter[24m is an entity that stores values. It can be a [4mname[24m, a number, or one of the special characters listed below under [1mSpecial Parameters[22m. A [4mvariable[24m is a parameter denoted by a [4mname[24m. A variable has a [4mvalue[0m
271DEBUG:root: and zero or more [4mattributes[24m. Attributes are assigned using the [1mdeclare [22mbuiltin command (see [1mdeclare [22mbelow in [1mSHELL BUILTIN COMMANDS[22m).
272DEBUG:root: A parameter is set if it has been assigned a value. The null string is a valid value. Once a variable is set, it may be unset only by using the [1munset [22mbuiltin command (see [1mSHELL BUILTIN COMMANDS [22mbelow).
273DEBUG:root: A [4mvariable[24m may be assigned to by a statement of the form
274DEBUG:root: [4mname[24m=[[4mvalue[24m]
275DEBUG:root: If [4mvalue[24m is not given, the variable is assigned the null string. All [4mvalues[24m undergo tilde expansion, parameter and variable expansion, command substitution, arithmetic expansion, and quote removal (see [1mEXPANSION [22mbe‐
276DEBUG:root: low). If the variable has its [1minteger [22mattribute set, then [4mvalue[24m is evaluated as an arithmetic expression even if the $((...)) expansion is not used (see [1mArithmetic Expansion [22mbelow). Word splitting is not performed,
277DEBUG:root: with the exception of [1m"$@" [22mas explained below under [1mSpecial Parameters[22m. Pathname expansion is not performed. Assignment statements may also appear as arguments to the [1malias[22m, [1mdeclare[22m, [1mtypeset[22m, [1mexport[22m, [1mreadonly[22m, and
278DEBUG:root: [1mlocal [22mbuiltin commands ([4mdeclaration[24m commands). When in [4mposix[24m [4mmode[24m, these builtins may appear in a command after one or more instances of the [1mcommand [22mbuiltin and retain these assignment statement properties.
279DEBUG:root: In the context where an assignment statement is assigning a value to a shell variable or array index, the += operator can be used to append to or add to the variable's previous value. This includes arguments to
280DEBUG:root: builtin commands such as [1mdeclare [22mthat accept assignment statements ([4mdeclaration[24m commands). When += is applied to a variable for which the [4minteger[24m attribute has been set, [4mvalue[24m is evaluated as an arithmetic expres‐
281DEBUG:root: sion and added to the variable's current value, which is also evaluated. When += is applied to an array variable using compound assignment (see [1mArrays [22mbelow), the variable's value is not unset (as it is when using
282DEBUG:root: =), and new values are appended to the array beginning at one greater than the array's maximum index (for indexed arrays) or added as additional key-value pairs in an associative array. When applied to a string-val‐
283DEBUG:root: ued variable, [4mvalue[24m is expanded and appended to the variable's value.
284DEBUG:root: A variable can be assigned the [4mnameref[24m attribute using the [1m-n [22moption to the [1mdeclare [22mor [1mlocal [22mbuiltin commands (see the descriptions of [1mdeclare [22mand [1mlocal [22mbelow) to create a [4mnameref[24m, or a reference to another variable.
285DEBUG:root: This allows variables to be manipulated indirectly. Whenever the nameref variable is referenced, assigned to, unset, or has its attributes modified (other than using or changing the [4mnameref[24m attribute itself), the
286DEBUG:root: operation is actually performed on the variable specified by the nameref variable's value. A nameref is commonly used within shell functions to refer to a variable whose name is passed as an argument to the func‐
287DEBUG:root: tion. For instance, if a variable name is passed to a shell function as its first argument, running
288DEBUG:root: declare -n ref=$1
289DEBUG:root: inside the function creates a nameref variable [1mref [22mwhose value is the variable name passed as the first argument. References and assignments to [1mref[22m, and changes to its attributes, are treated as references, assign‐
290DEBUG:root: ments, and attribute modifications to the variable whose name was passed as [1m$1[22m. If the control variable in a [1mfor [22mloop has the nameref attribute, the list of words can be a list of shell variables, and a name refer‐
291DEBUG:root: ence will be established for each word in the list, in turn, when the loop is executed. Array variables cannot be given the [1mnameref [22mattribute. However, nameref variables can reference array variables and sub‐
292DEBUG:root: scripted array variables. Namerefs can be unset using the [1m-n [22moption to the [1munset [22mbuiltin. Otherwise, if [1munset [22mis executed with the name of a nameref variable as an argument, the variable referenced by the nameref
293DEBUG:root: variable will be unset.
294DEBUG:root: [1mPositional Parameters[0m
295DEBUG:root: A [4mpositional[24m [4mparameter[24m is a parameter denoted by one or more digits, other than the single digit 0. Positional parameters are assigned from the shell's arguments when it is invoked, and may be reassigned using the
296DEBUG:root: [1mset [22mbuiltin command. Positional parameters may not be assigned to with assignment statements. The positional parameters are temporarily replaced when a shell function is executed (see [1mFUNCTIONS [22mbelow).
297DEBUG:root: When a positional parameter consisting of more than a single digit is expanded, it must be enclosed in braces (see [1mEXPANSION [22mbelow).
298DEBUG:root: [1mSpecial Parameters[0m
299DEBUG:root: The shell treats several parameters specially. These parameters may only be referenced; assignment to them is not allowed.
300DEBUG:root: [1m* [22mExpands to the positional parameters, starting from one. When the expansion is not within double quotes, each positional parameter expands to a separate word. In contexts where it is performed, those words
301DEBUG:root: are subject to further word splitting and pathname expansion. When the expansion occurs within double quotes, it expands to a single word with the value of each parameter separated by the first character of
302DEBUG:root: the [1mIFS [22mspecial variable. That is, "[1m$*[22m" is equivalent to "[1m$1[4m[22mc[24m[1m$2[4m[22mc[24m[1m...[22m", where [4mc[24m is the first character of the value of the [1mIFS [22mvariable. If [1mIFS [22mis unset, the parameters are separated by spaces. If [1mIFS [22mis
303DEBUG:root: null, the parameters are joined without intervening separators.
304DEBUG:root: [1m@ [22mExpands to the positional parameters, starting from one. When the expansion occurs within double quotes, each parameter expands to a separate word. That is, "[1m$@[22m" is equivalent to "[1m$1[22m" "[1m$2[22m" ... If the dou‐
305DEBUG:root: ble-quoted expansion occurs within a word, the expansion of the first parameter is joined with the beginning part of the original word, and the expansion of the last parameter is joined with the last part of
306DEBUG:root: the original word. When there are no positional parameters, "[1m$@[22m" and [1m$@ [22mexpand to nothing (i.e., they are removed).
307DEBUG:root: [1m# [22mExpands to the number of positional parameters in decimal.
308DEBUG:root: [1m? [22mExpands to the exit status of the most recently executed foreground pipeline.
309DEBUG:root: [1m- [22mExpands to the current option flags as specified upon invocation, by the [1mset [22mbuiltin command, or those set by the shell itself (such as the [1m-i [22moption).
310DEBUG:root: [1m$ [22mExpands to the process ID of the shell. In a () subshell, it expands to the process ID of the current shell, not the subshell.
311DEBUG:root: [1m! [22mExpands to the process ID of the job most recently placed into the background, whether executed as an asynchronous command or using the [1mbg [22mbuiltin (see [1mJOB CONTROL [22mbelow).
312DEBUG:root: [1m0 [22mExpands to the name of the shell or shell script. This is set at shell initialization. If [1mbash [22mis invoked with a file of commands, [1m$0 [22mis set to the name of that file. If [1mbash [22mis started with the [1m-c [22moption,
313DEBUG:root: then [1m$0 [22mis set to the first argument after the string to be executed, if one is present. Otherwise, it is set to the filename used to invoke [1mbash[22m, as given by argument zero.
314DEBUG:root: [1m_ [22mAt shell startup, set to the absolute pathname used to invoke the shell or shell script being executed as passed in the environment or argument list. Subsequently, expands to the last argument to the previous
315DEBUG:root: command, after expansion. Also set to the full pathname used to invoke each command executed and placed in the environment exported to that command. When checking mail, this parameter holds the name of the
316DEBUG:root: mail file currently being checked.
317DEBUG:root: [1mShell Variables[0m
318DEBUG:root: The following variables are set by the shell:
319DEBUG:root: [1mBASH [22mExpands to the full filename used to invoke this instance of [1mbash[22m.
320DEBUG:root: [1mBASHOPTS[0m
321DEBUG:root: A colon-separated list of enabled shell options. Each word in the list is a valid argument for the [1m-s [22moption to the [1mshopt [22mbuiltin command (see [1mSHELL BUILTIN COMMANDS [22mbelow). The options appearing in [1mBASHOPTS[0m
322DEBUG:root: are those reported as [4mon[24m by [1mshopt[22m. If this variable is in the environment when [1mbash [22mstarts up, each shell option in the list will be enabled before reading any startup files. This variable is read-only.
323DEBUG:root: [1mBASHPID[0m
324DEBUG:root: Expands to the process ID of the current [1mbash [22mprocess. This differs from [1m$$ [22munder certain circumstances, such as subshells that do not require [1mbash [22mto be re-initialized.
325DEBUG:root: [1mBASH_ALIASES[0m
326DEBUG:root: An associative array variable whose members correspond to the internal list of aliases as maintained by the [1malias [22mbuiltin. Elements added to this array appear in the alias list; however, unsetting array ele‐
327DEBUG:root: ments currently does not cause aliases to be removed from the alias list. If [1mBASH_ALIASES [22mis unset, it loses its special properties, even if it is subsequently reset.
328DEBUG:root: [1mBASH_ARGC[0m
329DEBUG:root: An array variable whose values are the number of parameters in each frame of the current [1mbash [22mexecution call stack. The number of parameters to the current subroutine (shell function or script executed with [1m.[0m
330DEBUG:root: or [1msource[22m) is at the top of the stack. When a subroutine is executed, the number of parameters passed is pushed onto [1mBASH_ARGC[22m. The shell sets [1mBASH_ARGC [22monly when in extended debugging mode (see the descrip‐
331DEBUG:root: tion of the [1mextdebug [22moption to the [1mshopt [22mbuiltin below)
332DEBUG:root: [1mBASH_ARGV[0m
333DEBUG:root: An array variable containing all of the parameters in the current [1mbash [22mexecution call stack. The final parameter of the last subroutine call is at the top of the stack; the first parameter of the initial call
334DEBUG:root: is at the bottom. When a subroutine is executed, the parameters supplied are pushed onto [1mBASH_ARGV[22m. The shell sets [1mBASH_ARGV [22monly when in extended debugging mode (see the description of the [1mextdebug [22moption
335DEBUG:root: to the [1mshopt [22mbuiltin below)
336DEBUG:root: [1mBASH_CMDS[0m
337DEBUG:root: An associative array variable whose members correspond to the internal hash table of commands as maintained by the [1mhash [22mbuiltin. Elements added to this array appear in the hash table; however, unsetting array
338DEBUG:root: elements currently does not cause command names to be removed from the hash table. If [1mBASH_CMDS [22mis unset, it loses its special properties, even if it is subsequently reset.
339DEBUG:root: [1mBASH_COMMAND[0m
340DEBUG:root: The command currently being executed or about to be executed, unless the shell is executing a command as the result of a trap, in which case it is the command executing at the time of the trap.
341DEBUG:root: [1mBASH_EXECUTION_STRING[0m
342DEBUG:root: The command argument to the [1m-c [22minvocation option.
343DEBUG:root: [1mBASH_LINENO[0m
344DEBUG:root: An array variable whose members are the line numbers in source files where each corresponding member of [1mFUNCNAME [22mwas invoked. [1m${BASH_LINENO[[4m[22m$i[24m[1m]} [22mis the line number in the source file ([1m${BASH_SOURCE[[4m[22m$i+1[24m[1m]}[22m)
345DEBUG:root: where [1m${FUNCNAME[[4m[22m$i[24m[1m]} [22mwas called (or [1m${BASH_LINENO[[4m[22m$i-1[24m[1m]} [22mif referenced within another shell function). Use [1mLINENO [22mto obtain the current line number.
346DEBUG:root: [1mBASH_LOADABLES_PATH[0m
347DEBUG:root: A colon-separated list of directories in which the shell looks for dynamically loadable builtins specified by the [1menable [22mcommand.
348DEBUG:root: [1mBASH_REMATCH[0m
349DEBUG:root: An array variable whose members are assigned by the [1m=~ [22mbinary operator to the [1m[[ [22mconditional command. The element with index 0 is the portion of the string matching the entire regular expression. The element
350DEBUG:root: with index [4mn[24m is the portion of the string matching the [4mn[24mth parenthesized subexpression. This variable is read-only.
351DEBUG:root: [1mBASH_SOURCE[0m
352DEBUG:root: An array variable whose members are the source filenames where the corresponding shell function names in the [1mFUNCNAME [22marray variable are defined. The shell function [1m${FUNCNAME[[4m[22m$i[24m[1m]} [22mis defined in the file
353DEBUG:root: [1m${BASH_SOURCE[[4m[22m$i[24m[1m]} [22mand called from [1m${BASH_SOURCE[[4m[22m$i+1[24m[1m]}[22m.
354DEBUG:root: [1mBASH_SUBSHELL[0m
355DEBUG:root: Incremented by one within each subshell or subshell environment when the shell begins executing in that environment. The initial value is 0.
356DEBUG:root: [1mBASH_VERSINFO[0m
357DEBUG:root: A readonly array variable whose members hold version information for this instance of [1mbash[22m. The values assigned to the array members are as follows:
358DEBUG:root: [1mBASH_VERSINFO[[22m0[1m] [22mThe major version number (the [4mrelease[24m).
359DEBUG:root: [1mBASH_VERSINFO[[22m1[1m] [22mThe minor version number (the [4mversion[24m).
360DEBUG:root: [1mBASH_VERSINFO[[22m2[1m] [22mThe patch level.
361DEBUG:root: [1mBASH_VERSINFO[[22m3[1m] [22mThe build version.
362DEBUG:root: [1mBASH_VERSINFO[[22m4[1m] [22mThe release status (e.g., [4mbeta1[24m).
363DEBUG:root: [1mBASH_VERSINFO[[22m5[1m] [22mThe value of [1mMACHTYPE[22m.
364DEBUG:root: [1mBASH_VERSION[0m
365DEBUG:root: Expands to a string describing the version of this instance of [1mbash[22m.
366DEBUG:root: [1mCOMP_CWORD[0m
367DEBUG:root: An index into [1m${COMP_WORDS} [22mof the word containing the current cursor position. This variable is available only in shell functions invoked by the programmable completion facilities (see [1mProgrammable Comple‐[0m
368DEBUG:root: [1mtion [22mbelow).
369DEBUG:root: [1mCOMP_KEY[0m
370DEBUG:root: The key (or final key of a key sequence) used to invoke the current completion function.
371DEBUG:root: [1mCOMP_LINE[0m
372DEBUG:root: The current command line. This variable is available only in shell functions and external commands invoked by the programmable completion facilities (see [1mProgrammable Completion [22mbelow).
373DEBUG:root: [1mCOMP_POINT[0m
374DEBUG:root: The index of the current cursor position relative to the beginning of the current command. If the current cursor position is at the end of the current command, the value of this variable is equal to
375DEBUG:root: [1m${#COMP_LINE}[22m. This variable is available only in shell functions and external commands invoked by the programmable completion facilities (see [1mProgrammable Completion [22mbelow).
376DEBUG:root: [1mCOMP_TYPE[0m
377DEBUG:root: Set to an integer value corresponding to the type of completion attempted that caused a completion function to be called: [4mTAB[24m, for normal completion, [4m?[24m, for listing completions after successive tabs, [4m![24m, for
378DEBUG:root: listing alternatives on partial word completion, [4m@[24m, to list completions if the word is not unmodified, or [4m%[24m, for menu completion. This variable is available only in shell functions and external commands in‐
379DEBUG:root: voked by the programmable completion facilities (see [1mProgrammable Completion [22mbelow).
380DEBUG:root: [1mCOMP_WORDBREAKS[0m
381DEBUG:root: The set of characters that the [1mreadline [22mlibrary treats as word separators when performing word completion. If [1mCOMP_WORDBREAKS [22mis unset, it loses its special properties, even if it is subsequently reset.
382DEBUG:root: [1mCOMP_WORDS[0m
383DEBUG:root: An array variable (see [1mArrays [22mbelow) consisting of the individual words in the current command line. The line is split into words as [1mreadline [22mwould split it, using [1mCOMP_WORDBREAKS [22mas described above. This
384DEBUG:root: variable is available only in shell functions invoked by the programmable completion facilities (see [1mProgrammable Completion [22mbelow).
385DEBUG:root: [1mCOPROC [22mAn array variable (see [1mArrays [22mbelow) created to hold the file descriptors for output from and input to an unnamed coprocess (see [1mCoprocesses [22mabove).
386DEBUG:root: [1mDIRSTACK[0m
387DEBUG:root: An array variable (see [1mArrays [22mbelow) containing the current contents of the directory stack. Directories appear in the stack in the order they are displayed by the [1mdirs [22mbuiltin. Assigning to members of this
388DEBUG:root: array variable may be used to modify directories already in the stack, but the [1mpushd [22mand [1mpopd [22mbuiltins must be used to add and remove directories. Assignment to this variable will not change the current di‐
389DEBUG:root: rectory. If [1mDIRSTACK [22mis unset, it loses its special properties, even if it is subsequently reset.
390DEBUG:root: [1mEUID [22mExpands to the effective user ID of the current user, initialized at shell startup. This variable is readonly.
391DEBUG:root: [1mFUNCNAME[0m
392DEBUG:root: An array variable containing the names of all shell functions currently in the execution call stack. The element with index 0 is the name of any currently-executing shell function. The bottom-most element
393DEBUG:root: (the one with the highest index) is "main". This variable exists only when a shell function is executing. Assignments to [1mFUNCNAME [22mhave no effect. If [1mFUNCNAME [22mis unset, it loses its special properties, even
394DEBUG:root: if it is subsequently reset.
395DEBUG:root: This variable can be used with [1mBASH_LINENO [22mand [1mBASH_SOURCE[22m. Each element of [1mFUNCNAME [22mhas corresponding elements in [1mBASH_LINENO [22mand [1mBASH_SOURCE [22mto describe the call stack. For instance, [1m${FUNCNAME[[4m[22m$i[24m[1m]} [22mwas
396DEBUG:root: called from the file [1m${BASH_SOURCE[[4m[22m$i+1[24m[1m]} [22mat line number [1m${BASH_LINENO[[4m[22m$i[24m[1m]}[22m. The [1mcaller [22mbuiltin displays the current call stack using this information.
397DEBUG:root: [1mGROUPS [22mAn array variable containing the list of groups of which the current user is a member. Assignments to [1mGROUPS [22mhave no effect. If [1mGROUPS [22mis unset, it loses its special properties, even if it is subsequently
398DEBUG:root: reset.
399DEBUG:root: [1mHISTCMD[0m
400DEBUG:root: The history number, or index in the history list, of the current command. If [1mHISTCMD [22mis unset, it loses its special properties, even if it is subsequently reset.
401DEBUG:root: [1mHOSTNAME[0m
402DEBUG:root: Automatically set to the name of the current host.
403DEBUG:root: [1mHOSTTYPE[0m
404DEBUG:root: Automatically set to a string that uniquely describes the type of machine on which [1mbash [22mis executing. The default is system-dependent.
405DEBUG:root: [1mLINENO [22mEach time this parameter is referenced, the shell substitutes a decimal number representing the current sequential line number (starting with 1) within a script or function. When not in a script or function,
406DEBUG:root: the value substituted is not guaranteed to be meaningful. If [1mLINENO [22mis unset, it loses its special properties, even if it is subsequently reset.
407DEBUG:root: [1mMACHTYPE[0m
408DEBUG:root: Automatically set to a string that fully describes the system type on which [1mbash [22mis executing, in the standard GNU [4mcpu-company-system[24m format. The default is system-dependent.
409DEBUG:root: [1mMAPFILE[0m
410DEBUG:root: An array variable (see [1mArrays [22mbelow) created to hold the text read by the [1mmapfile [22mbuiltin when no variable name is supplied.
411DEBUG:root: [1mOLDPWD [22mThe previous working directory as set by the [1mcd [22mcommand.
412DEBUG:root: [1mOPTARG [22mThe value of the last option argument processed by the [1mgetopts [22mbuiltin command (see [1mSHELL BUILTIN COMMANDS [22mbelow).
413DEBUG:root: [1mOPTIND [22mThe index of the next argument to be processed by the [1mgetopts [22mbuiltin command (see [1mSHELL BUILTIN COMMANDS [22mbelow).
414DEBUG:root: [1mOSTYPE [22mAutomatically set to a string that describes the operating system on which [1mbash [22mis executing. The default is system-dependent.
415DEBUG:root: [1mPIPESTATUS[0m
416DEBUG:root: An array variable (see [1mArrays [22mbelow) containing a list of exit status values from the processes in the most-recently-executed foreground pipeline (which may contain only a single command).
417DEBUG:root: [1mPPID [22mThe process ID of the shell's parent. This variable is readonly.
418DEBUG:root: [1mPWD [22mThe current working directory as set by the [1mcd [22mcommand.
419DEBUG:root: [1mRANDOM [22mEach time this parameter is referenced, a random integer between 0 and 32767 is generated. The sequence of random numbers may be initialized by assigning a value to [1mRANDOM[22m. If [1mRANDOM [22mis unset, it loses its
420DEBUG:root: special properties, even if it is subsequently reset.
421DEBUG:root: [1mREADLINE_LINE[0m
422DEBUG:root: The contents of the [1mreadline [22mline buffer, for use with "bind -x" (see [1mSHELL BUILTIN COMMANDS [22mbelow).
423DEBUG:root: [1mREADLINE_POINT[0m
424DEBUG:root: The position of the insertion point in the [1mreadline [22mline buffer, for use with "bind -x" (see [1mSHELL BUILTIN COMMANDS [22mbelow).
425DEBUG:root: [1mREPLY [22mSet to the line of input read by the [1mread [22mbuiltin command when no arguments are supplied.
426DEBUG:root: [1mSECONDS[0m
427DEBUG:root: Each time this parameter is referenced, the number of seconds since shell invocation is returned. If a value is assigned to [1mSECONDS[22m, the value returned upon subsequent references is the number of seconds
428DEBUG:root: since the assignment plus the value assigned. If [1mSECONDS [22mis unset, it loses its special properties, even if it is subsequently reset.
429DEBUG:root: [1mSHELLOPTS[0m
430DEBUG:root: A colon-separated list of enabled shell options. Each word in the list is a valid argument for the [1m-o [22moption to the [1mset [22mbuiltin command (see [1mSHELL BUILTIN COMMANDS [22mbelow). The options appearing in [1mSHELLOPTS[0m
431DEBUG:root: are those reported as [4mon[24m by [1mset -o[22m. If this variable is in the environment when [1mbash [22mstarts up, each shell option in the list will be enabled before reading any startup files. This variable is read-only.
432DEBUG:root: [1mSHLVL [22mIncremented by one each time an instance of [1mbash [22mis started.
433DEBUG:root: [1mUID [22mExpands to the user ID of the current user, initialized at shell startup. This variable is readonly.
434DEBUG:root: The following variables are used by the shell. In some cases, [1mbash [22massigns a default value to a variable; these cases are noted below.
435DEBUG:root: [1mBASH_COMPAT[0m
436DEBUG:root: The value is used to set the shell's compatibility level. See the description of the [1mshopt [22mbuiltin below under [1mSHELL BUILTIN COMMANDS [22mfor a description of the various compatibility levels and their effects.
437DEBUG:root: The value may be a decimal number (e.g., 4.2) or an integer (e.g., 42) corresponding to the desired compatibility level. If [1mBASH_COMPAT [22mis unset or set to the empty string, the compatibility level is set to
438DEBUG:root: the default for the current version. If [1mBASH_COMPAT [22mis set to a value that is not one of the valid compatibility levels, the shell prints an error message and sets the compatibility level to the default for
439DEBUG:root: the current version. The valid compatibility levels correspond to the compatibility options accepted by the [1mshopt [22mbuiltin described below (for example, [1mcompat42 [22mmeans that 4.2 and 42 are valid values). The
440DEBUG:root: current version is also a valid value.
441DEBUG:root: [1mBASH_ENV[0m
442DEBUG:root: If this parameter is set when [1mbash [22mis executing a shell script, its value is interpreted as a filename containing commands to initialize the shell, as in [4m~/.bashrc[24m. The value of [1mBASH_ENV [22mis subjected to pa‐
443DEBUG:root: rameter expansion, command substitution, and arithmetic expansion before being interpreted as a filename. [1mPATH [22mis not used to search for the resultant filename.
444DEBUG:root: [1mBASH_XTRACEFD[0m
445DEBUG:root: If set to an integer corresponding to a valid file descriptor, [1mbash [22mwill write the trace output generated when [4mset[24m [4m-x[24m is enabled to that file descriptor. The file descriptor is closed when [1mBASH_XTRACEFD [22mis
446DEBUG:root: unset or assigned a new value. Unsetting [1mBASH_XTRACEFD [22mor assigning it the empty string causes the trace output to be sent to the standard error. Note that setting [1mBASH_XTRACEFD [22mto 2 (the standard error file
447DEBUG:root: descriptor) and then unsetting it will result in the standard error being closed.
448DEBUG:root: [1mCDPATH [22mThe search path for the [1mcd [22mcommand. This is a colon-separated list of directories in which the shell looks for destination directories specified by the [1mcd [22mcommand. A sample value is ".:~:/usr".
449DEBUG:root: [1mCHILD_MAX[0m
450DEBUG:root: Set the number of exited child status values for the shell to remember. Bash will not allow this value to be decreased below a POSIX-mandated minimum, and there is a maximum value (currently 8192) that this
451DEBUG:root: may not exceed. The minimum value is system-dependent.
452DEBUG:root: [1mCOLUMNS[0m
453DEBUG:root: Used by the [1mselect [22mcompound command to determine the terminal width when printing selection lists. Automatically set if the [1mcheckwinsize [22moption is enabled or in an interactive shell upon receipt of a [1mSIG‐[0m
454DEBUG:root: [1mWINCH[22m.
455DEBUG:root: [1mCOMPREPLY[0m
456DEBUG:root: An array variable from which [1mbash [22mreads the possible completions generated by a shell function invoked by the programmable completion facility (see [1mProgrammable Completion [22mbelow). Each array element contains
457DEBUG:root: one possible completion.
458DEBUG:root: [1mEMACS [22mIf [1mbash [22mfinds this variable in the environment when the shell starts with value "t", it assumes that the shell is running in an Emacs shell buffer and disables line editing.
459DEBUG:root: [1mENV [22mSimilar to [1mBASH_ENV[22m; used when the shell is invoked in POSIX mode.
460DEBUG:root: [1mEXECIGNORE[0m
461DEBUG:root: A colon-separated list of shell patterns (see [1mPattern Matching[22m) defining the list of filenames to be ignored by command search using [1mPATH[22m. Files whose full pathnames match one of these patterns are not con‐
462DEBUG:root: sidered executable files for the purposes of completion and command execution via [1mPATH [22mlookup. This does not affect the behavior of the [1m[[22m, [1mtest[22m, and [1m[[ [22mcommands. Full pathnames in the command hash table are
463DEBUG:root: not subject to [1mEXECIGNORE[22m. Use this variable to ignore shared library files that have the executable bit set, but are not executable files. The pattern matching honors the setting of the [1mextglob [22mshell op‐
464DEBUG:root: tion.
465DEBUG:root: [1mFCEDIT [22mThe default editor for the [1mfc [22mbuiltin command.
466DEBUG:root: [1mFIGNORE[0m
467DEBUG:root: A colon-separated list of suffixes to ignore when performing filename completion (see [1mREADLINE [22mbelow). A filename whose suffix matches one of the entries in [1mFIGNORE [22mis excluded from the list of matched file‐
468DEBUG:root: names. A sample value is ".o:~".
469DEBUG:root: [1mFUNCNEST[0m
470DEBUG:root: If set to a numeric value greater than 0, defines a maximum function nesting level. Function invocations that exceed this nesting level will cause the current command to abort.
471DEBUG:root: [1mGLOBIGNORE[0m
472DEBUG:root: A colon-separated list of patterns defining the set of filenames to be ignored by pathname expansion. If a filename matched by a pathname expansion pattern also matches one of the patterns in [1mGLOBIGNORE[22m, it
473DEBUG:root: is removed from the list of matches.
474DEBUG:root: [1mHISTCONTROL[0m
475DEBUG:root: A colon-separated list of values controlling how commands are saved on the history list. If the list of values includes [4mignorespace[24m, lines which begin with a [1mspace [22mcharacter are not saved in the history list.
476DEBUG:root: A value of [4mignoredups[24m causes lines matching the previous history entry to not be saved. A value of [4mignoreboth[24m is shorthand for [4mignorespace[24m and [4mignoredups[24m. A value of [4merasedups[24m causes all previous lines
477DEBUG:root: matching the current line to be removed from the history list before that line is saved. Any value not in the above list is ignored. If [1mHISTCONTROL [22mis unset, or does not include a valid value, all lines read
478DEBUG:root: by the shell parser are saved on the history list, subject to the value of [1mHISTIGNORE[22m. The second and subsequent lines of a multi-line compound command are not tested, and are added to the history regardless
479DEBUG:root: of the value of [1mHISTCONTROL[22m.
480DEBUG:root: [1mHISTFILE[0m
481DEBUG:root: The name of the file in which command history is saved (see [1mHISTORY [22mbelow). The default value is [4m~/.bash_history[24m. If unset, the command history is not saved when a shell exits.
482DEBUG:root: [1mHISTFILESIZE[0m
483DEBUG:root: The maximum number of lines contained in the history file. When this variable is assigned a value, the history file is truncated, if necessary, to contain no more than that number of lines by removing the
484DEBUG:root: oldest entries. The history file is also truncated to this size after writing it when a shell exits. If the value is 0, the history file is truncated to zero size. Non-numeric values and numeric values less
485DEBUG:root: than zero inhibit truncation. The shell sets the default value to the value of [1mHISTSIZE [22mafter reading any startup files.
486DEBUG:root: [1mHISTIGNORE[0m
487DEBUG:root: A colon-separated list of patterns used to decide which command lines should be saved on the history list. Each pattern is anchored at the beginning of the line and must match the complete line (no implicit
488DEBUG:root: `[1m*[22m' is appended). Each pattern is tested against the line after the checks specified by [1mHISTCONTROL [22mare applied. In addition to the normal shell pattern matching characters, `[1m&[22m' matches the previous history
489DEBUG:root: line. `[1m&[22m' may be escaped using a backslash; the backslash is removed before attempting a match. The second and subsequent lines of a multi-line compound command are not tested, and are added to the history
490DEBUG:root: regardless of the value of [1mHISTIGNORE[22m. The pattern matching honors the setting of the [1mextglob [22mshell option.
491DEBUG:root: [1mHISTSIZE[0m
492DEBUG:root: The number of commands to remember in the command history (see [1mHISTORY [22mbelow). If the value is 0, commands are not saved in the history list. Numeric values less than zero result in every command being saved
493DEBUG:root: on the history list (there is no limit). The shell sets the default value to 500 after reading any startup files.
494DEBUG:root: [1mHISTTIMEFORMAT[0m
495DEBUG:root: If this variable is set and not null, its value is used as a format string for [4mstrftime[24m(3) to print the time stamp associated with each history entry displayed by the [1mhistory [22mbuiltin. If this variable is set,
496DEBUG:root: time stamps are written to the history file so they may be preserved across shell sessions. This uses the history comment character to distinguish timestamps from other history lines.
497DEBUG:root: [1mHOME [22mThe home directory of the current user; the default argument for the [1mcd [22mbuiltin command. The value of this variable is also used when performing tilde expansion.
498DEBUG:root: [1mHOSTFILE[0m
499DEBUG:root: Contains the name of a file in the same format as [4m/etc/hosts[24m that should be read when the shell needs to complete a hostname. The list of possible hostname completions may be changed while the shell is run‐
500DEBUG:root: ning; the next time hostname completion is attempted after the value is changed, [1mbash [22madds the contents of the new file to the existing list. If [1mHOSTFILE [22mis set, but has no value, or does not name a readable
501DEBUG:root: file, [1mbash [22mattempts to read [4m/etc/hosts[24m to obtain the list of possible hostname completions. When [1mHOSTFILE [22mis unset, the hostname list is cleared.
502DEBUG:root: [1mIFS [22mThe [4mInternal[24m [4mField[24m [4mSeparator[24m that is used for word splitting after expansion and to split lines into words with the [1mread [22mbuiltin command. The default value is ``<space><tab><newline>''.
503DEBUG:root: [1mIGNOREEOF[0m
504DEBUG:root: Controls the action of an interactive shell on receipt of an [1mEOF [22mcharacter as the sole input. If set, the value is the number of consecutive [1mEOF [22mcharacters which must be typed as the first characters on an
505DEBUG:root: input line before [1mbash [22mexits. If the variable exists but does not have a numeric value, or has no value, the default value is 10. If it does not exist, [1mEOF [22msignifies the end of input to the shell.
506DEBUG:root: [1mINPUTRC[0m
507DEBUG:root: The filename for the [1mreadline [22mstartup file, overriding the default of [4m~/.inputrc[24m (see [1mREADLINE [22mbelow).
508DEBUG:root: [1mLANG [22mUsed to determine the locale category for any category not specifically selected with a variable starting with [1mLC_[22m.
509DEBUG:root: [1mLC_ALL [22mThis variable overrides the value of [1mLANG [22mand any other [1mLC_ [22mvariable specifying a locale category.
510DEBUG:root: [1mLC_COLLATE[0m
511DEBUG:root: This variable determines the collation order used when sorting the results of pathname expansion, and determines the behavior of range expressions, equivalence classes, and collating sequences within pathname
512DEBUG:root: expansion and pattern matching.
513DEBUG:root: [1mLC_CTYPE[0m
514DEBUG:root: This variable determines the interpretation of characters and the behavior of character classes within pathname expansion and pattern matching.
515DEBUG:root: [1mLC_MESSAGES[0m
516DEBUG:root: This variable determines the locale used to translate double-quoted strings preceded by a [1m$[22m.
517DEBUG:root: [1mLC_NUMERIC[0m
518DEBUG:root: This variable determines the locale category used for number formatting.
519DEBUG:root: [1mLC_TIME[0m
520DEBUG:root: This variable determines the locale category used for data and time formatting.
521DEBUG:root: [1mLINES [22mUsed by the [1mselect [22mcompound command to determine the column length for printing selection lists. Automatically set if the [1mcheckwinsize [22moption is enabled or in an interactive shell upon receipt of a [1mSIGWINCH[22m.
522DEBUG:root: [1mMAIL [22mIf this parameter is set to a file or directory name and the [1mMAILPATH [22mvariable is not set, [1mbash [22minforms the user of the arrival of mail in the specified file or Maildir-format directory.
523DEBUG:root: [1mMAILCHECK[0m
524DEBUG:root: Specifies how often (in seconds) [1mbash [22mchecks for mail. The default is 60 seconds. When it is time to check for mail, the shell does so before displaying the primary prompt. If this variable is unset, or set
525DEBUG:root: to a value that is not a number greater than or equal to zero, the shell disables mail checking.
526DEBUG:root: [1mMAILPATH[0m
527DEBUG:root: A colon-separated list of filenames to be checked for mail. The message to be printed when mail arrives in a particular file may be specified by separating the filename from the message with a `?'. When used
528DEBUG:root: in the text of the message, [1m$_ [22mexpands to the name of the current mailfile. Example:
529DEBUG:root: [1mMAILPATH[22m='/var/mail/bfox?"You have mail":~/shell-mail?"$_ has mail!"'
530DEBUG:root: [1mBash [22mcan be configured to supply a default value for this variable (there is no value by default), but the location of the user mail files that it uses is system dependent (e.g., /var/mail/[1m$USER[22m).
531DEBUG:root: [1mOPTERR [22mIf set to the value 1, [1mbash [22mdisplays error messages generated by the [1mgetopts [22mbuiltin command (see [1mSHELL BUILTIN COMMANDS [22mbelow). [1mOPTERR [22mis initialized to 1 each time the shell is invoked or a shell script is
532DEBUG:root: executed.
533DEBUG:root: [1mPATH [22mThe search path for commands. It is a colon-separated list of directories in which the shell looks for commands (see [1mCOMMAND EXECUTION [22mbelow). A zero-length (null) directory name in the value of [1mPATH [22mindi‐
534DEBUG:root: cates the current directory. A null directory name may appear as two adjacent colons, or as an initial or trailing colon. The default path is system-dependent, and is set by the administrator who installs
535DEBUG:root: [1mbash[22m. A common value is ``/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin''.
536DEBUG:root: [1mPOSIXLY_CORRECT[0m
537DEBUG:root: If this variable is in the environment when [1mbash [22mstarts, the shell enters [4mposix[24m [4mmode[24m before reading the startup files, as if the [1m--posix [22minvocation option had been supplied. If it is set while the shell is
538DEBUG:root: running, [1mbash [22menables [4mposix[24m [4mmode[24m, as if the command [4mset[24m [4m-o[24m [4mposix[24m had been executed.
539DEBUG:root: [1mPROMPT_COMMAND[0m
540DEBUG:root: If set, the value is executed as a command prior to issuing each primary prompt.
541DEBUG:root: [1mPROMPT_DIRTRIM[0m
542DEBUG:root: If set to a number greater than zero, the value is used as the number of trailing directory components to retain when expanding the [1m\w [22mand [1m\W [22mprompt string escapes (see [1mPROMPTING [22mbelow). Characters removed
543DEBUG:root: are replaced with an ellipsis.
544DEBUG:root: [1mPS0 [22mThe value of this parameter is expanded (see [1mPROMPTING [22mbelow) and displayed by interactive shells after reading a command and before the command is executed.
545DEBUG:root: [1mPS1 [22mThe value of this parameter is expanded (see [1mPROMPTING [22mbelow) and used as the primary prompt string. The default value is ``[1m\s-\v\$ [22m''.
546DEBUG:root: [1mPS2 [22mThe value of this parameter is expanded as with [1mPS1 [22mand used as the secondary prompt string. The default is ``[1m> [22m''.
547DEBUG:root: [1mPS3 [22mThe value of this parameter is used as the prompt for the [1mselect [22mcommand (see [1mSHELL GRAMMAR [22mabove).
548DEBUG:root: [1mPS4 [22mThe value of this parameter is expanded as with [1mPS1 [22mand the value is printed before each command [1mbash [22mdisplays during an execution trace. The first character of [1mPS4 [22mis replicated multiple times, as necessary,
549DEBUG:root: to indicate multiple levels of indirection. The default is ``[1m+ [22m''.
550DEBUG:root: [1mSHELL [22mThe full pathname to the shell is kept in this environment variable. If it is not set when the shell starts, [1mbash [22massigns to it the full pathname of the current user's login shell.
551DEBUG:root: [1mTIMEFORMAT[0m
552DEBUG:root: The value of this parameter is used as a format string specifying how the timing information for pipelines prefixed with the [1mtime [22mreserved word should be displayed. The [1m% [22mcharacter introduces an escape se‐
553DEBUG:root: quence that is expanded to a time value or other information. The escape sequences and their meanings are as follows; the braces denote optional portions.
554DEBUG:root: [1m%% [22mA literal [1m%[22m.
555DEBUG:root: [1m%[[4m[22mp[24m[1m][l]R [22mThe elapsed time in seconds.
556DEBUG:root: [1m%[[4m[22mp[24m[1m][l]U [22mThe number of CPU seconds spent in user mode.
557DEBUG:root: [1m%[[4m[22mp[24m[1m][l]S [22mThe number of CPU seconds spent in system mode.
558DEBUG:root: [1m%P [22mThe CPU percentage, computed as (%U + %S) / %R.
559DEBUG:root: The optional [4mp[24m is a digit specifying the [4mprecision[24m, the number of fractional digits after a decimal point. A value of 0 causes no decimal point or fraction to be output. At most three places after the deci‐
560DEBUG:root: mal point may be specified; values of [4mp[24m greater than 3 are changed to 3. If [4mp[24m is not specified, the value 3 is used.
561DEBUG:root: The optional [1ml [22mspecifies a longer format, including minutes, of the form [4mMM[24mm[4mSS[24m.[4mFF[24ms. The value of [4mp[24m determines whether or not the fraction is included.
562DEBUG:root: If this variable is not set, [1mbash [22macts as if it had the value [1m$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'[22m. If the value is null, no timing information is displayed. A trailing newline is added when the format
563DEBUG:root: string is displayed.
564DEBUG:root: [1mTMOUT [22mIf set to a value greater than zero, [1mTMOUT [22mis treated as the default timeout for the [1mread [22mbuiltin. The [1mselect [22mcommand terminates if input does not arrive after [1mTMOUT [22mseconds when input is coming from a termi‐
565DEBUG:root: nal. In an interactive shell, the value is interpreted as the number of seconds to wait for a line of input after issuing the primary prompt. [1mBash [22mterminates after waiting for that number of seconds if a
566DEBUG:root: complete line of input does not arrive.
567DEBUG:root: [1mTMPDIR [22mIf set, [1mbash [22muses its value as the name of a directory in which [1mbash [22mcreates temporary files for the shell's use.
568DEBUG:root: [1mauto_resume[0m
569DEBUG:root: This variable controls how the shell interacts with the user and job control. If this variable is set, single word simple commands without redirections are treated as candidates for resumption of an existing
570DEBUG:root: stopped job. There is no ambiguity allowed; if there is more than one job beginning with the string typed, the job most recently accessed is selected. The [4mname[24m of a stopped job, in this context, is the com‐
571DEBUG:root: mand line used to start it. If set to the value [4mexact[24m, the string supplied must match the name of a stopped job exactly; if set to [4msubstring[24m, the string supplied needs to match a substring of the name of a
572DEBUG:root: stopped job. The [4msubstring[24m value provides functionality analogous to the [1m%? [22mjob identifier (see [1mJOB CONTROL [22mbelow). If set to any other value, the supplied string must be a prefix of a stopped job's name;
573DEBUG:root: this provides functionality analogous to the [1m%[4m[22mstring[24m job identifier.
574DEBUG:root: [1mhistchars[0m
575DEBUG:root: The two or three characters which control history expansion and tokenization (see [1mHISTORY EXPANSION [22mbelow). The first character is the [4mhistory[24m [4mexpansion[24m character, the character which signals the start of a
576DEBUG:root: history expansion, normally `[1m![22m'. The second character is the [4mquick[24m [4msubstitution[24m character, which is used as shorthand for re-running the previous command entered, substituting one string for another in the
577DEBUG:root: command. The default is `[1m^[22m'. The optional third character is the character which indicates that the remainder of the line is a comment when found as the first character of a word, normally `[1m#[22m'. The history
578DEBUG:root: comment character causes history substitution to be skipped for the remaining words on the line. It does not necessarily cause the shell parser to treat the rest of the line as a comment.
579DEBUG:root: [1mArrays[0m
580DEBUG:root: [1mBash [22mprovides one-dimensional indexed and associative array variables. Any variable may be used as an indexed array; the [1mdeclare [22mbuiltin will explicitly declare an array. There is no maximum limit on the size of an
581DEBUG:root: array, nor any requirement that members be indexed or assigned contiguously. Indexed arrays are referenced using integers (including arithmetic expressions) and are zero-based; associative arrays are referenced us‐
582DEBUG:root: ing arbitrary strings. Unless otherwise noted, indexed array indices must be non-negative integers.
583DEBUG:root: An indexed array is created automatically if any variable is assigned to using the syntax [4mname[24m[[4msubscript[24m]=[4mvalue[24m. The [4msubscript[24m is treated as an arithmetic expression that must evaluate to a number. To explicitly
584DEBUG:root: declare an indexed array, use [1mdeclare -a [4m[22mname[24m (see [1mSHELL BUILTIN COMMANDS [22mbelow). [1mdeclare -a [4m[22mname[24m[1m[[4m[22msubscript[24m[1m] [22mis also accepted; the [4msubscript[24m is ignored.
585DEBUG:root: Associative arrays are created using [1mdeclare -A [4m[22mname[24m.
586DEBUG:root: Attributes may be specified for an array variable using the [1mdeclare [22mand [1mreadonly [22mbuiltins. Each attribute applies to all members of an array.
587DEBUG:root: Arrays are assigned to using compound assignments of the form [4mname[24m=[1m([22mvalue[4m1[24m ... value[4mn[24m[1m)[22m, where each [4mvalue[24m is of the form [[4msubscript[24m]=[4mstring[24m. Indexed array assignments do not require anything but [4mstring[24m. When assign‐
588DEBUG:root: ing to indexed arrays, if the optional brackets and subscript are supplied, that index is assigned to; otherwise the index of the element assigned is the last index assigned to by the statement plus one. Indexing
589DEBUG:root: starts at zero.
590DEBUG:root: When assigning to an associative array, the subscript is required.
591DEBUG:root: This syntax is also accepted by the [1mdeclare [22mbuiltin. Individual array elements may be assigned to using the [4mname[24m[[4msubscript[24m]=[4mvalue[24m syntax introduced above. When assigning to an indexed array, if [4mname[24m is subscripted
592DEBUG:root: by a negative number, that number is interpreted as relative to one greater than the maximum index of [4mname[24m, so negative indices count back from the end of the array, and an index of -1 references the last element.
593DEBUG:root: Any element of an array may be referenced using ${[4mname[24m[[4msubscript[24m]}. The braces are required to avoid conflicts with pathname expansion. If [4msubscript[24m is [1m@ [22mor [1m*[22m, the word expands to all members of [4mname[24m. These sub‐
594DEBUG:root: scripts differ only when the word appears within double quotes. If the word is double-quoted, ${[4mname[24m[*]} expands to a single word with the value of each array member separated by the first character of the [1mIFS [22mspe‐
595DEBUG:root: cial variable, and ${[4mname[24m[@]} expands each element of [4mname[24m to a separate word. When there are no array members, ${[4mname[24m[@]} expands to nothing. If the double-quoted expansion occurs within a word, the expansion of
596DEBUG:root: the first parameter is joined with the beginning part of the original word, and the expansion of the last parameter is joined with the last part of the original word. This is analogous to the expansion of the spe‐
597DEBUG:root: cial parameters [1m* [22mand [1m@ [22m(see [1mSpecial Parameters [22mabove). ${#[4mname[24m[[4msubscript[24m]} expands to the length of ${[4mname[24m[[4msubscript[24m]}. If [4msubscript[24m is [1m* [22mor [1m@[22m, the expansion is the number of elements in the array. If the [4msub‐[0m
598DEBUG:root: [4mscript[24m used to reference an element of an indexed array evaluates to a number less than zero, it is interpreted as relative to one greater than the maximum index of the array, so negative indices count back from the
599DEBUG:root: end of the array, and an index of -1 references the last element.
600DEBUG:root: Referencing an array variable without a subscript is equivalent to referencing the array with a subscript of 0. Any reference to a variable using a valid subscript is legal, and [1mbash [22mwill create an array if neces‐
601DEBUG:root: sary.
602DEBUG:root: An array variable is considered set if a subscript has been assigned a value. The null string is a valid value.
603DEBUG:root: It is possible to obtain the keys (indices) of an array as well as the values. ${[1m![4m[22mname[24m[[4m@[24m]} and ${[1m![4m[22mname[24m[[4m*[24m]} expand to the indices assigned in array variable [4mname[24m. The treatment when in double quotes is similar to
604DEBUG:root: the expansion of the special parameters [4m@[24m and [4m*[24m within double quotes.
605DEBUG:root: The [1munset [22mbuiltin is used to destroy arrays. [1munset [4m[22mname[24m[[4msubscript[24m] destroys the array element at index [4msubscript[24m. Negative subscripts to indexed arrays are interpreted as described above. Care must be taken to
606DEBUG:root: avoid unwanted side effects caused by pathname expansion. [1munset [4m[22mname[24m, where [4mname[24m is an array, or [1munset [4m[22mname[24m[[4msubscript[24m], where [4msubscript[24m is [1m* [22mor [1m@[22m, removes the entire array.
607DEBUG:root: The [1mdeclare[22m, [1mlocal[22m, and [1mreadonly [22mbuiltins each accept a [1m-a [22moption to specify an indexed array and a [1m-A [22moption to specify an associative array. If both options are supplied, [1m-A [22mtakes precedence. The [1mread [22mbuiltin ac‐
608DEBUG:root: cepts a [1m-a [22moption to assign a list of words read from the standard input to an array. The [1mset [22mand [1mdeclare [22mbuiltins display array values in a way that allows them to be reused as assignments.
609DEBUG:root:[1mEXPANSION[0m
610DEBUG:root: Expansion is performed on the command line after it has been split into words. There are seven kinds of expansion performed: [4mbrace[24m [4mexpansion[24m, [4mtilde[24m [4mexpansion[24m, [4mparameter[24m [4mand[24m [4mvariable[24m [4mexpansion[24m, [4mcommand[24m [4msubstitution[24m,
611DEBUG:root: [4marithmetic[24m [4mexpansion[24m, [4mword[24m [4msplitting[24m, and [4mpathname[24m [4mexpansion[24m.
612DEBUG:root: The order of expansions is: brace expansion; tilde expansion, parameter and variable expansion, arithmetic expansion, and command substitution (done in a left-to-right fashion); word splitting; and pathname expan‐
613DEBUG:root: sion.
614DEBUG:root: On systems that can support it, there is an additional expansion available: [4mprocess[24m [4msubstitution[24m. This is performed at the same time as tilde, parameter, variable, and arithmetic expansion and command substitution.
615DEBUG:root: After these expansions are performed, quote characters present in the original word are removed unless they have been quoted themselves ([4mquote[24m [4mremoval[24m).
616DEBUG:root: Only brace expansion, word splitting, and pathname expansion can change the number of words of the expansion; other expansions expand a single word to a single word. The only exceptions to this are the expansions of
617DEBUG:root: "[1m$@[22m" and "[1m${[4m[22mname[24m[1m[@]}[22m" as explained above (see [1mPARAMETERS[22m).
618DEBUG:root: [1mBrace Expansion[0m
619DEBUG:root: [4mBrace[24m [4mexpansion[24m is a mechanism by which arbitrary strings may be generated. This mechanism is similar to [4mpathname[24m [4mexpansion[24m, but the filenames generated need not exist. Patterns to be brace expanded take the form
620DEBUG:root: of an optional [4mpreamble[24m, followed by either a series of comma-separated strings or a sequence expression between a pair of braces, followed by an optional [4mpostscript[24m. The preamble is prefixed to each string con‐
621DEBUG:root: tained within the braces, and the postscript is then appended to each resulting string, expanding left to right.
622DEBUG:root: Brace expansions may be nested. The results of each expanded string are not sorted; left to right order is preserved. For example, a[1m{[22md,c,b[1m}[22me expands into `ade ace abe'.
623DEBUG:root: A sequence expression takes the form [1m{[4m[22mx[24m[1m..[4m[22my[24m[1m[..[4m[22mincr[24m[1m]}[22m, where [4mx[24m and [4my[24m are either integers or single characters, and [4mincr[24m, an optional increment, is an integer. When integers are supplied, the expression expands to each
624DEBUG:root: number between [4mx[24m and [4my[24m, inclusive. Supplied integers may be prefixed with [4m0[24m to force each term to have the same width. When either [4mx[24m or [4my[24m begins with a zero, the shell attempts to force all generated terms to con‐
625DEBUG:root: tain the same number of digits, zero-padding where necessary. When characters are supplied, the expression expands to each character lexicographically between [4mx[24m and [4my[24m, inclusive, using the default C locale. Note
626DEBUG:root: that both [4mx[24m and [4my[24m must be of the same type. When the increment is supplied, it is used as the difference between each term. The default increment is 1 or -1 as appropriate.
627DEBUG:root: Brace expansion is performed before any other expansions, and any characters special to other expansions are preserved in the result. It is strictly textual. [1mBash [22mdoes not apply any syntactic interpretation to the
628DEBUG:root: context of the expansion or the text between the braces.
629DEBUG:root: A correctly-formed brace expansion must contain unquoted opening and closing braces, and at least one unquoted comma or a valid sequence expression. Any incorrectly formed brace expansion is left unchanged. A [1m{ [22mor
630DEBUG:root: [1m, [22mmay be quoted with a backslash to prevent its being considered part of a brace expression. To avoid conflicts with parameter expansion, the string [1m${ [22mis not considered eligible for brace expansion.
631DEBUG:root: This construct is typically used as shorthand when the common prefix of the strings to be generated is longer than in the above example:
632DEBUG:root: mkdir /usr/local/src/bash/{old,new,dist,bugs}
633DEBUG:root: or
634DEBUG:root: chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}
635DEBUG:root: Brace expansion introduces a slight incompatibility with historical versions of [1msh[22m. [1msh [22mdoes not treat opening or closing braces specially when they appear as part of a word, and preserves them in the output. [1mBash[0m
636DEBUG:root: removes braces from words as a consequence of brace expansion. For example, a word entered to [1msh [22mas [4mfile{1,2}[24m appears identically in the output. The same word is output as [4mfile1[24m [4mfile2[24m after expansion by [1mbash[22m. If
637DEBUG:root: strict compatibility with [1msh [22mis desired, start [1mbash [22mwith the [1m+B [22moption or disable brace expansion with the [1m+B [22moption to the [1mset [22mcommand (see [1mSHELL BUILTIN COMMANDS [22mbelow).
638DEBUG:root: [1mTilde Expansion[0m
639DEBUG:root: If a word begins with an unquoted tilde character (`[1m~[22m'), all of the characters preceding the first unquoted slash (or all characters, if there is no unquoted slash) are considered a [4mtilde-prefix[24m. If none of the
640DEBUG:root: characters in the tilde-prefix are quoted, the characters in the tilde-prefix following the tilde are treated as a possible [4mlogin[24m [4mname[24m. If this login name is the null string, the tilde is replaced with the value of
641DEBUG:root: the shell parameter [1mHOME[22m. If [1mHOME [22mis unset, the home directory of the user executing the shell is substituted instead. Otherwise, the tilde-prefix is replaced with the home directory associated with the specified
642DEBUG:root: login name.
643DEBUG:root: If the tilde-prefix is a `~+', the value of the shell variable [1mPWD [22mreplaces the tilde-prefix. If the tilde-prefix is a `~-', the value of the shell variable [1mOLDPWD[22m, if it is set, is substituted. If the characters
644DEBUG:root: following the tilde in the tilde-prefix consist of a number [4mN[24m, optionally prefixed by a `+' or a `-', the tilde-prefix is replaced with the corresponding element from the directory stack, as it would be displayed by
645DEBUG:root: the [1mdirs [22mbuiltin invoked with the tilde-prefix as an argument. If the characters following the tilde in the tilde-prefix consist of a number without a leading `+' or `-', `+' is assumed.
646DEBUG:root: If the login name is invalid, or the tilde expansion fails, the word is unchanged.
647DEBUG:root: Each variable assignment is checked for unquoted tilde-prefixes immediately following a [1m: [22mor the first [1m=[22m. In these cases, tilde expansion is also performed. Consequently, one may use filenames with tildes in as‐
648DEBUG:root: signments to [1mPATH[22m, [1mMAILPATH[22m, and [1mCDPATH[22m, and the shell assigns the expanded value.
649DEBUG:root: [1mParameter Expansion[0m
650DEBUG:root: The `[1m$[22m' character introduces parameter expansion, command substitution, or arithmetic expansion. The parameter name or symbol to be expanded may be enclosed in braces, which are optional but serve to protect the
651DEBUG:root: variable to be expanded from characters immediately following it which could be interpreted as part of the name.
652DEBUG:root: When braces are used, the matching ending brace is the first `[1m}[22m' not escaped by a backslash or within a quoted string, and not within an embedded arithmetic expansion, command substitution, or parameter expansion.
653DEBUG:root: ${[4mparameter[24m}
654DEBUG:root: The value of [4mparameter[24m is substituted. The braces are required when [4mparameter[24m is a positional parameter with more than one digit, or when [4mparameter[24m is followed by a character which is not to be interpreted as
655DEBUG:root: part of its name. The [4mparameter[24m is a shell parameter as described above [1mPARAMETERS[22m) or an array reference ([1mArrays[22m).
656DEBUG:root: If the first character of [4mparameter[24m is an exclamation point ([1m![22m), and [4mparameter[24m is not a [4mnameref[24m, it introduces a level of variable indirection. [1mBash [22muses the value of the variable formed from the rest of [4mparameter[0m
657DEBUG:root: as the name of the variable; this variable is then expanded and that value is used in the rest of the substitution, rather than the value of [4mparameter[24m itself. This is known as [4mindirect[24m [4mexpansion[24m. If [4mparameter[24m is a
658DEBUG:root: nameref, this expands to the name of the variable referenced by [4mparameter[24m instead of performing the complete indirect expansion. The exceptions to this are the expansions of ${[1m![4m[22mprefix[24m[1m*[22m} and ${[1m![4m[22mname[24m[[4m@[24m]} described be‐
659DEBUG:root: low. The exclamation point must immediately follow the left brace in order to introduce indirection.
660DEBUG:root: In each of the cases below, [4mword[24m is subject to tilde expansion, parameter expansion, command substitution, and arithmetic expansion.
661DEBUG:root: When not performing substring expansion, using the forms documented below (e.g., [1m:-[22m), [1mbash [22mtests for a parameter that is unset or null. Omitting the colon results in a test only for a parameter that is unset.
662DEBUG:root: ${[4mparameter[24m[1m:-[4m[22mword[24m}
663DEBUG:root: [1mUse Default Values[22m. If [4mparameter[24m is unset or null, the expansion of [4mword[24m is substituted. Otherwise, the value of [4mparameter[24m is substituted.
664DEBUG:root: ${[4mparameter[24m[1m:=[4m[22mword[24m}
665DEBUG:root: [1mAssign Default Values[22m. If [4mparameter[24m is unset or null, the expansion of [4mword[24m is assigned to [4mparameter[24m. The value of [4mparameter[24m is then substituted. Positional parameters and special parameters may not be as‐
666DEBUG:root: signed to in this way.
667DEBUG:root: ${[4mparameter[24m[1m:?[4m[22mword[24m}
668DEBUG:root: [1mDisplay Error if Null or Unset[22m. If [4mparameter[24m is null or unset, the expansion of [4mword[24m (or a message to that effect if [4mword[24m is not present) is written to the standard error and the shell, if it is not interac‐
669DEBUG:root: tive, exits. Otherwise, the value of [4mparameter[24m is substituted.
670DEBUG:root: ${[4mparameter[24m[1m:+[4m[22mword[24m}
671DEBUG:root: [1mUse Alternate Value[22m. If [4mparameter[24m is null or unset, nothing is substituted, otherwise the expansion of [4mword[24m is substituted.
672DEBUG:root: ${[4mparameter[24m[1m:[4m[22moffset[24m}
673DEBUG:root: ${[4mparameter[24m[1m:[4m[22moffset[24m[1m:[4m[22mlength[24m}
674DEBUG:root: [1mSubstring Expansion[22m. Expands to up to [4mlength[24m characters of the value of [4mparameter[24m starting at the character specified by [4moffset[24m. If [4mparameter[24m is [1m@[22m, an indexed array subscripted by [1m@ [22mor [1m*[22m, or an associative
675DEBUG:root: array name, the results differ as described below. If [4mlength[24m is omitted, expands to the substring of the value of [4mparameter[24m starting at the character specified by [4moffset[24m and extending to the end of the value.
676DEBUG:root: [4mlength[24m and [4moffset[24m are arithmetic expressions (see [1mARITHMETIC EVALUATION [22mbelow).
677DEBUG:root: If [4moffset[24m evaluates to a number less than zero, the value is used as an offset in characters from the end of the value of [4mparameter[24m. If [4mlength[24m evaluates to a number less than zero, it is interpreted as an
678DEBUG:root: offset in characters from the end of the value of [4mparameter[24m rather than a number of characters, and the expansion is the characters between [4moffset[24m and that result. Note that a negative offset must be sepa‐
679DEBUG:root: rated from the colon by at least one space to avoid being confused with the [1m:- [22mexpansion.
680DEBUG:root: If [4mparameter[24m is [1m@[22m, the result is [4mlength[24m positional parameters beginning at [4moffset[24m. A negative [4moffset[24m is taken relative to one greater than the greatest positional parameter, so an offset of -1 evaluates to
681DEBUG:root: the last positional parameter. It is an expansion error if [4mlength[24m evaluates to a number less than zero.
682DEBUG:root: If [4mparameter[24m is an indexed array name subscripted by @ or *, the result is the [4mlength[24m members of the array beginning with ${[4mparameter[24m[[4moffset[24m]}. A negative [4moffset[24m is taken relative to one greater than the max‐
683DEBUG:root: imum index of the specified array. It is an expansion error if [4mlength[24m evaluates to a number less than zero.
684DEBUG:root: Substring expansion applied to an associative array produces undefined results.
685DEBUG:root: Substring indexing is zero-based unless the positional parameters are used, in which case the indexing starts at 1 by default. If [4moffset[24m is 0, and the positional parameters are used, [1m$0 [22mis prefixed to the
686DEBUG:root: list.
687DEBUG:root: ${[1m![4m[22mprefix[24m[1m*[22m}
688DEBUG:root: ${[1m![4m[22mprefix[24m[1m@[22m}
689DEBUG:root: [1mNames matching prefix[22m. Expands to the names of variables whose names begin with [4mprefix[24m, separated by the first character of the [1mIFS [22mspecial variable. When [4m@[24m is used and the expansion appears within double
690DEBUG:root: quotes, each variable name expands to a separate word.
691DEBUG:root: ${[1m![4m[22mname[24m[[4m@[24m]}
692DEBUG:root: ${[1m![4m[22mname[24m[[4m*[24m]}
693DEBUG:root: [1mList of array keys[22m. If [4mname[24m is an array variable, expands to the list of array indices (keys) assigned in [4mname[24m. If [4mname[24m is not an array, expands to 0 if [4mname[24m is set and null otherwise. When [4m@[24m is used and
694DEBUG:root: the expansion appears within double quotes, each key expands to a separate word.
695DEBUG:root: ${[1m#[4m[22mparameter[24m}
696DEBUG:root: [1mParameter length[22m. The length in characters of the value of [4mparameter[24m is substituted. If [4mparameter[24m is [1m* [22mor [1m@[22m, the value substituted is the number of positional parameters. If [4mparameter[24m is an array name sub‐
697DEBUG:root: scripted by [1m* [22mor [1m@[22m, the value substituted is the number of elements in the array. If [4mparameter[24m is an indexed array name subscripted by a negative number, that number is interpreted as relative to one greater
698DEBUG:root: than the maximum index of [4mparameter[24m, so negative indices count back from the end of the array, and an index of -1 references the last element.
699DEBUG:root: ${[4mparameter[24m[1m#[4m[22mword[24m}
700DEBUG:root: ${[4mparameter[24m[1m##[4m[22mword[24m}
701DEBUG:root: [1mRemove matching prefix pattern[22m. The [4mword[24m is expanded to produce a pattern just as in pathname expansion. If the pattern matches the beginning of the value of [4mparameter[24m, then the result of the expansion is
702DEBUG:root: the expanded value of [4mparameter[24m with the shortest matching pattern (the ``[1m#[22m'' case) or the longest matching pattern (the ``[1m##[22m'' case) deleted. If [4mparameter[24m is [1m@ [22mor [1m*[22m, the pattern removal operation is applied
703DEBUG:root: to each positional parameter in turn, and the expansion is the resultant list. If [4mparameter[24m is an array variable subscripted with [1m@ [22mor [1m*[22m, the pattern removal operation is applied to each member of the array
704DEBUG:root: in turn, and the expansion is the resultant list.
705DEBUG:root: ${[4mparameter[24m[1m%[4m[22mword[24m}
706DEBUG:root: ${[4mparameter[24m[1m%%[4m[22mword[24m}
707DEBUG:root: [1mRemove matching suffix pattern[22m. The [4mword[24m is expanded to produce a pattern just as in pathname expansion. If the pattern matches a trailing portion of the expanded value of [4mparameter[24m, then the result of the
708DEBUG:root: expansion is the expanded value of [4mparameter[24m with the shortest matching pattern (the ``[1m%[22m'' case) or the longest matching pattern (the ``[1m%%[22m'' case) deleted. If [4mparameter[24m is [1m@ [22mor [1m*[22m, the pattern removal opera‐
709DEBUG:root: tion is applied to each positional parameter in turn, and the expansion is the resultant list. If [4mparameter[24m is an array variable subscripted with [1m@ [22mor [1m*[22m, the pattern removal operation is applied to each mem‐
710DEBUG:root: ber of the array in turn, and the expansion is the resultant list.
711DEBUG:root: ${[4mparameter[24m[1m/[4m[22mpattern[24m[1m/[4m[22mstring[24m}
712DEBUG:root: [1mPattern substitution[22m. The [4mpattern[24m is expanded to produce a pattern just as in pathname expansion. [4mParameter[24m is expanded and the longest match of [4mpattern[24m against its value is replaced with [4mstring[24m. If [4mpattern[0m
713DEBUG:root: begins with [1m/[22m, all matches of [4mpattern[24m are replaced with [4mstring[24m. Normally only the first match is replaced. If [4mpattern[24m begins with [1m#[22m, it must match at the beginning of the expanded value of [4mparameter[24m. If
714DEBUG:root: [4mpattern[24m begins with [1m%[22m, it must match at the end of the expanded value of [4mparameter[24m. If [4mstring[24m is null, matches of [4mpattern[24m are deleted and the [1m/ [22mfollowing [4mpattern[24m may be omitted. If the [1mnocasematch [22mshell op‐
715DEBUG:root: tion is enabled, the match is performed without regard to the case of alphabetic characters. If [4mparameter[24m is [1m@ [22mor [1m*[22m, the substitution operation is applied to each positional parameter in turn, and the expan‐
716DEBUG:root: sion is the resultant list. If [4mparameter[24m is an array variable subscripted with [1m@ [22mor [1m*[22m, the substitution operation is applied to each member of the array in turn, and the expansion is the resultant list.
717DEBUG:root: ${[4mparameter[24m[1m^[4m[22mpattern[24m}
718DEBUG:root: ${[4mparameter[24m[1m^^[4m[22mpattern[24m}
719DEBUG:root: ${[4mparameter[24m[1m,[4m[22mpattern[24m}
720DEBUG:root: ${[4mparameter[24m[1m,,[4m[22mpattern[24m}
721DEBUG:root: [1mCase modification[22m. This expansion modifies the case of alphabetic characters in [4mparameter[24m. The [4mpattern[24m is expanded to produce a pattern just as in pathname expansion. Each character in the expanded value of
722DEBUG:root: [4mparameter[24m is tested against [4mpattern[24m, and, if it matches the pattern, its case is converted. The pattern should not attempt to match more than one character. The [1m^ [22moperator converts lowercase letters matching
723DEBUG:root: [4mpattern[24m to uppercase; the [1m, [22moperator converts matching uppercase letters to lowercase. The [1m^^ [22mand [1m,, [22mexpansions convert each matched character in the expanded value; the [1m^ [22mand [1m, [22mexpansions match and convert
724DEBUG:root: only the first character in the expanded value. If [4mpattern[24m is omitted, it is treated like a [1m?[22m, which matches every character. If [4mparameter[24m is [1m@ [22mor [1m*[22m, the case modification operation is applied to each posi‐
725DEBUG:root: tional parameter in turn, and the expansion is the resultant list. If [4mparameter[24m is an array variable subscripted with [1m@ [22mor [1m*[22m, the case modification operation is applied to each member of the array in turn,
726DEBUG:root: and the expansion is the resultant list.
727DEBUG:root: ${[4mparameter[24m[1m@[4m[22moperator[24m}
728DEBUG:root: [1mParameter transformation[22m. The expansion is either a transformation of the value of [4mparameter[24m or information about [4mparameter[24m itself, depending on the value of [4moperator[24m. Each [4moperator[24m is a single letter:
729DEBUG:root: [1mQ [22mThe expansion is a string that is the value of [4mparameter[24m quoted in a format that can be reused as input.
730DEBUG:root: [1mE [22mThe expansion is a string that is the value of [4mparameter[24m with backslash escape sequences expanded as with the [1m$'...' [22mquoting mechansim.
731DEBUG:root: [1mP [22mThe expansion is a string that is the result of expanding the value of [4mparameter[24m as if it were a prompt string (see [1mPROMPTING [22mbelow).
732DEBUG:root: [1mA [22mThe expansion is a string in the form of an assignment statement or [1mdeclare [22mcommand that, if evaluated, will recreate [4mparameter[24m with its attributes and value.
733DEBUG:root: [1ma [22mThe expansion is a string consisting of flag values representing [4mparameter[24m's attributes.
734DEBUG:root: If [4mparameter[24m is [1m@ [22mor [1m*[22m, the operation is applied to each positional parameter in turn, and the expansion is the resultant list. If [4mparameter[24m is an array variable subscripted with [1m@ [22mor [1m*[22m, the case modification
735DEBUG:root: operation is applied to each member of the array in turn, and the expansion is the resultant list.
736DEBUG:root: The result of the expansion is subject to word splitting and pathname expansion as described below.
737DEBUG:root: [1mCommand Substitution[0m
738DEBUG:root: [4mCommand[24m [4msubstitution[24m allows the output of a command to replace the command name. There are two forms:
739DEBUG:root: [1m$([4m[22mcommand[24m[1m)[0m
740DEBUG:root: or
741DEBUG:root: [1m`[4m[22mcommand[24m[1m`[0m
742DEBUG:root: [1mBash [22mperforms the expansion by executing [4mcommand[24m in a subshell environment and replacing the command substitution with the standard output of the command, with any trailing newlines deleted. Embedded newlines are
743DEBUG:root: not deleted, but they may be removed during word splitting. The command substitution [1m$(cat [4m[22mfile[24m[1m) [22mcan be replaced by the equivalent but faster [1m$(< [4m[22mfile[24m[1m)[22m.
744DEBUG:root: When the old-style backquote form of substitution is used, backslash retains its literal meaning except when followed by [1m$[22m, [1m`[22m, or [1m\[22m. The first backquote not preceded by a backslash terminates the command substitu‐
745DEBUG:root: tion. When using the $([4mcommand[24m) form, all characters between the parentheses make up the command; none are treated specially.
746DEBUG:root: Command substitutions may be nested. To nest when using the backquoted form, escape the inner backquotes with backslashes.
747DEBUG:root: If the substitution appears within double quotes, word splitting and pathname expansion are not performed on the results.
748DEBUG:root: [1mArithmetic Expansion[0m
749DEBUG:root: Arithmetic expansion allows the evaluation of an arithmetic expression and the substitution of the result. The format for arithmetic expansion is:
750DEBUG:root: [1m$(([4m[22mexpression[24m[1m))[0m
751DEBUG:root: The [4mexpression[24m is treated as if it were within double quotes, but a double quote inside the parentheses is not treated specially. All tokens in the expression undergo parameter and variable expansion, command sub‐
752DEBUG:root: stitution, and quote removal. The result is treated as the arithmetic expression to be evaluated. Arithmetic expansions may be nested.
753DEBUG:root: The evaluation is performed according to the rules listed below under [1mARITHMETIC EVALUATION[22m. If [4mexpression[24m is invalid, [1mbash [22mprints a message indicating failure and no substitution occurs.
754DEBUG:root: [1mProcess Substitution[0m
755DEBUG:root: [4mProcess[24m [4msubstitution[24m allows a process's input or output to be referred to using a filename. It takes the form of [1m<([4m[22mlist[24m[1m) [22mor [1m>([4m[22mlist[24m[1m)[22m. The process [4mlist[24m is run asynchronously, and its input or output appears as a
756DEBUG:root: filename. This filename is passed as an argument to the current command as the result of the expansion. If the [1m>([4m[22mlist[24m[1m) [22mform is used, writing to the file will provide input for [4mlist[24m. If the [1m<([4m[22mlist[24m[1m) [22mform is used,
757DEBUG:root: the file passed as an argument should be read to obtain the output of [4mlist[24m. Process substitution is supported on systems that support named pipes ([4mFIFOs[24m) or the [1m/dev/fd [22mmethod of naming open files.
758DEBUG:root: When available, process substitution is performed simultaneously with parameter and variable expansion, command substitution, and arithmetic expansion.
759DEBUG:root: [1mWord Splitting[0m
760DEBUG:root: The shell scans the results of parameter expansion, command substitution, and arithmetic expansion that did not occur within double quotes for [4mword[24m [4msplitting[24m.
761DEBUG:root: The shell treats each character of [1mIFS [22mas a delimiter, and splits the results of the other expansions into words using these characters as field terminators. If [1mIFS [22mis unset, or its value is exactly
762DEBUG:root: [1m<space><tab><newline>[22m, the default, then sequences of [1m<space>[22m, [1m<tab>[22m, and [1m<newline> [22mat the beginning and end of the results of the previous expansions are ignored, and any sequence of [1mIFS [22mcharacters not at the begin‐
763DEBUG:root: ning or end serves to delimit words. If [1mIFS [22mhas a value other than the default, then sequences of the whitespace characters [1mspace[22m, [1mtab[22m, and [1mnewline [22mare ignored at the beginning and end of the word, as long as the
764DEBUG:root: whitespace character is in the value of [1mIFS [22m(an [1mIFS [22mwhitespace character). Any character in [1mIFS [22mthat is not [1mIFS [22mwhitespace, along with any adjacent [1mIFS [22mwhitespace characters, delimits a field. A sequence of [1mIFS[0m
765DEBUG:root: whitespace characters is also treated as a delimiter. If the value of [1mIFS [22mis null, no word splitting occurs.
766DEBUG:root: Explicit null arguments ([1m"" [22mor [1m''[22m) are retained and passed to commands as empty strings. Unquoted implicit null arguments, resulting from the expansion of parameters that have no values, are removed. If a parameter
767DEBUG:root: with no value is expanded within double quotes, a null argument results and is retained and passed to a command as an empty string. When a quoted null argument appears as part of a word whose expansion is non-null,
768DEBUG:root: the null argument is removed. That is, the word -d'' becomes -d after word splitting and null argument removal.
769DEBUG:root: Note that if no expansion occurs, no splitting is performed.
770DEBUG:root: [1mPathname Expansion[0m
771DEBUG:root: After word splitting, unless the [1m-f [22moption has been set, [1mbash [22mscans each word for the characters [1m*[22m, [1m?[22m, and [1m[[22m. If one of these characters appears, then the word is regarded as a [4mpattern[24m, and replaced with an alpha‐
772DEBUG:root: betically sorted list of filenames matching the pattern (see [1mPattern Matching [22mbelow). If no matching filenames are found, and the shell option [1mnullglob [22mis not enabled, the word is left unchanged. If the [1mnullglob[0m
773DEBUG:root: option is set, and no matches are found, the word is removed. If the [1mfailglob [22mshell option is set, and no matches are found, an error message is printed and the command is not executed. If the shell option [1mnocase‐[0m
774DEBUG:root: [1mglob [22mis enabled, the match is performed without regard to the case of alphabetic characters. When a pattern is used for pathname expansion, the character [1m``.'' [22mat the start of a name or immediately following a
775DEBUG:root: slash must be matched explicitly, unless the shell option [1mdotglob [22mis set. When matching a pathname, the slash character must always be matched explicitly. In other cases, the [1m``.'' [22mcharacter is not treated spe‐
776DEBUG:root: cially. See the description of [1mshopt [22mbelow under [1mSHELL BUILTIN COMMANDS [22mfor a description of the [1mnocaseglob[22m, [1mnullglob[22m, [1mfailglob[22m, and [1mdotglob [22mshell options.
777DEBUG:root: The [1mGLOBIGNORE [22mshell variable may be used to restrict the set of filenames matching a [4mpattern[24m. If [1mGLOBIGNORE [22mis set, each matching filename that also matches one of the patterns in [1mGLOBIGNORE [22mis removed from the
778DEBUG:root: list of matches. If the [1mnocaseglob [22moption is set, the matching against the patterns in [1mGLOBIGNORE [22mis performed without regard to case. The filenames [1m``.'' [22mand [1m``..'' [22mare always ignored when [1mGLOBIGNORE [22mis set and
779DEBUG:root: not null. However, setting [1mGLOBIGNORE [22mto a non-null value has the effect of enabling the [1mdotglob [22mshell option, so all other filenames beginning with a [1m``.'' [22mwill match. To get the old behavior of ignoring file‐
780DEBUG:root: names beginning with a [1m``.''[22m, make [1m``.*'' [22mone of the patterns in [1mGLOBIGNORE[22m. The [1mdotglob [22moption is disabled when [1mGLOBIGNORE [22mis unset. The pattern matching honors the setting of the [1mextglob [22mshell option.
781DEBUG:root: [1mPattern Matching[0m
782DEBUG:root: Any character that appears in a pattern, other than the special pattern characters described below, matches itself. The NUL character may not occur in a pattern. A backslash escapes the following character; the es‐
783DEBUG:root: caping backslash is discarded when matching. The special pattern characters must be quoted if they are to be matched literally.
784DEBUG:root: The special pattern characters have the following meanings:
785DEBUG:root: [1m* [22mMatches any string, including the null string. When the [1mglobstar [22mshell option is enabled, and [1m* [22mis used in a pathname expansion context, two adjacent [1m*[22ms used as a single pattern will match all files
786DEBUG:root: and zero or more directories and subdirectories. If followed by a [1m/[22m, two adjacent [1m*[22ms will match only directories and subdirectories.
787DEBUG:root: [1m? [22mMatches any single character.
788DEBUG:root: [1m[...] [22mMatches any one of the enclosed characters. A pair of characters separated by a hyphen denotes a [4mrange[24m [4mexpression[24m; any character that falls between those two characters, inclusive, using the current
789DEBUG:root: locale's collating sequence and character set, is matched. If the first character following the [1m[ [22mis a [1m! [22mor a [1m^ [22mthen any character not enclosed is matched. The sorting order of characters in range
790DEBUG:root: expressions is determined by the current locale and the values of the [1mLC_COLLATE [22mor [1mLC_ALL [22mshell variables, if set. To obtain the traditional interpretation of range expressions, where [1m[a-d] [22mis equiva‐
791DEBUG:root: lent to [1m[abcd][22m, set value of the [1mLC_ALL [22mshell variable to [1mC[22m, or enable the [1mglobasciiranges [22mshell option. A [1m- [22mmay be matched by including it as the first or last character in the set. A [1m] [22mmay be
792DEBUG:root: matched by including it as the first character in the set.
793DEBUG:root: Within [1m[ [22mand [1m][22m, [4mcharacter[24m [4mclasses[24m can be specified using the syntax [1m[:[4m[22mclass[24m[1m:][22m, where [4mclass[24m is one of the following classes defined in the POSIX standard:
794DEBUG:root: [1malnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit[0m
795DEBUG:root: A character class matches any character belonging to that class. The [1mword [22mcharacter class matches letters, digits, and the character _.
796DEBUG:root: Within [1m[ [22mand [1m][22m, an [4mequivalence[24m [4mclass[24m can be specified using the syntax [1m[=[4m[22mc[24m[1m=][22m, which matches all characters with the same collation weight (as defined by the current locale) as the character [4mc[24m.
797DEBUG:root: Within [1m[ [22mand [1m][22m, the syntax [1m[.[4m[22msymbol[24m[1m.] [22mmatches the collating symbol [4msymbol[24m.
798DEBUG:root: If the [1mextglob [22mshell option is enabled using the [1mshopt [22mbuiltin, several extended pattern matching operators are recognized. In the following description, a [4mpattern-list[24m is a list of one or more patterns separated by
799DEBUG:root: a [1m|[22m. Composite patterns may be formed using one or more of the following sub-patterns:
800DEBUG:root: [1m?([4m[22mpattern-list[24m[1m)[0m
801DEBUG:root: Matches zero or one occurrence of the given patterns
802DEBUG:root: [1m*([4m[22mpattern-list[24m[1m)[0m
803DEBUG:root: Matches zero or more occurrences of the given patterns
804DEBUG:root: [1m+([4m[22mpattern-list[24m[1m)[0m
805DEBUG:root: Matches one or more occurrences of the given patterns
806DEBUG:root: [1m@([4m[22mpattern-list[24m[1m)[0m
807DEBUG:root: Matches one of the given patterns
808DEBUG:root: [1m!([4m[22mpattern-list[24m[1m)[0m
809DEBUG:root: Matches anything except one of the given patterns
810DEBUG:root: [1mQuote Removal[0m
811DEBUG:root: After the preceding expansions, all unquoted occurrences of the characters [1m\[22m, [1m'[22m, and [1m" [22mthat did not result from one of the above expansions are removed.
812DEBUG:root:[1mREDIRECTION[0m
813DEBUG:root: Before a command is executed, its input and output may be [4mredirected[24m using a special notation interpreted by the shell. Redirection allows commands' file handles to be duplicated, opened, closed, made to refer to
814DEBUG:root: different files, and can change the files the command reads from and writes to. Redirection may also be used to modify file handles in the current shell execution environment. The following redirection operators
815DEBUG:root: may precede or appear anywhere within a [4msimple[24m [4mcommand[24m or may follow a [4mcommand[24m. Redirections are processed in the order they appear, from left to right.
816DEBUG:root: Each redirection that may be preceded by a file descriptor number may instead be preceded by a word of the form {[4mvarname[24m}. In this case, for each redirection operator except >&- and <&-, the shell will allocate a
817DEBUG:root: file descriptor greater than or equal to 10 and assign it to [4mvarname[24m. If >&- or <&- is preceded by {[4mvarname[24m}, the value of [4mvarname[24m defines the file descriptor to close.
818DEBUG:root: In the following descriptions, if the file descriptor number is omitted, and the first character of the redirection operator is [1m<[22m, the redirection refers to the standard input (file descriptor 0). If the first char‐
819DEBUG:root: acter of the redirection operator is [1m>[22m, the redirection refers to the standard output (file descriptor 1).
820DEBUG:root: The word following the redirection operator in the following descriptions, unless otherwise noted, is subjected to brace expansion, tilde expansion, parameter and variable expansion, command substitution, arithmetic
821DEBUG:root: expansion, quote removal, pathname expansion, and word splitting. If it expands to more than one word, [1mbash [22mreports an error.
822DEBUG:root: Note that the order of redirections is significant. For example, the command
823DEBUG:root: ls [1m> [22mdirlist 2[1m>&[22m1
824DEBUG:root: directs both standard output and standard error to the file [4mdirlist[24m, while the command
825DEBUG:root: ls 2[1m>&[22m1 [1m> [22mdirlist
826DEBUG:root: directs only the standard output to file [4mdirlist[24m, because the standard error was duplicated from the standard output before the standard output was redirected to [4mdirlist[24m.
827DEBUG:root: [1mBash [22mhandles several filenames specially when they are used in redirections, as described in the following table. If the operating system on which [1mbash [22mis running provides these special files, bash will use them;
828DEBUG:root: otherwise it will emulate them internally with the behavior described below.
829DEBUG:root: [1m/dev/fd/[4m[22mfd[0m
830DEBUG:root: If [4mfd[24m is a valid integer, file descriptor [4mfd[24m is duplicated.
831DEBUG:root: [1m/dev/stdin[0m
832DEBUG:root: File descriptor 0 is duplicated.
833DEBUG:root: [1m/dev/stdout[0m
834DEBUG:root: File descriptor 1 is duplicated.
835DEBUG:root: [1m/dev/stderr[0m
836DEBUG:root: File descriptor 2 is duplicated.
837DEBUG:root: [1m/dev/tcp/[4m[22mhost[24m[1m/[4m[22mport[0m
838DEBUG:root: If [4mhost[24m is a valid hostname or Internet address, and [4mport[24m is an integer port number or service name, [1mbash [22mattempts to open the corresponding TCP socket.
839DEBUG:root: [1m/dev/udp/[4m[22mhost[24m[1m/[4m[22mport[0m
840DEBUG:root: If [4mhost[24m is a valid hostname or Internet address, and [4mport[24m is an integer port number or service name, [1mbash [22mattempts to open the corresponding UDP socket.
841DEBUG:root: A failure to open or create a file causes the redirection to fail.
842DEBUG:root: Redirections using file descriptors greater than 9 should be used with care, as they may conflict with file descriptors the shell uses internally.
843DEBUG:root: [1mRedirecting Input[0m
844DEBUG:root: Redirection of input causes the file whose name results from the expansion of [4mword[24m to be opened for reading on file descriptor [4mn[24m, or the standard input (file descriptor 0) if [4mn[24m is not specified.
845DEBUG:root: The general format for redirecting input is:
846DEBUG:root: [[4mn[24m][1m<[4m[22mword[0m
847DEBUG:root: [1mRedirecting Output[0m
848DEBUG:root: Redirection of output causes the file whose name results from the expansion of [4mword[24m to be opened for writing on file descriptor [4mn[24m, or the standard output (file descriptor 1) if [4mn[24m is not specified. If the file does
849DEBUG:root: not exist it is created; if it does exist it is truncated to zero size.
850DEBUG:root: The general format for redirecting output is:
851DEBUG:root: [[4mn[24m][1m>[4m[22mword[0m
852DEBUG:root: If the redirection operator is [1m>[22m, and the [1mnoclobber [22moption to the [1mset [22mbuiltin has been enabled, the redirection will fail if the file whose name results from the expansion of [4mword[24m exists and is a regular file. If
853DEBUG:root: the redirection operator is [1m>|[22m, or the redirection operator is [1m> [22mand the [1mnoclobber [22moption to the [1mset [22mbuiltin command is not enabled, the redirection is attempted even if the file named by [4mword[24m exists.
854DEBUG:root: [1mAppending Redirected Output[0m
855DEBUG:root: Redirection of output in this fashion causes the file whose name results from the expansion of [4mword[24m to be opened for appending on file descriptor [4mn[24m, or the standard output (file descriptor 1) if [4mn[24m is not specified.
856DEBUG:root: If the file does not exist it is created.
857DEBUG:root: The general format for appending output is:
858DEBUG:root: [[4mn[24m][1m>>[4m[22mword[0m
859DEBUG:root: [1mRedirecting Standard Output and Standard Error[0m
860DEBUG:root: This construct allows both the standard output (file descriptor 1) and the standard error output (file descriptor 2) to be redirected to the file whose name is the expansion of [4mword[24m.
861DEBUG:root: There are two formats for redirecting standard output and standard error:
862DEBUG:root: [1m&>[4m[22mword[0m
863DEBUG:root: and
864DEBUG:root: [1m>&[4m[22mword[0m
865DEBUG:root: Of the two forms, the first is preferred. This is semantically equivalent to
866DEBUG:root: [1m>[4m[22mword[24m 2[1m>&[22m1
867DEBUG:root: When using the second form, [4mword[24m may not expand to a number or [1m-[22m. If it does, other redirection operators apply (see [1mDuplicating File Descriptors [22mbelow) for compatibility reasons.
868DEBUG:root: [1mAppending Standard Output and Standard Error[0m
869DEBUG:root: This construct allows both the standard output (file descriptor 1) and the standard error output (file descriptor 2) to be appended to the file whose name is the expansion of [4mword[24m.
870DEBUG:root: The format for appending standard output and standard error is:
871DEBUG:root: [1m&>>[4m[22mword[0m
872DEBUG:root: This is semantically equivalent to
873DEBUG:root: [1m>>[4m[22mword[24m 2[1m>&[22m1
874DEBUG:root: (see [1mDuplicating File Descriptors [22mbelow).
875DEBUG:root: [1mHere Documents[0m
876DEBUG:root: This type of redirection instructs the shell to read input from the current source until a line containing only [4mdelimiter[24m (with no trailing blanks) is seen. All of the lines read up to that point are then used as
877DEBUG:root: the standard input (or file descriptor [4mn[24m if [4mn[24m is specified) for a command.
878DEBUG:root: The format of here-documents is:
879DEBUG:root: [[4mn[24m][1m<<[22m[[1m-[22m][4mword[0m
880DEBUG:root: [4mhere-document[0m
881DEBUG:root: [4mdelimiter[0m
882DEBUG:root: No parameter and variable expansion, command substitution, arithmetic expansion, or pathname expansion is performed on [4mword[24m. If any part of [4mword[24m is quoted, the [4mdelimiter[24m is the result of quote removal on [4mword[24m, and
883DEBUG:root: the lines in the here-document are not expanded. If [4mword[24m is unquoted, all lines of the here-document are subjected to parameter expansion, command substitution, and arithmetic expansion, the character sequence
884DEBUG:root: [1m\<newline> [22mis ignored, and [1m\ [22mmust be used to quote the characters [1m\[22m, [1m$[22m, and [1m`[22m.
885DEBUG:root: If the redirection operator is [1m<<-[22m, then all leading tab characters are stripped from input lines and the line containing [4mdelimiter[24m. This allows here-documents within shell scripts to be indented in a natural fash‐
886DEBUG:root: ion.
887DEBUG:root: [1mHere Strings[0m
888DEBUG:root: A variant of here documents, the format is:
889DEBUG:root: [[4mn[24m][1m<<<[4m[22mword[0m
890DEBUG:root: The [4mword[24m undergoes brace expansion, tilde expansion, parameter and variable expansion, command substitution, arithmetic expansion, and quote removal. Pathname expansion and word splitting are not performed. The re‐
891DEBUG:root: sult is supplied as a single string, with a newline appended, to the command on its standard input (or file descriptor [4mn[24m if [4mn[24m is specified).
892DEBUG:root: [1mDuplicating File Descriptors[0m
893DEBUG:root: The redirection operator
894DEBUG:root: [[4mn[24m][1m<&[4m[22mword[0m
895DEBUG:root: is used to duplicate input file descriptors. If [4mword[24m expands to one or more digits, the file descriptor denoted by [4mn[24m is made to be a copy of that file descriptor. If the digits in [4mword[24m do not specify a file de‐
896DEBUG:root: scriptor open for input, a redirection error occurs. If [4mword[24m evaluates to [1m-[22m, file descriptor [4mn[24m is closed. If [4mn[24m is not specified, the standard input (file descriptor 0) is used.
897DEBUG:root: The operator
898DEBUG:root: [[4mn[24m][1m>&[4m[22mword[0m
899DEBUG:root: is used similarly to duplicate output file descriptors. If [4mn[24m is not specified, the standard output (file descriptor 1) is used. If the digits in [4mword[24m do not specify a file descriptor open for output, a redirection
900DEBUG:root: error occurs. If [4mword[24m evaluates to [1m-[22m, file descriptor [4mn[24m is closed. As a special case, if [4mn[24m is omitted, and [4mword[24m does not expand to one or more digits or [1m-[22m, the standard output and standard error are redirected as
901DEBUG:root: described previously.
902DEBUG:root: [1mMoving File Descriptors[0m
903DEBUG:root: The redirection operator
904DEBUG:root: [[4mn[24m][1m<&[4m[22mdigit[24m[1m-[0m
905DEBUG:root: moves the file descriptor [4mdigit[24m to file descriptor [4mn[24m, or the standard input (file descriptor 0) if [4mn[24m is not specified. [4mdigit[24m is closed after being duplicated to [4mn[24m.
906DEBUG:root: Similarly, the redirection operator
907DEBUG:root: [[4mn[24m][1m>&[4m[22mdigit[24m[1m-[0m
908DEBUG:root: moves the file descriptor [4mdigit[24m to file descriptor [4mn[24m, or the standard output (file descriptor 1) if [4mn[24m is not specified.
909DEBUG:root: [1mOpening File Descriptors for Reading and Writing[0m
910DEBUG:root: The redirection operator
911DEBUG:root: [[4mn[24m][1m<>[4m[22mword[0m
912DEBUG:root: causes the file whose name is the expansion of [4mword[24m to be opened for both reading and writing on file descriptor [4mn[24m, or on file descriptor 0 if [4mn[24m is not specified. If the file does not exist, it is created.
913DEBUG:root:[1mALIASES[0m
914DEBUG:root: [4mAliases[24m allow a string to be substituted for a word when it is used as the first word of a simple command. The shell maintains a list of aliases that may be set and unset with the [1malias [22mand [1munalias [22mbuiltin commands
915DEBUG:root: (see [1mSHELL BUILTIN COMMANDS [22mbelow). The first word of each simple command, if unquoted, is checked to see if it has an alias. If so, that word is replaced by the text of the alias. The characters [1m/[22m, [1m$[22m, [1m`[22m, and [1m=[0m
916DEBUG:root: and any of the shell [4mmetacharacters[24m or quoting characters listed above may not appear in an alias name. The replacement text may contain any valid shell input, including shell metacharacters. The first word of the
917DEBUG:root: replacement text is tested for aliases, but a word that is identical to an alias being expanded is not expanded a second time. This means that one may alias [1mls [22mto [1mls -F[22m, for instance, and [1mbash [22mdoes not try to recur‐
918DEBUG:root: sively expand the replacement text. If the last character of the alias value is a [4mblank[24m, then the next command word following the alias is also checked for alias expansion.
919DEBUG:root: Aliases are created and listed with the [1malias [22mcommand, and removed with the [1munalias [22mcommand.
920DEBUG:root: There is no mechanism for using arguments in the replacement text. If arguments are needed, a shell function should be used (see [1mFUNCTIONS [22mbelow).
921DEBUG:root: Aliases are not expanded when the shell is not interactive, unless the [1mexpand_aliases [22mshell option is set using [1mshopt [22m(see the description of [1mshopt [22munder [1mSHELL BUILTIN COMMANDS [22mbelow).
922DEBUG:root: The rules concerning the definition and use of aliases are somewhat confusing. [1mBash [22malways reads at least one complete line of input before executing any of the commands on that line. Aliases are expanded when a
923DEBUG:root: command is read, not when it is executed. Therefore, an alias definition appearing on the same line as another command does not take effect until the next line of input is read. The commands following the alias
924DEBUG:root: definition on that line are not affected by the new alias. This behavior is also an issue when functions are executed. Aliases are expanded when a function definition is read, not when the function is executed, be‐
925DEBUG:root: cause a function definition is itself a command. As a consequence, aliases defined in a function are not available until after that function is executed. To be safe, always put alias definitions on a separate line,
926DEBUG:root: and do not use [1malias [22min compound commands.
927DEBUG:root: For almost every purpose, aliases are superseded by shell functions.
928DEBUG:root:[1mFUNCTIONS[0m
929DEBUG:root: A shell function, defined as described above under [1mSHELL GRAMMAR[22m, stores a series of commands for later execution. When the name of a shell function is used as a simple command name, the list of commands associated
930DEBUG:root: with that function name is executed. Functions are executed in the context of the current shell; no new process is created to interpret them (contrast this with the execution of a shell script). When a function is
931DEBUG:root: executed, the arguments to the function become the positional parameters during its execution. The special parameter [1m# [22mis updated to reflect the change. Special parameter [1m0 [22mis unchanged. The first element of the
932DEBUG:root: [1mFUNCNAME [22mvariable is set to the name of the function while the function is executing.
933DEBUG:root: All other aspects of the shell execution environment are identical between a function and its caller with these exceptions: the [1mDEBUG [22mand [1mRETURN [22mtraps (see the description of the [1mtrap [22mbuiltin under [1mSHELL BUILTIN COM‐[0m
934DEBUG:root: [1mMANDS [22mbelow) are not inherited unless the function has been given the [1mtrace [22mattribute (see the description of the [1mdeclare [22mbuiltin below) or the [1m-o functrace [22mshell option has been enabled with the [1mset [22mbuiltin (in
935DEBUG:root: which case all functions inherit the [1mDEBUG [22mand [1mRETURN [22mtraps), and the [1mERR [22mtrap is not inherited unless the [1m-o errtrace [22mshell option has been enabled.
936DEBUG:root: Variables local to the function may be declared with the [1mlocal [22mbuiltin command. Ordinarily, variables and their values are shared between the function and its caller.
937DEBUG:root: The [1mFUNCNEST [22mvariable, if set to a numeric value greater than 0, defines a maximum function nesting level. Function invocations that exceed the limit cause the entire command to abort.
938DEBUG:root: If the builtin command [1mreturn [22mis executed in a function, the function completes and execution resumes with the next command after the function call. Any command associated with the [1mRETURN [22mtrap is executed before ex‐
939DEBUG:root: ecution resumes. When a function completes, the values of the positional parameters and the special parameter [1m# [22mare restored to the values they had prior to the function's execution.
940DEBUG:root: Function names and definitions may be listed with the [1m-f [22moption to the [1mdeclare [22mor [1mtypeset [22mbuiltin commands. The [1m-F [22moption to [1mdeclare [22mor [1mtypeset [22mwill list the function names only (and optionally the source file and
941DEBUG:root: line number, if the [1mextdebug [22mshell option is enabled). Functions may be exported so that subshells automatically have them defined with the [1m-f [22moption to the [1mexport [22mbuiltin. A function definition may be deleted us‐
942DEBUG:root: ing the [1m-f [22moption to the [1munset [22mbuiltin. Note that shell functions and variables with the same name may result in multiple identically-named entries in the environment passed to the shell's children. Care should be
943DEBUG:root: taken in cases where this may cause a problem.
944DEBUG:root: Functions may be recursive. The [1mFUNCNEST [22mvariable may be used to limit the depth of the function call stack and restrict the number of function invocations. By default, no limit is imposed on the number of recur‐
945DEBUG:root: sive calls.
946DEBUG:root:[1mARITHMETIC EVALUATION[0m
947DEBUG:root: The shell allows arithmetic expressions to be evaluated, under certain circumstances (see the [1mlet [22mand [1mdeclare [22mbuiltin commands, the [1m(( [22mcompound command, and [1mArithmetic Expansion[22m). Evaluation is done in fixed-width
948DEBUG:root: integers with no check for overflow, though division by 0 is trapped and flagged as an error. The operators and their precedence, associativity, and values are the same as in the C language. The following list of
949DEBUG:root: operators is grouped into levels of equal-precedence operators. The levels are listed in order of decreasing precedence.
950DEBUG:root: [4mid[24m[1m++ [4m[22mid[24m[1m--[0m
951DEBUG:root: variable post-increment and post-decrement
952DEBUG:root: [1m++[4m[22mid[24m [1m--[4m[22mid[0m
953DEBUG:root: variable pre-increment and pre-decrement
954DEBUG:root: [1m- + [22munary minus and plus
955DEBUG:root: [1m! ~ [22mlogical and bitwise negation
956DEBUG:root: [1m** [22mexponentiation
957DEBUG:root: [1m* / % [22mmultiplication, division, remainder
958DEBUG:root: [1m+ - [22maddition, subtraction
959DEBUG:root: [1m<< >> [22mleft and right bitwise shifts
960DEBUG:root: [1m<= >= < >[0m
961DEBUG:root: comparison
962DEBUG:root: [1m== != [22mequality and inequality
963DEBUG:root: [1m& [22mbitwise AND
964DEBUG:root: [1m^ [22mbitwise exclusive OR
965DEBUG:root: [1m| [22mbitwise OR
966DEBUG:root: [1m&& [22mlogical AND
967DEBUG:root: [1m|| [22mlogical OR
968DEBUG:root: [4mexpr[24m[1m?[4m[22mexpr[24m[1m:[4m[22mexpr[0m
969DEBUG:root: conditional operator
970DEBUG:root: [1m= *= /= %= += -= <<= >>= &= ^= |=[0m
971DEBUG:root: assignment
972DEBUG:root: [4mexpr1[24m [1m, [4m[22mexpr2[0m
973DEBUG:root: comma
974DEBUG:root: Shell variables are allowed as operands; parameter expansion is performed before the expression is evaluated. Within an expression, shell variables may also be referenced by name without using the parameter expan‐
975DEBUG:root: sion syntax. A shell variable that is null or unset evaluates to 0 when referenced by name without using the parameter expansion syntax. The value of a variable is evaluated as an arithmetic expression when it is
976DEBUG:root: referenced, or when a variable which has been given the [4minteger[24m attribute using [1mdeclare -i [22mis assigned a value. A null value evaluates to 0. A shell variable need not have its [4minteger[24m attribute turned on to be used
977DEBUG:root: in an expression.
978DEBUG:root: Constants with a leading 0 are interpreted as octal numbers. A leading 0x or 0X denotes hexadecimal. Otherwise, numbers take the form [[4mbase#[24m]n, where the optional [4mbase[24m is a decimal number between 2 and 64 repre‐
979DEBUG:root: senting the arithmetic base, and [4mn[24m is a number in that base. If [4mbase#[24m is omitted, then base 10 is used. When specifying [4mn[24m, the digits greater than 9 are represented by the lowercase letters, the uppercase letters,
980DEBUG:root: @, and _, in that order. If [4mbase[24m is less than or equal to 36, lowercase and uppercase letters may be used interchangeably to represent numbers between 10 and 35.
981DEBUG:root: Operators are evaluated in order of precedence. Sub-expressions in parentheses are evaluated first and may override the precedence rules above.
982DEBUG:root:[1mCONDITIONAL EXPRESSIONS[0m
983DEBUG:root: Conditional expressions are used by the [1m[[ [22mcompound command and the [1mtest [22mand [1m[ [22mbuiltin commands to test file attributes and perform string and arithmetic comparisons. Expressions are formed from the following unary
984DEBUG:root: or binary primaries. [1mBash [22mhandles several filenames specially when they are used in expressions. If the operating system on which [1mbash [22mis running provides these special files, bash will use them; otherwise it will
985DEBUG:root: emulate them internally with this behavior: If any [4mfile[24m argument to one of the primaries is of the form [4m/dev/fd/n[24m, then file descriptor [4mn[24m is checked. If the [4mfile[24m argument to one of the primaries is one of
986DEBUG:root: [4m/dev/stdin[24m, [4m/dev/stdout[24m, or [4m/dev/stderr[24m, file descriptor 0, 1, or 2, respectively, is checked.
987DEBUG:root: Unless otherwise specified, primaries that operate on files follow symbolic links and operate on the target of the link, rather than the link itself.
988DEBUG:root: When used with [1m[[[22m, the [1m< [22mand [1m> [22moperators sort lexicographically using the current locale. The [1mtest [22mcommand sorts using ASCII ordering.
989DEBUG:root: [1m-a [4m[22mfile[0m
990DEBUG:root: True if [4mfile[24m exists.
991DEBUG:root: [1m-b [4m[22mfile[0m
992DEBUG:root: True if [4mfile[24m exists and is a block special file.
993DEBUG:root: [1m-c [4m[22mfile[0m
994DEBUG:root: True if [4mfile[24m exists and is a character special file.
995DEBUG:root: [1m-d [4m[22mfile[0m
996DEBUG:root: True if [4mfile[24m exists and is a directory.
997DEBUG:root: [1m-e [4m[22mfile[0m
998DEBUG:root: True if [4mfile[24m exists.
999DEBUG:root: [1m-f [4m[22mfile[0m
1000DEBUG:root: True if [4mfile[24m exists and is a regular file.
1001DEBUG:root: [1m-g [4m[22mfile[0m
1002DEBUG:root: True if [4mfile[24m exists and is set-group-id.
1003DEBUG:root: [1m-h [4m[22mfile[0m
1004DEBUG:root: True if [4mfile[24m exists and is a symbolic link.
1005DEBUG:root: [1m-k [4m[22mfile[0m
1006DEBUG:root: True if [4mfile[24m exists and its ``sticky'' bit is set.
1007DEBUG:root: [1m-p [4m[22mfile[0m
1008DEBUG:root: True if [4mfile[24m exists and is a named pipe (FIFO).
1009DEBUG:root: [1m-r [4m[22mfile[0m
1010DEBUG:root: True if [4mfile[24m exists and is readable.
1011DEBUG:root: [1m-s [4m[22mfile[0m
1012DEBUG:root: True if [4mfile[24m exists and has a size greater than zero.
1013DEBUG:root: [1m-t [4m[22mfd[24m True if file descriptor [4mfd[24m is open and refers to a terminal.
1014DEBUG:root: [1m-u [4m[22mfile[0m
1015DEBUG:root: True if [4mfile[24m exists and its set-user-id bit is set.
1016DEBUG:root: [1m-w [4m[22mfile[0m
1017DEBUG:root: True if [4mfile[24m exists and is writable.
1018DEBUG:root: [1m-x [4m[22mfile[0m
1019DEBUG:root: True if [4mfile[24m exists and is executable.
1020DEBUG:root: [1m-G [4m[22mfile[0m
1021DEBUG:root: True if [4mfile[24m exists and is owned by the effective group id.
1022DEBUG:root: [1m-L [4m[22mfile[0m
1023DEBUG:root: True if [4mfile[24m exists and is a symbolic link.
1024DEBUG:root: [1m-N [4m[22mfile[0m
1025DEBUG:root: True if [4mfile[24m exists and has been modified since it was last read.
1026DEBUG:root: [1m-O [4m[22mfile[0m
1027DEBUG:root: True if [4mfile[24m exists and is owned by the effective user id.
1028DEBUG:root: [1m-S [4m[22mfile[0m
1029DEBUG:root: True if [4mfile[24m exists and is a socket.
1030DEBUG:root: [4mfile1[24m [1m-ef [4m[22mfile2[0m
1031DEBUG:root: True if [4mfile1[24m and [4mfile2[24m refer to the same device and inode numbers.
1032DEBUG:root: [4mfile1[24m -[1mnt [4m[22mfile2[0m
1033DEBUG:root: True if [4mfile1[24m is newer (according to modification date) than [4mfile2[24m, or if [4mfile1[24m exists and [4mfile2[24m does not.
1034DEBUG:root: [4mfile1[24m -[1mot [4m[22mfile2[0m
1035DEBUG:root: True if [4mfile1[24m is older than [4mfile2[24m, or if [4mfile2[24m exists and [4mfile1[24m does not.
1036DEBUG:root: [1m-o [4m[22moptname[0m
1037DEBUG:root: True if the shell option [4moptname[24m is enabled. See the list of options under the description of the [1m-o [22moption to the [1mset [22mbuiltin below.
1038DEBUG:root: [1m-v [4m[22mvarname[0m
1039DEBUG:root: True if the shell variable [4mvarname[24m is set (has been assigned a value).
1040DEBUG:root: [1m-R [4m[22mvarname[0m
1041DEBUG:root: True if the shell variable [4mvarname[24m is set and is a name reference.
1042DEBUG:root: [1m-z [4m[22mstring[0m
1043DEBUG:root: True if the length of [4mstring[24m is zero.
1044DEBUG:root: [4mstring[0m
1045DEBUG:root: [1m-n [4m[22mstring[0m
1046DEBUG:root: True if the length of [4mstring[24m is non-zero.
1047DEBUG:root: [4mstring1[24m [1m== [4m[22mstring2[0m
1048DEBUG:root: [4mstring1[24m [1m= [4m[22mstring2[0m
1049DEBUG:root: True if the strings are equal. [1m= [22mshould be used with the [1mtest [22mcommand for POSIX conformance. When used with the [1m[[ [22mcommand, this performs pattern matching as described above ([1mCompound Commands[22m).
1050DEBUG:root: [4mstring1[24m [1m!= [4m[22mstring2[0m
1051DEBUG:root: True if the strings are not equal.
1052DEBUG:root: [4mstring1[24m [1m< [4m[22mstring2[0m
1053DEBUG:root: True if [4mstring1[24m sorts before [4mstring2[24m lexicographically.
1054DEBUG:root: [4mstring1[24m [1m> [4m[22mstring2[0m
1055DEBUG:root: True if [4mstring1[24m sorts after [4mstring2[24m lexicographically.
1056DEBUG:root: [4marg1[24m [1mOP [4m[22marg2[0m
1057DEBUG:root: [1mOP [22mis one of [1m-eq[22m, [1m-ne[22m, [1m-lt[22m, [1m-le[22m, [1m-gt[22m, or [1m-ge[22m. These arithmetic binary operators return true if [4marg1[24m is equal to, not equal to, less than, less than or equal to, greater than, or greater than or equal to [4marg2[24m,
1058DEBUG:root: respectively. [4mArg1[24m and [4marg2[24m may be positive or negative integers.
1059DEBUG:root:[1mSIMPLE COMMAND EXPANSION[0m
1060DEBUG:root: When a simple command is executed, the shell performs the following expansions, assignments, and redirections, from left to right.
1061DEBUG:root: 1. The words that the parser has marked as variable assignments (those preceding the command name) and redirections are saved for later processing.
1062DEBUG:root: 2. The words that are not variable assignments or redirections are expanded. If any words remain after expansion, the first word is taken to be the name of the command and the remaining words are the arguments.
1063DEBUG:root: 3. Redirections are performed as described above under [1mREDIRECTION[22m.
1064DEBUG:root: 4. The text after the [1m= [22min each variable assignment undergoes tilde expansion, parameter expansion, command substitution, arithmetic expansion, and quote removal before being assigned to the variable.
1065DEBUG:root: If no command name results, the variable assignments affect the current shell environment. Otherwise, the variables are added to the environment of the executed command and do not affect the current shell environ‐
1066DEBUG:root: ment. If any of the assignments attempts to assign a value to a readonly variable, an error occurs, and the command exits with a non-zero status.
1067DEBUG:root: If no command name results, redirections are performed, but do not affect the current shell environment. A redirection error causes the command to exit with a non-zero status.
1068DEBUG:root: If there is a command name left after expansion, execution proceeds as described below. Otherwise, the command exits. If one of the expansions contained a command substitution, the exit status of the command is the
1069DEBUG:root: exit status of the last command substitution performed. If there were no command substitutions, the command exits with a status of zero.
1070DEBUG:root:[1mCOMMAND EXECUTION[0m
1071DEBUG:root: After a command has been split into words, if it results in a simple command and an optional list of arguments, the following actions are taken.
1072DEBUG:root: If the command name contains no slashes, the shell attempts to locate it. If there exists a shell function by that name, that function is invoked as described above in [1mFUNCTIONS[22m. If the name does not match a func‐
1073DEBUG:root: tion, the shell searches for it in the list of shell builtins. If a match is found, that builtin is invoked.
1074DEBUG:root: If the name is neither a shell function nor a builtin, and contains no slashes, [1mbash [22msearches each element of the [1mPATH [22mfor a directory containing an executable file by that name. [1mBash [22muses a hash table to remember
1075DEBUG:root: the full pathnames of executable files (see [1mhash [22munder [1mSHELL BUILTIN COMMANDS [22mbelow). A full search of the directories in [1mPATH [22mis performed only if the command is not found in the hash table. If the search is un‐
1076DEBUG:root: successful, the shell searches for a defined shell function named [1mcommand_not_found_handle[22m. If that function exists, it is invoked with the original command and the original command's arguments as its arguments, and
1077DEBUG:root: the function's exit status becomes the exit status of the shell. If that function is not defined, the shell prints an error message and returns an exit status of 127.
1078DEBUG:root: If the search is successful, or if the command name contains one or more slashes, the shell executes the named program in a separate execution environment. Argument 0 is set to the name given, and the remaining ar‐
1079DEBUG:root: guments to the command are set to the arguments given, if any.
1080DEBUG:root: If this execution fails because the file is not in executable format, and the file is not a directory, it is assumed to be a [4mshell[24m [4mscript[24m, a file containing shell commands. A subshell is spawned to execute it. This
1081DEBUG:root: subshell reinitializes itself, so that the effect is as if a new shell had been invoked to handle the script, with the exception that the locations of commands remembered by the parent (see [1mhash [22mbelow under [1mSHELL[0m
1082DEBUG:root: [1mBUILTIN COMMANDS[22m) are retained by the child.
1083DEBUG:root: If the program is a file beginning with [1m#![22m, the remainder of the first line specifies an interpreter for the program. The shell executes the specified interpreter on operating systems that do not handle this exe‐
1084DEBUG:root: cutable format themselves. The arguments to the interpreter consist of a single optional argument following the interpreter name on the first line of the program, followed by the name of the program, followed by the
1085DEBUG:root: command arguments, if any.
1086DEBUG:root:[1mCOMMAND EXECUTION ENVIRONMENT[0m
1087DEBUG:root: The shell has an [4mexecution[24m [4menvironment[24m, which consists of the following:
1088DEBUG:root: • open files inherited by the shell at invocation, as modified by redirections supplied to the [1mexec [22mbuiltin
1089DEBUG:root: • the current working directory as set by [1mcd[22m, [1mpushd[22m, or [1mpopd[22m, or inherited by the shell at invocation
1090DEBUG:root: • the file creation mode mask as set by [1mumask [22mor inherited from the shell's parent
1091DEBUG:root: • current traps set by [1mtrap[0m
1092DEBUG:root: • shell parameters that are set by variable assignment or with [1mset [22mor inherited from the shell's parent in the environment
1093DEBUG:root: • shell functions defined during execution or inherited from the shell's parent in the environment
1094DEBUG:root: • options enabled at invocation (either by default or with command-line arguments) or by [1mset[0m
1095DEBUG:root: • options enabled by [1mshopt[0m
1096DEBUG:root: • shell aliases defined with [1malias[0m
1097DEBUG:root: • various process IDs, including those of background jobs, the value of [1m$$[22m, and the value of [1mPPID[0m
1098DEBUG:root: When a simple command other than a builtin or shell function is to be executed, it is invoked in a separate execution environment that consists of the following. Unless otherwise noted, the values are inherited from
1099DEBUG:root: the shell.
1100DEBUG:root: • the shell's open files, plus any modifications and additions specified by redirections to the command
1101DEBUG:root: • the current working directory
1102DEBUG:root: • the file creation mode mask
1103DEBUG:root: • shell variables and functions marked for export, along with variables exported for the command, passed in the environment
1104DEBUG:root: • traps caught by the shell are reset to the values inherited from the shell's parent, and traps ignored by the shell are ignored
1105DEBUG:root: A command invoked in this separate environment cannot affect the shell's execution environment.
1106DEBUG:root: Command substitution, commands grouped with parentheses, and asynchronous commands are invoked in a subshell environment that is a duplicate of the shell environment, except that traps caught by the shell are reset
1107DEBUG:root: to the values that the shell inherited from its parent at invocation. Builtin commands that are invoked as part of a pipeline are also executed in a subshell environment. Changes made to the subshell environment
1108DEBUG:root: cannot affect the shell's execution environment.
1109DEBUG:root: Subshells spawned to execute command substitutions inherit the value of the [1m-e [22moption from the parent shell. When not in [4mposix[24m mode, [1mbash [22mclears the [1m-e [22moption in such subshells.
1110DEBUG:root: If a command is followed by a [1m& [22mand job control is not active, the default standard input for the command is the empty file [4m/dev/null[24m. Otherwise, the invoked command inherits the file descriptors of the calling
1111DEBUG:root: shell as modified by redirections.
1112DEBUG:root:[1mENVIRONMENT[0m
1113DEBUG:root: When a program is invoked it is given an array of strings called the [4menvironment[24m. This is a list of [4mname[24m-[4mvalue[24m pairs, of the form [4mname[24m=[4mvalue[24m.
1114DEBUG:root: The shell provides several ways to manipulate the environment. On invocation, the shell scans its own environment and creates a parameter for each name found, automatically marking it for [4mexport[24m to child processes.
1115DEBUG:root: Executed commands inherit the environment. The [1mexport [22mand [1mdeclare -x [22mcommands allow parameters and functions to be added to and deleted from the environment. If the value of a parameter in the environment is modi‐
1116DEBUG:root: fied, the new value becomes part of the environment, replacing the old. The environment inherited by any executed command consists of the shell's initial environment, whose values may be modified in the shell, less
1117DEBUG:root: any pairs removed by the [1munset [22mcommand, plus any additions via the [1mexport [22mand [1mdeclare -x [22mcommands.
1118DEBUG:root: The environment for any [4msimple[24m [4mcommand[24m or function may be augmented temporarily by prefixing it with parameter assignments, as described above in [1mPARAMETERS[22m. These assignment statements affect only the environment
1119DEBUG:root: seen by that command.
1120DEBUG:root: If the [1m-k [22moption is set (see the [1mset [22mbuiltin command below), then [4mall[24m parameter assignments are placed in the environment for a command, not just those that precede the command name.
1121DEBUG:root: When [1mbash [22minvokes an external command, the variable [1m_ [22mis set to the full filename of the command and passed to that command in its environment.
1122DEBUG:root:[1mEXIT STATUS[0m
1123DEBUG:root: The exit status of an executed command is the value returned by the [4mwaitpid[24m system call or equivalent function. Exit statuses fall between 0 and 255, though, as explained below, the shell may use values above 125
1124DEBUG:root: specially. Exit statuses from shell builtins and compound commands are also limited to this range. Under certain circumstances, the shell will use special values to indicate specific failure modes.
1125DEBUG:root: For the shell's purposes, a command which exits with a zero exit status has succeeded. An exit status of zero indicates success. A non-zero exit status indicates failure. When a command terminates on a fatal sig‐
1126DEBUG:root: nal [4mN[24m, [1mbash [22muses the value of 128+[4mN[24m as the exit status.
1127DEBUG:root: If a command is not found, the child process created to execute it returns a status of 127. If a command is found but is not executable, the return status is 126.
1128DEBUG:root: If a command fails because of an error during expansion or redirection, the exit status is greater than zero.
1129DEBUG:root: Shell builtin commands return a status of 0 ([4mtrue[24m) if successful, and non-zero ([4mfalse[24m) if an error occurs while they execute. All builtins return an exit status of 2 to indicate incorrect usage, generally invalid
1130DEBUG:root: options or missing arguments.
1131DEBUG:root: [1mBash [22mitself returns the exit status of the last command executed, unless a syntax error occurs, in which case it exits with a non-zero value. See also the [1mexit [22mbuiltin command below.
1132DEBUG:root:[1mSIGNALS[0m
1133DEBUG:root: When [1mbash [22mis interactive, in the absence of any traps, it ignores [1mSIGTERM [22m(so that [1mkill 0 [22mdoes not kill an interactive shell), and [1mSIGINT [22mis caught and handled (so that the [1mwait [22mbuiltin is interruptible). In all
1134DEBUG:root: cases, [1mbash [22mignores [1mSIGQUIT[22m. If job control is in effect, [1mbash [22mignores [1mSIGTTIN[22m, [1mSIGTTOU[22m, and [1mSIGTSTP[22m.
1135DEBUG:root: Non-builtin commands run by [1mbash [22mhave signal handlers set to the values inherited by the shell from its parent. When job control is not in effect, asynchronous commands ignore [1mSIGINT [22mand [1mSIGQUIT [22min addition to these
1136DEBUG:root: inherited handlers. Commands run as a result of command substitution ignore the keyboard-generated job control signals [1mSIGTTIN[22m, [1mSIGTTOU[22m, and [1mSIGTSTP[22m.
1137DEBUG:root: The shell exits by default upon receipt of a [1mSIGHUP[22m. Before exiting, an interactive shell resends the [1mSIGHUP [22mto all jobs, running or stopped. Stopped jobs are sent [1mSIGCONT [22mto ensure that they receive the [1mSIGHUP[22m.
1138DEBUG:root: To prevent the shell from sending the signal to a particular job, it should be removed from the jobs table with the [1mdisown [22mbuiltin (see [1mSHELL BUILTIN COMMANDS [22mbelow) or marked to not receive [1mSIGHUP [22musing [1mdisown -h[22m.
1139DEBUG:root: If the [1mhuponexit [22mshell option has been set with [1mshopt[22m, [1mbash [22msends a [1mSIGHUP [22mto all jobs when an interactive login shell exits.
1140DEBUG:root: If [1mbash [22mis waiting for a command to complete and receives a signal for which a trap has been set, the trap will not be executed until the command completes. When [1mbash [22mis waiting for an asynchronous command via the
1141DEBUG:root: [1mwait [22mbuiltin, the reception of a signal for which a trap has been set will cause the [1mwait [22mbuiltin to return immediately with an exit status greater than 128, immediately after which the trap is executed.
1142DEBUG:root:[1mJOB CONTROL[0m
1143DEBUG:root: [4mJob[24m [4mcontrol[24m refers to the ability to selectively stop ([4msuspend[24m) the execution of processes and continue ([4mresume[24m) their execution at a later point. A user typically employs this facility via an interactive interface
1144DEBUG:root: supplied jointly by the operating system kernel's terminal driver and [1mbash[22m.
1145DEBUG:root: The shell associates a [4mjob[24m with each pipeline. It keeps a table of currently executing jobs, which may be listed with the [1mjobs [22mcommand. When [1mbash [22mstarts a job asynchronously (in the [4mbackground[24m), it prints a line
1146DEBUG:root: that looks like:
1147DEBUG:root: [1] 25647
1148DEBUG:root: indicating that this job is job number 1 and that the process ID of the last process in the pipeline associated with this job is 25647. All of the processes in a single pipeline are members of the same job. [1mBash[0m
1149DEBUG:root: uses the [4mjob[24m abstraction as the basis for job control.
1150DEBUG:root: To facilitate the implementation of the user interface to job control, the operating system maintains the notion of a [4mcurrent[24m [4mterminal[24m [4mprocess[24m [4mgroup[24m [4mID[24m. Members of this process group (processes whose process group
1151DEBUG:root: ID is equal to the current terminal process group ID) receive keyboard-generated signals such as [1mSIGINT[22m. These processes are said to be in the [4mforeground[24m. [4mBackground[24m processes are those whose process group ID dif‐
1152DEBUG:root: fers from the terminal's; such processes are immune to keyboard-generated signals. Only foreground processes are allowed to read from or, if the user so specifies with stty tostop, write to the terminal. Background
1153DEBUG:root: processes which attempt to read from (write to when stty tostop is in effect) the terminal are sent a [1mSIGTTIN (SIGTTOU) [22msignal by the kernel's terminal driver, which, unless caught, suspends the process.
1154DEBUG:root: If the operating system on which [1mbash [22mis running supports job control, [1mbash [22mcontains facilities to use it. Typing the [4msuspend[24m character (typically [1m^Z[22m, Control-Z) while a process is running causes that process to be
1155DEBUG:root: stopped and returns control to [1mbash[22m. Typing the [4mdelayed[24m [4msuspend[24m character (typically [1m^Y[22m, Control-Y) causes the process to be stopped when it attempts to read input from the terminal, and control to be returned to
1156DEBUG:root: [1mbash[22m. The user may then manipulate the state of this job, using the [1mbg [22mcommand to continue it in the background, the [1mfg [22mcommand to continue it in the foreground, or the [1mkill [22mcommand to kill it. A [1m^Z [22mtakes effect
1157DEBUG:root: immediately, and has the additional side effect of causing pending output and typeahead to be discarded.
1158DEBUG:root: There are a number of ways to refer to a job in the shell. The character [1m% [22mintroduces a job specification ([4mjobspec[24m). Job number [4mn[24m may be referred to as [1m%n[22m. A job may also be referred to using a prefix of the name
1159DEBUG:root: used to start it, or using a substring that appears in its command line. For example, [1m%ce [22mrefers to a stopped [1mce [22mjob. If a prefix matches more than one job, [1mbash [22mreports an error. Using [1m%?ce[22m, on the other hand,
1160DEBUG:root: refers to any job containing the string [1mce [22min its command line. If the substring matches more than one job, [1mbash [22mreports an error. The symbols [1m%% [22mand [1m%+ [22mrefer to the shell's notion of the [4mcurrent[24m [4mjob[24m, which is the
1161DEBUG:root: last job stopped while it was in the foreground or started in the background. The [4mprevious[24m [4mjob[24m may be referenced using [1m%-[22m. If there is only a single job, [1m%+ [22mand [1m%- [22mcan both be used to refer to that job. In output
1162DEBUG:root: pertaining to jobs (e.g., the output of the [1mjobs [22mcommand), the current job is always flagged with a [1m+[22m, and the previous job with a [1m-[22m. A single % (with no accompanying job specification) also refers to the current
1163DEBUG:root: job.
1164DEBUG:root: Simply naming a job can be used to bring it into the foreground: [1m%1 [22mis a synonym for [1m``fg %1''[22m, bringing job 1 from the background into the foreground. Similarly, [1m``%1 &'' [22mresumes job 1 in the background, equivalent
1165DEBUG:root: to [1m``bg %1''[22m.
1166DEBUG:root: The shell learns immediately whenever a job changes state. Normally, [1mbash [22mwaits until it is about to print a prompt before reporting changes in a job's status so as to not interrupt any other output. If the [1m-b [22mop‐
1167DEBUG:root: tion to the [1mset [22mbuiltin command is enabled, [1mbash [22mreports such changes immediately. Any trap on [1mSIGCHLD [22mis executed for each child that exits.
1168DEBUG:root: If an attempt to exit [1mbash [22mis made while jobs are stopped (or, if the [1mcheckjobs [22mshell option has been enabled using the [1mshopt [22mbuiltin, running), the shell prints a warning message, and, if the [1mcheckjobs [22moption is en‐
1169DEBUG:root: abled, lists the jobs and their statuses. The [1mjobs [22mcommand may then be used to inspect their status. If a second attempt to exit is made without an intervening command, the shell does not print another warning, and
1170DEBUG:root: any stopped jobs are terminated.
1171DEBUG:root:[1mPROMPTING[0m
1172DEBUG:root: When executing interactively, [1mbash [22mdisplays the primary prompt [1mPS1 [22mwhen it is ready to read a command, and the secondary prompt [1mPS2 [22mwhen it needs more input to complete a command. [1mBash [22mdisplays [1mPS0 [22mafter it reads a
1173DEBUG:root: command but before executing it. [1mBash [22mallows these prompt strings to be customized by inserting a number of backslash-escaped special characters that are decoded as follows:
1174DEBUG:root: [1m\a [22man ASCII bell character (07)
1175DEBUG:root: [1m\d [22mthe date in "Weekday Month Date" format (e.g., "Tue May 26")
1176DEBUG:root: [1m\D{[4m[22mformat[24m[1m}[0m
1177DEBUG:root: the [4mformat[24m is passed to [4mstrftime[24m(3) and the result is inserted into the prompt string; an empty [4mformat[24m results in a locale-specific time representation. The braces are required
1178DEBUG:root: [1m\e [22man ASCII escape character (033)
1179DEBUG:root: [1m\h [22mthe hostname up to the first `.'
1180DEBUG:root: [1m\H [22mthe hostname
1181DEBUG:root: [1m\j [22mthe number of jobs currently managed by the shell
1182DEBUG:root: [1m\l [22mthe basename of the shell's terminal device name
1183DEBUG:root: [1m\n [22mnewline
1184DEBUG:root: [1m\r [22mcarriage return
1185DEBUG:root: [1m\s [22mthe name of the shell, the basename of [1m$0 [22m(the portion following the final slash)
1186DEBUG:root: [1m\t [22mthe current time in 24-hour HH:MM:SS format
1187DEBUG:root: [1m\T [22mthe current time in 12-hour HH:MM:SS format
1188DEBUG:root: [1m\@ [22mthe current time in 12-hour am/pm format
1189DEBUG:root: [1m\A [22mthe current time in 24-hour HH:MM format
1190DEBUG:root: [1m\u [22mthe username of the current user
1191DEBUG:root: [1m\v [22mthe version of [1mbash [22m(e.g., 2.00)
1192DEBUG:root: [1m\V [22mthe release of [1mbash[22m, version + patch level (e.g., 2.00.0)
1193DEBUG:root: [1m\w [22mthe current working directory, with [1m$HOME [22mabbreviated with a tilde (uses the value of the [1mPROMPT_DIRTRIM [22mvariable)
1194DEBUG:root: [1m\W [22mthe basename of the current working directory, with [1m$HOME [22mabbreviated with a tilde
1195DEBUG:root: [1m\! [22mthe history number of this command
1196DEBUG:root: [1m\# [22mthe command number of this command
1197DEBUG:root: [1m\$ [22mif the effective UID is 0, a [1m#[22m, otherwise a [1m$[0m
1198DEBUG:root: [1m\[4m[22mnnn[24m the character corresponding to the octal number [4mnnn[0m
1199DEBUG:root: [1m\\ [22ma backslash
1200DEBUG:root: [1m\[ [22mbegin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt
1201DEBUG:root: [1m\] [22mend a sequence of non-printing characters
1202DEBUG:root: The command number and the history number are usually different: the history number of a command is its position in the history list, which may include commands restored from the history file (see [1mHISTORY [22mbelow),
1203DEBUG:root: while the command number is the position in the sequence of commands executed during the current shell session. After the string is decoded, it is expanded via parameter expansion, command substitution, arithmetic
1204DEBUG:root: expansion, and quote removal, subject to the value of the [1mpromptvars [22mshell option (see the description of the [1mshopt [22mcommand under [1mSHELL BUILTIN COMMANDS [22mbelow).
1205DEBUG:root:[1mREADLINE[0m
1206DEBUG:root: This is the library that handles reading input when using an interactive shell, unless the [1m--noediting [22moption is given at shell invocation. Line editing is also used when using the [1m-e [22moption to the [1mread [22mbuiltin. By
1207DEBUG:root: default, the line editing commands are similar to those of Emacs. A vi-style line editing interface is also available. Line editing can be enabled at any time using the [1m-o emacs [22mor [1m-o vi [22moptions to the [1mset [22mbuiltin
1208DEBUG:root: (see [1mSHELL BUILTIN COMMANDS [22mbelow). To turn off line editing after the shell is running, use the [1m+o emacs [22mor [1m+o vi [22moptions to the [1mset [22mbuiltin.
1209DEBUG:root: [1mReadline Notation[0m
1210DEBUG:root: In this section, the Emacs-style notation is used to denote keystrokes. Control keys are denoted by C-[4mkey[24m, e.g., C-n means Control-N. Similarly, [4mmeta[24m keys are denoted by M-[4mkey[24m, so M-x means Meta-X. (On keyboards
1211DEBUG:root: without a [4mmeta[24m key, M-[4mx[24m means ESC [4mx[24m, i.e., press the Escape key then the [4mx[24m key. This makes ESC the [4mmeta[24m [4mprefix[24m. The combination M-C-[4mx[24m means ESC-Control-[4mx[24m, or press the Escape key then hold the Control key while
1212DEBUG:root: pressing the [4mx[24m key.)
1213DEBUG:root: Readline commands may be given numeric [4marguments[24m, which normally act as a repeat count. Sometimes, however, it is the sign of the argument that is significant. Passing a negative argument to a command that acts in
1214DEBUG:root: the forward direction (e.g., [1mkill-line[22m) causes that command to act in a backward direction. Commands whose behavior with arguments deviates from this are noted below.
1215DEBUG:root: When a command is described as [4mkilling[24m text, the text deleted is saved for possible future retrieval ([4myanking[24m). The killed text is saved in a [4mkill[24m [4mring[24m. Consecutive kills cause the text to be accumulated into one
1216DEBUG:root: unit, which can be yanked all at once. Commands which do not kill text separate the chunks of text on the kill ring.
1217DEBUG:root: [1mReadline Initialization[0m
1218DEBUG:root: Readline is customized by putting commands in an initialization file (the [4minputrc[24m file). The name of this file is taken from the value of the [1mINPUTRC [22mvariable. If that variable is unset, the default is [4m~/.inputrc[24m.
1219DEBUG:root: When a program which uses the readline library starts up, the initialization file is read, and the key bindings and variables are set. There are only a few basic constructs allowed in the readline initialization
1220DEBUG:root: file. Blank lines are ignored. Lines beginning with a [1m# [22mare comments. Lines beginning with a [1m$ [22mindicate conditional constructs. Other lines denote key bindings and variable settings.
1221DEBUG:root: The default key-bindings may be changed with an [4minputrc[24m file. Other programs that use this library may add their own commands and bindings.
1222DEBUG:root: For example, placing
1223DEBUG:root: M-Control-u: universal-argument
1224DEBUG:root: or
1225DEBUG:root: C-Meta-u: universal-argument
1226DEBUG:root: into the [4minputrc[24m would make M-C-u execute the readline command [4muniversal-argument[24m.
1227DEBUG:root: The following symbolic character names are recognized: [4mRUBOUT[24m, [4mDEL[24m, [4mESC[24m, [4mLFD[24m, [4mNEWLINE[24m, [4mRET[24m, [4mRETURN[24m, [4mSPC[24m, [4mSPACE[24m, and [4mTAB[24m.
1228DEBUG:root: In addition to command names, readline allows keys to be bound to a string that is inserted when the key is pressed (a [4mmacro[24m).
1229DEBUG:root: [1mReadline Key Bindings[0m
1230DEBUG:root: The syntax for controlling key bindings in the [4minputrc[24m file is simple. All that is required is the name of the command or the text of a macro and a key sequence to which it should be bound. The name may be speci‐
1231DEBUG:root: fied in one of two ways: as a symbolic key name, possibly with [4mMeta-[24m or [4mControl-[24m prefixes, or as a key sequence.
1232DEBUG:root: When using the form [1mkeyname[22m:[4mfunction-name[24m or [4mmacro[24m, [4mkeyname[24m is the name of a key spelled out in English. For example:
1233DEBUG:root: Control-u: universal-argument
1234DEBUG:root: Meta-Rubout: backward-kill-word
1235DEBUG:root: Control-o: "> output"
1236DEBUG:root: In the above example, [4mC-u[24m is bound to the function [1muniversal-argument[22m, [4mM-DEL[24m is bound to the function [1mbackward-kill-word[22m, and [4mC-o[24m is bound to run the macro expressed on the right hand side (that is, to insert the
1237DEBUG:root: text ``> output'' into the line).
1238DEBUG:root: In the second form, [1m"keyseq"[22m:[4mfunction-name[24m or [4mmacro[24m, [1mkeyseq [22mdiffers from [1mkeyname [22mabove in that strings denoting an entire key sequence may be specified by placing the sequence within double quotes. Some GNU Emacs
1239DEBUG:root: style key escapes can be used, as in the following example, but the symbolic character names are not recognized.
1240DEBUG:root: "\C-u": universal-argument
1241DEBUG:root: "\C-x\C-r": re-read-init-file
1242DEBUG:root: "\e[11~": "Function Key 1"
1243DEBUG:root: In this example, [4mC-u[24m is again bound to the function [1muniversal-argument[22m. [4mC-x[24m [4mC-r[24m is bound to the function [1mre-read-init-file[22m, and [4mESC[24m [4m[[24m [4m1[24m [4m1[24m [4m~[24m is bound to insert the text ``Function Key 1''.
1244DEBUG:root: The full set of GNU Emacs style escape sequences is
1245DEBUG:root: [1m\C- [22mcontrol prefix
1246DEBUG:root: [1m\M- [22mmeta prefix
1247DEBUG:root: [1m\e [22man escape character
1248DEBUG:root: [1m\\ [22mbackslash
1249DEBUG:root: [1m\" [22mliteral "
1250DEBUG:root: [1m\' [22mliteral '
1251DEBUG:root: In addition to the GNU Emacs style escape sequences, a second set of backslash escapes is available:
1252DEBUG:root: [1m\a [22malert (bell)
1253DEBUG:root: [1m\b [22mbackspace
1254DEBUG:root: [1m\d [22mdelete
1255DEBUG:root: [1m\f [22mform feed
1256DEBUG:root: [1m\n [22mnewline
1257DEBUG:root: [1m\r [22mcarriage return
1258DEBUG:root: [1m\t [22mhorizontal tab
1259DEBUG:root: [1m\v [22mvertical tab
1260DEBUG:root: [1m\[4m[22mnnn[24m the eight-bit character whose value is the octal value [4mnnn[24m (one to three digits)
1261DEBUG:root: [1m\x[4m[22mHH[24m the eight-bit character whose value is the hexadecimal value [4mHH[24m (one or two hex digits)
1262DEBUG:root: When entering the text of a macro, single or double quotes must be used to indicate a macro definition. Unquoted text is assumed to be a function name. In the macro body, the backslash escapes described above are
1263DEBUG:root: expanded. Backslash will quote any other character in the macro text, including " and '.
1264DEBUG:root: [1mBash [22mallows the current readline key bindings to be displayed or modified with the [1mbind [22mbuiltin command. The editing mode may be switched during interactive use by using the [1m-o [22moption to the [1mset [22mbuiltin command (see
1265DEBUG:root: [1mSHELL BUILTIN COMMANDS [22mbelow).
1266DEBUG:root: [1mReadline Variables[0m
1267DEBUG:root: Readline has variables that can be used to further customize its behavior. A variable may be set in the [4minputrc[24m file with a statement of the form
1268DEBUG:root: [1mset [4m[22mvariable-name[24m [4mvalue[0m
1269DEBUG:root: Except where noted, readline variables can take the values [1mOn [22mor [1mOff [22m(without regard to case). Unrecognized variable names are ignored. When a variable value is read, empty or null values, "on" (case-insensitive),
1270DEBUG:root: and "1" are equivalent to [1mOn[22m. All other values are equivalent to [1mOff[22m. The variables and their default values are:
1271DEBUG:root: [1mbell-style (audible)[0m
1272DEBUG:root: Controls what happens when readline wants to ring the terminal bell. If set to [1mnone[22m, readline never rings the bell. If set to [1mvisible[22m, readline uses a visible bell if one is available. If set to [1maudible[22m,
1273DEBUG:root: readline attempts to ring the terminal's bell.
1274DEBUG:root: [1mbind-tty-special-chars (On)[0m
1275DEBUG:root: If set to [1mOn[22m, readline attempts to bind the control characters treated specially by the kernel's terminal driver to their readline equivalents.
1276DEBUG:root: [1mblink-matching-paren (Off)[0m
1277DEBUG:root: If set to [1mOn[22m, readline attempts to briefly move the cursor to an opening parenthesis when a closing parenthesis is inserted.
1278DEBUG:root: [1mcolored-completion-prefix (Off)[0m
1279DEBUG:root: If set to [1mOn[22m, when listing completions, readline displays the common prefix of the set of possible completions using a different color. The color definitions are taken from the value of the [1mLS_COLORS [22menviron‐
1280DEBUG:root: ment variable.
1281DEBUG:root: [1mcolored-stats (Off)[0m
1282DEBUG:root: If set to [1mOn[22m, readline displays possible completions using different colors to indicate their file type. The color definitions are taken from the value of the [1mLS_COLORS [22menvironment variable.
1283DEBUG:root: [1mcomment-begin (``#'')[0m
1284DEBUG:root: The string that is inserted when the readline [1minsert-comment [22mcommand is executed. This command is bound to [1mM-# [22min emacs mode and to [1m# [22min vi command mode.
1285DEBUG:root: [1mcompletion-display-width (-1)[0m
1286DEBUG:root: The number of screen columns used to display possible matches when performing completion. The value is ignored if it is less than 0 or greater than the terminal screen width. A value of 0 will cause matches
1287DEBUG:root: to be displayed one per line. The default value is -1.
1288DEBUG:root: [1mcompletion-ignore-case (Off)[0m
1289DEBUG:root: If set to [1mOn[22m, readline performs filename matching and completion in a case-insensitive fashion.
1290DEBUG:root: [1mcompletion-map-case (Off)[0m
1291DEBUG:root: If set to [1mOn[22m, and [1mcompletion-ignore-case [22mis enabled, readline treats hyphens ([4m-[24m) and underscores ([4m_[24m) as equivalent when performing case-insensitive filename matching and completion.
1292DEBUG:root: [1mcompletion-prefix-display-length (0)[0m
1293DEBUG:root: The length in characters of the common prefix of a list of possible completions that is displayed without modification. When set to a value greater than zero, common prefixes longer than this value are re‐
1294DEBUG:root: placed with an ellipsis when displaying possible completions.
1295DEBUG:root: [1mcompletion-query-items (100)[0m
1296DEBUG:root: This determines when the user is queried about viewing the number of possible completions generated by the [1mpossible-completions [22mcommand. It may be set to any integer value greater than or equal to zero. If
1297DEBUG:root: the number of possible completions is greater than or equal to the value of this variable, the user is asked whether or not he wishes to view them; otherwise they are simply listed on the terminal.
1298DEBUG:root: [1mconvert-meta (On)[0m
1299DEBUG:root: If set to [1mOn[22m, readline will convert characters with the eighth bit set to an ASCII key sequence by stripping the eighth bit and prefixing an escape character (in effect, using escape as the [4mmeta[24m [4mprefix[24m). The
1300DEBUG:root: default is [4mOn[24m, but readline will set it to [4mOff[24m if the locale contains eight-bit characters.
1301DEBUG:root: [1mdisable-completion (Off)[0m
1302DEBUG:root: If set to [1mOn[22m, readline will inhibit word completion. Completion characters will be inserted into the line as if they had been mapped to [1mself-insert[22m.
1303DEBUG:root: [1mecho-control-characters (On)[0m
1304DEBUG:root: When set to [1mOn[22m, on operating systems that indicate they support it, readline echoes a character corresponding to a signal generated from the keyboard.
1305DEBUG:root: [1mediting-mode (emacs)[0m
1306DEBUG:root: Controls whether readline begins with a set of key bindings similar to [4mEmacs[24m or [4mvi[24m. [1mediting-mode [22mcan be set to either [1memacs [22mor [1mvi[22m.
1307DEBUG:root: [1menable-bracketed-paste (Off)[0m
1308DEBUG:root: When set to [1mOn[22m, readline will configure the terminal in a way that will enable it to insert each paste into the editing buffer as a single string of characters, instead of treating each character as if it had
1309DEBUG:root: been read from the keyboard. This can prevent pasted characters from being interpreted as editing commands.
1310DEBUG:root: [1menable-keypad (Off)[0m
1311DEBUG:root: When set to [1mOn[22m, readline will try to enable the application keypad when it is called. Some systems need this to enable the arrow keys.
1312DEBUG:root: [1menable-meta-key (On)[0m
1313DEBUG:root: When set to [1mOn[22m, readline will try to enable any meta modifier key the terminal claims to support when it is called. On many terminals, the meta key is used to send eight-bit characters.
1314DEBUG:root: [1mexpand-tilde (Off)[0m
1315DEBUG:root: If set to [1mOn[22m, tilde expansion is performed when readline attempts word completion.
1316DEBUG:root: [1mhistory-preserve-point (Off)[0m
1317DEBUG:root: If set to [1mOn[22m, the history code attempts to place point at the same location on each history line retrieved with [1mprevious-history [22mor [1mnext-history[22m.
1318DEBUG:root: [1mhistory-size (unset)[0m
1319DEBUG:root: 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
1320DEBUG:root: history entries is not limited. By default, the number of history entries is set to the value of the [1mHISTSIZE [22mshell variable. If an attempt is made to set [4mhistory-size[24m to a non-numeric value, the maximum
1321DEBUG:root: number of history entries will be set to 500.
1322DEBUG:root: [1mhorizontal-scroll-mode (Off)[0m
1323DEBUG:root: When set to [1mOn[22m, makes readline 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.
1324DEBUG:root: [1minput-meta (Off)[0m
1325DEBUG:root: If set to [1mOn[22m, readline will enable eight-bit input (that is, it will not strip the eighth bit from the characters it reads), regardless of what the terminal claims it can support. The name [1mmeta-flag [22mis a syn‐
1326DEBUG:root: onym for this variable. The default is [4mOff[24m, but readline will set it to [4mOn[24m if the locale contains eight-bit characters.
1327DEBUG:root: [1misearch-terminators (``C-[C-J'')[0m
1328DEBUG:root: The string of characters that should terminate an incremental search without subsequently executing the character as a command. If this variable has not been given a value, the characters [4mESC[24m and [4mC-J[24m will
1329DEBUG:root: terminate an incremental search.
1330DEBUG:root: [1mkeymap (emacs)[0m
1331DEBUG:root: Set the current readline keymap. The set of valid keymap names is [4memacs,[24m [4memacs-standard,[24m [4memacs-meta,[24m [4memacs-ctlx,[24m [4mvi,[24m [4mvi-command[24m, and [4mvi-insert[24m. [4mvi[24m is equivalent to [4mvi-command[24m; [4memacs[24m is equivalent to
1332DEBUG:root: [4memacs-standard[24m. The default value is [4memacs[24m; the value of [1mediting-mode [22malso affects the default keymap.
1333DEBUG:root: [1memacs-mode-string (@)[0m
1334DEBUG:root: 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
1335DEBUG:root: and backslash escape sequences is available. Use the \1 and \2 escapes to begin and end sequences of non-printing characters, which can be used to embed a terminal control sequence into the mode string.
1336DEBUG:root: [1mkeyseq-timeout (500)[0m
1337DEBUG:root: Specifies the duration [4mreadline[24m 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
1338DEBUG:root: a longer key sequence). If no input is received within the timeout, [4mreadline[24m will use the shorter but complete key sequence. The value is specified in milliseconds, so a value of 1000 means that [4mreadline[0m
1339DEBUG:root: 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, [4mreadline[24m will wait until another key is pressed to decide which key se‐
1340DEBUG:root: quence to complete.
1341DEBUG:root: [1mmark-directories (On)[0m
1342DEBUG:root: If set to [1mOn[22m, completed directory names have a slash appended.
1343DEBUG:root: [1mmark-modified-lines (Off)[0m
1344DEBUG:root: If set to [1mOn[22m, history lines that have been modified are displayed with a preceding asterisk ([1m*[22m).
1345DEBUG:root: [1mmark-symlinked-directories (Off)[0m
1346DEBUG:root: If set to [1mOn[22m, completed names which are symbolic links to directories have a slash appended (subject to the value of [1mmark-directories[22m).
1347DEBUG:root: [1mmatch-hidden-files (On)[0m
1348DEBUG:root: This variable, when set to [1mOn[22m, causes readline to match files whose names begin with a `.' (hidden files) when performing filename completion. If set to [1mOff[22m, the leading `.' must be supplied by the user in
1349DEBUG:root: the filename to be completed.
1350DEBUG:root: [1mmenu-complete-display-prefix (Off)[0m
1351DEBUG:root: If set to [1mOn[22m, menu completion displays the common prefix of the list of possible completions (which may be empty) before cycling through the list.
1352DEBUG:root: [1moutput-meta (Off)[0m
1353DEBUG:root: If set to [1mOn[22m, readline will display characters with the eighth bit set directly rather than as a meta-prefixed escape sequence. The default is [4mOff[24m, but readline will set it to [4mOn[24m if the locale contains eight-
1354DEBUG:root: bit characters.
1355DEBUG:root: [1mpage-completions (On)[0m
1356DEBUG:root: If set to [1mOn[22m, readline uses an internal [4mmore[24m-like pager to display a screenful of possible completions at a time.
1357DEBUG:root: [1mprint-completions-horizontally (Off)[0m
1358DEBUG:root: If set to [1mOn[22m, readline will display completions with matches sorted horizontally in alphabetical order, rather than down the screen.
1359DEBUG:root: [1mrevert-all-at-newline (Off)[0m
1360DEBUG:root: If set to [1mOn[22m, readline will undo all changes to history lines before returning when [1maccept-line [22mis executed. By default, history lines may be modified and retain individual undo lists across calls to [1mread‐[0m
1361DEBUG:root: [1mline[22m.
1362DEBUG:root: [1mshow-all-if-ambiguous (Off)[0m
1363DEBUG:root: This alters the default behavior of the completion functions. If set to [1mOn[22m, words which have more than one possible completion cause the matches to be listed immediately instead of ringing the bell.
1364DEBUG:root: [1mshow-all-if-unmodified (Off)[0m
1365DEBUG:root: This alters the default behavior of the completion functions in a fashion similar to [1mshow-all-if-ambiguous[22m. If set to [1mOn[22m, words which have more than one possible completion without any possible partial com‐
1366DEBUG:root: pletion (the possible completions don't share a common prefix) cause the matches to be listed immediately instead of ringing the bell.
1367DEBUG:root: [1mshow-mode-in-prompt (Off)[0m
1368DEBUG:root: If set to [1mOn[22m, add a character to the beginning of the prompt indicating the editing mode: emacs (@), vi command (:) or vi insertion (+).
1369DEBUG:root: [1mskip-completed-text (Off)[0m
1370DEBUG:root: If set to [1mOn[22m, 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, readline does not in‐
1371DEBUG:root: sert 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.
1372DEBUG:root: [1mvi-cmd-mode-string ((cmd))[0m
1373DEBUG:root: 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 is expanded like a key binding, so the standard set of meta- and
1374DEBUG:root: control prefixes and backslash escape sequences is available. Use the \1 and \2 escapes to begin and end sequences of non-printing characters, which can be used to embed a terminal control sequence into the
1375DEBUG:root: mode string.
1376DEBUG:root: [1mvi-ins-mode-string ((ins))[0m
1377DEBUG:root: 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
1378DEBUG:root: control prefixes and backslash escape sequences is available. Use the \1 and \2 escapes to begin and end sequences of non-printing characters, which can be used to embed a terminal control sequence into the
1379DEBUG:root: mode string.
1380DEBUG:root: [1mvisible-stats (Off)[0m
1381DEBUG:root: If set to [1mOn[22m, a character denoting a file's type as reported by [4mstat[24m(2) is appended to the filename when listing possible completions.
1382DEBUG:root: [1mReadline Conditional Constructs[0m
1383DEBUG:root: Readline 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
1384DEBUG:root: parser directives used.
1385DEBUG:root: [1m$if [22mThe [1m$if [22mconstruct allows bindings to be made based on the editing mode, the terminal being used, or the application using readline. The text of the test extends to the end of the line; no characters are re‐
1386DEBUG:root: quired to isolate it.
1387DEBUG:root: [1mmode [22mThe [1mmode= [22mform of the [1m$if [22mdirective is used to test whether readline is in emacs or vi mode. This may be used in conjunction with the [1mset keymap [22mcommand, for instance, to set bindings in the
1388DEBUG:root: [4memacs-standard[24m and [4memacs-ctlx[24m keymaps only if readline is starting out in emacs mode.
1389DEBUG:root: [1mterm [22mThe [1mterm= [22mform 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 [1m= [22mis tested against
1390DEBUG:root: both the full name of the terminal and the portion of the terminal name before the first [1m-[22m. This allows [4msun[24m to match both [4msun[24m and [4msun-cmd[24m, for instance.
1391DEBUG:root: [1mapplication[0m
1392DEBUG:root: The [1mapplication [22mconstruct is used to include application-specific settings. Each program using the readline library sets the [4mapplication[24m [4mname[24m, and an initialization file can test for a particular
1393DEBUG:root: 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 [1mbash[22m:
1394DEBUG:root: [1m$if [22mBash
1395DEBUG:root: # Quote the current or previous word
1396DEBUG:root: "\C-xq": "\eb\"\ef\""
1397DEBUG:root: [1m$endif[0m
1398DEBUG:root: [1m$endif [22mThis command, as seen in the previous example, terminates an [1m$if [22mcommand.
1399DEBUG:root: [1m$else [22mCommands in this branch of the [1m$if [22mdirective are executed if the test fails.
1400DEBUG:root: [1m$include[0m
1401DEBUG:root: This directive takes a single filename as an argument and reads commands and bindings from that file. For example, the following directive would read [4m/etc/inputrc[24m:
1402DEBUG:root: [1m$include [4m[22m/etc/inputrc[0m
1403DEBUG:root: [1mSearching[0m
1404DEBUG:root: Readline provides commands for searching through the command history (see [1mHISTORY [22mbelow) for lines containing a specified string. There are two search modes: [4mincremental[24m and [4mnon-incremental[24m.
1405DEBUG:root: Incremental searches begin before the user has finished typing the search string. As each character of the search string is typed, readline displays the next entry from the history matching the string typed so far.
1406DEBUG:root: An incremental search requires only as many characters as needed to find the desired history entry. The characters present in the value of the [1misearch-terminators [22mvariable are used to terminate an incremental
1407DEBUG:root: search. If that variable has not been assigned a value the Escape and Control-J characters will terminate an incremental search. Control-G will abort an incremental search and restore the original line. When the
1408DEBUG:root: search is terminated, the history entry containing the search string becomes the current line.
1409DEBUG:root: To find other matching entries in the history list, type Control-S or Control-R as appropriate. This will search backward or forward in the history for the next entry matching the search string typed so far. Any
1410DEBUG:root: other key sequence bound to a readline command will terminate the search and execute that command. For instance, a [4mnewline[24m will terminate the search and accept the line, thereby executing the command from the his‐
1411DEBUG:root: tory list.
1412DEBUG:root: Readline remembers the last incremental search string. If two Control-Rs are typed without any intervening characters defining a new search string, any remembered search string is used.
1413DEBUG:root: Non-incremental searches read the entire search string before starting to search for matching history lines. The search string may be typed by the user or be part of the contents of the current line.
1414DEBUG:root: [1mReadline Command Names[0m
1415DEBUG:root: 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 accompanying key sequence are unbound by default. In the following descriptions,
1416DEBUG:root: [4mpoint[24m refers to the current cursor position, and [4mmark[24m refers to a cursor position saved by the [1mset-mark [22mcommand. The text between the point and mark is referred to as the [4mregion[24m.
1417DEBUG:root: [1mCommands for Moving[0m
1418DEBUG:root: [1mbeginning-of-line (C-a)[0m
1419DEBUG:root: Move to the start of the current line.
1420DEBUG:root: [1mend-of-line (C-e)[0m
1421DEBUG:root: Move to the end of the line.
1422DEBUG:root: [1mforward-char (C-f)[0m
1423DEBUG:root: Move forward a character.
1424DEBUG:root: [1mbackward-char (C-b)[0m
1425DEBUG:root: Move back a character.
1426DEBUG:root: [1mforward-word (M-f)[0m
1427DEBUG:root: Move forward to the end of the next word. Words are composed of alphanumeric characters (letters and digits).
1428DEBUG:root: [1mbackward-word (M-b)[0m
1429DEBUG:root: Move back to the start of the current or previous word. Words are composed of alphanumeric characters (letters and digits).
1430DEBUG:root: [1mshell-forward-word[0m
1431DEBUG:root: Move forward to the end of the next word. Words are delimited by non-quoted shell metacharacters.
1432DEBUG:root: [1mshell-backward-word[0m
1433DEBUG:root: Move back to the start of the current or previous word. Words are delimited by non-quoted shell metacharacters.
1434DEBUG:root: [1mclear-screen (C-l)[0m
1435DEBUG:root: Clear the screen leaving the current line at the top of the screen. With an argument, refresh the current line without clearing the screen.
1436DEBUG:root: [1mredraw-current-line[0m
1437DEBUG:root: Refresh the current line.
1438DEBUG:root: [1mCommands for Manipulating the History[0m
1439DEBUG:root: [1maccept-line (Newline, Return)[0m
1440DEBUG:root: 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 [1mHISTCONTROL [22mvariable. If the line is a modified history line, then re‐
1441DEBUG:root: store the history line to its original state.
1442DEBUG:root: [1mprevious-history (C-p)[0m
1443DEBUG:root: Fetch the previous command from the history list, moving back in the list.
1444DEBUG:root: [1mnext-history (C-n)[0m
1445DEBUG:root: Fetch the next command from the history list, moving forward in the list.
1446DEBUG:root: [1mbeginning-of-history (M-<)[0m
1447DEBUG:root: Move to the first line in the history.
1448DEBUG:root: [1mend-of-history (M->)[0m
1449DEBUG:root: Move to the end of the input history, i.e., the line currently being entered.
1450DEBUG:root: [1mreverse-search-history (C-r)[0m
1451DEBUG:root: Search backward starting at the current line and moving `up' through the history as necessary. This is an incremental search.
1452DEBUG:root: [1mforward-search-history (C-s)[0m
1453DEBUG:root: Search forward starting at the current line and moving `down' through the history as necessary. This is an incremental search.
1454DEBUG:root: [1mnon-incremental-reverse-search-history (M-p)[0m
1455DEBUG:root: Search backward through the history starting at the current line using a non-incremental search for a string supplied by the user.
1456DEBUG:root: [1mnon-incremental-forward-search-history (M-n)[0m
1457DEBUG:root: Search forward through the history using a non-incremental search for a string supplied by the user.
1458DEBUG:root: [1mhistory-search-forward[0m
1459DEBUG:root: Search forward through the history for the string of characters between the start of the current line and the point. This is a non-incremental search.
1460DEBUG:root: [1mhistory-search-backward[0m
1461DEBUG:root: Search backward through the history for the string of characters between the start of the current line and the point. This is a non-incremental search.
1462DEBUG:root: [1myank-nth-arg (M-C-y)[0m
1463DEBUG:root: Insert the first argument to the previous command (usually the second word on the previous line) at point. With an argument [4mn[24m, insert the [4mn[24mth word from the previous command (the words in the previous command
1464DEBUG:root: begin with word 0). A negative argument inserts the [4mn[24mth word from the end of the previous command. Once the argument [4mn[24m is computed, the argument is extracted as if the "![4mn[24m" history expansion had been speci‐
1465DEBUG:root: fied.
1466DEBUG:root: [1myank-last-arg (M-., M-_)[0m
1467DEBUG:root: Insert the last argument to the previous command (the last word of the previous history entry). With a numeric argument, behave exactly like [1myank-nth-arg[22m. Successive calls to [1myank-last-arg [22mmove back through
1468DEBUG:root: 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
1469DEBUG:root: move through the history. A negative argument switches the direction through the history (back or forward). The history expansion facilities are used to extract the last word, as if the "!$" history expan‐
1470DEBUG:root: sion had been specified.
1471DEBUG:root: [1mshell-expand-line (M-C-e)[0m
1472DEBUG:root: Expand the line as the shell does. This performs alias and history expansion as well as all of the shell word expansions. See [1mHISTORY EXPANSION [22mbelow for a description of history expansion.
1473DEBUG:root: [1mhistory-expand-line (M-^)[0m
1474DEBUG:root: Perform history expansion on the current line. See [1mHISTORY EXPANSION [22mbelow for a description of history expansion.
1475DEBUG:root: [1mmagic-space[0m
1476DEBUG:root: Perform history expansion on the current line and insert a space. See [1mHISTORY EXPANSION [22mbelow for a description of history expansion.
1477DEBUG:root: [1malias-expand-line[0m
1478DEBUG:root: Perform alias expansion on the current line. See [1mALIASES [22mabove for a description of alias expansion.
1479DEBUG:root: [1mhistory-and-alias-expand-line[0m
1480DEBUG:root: Perform history and alias expansion on the current line.
1481DEBUG:root: [1minsert-last-argument (M-., M-_)[0m
1482DEBUG:root: A synonym for [1myank-last-arg[22m.
1483DEBUG:root: [1moperate-and-get-next (C-o)[0m
1484DEBUG:root: Accept the current line for execution and fetch the next line relative to the current line from the history for editing. Any argument is ignored.
1485DEBUG:root: [1medit-and-execute-command (C-xC-e)[0m
1486DEBUG:root: Invoke an editor on the current command line, and execute the result as shell commands. [1mBash [22mattempts to invoke [1m$VISUAL[22m, [1m$EDITOR[22m, and [4memacs[24m as the editor, in that order.
1487DEBUG:root: [1mCommands for Changing Text[0m
1488DEBUG:root: [4mend-of-file[24m [1m(usually C-d)[0m
1489DEBUG:root: The character indicating end-of-file as set, for example, by ``stty''. If this character is read when there are no characters on the line, and point is at the beginning of the line, Readline interprets it as
1490DEBUG:root: the end of input and returns [1mEOF[22m.
1491DEBUG:root: [1mdelete-char (C-d)[0m
1492DEBUG:root: Delete the character at point. If this function is bound to the same character as the tty [1mEOF [22mcharacter, as [1mC-d [22mcommonly is, see above for the effects.
1493DEBUG:root: [1mbackward-delete-char (Rubout)[0m
1494DEBUG:root: Delete the character behind the cursor. When given a numeric argument, save the deleted text on the kill ring.
1495DEBUG:root: [1mforward-backward-delete-char[0m
1496DEBUG:root: Delete the character under the cursor, unless the cursor is at the end of the line, in which case the character behind the cursor is deleted.
1497DEBUG:root: [1mquoted-insert (C-q, C-v)[0m
1498DEBUG:root: Add the next character typed to the line verbatim. This is how to insert characters like [1mC-q[22m, for example.
1499DEBUG:root: [1mtab-insert (C-v TAB)[0m
1500DEBUG:root: Insert a tab character.
1501DEBUG:root: [1mself-insert (a, b, A, 1, !, ...)[0m
1502DEBUG:root: Insert the character typed.
1503DEBUG:root: [1mtranspose-chars (C-t)[0m
1504DEBUG:root: 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
1505DEBUG:root: have no effect.
1506DEBUG:root: [1mtranspose-words (M-t)[0m
1507DEBUG:root: 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.
1508DEBUG:root: [1mupcase-word (M-u)[0m
1509DEBUG:root: Uppercase the current (or following) word. With a negative argument, uppercase the previous word, but do not move point.
1510DEBUG:root: [1mdowncase-word (M-l)[0m
1511DEBUG:root: Lowercase the current (or following) word. With a negative argument, lowercase the previous word, but do not move point.
1512DEBUG:root: [1mcapitalize-word (M-c)[0m
1513DEBUG:root: Capitalize the current (or following) word. With a negative argument, capitalize the previous word, but do not move point.
1514DEBUG:root: [1moverwrite-mode[0m
1515DEBUG:root: Toggle overwrite mode. With an explicit positive numeric argument, switches to overwrite mode. With an explicit non-positive numeric argument, switches to insert mode. This command affects only [1memacs [22mmode;
1516DEBUG:root: [1mvi [22mmode does overwrite differently. Each call to [4mreadline()[24m starts in insert mode. In overwrite mode, characters bound to [1mself-insert [22mreplace the text at point rather than pushing the text to the right.
1517DEBUG:root: Characters bound to [1mbackward-delete-char [22mreplace the character before point with a space. By default, this command is unbound.
1518DEBUG:root: [1mKilling and Yanking[0m
1519DEBUG:root: [1mkill-line (C-k)[0m
1520DEBUG:root: Kill the text from point to the end of the line.
1521DEBUG:root: [1mbackward-kill-line (C-x Rubout)[0m
1522DEBUG:root: Kill backward to the beginning of the line.
1523DEBUG:root: [1munix-line-discard (C-u)[0m
1524DEBUG:root: Kill backward from point to the beginning of the line. The killed text is saved on the kill-ring.
1525DEBUG:root: [1mkill-whole-line[0m
1526DEBUG:root: Kill all characters on the current line, no matter where point is.
1527DEBUG:root: [1mkill-word (M-d)[0m
1528DEBUG:root: 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 [1mforward-word[22m.
1529DEBUG:root: [1mbackward-kill-word (M-Rubout)[0m
1530DEBUG:root: Kill the word behind point. Word boundaries are the same as those used by [1mbackward-word[22m.
1531DEBUG:root: [1mshell-kill-word[0m
1532DEBUG:root: 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 [1mshell-forward-word[22m.
1533DEBUG:root: [1mshell-backward-kill-word[0m
1534DEBUG:root: Kill the word behind point. Word boundaries are the same as those used by [1mshell-backward-word[22m.
1535DEBUG:root: [1munix-word-rubout (C-w)[0m
1536DEBUG:root: Kill the word behind point, using white space as a word boundary. The killed text is saved on the kill-ring.
1537DEBUG:root: [1munix-filename-rubout[0m
1538DEBUG:root: Kill the word behind point, using white space and the slash character as the word boundaries. The killed text is saved on the kill-ring.
1539DEBUG:root: [1mdelete-horizontal-space (M-\)[0m
1540DEBUG:root: Delete all spaces and tabs around point.
1541DEBUG:root: [1mkill-region[0m
1542DEBUG:root: Kill the text in the current region.
1543DEBUG:root: [1mcopy-region-as-kill[0m
1544DEBUG:root: Copy the text in the region to the kill buffer.
1545DEBUG:root: [1mcopy-backward-word[0m
1546DEBUG:root: Copy the word before point to the kill buffer. The word boundaries are the same as [1mbackward-word[22m.
1547DEBUG:root: [1mcopy-forward-word[0m
1548DEBUG:root: Copy the word following point to the kill buffer. The word boundaries are the same as [1mforward-word[22m.
1549DEBUG:root: [1myank (C-y)[0m
1550DEBUG:root: Yank the top of the kill ring into the buffer at point.
1551DEBUG:root: [1myank-pop (M-y)[0m
1552DEBUG:root: Rotate the kill ring, and yank the new top. Only works following [1myank [22mor [1myank-pop[22m.
1553DEBUG:root: [1mNumeric Arguments[0m
1554DEBUG:root: [1mdigit-argument (M-0, M-1, ..., M--)[0m
1555DEBUG:root: Add this digit to the argument already accumulating, or start a new argument. M-- starts a negative argument.
1556DEBUG:root: [1muniversal-argument[0m
1557DEBUG:root: 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 followed by digits,
1558DEBUG:root: executing [1muniversal-argument [22magain ends the numeric argument, but is otherwise ignored. As a special case, if this command is immediately followed by a character that is neither a digit nor minus sign, the
1559DEBUG:root: 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 argument count four, a second time makes the argument count
1560DEBUG:root: sixteen, and so on.
1561DEBUG:root: [1mCompleting[0m
1562DEBUG:root: [1mcomplete (TAB)[0m
1563DEBUG:root: Attempt to perform completion on the text before point. [1mBash [22mattempts completion treating the text as a variable (if the text begins with [1m$[22m), username (if the text begins with [1m~[22m), hostname (if the text begins
1564DEBUG:root: with [1m@[22m), or command (including aliases and functions) in turn. If none of these produces a match, filename completion is attempted.
1565DEBUG:root: [1mpossible-completions (M-?)[0m
1566DEBUG:root: List the possible completions of the text before point.
1567DEBUG:root: [1minsert-completions (M-*)[0m
1568DEBUG:root: Insert all completions of the text before point that would have been generated by [1mpossible-completions[22m.
1569DEBUG:root: [1mmenu-complete[0m
1570DEBUG:root: Similar to [1mcomplete[22m, but replaces the word to be completed with a single match from the list of possible completions. Repeated execution of [1mmenu-complete [22msteps through the list of possible completions, in‐
1571DEBUG:root: serting each match in turn. At the end of the list of completions, the bell is rung (subject to the setting of [1mbell-style[22m) and the original text is restored. An argument of [4mn[24m moves [4mn[24m positions forward in the
1572DEBUG:root: list of matches; a negative argument may be used to move backward through the list. This command is intended to be bound to [1mTAB[22m, but is unbound by default.
1573DEBUG:root: [1mmenu-complete-backward[0m
1574DEBUG:root: Identical to [1mmenu-complete[22m, but moves backward through the list of possible completions, as if [1mmenu-complete [22mhad been given a negative argument. This command is unbound by default.
1575DEBUG:root: [1mdelete-char-or-list[0m
1576DEBUG:root: Deletes the character under the cursor if not at the beginning or end of the line (like [1mdelete-char[22m). If at the end of the line, behaves identically to [1mpossible-completions[22m. This command is unbound by de‐
1577DEBUG:root: fault.
1578DEBUG:root: [1mcomplete-filename (M-/)[0m
1579DEBUG:root: Attempt filename completion on the text before point.
1580DEBUG:root: [1mpossible-filename-completions (C-x /)[0m
1581DEBUG:root: List the possible completions of the text before point, treating it as a filename.
1582DEBUG:root: [1mcomplete-username (M-~)[0m
1583DEBUG:root: Attempt completion on the text before point, treating it as a username.
1584DEBUG:root: [1mpossible-username-completions (C-x ~)[0m
1585DEBUG:root: List the possible completions of the text before point, treating it as a username.
1586DEBUG:root: [1mcomplete-variable (M-$)[0m
1587DEBUG:root: Attempt completion on the text before point, treating it as a shell variable.
1588DEBUG:root: [1mpossible-variable-completions (C-x $)[0m
1589DEBUG:root: List the possible completions of the text before point, treating it as a shell variable.
1590DEBUG:root: [1mcomplete-hostname (M-@)[0m
1591DEBUG:root: Attempt completion on the text before point, treating it as a hostname.
1592DEBUG:root: [1mpossible-hostname-completions (C-x @)[0m
1593DEBUG:root: List the possible completions of the text before point, treating it as a hostname.
1594DEBUG:root: [1mcomplete-command (M-!)[0m
1595DEBUG:root: 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 exe‐
1596DEBUG:root: cutable filenames, in that order.
1597DEBUG:root: [1mpossible-command-completions (C-x !)[0m
1598DEBUG:root: List the possible completions of the text before point, treating it as a command name.
1599DEBUG:root: [1mdynamic-complete-history (M-TAB)[0m
1600DEBUG:root: Attempt completion on the text before point, comparing the text against lines from the history list for possible completion matches.
1601DEBUG:root: [1mdabbrev-expand[0m
1602DEBUG:root: Attempt menu completion on the text before point, comparing the text against lines from the history list for possible completion matches.
1603DEBUG:root: [1mcomplete-into-braces (M-{)[0m
1604DEBUG:root: Perform filename completion and insert the list of possible completions enclosed within braces so the list is available to the shell (see [1mBrace Expansion [22mabove).
1605DEBUG:root: [1mKeyboard Macros[0m
1606DEBUG:root: [1mstart-kbd-macro (C-x ()[0m
1607DEBUG:root: Begin saving the characters typed into the current keyboard macro.
1608DEBUG:root: [1mend-kbd-macro (C-x ))[0m
1609DEBUG:root: Stop saving the characters typed into the current keyboard macro and store the definition.
1610DEBUG:root: [1mcall-last-kbd-macro (C-x e)[0m
1611DEBUG:root: Re-execute the last keyboard macro defined, by making the characters in the macro appear as if typed at the keyboard.
1612DEBUG:root: [1mprint-last-kbd-macro ()[0m
1613DEBUG:root: Print the last keyboard macro defined in a format suitable for the [4minputrc[24m file.
1614DEBUG:root: [1mMiscellaneous[0m
1615DEBUG:root: [1mre-read-init-file (C-x C-r)[0m
1616DEBUG:root: Read in the contents of the [4minputrc[24m file, and incorporate any bindings or variable assignments found there.
1617DEBUG:root: [1mabort (C-g)[0m
1618DEBUG:root: Abort the current editing command and ring the terminal's bell (subject to the setting of [1mbell-style[22m).
1619DEBUG:root: [1mdo-uppercase-version (M-a, M-b, M-[4m[22mx[24m[1m, ...)[0m
1620DEBUG:root: If the metafied character [4mx[24m is lowercase, run the command that is bound to the corresponding uppercase character.
1621DEBUG:root: [1mprefix-meta (ESC)[0m
1622DEBUG:root: Metafy the next character typed. [1mESC f [22mis equivalent to [1mMeta-f[22m.
1623DEBUG:root: [1mundo (C-_, C-x C-u)[0m
1624DEBUG:root: Incremental undo, separately remembered for each line.
1625DEBUG:root: [1mrevert-line (M-r)[0m
1626DEBUG:root: Undo all changes made to this line. This is like executing the [1mundo [22mcommand enough times to return the line to its initial state.
1627DEBUG:root: [1mtilde-expand (M-&)[0m
1628DEBUG:root: Perform tilde expansion on the current word.
1629DEBUG:root: [1mset-mark (C-@, M-<space>)[0m
1630DEBUG:root: Set the mark to the point. If a numeric argument is supplied, the mark is set to that position.
1631DEBUG:root: [1mexchange-point-and-mark (C-x C-x)[0m
1632DEBUG:root: Swap the point with the mark. The current cursor position is set to the saved position, and the old cursor position is saved as the mark.
1633DEBUG:root: [1mcharacter-search (C-])[0m
1634DEBUG:root: A character is read and point is moved to the next occurrence of that character. A negative count searches for previous occurrences.
1635DEBUG:root: [1mcharacter-search-backward (M-C-])[0m
1636DEBUG:root: A character is read and point is moved to the previous occurrence of that character. A negative count searches for subsequent occurrences.
1637DEBUG:root: [1mskip-csi-sequence[0m
1638DEBUG:root: Read enough characters to consume a multi-key sequence such as those defined for keys like Home and End. Such sequences begin with a Control Sequence Indicator (CSI), usually ESC-[. If this sequence is bound
1639DEBUG:root: to "\[", keys producing such sequences will have no effect unless explicitly bound to a readline command, instead of inserting stray characters into the editing buffer. This is unbound by default, but usually
1640DEBUG:root: bound to ESC-[.
1641DEBUG:root: [1minsert-comment (M-#)[0m
1642DEBUG:root: Without a numeric argument, the value of the readline [1mcomment-begin [22mvariable is inserted at the beginning of the current line. If a numeric argument is supplied, this command acts as a toggle: if the charac‐
1643DEBUG:root: ters at the beginning of the line do not match the value of [1mcomment-begin[22m, the value is inserted, otherwise the characters in [1mcomment-begin [22mare deleted from the beginning of the line. In either case, the line
1644DEBUG:root: is accepted as if a newline had been typed. The default value of [1mcomment-begin [22mcauses this command to make the current line a shell comment. If a numeric argument causes the comment character to be removed,
1645DEBUG:root: the line will be executed by the shell.
1646DEBUG:root: [1mglob-complete-word (M-g)[0m
1647DEBUG:root: The word before point is treated as a pattern for pathname expansion, with an asterisk implicitly appended. This pattern is used to generate a list of matching filenames for possible completions.
1648DEBUG:root: [1mglob-expand-word (C-x *)[0m
1649DEBUG:root: The word before point is treated as a pattern for pathname expansion, and the list of matching filenames is inserted, replacing the word. If a numeric argument is supplied, an asterisk is appended before
1650DEBUG:root: pathname expansion.
1651DEBUG:root: [1mglob-list-expansions (C-x g)[0m
1652DEBUG:root: The list of expansions that would have been generated by [1mglob-expand-word [22mis displayed, and the line is redrawn. If a numeric argument is supplied, an asterisk is appended before pathname expansion.
1653DEBUG:root: [1mdump-functions[0m
1654DEBUG:root: Print all of the functions and their key bindings to the readline output stream. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an [4minputrc[24m file.
1655DEBUG:root: [1mdump-variables[0m
1656DEBUG:root: Print all of the settable readline variables and their values to the readline output stream. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an [4minputrc[0m
1657DEBUG:root: file.
1658DEBUG:root: [1mdump-macros[0m
1659DEBUG:root: Print all of the readline key sequences bound to macros and the strings they output. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an [4minputrc[24m file.
1660DEBUG:root: [1mdisplay-shell-version (C-x C-v)[0m
1661DEBUG:root: Display version information about the current instance of [1mbash[22m.
1662DEBUG:root: [1mProgrammable Completion[0m
1663DEBUG:root: When word completion is attempted for an argument to a command for which a completion specification (a [4mcompspec[24m) has been defined using the [1mcomplete [22mbuiltin (see [1mSHELL BUILTIN COMMANDS [22mbelow), the programmable com‐
1664DEBUG:root: pletion facilities are invoked.
1665DEBUG:root: First, the command name is identified. If the command word is the empty string (completion attempted at the beginning of an empty line), any compspec defined with the [1m-E [22moption to [1mcomplete [22mis used. If a compspec
1666DEBUG:root: has been defined for that command, the compspec is used to generate the list of possible completions for the word. If the command word is a full pathname, a compspec for the full pathname is searched for first. If
1667DEBUG:root: no compspec is found for the full pathname, an attempt is made to find a compspec for the portion following the final slash. If those searches do not result in a compspec, any compspec defined with the [1m-D [22moption to
1668DEBUG:root: [1mcomplete [22mis used as the default.
1669DEBUG:root: Once a compspec has been found, it is used to generate the list of matching words. If a compspec is not found, the default [1mbash [22mcompletion as described above under [1mCompleting [22mis performed.
1670DEBUG:root: First, the actions specified by the compspec are used. Only matches which are prefixed by the word being completed are returned. When the [1m-f [22mor [1m-d [22moption is used for filename or directory name completion, the shell
1671DEBUG:root: variable [1mFIGNORE [22mis used to filter the matches.
1672DEBUG:root: Any completions specified by a pathname expansion pattern to the [1m-G [22moption are generated next. The words generated by the pattern need not match the word being completed. The [1mGLOBIGNORE [22mshell variable is not used
1673DEBUG:root: to filter the matches, but the [1mFIGNORE [22mvariable is used.
1674DEBUG:root: Next, the string specified as the argument to the [1m-W [22moption is considered. The string is first split using the characters in the [1mIFS [22mspecial variable as delimiters. Shell quoting is honored. Each word is then ex‐
1675DEBUG:root: panded using brace expansion, tilde expansion, parameter and variable expansion, command substitution, and arithmetic expansion, as described above under [1mEXPANSION[22m. The results are split using the rules described
1676DEBUG:root: above under [1mWord Splitting[22m. The results of the expansion are prefix-matched against the word being completed, and the matching words become the possible completions.
1677DEBUG:root: After these matches have been generated, any shell function or command specified with the [1m-F [22mand [1m-C [22moptions is invoked. When the command or function is invoked, the [1mCOMP_LINE[22m, [1mCOMP_POINT[22m, [1mCOMP_KEY[22m, and [1mCOMP_TYPE[0m
1678DEBUG:root: variables are assigned values as described above under [1mShell Variables[22m. If a shell function is being invoked, the [1mCOMP_WORDS [22mand [1mCOMP_CWORD [22mvariables are also set. When the function or command is invoked, the first
1679DEBUG:root: argument ([1m$1[22m) is the name of the command whose arguments are being completed, the second argument ([1m$2[22m) is the word being completed, and the third argument ([1m$3[22m) is the word preceding the word being completed on the
1680DEBUG:root: current command line. No filtering of the generated completions against the word being completed is performed; the function or command has complete freedom in generating the matches.
1681DEBUG:root: Any function specified with [1m-F [22mis invoked first. The function may use any of the shell facilities, including the [1mcompgen [22mbuiltin described below, to generate the matches. It must put the possible completions in the
1682DEBUG:root: [1mCOMPREPLY [22marray variable, one per array element.
1683DEBUG:root: Next, any command specified with the [1m-C [22moption is invoked in an environment equivalent to command substitution. It should print a list of completions, one per line, to the standard output. Backslash may be used to
1684DEBUG:root: escape a newline, if necessary.
1685DEBUG:root: After all of the possible completions are generated, any filter specified with the [1m-X [22moption is applied to the list. The filter is a pattern as used for pathname expansion; a [1m& [22min the pattern is replaced with the
1686DEBUG:root: text of the word being completed. A literal [1m& [22mmay be escaped with a backslash; the backslash is removed before attempting a match. Any completion that matches the pattern will be removed from the list. A leading [1m![0m
1687DEBUG:root: negates the pattern; in this case any completion not matching the pattern will be removed. If the [1mnocasematch [22mshell option is enabled, the match is performed without regard to the case of alphabetic characters.
1688DEBUG:root: Finally, any prefix and suffix specified with the [1m-P [22mand [1m-S [22moptions are added to each member of the completion list, and the result is returned to the readline completion code as the list of possible completions.
1689DEBUG:root: If the previously-applied actions do not generate any matches, and the [1m-o dirnames [22moption was supplied to [1mcomplete [22mwhen the compspec was defined, directory name completion is attempted.
1690DEBUG:root: If the [1m-o plusdirs [22moption was supplied to [1mcomplete [22mwhen the compspec was defined, directory name completion is attempted and any matches are added to the results of the other actions.
1691DEBUG:root: 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 [1mbash [22mcompletions are not attempted, and the readline default of file‐
1692DEBUG:root: name completion is disabled. If the [1m-o bashdefault [22moption was supplied to [1mcomplete [22mwhen the compspec was defined, the [1mbash [22mdefault completions are attempted if the compspec generates no matches. If the [1m-o default[0m
1693DEBUG:root: option was supplied to [1mcomplete [22mwhen the compspec was defined, readline's default completion will be performed if the compspec (and, if attempted, the default [1mbash [22mcompletions) generate no matches.
1694DEBUG:root: When a compspec indicates that directory name completion is desired, the programmable completion functions force readline to append a slash to completed names which are symbolic links to directories, subject to the
1695DEBUG:root: value of the [1mmark-directories [22mreadline variable, regardless of the setting of the [1mmark-symlinked-directories [22mreadline variable.
1696DEBUG:root: There is some support for dynamically modifying completions. This is most useful when used in combination with a default completion specified with [1mcomplete -D[22m. It's possible for shell functions executed as comple‐
1697DEBUG:root: tion handlers 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 at‐
1698DEBUG:root: tempted (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 allows a set of completions
1699DEBUG:root: to be built dynamically as completion is attempted, rather than being loaded all at once.
1700DEBUG:root: For instance, assuming that there is a library of compspecs, each kept in a file corresponding to the name of the command, the following default completion function would load completions dynamically:
1701DEBUG:root: _completion_loader()
1702DEBUG:root: {
1703DEBUG:root: . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124
1704DEBUG:root: }
1705DEBUG:root: complete -D -F _completion_loader -o bashdefault -o default
1706DEBUG:root:[1mHISTORY[0m
1707DEBUG:root: When the [1m-o history [22moption to the [1mset [22mbuiltin is enabled, the shell provides access to the [4mcommand[24m [4mhistory[24m, the list of commands previously typed. The value of the [1mHISTSIZE [22mvariable is used as the number of commands
1708DEBUG:root: to save in a history list. The text of the last [1mHISTSIZE [22mcommands (default 500) is saved. The shell stores each command in the history list prior to parameter and variable expansion (see [1mEXPANSION [22mabove) but after
1709DEBUG:root: history expansion is performed, subject to the values of the shell variables [1mHISTIGNORE [22mand [1mHISTCONTROL[22m.
1710DEBUG:root: On startup, the history is initialized from the file named by the variable [1mHISTFILE [22m(default [4m~/.bash_history[24m). The file named by the value of [1mHISTFILE [22mis truncated, if necessary, to contain no more than the number
1711DEBUG:root: of lines specified by the value of [1mHISTFILESIZE[22m. If [1mHISTFILESIZE [22mis unset, or set to null, a non-numeric value, or a numeric value less than zero, the history file is not truncated. When the history file is read,
1712DEBUG:root: lines beginning with the history comment character followed immediately by a digit are interpreted as timestamps for the preceding history line. These timestamps are optionally displayed depending on the value of
1713DEBUG:root: the [1mHISTTIMEFORMAT [22mvariable. When a shell with history enabled exits, the last [1m$HISTSIZE [22mlines are copied from the history list to [1m$HISTFILE[22m. If the [1mhistappend [22mshell option is enabled (see the description of [1mshopt[0m
1714DEBUG:root: under [1mSHELL BUILTIN COMMANDS [22mbelow), the lines are appended to the history file, otherwise the history file is overwritten. If [1mHISTFILE [22mis unset, or if the history file is unwritable, the history is not saved. If
1715DEBUG:root: the [1mHISTTIMEFORMAT [22mvariable is set, time stamps are written to the history file, marked with the history comment character, so they may be preserved across shell sessions. This uses the history comment character to
1716DEBUG:root: distinguish timestamps from other history lines. After saving the history, the history file is truncated to contain no more than [1mHISTFILESIZE [22mlines. If [1mHISTFILESIZE [22mis unset, or set to null, a non-numeric value, or
1717DEBUG:root: a numeric value less than zero, the history file is not truncated.
1718DEBUG:root: The builtin command [1mfc [22m(see [1mSHELL BUILTIN COMMANDS [22mbelow) may be used to list or edit and re-execute a portion of the history list. The [1mhistory [22mbuiltin may be used to display or modify the history list and manipu‐
1719DEBUG:root: late the history file. When using command-line editing, search commands are available in each editing mode that provide access to the history list.
1720DEBUG:root: The shell allows control over which commands are saved on the history list. The [1mHISTCONTROL [22mand [1mHISTIGNORE [22mvariables may be set to cause the shell to save only a subset of the commands entered. The [1mcmdhist [22mshell
1721DEBUG:root: option, if enabled, causes the shell to attempt to save each line of a multi-line command in the same history entry, adding semicolons where necessary to preserve syntactic correctness. The [1mlithist [22mshell option
1722DEBUG:root: causes the shell to save the command with embedded newlines instead of semicolons. See the description of the [1mshopt [22mbuiltin below under [1mSHELL BUILTIN COMMANDS [22mfor information on setting and unsetting shell options.
1723DEBUG:root:[1mHISTORY EXPANSION[0m
1724DEBUG:root: The shell supports a history expansion feature that is similar to the history expansion in [1mcsh. [22mThis section describes what syntax features are available. This feature is enabled by default for interactive shells,
1725DEBUG:root: and can be disabled using the [1m+H [22moption to the [1mset [22mbuiltin command (see [1mSHELL BUILTIN COMMANDS [22mbelow). Non-interactive shells do not perform history expansion by default.
1726DEBUG:root: History expansions introduce words from the history list into the input stream, making it easy to repeat commands, insert the arguments to a previous command into the current input line, or fix errors in previous
1727DEBUG:root: commands quickly.
1728DEBUG:root: History expansion is performed immediately after a complete line is read, before the shell breaks it into words. It takes place in two parts. The first is to determine which line from the history list to use during
1729DEBUG:root: substitution. The second is to select portions of that line for inclusion into the current one. The line selected from the history is the [4mevent[24m, and the portions of that line that are acted upon are [4mwords[24m. Various
1730DEBUG:root: [4mmodifiers[24m are available to manipulate the selected words. The line is broken into words in the same fashion as when reading input, so that several [4mmetacharacter[24m-separated words surrounded by quotes are considered
1731DEBUG:root: one word. History expansions are introduced by the appearance of the history expansion character, which is [1m! [22mby default. Only backslash ([1m\[22m) and single quotes can quote the history expansion character, but the his‐
1732DEBUG:root: tory expansion character is also treated as quoted if it immediately precedes the closing double quote in a double-quoted string.
1733DEBUG:root: Several characters inhibit history expansion if found immediately following the history expansion character, even if it is unquoted: space, tab, newline, carriage return, and [1m=[22m. If the [1mextglob [22mshell option is en‐
1734DEBUG:root: abled, [1m( [22mwill also inhibit expansion.
1735DEBUG:root: Several shell options settable with the [1mshopt [22mbuiltin may be used to tailor the behavior of history expansion. If the [1mhistverify [22mshell option is enabled (see the description of the [1mshopt [22mbuiltin below), and [1mreadline[0m
1736DEBUG:root: is being used, history substitutions are not immediately passed to the shell parser. Instead, the expanded line is reloaded into the [1mreadline [22mediting buffer for further modification. If [1mreadline [22mis being used, and
1737DEBUG:root: the [1mhistreedit [22mshell option is enabled, a failed history substitution will be reloaded into the [1mreadline [22mediting buffer for correction. The [1m-p [22moption to the [1mhistory [22mbuiltin command may be used to see what a history
1738DEBUG:root: expansion will do before using it. The [1m-s [22moption to the [1mhistory [22mbuiltin may be used to add commands to the end of the history list without actually executing them, so that they are available for subsequent recall.
1739DEBUG:root: The shell allows control of the various characters used by the history expansion mechanism (see the description of [1mhistchars [22mabove under [1mShell Variables[22m). The shell uses the history comment character to mark history
1740DEBUG:root: timestamps when writing the history file.
1741DEBUG:root: [1mEvent Designators[0m
1742DEBUG:root: An event designator is a reference to a command line entry in the history list. Unless the reference is absolute, events are relative to the current position in the history list.
1743DEBUG:root: [1m! [22mStart a history substitution, except when followed by a [1mblank[22m, newline, carriage return, = or ( (when the [1mextglob [22mshell option is enabled using the [1mshopt [22mbuiltin).
1744DEBUG:root: [1m![4m[22mn[24m Refer to command line [4mn[24m.
1745DEBUG:root: [1m!-[4m[22mn[24m Refer to the current command minus [4mn[24m.
1746DEBUG:root: [1m!! [22mRefer to the previous command. This is a synonym for `!-1'.
1747DEBUG:root: [1m![4m[22mstring[0m
1748DEBUG:root: Refer to the most recent command preceding the current position in the history list starting with [4mstring[24m.
1749DEBUG:root: [1m!?[4m[22mstring[24m[1m[?][0m
1750DEBUG:root: Refer to the most recent command preceding the current position in the history list containing [4mstring[24m. The trailing [1m? [22mmay be omitted if [4mstring[24m is followed immediately by a newline.
1751DEBUG:root: [1m^[4m[22mstring1[24m[1m^[4m[22mstring2[24m[1m^[0m
1752DEBUG:root: Quick substitution. Repeat the previous command, replacing [4mstring1[24m with [4mstring2[24m. Equivalent to ``!!:s/[4mstring1[24m/[4mstring2[24m/'' (see [1mModifiers [22mbelow).
1753DEBUG:root: [1m!# [22mThe entire command line typed so far.
1754DEBUG:root: [1mWord Designators[0m
1755DEBUG:root: Word designators are used to select desired words from the event. A [1m: [22mseparates the event specification from the word designator. It may be omitted if the word designator begins with a [1m^[22m, [1m$[22m, [1m*[22m, [1m-[22m, or [1m%[22m. Words are
1756DEBUG:root: numbered from the beginning of the line, with the first word being denoted by 0 (zero). Words are inserted into the current line separated by single spaces.
1757DEBUG:root: [1m0 (zero)[0m
1758DEBUG:root: The zeroth word. For the shell, this is the command word.
1759DEBUG:root: [4mn[24m The [4mn[24mth word.
1760DEBUG:root: [1m^ [22mThe first argument. That is, word 1.
1761DEBUG:root: [1m$ [22mThe last word. This is usually the last argument, but will expand to the zeroth word if there is only one word in the line.
1762DEBUG:root: [1m% [22mThe word matched by the most recent `?[4mstring[24m?' search.
1763DEBUG:root: [4mx[24m[1m-[4m[22my[24m A range of words; `-[4my[24m' abbreviates `0-[4my[24m'.
1764DEBUG:root: [1m* [22mAll of the words but the zeroth. This is a synonym for `[4m1-$[24m'. It is not an error to use [1m* [22mif there is just one word in the event; the empty string is returned in that case.
1765DEBUG:root: [1mx* [22mAbbreviates [4mx-$[24m.
1766DEBUG:root: [1mx- [22mAbbreviates [4mx-$[24m like [1mx*[22m, but omits the last word.
1767DEBUG:root: If a word designator is supplied without an event specification, the previous command is used as the event.
1768DEBUG:root: [1mModifiers[0m
1769DEBUG:root: After the optional word designator, there may appear a sequence of one or more of the following modifiers, each preceded by a `:'.
1770DEBUG:root: [1mh [22mRemove a trailing filename component, leaving only the head.
1771DEBUG:root: [1mt [22mRemove all leading filename components, leaving the tail.
1772DEBUG:root: [1mr [22mRemove a trailing suffix of the form [4m.xxx[24m, leaving the basename.
1773DEBUG:root: [1me [22mRemove all but the trailing suffix.
1774DEBUG:root: [1mp [22mPrint the new command but do not execute it.
1775DEBUG:root: [1mq [22mQuote the substituted words, escaping further substitutions.
1776DEBUG:root: [1mx [22mQuote the substituted words as with [1mq[22m, but break into words at [1mblanks [22mand newlines.
1777DEBUG:root: [1ms/[4m[22mold[24m[1m/[4m[22mnew[24m[1m/[0m
1778DEBUG:root: Substitute [4mnew[24m for the first occurrence of [4mold[24m in the event line. Any delimiter can be used in place of /. The final delimiter is optional if it is the last character of the event line. The delimiter may be
1779DEBUG:root: quoted in [4mold[24m and [4mnew[24m with a single backslash. If & appears in [4mnew[24m, it is replaced by [4mold[24m. A single backslash will quote the &. If [4mold[24m is null, it is set to the last [4mold[24m substituted, or, if no previous his‐
1780DEBUG:root: tory substitutions took place, the last [4mstring[24m in a [1m!?[4m[22mstring[24m[1m[?] [22msearch.
1781DEBUG:root: [1m& [22mRepeat the previous substitution.
1782DEBUG:root: [1mg [22mCause changes to be applied over the entire event line. This is used in conjunction with `[1m:s[22m' (e.g., `[1m:gs/[4m[22mold[24m[1m/[4m[22mnew[24m[1m/[22m') or `[1m:&[22m'. If used with `[1m:s[22m', any delimiter can be used in place of /, and the final delim‐
1783DEBUG:root: iter is optional if it is the last character of the event line. An [1ma [22mmay be used as a synonym for [1mg[22m.
1784DEBUG:root: [1mG [22mApply the following `[1ms[22m' modifier once to each word in the event line.
1785DEBUG:root:[1mSHELL BUILTIN COMMANDS[0m
1786DEBUG:root: Unless otherwise noted, each builtin command documented in this section as accepting options preceded by [1m- [22maccepts [1m-- [22mto signify the end of the options. The [1m:[22m, [1mtrue[22m, [1mfalse[22m, and [1mtest [22mbuiltins do not accept options
1787DEBUG:root: and do not treat [1m-- [22mspecially. The [1mexit[22m, [1mlogout[22m, [1mreturn[22m, [1mbreak[22m, [1mcontinue[22m, [1mlet[22m, and [1mshift [22mbuiltins accept and process arguments beginning with [1m- [22mwithout requiring [1m--[22m. Other builtins that accept arguments but are not
1788DEBUG:root: specified as accepting options interpret arguments beginning with [1m- [22mas invalid options and require [1m-- [22mto prevent this interpretation.
1789DEBUG:root: [1m: [22m[[4marguments[24m]
1790DEBUG:root: No effect; the command does nothing beyond expanding [4marguments[24m and performing any specified redirections. The return status is zero.
1791DEBUG:root: [1m. [4m[22mfilename[24m [[4marguments[24m]
1792DEBUG:root: [1msource [4m[22mfilename[24m [[4marguments[24m]
1793DEBUG:root: Read and execute commands from [4mfilename[24m in the current shell environment and return the exit status of the last command executed from [4mfilename[24m. If [4mfilename[24m does not contain a slash, filenames in [1mPATH [22mare used
1794DEBUG:root: to find the directory containing [4mfilename[24m. The file searched for in [1mPATH [22mneed not be executable. When [1mbash [22mis not in [4mposix[24m [4mmode[24m, the current directory is searched if no file is found in [1mPATH[22m. If the [1msour‐[0m
1795DEBUG:root: [1mcepath [22moption to the [1mshopt [22mbuiltin command is turned off, the [1mPATH [22mis not searched. If any [4marguments[24m are supplied, they become the positional parameters when [4mfilename[24m is executed. Otherwise the positional
1796DEBUG:root: parameters are unchanged. If the [1m-T [22moption is enabled, [1msource [22minherits any trap on [1mDEBUG[22m; if it is not, any [1mDEBUG [22mtrap string is saved and restored around the call to [1msource[22m, and [1msource [22munsets the [1mDEBUG [22mtrap
1797DEBUG:root: while it executes. If [1m-T [22mis not set, and the sourced file changes the [1mDEBUG [22mtrap, the new value is retained when [1msource [22mcompletes. The return status is the status of the last command exited within the script
1798DEBUG:root: (0 if no commands are executed), and false if [4mfilename[24m is not found or cannot be read.
1799DEBUG:root: [1malias [22m[[1m-p[22m] [[4mname[24m[=[4mvalue[24m] ...]
1800DEBUG:root: [1mAlias [22mwith no arguments or with the [1m-p [22moption prints the list of aliases in the form [1malias [4m[22mname[24m=[4mvalue[24m on standard output. When arguments are supplied, an alias is defined for each [4mname[24m whose [4mvalue[24m is given.
1801DEBUG:root: A trailing space in [4mvalue[24m causes the next word to be checked for alias substitution when the alias is expanded. For each [4mname[24m in the argument list for which no [4mvalue[24m is supplied, the name and value of the
1802DEBUG:root: alias is printed. [1mAlias [22mreturns true unless a [4mname[24m is given for which no alias has been defined.
1803DEBUG:root: [1mbg [22m[[4mjobspec[24m ...]
1804DEBUG:root: Resume each suspended job [4mjobspec[24m in the background, as if it had been started with [1m&[22m. If [4mjobspec[24m is not present, the shell's notion of the [4mcurrent[24m [4mjob[24m is used. [1mbg [4m[22mjobspec[24m returns 0 unless run when job con‐
1805DEBUG:root: trol is disabled or, when run with job control enabled, any specified [4mjobspec[24m was not found or was started without job control.
1806DEBUG:root: [1mbind [22m[[1m-m [4m[22mkeymap[24m] [[1m-lpsvPSVX[22m]
1807DEBUG:root: [1mbind [22m[[1m-m [4m[22mkeymap[24m] [[1m-q [4m[22mfunction[24m] [[1m-u [4m[22mfunction[24m] [[1m-r [4m[22mkeyseq[24m]
1808DEBUG:root: [1mbind [22m[[1m-m [4m[22mkeymap[24m] [1m-f [4m[22mfilename[0m
1809DEBUG:root: [1mbind [22m[[1m-m [4m[22mkeymap[24m] [1m-x [4m[22mkeyseq[24m:[4mshell-command[0m
1810DEBUG:root: [1mbind [22m[[1m-m [4m[22mkeymap[24m] [4mkeyseq[24m:[4mfunction-name[0m
1811DEBUG:root: [1mbind [22m[[1m-m [4m[22mkeymap[24m] [4mkeyseq[24m:[4mreadline-command[0m
1812DEBUG:root: Display current [1mreadline [22mkey and function bindings, bind a key sequence to a [1mreadline [22mfunction or macro, or set a [1mreadline [22mvariable. Each non-option argument is a command as it would appear in [4m.inputrc[24m, but
1813DEBUG:root: each binding or command must be passed as a separate argument; e.g., '"\C-x\C-r": re-read-init-file'. Options, if supplied, have the following meanings:
1814DEBUG:root: [1m-m [4m[22mkeymap[0m
1815DEBUG:root: Use [4mkeymap[24m as the keymap to be affected by the subsequent bindings. Acceptable [4mkeymap[24m names are [4memacs,[24m [4memacs-standard,[24m [4memacs-meta,[24m [4memacs-ctlx,[24m [4mvi,[24m [4mvi-move,[24m [4mvi-command[24m, and [4mvi-insert[24m. [4mvi[24m is equivalent
1816DEBUG:root: to [4mvi-command[24m ([4mvi-move[24m is also a synonym); [4memacs[24m is equivalent to [4memacs-standard[24m.
1817DEBUG:root: [1m-l [22mList the names of all [1mreadline [22mfunctions.
1818DEBUG:root: [1m-p [22mDisplay [1mreadline [22mfunction names and bindings in such a way that they can be re-read.
1819DEBUG:root: [1m-P [22mList current [1mreadline [22mfunction names and bindings.
1820DEBUG:root: [1m-s [22mDisplay [1mreadline [22mkey sequences bound to macros and the strings they output in such a way that they can be re-read.
1821DEBUG:root: [1m-S [22mDisplay [1mreadline [22mkey sequences bound to macros and the strings they output.
1822DEBUG:root: [1m-v [22mDisplay [1mreadline [22mvariable names and values in such a way that they can be re-read.
1823DEBUG:root: [1m-V [22mList current [1mreadline [22mvariable names and values.
1824DEBUG:root: [1m-f [4m[22mfilename[0m
1825DEBUG:root: Read key bindings from [4mfilename[24m.
1826DEBUG:root: [1m-q [4m[22mfunction[0m
1827DEBUG:root: Query about which keys invoke the named [4mfunction[24m.
1828DEBUG:root: [1m-u [4m[22mfunction[0m
1829DEBUG:root: Unbind all keys bound to the named [4mfunction[24m.
1830DEBUG:root: [1m-r [4m[22mkeyseq[0m
1831DEBUG:root: Remove any current binding for [4mkeyseq[24m.
1832DEBUG:root: [1m-x [4m[22mkeyseq[24m[1m:[4m[22mshell-command[0m
1833DEBUG:root: Cause [4mshell-command[24m to be executed whenever [4mkeyseq[24m is entered. When [4mshell-command[24m is executed, the shell sets the [1mREADLINE_LINE [22mvariable to the contents of the [1mreadline [22mline buffer and the [1mREAD‐[0m
1834DEBUG:root: [1mLINE_POINT [22mvariable to the current location of the insertion point. If the executed command changes the value of [1mREADLINE_LINE [22mor [1mREADLINE_POINT[22m, those new values will be reflected in the editing
1835DEBUG:root: state.
1836DEBUG:root: [1m-X [22mList all key sequences bound to shell commands and the associated commands in a format that can be reused as input.
1837DEBUG:root: The return value is 0 unless an unrecognized option is given or an error occurred.
1838DEBUG:root: [1mbreak [22m[[4mn[24m]
1839DEBUG:root: Exit from within a [1mfor[22m, [1mwhile[22m, [1muntil[22m, or [1mselect [22mloop. If [4mn[24m is specified, break [4mn[24m levels. [4mn[24m must be ≥ 1. If [4mn[24m is greater than the number of enclosing loops, all enclosing loops are exited. The return value
1840DEBUG:root: is 0 unless [4mn[24m is not greater than or equal to 1.
1841DEBUG:root: [1mbuiltin [4m[22mshell-builtin[24m [[4marguments[24m]
1842DEBUG:root: Execute the specified shell builtin, passing it [4marguments[24m, 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
1843DEBUG:root: builtin within the function. The [1mcd [22mbuiltin is commonly redefined this way. The return status is false if [4mshell-builtin[24m is not a shell builtin command.
1844DEBUG:root: [1mcaller [22m[[4mexpr[24m]
1845DEBUG:root: Returns the context of any active subroutine call (a shell function or a script executed with the [1m. [22mor [1msource [22mbuiltins). Without [4mexpr[24m, [1mcaller [22mdisplays the line number and source filename of the current sub‐
1846DEBUG:root: routine call. If a non-negative integer is supplied as [4mexpr[24m, [1mcaller [22mdisplays the line number, subroutine name, and source file corresponding to that position in the current execution call stack. This extra
1847DEBUG:root: 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 subroutine call or [4mexpr[24m does not correspond to a valid
1848DEBUG:root: position in the call stack.
1849DEBUG:root: [1mcd [22m[[1m-L[22m|[[1m-P [22m[[1m-e[22m]] [-@]] [[4mdir[24m]
1850DEBUG:root: Change the current directory to [4mdir[24m. if [4mdir[24m is not supplied, the value of the [1mHOME [22mshell variable is the default. Any additional arguments following [4mdir[24m are ignored. The variable [1mCDPATH [22mdefines the search
1851DEBUG:root: path for the directory containing [4mdir[24m: each directory name in [1mCDPATH [22mis searched for [4mdir[24m. Alternative directory names in [1mCDPATH [22mare separated by a colon (:). A null directory name in [1mCDPATH [22mis the same as
1852DEBUG:root: the current directory, i.e., ``[1m.[22m''. If [4mdir[24m begins with a slash (/), then [1mCDPATH [22mis not used. The [1m-P [22moption causes [1mcd [22mto use the physical directory structure by resolving symbolic links while traversing [4mdir[0m
1853DEBUG:root: and before processing instances of [4m..[24m in [4mdir[24m (see also the [1m-P [22moption to the [1mset [22mbuiltin command); the [1m-L [22moption forces symbolic links to be followed by resolving the link after processing instances of [4m..[24m in
1854DEBUG:root: [4mdir[24m. If [4m..[24m appears in [4mdir[24m, it is processed by removing the immediately previous pathname component from [4mdir[24m, back to a slash or the beginning of [4mdir[24m. If the [1m-e [22moption is supplied with [1m-P[22m, and the current
1855DEBUG:root: working directory cannot be successfully determined after a successful directory change, [1mcd [22mwill return an unsuccessful status. On systems that support it, the [1m-@ [22moption presents the extended attributes asso‐
1856DEBUG:root: ciated with a file as a directory. An argument of [1m- [22mis converted to [1m$OLDPWD [22mbefore the directory change is attempted. If a non-empty directory name from [1mCDPATH [22mis used, or if [1m- [22mis the first argument, and the
1857DEBUG:root: directory change is successful, the absolute pathname of the new working directory is written to the standard output. The return value is true if the directory was successfully changed; false otherwise.
1858DEBUG:root: [1mcommand [22m[[1m-pVv[22m] [4mcommand[24m [[4marg[24m ...]
1859DEBUG:root: Run [4mcommand[24m with [4margs[24m suppressing the normal shell function lookup. Only builtin commands or commands found in the [1mPATH [22mare executed. If the [1m-p [22moption is given, the search for [4mcommand[24m is performed using a
1860DEBUG:root: default value for [1mPATH [22mthat is guaranteed to find all of the standard utilities. If either the [1m-V [22mor [1m-v [22moption is supplied, a description of [4mcommand[24m is printed. The [1m-v [22moption causes a single word indicating
1861DEBUG:root: the command or filename used to invoke [4mcommand[24m to be displayed; the [1m-V [22moption produces a more verbose description. If the [1m-V [22mor [1m-v [22moption is supplied, the exit status is 0 if [4mcommand[24m was found, and 1 if not.
1862DEBUG:root: If neither option is supplied and an error occurred or [4mcommand[24m cannot be found, the exit status is 127. Otherwise, the exit status of the [1mcommand [22mbuiltin is the exit status of [4mcommand[24m.
1863DEBUG:root: [1mcompgen [22m[[4moption[24m] [[4mword[24m]
1864DEBUG:root: Generate possible completion matches for [4mword[24m according to the [4moption[24ms, which may be any option accepted by the [1mcomplete [22mbuiltin with the exception of [1m-p [22mand [1m-r[22m, and write the matches to the standard output.
1865DEBUG:root: When using the [1m-F [22mor [1m-C [22moptions, the various shell variables set by the programmable completion facilities, while available, will not have useful values.
1866DEBUG:root: The matches will be generated in the same way as if the programmable completion code had generated them directly from a completion specification with the same flags. If [4mword[24m is specified, only those comple‐
1867DEBUG:root: tions matching [4mword[24m will be displayed.
1868DEBUG:root: The return value is true unless an invalid option is supplied, or no matches were generated.
1869DEBUG:root: [1mcomplete [22m[[1m-abcdefgjksuv[22m] [[1m-o [4m[22mcomp-option[24m] [[1m-DE[22m] [[1m-A [4m[22maction[24m] [[1m-G [4m[22mglobpat[24m] [[1m-W [4m[22mwordlist[24m] [[1m-F [4m[22mfunction[24m] [[1m-C [4m[22mcommand[24m]
1870DEBUG:root: [[1m-X [4m[22mfilterpat[24m] [[1m-P [4m[22mprefix[24m] [[1m-S [4m[22msuffix[24m] [4mname[24m [[4mname[24m [4m...[24m]
1871DEBUG:root: [1mcomplete -pr [22m[[1m-DE[22m] [[4mname[24m ...]
1872DEBUG:root: Specify how arguments to each [4mname[24m should be completed. If the [1m-p [22moption is supplied, or if no options are supplied, existing completion specifications are printed in a way that allows them to be reused as
1873DEBUG:root: input. The [1m-r [22moption removes a completion specification for each [4mname[24m, or, if no [4mname[24ms are supplied, all completion specifications. The [1m-D [22moption indicates that the remaining options and actions should apply
1874DEBUG:root: to the ``default'' command completion; that is, completion attempted on a command for which no completion has previously been defined. The [1m-E [22moption indicates that the remaining options and actions should ap‐
1875DEBUG:root: ply to ``empty'' command completion; that is, completion attempted on a blank line.
1876DEBUG:root: The process of applying these completion specifications when word completion is attempted is described above under [1mProgrammable Completion[22m.
1877DEBUG:root: Other options, if specified, have the following meanings. The arguments to the [1m-G[22m, [1m-W[22m, and [1m-X [22moptions (and, if necessary, the [1m-P [22mand [1m-S [22moptions) should be quoted to protect them from expansion before the [1mcom‐[0m
1878DEBUG:root: [1mplete [22mbuiltin is invoked.
1879DEBUG:root: [1m-o [4m[22mcomp-option[0m
1880DEBUG:root: The [4mcomp-option[24m controls several aspects of the compspec's behavior beyond the simple generation of completions. [4mcomp-option[24m may be one of:
1881DEBUG:root: [1mbashdefault[0m
1882DEBUG:root: Perform the rest of the default [1mbash [22mcompletions if the compspec generates no matches.
1883DEBUG:root: [1mdefault [22mUse readline's default filename completion if the compspec generates no matches.
1884DEBUG:root: [1mdirnames[0m
1885DEBUG:root: Perform directory name completion if the compspec generates no matches.
1886DEBUG:root: [1mfilenames[0m
1887DEBUG:root: Tell readline that the compspec generates filenames, so it can perform any filename-specific processing (like adding a slash to directory names, quoting special characters, or suppressing
1888DEBUG:root: trailing spaces). Intended to be used with shell functions.
1889DEBUG:root: [1mnoquote [22mTell readline not to quote the completed words if they are filenames (quoting filenames is the default).
1890DEBUG:root: [1mnosort [22mTell readline not to sort the list of possible completions alphabetically.
1891DEBUG:root: [1mnospace [22mTell readline not to append a space (the default) to words completed at the end of the line.
1892DEBUG:root: [1mplusdirs[0m
1893DEBUG:root: After any matches defined by the compspec are generated, directory name completion is attempted and any matches are added to the results of the other actions.
1894DEBUG:root: [1m-A [4m[22maction[0m
1895DEBUG:root: The [4maction[24m may be one of the following to generate a list of possible completions:
1896DEBUG:root: [1malias [22mAlias names. May also be specified as [1m-a[22m.
1897DEBUG:root: [1marrayvar[0m
1898DEBUG:root: Array variable names.
1899DEBUG:root: [1mbinding Readline [22mkey binding names.
1900DEBUG:root: [1mbuiltin [22mNames of shell builtin commands. May also be specified as [1m-b[22m.
1901DEBUG:root: [1mcommand [22mCommand names. May also be specified as [1m-c[22m.
1902DEBUG:root: [1mdirectory[0m
1903DEBUG:root: Directory names. May also be specified as [1m-d[22m.
1904DEBUG:root: [1mdisabled[0m
1905DEBUG:root: Names of disabled shell builtins.
1906DEBUG:root: [1menabled [22mNames of enabled shell builtins.
1907DEBUG:root: [1mexport [22mNames of exported shell variables. May also be specified as [1m-e[22m.
1908DEBUG:root: [1mfile [22mFile names. May also be specified as [1m-f[22m.
1909DEBUG:root: [1mfunction[0m
1910DEBUG:root: Names of shell functions.
1911DEBUG:root: [1mgroup [22mGroup names. May also be specified as [1m-g[22m.
1912DEBUG:root: [1mhelptopic[0m
1913DEBUG:root: Help topics as accepted by the [1mhelp [22mbuiltin.
1914DEBUG:root: [1mhostname[0m
1915DEBUG:root: Hostnames, as taken from the file specified by the [1mHOSTFILE [22mshell variable.
1916DEBUG:root: [1mjob [22mJob names, if job control is active. May also be specified as [1m-j[22m.
1917DEBUG:root: [1mkeyword [22mShell reserved words. May also be specified as [1m-k[22m.
1918DEBUG:root: [1mrunning [22mNames of running jobs, if job control is active.
1919DEBUG:root: [1mservice [22mService names. May also be specified as [1m-s[22m.
1920DEBUG:root: [1msetopt [22mValid arguments for the [1m-o [22moption to the [1mset [22mbuiltin.
1921DEBUG:root: [1mshopt [22mShell option names as accepted by the [1mshopt [22mbuiltin.
1922DEBUG:root: [1msignal [22mSignal names.
1923DEBUG:root: [1mstopped [22mNames of stopped jobs, if job control is active.
1924DEBUG:root: [1muser [22mUser names. May also be specified as [1m-u[22m.
1925DEBUG:root: [1mvariable[0m
1926DEBUG:root: Names of all shell variables. May also be specified as [1m-v[22m.
1927DEBUG:root: [1m-C [4m[22mcommand[0m
1928DEBUG:root: [4mcommand[24m is executed in a subshell environment, and its output is used as the possible completions.
1929DEBUG:root: [1m-F [4m[22mfunction[0m
1930DEBUG:root: The shell function [4mfunction[24m is executed in the current shell environment. When the function is executed, the first argument ([1m$1[22m) is the name of the command whose arguments are being completed, the
1931DEBUG:root: second argument ([1m$2[22m) is the word being completed, and the third argument ([1m$3[22m) is the word preceding the word being completed on the current command line. When it finishes, the possible completions are
1932DEBUG:root: retrieved from the value of the [1mCOMPREPLY [22marray variable.
1933DEBUG:root: [1m-G [4m[22mglobpat[0m
1934DEBUG:root: The pathname expansion pattern [4mglobpat[24m is expanded to generate the possible completions.
1935DEBUG:root: [1m-P [4m[22mprefix[0m
1936DEBUG:root: [4mprefix[24m is added at the beginning of each possible completion after all other options have been applied.
1937DEBUG:root: [1m-S [4m[22msuffix[0m
1938DEBUG:root: [4msuffix[24m is appended to each possible completion after all other options have been applied.
1939DEBUG:root: [1m-W [4m[22mwordlist[0m
1940DEBUG:root: The [4mwordlist[24m is split using the characters in the [1mIFS [22mspecial variable as delimiters, and each resultant word is expanded. The possible completions are the members of the resultant list which match
1941DEBUG:root: the word being completed.
1942DEBUG:root: [1m-X [4m[22mfilterpat[0m
1943DEBUG:root: [4mfilterpat[24m is a pattern as used for pathname expansion. It is applied to the list of possible completions generated by the preceding options and arguments, and each completion matching [4mfilterpat[24m is re‐
1944DEBUG:root: moved from the list. A leading [1m! [22min [4mfilterpat[24m negates the pattern; in this case, any completion not matching [4mfilterpat[24m is removed.
1945DEBUG:root: The return value is true unless an invalid option is supplied, an option other than [1m-p [22mor [1m-r [22mis supplied without a [4mname[24m argument, an attempt is made to remove a completion specification for a [4mname[24m for which no
1946DEBUG:root: specification exists, or an error occurs adding a completion specification.
1947DEBUG:root: [1mcompopt [22m[[1m-o [4m[22moption[24m] [[1m-DE[22m] [[1m+o [4m[22moption[24m] [[4mname[24m]
1948DEBUG:root: Modify completion options for each [4mname[24m according to the [4moption[24ms, or for the currently-executing completion if no [4mname[24ms are supplied. If no [4moption[24ms are given, display the completion options for each [4mname[24m or
1949DEBUG:root: the current completion. The possible values of [4moption[24m are those valid for the [1mcomplete [22mbuiltin described above. The [1m-D [22moption indicates that the remaining options should apply to the ``default'' command com‐
1950DEBUG:root: pletion; that is, completion attempted on a command for which no completion has previously been defined. The [1m-E [22moption indicates that the remaining options should apply to ``empty'' command completion; that
1951DEBUG:root: is, completion attempted on a blank line.
1952DEBUG:root: The return value is true unless an invalid option is supplied, an attempt is made to modify the options for a [4mname[24m for which no completion specification exists, or an output error occurs.
1953DEBUG:root: [1mcontinue [22m[[4mn[24m]
1954DEBUG:root: Resume the next iteration of the enclosing [1mfor[22m, [1mwhile[22m, [1muntil[22m, or [1mselect [22mloop. If [4mn[24m is specified, resume at the [4mn[24mth enclosing loop. [4mn[24m must be ≥ 1. If [4mn[24m is greater than the number of enclosing loops, the last
1955DEBUG:root: enclosing loop (the ``top-level'' loop) is resumed. The return value is 0 unless [4mn[24m is not greater than or equal to 1.
1956DEBUG:root: [1mdeclare [22m[[1m-aAfFgilnrtux[22m] [[1m-p[22m] [[4mname[24m[=[4mvalue[24m] ...]
1957DEBUG:root: [1mtypeset [22m[[1m-aAfFgilnrtux[22m] [[1m-p[22m] [[4mname[24m[=[4mvalue[24m] ...]
1958DEBUG:root: Declare variables and/or give them attributes. If no [4mname[24ms are given then display the values of variables. The [1m-p [22moption will display the attributes and values of each [4mname[24m. When [1m-p [22mis used with [4mname[24m argu‐
1959DEBUG:root: ments, additional options, other than [1m-f [22mand [1m-F[22m, are ignored. When [1m-p [22mis supplied without [4mname[24m arguments, it will display the attributes and values of all variables having the attributes specified by the ad‐
1960DEBUG:root: ditional options. If no other options are supplied with [1m-p[22m, [1mdeclare [22mwill display the attributes and values of all shell variables. The [1m-f [22moption will restrict the display to shell functions. The [1m-F [22moption
1961DEBUG:root: inhibits the display of function definitions; only the function name and attributes are printed. If the [1mextdebug [22mshell option is enabled using [1mshopt[22m, the source file name and line number where each [4mname[24m is
1962DEBUG:root: defined are displayed as well. The [1m-F [22moption implies [1m-f[22m. The [1m-g [22moption forces variables to be created or modified at the global scope, even when [1mdeclare [22mis executed in a shell function. It is ignored in all
1963DEBUG:root: other cases. The following options can be used to restrict output to variables with the specified attribute or to give variables attributes:
1964DEBUG:root: [1m-a [22mEach [4mname[24m is an indexed array variable (see [1mArrays [22mabove).
1965DEBUG:root: [1m-A [22mEach [4mname[24m is an associative array variable (see [1mArrays [22mabove).
1966DEBUG:root: [1m-f [22mUse function names only.
1967DEBUG:root: [1m-i [22mThe variable is treated as an integer; arithmetic evaluation (see [1mARITHMETIC EVALUATION [22mabove) is performed when the variable is assigned a value.
1968DEBUG:root: [1m-l [22mWhen the variable is assigned a value, all upper-case characters are converted to lower-case. The upper-case attribute is disabled.
1969DEBUG:root: [1m-n [22mGive each [4mname[24m the [4mnameref[24m attribute, making it a name reference to another variable. That other variable is defined by the value of [4mname[24m. All references, assignments, and attribute modifications to
1970DEBUG:root: [4mname[24m, except those using or changing the [1m-n [22mattribute itself, are performed on the variable referenced by [4mname[24m's value. The nameref attribute cannot be applied to array variables.
1971DEBUG:root: [1m-r [22mMake [4mname[24ms readonly. These names cannot then be assigned values by subsequent assignment statements or unset.
1972DEBUG:root: [1m-t [22mGive each [4mname[24m the [4mtrace[24m attribute. Traced functions inherit the [1mDEBUG [22mand [1mRETURN [22mtraps from the calling shell. The trace attribute has no special meaning for variables.
1973DEBUG:root: [1m-u [22mWhen the variable is assigned a value, all lower-case characters are converted to upper-case. The lower-case attribute is disabled.
1974DEBUG:root: [1m-x [22mMark [4mname[24ms for export to subsequent commands via the environment.
1975DEBUG:root: Using `+' instead of `-' turns off the attribute instead, with the exceptions that [1m+a [22mmay not be used to destroy an array variable and [1m+r [22mwill not remove the readonly attribute. When used in a function, [1mde‐[0m
1976DEBUG:root: [1mclare [22mand [1mtypeset [22mmake each [4mname[24m local, as with the [1mlocal [22mcommand, unless the [1m-g [22moption is supplied. If a variable name is followed by =[4mvalue[24m, the value of the variable is set to [4mvalue[24m. When using [1m-a [22mor [1m-A[0m
1977DEBUG:root: and the compound 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
1978DEBUG:root: is made to define a function using ``-f foo=bar'', an attempt is made to assign a value to a readonly variable, an attempt is made to assign a value to an array variable without using the compound assignment
1979DEBUG:root: syntax (see [1mArrays [22mabove), one of the [4mnames[24m 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
1980DEBUG:root: variable, or an attempt is made to display a non-existent function with [1m-f[22m.
1981DEBUG:root: [1mdirs [-clpv] [+[4m[22mn[24m[1m] [-[4m[22mn[24m[1m][0m
1982DEBUG:root: Without options, displays the list of currently remembered directories. The default display is on a single line with directory names separated by spaces. Directories are added to the list with the [1mpushd [22mcom‐
1983DEBUG:root: mand; the [1mpopd [22mcommand removes entries from the list. The current directory is always the first directory in the stack.
1984DEBUG:root: [1m-c [22mClears the directory stack by deleting all of the entries.
1985DEBUG:root: [1m-l [22mProduces a listing using full pathnames; the default listing format uses a tilde to denote the home directory.
1986DEBUG:root: [1m-p [22mPrint the directory stack with one entry per line.
1987DEBUG:root: [1m-v [22mPrint the directory stack with one entry per line, prefixing each entry with its index in the stack.
1988DEBUG:root: [1m+[4m[22mn[24m Displays the [4mn[24mth entry counting from the left of the list shown by [1mdirs [22mwhen invoked without options, starting with zero.
1989DEBUG:root: [1m-[4m[22mn[24m Displays the [4mn[24mth entry counting from the right of the list shown by [1mdirs [22mwhen invoked without options, starting with zero.
1990DEBUG:root: The return value is 0 unless an invalid option is supplied or [4mn[24m indexes beyond the end of the directory stack.
1991DEBUG:root: [1mdisown [22m[[1m-ar[22m] [[1m-h[22m] [[4mjobspec[24m ... | [4mpid[24m ... ]
1992DEBUG:root: Without options, remove each [4mjobspec[24m from the table of active jobs. If [4mjobspec[24m is not present, and neither the [1m-a [22mnor the [1m-r [22moption is supplied, the [4mcurrent[24m [4mjob[24m is used. If the [1m-h [22moption is given, each [4mjob‐[0m
1993DEBUG:root: [4mspec[24m is not removed from the table, but is marked so that [1mSIGHUP [22mis not sent to the job if the shell receives a [1mSIGHUP[22m. If no [4mjobspec[24m is supplied, the [1m-a [22moption means to remove or mark all jobs; the [1m-r [22moption
1994DEBUG:root: without a [4mjobspec[24m argument restricts operation to running jobs. The return value is 0 unless a [4mjobspec[24m does not specify a valid job.
1995DEBUG:root: [1mecho [22m[[1m-neE[22m] [[4marg[24m ...]
1996DEBUG:root: Output the [4marg[24ms, separated by spaces, followed by a newline. The return status is 0 unless a write error occurs. If [1m-n [22mis specified, the trailing newline is suppressed. If the [1m-e [22moption is given, interpre‐
1997DEBUG:root: tation of the following backslash-escaped characters is enabled. The [1m-E [22moption disables the interpretation of these escape characters, even on systems where they are interpreted by default. The [1mxpg_echo[0m
1998DEBUG:root: shell option may be used to dynamically determine whether or not [1mecho [22mexpands these escape characters by default. [1mecho [22mdoes not interpret [1m-- [22mto mean the end of options. [1mecho [22minterprets the following escape
1999DEBUG:root: sequences:
2000DEBUG:root: [1m\a [22malert (bell)
2001DEBUG:root: [1m\b [22mbackspace
2002DEBUG:root: [1m\c [22msuppress further output
2003DEBUG:root: [1m\e[0m
2004DEBUG:root: [1m\E [22man escape character
2005DEBUG:root: [1m\f [22mform feed
2006DEBUG:root: [1m\n [22mnew line
2007DEBUG:root: [1m\r [22mcarriage return
2008DEBUG:root: [1m\t [22mhorizontal tab
2009DEBUG:root: [1m\v [22mvertical tab
2010DEBUG:root: [1m\\ [22mbackslash
2011DEBUG:root: [1m\0[4m[22mnnn[24m the eight-bit character whose value is the octal value [4mnnn[24m (zero to three octal digits)
2012DEBUG:root: [1m\x[4m[22mHH[24m the eight-bit character whose value is the hexadecimal value [4mHH[24m (one or two hex digits)
2013DEBUG:root: [1m\u[4m[22mHHHH[24m the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value [4mHHHH[24m (one to four hex digits)
2014DEBUG:root: [1m\U[4m[22mHHHHHHHH[0m
2015DEBUG:root: the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value [4mHHHHHHHH[24m (one to eight hex digits)
2016DEBUG:root: [1menable [22m[[1m-a[22m] [[1m-dnps[22m] [[1m-f [4m[22mfilename[24m] [[4mname[24m ...]
2017DEBUG:root: Enable and disable builtin shell commands. Disabling a builtin allows a disk command which has the same name as a shell builtin to be executed without specifying a full pathname, even though the shell nor‐
2018DEBUG:root: mally searches for builtins before disk commands. If [1m-n [22mis used, each [4mname[24m is disabled; otherwise, [4mnames[24m are enabled. For example, to use the [1mtest [22mbinary found via the [1mPATH [22minstead of the shell builtin ver‐
2019DEBUG:root: sion, run ``enable -n test''. The [1m-f [22moption means to load the new builtin command [4mname[24m from shared object [4mfilename[24m, on systems that support dynamic loading. The [1m-d [22moption will delete a builtin previously
2020DEBUG:root: loaded with [1m-f[22m. If no [4mname[24m arguments are given, or if the [1m-p [22moption is supplied, a list of shell builtins is printed. With no other option arguments, the list consists of all enabled shell builtins. If [1m-n[0m
2021DEBUG:root: is supplied, only disabled builtins are printed. If [1m-a [22mis supplied, the list printed includes all builtins, with an indication of whether or not each is enabled. If [1m-s [22mis supplied, the output is restricted
2022DEBUG:root: to the POSIX [4mspecial[24m builtins. The return value is 0 unless a [4mname[24m is not a shell builtin or there is an error loading a new builtin from a shared object.
2023DEBUG:root: [1meval [22m[[4marg[24m ...]
2024DEBUG:root: The [4marg[24ms are read and concatenated together into a single command. This command is then read and executed by the shell, and its exit status is returned as the value of [1meval[22m. If there are no [4margs[24m, or only
2025DEBUG:root: null arguments, [1meval [22mreturns 0.
2026DEBUG:root: [1mexec [22m[[1m-cl[22m] [[1m-a [4m[22mname[24m] [[4mcommand[24m [[4marguments[24m]]
2027DEBUG:root: If [4mcommand[24m is specified, it replaces the shell. No new process is created. The [4marguments[24m become the arguments to [4mcommand[24m. If the [1m-l [22moption is supplied, the shell places a dash at the beginning of the zeroth
2028DEBUG:root: argument passed to [4mcommand[24m. This is what [4mlogin[24m(1) does. The [1m-c [22moption causes [4mcommand[24m to be executed with an empty environment. If [1m-a [22mis supplied, the shell passes [4mname[24m as the zeroth argument to the executed
2029DEBUG:root: command. If [4mcommand[24m cannot be executed for some reason, a non-interactive shell exits, unless the [1mexecfail [22mshell option is enabled. In that case, it returns failure. An interactive shell returns failure if
2030DEBUG:root: the file cannot be executed. If [4mcommand[24m is not specified, any redirections take effect in the current shell, and the return status is 0. If there is a redirection error, the return status is 1.
2031DEBUG:root: [1mexit [22m[[4mn[24m]
2032DEBUG:root: Cause the shell to exit with a status of [4mn[24m. If [4mn[24m is omitted, the exit status is that of the last command executed. A trap on [1mEXIT [22mis executed before the shell terminates.
2033DEBUG:root: [1mexport [22m[[1m-fn[22m] [[4mname[24m[=[4mword[24m]] ...
2034DEBUG:root: [1mexport -p[0m
2035DEBUG:root: The supplied [4mnames[24m are marked for automatic export to the environment of subsequently executed commands. If the [1m-f [22moption is given, the [4mnames[24m refer to functions. If no [4mnames[24m are given, or if the [1m-p [22moption is
2036DEBUG:root: supplied, a list of names of all exported variables is printed. The [1m-n [22moption causes the export property to be removed from each [4mname[24m. If a variable name is followed by =[4mword[24m, the value of the variable is
2037DEBUG:root: set to [4mword[24m. [1mexport [22mreturns an exit status of 0 unless an invalid option is encountered, one of the [4mnames[24m is not a valid shell variable name, or [1m-f [22mis supplied with a [4mname[24m that is not a function.
2038DEBUG:root: [1mfc [22m[[1m-e [4m[22mename[24m] [[1m-lnr[22m] [[4mfirst[24m] [[4mlast[24m]
2039DEBUG:root: [1mfc -s [22m[[4mpat[24m=[4mrep[24m] [[4mcmd[24m]
2040DEBUG:root: The first form selects a range of commands from [4mfirst[24m to [4mlast[24m from the history list and displays or edits and re-executes them. [4mFirst[24m and [4mlast[24m may be specified as a string (to locate the last command begin‐
2041DEBUG:root: ning 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). If [4mlast[24m is not specified it is set to the current command
2042DEBUG:root: for listing (so that ``fc -l -10'' prints the last 10 commands) and to [4mfirst[24m otherwise. If [4mfirst[24m is not specified it is set to the previous command for editing and -16 for listing.
2043DEBUG:root: The [1m-n [22moption suppresses the command numbers when listing. The [1m-r [22moption reverses the order of the commands. If the [1m-l [22moption is given, the commands are listed on standard output. Otherwise, the editor
2044DEBUG:root: given by [4mename[24m is invoked on a file containing those commands. If [4mename[24m is not given, the value of the [1mFCEDIT [22mvariable is used, and the value of [1mEDITOR [22mif [1mFCEDIT [22mis not set. If neither variable is set, [4mvi[24m is
2045DEBUG:root: used. When editing is complete, the edited commands are echoed and executed.
2046DEBUG:root: In the second form, [4mcommand[24m is re-executed after each instance of [4mpat[24m is replaced by [4mrep[24m. [4mCommand[24m is intepreted the same as [4mfirst[24m above. A useful alias to use with this is ``r="fc -s"'', so that typing ``r
2047DEBUG:root: cc'' runs the last command beginning with ``cc'' and typing ``r'' re-executes the last command.
2048DEBUG:root: If the first form is used, the return value is 0 unless an invalid option is encountered or [4mfirst[24m or [4mlast[24m specify history lines out of range. If the [1m-e [22moption is supplied, the return value is the value of the
2049DEBUG:root: last command executed or failure if an error occurs with the temporary file of commands. If the second form is used, the return status is that of the command re-executed, unless [4mcmd[24m does not specify a valid
2050DEBUG:root: history line, in which case [1mfc [22mreturns failure.
2051DEBUG:root: [1mfg [22m[[4mjobspec[24m]
2052DEBUG:root: Resume [4mjobspec[24m in the foreground, and make it the current job. If [4mjobspec[24m is not present, the shell's notion of the [4mcurrent[24m [4mjob[24m is used. The return value is that of the command placed into the foreground, or
2053DEBUG:root: failure if run when job control is disabled or, when run with job control enabled, if [4mjobspec[24m does not specify a valid job or [4mjobspec[24m specifies a job that was started without job control.
2054DEBUG:root: [1mgetopts [4m[22moptstring[24m [4mname[24m [[4margs[24m]
2055DEBUG:root: [1mgetopts [22mis used by shell procedures to parse positional parameters. [4moptstring[24m contains the option characters to be recognized; if a character is followed by a colon, the option is expected to have an argu‐
2056DEBUG:root: ment, 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, [1mgetopts [22mplaces the next option in the shell vari‐
2057DEBUG:root: able [4mname[24m, initializing [4mname[24m if it does not exist, and the index of the next argument to be processed into the variable [1mOPTIND[22m. [1mOPTIND [22mis initialized to 1 each time the shell or a shell script is invoked.
2058DEBUG:root: When an option requires an argument, [1mgetopts [22mplaces that argument into the variable [1mOPTARG[22m. The shell does not reset [1mOPTIND [22mautomatically; it must be manually reset between multiple calls to [1mgetopts [22mwithin
2059DEBUG:root: the same shell invocation if a new set of parameters is to be used.
2060DEBUG:root: When the end of options is encountered, [1mgetopts [22mexits with a return value greater than zero. [1mOPTIND [22mis set to the index of the first non-option argument, and [4mname[24m is set to ?.
2061DEBUG:root: [1mgetopts [22mnormally parses the positional parameters, but if more arguments are given in [4margs[24m, [1mgetopts [22mparses those instead.
2062DEBUG:root: [1mgetopts [22mcan report errors in two ways. If the first character of [4moptstring[24m is a colon, [4msilent[24m error reporting is used. In normal operation, diagnostic messages are printed when invalid options or missing op‐
2063DEBUG:root: tion arguments are encountered. If the variable [1mOPTERR [22mis set to 0, no error messages will be displayed, even if the first character of [4moptstring[24m is not a colon.
2064DEBUG:root: If an invalid option is seen, [1mgetopts [22mplaces ? into [4mname[24m and, if not silent, prints an error message and unsets [1mOPTARG[22m. If [1mgetopts [22mis silent, the option character found is placed in [1mOPTARG [22mand no diagnostic
2065DEBUG:root: message is printed.
2066DEBUG:root: If a required argument is not found, and [1mgetopts [22mis not silent, a question mark ([1m?[22m) is placed in [4mname[24m, [1mOPTARG [22mis unset, and a diagnostic message is printed. If [1mgetopts [22mis silent, then a colon ([1m:[22m) is placed in
2067DEBUG:root: [4mname[24m and [1mOPTARG [22mis set to the option character found.
2068DEBUG:root: [1mgetopts [22mreturns true if an option, specified or unspecified, is found. It returns false if the end of options is encountered or an error occurs.
2069DEBUG:root: [1mhash [22m[[1m-lr[22m] [[1m-p [4m[22mfilename[24m] [[1m-dt[22m] [[4mname[24m]
2070DEBUG:root: Each time [1mhash [22mis invoked, the full pathname of the command [4mname[24m is determined by searching the directories in [1m$PATH [22mand remembered. Any previously-remembered pathname is discarded. If the [1m-p [22moption is sup‐
2071DEBUG:root: plied, no path search is performed, and [4mfilename[24m is used as the full filename of the command. The [1m-r [22moption causes the shell to forget all remembered locations. The [1m-d [22moption causes the shell to forget the
2072DEBUG:root: remembered location of each [4mname[24m. If the [1m-t [22moption is supplied, the full pathname to which each [4mname[24m corresponds is printed. If multiple [4mname[24m arguments are supplied with [1m-t[22m, the [4mname[24m is printed before the
2073DEBUG:root: hashed full pathname. The [1m-l [22moption causes output to be displayed in a format that may be reused as input. If no arguments are given, or if only [1m-l [22mis supplied, information about remembered commands is
2074DEBUG:root: printed. The return status is true unless a [4mname[24m is not found or an invalid option is supplied.
2075DEBUG:root: [1mhelp [22m[[1m-dms[22m] [[4mpattern[24m]
2076DEBUG:root: Display helpful information about builtin commands. If [4mpattern[24m is specified, [1mhelp [22mgives detailed help on all commands matching [4mpattern[24m; otherwise help for all the builtins and shell control structures is
2077DEBUG:root: printed.
2078DEBUG:root: [1m-d [22mDisplay a short description of each [4mpattern[0m
2079DEBUG:root: [1m-m [22mDisplay the description of each [4mpattern[24m in a manpage-like format
2080DEBUG:root: [1m-s [22mDisplay only a short usage synopsis for each [4mpattern[0m
2081DEBUG:root: The return status is 0 unless no command matches [4mpattern[24m.
2082DEBUG:root: [1mhistory [[4m[22mn[24m[1m][0m
2083DEBUG:root: [1mhistory -c[0m
2084DEBUG:root: [1mhistory -d [4m[22moffset[0m
2085DEBUG:root: [1mhistory -anrw [22m[[4mfilename[24m]
2086DEBUG:root: [1mhistory -p [4m[22marg[24m [[4marg[24m [4m...[24m]
2087DEBUG:root: [1mhistory -s [4m[22marg[24m [[4marg[24m [4m...[24m]
2088DEBUG:root: With no options, display the command history list with line numbers. Lines listed with a [1m* [22mhave been modified. An argument of [4mn[24m lists only the last [4mn[24m lines. If the shell variable [1mHISTTIMEFORMAT [22mis set and
2089DEBUG:root: not null, it is used as a format string for [4mstrftime[24m(3) to display the time stamp associated with each displayed history entry. No intervening blank is printed between the formatted time stamp and the history
2090DEBUG:root: line. If [4mfilename[24m is supplied, it is used as the name of the history file; if not, the value of [1mHISTFILE [22mis used. Options, if supplied, have the following meanings:
2091DEBUG:root: [1m-c [22mClear the history list by deleting all the entries.
2092DEBUG:root: [1m-d [4m[22moffset[0m
2093DEBUG:root: Delete the history entry at position [4moffset[24m.
2094DEBUG:root: [1m-a [22mAppend the ``new'' history lines to the history file. These are history lines entered since the beginning of the current [1mbash [22msession, but not already appended to the history file.
2095DEBUG:root: [1m-n [22mRead the history lines not already read from the history file into the current history list. These are lines appended to the history file since the beginning of the current [1mbash [22msession.
2096DEBUG:root: [1m-r [22mRead the contents of the history file and append them to the current history list.
2097DEBUG:root: [1m-w [22mWrite the current history list to the history file, overwriting the history file's contents.
2098DEBUG:root: [1m-p [22mPerform history substitution on the following [4margs[24m and display the result on the standard output. Does not store the results in the history list. Each [4marg[24m must be quoted to disable normal history ex‐
2099DEBUG:root: pansion.
2100DEBUG:root: [1m-s [22mStore the [4margs[24m in the history list as a single entry. The last command in the history list is removed before the [4margs[24m are added.
2101DEBUG:root: If the [1mHISTTIMEFORMAT [22mvariable is set, the time stamp information associated with each history entry is written to the history file, marked with the history comment character. When the history file is read,
2102DEBUG:root: 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,
2103DEBUG:root: an error occurs while reading or writing the history file, an invalid [4moffset[24m is supplied as an argument to [1m-d[22m, or the history expansion supplied as an argument to [1m-p [22mfails.
2104DEBUG:root: [1mjobs [22m[[1m-lnprs[22m] [ [4mjobspec[24m ... ]
2105DEBUG:root: [1mjobs -x [4m[22mcommand[24m [ [4margs[24m ... ]
2106DEBUG:root: The first form lists the active jobs. The options have the following meanings:
2107DEBUG:root: [1m-l [22mList process IDs in addition to the normal information.
2108DEBUG:root: [1m-n [22mDisplay information only about jobs that have changed status since the user was last notified of their status.
2109DEBUG:root: [1m-p [22mList only the process ID of the job's process group leader.
2110DEBUG:root: [1m-r [22mDisplay only running jobs.
2111DEBUG:root: [1m-s [22mDisplay only stopped jobs.
2112DEBUG:root: If [4mjobspec[24m is given, output is restricted to information about that job. The return status is 0 unless an invalid option is encountered or an invalid [4mjobspec[24m is supplied.
2113DEBUG:root: If the [1m-x [22moption is supplied, [1mjobs [22mreplaces any [4mjobspec[24m found in [4mcommand[24m or [4margs[24m with the corresponding process group ID, and executes [4mcommand[24m passing it [4margs[24m, returning its exit status.
2114DEBUG:root: [1mkill [22m[[1m-s [4m[22msigspec[24m | [1m-n [4m[22msignum[24m | [1m-[4m[22msigspec[24m] [[4mpid[24m | [4mjobspec[24m] ...
2115DEBUG:root: [1mkill -l[22m|[1m-L [22m[[4msigspec[24m | [4mexit_status[24m]
2116DEBUG:root: Send the signal named by [4msigspec[24m or [4msignum[24m to the processes named by [4mpid[24m or [4mjobspec[24m. [4msigspec[24m is either a case-insensitive signal name such as [1mSIGKILL [22m(with or without the [1mSIG [22mprefix) or a signal number;
2117DEBUG:root: [4msignum[24m is a signal number. If [4msigspec[24m is not present, then [1mSIGTERM [22mis assumed. An argument of [1m-l [22mlists the signal names. If any arguments are supplied when [1m-l [22mis given, the names of the signals correspond‐
2118DEBUG:root: ing to the arguments are listed, and the return status is 0. The [4mexit_status[24m argument to [1m-l [22mis a number specifying either a signal number or the exit status of a process terminated by a signal. The [1m-L [22moption
2119DEBUG:root: is equivalent to [1m-l[22m. [1mkill [22mreturns true if at least one signal was successfully sent, or false if an error occurs or an invalid option is encountered.
2120DEBUG:root: [1mlet [4m[22marg[24m [[4marg[24m ...]
2121DEBUG:root: Each [4marg[24m is an arithmetic expression to be evaluated (see [1mARITHMETIC EVALUATION [22mabove). If the last [4marg[24m evaluates to 0, [1mlet [22mreturns 1; 0 is returned otherwise.
2122DEBUG:root: [1mlocal [22m[[4moption[24m] [[4mname[24m[=[4mvalue[24m] ... | - ]
2123DEBUG:root: For each argument, a local variable named [4mname[24m is created, and assigned [4mvalue[24m. The [4moption[24m can be any of the options accepted by [1mdeclare[22m. When [1mlocal [22mis used within a function, it causes the variable [4mname[24m to
2124DEBUG:root: have a visible scope restricted to that function and its children. If [4mname[24m is -, the set of shell options is made local to the function in which [1mlocal [22mis invoked: shell options changed using the [1mset [22mbuiltin
2125DEBUG:root: inside the function are restored to their original values when the function returns. With no operands, [1mlocal [22mwrites a list of local variables to the standard output. It is an error to use [1mlocal [22mwhen not
2126DEBUG:root: within a function. The return status is 0 unless [1mlocal [22mis used outside a function, an invalid [4mname[24m is supplied, or [4mname[24m is a readonly variable.
2127DEBUG:root: [1mlogout [22mExit a login shell.
2128DEBUG:root: [1mmapfile [22m[[1m-d [4m[22mdelim[24m] [[1m-n [4m[22mcount[24m] [[1m-O [4m[22morigin[24m] [[1m-s [4m[22mcount[24m] [[1m-t[22m] [[1m-u [4m[22mfd[24m] [[1m-C [4m[22mcallback[24m] [[1m-c [4m[22mquantum[24m] [[4marray[24m]
2129DEBUG:root: [1mreadarray [22m[[1m-d [4m[22mdelim[24m] [[1m-n [4m[22mcount[24m] [[1m-O [4m[22morigin[24m] [[1m-s [4m[22mcount[24m] [[1m-t[22m] [[1m-u [4m[22mfd[24m] [[1m-C [4m[22mcallback[24m] [[1m-c [4m[22mquantum[24m] [[4marray[24m]
2130DEBUG:root: Read lines from the standard input into the indexed array variable [4marray[24m, or from file descriptor [4mfd[24m if the [1m-u [22moption is supplied. The variable [1mMAPFILE [22mis the default [4marray[24m. Options, if supplied, have the
2131DEBUG:root: following meanings:
2132DEBUG:root: [1m-d [22mThe first character of [4mdelim[24m is used to terminate each input line, rather than newline.
2133DEBUG:root: [1m-n [22mCopy at most [4mcount[24m lines. If [4mcount[24m is 0, all lines are copied.
2134DEBUG:root: [1m-O [22mBegin assigning to [4marray[24m at index [4morigin[24m. The default index is 0.
2135DEBUG:root: [1m-s [22mDiscard the first [4mcount[24m lines read.
2136DEBUG:root: [1m-t [22mRemove a trailing [4mdelim[24m (default newline) from each line read.
2137DEBUG:root: [1m-u [22mRead lines from file descriptor [4mfd[24m instead of the standard input.
2138DEBUG:root: [1m-C [22mEvaluate [4mcallback[24m each time [4mquantum[24m lines are read. The [1m-c [22moption specifies [4mquantum[24m.
2139DEBUG:root: [1m-c [22mSpecify the number of lines read between each call to [4mcallback[24m.
2140DEBUG:root: If [1m-C [22mis specified without [1m-c[22m, the default quantum is 5000. When [4mcallback[24m 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 addi‐
2141DEBUG:root: tional arguments. [4mcallback[24m is evaluated after the line is read but before the array element is assigned.
2142DEBUG:root: If not supplied with an explicit origin, [1mmapfile [22mwill clear [4marray[24m before assigning to it.
2143DEBUG:root: [1mmapfile [22mreturns successfully unless an invalid option or option argument is supplied, [4marray[24m is invalid or unassignable, or if [4marray[24m is not an indexed array.
2144DEBUG:root: [1mpopd [22m[-[1mn[22m] [+[4mn[24m] [-[4mn[24m]
2145DEBUG:root: Removes entries from the directory stack. With no arguments, removes the top directory from the stack, and performs a [1mcd [22mto the new top directory. Arguments, if supplied, have the following meanings:
2146DEBUG:root: [1m-n [22mSuppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.
2147DEBUG:root: [1m+[4m[22mn[24m Removes the [4mn[24mth entry counting from the left of the list shown by [1mdirs[22m, starting with zero. For example: ``popd +0'' removes the first directory, ``popd +1'' the second.
2148DEBUG:root: [1m-[4m[22mn[24m Removes the [4mn[24mth entry counting from the right of the list shown by [1mdirs[22m, starting with zero. For example: ``popd -0'' removes the last directory, ``popd -1'' the next to last.
2149DEBUG:root: If the [1mpopd [22mcommand is successful, a [1mdirs [22mis performed as well, and the return status is 0. [1mpopd [22mreturns false if an invalid option is encountered, the directory stack is empty, a non-existent directory stack
2150DEBUG:root: entry is specified, or the directory change fails.
2151DEBUG:root: [1mprintf [22m[[1m-v [4m[22mvar[24m] [4mformat[24m [[4marguments[24m]
2152DEBUG:root: Write the formatted [4marguments[24m to the standard output under the control of the [4mformat[24m. The [1m-v [22moption causes the output to be assigned to the variable [4mvar[24m rather than being printed to the standard output.
2153DEBUG:root: The [4mformat[24m 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
2154DEBUG:root: output, and format specifications, each of which causes printing of the next successive [4margument[24m. In addition to the standard [4mprintf[24m(1) format specifications, [1mprintf [22minterprets the following extensions:
2155DEBUG:root: [1m%b [22mcauses [1mprintf [22mto expand backslash escape sequences in the corresponding [4margument[24m in the same way as [1mecho -e[22m.
2156DEBUG:root: [1m%q [22mcauses [1mprintf [22mto output the corresponding [4margument[24m in a format that can be reused as shell input.
2157DEBUG:root: [1m%([4m[22mdatefmt[24m[1m)T[0m
2158DEBUG:root: causes [1mprintf [22mto output the date-time string resulting from using [4mdatefmt[24m as a format string for [4mstrftime[24m(3). The corresponding [4margument[24m is an integer representing the number of seconds since the
2159DEBUG:root: epoch. Two special argument values may be used: -1 represents the current time, and -2 represents the time the shell was invoked. If no argument is specified, conversion behaves as if -1 had been
2160DEBUG:root: given. This is an exception to the usual [1mprintf [22mbehavior.
2161DEBUG:root: Arguments to non-string format specifiers are treated as C constants, 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 ASCII value
2162DEBUG:root: of the following character.
2163DEBUG:root: The [4mformat[24m is reused as necessary to consume all of the [4marguments[24m. If the [4mformat[24m requires more [4marguments[24m than are supplied, the extra format specifications behave as if a zero value or null string, as appro‐
2164DEBUG:root: priate, had been supplied. The return value is zero on success, non-zero on failure.
2165DEBUG:root: [1mpushd [22m[[1m-n[22m] [+[4mn[24m] [-[4mn[24m]
2166DEBUG:root: [1mpushd [22m[[1m-n[22m] [[4mdir[24m]
2167DEBUG:root: Adds a directory to the top of the directory stack, or rotates the stack, making the new top of the stack the current working directory. With no arguments, [1mpushd [22mexchanges the top two directories and returns
2168DEBUG:root: 0, unless the directory stack is empty. Arguments, if supplied, have the following meanings:
2169DEBUG:root: [1m-n [22mSuppresses the normal change of directory when rotating or adding directories to the stack, so that only the stack is manipulated.
2170DEBUG:root: [1m+[4m[22mn[24m Rotates the stack so that the [4mn[24mth directory (counting from the left of the list shown by [1mdirs[22m, starting with zero) is at the top.
2171DEBUG:root: [1m-[4m[22mn[24m Rotates the stack so that the [4mn[24mth directory (counting from the right of the list shown by [1mdirs[22m, starting with zero) is at the top.
2172DEBUG:root: [4mdir[24m Adds [4mdir[24m to the directory stack at the top, making it the new current working directory as if it had been supplied as the argument to the [1mcd [22mbuiltin.
2173DEBUG:root: If the [1mpushd [22mcommand is successful, a [1mdirs [22mis performed as well. If the first form is used, [1mpushd [22mreturns 0 unless the cd to [4mdir[24m fails. With the second form, [1mpushd [22mreturns 0 unless the directory stack is
2174DEBUG:root: empty, a non-existent directory stack element is specified, or the directory change to the specified new current directory fails.
2175DEBUG:root: [1mpwd [22m[[1m-LP[22m]
2176DEBUG:root: Print the absolute pathname of the current working directory. The pathname printed contains no symbolic links if the [1m-P [22moption is supplied or the [1m-o physical [22moption to the [1mset [22mbuiltin command is enabled. If
2177DEBUG:root: the [1m-L [22moption 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 invalid option is supplied.
2178DEBUG:root: [1mread [22m[[1m-ers[22m] [[1m-a [4m[22maname[24m] [[1m-d [4m[22mdelim[24m] [[1m-i [4m[22mtext[24m] [[1m-n [4m[22mnchars[24m] [[1m-N [4m[22mnchars[24m] [[1m-p [4m[22mprompt[24m] [[1m-t [4m[22mtimeout[24m] [[1m-u [4m[22mfd[24m] [[4mname[24m ...]
2179DEBUG:root: One line is read from the standard input, or from the file descriptor [4mfd[24m supplied as an argument to the [1m-u [22moption, split into words as described above under [1mWord Splitting[22m, and the first word is assigned to
2180DEBUG:root: the first [4mname[24m, the second word to the second [4mname[24m, and so on. If there are more words than names, the remaining words and their intervening delimiters are assigned to the last [4mname[24m. If there are fewer words
2181DEBUG:root: read from the input stream than names, the remaining names are assigned empty values. The characters in [1mIFS [22mare used to split the line into words using the same rules the shell uses for expansion (described
2182DEBUG:root: above under [1mWord Splitting[22m). The backslash character ([1m\[22m) may be used to remove any special meaning for the next character read and for line continuation. Options, if supplied, have the following meanings:
2183DEBUG:root: [1m-a [4m[22maname[0m
2184DEBUG:root: The words are assigned to sequential indices of the array variable [4maname[24m, starting at 0. [4maname[24m is unset before any new values are assigned. Other [4mname[24m arguments are ignored.
2185DEBUG:root: [1m-d [4m[22mdelim[0m
2186DEBUG:root: The first character of [4mdelim[24m is used to terminate the input line, rather than newline.
2187DEBUG:root: [1m-e [22mIf the standard input is coming from a terminal, [1mreadline [22m(see [1mREADLINE [22mabove) is used to obtain the line. Readline uses the current (or default, if line editing was not previously active) editing set‐
2188DEBUG:root: tings.
2189DEBUG:root: [1m-i [4m[22mtext[0m
2190DEBUG:root: If [1mreadline [22mis being used to read the line, [4mtext[24m is placed into the editing buffer before editing begins.
2191DEBUG:root: [1m-n [4m[22mnchars[0m
2192DEBUG:root: [1mread [22mreturns after reading [4mnchars[24m characters rather than waiting for a complete line of input, but honors a delimiter if fewer than [4mnchars[24m characters are read before the delimiter.
2193DEBUG:root: [1m-N [4m[22mnchars[0m
2194DEBUG:root: [1mread [22mreturns after reading exactly [4mnchars[24m characters rather than waiting for a complete line of input, unless EOF is encountered or [1mread [22mtimes out. Delimiter characters encountered in the input are not
2195DEBUG:root: treated specially and do not cause [1mread [22mto return until [4mnchars[24m characters are read. The result is not split on the characters in [1mIFS[22m; the intent is that the variable is assigned exactly the characters
2196DEBUG:root: read (with the exception of backslash; see the [1m-r [22moption below).
2197DEBUG:root: [1m-p [4m[22mprompt[0m
2198DEBUG:root: Display [4mprompt[24m on standard error, without a trailing newline, before attempting to read any input. The prompt is displayed only if input is coming from a terminal.
2199DEBUG:root: [1m-r [22mBackslash does not act as an escape character. The backslash is considered to be part of the line. In particular, a backslash-newline pair may not be used as a line continuation.
2200DEBUG:root: [1m-s [22mSilent mode. If input is coming from a terminal, characters are not echoed.
2201DEBUG:root: [1m-t [4m[22mtimeout[0m
2202DEBUG:root: Cause [1mread [22mto time out and return failure if a complete line of input (or a specified number of characters) is not read within [4mtimeout[24m seconds. [4mtimeout[24m may be a decimal number with a fractional portion
2203DEBUG:root: following the decimal point. This option is only effective if [1mread [22mis reading input from a terminal, pipe, or other special file; it has no effect when reading from regular files. If [1mread [22mtimes out,
2204DEBUG:root: [1mread [22msaves any partial input read into the specified variable [4mname[24m. If [4mtimeout[24m is 0, [1mread [22mreturns immediately, without trying to read any data. The exit status is 0 if input is available on the speci‐
2205DEBUG:root: fied file descriptor, non-zero otherwise. The exit status is greater than 128 if the timeout is exceeded.
2206DEBUG:root: [1m-u [4m[22mfd[24m Read input from file descriptor [4mfd[24m.
2207DEBUG:root: If no [4mnames[24m are supplied, the line read is assigned to the variable [1mREPLY[22m. The exit status is zero, unless end-of-file is encountered, [1mread [22mtimes out (in which case the status is greater than 128), a variable
2208DEBUG:root: assignment error (such as assigning to a readonly variable) occurs, or an invalid file descriptor is supplied as the argument to [1m-u[22m.
2209DEBUG:root: [1mreadonly [22m[[1m-aAf[22m] [[1m-p[22m] [[4mname[24m[=[4mword[24m] ...]
2210DEBUG:root: The given [4mnames[24m are marked readonly; the values of these [4mnames[24m may not be changed by subsequent assignment. If the [1m-f [22moption is supplied, the functions corresponding to the [4mnames[24m are so marked. The [1m-a [22moption
2211DEBUG:root: restricts the variables to indexed arrays; the [1m-A [22moption restricts the variables to associative arrays. If both options are supplied, [1m-A [22mtakes precedence. If no [4mname[24m arguments are given, or if the [1m-p [22moption
2212DEBUG:root: is supplied, a list of all readonly names is printed. The other options may be used to restrict the output to a subset of the set of readonly names. The [1m-p [22moption causes output to be displayed in a format
2213DEBUG:root: that may be reused as input. If a variable name is followed by =[4mword[24m, the value of the variable is set to [4mword[24m. The return status is 0 unless an invalid option is encountered, one of the [4mnames[24m is not a valid
2214DEBUG:root: shell variable name, or [1m-f [22mis supplied with a [4mname[24m that is not a function.
2215DEBUG:root: [1mreturn [22m[[4mn[24m]
2216DEBUG:root: Causes a function to stop executing and return the value specified by [4mn[24m to its caller. If [4mn[24m is omitted, the return status is that of the last command executed in the function body. If [1mreturn [22mis executed by a
2217DEBUG:root: trap handler, the last command used to determine the status is the last command executed before the trap handler. if [1mreturn [22mis executed during a [1mDEBUG [22mtrap, the last command used to determine the status is
2218DEBUG:root: the last command executed by the trap handler before [1mreturn [22mwas invoked. If [1mreturn [22mis used outside a function, but during execution of a script by the [1m. [22m([1msource[22m) command, it causes the shell to stop execut‐
2219DEBUG:root: ing that script and return either [4mn[24m or the exit status of the last command executed within the script as the exit status of the script. If [4mn[24m is supplied, the return value is its least significant 8 bits. The
2220DEBUG:root: return status is non-zero if [1mreturn [22mis supplied a non-numeric argument, or is used outside a function and not during execution of a script by [1m. [22mor [1msource[22m. Any command associated with the [1mRETURN [22mtrap is exe‐
2221DEBUG:root: cuted before execution resumes after the function or script.
2222DEBUG:root: [1mset [22m[[1m--abefhkmnptuvxBCEHPT[22m] [[1m-o [4m[22moption-name[24m] [[4marg[24m ...]
2223DEBUG:root: [1mset [22m[[1m+abefhkmnptuvxBCEHPT[22m] [[1m+o [4m[22moption-name[24m] [[4marg[24m ...]
2224DEBUG:root: Without options, the name and value of each shell variable are displayed in a format that can be reused as input for setting or resetting the currently-set variables. Read-only variables cannot be reset. In
2225DEBUG:root: [4mposix[24m 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 arguments remaining after option pro‐
2226DEBUG:root: cessing are treated as values for the positional parameters and are assigned, in order, to [1m$1[22m, [1m$2[22m, [1m... $[4m[22mn[24m. Options, if specified, have the following meanings:
2227DEBUG:root: [1m-a [22mEach variable or function that is created or modified is given the export attribute and marked for export to the environment of subsequent commands.
2228DEBUG:root: [1m-b [22mReport the status of terminated background jobs immediately, rather than before the next primary prompt. This is effective only when job control is enabled.
2229DEBUG:root: [1m-e [22mExit immediately if a [4mpipeline[24m (which may consist of a single [4msimple[24m [4mcommand[24m), a [4mlist[24m, or a [4mcompound[24m [4mcommand[24m (see [1mSHELL GRAMMAR [22mabove), exits with a non-zero status. The shell does not exit if the
2230DEBUG:root: command that fails is part of the command list immediately following a [1mwhile [22mor [1muntil [22mkeyword, part of the test following the [1mif [22mor [1melif [22mreserved words, part of any command executed in a [1m&& [22mor [1m|| [22mlist
2231DEBUG:root: except the command following the final [1m&& [22mor [1m||[22m, any command in a pipeline but the last, or if the command's return value is being inverted with [1m![22m. If a compound command other than a subshell returns
2232DEBUG:root: a non-zero status because a command failed while [1m-e [22mwas being ignored, the shell does not exit. A trap on [1mERR[22m, if set, is executed before the shell exits. This option applies to the shell environment
2233DEBUG:root: and each subshell environment separately (see [1mCOMMAND EXECUTION ENVIRONMENT [22mabove), and may cause subshells to exit before executing all the commands in the subshell.
2234DEBUG:root: If a compound command or shell function executes in a context where [1m-e [22mis being ignored, none of the commands executed within the compound command or function body will be affected by the [1m-e [22msetting,
2235DEBUG:root: even if [1m-e [22mis set and a command returns a failure status. If a compound command or shell function sets [1m-e [22mwhile executing in a context where [1m-e [22mis ignored, that setting will not have any effect until
2236DEBUG:root: the compound command or the command containing the function call completes.
2237DEBUG:root: [1m-f [22mDisable pathname expansion.
2238DEBUG:root: [1m-h [22mRemember the location of commands as they are looked up for execution. This is enabled by default.
2239DEBUG:root: [1m-k [22mAll arguments in the form of assignment statements are placed in the environment for a command, not just those that precede the command name.
2240DEBUG:root: [1m-m [22mMonitor mode. Job control is enabled. This option is on by default for interactive shells on systems that support it (see [1mJOB CONTROL [22mabove). All processes run in a separate process group. When a
2241DEBUG:root: background job completes, the shell prints a line containing its exit status.
2242DEBUG:root: [1m-n [22mRead commands but do not execute them. This may be used to check a shell script for syntax errors. This is ignored by interactive shells.
2243DEBUG:root: [1m-o [4m[22moption-name[0m
2244DEBUG:root: The [4moption-name[24m can be one of the following:
2245DEBUG:root: [1mallexport[0m
2246DEBUG:root: Same as [1m-a[22m.
2247DEBUG:root: [1mbraceexpand[0m
2248DEBUG:root: Same as [1m-B[22m.
2249DEBUG:root: [1memacs [22mUse an emacs-style command line editing interface. This is enabled by default when the shell is interactive, unless the shell is started with the [1m--noediting [22moption. This also affects the
2250DEBUG:root: editing interface used for [1mread -e[22m.
2251DEBUG:root: [1merrexit [22mSame as [1m-e[22m.
2252DEBUG:root: [1merrtrace[0m
2253DEBUG:root: Same as [1m-E[22m.
2254DEBUG:root: [1mfunctrace[0m
2255DEBUG:root: Same as [1m-T[22m.
2256DEBUG:root: [1mhashall [22mSame as [1m-h[22m.
2257DEBUG:root: [1mhistexpand[0m
2258DEBUG:root: Same as [1m-H[22m.
2259DEBUG:root: [1mhistory [22mEnable command history, as described above under [1mHISTORY[22m. This option is on by default in interactive shells.
2260DEBUG:root: [1mignoreeof[0m
2261DEBUG:root: The effect is as if the shell command ``IGNOREEOF=10'' had been executed (see [1mShell Variables [22mabove).
2262DEBUG:root: [1mkeyword [22mSame as [1m-k[22m.
2263DEBUG:root: [1mmonitor [22mSame as [1m-m[22m.
2264DEBUG:root: [1mnoclobber[0m
2265DEBUG:root: Same as [1m-C[22m.
2266DEBUG:root: [1mnoexec [22mSame as [1m-n[22m.
2267DEBUG:root: [1mnoglob [22mSame as [1m-f[22m.
2268DEBUG:root: [1mnolog [22mCurrently ignored.
2269DEBUG:root: [1mnotify [22mSame as [1m-b[22m.
2270DEBUG:root: [1mnounset [22mSame as [1m-u[22m.
2271DEBUG:root: [1monecmd [22mSame as [1m-t[22m.
2272DEBUG:root: [1mphysical[0m
2273DEBUG:root: Same as [1m-P[22m.
2274DEBUG:root: [1mpipefail[0m
2275DEBUG:root: 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
2276DEBUG:root: disabled by default.
2277DEBUG:root: [1mposix [22mChange the behavior of [1mbash [22mwhere the default operation differs from the POSIX standard to match the standard ([4mposix[24m [4mmode[24m). See [1mSEE ALSO [22mbelow for a reference to a document that details how
2278DEBUG:root: posix mode affects bash's behavior.
2279DEBUG:root: [1mprivileged[0m
2280DEBUG:root: Same as [1m-p[22m.
2281DEBUG:root: [1mverbose [22mSame as [1m-v[22m.
2282DEBUG:root: [1mvi [22mUse a vi-style command line editing interface. This also affects the editing interface used for [1mread -e[22m.
2283DEBUG:root: [1mxtrace [22mSame as [1m-x[22m.
2284DEBUG:root: If [1m-o [22mis supplied with no [4moption-name[24m, the values of the current options are printed. If [1m+o [22mis supplied with no [4moption-name[24m, a series of [1mset [22mcommands to recreate the current option settings is dis‐
2285DEBUG:root: played on the standard output.
2286DEBUG:root: [1m-p [22mTurn on [4mprivileged[24m mode. In this mode, the [1m$ENV [22mand [1m$BASH_ENV [22mfiles are not processed, shell functions are not inherited from the environment, and the [1mSHELLOPTS[22m, [1mBASHOPTS[22m, [1mCDPATH[22m, and [1mGLOBIGNORE [22mvari‐
2287DEBUG:root: ables, 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 [1m-p [22moption is not supplied, these ac‐
2288DEBUG:root: tions are taken and the effective user id is set to the real user id. If the [1m-p [22moption is supplied at startup, the effective user id is not reset. Turning this option off causes the effective user
2289DEBUG:root: and group ids to be set to the real user and group ids.
2290DEBUG:root: [1m-t [22mExit after reading and executing one command.
2291DEBUG:root: [1m-u [22mTreat unset variables and parameters other than the special parameters "@" and "*" as an error when performing parameter expansion. If expansion is attempted on an unset variable or parameter, the
2292DEBUG:root: shell prints an error message, and, if not interactive, exits with a non-zero status.
2293DEBUG:root: [1m-v [22mPrint shell input lines as they are read.
2294DEBUG:root: [1m-x [22mAfter expanding each [4msimple[24m [4mcommand[24m, [1mfor [22mcommand, [1mcase [22mcommand, [1mselect [22mcommand, or arithmetic [1mfor [22mcommand, display the expanded value of [1mPS4[22m, followed by the command and its expanded arguments or asso‐
2295DEBUG:root: ciated word list.
2296DEBUG:root: [1m-B [22mThe shell performs brace expansion (see [1mBrace Expansion [22mabove). This is on by default.
2297DEBUG:root: [1m-C [22mIf set, [1mbash [22mdoes not overwrite an existing file with the [1m>[22m, [1m>&[22m, and [1m<> [22mredirection operators. This may be overridden when creating output files by using the redirection operator [1m>| [22minstead of [1m>[22m.
2298DEBUG:root: [1m-E [22mIf set, any trap on [1mERR [22mis inherited by shell functions, command substitutions, and commands executed in a subshell environment. The [1mERR [22mtrap is normally not inherited in such cases.
2299DEBUG:root: [1m-H [22mEnable [1m! [22mstyle history substitution. This option is on by default when the shell is interactive.
2300DEBUG:root: [1m-P [22mIf set, the shell does not resolve symbolic links when executing commands such as [1mcd [22mthat change the current working directory. It uses the physical directory structure instead. By default, [1mbash [22mfol‐
2301DEBUG:root: lows the logical chain of directories when performing commands which change the current directory.
2302DEBUG:root: [1m-T [22mIf set, any traps on [1mDEBUG [22mand [1mRETURN [22mare inherited by shell functions, command substitutions, and commands executed in a subshell environment. The [1mDEBUG [22mand [1mRETURN [22mtraps are normally not inherited in
2303DEBUG:root: such cases.
2304DEBUG:root: [1m-- [22mIf no arguments follow this option, then the positional parameters are unset. Otherwise, the positional parameters are set to the [4marg[24ms, even if some of them begin with a [1m-[22m.
2305DEBUG:root: [1m- [22mSignal the end of options, cause all remaining [4marg[24ms to be assigned to the positional parameters. The [1m-x [22mand [1m-v [22moptions are turned off. If there are no [4marg[24ms, the positional parameters remain un‐
2306DEBUG:root: changed.
2307DEBUG:root: The options are off by default unless otherwise noted. Using + rather than - causes these options to be turned off. The options can also be specified as arguments to an invocation of the shell. The current
2308DEBUG:root: set of options may be found in [1m$-[22m. The return status is always true unless an invalid option is encountered.
2309DEBUG:root: [1mshift [22m[[4mn[24m]
2310DEBUG:root: The positional parameters from [4mn[24m+1 ... are renamed to [1m$1 .... [22mParameters represented by the numbers [1m$# [22mdown to [1m$#[22m-[4mn[24m+1 are unset. [4mn[24m must be a non-negative number less than or equal to [1m$#[22m. If [4mn[24m is 0, no pa‐
2311DEBUG:root: rameters are changed. If [4mn[24m is not given, it is assumed to be 1. If [4mn[24m is greater than [1m$#[22m, the positional parameters are not changed. The return status is greater than zero if [4mn[24m is greater than [1m$# [22mor less
2312DEBUG:root: than zero; otherwise 0.
2313DEBUG:root: [1mshopt [22m[[1m-pqsu[22m] [[1m-o[22m] [[4moptname[24m ...]
2314DEBUG:root: Toggle the values of settings controlling optional shell behavior. The settings can be either those listed below, or, if the [1m-o [22moption is used, those available with the [1m-o [22moption to the [1mset [22mbuiltin command.
2315DEBUG:root: With no options, or with the [1m-p [22moption, a list of all settable options is displayed, with an indication of whether or not each is set. The [1m-p [22moption causes output to be displayed in a form that may be reused
2316DEBUG:root: as input. Other options have the following meanings:
2317DEBUG:root: [1m-s [22mEnable (set) each [4moptname[24m.
2318DEBUG:root: [1m-u [22mDisable (unset) each [4moptname[24m.
2319DEBUG:root: [1m-q [22mSuppresses normal output (quiet mode); the return status indicates whether the [4moptname[24m is set or unset. If multiple [4moptname[24m arguments are given with [1m-q[22m, the return status is zero if all [4moptnames[24m are
2320DEBUG:root: enabled; non-zero otherwise.
2321DEBUG:root: [1m-o [22mRestricts the values of [4moptname[24m to be those defined for the [1m-o [22moption to the [1mset [22mbuiltin.
2322DEBUG:root: If either [1m-s [22mor [1m-u [22mis used with no [4moptname[24m arguments, [1mshopt [22mshows only those options which are set or unset, respectively. Unless otherwise noted, the [1mshopt [22moptions are disabled (unset) by default.
2323DEBUG:root: The return status when listing options is zero if all [4moptnames[24m are enabled, non-zero otherwise. When setting or unsetting options, the return status is zero unless an [4moptname[24m is not a valid shell option.
2324DEBUG:root: The list of [1mshopt [22moptions is:
2325DEBUG:root: [1mautocd [22mIf set, a command name that is the name of a directory is executed as if it were the argument to the [1mcd [22mcommand. This option is only used by interactive shells.
2326DEBUG:root: [1mcdable_vars[0m
2327DEBUG:root: If set, an argument to the [1mcd [22mbuiltin command that is not a directory is assumed to be the name of a variable whose value is the directory to change to.
2328DEBUG:root: [1mcdspell [22mIf set, minor errors in the spelling of a directory component in a [1mcd [22mcommand will be corrected. The errors checked for are transposed characters, a missing character, and one character too many. If
2329DEBUG:root: a correction is found, the corrected filename is printed, and the command proceeds. This option is only used by interactive shells.
2330DEBUG:root: [1mcheckhash[0m
2331DEBUG:root: If set, [1mbash [22mchecks that a command found in the hash table exists before trying to execute it. If a hashed command no longer exists, a normal path search is performed.
2332DEBUG:root: [1mcheckjobs[0m
2333DEBUG:root: If set, [1mbash [22mlists the status of any stopped and running jobs before exiting an interactive shell. If any jobs are running, this causes the exit to be deferred until a second exit is attempted without
2334DEBUG:root: an intervening command (see [1mJOB CONTROL [22mabove). The shell always postpones exiting if any jobs are stopped.
2335DEBUG:root: [1mcheckwinsize[0m
2336DEBUG:root: If set, [1mbash [22mchecks the window size after each command and, if necessary, updates the values of [1mLINES [22mand [1mCOLUMNS[22m.
2337DEBUG:root: [1mcmdhist [22mIf set, [1mbash [22mattempts to save all lines of a multiple-line command in the same history entry. This allows easy re-editing of multi-line commands.
2338DEBUG:root: [1mcompat31[0m
2339DEBUG:root: If set, [1mbash [22mchanges its behavior to that of version 3.1 with respect to quoted arguments to the [1m[[ [22mconditional command's [1m=~ [22moperator and locale-specific string comparison when using the [1m[[ [22mconditional
2340DEBUG:root: command's [1m< [22mand [1m> [22moperators. Bash versions prior to bash-4.1 use ASCII collation and [4mstrcmp[24m(3); bash-4.1 and later use the current locale's collation sequence and [4mstrcoll[24m(3).
2341DEBUG:root: [1mcompat32[0m
2342DEBUG:root: If set, [1mbash [22mchanges its behavior to that of version 3.2 with respect to locale-specific string comparison when using the [1m[[ [22mconditional command's [1m< [22mand [1m> [22moperators (see previous item) and the effect
2343DEBUG:root: of interrupting a command list. Bash versions 3.2 and earlier continue with the next command in the list after one terminates due to an interrupt.
2344DEBUG:root: [1mcompat40[0m
2345DEBUG:root: If set, [1mbash [22mchanges its behavior to that of version 4.0 with respect to locale-specific string comparison when using the [1m[[ [22mconditional command's [1m< [22mand [1m> [22moperators (see description of [1mcompat31[22m) and
2346DEBUG:root: the effect of interrupting a command list. Bash versions 4.0 and later interrupt the list as if the shell received the interrupt; previous versions continue with the next command in the list.
2347DEBUG:root: [1mcompat41[0m
2348DEBUG:root: If set, [1mbash[22m, when in [4mposix[24m mode, treats a single quote in a double-quoted parameter expansion as a special character. The single quotes must match (an even number) and the characters between the sin‐
2349DEBUG:root: gle quotes are considered quoted. This is the behavior of posix mode through version 4.1. The default bash behavior remains as in previous versions.
2350DEBUG:root: [1mcompat42[0m
2351DEBUG:root: If set, [1mbash [22mdoes not process the replacement string in the pattern substitution word expansion using quote removal.
2352DEBUG:root: [1mcompat43[0m
2353DEBUG:root: If set, [1mbash [22mdoes not print a warning message if an attempt is made to use a quoted compound array assignment as an argument to [1mdeclare[22m, makes word expansion errors non-fatal errors that cause the cur‐
2354DEBUG:root: rent command to fail (the default behavior is to make them fatal errors that cause the shell to exit), and does not reset the loop state when a shell function is executed (this allows [1mbreak [22mor [1mcontinue[0m
2355DEBUG:root: in a shell function to affect loops in the caller's context).
2356DEBUG:root: [1mcomplete_fullquote[0m
2357DEBUG:root: If set, [1mbash [22mquotes all shell metacharacters in filenames and directory names when performing completion. If not set, [1mbash [22mremoves metacharacters such as the dollar sign from the set of characters
2358DEBUG:root: 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 expand to direc‐
2359DEBUG:root: tories will not be quoted; however, any dollar signs appearing in filenames will not be quoted, either. This is active only when bash is using backslashes to quote completed filenames. This variable
2360DEBUG:root: is set by default, which is the default bash behavior in versions through 4.2.
2361DEBUG:root: [1mcompletion_strip_exe[0m
2362DEBUG:root: If set, whenever bash sees [4mfoo.exe[24m during completion, it checks if [4mfoo[24m is the same file and strips the suffix.
2363DEBUG:root: [1mdirexpand[0m
2364DEBUG:root: If set, [1mbash [22mreplaces directory names with the results of word expansion when performing filename completion. This changes the contents of the readline editing buffer. If not set, [1mbash [22mattempts to
2365DEBUG:root: preserve what the user typed.
2366DEBUG:root: [1mdirspell[0m
2367DEBUG:root: If set, [1mbash [22mattempts spelling correction on directory names during word completion if the directory name initially supplied does not exist.
2368DEBUG:root: [1mdotglob [22mIf set, [1mbash [22mincludes filenames beginning with a `.' in the results of pathname expansion.
2369DEBUG:root: [1mexecfail[0m
2370DEBUG:root: If set, a non-interactive shell will not exit if it cannot execute the file specified as an argument to the [1mexec [22mbuiltin command. An interactive shell does not exit if [1mexec [22mfails.
2371DEBUG:root: [1mexpand_aliases[0m
2372DEBUG:root: If set, aliases are expanded as described above under [1mALIASES[22m. This option is enabled by default for interactive shells.
2373DEBUG:root: [1mextdebug[0m
2374DEBUG:root: If set at shell invocation, arrange to execute the debugger profile before the shell starts, identical to the [1m--debugger [22moption. If set after invocation, behavior intended for use by debuggers is en‐
2375DEBUG:root: abled:
2376DEBUG:root: [1m1. [22mThe [1m-F [22moption to the [1mdeclare [22mbuiltin displays the source file name and line number corresponding to each function name supplied as an argument.
2377DEBUG:root: [1m2. [22mIf the command run by the [1mDEBUG [22mtrap returns a non-zero value, the next command is skipped and not executed.
2378DEBUG:root: [1m3. [22mIf the command run by the [1mDEBUG [22mtrap returns a value of 2, and the shell is executing in a subroutine (a shell function or a shell script executed by the [1m. [22mor [1msource [22mbuiltins), the shell simu‐
2379DEBUG:root: lates a call to [1mreturn[22m.
2380DEBUG:root: [1m4. BASH_ARGC [22mand [1mBASH_ARGV [22mare updated as described in their descriptions above.
2381DEBUG:root: [1m5. [22mFunction tracing is enabled: command substitution, shell functions, and subshells invoked with [1m( [4m[22mcommand[24m [1m) [22minherit the [1mDEBUG [22mand [1mRETURN [22mtraps.
2382DEBUG:root: [1m6. [22mError tracing is enabled: command substitution, shell functions, and subshells invoked with [1m( [4m[22mcommand[24m [1m) [22minherit the [1mERR [22mtrap.
2383DEBUG:root: [1mextglob [22mIf set, the extended pattern matching features described above under [1mPathname Expansion [22mare enabled.
2384DEBUG:root: [1mextquote[0m
2385DEBUG:root: If set, [1m$[22m'[4mstring[24m' and [1m$[22m"[4mstring[24m" quoting is performed within [1m${[4m[22mparameter[24m[1m} [22mexpansions enclosed in double quotes. This option is enabled by default.
2386DEBUG:root: [1mfailglob[0m
2387DEBUG:root: If set, patterns which fail to match filenames during pathname expansion result in an expansion error.
2388DEBUG:root: [1mforce_fignore[0m
2389DEBUG:root: If set, the suffixes specified by the [1mFIGNORE [22mshell variable cause words to be ignored when performing word completion even if the ignored words are the only possible completions. See [1mSHELL VARIABLES[0m
2390DEBUG:root: above for a description of [1mFIGNORE[22m. This option is enabled by default.
2391DEBUG:root: [1mglobasciiranges[0m
2392DEBUG:root: If set, range expressions used in pattern matching bracket expressions (see [1mPattern Matching [22mabove) behave as if in the traditional C locale when performing comparisons. That is, the current locale's
2393DEBUG:root: collating sequence is not taken into account, so [1mb [22mwill not collate between [1mA [22mand [1mB[22m, and upper-case and lower-case ASCII characters will collate together.
2394DEBUG:root: [1mglobstar[0m
2395DEBUG:root: If set, the pattern [1m** [22mused in a pathname expansion context will match all files and zero or more directories and subdirectories. If the pattern is followed by a [1m/[22m, only directories and subdirectories
2396DEBUG:root: match.
2397DEBUG:root: [1mgnu_errfmt[0m
2398DEBUG:root: If set, shell error messages are written in the standard GNU error message format.
2399DEBUG:root: [1mhistappend[0m
2400DEBUG:root: If set, the history list is appended to the file named by the value of the [1mHISTFILE [22mvariable when the shell exits, rather than overwriting the file.
2401DEBUG:root: [1mhistreedit[0m
2402DEBUG:root: If set, and [1mreadline [22mis being used, a user is given the opportunity to re-edit a failed history substitution.
2403DEBUG:root: [1mhistverify[0m
2404DEBUG:root: If set, and [1mreadline [22mis being used, the results of history substitution are not immediately passed to the shell parser. Instead, the resulting line is loaded into the [1mreadline [22mediting buffer, allowing
2405DEBUG:root: further modification.
2406DEBUG:root: [1mhostcomplete[0m
2407DEBUG:root: If set, and [1mreadline [22mis being used, [1mbash [22mwill attempt to perform hostname completion when a word containing a [1m@ [22mis being completed (see [1mCompleting [22munder [1mREADLINE [22mabove). This is enabled by default.
2408DEBUG:root: [1mhuponexit[0m
2409DEBUG:root: If set, [1mbash [22mwill send [1mSIGHUP [22mto all jobs when an interactive login shell exits.
2410DEBUG:root: [1minherit_errexit[0m
2411DEBUG:root: If set, command substitution inherits the value of the [1merrexit [22moption, instead of unsetting it in the subshell environment. This option is enabled when [4mposix[24m [4mmode[24m is enabled.
2412DEBUG:root: [1minteractive_comments[0m
2413DEBUG:root: If set, allow a word beginning with [1m# [22mto cause that word and all remaining characters on that line to be ignored in an interactive shell (see [1mCOMMENTS [22mabove). This option is enabled by default.
2414DEBUG:root: [1mlastpipe[0m
2415DEBUG:root: If set, and job control is not active, the shell runs the last command of a pipeline not executed in the background in the current shell environment.
2416DEBUG:root: [1mlithist [22mIf set, and the [1mcmdhist [22moption is enabled, multi-line commands are saved to the history with embedded newlines rather than using semicolon separators where possible.
2417DEBUG:root: [1mlogin_shell[0m
2418DEBUG:root: The shell sets this option if it is started as a login shell (see [1mINVOCATION [22mabove). The value may not be changed.
2419DEBUG:root: [1mmailwarn[0m
2420DEBUG:root: If set, and a file that [1mbash [22mis checking for mail has been accessed since the last time it was checked, the message ``The mail in [4mmailfile[24m has been read'' is displayed.
2421DEBUG:root: [1mno_empty_cmd_completion[0m
2422DEBUG:root: If set, and [1mreadline [22mis being used, [1mbash [22mwill not attempt to search the [1mPATH [22mfor possible completions when completion is attempted on an empty line.
2423DEBUG:root: [1mnocaseglob[0m
2424DEBUG:root: If set, [1mbash [22mmatches filenames in a case-insensitive fashion when performing pathname expansion (see [1mPathname Expansion [22mabove).
2425DEBUG:root: [1mnocasematch[0m
2426DEBUG:root: If set, [1mbash [22mmatches patterns in a case-insensitive fashion when performing matching while executing [1mcase [22mor [1m[[ [22mconditional commands, when performing pattern substitution word expansions, or when fil‐
2427DEBUG:root: tering possible completions as part of programmable completion.
2428DEBUG:root: [1mnullglob[0m
2429DEBUG:root: If set, [1mbash [22mallows patterns which match no files (see [1mPathname Expansion [22mabove) to expand to a null string, rather than themselves.
2430DEBUG:root: [1mprogcomp[0m
2431DEBUG:root: If set, the programmable completion facilities (see [1mProgrammable Completion [22mabove) are enabled. This option is enabled by default.
2432DEBUG:root: [1mpromptvars[0m
2433DEBUG:root: If set, prompt strings undergo parameter expansion, command substitution, arithmetic expansion, and quote removal after being expanded as described in [1mPROMPTING [22mabove. This option is enabled by de‐
2434DEBUG:root: fault.
2435DEBUG:root: [1mrestricted_shell[0m
2436DEBUG:root: The shell sets this option if it is started in restricted mode (see [1mRESTRICTED SHELL [22mbelow). The value may not be changed. This is not reset when the startup files are executed, allowing the startup
2437DEBUG:root: files to discover whether or not a shell is restricted.
2438DEBUG:root: [1mshift_verbose[0m
2439DEBUG:root: If set, the [1mshift [22mbuiltin prints an error message when the shift count exceeds the number of positional parameters.
2440DEBUG:root: [1msourcepath[0m
2441DEBUG:root: If set, the [1msource [22m([1m.[22m) builtin uses the value of [1mPATH [22mto find the directory containing the file supplied as an argument. This option is enabled by default.
2442DEBUG:root: [1mxpg_echo[0m
2443DEBUG:root: If set, the [1mecho [22mbuiltin expands backslash-escape sequences by default.
2444DEBUG:root: [1msuspend [22m[[1m-f[22m]
2445DEBUG:root: Suspend the execution of this shell until it receives a [1mSIGCONT [22msignal. A login shell cannot be suspended; the [1m-f [22moption can be used to override this and force the suspension. The return status is 0 unless
2446DEBUG:root: the shell is a login shell and [1m-f [22mis not supplied, or if job control is not enabled.
2447DEBUG:root: [1mtest [4m[22mexpr[0m
2448DEBUG:root: [1m[ [4m[22mexpr[24m [1m][0m
2449DEBUG:root: Return a status of 0 (true) or 1 (false) depending on the evaluation of the conditional expression [4mexpr[24m. Each operator and operand must be a separate argument. Expressions are composed of the primaries de‐
2450DEBUG:root: scribed above under [1mCONDITIONAL EXPRESSIONS[22m. [1mtest [22mdoes not accept any options, nor does it accept and ignore an argument of [1m-- [22mas signifying the end of options.
2451DEBUG:root: Expressions may be combined using the following operators, listed in decreasing order of precedence. The evaluation depends on the number of arguments; see below. Operator precedence is used when there are
2452DEBUG:root: five or more arguments.
2453DEBUG:root: [1m! [4m[22mexpr[24m True if [4mexpr[24m is false.
2454DEBUG:root: [1m( [4m[22mexpr[24m [1m)[0m
2455DEBUG:root: Returns the value of [4mexpr[24m. This may be used to override the normal precedence of operators.
2456DEBUG:root: [4mexpr1[24m -[1ma [4m[22mexpr2[0m
2457DEBUG:root: True if both [4mexpr1[24m and [4mexpr2[24m are true.
2458DEBUG:root: [4mexpr1[24m -[1mo [4m[22mexpr2[0m
2459DEBUG:root: True if either [4mexpr1[24m or [4mexpr2[24m is true.
2460DEBUG:root: [1mtest [22mand [1m[ [22mevaluate conditional expressions using a set of rules based on the number of arguments.
2461DEBUG:root: 0 arguments
2462DEBUG:root: The expression is false.
2463DEBUG:root: 1 argument
2464DEBUG:root: The expression is true if and only if the argument is not null.
2465DEBUG:root: 2 arguments
2466DEBUG:root: If the first argument is [1m![22m, the expression is true if and only if the second argument is null. If the first argument is one of the unary conditional operators listed above under [1mCONDITIONAL EXPRES‐[0m
2467DEBUG:root: [1mSIONS[22m, 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.
2468DEBUG:root: 3 arguments
2469DEBUG:root: The following conditions are applied in the order listed. If the second argument is one of the binary conditional operators listed above under [1mCONDITIONAL EXPRESSIONS[22m, the result of the expression is
2470DEBUG:root: the result of the binary test using the first and third arguments as operands. The [1m-a [22mand [1m-o [22moperators are considered binary operators when there are three arguments. If the first argument is [1m![22m, the
2471DEBUG:root: value is the negation of the two-argument test using the second and third arguments. If the first argument is exactly [1m( [22mand the third argument is exactly [1m)[22m, the result is the one-argument test of the
2472DEBUG:root: second argument. Otherwise, the expression is false.
2473DEBUG:root: 4 arguments
2474DEBUG:root: If the first argument is [1m![22m, the result is the negation of the three-argument expression composed of the remaining arguments. Otherwise, the expression is parsed and evaluated according to precedence
2475DEBUG:root: using the rules listed above.
2476DEBUG:root: 5 or more arguments
2477DEBUG:root: The expression is parsed and evaluated according to precedence using the rules listed above.
2478DEBUG:root: When used with [1mtest [22mor [1m[[22m, the [1m< [22mand [1m> [22moperators sort lexicographically using ASCII ordering.
2479DEBUG:root: [1mtimes [22mPrint the accumulated user and system times for the shell and for processes run from the shell. The return status is 0.
2480DEBUG:root: [1mtrap [22m[[1m-lp[22m] [[[4marg[24m] [4msigspec[24m ...]
2481DEBUG:root: The command [4marg[24m is to be read and executed when the shell receives signal(s) [4msigspec[24m. If [4marg[24m is absent (and there is a single [4msigspec[24m) or [1m-[22m, each specified signal is reset to its original disposition (the
2482DEBUG:root: value it had upon entrance to the shell). If [4marg[24m is the null string the signal specified by each [4msigspec[24m is ignored by the shell and by the commands it invokes. If [4marg[24m is not present and [1m-p [22mhas been sup‐
2483DEBUG:root: plied, then the trap commands associated with each [4msigspec[24m are displayed. If no arguments are supplied or if only [1m-p [22mis given, [1mtrap [22mprints the list of commands associated with each signal. The [1m-l [22moption
2484DEBUG:root: causes the shell to print a list of signal names and their corresponding numbers. Each [4msigspec[24m is either a signal name defined in <[4msignal.h[24m>, or a signal number. Signal names are case insensitive and the [1mSIG[0m
2485DEBUG:root: prefix is optional.
2486DEBUG:root: If a [4msigspec[24m is [1mEXIT [22m(0) the command [4marg[24m is executed on exit from the shell. If a [4msigspec[24m is [1mDEBUG[22m, the command [4marg[24m is executed before every [4msimple[24m [4mcommand[24m, [4mfor[24m command, [4mcase[24m command, [4mselect[24m command, every
2487DEBUG:root: arithmetic [4mfor[24m command, and before the first command executes in a shell function (see [1mSHELL GRAMMAR [22mabove). Refer to the description of the [1mextdebug [22moption to the [1mshopt [22mbuiltin for details of its effect on
2488DEBUG:root: the [1mDEBUG [22mtrap. If a [4msigspec[24m is [1mRETURN[22m, the command [4marg[24m is executed each time a shell function or a script executed with the [1m. [22mor [1msource [22mbuiltins finishes executing.
2489DEBUG:root: If a [4msigspec[24m is [1mERR[22m, the command [4marg[24m 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 con‐
2490DEBUG:root: ditions. The [1mERR [22mtrap is not executed if the failed command is part of the command list immediately following a [1mwhile [22mor [1muntil [22mkeyword, part of the test in an [4mif[24m statement, part of a command executed in a [1m&&[0m
2491DEBUG:root: or [1m|| [22mlist except the command following the final [1m&& [22mor [1m||[22m, any command in a pipeline but the last, or if the command's return value is being inverted using [1m![22m. These are the same conditions obeyed by the [1mer‐[0m
2492DEBUG:root: [1mrexit [22m([1m-e[22m) option.
2493DEBUG:root: Signals ignored upon entry to the shell cannot be trapped or reset. Trapped signals that are not being ignored are reset to their original values in a subshell or subshell environment when one is created.
2494DEBUG:root: The return status is false if any [4msigspec[24m is invalid; otherwise [1mtrap [22mreturns true.
2495DEBUG:root: [1mtype [22m[[1m-aftpP[22m] [4mname[24m [[4mname[24m ...]
2496DEBUG:root: With no options, indicate how each [4mname[24m would be interpreted if used as a command name. If the [1m-t [22moption is used, [1mtype [22mprints a string which is one of [4malias[24m, [4mkeyword[24m, [4mfunction[24m, [4mbuiltin[24m, or [4mfile[24m if [4mname[24m is an
2497DEBUG:root: alias, shell reserved word, function, builtin, or disk file, respectively. If the [4mname[24m is not found, then nothing is printed, and an exit status of false is returned. If the [1m-p [22moption is used, [1mtype [22meither
2498DEBUG:root: returns the name of the disk file that would be executed if [4mname[24m were specified as a command name, or nothing if ``type -t name'' would not return [4mfile[24m. The [1m-P [22moption forces a [1mPATH [22msearch for each [4mname[24m, even
2499DEBUG:root: if ``type -t name'' would not return [4mfile[24m. If a command is hashed, [1m-p [22mand [1m-P [22mprint the hashed value, which is not necessarily the file that appears first in [1mPATH[22m. If the [1m-a [22moption is used, [1mtype [22mprints all of
2500DEBUG:root: the places that contain an executable named [4mname[24m. This includes aliases and functions, if and only if the [1m-p [22moption is not also used. The table of hashed commands is not consulted when using [1m-a[22m. The [1m-f [22mop‐
2501DEBUG:root: tion suppresses shell function lookup, as with the [1mcommand [22mbuiltin. [1mtype [22mreturns true if all of the arguments are found, false if any are not found.
2502DEBUG:root: [1mulimit [22m[[1m-HSabcdefiklmnpqrstuvxPT [22m[[4mlimit[24m]]
2503DEBUG:root: Provides control over the resources available to the shell and to processes started by it, on systems that allow such control. The [1m-H [22mand [1m-S [22moptions specify that the hard or soft limit is set for the given
2504DEBUG:root: 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 [1m-H [22mnor [1m-S [22mis specified, both the soft and hard limits
2505DEBUG:root: are set. The value of [4mlimit[24m can be a number in the unit specified for the resource or one of the special values [1mhard[22m, [1msoft[22m, or [1munlimited[22m, which stand for the current hard limit, the current soft limit, and no
2506DEBUG:root: limit, respectively. If [4mlimit[24m is omitted, the current value of the soft limit of the resource is printed, unless the [1m-H [22moption is given. When more than one resource is specified, the limit name and unit are
2507DEBUG:root: printed before the value. Other options are interpreted as follows:
2508DEBUG:root: [1m-a [22mAll current limits are reported
2509DEBUG:root: [1m-b [22mThe maximum socket buffer size
2510DEBUG:root: [1m-c [22mThe maximum size of core files created
2511DEBUG:root: [1m-d [22mThe maximum size of a process's data segment
2512DEBUG:root: [1m-e [22mThe maximum scheduling priority ("nice")
2513DEBUG:root: [1m-f [22mThe maximum size of files written by the shell and its children
2514DEBUG:root: [1m-i [22mThe maximum number of pending signals
2515DEBUG:root: [1m-k [22mThe maximum number of kqueues that may be allocated
2516DEBUG:root: [1m-l [22mThe maximum size that may be locked into memory
2517DEBUG:root: [1m-m [22mThe maximum resident set size (many systems do not honor this limit)
2518DEBUG:root: [1m-n [22mThe maximum number of open file descriptors (most systems do not allow this value to be set)
2519DEBUG:root: [1m-p [22mThe pipe size in 512-byte blocks (this may not be set)
2520DEBUG:root: [1m-q [22mThe maximum number of bytes in POSIX message queues
2521DEBUG:root: [1m-r [22mThe maximum real-time scheduling priority
2522DEBUG:root: [1m-s [22mThe maximum stack size
2523DEBUG:root: [1m-t [22mThe maximum amount of cpu time in seconds
2524DEBUG:root: [1m-u [22mThe maximum number of processes available to a single user
2525DEBUG:root: [1m-v [22mThe maximum amount of virtual memory available to the shell and, on some systems, to its children
2526DEBUG:root: [1m-x [22mThe maximum number of file locks
2527DEBUG:root: [1m-P [22mThe maximum number of pseudoterminals
2528DEBUG:root: [1m-T [22mThe maximum number of threads
2529DEBUG:root: If [4mlimit[24m is given, and the [1m-a [22moption is not used, [4mlimit[24m is the new value of the specified resource. If no option is given, then [1m-f [22mis assumed. Values are in 1024-byte increments, except for [1m-t[22m, which is in
2530DEBUG:root: seconds; [1m-p[22m, which is in units of 512-byte blocks; [1m-P[22m, [1m-T[22m, [1m-b[22m, [1m-k[22m, [1m-n[22m, and [1m-u[22m, which are unscaled values; and, when in Posix mode, [1m-c [22mand [1m-f[22m, which are in 512-byte increments. The return status is 0 unless an
2531DEBUG:root: invalid option or argument is supplied, or an error occurs while setting a new limit.
2532DEBUG:root: [1mumask [22m[[1m-p[22m] [[1m-S[22m] [[4mmode[24m]
2533DEBUG:root: The user file-creation mask is set to [4mmode[24m. If [4mmode[24m begins with a digit, it is interpreted as an octal number; otherwise it is interpreted as a symbolic mode mask similar to that accepted by [4mchmod[24m(1). If
2534DEBUG:root: [4mmode[24m is omitted, the current value of the mask is printed. The [1m-S [22moption causes the mask to be printed in symbolic form; the default output is an octal number. If the [1m-p [22moption is supplied, and [4mmode[24m is omit‐
2535DEBUG:root: ted, the output is in a form that may be reused as input. The return status is 0 if the mode was successfully changed or if no [4mmode[24m argument was supplied, and false otherwise.
2536DEBUG:root: [1munalias [22m[-[1ma[22m] [[4mname[24m ...]
2537DEBUG:root: Remove each [4mname[24m from the list of defined aliases. If [1m-a [22mis supplied, all alias definitions are removed. The return value is true unless a supplied [4mname[24m is not a defined alias.
2538DEBUG:root: [1munset [22m[-[1mfv[22m] [-[1mn[22m] [[4mname[24m ...]
2539DEBUG:root: For each [4mname[24m, remove the corresponding variable or function. If the [1m-v [22moption is given, each [4mname[24m refers to a shell variable, and that variable is removed. Read-only variables may not be unset. If [1m-f [22mis
2540DEBUG:root: specified, each [4mname[24m refers to a shell function, and the function definition is removed. If the [1m-n [22moption is supplied, and [4mname[24m is a variable with the [4mnameref[24m attribute, [4mname[24m will be unset rather than the
2541DEBUG:root: variable it references. [1m-n [22mhas no effect if the [1m-f [22moption is supplied. If no options are supplied, each [4mname[24m refers to a variable; if there is no variable by that name, any function with that name is unset.
2542DEBUG:root: Each unset variable or function is removed from the environment passed to subsequent commands. If any of [1mCOMP_WORDBREAKS[22m, [1mRANDOM[22m, [1mSECONDS[22m, [1mLINENO[22m, [1mHISTCMD[22m, [1mFUNCNAME[22m, [1mGROUPS[22m, or [1mDIRSTACK [22mare unset, they lose
2543DEBUG:root: their special properties, even if they are subsequently reset. The exit status is true unless a [4mname[24m is readonly.
2544DEBUG:root: [1mwait [22m[[1m-n[22m] [[4mn[24m [4m...[24m]
2545DEBUG:root: Wait for each specified child process and return its termination status. Each [4mn[24m may be a process ID or a job specification; if a job spec is given, all processes in that job's pipeline are waited for. If [4mn[0m
2546DEBUG:root: is not given, all currently active child processes are waited for, and the return status is zero. If the [1m-n [22moption is supplied, [1mwait [22mwaits for any job to terminate and returns its exit status. If [4mn[24m specifies
2547DEBUG:root: a non-existent process or job, the return status is 127. Otherwise, the return status is the exit status of the last process or job waited for.
2548DEBUG:root:[1mRESTRICTED SHELL[0m
2549DEBUG:root: If [1mbash [22mis started with the name [1mrbash[22m, or the [1m-r [22moption is supplied at invocation, the shell becomes restricted. A restricted shell is used to set up an environment more controlled than the standard shell. It be‐
2550DEBUG:root: haves identically to [1mbash [22mwith the exception that the following are disallowed or not performed:
2551DEBUG:root: • changing directories with [1mcd[0m
2552DEBUG:root: • setting or unsetting the values of [1mSHELL[22m, [1mPATH[22m, [1mENV[22m, or [1mBASH_ENV[0m
2553DEBUG:root: • specifying command names containing [1m/[0m
2554DEBUG:root: • specifying a filename containing a [1m/ [22mas an argument to the [1m. [22mbuiltin command
2555DEBUG:root: • specifying a filename containing a slash as an argument to the [1m-p [22moption to the [1mhash [22mbuiltin command
2556DEBUG:root: • importing function definitions from the shell environment at startup
2557DEBUG:root: • parsing the value of [1mSHELLOPTS [22mfrom the shell environment at startup
2558DEBUG:root: • redirecting output using the >, >|, <>, >&, &>, and >> redirection operators
2559DEBUG:root: • using the [1mexec [22mbuiltin command to replace the shell with another command
2560DEBUG:root: • adding or deleting builtin commands with the [1m-f [22mand [1m-d [22moptions to the [1menable [22mbuiltin command
2561DEBUG:root: • using the [1menable [22mbuiltin command to enable disabled shell builtins
2562DEBUG:root: • specifying the [1m-p [22moption to the [1mcommand [22mbuiltin command
2563DEBUG:root: • turning off restricted mode with [1mset +r [22mor [1mset +o restricted[22m.
2564DEBUG:root: These restrictions are enforced after any startup files are read.
2565DEBUG:root: When a command that is found to be a shell script is executed (see [1mCOMMAND EXECUTION [22mabove), [1mrbash [22mturns off any restrictions in the shell spawned to execute the script.
2566DEBUG:root:[1mSEE ALSO[0m
2567DEBUG:root: [4mBash[24m [4mReference[24m [4mManual[24m, Brian Fox and Chet Ramey
2568DEBUG:root: [4mThe[24m [4mGnu[24m [4mReadline[24m [4mLibrary[24m, Brian Fox and Chet Ramey
2569DEBUG:root: [4mThe[24m [4mGnu[24m [4mHistory[24m [4mLibrary[24m, Brian Fox and Chet Ramey
2570DEBUG:root: [4mPortable[24m [4mOperating[24m [4mSystem[24m [4mInterface[24m [4m(POSIX)[24m [4mPart[24m [4m2:[24m [4mShell[24m [4mand[24m [4mUtilities[24m, IEEE --
2571DEBUG:root: http://pubs.opengroup.org/onlinepubs/9699919799/
2572DEBUG:root: http://tiswww.case.edu/~chet/bash/POSIX -- a description of posix mode
2573DEBUG:root: [4msh[24m(1), [4mksh[24m(1), [4mcsh[24m(1)
2574DEBUG:root: [4memacs[24m(1), [4mvi[24m(1)
2575DEBUG:root: [4mreadline[24m(3)
2576DEBUG:root:[1mFILES[0m
2577DEBUG:root: [4m/bin/bash[0m
2578DEBUG:root: The [1mbash [22mexecutable
2579DEBUG:root: [4m/etc/profile[0m
2580DEBUG:root: The systemwide initialization file, executed for login shells
2581DEBUG:root: [4m~/.bash_profile[0m
2582DEBUG:root: The personal initialization file, executed for login shells
2583DEBUG:root: [4m~/.bashrc[0m
2584DEBUG:root: The individual per-interactive-shell startup file
2585DEBUG:root: [4m~/.bash_logout[0m
2586DEBUG:root: The individual login shell cleanup file, executed when a login shell exits
2587DEBUG:root: [4m~/.inputrc[0m
2588DEBUG:root: Individual [4mreadline[24m initialization file
2589DEBUG:root:[1mAUTHORS[0m
2590DEBUG:root: Brian Fox, Free Software Foundation
2591DEBUG:root: bfox@gnu.org
2592DEBUG:root: Chet Ramey, Case Western Reserve University
2593DEBUG:root: chet.ramey@case.edu
2594DEBUG:root:[1mBUG REPORTS[0m
2595DEBUG:root: If you find a bug in [1mbash, [22myou should report it. But first, you should make sure that it really is a bug, and that it appears in the latest version of [1mbash[22m. The latest version is always available from
2596DEBUG:root: [4mftp://ftp.gnu.org/pub/gnu/bash/[24m.
2597DEBUG:root: Once you have determined that a bug actually exists, use the [4mbashbug[24m command to submit a bug report. If you have a fix, you are encouraged to mail that as well! Suggestions and `philosophical' bug reports may be
2598DEBUG:root: mailed to [4mbug-bash@gnu.org[24m or posted to the Usenet newsgroup [1mgnu.bash.bug[22m.
2599DEBUG:root: ALL bug reports should include:
2600DEBUG:root: The version number of [1mbash[0m
2601DEBUG:root: The hardware and operating system
2602DEBUG:root: The compiler used to compile
2603DEBUG:root: A description of the bug behaviour
2604DEBUG:root: A short script or `recipe' which exercises the bug
2605DEBUG:root: [4mbashbug[24m inserts the first three items automatically into the template it provides for filing a bug report.
2606DEBUG:root: Comments and bug reports concerning this manual page should be directed to [4mchet.ramey@case.edu[24m.
2607DEBUG:root:[1mBUGS[0m
2608DEBUG:root: It's too big and too slow.
2609DEBUG:root: There are some subtle differences between [1mbash [22mand traditional versions of [1msh[22m, mostly because of the [1mPOSIX [22mspecification.
2610DEBUG:root: Aliases are confusing in some uses.
2611DEBUG:root: Shell builtin commands and functions are not stoppable/restartable.
2612DEBUG:root: Compound commands and command sequences of the form `a ; b ; c' are not handled gracefully when process suspension is attempted. When a process is stopped, the shell immediately executes the next command in the se‐
2613DEBUG:root: quence. It suffices to place the sequence of commands between parentheses to force it into a subshell, which may be stopped as a unit.
2614DEBUG:root: Array variables may not (yet) be exported.
2615DEBUG:root: There may be only one active coprocess at a time.
2616DEBUG:root:GNU Bash 4.4 2016 August 26 BASH(1)
2617
2618Script done on 2020-04-22 05:41:14-04:00 [COMMAND_EXIT_CODE="0"]