/usr/bin/bash: Difference between revisions

Line 1,995: Line 1,995:


;<nowiki>complete [-abcdefgjksuv] [-o comp-option] [-DEI] [-A action] [-G globpat] [-W wordlist]</nowiki>
;<nowiki>complete [-abcdefgjksuv] [-o comp-option] [-DEI] [-A action] [-G globpat] [-W wordlist]</nowiki>
;;<nowiki>[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] name [name ...]</nowiki>
:;<nowiki>[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] name [name ...]</nowiki>
;<nowiki>complete -pr [-DEI] [name ...]</nowiki>
;<nowiki>complete -pr [-DEI] [name ...]</nowiki>
Specify  how arguments to each name should be completed.  If the -p option is supplied, or if no options are supplied, existing completion specifications are printed in a  way  that allows  them  to be reused as input.  The -r option removes a completion specification for each name, or, if no names are supplied, all completion specifications.  The -D option indicates  that  other  supplied options and actions should apply to the ``default'' command completion; that is, completion attempted on a command for which no completion has  previously  been  defined.  The  -E  option  indicates that other supplied options and actions should apply to ``empty'' command completion; that is, completion  attempted  on  a  blank line.  The  -I  option  indicates that other supplied options and actions should apply to completion on the initial non-assignment word on the line, or after  a  command  delimiter such  as  ;  or |, which is usually command name completion.  If multiple options are supplied, the -D option takes precedence over -E, and both take precedence over -I.  If  any of  -D,  -E,  or  -I are supplied, any other name arguments are ignored; these completions only apply to the case specified by the option.
Specify  how arguments to each name should be completed.  If the -p option is supplied, or if no options are supplied, existing completion specifications are printed in a  way  that allows  them  to be reused as input.  The -r option removes a completion specification for each name, or, if no names are supplied, all completion specifications.  The -D option indicates  that  other  supplied options and actions should apply to the ``default'' command completion; that is, completion attempted on a command for which no completion has  previously  been  defined.  The  -E  option  indicates that other supplied options and actions should apply to ``empty'' command completion; that is, completion  attempted  on  a  blank line.  The  -I  option  indicates that other supplied options and actions should apply to completion on the initial non-assignment word on the line, or after  a  command  delimiter such  as  ;  or |, which is usually command name completion.  If multiple options are supplied, the -D option takes precedence over -E, and both take precedence over -I.  If  any of  -D,  -E,  or  -I are supplied, any other name arguments are ignored; these completions only apply to the case specified by the option.
Line 2,002: Line 2,002:


Other  options,  if  specified, have the following meanings.  The arguments to the -G, -W, and -X options (and, if necessary, the -P and -S options) should be quoted to protect them from expansion before the complete builtin is invoked.
Other  options,  if  specified, have the following meanings.  The arguments to the -G, -W, and -X options (and, if necessary, the -P and -S options) should be quoted to protect them from expansion before the complete builtin is invoked.
;;-o comp-option
:;-o comp-option
::The  comp-option  controls  several  aspects of the compspec's behavior beyond the simple generation of completions.  comp-option may be one of:  
::The  comp-option  controls  several  aspects of the compspec's behavior beyond the simple generation of completions.  comp-option may be one of:  
:::bashdefault  
:::bashdefault  
Line 2,020: Line 2,020:
:::plusdirs
:::plusdirs
::::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.
::::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.
;;-A action
:;-A action
::The action may be one of the following to generate a list of possible completions:
::The action may be one of the following to generate a list of possible completions:
:::alias   
:::alias   
Line 2,070: Line 2,070:
:::variable
:::variable
::::Names of all shell variables.  May also be specified as -v.
::::Names of all shell variables.  May also be specified as -v.
;;-C command
:;-C command
::command is executed in a subshell environment, and its output is used as the  possible completions.
::command is executed in a subshell environment, and its output is used as the  possible completions.
;;-F function
:;-F function
::The  shell  function  function is executed in the current shell environment.  When the function is executed, the first argument ($1) is the name of the command whose arguments  are  being  completed,  the second argument ($2) is the word being completed, and the third argument ($3) is the word preceding the word being completed on  the  current command line.  When it finishes, the possible completions are retrieved from the value of the COMPREPLY array variable.
::The  shell  function  function is executed in the current shell environment.  When the function is executed, the first argument ($1) is the name of the command whose arguments  are  being  completed,  the second argument ($2) is the word being completed, and the third argument ($3) is the word preceding the word being completed on  the  current command line.  When it finishes, the possible completions are retrieved from the value of the COMPREPLY array variable.
;;-G globpat
:;-G globpat
::The pathname expansion pattern globpat is expanded to generate the  possible  completions.
::The pathname expansion pattern globpat is expanded to generate the  possible  completions.
;;-P prefix
:;-P prefix
::prefix  is  added at the beginning of each possible completion after all other options have been applied.
::prefix  is  added at the beginning of each possible completion after all other options have been applied.
;;-S suffix
:;-S suffix
::suffix is appended to each possible completion after all other options  have  been applied.
::suffix is appended to each possible completion after all other options  have  been applied.
;;-W wordlist
:;-W wordlist
::The  wordlist  is split using the characters in the IFS special variable as delimiters, and each resultant word is  expanded.  Shell  quoting  is  honored  within wordlist, in order to provide a mechanism for the words to contain shell metacharacters or characters in the value of IFS.  The possible completions are  the  members of the resultant list which match the word being completed.
::The  wordlist  is split using the characters in the IFS special variable as delimiters, and each resultant word is  expanded.  Shell  quoting  is  honored  within wordlist, in order to provide a mechanism for the words to contain shell metacharacters or characters in the value of IFS.  The possible completions are  the  members of the resultant list which match the word being completed.
;;-X filterpat
:;-X filterpat
::filterpat  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 filterpat is removed from the list.  A leading ! in filterpat negates the pattern; in this case, any completion not matching  filterpat  is  removed.
::filterpat  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 filterpat is removed from the list.  A leading ! in filterpat negates the pattern; in this case, any completion not matching  filterpat  is  removed.


Line 2,098: Line 2,098:
;<nowiki>typeset [-aAfFgiIlnrtux] [-p] [name[=value] ...]</nowiki>
;<nowiki>typeset [-aAfFgiIlnrtux] [-p] [name[=value] ...]</nowiki>
Declare variables and/or give them attributes.  If no names are  given  then  display  the values  of  variables.  The -p option will display the attributes and values of each name. When -p is used with name arguments, additional options, other than -f  and  -F,  are  ignored.  When  -p  is  supplied without name arguments, it will display the attributes and values of all variables having the attributes specified by the additional options.  If  no other  options are supplied with -p, declare will display the attributes and values of all shell variables.  The -f option will restrict the display to shell functions.  The -F  option  inhibits  the display of function definitions; only the function name and attributes are printed.  If the extdebug shell option is enabled using shopt, the  source  file  name and  line  number where each name is defined are displayed as well.  The -F option implies -f.  The -g option forces variables to be created or modified at the  global  scope,  even when  declare  is executed in a shell function.  It is ignored in all other cases.  The -I option causes local variables to inherit the attributes (except the nameref attribute) and value  of any existing variable with the same name at a surrounding scope.  If there is no existing variable, the local variable is initially unset.  The following  options  can  be used to restrict output to variables with the specified attribute or to give variables attributes:
Declare variables and/or give them attributes.  If no names are  given  then  display  the values  of  variables.  The -p option will display the attributes and values of each name. When -p is used with name arguments, additional options, other than -f  and  -F,  are  ignored.  When  -p  is  supplied without name arguments, it will display the attributes and values of all variables having the attributes specified by the additional options.  If  no other  options are supplied with -p, declare will display the attributes and values of all shell variables.  The -f option will restrict the display to shell functions.  The -F  option  inhibits  the display of function definitions; only the function name and attributes are printed.  If the extdebug shell option is enabled using shopt, the  source  file  name and  line  number where each name is defined are displayed as well.  The -F option implies -f.  The -g option forces variables to be created or modified at the  global  scope,  even when  declare  is executed in a shell function.  It is ignored in all other cases.  The -I option causes local variables to inherit the attributes (except the nameref attribute) and value  of any existing variable with the same name at a surrounding scope.  If there is no existing variable, the local variable is initially unset.  The following  options  can  be used to restrict output to variables with the specified attribute or to give variables attributes:
;;-a     
:;-a     
:::Each name is an indexed array variable (see Arrays above).
:::Each name is an indexed array variable (see Arrays above).
;;-A
:;-A
::Each name is an associative array variable (see Arrays above).
::Each name is an associative array variable (see Arrays above).
;;-f
:;-f
::Use function names only.
::Use function names only.
;;-i
:;-i
::The variable is treated as an integer; arithmetic evaluation (see ARITHMETIC EVALUATION above) is performed when the variable is assigned a value.
::The variable is treated as an integer; arithmetic evaluation (see ARITHMETIC EVALUATION above) is performed when the variable is assigned a value.
;;-l
:;-l
::When  the  variable is assigned a value, all upper-case characters are converted to lower-case.  The upper-case attribute is disabled.
::When  the  variable is assigned a value, all upper-case characters are converted to lower-case.  The upper-case attribute is disabled.
;;-n
:;-n
::Give each name the nameref attribute, making it a name reference to  another  variable.  That  other  variable is defined by the value of name.  All references, assignments, and attribute modifications to name, except those using or changing  the -n attribute itself, are performed on the variable referenced by name's value.  The nameref attribute cannot be applied to array variables.
::Give each name the nameref attribute, making it a name reference to  another  variable.  That  other  variable is defined by the value of name.  All references, assignments, and attribute modifications to name, except those using or changing  the -n attribute itself, are performed on the variable referenced by name's value.  The nameref attribute cannot be applied to array variables.
;;-r
:;-r
::Make names readonly.  These names cannot then be assigned values by subsequent  assignment statements or unset.
::Make names readonly.  These names cannot then be assigned values by subsequent  assignment statements or unset.
;;-t
:;-t
::Give  each name the trace attribute.  Traced functions inherit the DEBUG and RETURN traps from the calling shell.  The trace attribute has no special meaning for variables.
::Give  each name the trace attribute.  Traced functions inherit the DEBUG and RETURN traps from the calling shell.  The trace attribute has no special meaning for variables.
;;-u
:;-u
::When  the  variable is assigned a value, all lower-case characters are converted to upper-case.  The lower-case attribute is disabled.
::When  the  variable is assigned a value, all lower-case characters are converted to upper-case.  The lower-case attribute is disabled.
;;-x
:;-x
::Mark names for export to subsequent commands via the environment.
::Mark names for export to subsequent commands via the environment.


Line 2,123: Line 2,123:
;<nowiki>dirs [-clpv] [+n] [-n]</nowiki>
;<nowiki>dirs [-clpv] [+n] [-n]</nowiki>
: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 pushd command; the popd command removes entries from the  list.  The current directory is always the first directory in the stack.
: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 pushd command; the popd command removes entries from the  list.  The current directory is always the first directory in the stack.
;;-c
:;-c
::Clears the directory stack by deleting all of the entries.
::Clears the directory stack by deleting all of the entries.
;;-l
:;-l
::Produces a listing using full pathnames; the default listing format uses a tilde to denote the home directory.
::Produces a listing using full pathnames; the default listing format uses a tilde to denote the home directory.
;;-p
:;-p
::Print the directory stack with one entry per line.
::Print the directory stack with one entry per line.
;;-v
:;-v
::Print the directory stack with one entry per line, prefixing each  entry  with  its index in the stack.
::Print the directory stack with one entry per line, prefixing each  entry  with  its index in the stack.
;;+n
:;+n
::Displays  the  nth  entry counting from the left of the list shown by dirs when invoked without options, starting with zero.
::Displays  the  nth  entry counting from the left of the list shown by dirs when invoked without options, starting with zero.
;;-n
:;-n
::Displays the nth entry counting from the right of the list shown by dirs  when  invoked without options, starting with zero.
::Displays the nth entry counting from the right of the list shown by dirs  when  invoked without options, starting with zero.


Line 2,143: Line 2,143:
;<nowiki>echo [-neE] [arg ...]</nowiki>
;<nowiki>echo [-neE] [arg ...]</nowiki>
:Output the args, separated by spaces, followed by a newline.  The return status is  0  unless  a  write  error occurs.  If -n is specified, the trailing newline is suppressed.  If the -e option is given, interpretation of the following  backslash-escaped  characters  is enabled.  The  -E  option disables the interpretation of these escape characters, even on systems where they are interpreted by default.  The xpg_echo shell option may be  used  to dynamically  determine  whether  or  not  echo expands these escape characters by default. echo does not interpret -- to mean the end of options.  echo interprets the following  escape sequences:
:Output the args, separated by spaces, followed by a newline.  The return status is  0  unless  a  write  error occurs.  If -n is specified, the trailing newline is suppressed.  If the -e option is given, interpretation of the following  backslash-escaped  characters  is enabled.  The  -E  option disables the interpretation of these escape characters, even on systems where they are interpreted by default.  The xpg_echo shell option may be  used  to dynamically  determine  whether  or  not  echo expands these escape characters by default. echo does not interpret -- to mean the end of options.  echo interprets the following  escape sequences:
;;\a
:;\a
::alert (bell)
::alert (bell)
;;\b
:;\b
::backspace
::backspace
;;\c
:;\c
::suppress further output
::suppress further output
;;\e
:;\e
;;\E
:;\E
::an escape character
::an escape character
;;\f
:;\f
::form feed
::form feed
;;\n
:;\n
::new line
::new line
;;\r
:;\r
::carriage return
::carriage return
;;\t
:;\t
::horizontal tab
::horizontal tab
;;\v
:;\v
::vertical tab
::vertical tab
;;\\
:;\\
::backslash
::backslash
;;\0nnn
:;\0nnn
::the  eight-bit  character  whose  value is the octal value nnn (zero to three octal digits)
::the  eight-bit  character  whose  value is the octal value nnn (zero to three octal digits)
;;\xHH
:;\xHH
::the eight-bit character whose value is the hexadecimal value HH  (one  or  two  hex digits)
::the eight-bit character whose value is the hexadecimal value HH  (one  or  two  hex digits)
;;\uHHHH
:;\uHHHH
::the  Unicode  (ISO/IEC  10646)  character whose value is the hexadecimal value HHHH (one to four hex digits)
::the  Unicode  (ISO/IEC  10646)  character whose value is the hexadecimal value HHHH (one to four hex digits)
;;\UHHHHHHHH
:;\UHHHHHHHH
::the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value HHHHHHHH (one to eight hex digits)
::the Unicode (ISO/IEC 10646) character whose value is the hexadecimal value HHHHHHHH (one to eight hex digits)


Line 2,222: Line 2,222:
;<nowiki>help [-dms] [pattern]</nowiki>
;<nowiki>help [-dms] [pattern]</nowiki>
:Display  helpful  information about builtin commands.  If pattern is specified, help gives detailed help on all commands matching pattern; otherwise help for all  the  builtins  and shell control structures is printed.
:Display  helpful  information about builtin commands.  If pattern is specified, help gives detailed help on all commands matching pattern; otherwise help for all  the  builtins  and shell control structures is printed.
;;-d
:;-d
::Display a short description of each pattern
::Display a short description of each pattern
;;-m
:;-m
::Display the description of each pattern in a manpage-like format
::Display the description of each pattern in a manpage-like format
;;-s
:;-s
::Display only a short usage synopsis for each pattern
::Display only a short usage synopsis for each pattern


Line 2,263: Line 2,263:
;<nowiki>jobs -x command [ args ... ]</nowiki>
;<nowiki>jobs -x command [ args ... ]</nowiki>
:The first form lists the active jobs.  The options have the following meanings:
:The first form lists the active jobs.  The options have the following meanings:
;;-l
:;-l
::List process IDs in addition to the normal information.
::List process IDs in addition to the normal information.
;;-n
:;-n
::Display  information  only  about  jobs that have changed status since the user was last notified of their status.
::Display  information  only  about  jobs that have changed status since the user was last notified of their status.
;;-p
:;-p
::List only the process ID of the job's process group leader.
::List only the process ID of the job's process group leader.
;;-r
:;-r
::Display only running jobs.
::Display only running jobs.
;;-s
:;-s
::Display only stopped jobs.
::Display only stopped jobs.


Line 2,294: Line 2,294:
;<nowiki>readarray  [-d  delim]  [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]</nowiki>
;<nowiki>readarray  [-d  delim]  [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]</nowiki>
:Read lines from the standard input into the indexed array variable array, or from file descriptor fd if the -u option is supplied.  The variable MAPFILE is the default array.  Options, if supplied, have the following meanings:
:Read lines from the standard input into the indexed array variable array, or from file descriptor fd if the -u option is supplied.  The variable MAPFILE is the default array.  Options, if supplied, have the following meanings:
;;-d
:;-d
::The first character of delim is used to terminate each input line, rather than newline.  If delim is the empty string, mapfile will terminate a line when it reads a NUL character.
::The first character of delim is used to terminate each input line, rather than newline.  If delim is the empty string, mapfile will terminate a line when it reads a NUL character.
;;-n
:;-n
::Copy at most count lines.  If count is 0, all lines are copied.
::Copy at most count lines.  If count is 0, all lines are copied.
;;-O
:;-O
::Begin assigning to array at index origin.  The default index is 0.
::Begin assigning to array at index origin.  The default index is 0.
;;-s
:;-s
::Discard the first count lines read.
::Discard the first count lines read.
;;-t
:;-t
::Remove a trailing delim (default newline) from each line read.
::Remove a trailing delim (default newline) from each line read.
;;-u
:;-u
::Read lines from file descriptor fd instead of the standard input.
::Read lines from file descriptor fd instead of the standard input.
;;-C
:;-C
::Evaluate callback each time quantum lines are read.  The -c option specifies  quantum.
::Evaluate callback each time quantum lines are read.  The -c option specifies  quantum.
;;-c
:;-c
::Specify the number of lines read between each call to callback.
::Specify the number of lines read between each call to callback.


Line 2,319: Line 2,319:
;<nowiki>popd [-n] [+n] [-n]</nowiki>
;<nowiki>popd [-n] [+n] [-n]</nowiki>
:Removes  entries  from  the directory stack.  With no arguments, removes the top directory from the stack, and performs a cd to the new top directory.  Arguments, if supplied,  have the following meanings:
:Removes  entries  from  the directory stack.  With no arguments, removes the top directory from the stack, and performs a cd to the new top directory.  Arguments, if supplied,  have the following meanings:
;;-n
:;-n
::Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.
::Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.
;;+n
:;+n
::Removes the nth entry counting from the left of the list shown  by  dirs,  starting with  zero.  For example: ``popd +0'' removes the first directory, ``popd +1'' the second.
::Removes the nth entry counting from the left of the list shown  by  dirs,  starting with  zero.  For example: ``popd +0'' removes the first directory, ``popd +1'' the second.
;;-n
:;-n
::Removes the nth entry counting from the right of the list shown by  dirs,  starting with  zero.  For  example: ``popd -0'' removes the last directory, ``popd -1'' the next to last.
::Removes the nth entry counting from the right of the list shown by  dirs,  starting with  zero.  For  example: ``popd -0'' removes the last directory, ``popd -1'' the next to last.


Line 2,332: Line 2,332:


:The format is a character string which contains three types of objects: plain  characters, which  are  simply  copied  to standard output, character escape sequences, which are converted and copied to the standard output, and format specifications, each of which  causes printing  of  the  next successive argument.  In addition to the standard printf(1) format specifications, printf interprets the following extensions:
:The format is a character string which contains three types of objects: plain  characters, which  are  simply  copied  to standard output, character escape sequences, which are converted and copied to the standard output, and format specifications, each of which  causes printing  of  the  next successive argument.  In addition to the standard printf(1) format specifications, printf interprets the following extensions:
;;%b
:;%b
::causes printf to expand backslash escape sequences in the corresponding argument in the same way as echo -e.
::causes printf to expand backslash escape sequences in the corresponding argument in the same way as echo -e.
;;%q
:;%q
::causes  printf  to output the corresponding argument in a format that can be reused as shell input.
::causes  printf  to output the corresponding argument in a format that can be reused as shell input.
;;%(datefmt)T
:;%(datefmt)T
::causes printf to output the date-time string resulting from using datefmt as a format  string for strftime(3).  The corresponding argument is an integer representing the number of seconds since the 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 given.  This  is  an exception to the usual printf behavior.
::causes printf to output the date-time string resulting from using datefmt as a format  string for strftime(3).  The corresponding argument is an integer representing the number of seconds since the 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 given.  This  is  an exception to the usual printf behavior.


Line 2,348: Line 2,348:
;<nowiki>pushd [-n] [dir]</nowiki>
;<nowiki>pushd [-n] [dir]</nowiki>
: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, pushd exchanges the top two directories and returns 0, unless the directory stack  is  empty.  Arguments,  if supplied, have the following meanings:
: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, pushd exchanges the top two directories and returns 0, unless the directory stack  is  empty.  Arguments,  if supplied, have the following meanings:
;;-n
:;-n
::Suppresses  the  normal  change of directory when rotating or adding directories to the stack, so that only the stack is manipulated.
::Suppresses  the  normal  change of directory when rotating or adding directories to the stack, so that only the stack is manipulated.
;;+n
:;+n
::Rotates the stack so that the nth directory (counting from the  left  of  the  list shown by dirs, starting with zero) is at the top.
::Rotates the stack so that the nth directory (counting from the  left  of  the  list shown by dirs, starting with zero) is at the top.
;;-n
:;-n
::Rotates  the  stack  so that the nth directory (counting from the right of the list shown by dirs, starting with zero) is at the top.
::Rotates  the  stack  so that the nth directory (counting from the right of the list shown by dirs, starting with zero) is at the top.
;;dir
:;dir
::Adds dir to the directory stack at the top, making it the new current  working  di‐
::Adds dir to the directory stack at the top, making it the new current  working  di‐
rectory as if it had been supplied as the argument to the cd builtin.
rectory as if it had been supplied as the argument to the cd builtin.
Line 2,365: Line 2,365:
;<nowiki>read [-ers] [-a aname] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout]  [-u fd] [name ...]</nowiki>
;<nowiki>read [-ers] [-a aname] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout]  [-u fd] [name ...]</nowiki>
:One  line  is  read from the standard input, or from the file descriptor fd supplied as an argument to the -u option, split into words as described above under Word  Splitting,  and the  first  word is assigned to the first name, the second word to the second name, and so on.  If there are more words than names, the remaining words and their intervening  delimiters  are assigned to the last name.  If there are fewer words read from the input stream than names, the remaining names are assigned empty values.  The characters in IFS are used to  split the line into words using the same rules the shell uses for expansion (described above under Word Splitting).  The backslash character (\) may be used to remove  any  special meaning for the next character read and for line continuation.  Options, if supplied, have the following meanings:
:One  line  is  read from the standard input, or from the file descriptor fd supplied as an argument to the -u option, split into words as described above under Word  Splitting,  and the  first  word is assigned to the first name, the second word to the second name, and so on.  If there are more words than names, the remaining words and their intervening  delimiters  are assigned to the last name.  If there are fewer words read from the input stream than names, the remaining names are assigned empty values.  The characters in IFS are used to  split the line into words using the same rules the shell uses for expansion (described above under Word Splitting).  The backslash character (\) may be used to remove  any  special meaning for the next character read and for line continuation.  Options, if supplied, have the following meanings:
;;-a aname
:;-a aname
::The words are assigned to sequential indices of the array variable aname,  starting at 0.  aname is unset before any new values are assigned.  Other name arguments are ignored.
::The words are assigned to sequential indices of the array variable aname,  starting at 0.  aname is unset before any new values are assigned.  Other name arguments are ignored.
;;-d delim
:;-d delim
::The first character of delim is used to terminate the input line, rather than  newline.  If delim is the empty string, read will terminate a line when it reads a NUL character.
::The first character of delim is used to terminate the input line, rather than  newline.  If delim is the empty string, read will terminate a line when it reads a NUL character.
;;-e     
:;-e     
::If the standard input is coming from a terminal, readline (see READLINE  above)  is used  to  obtain  the line.  Readline uses the current (or default, if line editing was not previously active) editing settings, but uses Readline's  default  filename completion.
::If the standard input is coming from a terminal, readline (see READLINE  above)  is used  to  obtain  the line.  Readline uses the current (or default, if line editing was not previously active) editing settings, but uses Readline's  default  filename completion.
;;-i text
:;-i text
::If  readline is being used to read the line, text is placed into the editing buffer before editing begins.
::If  readline is being used to read the line, text is placed into the editing buffer before editing begins.
;;-n nchars
:;-n nchars
::read returns after reading nchars characters rather than  waiting  for  a  complete line  of input, but honors a delimiter if fewer than nchars characters are read before the delimiter.
::read returns after reading nchars characters rather than  waiting  for  a  complete line  of input, but honors a delimiter if fewer than nchars characters are read before the delimiter.
;;-N nchars
:;-N nchars
::read returns after reading exactly nchars characters rather than waiting for a complete  line of input, unless EOF is encountered or read times out.  Delimiter characters encountered in the input are not treated specially and do not cause read  to return until nchars characters are read.  The result is not split on the characters in IFS; the intent is that the variable is assigned  exactly  the  characters  read (with the exception of backslash; see the -r option below).
::read returns after reading exactly nchars characters rather than waiting for a complete  line of input, unless EOF is encountered or read times out.  Delimiter characters encountered in the input are not treated specially and do not cause read  to return until nchars characters are read.  The result is not split on the characters in IFS; the intent is that the variable is assigned  exactly  the  characters  read (with the exception of backslash; see the -r option below).
;;-p prompt
:;-p prompt
::Display  prompt 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.
::Display  prompt 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.
;;-r
:;-r
::Backslash 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 then be used as a line continuation.
::Backslash 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 then be used as a line continuation.
;;-s
:;-s
::Silent mode.  If input is coming from a terminal, characters are not echoed.
::Silent mode.  If input is coming from a terminal, characters are not echoed.
;;-t timeout
:;-t timeout
::Cause read to time out and return failure if a complete line of input (or a  specified  number  of  characters) is not read within timeout seconds.  timeout may be a decimal number with a fractional portion following the decimal point.  This  option is  only effective if read is reading input from a terminal, pipe, or other special file; it has no effect when reading from regular files.  If read  times  out,  read saves  any  partial  input read into the specified variable name.  If timeout is 0, read returns immediately, without trying to read any data.  The exit status is 0 if input  is available on the specified file descriptor, non-zero otherwise.  The exit status is greater than 128 if the timeout is exceeded.
::Cause read to time out and return failure if a complete line of input (or a  specified  number  of  characters) is not read within timeout seconds.  timeout may be a decimal number with a fractional portion following the decimal point.  This  option is  only effective if read is reading input from a terminal, pipe, or other special file; it has no effect when reading from regular files.  If read  times  out,  read saves  any  partial  input read into the specified variable name.  If timeout is 0, read returns immediately, without trying to read any data.  The exit status is 0 if input  is available on the specified file descriptor, non-zero otherwise.  The exit status is greater than 128 if the timeout is exceeded.
;;-u fd   
:;-u fd   
::Read input from file descriptor fd.
::Read input from file descriptor fd.


Line 2,399: Line 2,399:
;<nowiki>set [+abefhkmnptuvxBCEHPT] [+o option-name] [arg ...]</nowiki>
;<nowiki>set [+abefhkmnptuvxBCEHPT] [+o option-name] [arg ...]</nowiki>
: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 posix mode, only shell variables are listed.  The output is sorted  according  to  the  current locale.  When options are specified, they set or unset shell attributes.  Any arguments remaining after option processing are treated  as  values for the positional parameters and are assigned, in order, to $1, $2, ...  $n.  Options, if specified, have the following meanings:
: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 posix mode, only shell variables are listed.  The output is sorted  according  to  the  current locale.  When options are specified, they set or unset shell attributes.  Any arguments remaining after option processing are treated  as  values for the positional parameters and are assigned, in order, to $1, $2, ...  $n.  Options, if specified, have the following meanings:
;;-a
:;-a
::Each variable or function that is created or modified is given the  export  attribute and marked for export to the environment of subsequent commands.
::Each variable or function that is created or modified is given the  export  attribute and marked for export to the environment of subsequent commands.
;;-b
:;-b
::Report  the  status  of terminated background jobs immediately, rather than before the next primary prompt.  This is effective only when job control is enabled.
::Report  the  status  of terminated background jobs immediately, rather than before the next primary prompt.  This is effective only when job control is enabled.
;;-e
:;-e
::Exit immediately if a pipeline (which may consist of a single simple  command),  a list,  or a compound command (see SHELL GRAMMAR above), exits with a non-zero status.  The shell does not exit if the command that fails is  part  of  the  command list  immediately  following  a while or until keyword, part of the test following the if or elif reserved words, part of any command executed in a && or || list except  the  command following the final && or ||, any command in a pipeline but the last, or if the command's return value is being inverted with !.  If  a  compound command  other  than a subshell returns a non-zero status because a command failed while -e was being ignored, the shell does not exit.  A trap on ERR,  if  set,  is executed before the shell exits.  This option applies to the shell environment and each subshell environment separately (see COMMAND  EXECUTION  ENVIRONMENT  above), and may cause subshells to exit before executing all the commands in the subshell.
::Exit immediately if a pipeline (which may consist of a single simple  command),  a list,  or a compound command (see SHELL GRAMMAR above), exits with a non-zero status.  The shell does not exit if the command that fails is  part  of  the  command list  immediately  following  a while or until keyword, part of the test following the if or elif reserved words, part of any command executed in a && or || list except  the  command following the final && or ||, any command in a pipeline but the last, or if the command's return value is being inverted with !.  If  a  compound command  other  than a subshell returns a non-zero status because a command failed while -e was being ignored, the shell does not exit.  A trap on ERR,  if  set,  is executed before the shell exits.  This option applies to the shell environment and each subshell environment separately (see COMMAND  EXECUTION  ENVIRONMENT  above), and may cause subshells to exit before executing all the commands in the subshell.


::If  a  compound  command or shell function executes in a context where -e is being ignored, none of the commands executed within the  compound  command  or  function body will be affected by the -e setting, even if -e is set and a command returns a failure status.  If a compound command or shell function sets -e  while  executing in  a context where -e is ignored, that setting will not have any effect until the compound command or the command containing the function call completes.
::If  a  compound  command or shell function executes in a context where -e is being ignored, none of the commands executed within the  compound  command  or  function body will be affected by the -e setting, even if -e is set and a command returns a failure status.  If a compound command or shell function sets -e  while  executing in  a context where -e is ignored, that setting will not have any effect until the compound command or the command containing the function call completes.
;;-f
:;-f
::Disable pathname expansion.
::Disable pathname expansion.
;;-h
:;-h
::Remember the location of commands as they are looked up for  execution.  This  is enabled by default.
::Remember the location of commands as they are looked up for  execution.  This  is enabled by default.
;;-k
:;-k
::All  arguments  in the form of assignment statements are placed in the environment for a command, not just those that precede the command name.
::All  arguments  in the form of assignment statements are placed in the environment for a command, not just those that precede the command name.
;;-m
:;-m
::Monitor mode.  Job control is enabled.  This option is on by default for  interactive shells on systems that support it (see JOB CONTROL above).  All processes run in a separate process group.  When a background job completes, the shell prints  a line containing its exit status.
::Monitor mode.  Job control is enabled.  This option is on by default for  interactive shells on systems that support it (see JOB CONTROL above).  All processes run in a separate process group.  When a background job completes, the shell prints  a line containing its exit status.
;;-n
:;-n
::Read  commands  but do not execute them.  This may be used to check a shell script for syntax errors.  This is ignored by interactive shells.
::Read  commands  but do not execute them.  This may be used to check a shell script for syntax errors.  This is ignored by interactive shells.
;;-o option-name
:;-o option-name
::The option-name can be one of the following:
::The option-name can be one of the following:
::allexport
::allexport
Line 2,474: Line 2,474:
:::Same as -x.
:::Same as -x.
::If  -o  is  supplied  with  no  option-name, the values of the current options are printed.  If +o is supplied with no option-name,  a  series  of  set  commands  to recreate the current option settings is displayed on the standard output.
::If  -o  is  supplied  with  no  option-name, the values of the current options are printed.  If +o is supplied with no option-name,  a  series  of  set  commands  to recreate the current option settings is displayed on the standard output.
;;-p
:;-p
::Turn  on privileged mode.  In this mode, the $ENV and $BASH_ENV files are not processed, shell functions are not inherited from the environment, and the SHELLOPTS, BASHOPTS, CDPATH, and GLOBIGNORE variables, if they appear in the environment, are ignored.  If the shell is started with the effective user (group) id not equal  to the  real  user  (group)  id, and the -p option is not supplied, these actions are taken and the effective user id is set to the real user id.  If the -p  option  is supplied  at startup, the effective user id is not reset.  Turning this option off causes the effective user and group ids to be set to the real user and group ids.
::Turn  on privileged mode.  In this mode, the $ENV and $BASH_ENV files are not processed, shell functions are not inherited from the environment, and the SHELLOPTS, BASHOPTS, CDPATH, and GLOBIGNORE variables, if they appear in the environment, are ignored.  If the shell is started with the effective user (group) id not equal  to the  real  user  (group)  id, and the -p option is not supplied, these actions are taken and the effective user id is set to the real user id.  If the -p  option  is supplied  at startup, the effective user id is not reset.  Turning this option off causes the effective user and group ids to be set to the real user and group ids.
;;-t
:;-t
::Exit after reading and executing one command.
::Exit after reading and executing one command.
;;-u
:;-u
::Treat 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 shell prints an error message, and, if not interactive, exits with a non-zero status.
::Treat 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 shell prints an error message, and, if not interactive, exits with a non-zero status.
;;-v
:;-v
::Print shell input lines as they are read.
::Print shell input lines as they are read.
;;-x
:;-x
::After expanding each simple command, for command, case command, select command, or arithmetic for command, display the expanded value of PS4, followed by the command and its expanded arguments or associated word list.
::After expanding each simple command, for command, case command, select command, or arithmetic for command, display the expanded value of PS4, followed by the command and its expanded arguments or associated word list.
;;-B
:;-B
::The shell performs brace expansion (see Brace Expansion above).  This is on by default.
::The shell performs brace expansion (see Brace Expansion above).  This is on by default.
;;-C
:;-C
::If set, bash does not overwrite an existing file with the >, >&, and <>  redirection operators.  This may be overridden when creating output files by using the redirection operator >| instead of >.
::If set, bash does not overwrite an existing file with the >, >&, and <>  redirection operators.  This may be overridden when creating output files by using the redirection operator >| instead of >.
;;-E
:;-E
::If set, any trap on ERR is inherited by shell  functions,  command  substitutions, and commands executed in a subshell environment.  The ERR trap is normally not inherited in such cases.
::If set, any trap on ERR is inherited by shell  functions,  command  substitutions, and commands executed in a subshell environment.  The ERR trap is normally not inherited in such cases.
;;-H
:;-H
::Enable !  style history substitution.  This option is on by default when the shell is interactive.
::Enable !  style history substitution.  This option is on by default when the shell is interactive.
;;-P
:;-P
::If  set, the shell does not resolve symbolic links when executing commands such as cd that change the current working directory.  It  uses  the  physical  directory structure instead.  By default, bash follows the logical chain of directories when performing commands which change the current directory.
::If  set, the shell does not resolve symbolic links when executing commands such as cd that change the current working directory.  It  uses  the  physical  directory structure instead.  By default, bash follows the logical chain of directories when performing commands which change the current directory.
;;-T
:;-T
::If set, any traps on DEBUG and RETURN are inherited by  shell  functions,  command substitutions, and commands executed in a subshell environment.  The DEBUG and RETURN traps are normally not inherited in such cases.
::If set, any traps on DEBUG and RETURN are inherited by  shell  functions,  command substitutions, and commands executed in a subshell environment.  The DEBUG and RETURN traps are normally not inherited in such cases.
;;--
:;--
::If no arguments follow this option, then  the  positional  parameters  are  unset.Otherwise, the positional parameters are set to the args, even if some of them begin with a -.
::If no arguments follow this option, then  the  positional  parameters  are  unset.Otherwise, the positional parameters are set to the args, even if some of them begin with a -.
;;-
:;-
::Signal the end of options, cause all remaining args to be assigned  to  the  positional  parameters.  The -x and -v options are turned off.  If there are no args, the positional parameters remain unchanged.
::Signal the end of options, cause all remaining args to be assigned  to  the  positional  parameters.  The -x and -v options are turned off.  If there are no args, the positional parameters remain unchanged.


Line 2,508: Line 2,508:
;<nowiki>shopt [-pqsu] [-o] [optname ...]</nowiki>
;<nowiki>shopt [-pqsu] [-o] [optname ...]</nowiki>
:Toggle  the  values  of settings controlling optional shell behavior.  The settings can be either those listed below, or, if the -o option is used, those available with the  -o  option  to  the  set builtin command.  With no options, or with the -p option, a list of all settable options is displayed, with an indication of whether or not each is set;  if  optnames  are supplied, the output is restricted to those options.  The -p option causes output to be displayed in a form that may be reused as input.  Other options have the following meanings:
:Toggle  the  values  of settings controlling optional shell behavior.  The settings can be either those listed below, or, if the -o option is used, those available with the  -o  option  to  the  set builtin command.  With no options, or with the -p option, a list of all settable options is displayed, with an indication of whether or not each is set;  if  optnames  are supplied, the output is restricted to those options.  The -p option causes output to be displayed in a form that may be reused as input.  Other options have the following meanings:
;;-s
:;-s
::Enable (set) each optname.
::Enable (set) each optname.
;;-u
:;-u
::Disable (unset) each optname.
::Disable (unset) each optname.
;;-q
:;-q
::Suppresses normal output (quiet mode); the return status indicates whether the optname is set or unset.  If multiple optname arguments are given with -q, the  return status is zero if all optnames are enabled; non-zero otherwise.
::Suppresses normal output (quiet mode); the return status indicates whether the optname is set or unset.  If multiple optname arguments are given with -q, the  return status is zero if all optnames are enabled; non-zero otherwise.
;;-o
:;-o
::Restricts  the  values  of optname to be those defined for the -o option to the set builtin.
::Restricts  the  values  of optname to be those defined for the -o option to the set builtin.


Line 2,521: Line 2,521:
:The return status when listing options is zero if all optnames are enabled, non-zero  otherwise.  When setting or unsetting options, the return status is zero unless an optname is not a valid shell option.
:The return status when listing options is zero if all optnames are enabled, non-zero  otherwise.  When setting or unsetting options, the return status is zero unless an optname is not a valid shell option.


:The list of shopt options is:
:ショップオプションのリストは以下の通り:


;;assoc_expand_once
:;assoc_expand_once
::If set, the shell suppresses multiple evaluation of associative  array  subscripts during arithmetic expression evaluation, while executing builtins that can perform variable assignments, and while executing builtins that perform array  dereferencing.
::設定されている場合、シェルは、算術式評価中、変数代入を実行できるビルドイン実行中、および配列の再参照を実行するビルドイン実行中に、連想配列添え字の多重評価を抑制する。
;;autocd   
:;autocd   
::If  set,  a command name that is the name of a directory is executed as if it were the argument to the cd command.  This option is only used by interactive shells.
::設定された場合、ディレクトリ名であるコマンド名は、あたかもcdコマンドの引数であるかのように実行される。 このオプションは対話型シェルでのみ使用される。
;;cdable_vars
;;cdable_vars
::If set, an argument to the cd builtin command that is not a directory  is  assumed to be the name of a variable whose value is the directory to change to.
::設定された場合、ディレクトリでないcd組み込みコマンドの引数は、変更先のディレクトリを値とする変数名とみなされる。
;;cdspell  
:;cdspell  
::If set, minor errors in the spelling of a directory component in a cd command will be corrected.  The errors checked for are transposed characters, a missing character, and one character too many.  If a correction is found, the corrected filename is printed, and the command proceeds.  This option is  only  used  by  interactive shells.
::設定された場合、cdコマンドのディレクトリ構成要素のスペルにおける軽微なエラーが修正される。 チェックされる誤りは、文字が入れ替わっている、文字が欠けている、 1文字多い、などである。 修正が見つかった場合、修正されたファイル名が表示され、コマンドは続行される。 このオプションは対話型シェルでのみ使用される。
;;checkhash
:;checkhash
::If set, bash checks 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.
::セットされていると、bashはハッシュ・テーブルで見つかったコマンドを実行しようとする前に、そのコマンドが存在するかどうかをチェックする。 ハッシュ化されたコマンドがもはや存在しない場合は、通常のパス検索が実行される。
;;checkjobs
:;checkjobs
::If  set,  bash  lists 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 an intervening command (see JOB CONTROL above).  The shell always postpones exiting if any jobs are stopped.
::設定されている場合、bashは対話型シェルを終了する前に、停止中および実行中のジョブのステータスを一覧表示する。 実行中のジョブがある場合、コマンドを介さずに2回目の終了を試みるまで終了が延期される(上記の[[#JOB CONTROL|JOB CONTROL ]]を参照)。 停止中のジョブがある場合、シェルは常に終了を延期する。
;;checkwinsize
:;checkwinsize
::If set, bash checks the window size after each external (non-builtin) command and, if  necessary, updates the values of LINES and COLUMNS.  This option is enabled by default.
::このオプションを設定すると、bashは外部(ビルトインでない)コマンドを実行するたびにウィンドウ・サイズをチェックし、必要に応じてLINESとCOLUMNSの値を更新する。 このオプションはデフォルトで有効になっている。
;;cmdhist  
:;cmdhist  
::If set, bash attempts to save all lines of a multiple-line command  in  the  same history  entry.  This allows easy re-editing of multi-line commands.  This option is enabled by default, but only has an effect if command history  is  enabled,  as described above under HISTORY.
::これを設定すると、bashは複数行コマンドのすべての行を同じ履歴エントリに保存しようとする。 これにより、複数行コマンドの再編集が容易になる。 このオプションはデフォルトで有効になっているが、上記の「[[#HISTORY|HISTORY ]]」で説明したように、コマンドヒストリが有効になっている場合にのみ効果がある。
;;compat31
:;compat31
;;compat32
:;compat32
;;compat40
:;compat40
;;compat41
:;compat41
;;compat42
:;compat42
;;compat43
:;compat43
;;compat44
:;compat44
::These  control  aspects of the shell's compatibility mode (see SHELL COMPATIBILITY MODE below).
::これらは、シェルの互換モードの側面を制御する(以下の「[[#SHELL COMPATIBILITY MODE|SHELL COMPATIBILITY MODE ]]」を参照)。
;;complete_fullquote
:;complete_fullquote
::If set, bash quotes all shell metacharacters in filenames and directory names when performing completion.  If not set, bash removes metacharacters such as the dollar sign from the set of characters that will be quoted in  completed  filenames  when these metacharacters appear in shell variable references in words to be completed. This means that dollar signs in variable names that expand to directories will not be  quoted;  however,  any dollar signs appearing in filenames will not be quoted, either.  This is active only when bash is using  backslashes  to  quote  completed filenames.  This variable is set by default, which is the default bash behavior in versions through 4.2.
::設定されている場合、bashは補完を実行するときにファイル名とディレクトリ名に含まれるすべてのシェル・メタ文字を引用符で囲む。 設定されていない場合、補完されるファイル名のシェル変数参照にドル記号のようなメタキャラクタがあると、bashはそのメタキャラクタを引用符で囲む文字から除外する。つまり、ディレクトリに展開される変数名のドル記号は引用されないが、ファイル名に現れるドル記号も引用されない。 これは、bashがバックスラッシュを使って補完されたファイル名を引用している場合にのみ有効である。 この変数はデフォルトで設定されており、これは4.2までのバージョンにおけるbashのデフォルトの動作である。


;;direxpand
:;direxpand
::If set, bash replaces directory names with the results of word expansion when performing  filename  completion.  This changes the contents of the readline editing buffer. If not set, bash attempts to preserve what the user typed.
::これを設定すると、bashはファイル名の補完を実行するときに、ディレクトリ名を単語展開の結果に置き換える。 これにより、readline編集バッファの内容が変更される。 設定されていない場合、bashはユーザーが入力した内容を保持しようとする。


;;dirspell
:;dirspell
::If set, bash attempts spelling correction on directory names during  word  completion if the directory name initially supplied does not exist.
::設定すると、最初に与えられたディレクトリ名が存在しない場合、bashは単語補完時にディレクトリ名のスペル修正を試みる。


;;dotglob  
:;dotglob  
::If  set,  bash  includes filenames beginning with a `.' in the results of pathname expansion.  The filenames ``.'' and ``..'' must always  be  matched  explicitly, even if dotglob is set.
::.'で始まるファイル名をパス名の展開結果に含める。 ドットグロブがセットされていても、ファイル名 ``.'' ``...'' は常に明示的にマッチさせる必要がある。


;;execfail
:;execfail
::If set, a non-interactive shell will not exit if it cannot execute the file specified as an argument to the exec builtin command.  An interactive  shell  does  not exit if exec fails.
::設定された場合、非対話型シェルは、exec 組み込みコマンドの引数として指定されたファイルを実行できなくても終了しない。 対話型シェルは、exec に失敗しても終了しない。


;;expand_aliases
:;expand_aliases
::If set, aliases are expanded as described above under ALIASES.  This option is enabled by default for interactive shells.
::設定されている場合、エイリアスは上記の ALIASES で説明されているように展開される。 このオプションは対話型シェルではデフォルトで有効になっている。


;;extdebug
:;extdebug
::If set at shell invocation, or in a shell startup file, arrange to execute the debugger  profile  before  the shell starts, identical to the --debugger option.  If set after invocation, behavior intended for use by debuggers is enabled:
::シェル起動時、またはシェル起動ファイルに設定すると、 --debuggerオプションと同じように、シェル起動前にデバッガ・プロファイルを実行するようにアレンジする。 起動後に設定すると、デバッガが使用することを意図した動作が有効になる:


:::1.    The -F option to the declare builtin displays the source file name and line number corresponding to each function name supplied as an argument.
:::1.    declareビルトインの-Fオプションは、引数として与えられた各関数名に対応するソースファイル名と行番号を表示する。


:::2.    If  the  command  run  by the DEBUG trap returns a non-zero value, the next command is skipped and not executed.
:::2.    DEBUGトラップによって実行されたコマンドがゼロ以外の値を返した場合、次のコマンドはスキップされ実行されない。


:::3.    If the command run by the DEBUG trap returns a value of 2, and the shell is executing  in  a subroutine (a shell function or a shell script executed by the . or source builtins), the shell simulates a call to return.
:::3.    DEBUGトラップによって実行されたコマンドが値2を返し、シェルがサブルーチン(シェル関数または.NETやソース・ビルトインによって実行されるシェル・スクリプト)で実行されている場合、シェルはreturnの呼び出しをシミュレートする。


:::4.    BASH_ARGC and BASH_ARGV are updated  as  described  in  their  descriptions above.
:::4.    BASH_ARGCとBASH_ARGVは、上記の説明に従って更新される。


:::5.    Function  tracing  is  enabled:  command substitution, shell functions, and subshells invoked with ( command ) inherit the DEBUG and RETURN traps.
:::5.    コマンド置換、シェル関数、および ( コマンド ) で呼び出されるサブシェルは、DEBUG および RETURN トラップを継承する。


:::6.    Error tracing is enabled: command substitution, shell functions,  and  sub-shells invoked with ( command ) inherit the ERR trap.
:::6.    コマンド置換、シェル関数、および ( コマンド ) で呼び出されたサブシェルは、ERR トラップを継承する。


;;extglob  
:;extglob  
::If  set, the extended pattern matching features described above under Pathname Expansion are enabled.
::設定すると、上記の「パス名の拡張」で説明した拡張パターンマッチング機能が有効になる。


;;extquote
:;extquote
::If set, $'string' and $"string" quoting is performed  within  ${parameter}  expansions enclosed in double quotes.  This option is enabled by default.
::設定すると、${parameter}を二重引用符で囲んだ展開の中で、$'string'$"string "の引用符付けが行われる。 このオプションはデフォルトで有効になっている。


;;failglob
:;failglob
::If set, patterns which fail to match filenames during pathname expansion result in an expansion error.
::設定すると、パス名展開時にファイル名にマッチしないパターンは展開エラーとなる。


;;force_fignore
:;force_fignore
::If set, the suffixes specified by the FIGNORE shell variable cause words to be ignored  when performing word completion even if the ignored words are the only possible completions.  See SHELL VARIABLES above for a description of FIGNORE.  This option is enabled by default.
::設定されていると、FIGNOREシェル変数で指定された接尾辞は、単語補完を実行するときに、無視された単語が唯一の可能な補完であっても無視される。 FIGNOREについての説明は上記の[[#SHELL VARIABLES|SHELL VARIABLES ]]を参照のこと。  このオプションはデフォルトで有効になっている。


;;globasciiranges
:;globasciiranges
::If  set,  range expressions used in pattern matching bracket expressions (see Pattern Matching above) behave as if in the traditional C locale when performing comparisons.  That is, the current locale's collating sequence is not taken into account, so b will not collate between A and B, and upper-case and lower-case ASCII characters will collate together.
::これを設定すると、パターンマッチングの括弧式で使用される範囲式(上記の [[#Pattern Matching|Pattern Matching ]]を参照)は、比較を実行するときに従来のCロケールのように 動作する。 つまり、現在のロケールの照合順序は考慮されないので、 bはAとBの間で照合されず、大文字と小文字のASCII文字は一緒に照合される。


;;globstar
:;globstar
::If  set,  the pattern ** used in a pathname expansion context will match all files and zero or more directories and subdirectories.  If the pattern is followed by  a /, only directories and subdirectories match.
::設定されている場合、パス名展開コンテキストで使われるパターン ** は、すべてのファイルと0個以上のディレクトリとサブディレクトリにマッチする。 パターンの後に/が続くと、ディレクトリとサブディレクトリにのみマッチする。


;;gnu_errfmt
:;gnu_errfmt
::If set, shell error messages are written in the standard GNU error message format.
::設定すると、シェルのエラーメッセージは標準のGNUエラーメッセージ形式で書かれる。


;;histappend
:;histappend
::If  set,  the history list is appended to the file named by the value of the HISTFILE variable when the shell exits, rather than overwriting the file.
::設定された場合、シェルの終了時に、履歴リストはファイルを上書きするのではなく、HISTFILE変数の値で指定されたファイルに追加される。


;;histreedit
:;histreedit
::If set, and readline is being used, a user is given the opportunity to  re-edit  a failed history substitution.
::readlineが設定され、かつreadlineが使用されている場合、失敗した履歴の置換を再編集する機会がユーザーに与えられる。


;;histverify
:;histverify
::If  set,  and  readline is being used, the results of history substitution are not immediately passed to the shell parser.  Instead, the  resulting  line  is  loaded into the readline editing buffer, allowing further modification.
::セットされていてreadlineが使用されている場合、ヒストリ置換の結果はすぐにシェル・パーサーに渡されない。 その代わりに、結果の行がreadline編集バッファにロードされ、さらに修正できるようになる。


;;hostcomplete
:;hostcomplete
::If  set, and readline is being used, bash will attempt to perform hostname completion when a word containing a @ is being completed (see Completing under  READLINE above).  This is enabled by default.
::readlineが使用されている場合、@を含む単語が補完されると、bashはホスト名の補完を試みる(上記のREADLINEでの補完を参照)。 これはデフォルトで有効になっている。


;;huponexit
:;huponexit
::If set, bash will send SIGHUP to all jobs when an interactive login shell exits.
::設定すると、対話型ログイン・シェルが終了したときに、bashはすべてのジョブにSIGHUPを送信する。


;;inherit_errexit
:;inherit_errexit
::If  set, command substitution inherits the value of the errexit option, instead of unsetting it in the subshell environment.  This option is enabled when posix  mode is enabled.
::このオプションを設定すると、サブシェル環境でerrexitオプショ ンを設定解除する代わりに、コマンド置換がerrexitオプションの値を継承する。 このオプションは、posixモードが有効な場合に有効になる。


;;interactive_comments
:;interactive_comments
::If set, allow a word beginning with # to cause that word and all remaining characters on that line to be ignored in an  interactive  shell  (see  COMMENTS above). This option is enabled by default.
::このオプションが設定されている場合、#で始まる単語を許可すると、その単語とその行の残りのすべての文字が対話型シェルで無視される(上記の[[#COMMENTS|COMMENTS ]]を参照)。このオプションはデフォルトで有効になっている。


;;lastpipe
:;lastpipe
::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.
::設定され、ジョブ制御がアクティブでない場合、シェルは、現在のシェル環境でバックグラウンドで実行されていないパイプラインの最後のコマンドを実行する。


;;lithist
:;lithist
::If set, and the cmdhist option is enabled, multi-line commands are  saved  to  the history with embedded newlines rather than using semicolon separators where possible.
::cmdhist オプションが有効な場合、複数行のコマンドは可能な限りセミコロン区切りではなく、改行を埋め込んで履歴に保存される。


;;localvar_inherit
:;localvar_inherit
::If set, local variables inherit the value and attributes of a variable of the same name  that  exists  at  a  previous  scope  before any new value is assigned.  The nameref attribute is not inherited.
::設定されている場合、ローカル変数は、新しい値が代入される前に、前のスコープに存在する同名の変数の値と属性を継承する。 nameref属性は継承されない。


;;localvar_unset
:;localvar_unset
::If set, calling unset on local variables in previous function scopes marks them so subsequent  lookups find them unset until that function returns. This is identical to the behavior of unsetting local variables at the current function scope.
::セットされている場合、以前の関数スコープにあるローカル変数に対してunsetを呼び出すと、その関数が返されるまでの間、後続のルックアップでunsetが見つかるようにマークされる。これは、現在の関数スコープでローカル変数をアンセットしたときの動作と同じである。


;;login_shell
:;login_shell
::The shell sets this option if it is started  as  a  login  shell  (see  INVOCATION above).  The value may not be changed.
::シェルは、ログイン・シェルとして起動する場合、このオプションを設定する(上記の[[#INVOCATION|INVOCATION ]]を参照)。 この値は変更できない。


;;mailwarn
:;mailwarn
::If set, and a file that bash is checking for mail has been accessed since the last time it was checked, the message ``The mail in mailfile has been read'' is  displayed.
::もしセットされていて、bashがメールをチェックしているファイルが前回チェックしたときからアクセスされていた場合、``The mailfile has been read''というメッセージが表示される。


;;no_empty_cmd_completion
:;no_empty_cmd_completion
::If  set,  and readline is being used, bash will not attempt to search the PATH for possible completions when completion is attempted on an empty line.
::readlineが使用されている場合、空の行で補完を試みても、PATHを検索して補完を試みることはない。


;;nocaseglob
:;nocaseglob
::If set, bash matches filenames in a case-insensitive fashion when performing pathname expansion (see Pathname Expansion above).
::設定すると、bashはパス名展開(上記の[[#Pathname  Expansion|Pathname Expansion ]]を参照)の際に、大文字と小文字を区別せずにファイル名をマッチングする。


;;nocasematch
:;nocasematch
::If set, bash matches patterns in a case-insensitive fashion when performing matching while executing case or [[ conditional commands, when performing pattern  substitution  word expansions, or when filtering possible completions as part of programmable completion.
::設定されていると、bashは大文字小文字を区別せずにパターンをマッチングする。大文字小文字や<nowiki>[[</nowiki> 条件付きコマンドの実行中にマッチングを行う場合、パターン置換の単語展開を行う場合、プログラム可能な補完の一部として可能な補完をフィルタリングする場合などである。


;;nullglob
:;nullglob
::If set, bash allows patterns which match no files (see Pathname  Expansion  above) to expand to a null string, rather than themselves.
::これを設定すると、bashはマッチするファイルがないパターン(上記の[[#Pathname  Expansion|Pathname Expansion ]]を参照)を、それ自身ではなくNULL文字列に展開することができる。


;;progcomp
:;progcomp
::If set, the programmable completion facilities (see Programmable Completion above) are enabled.  This option is enabled by default.
::設定されている場合、プログラマブル補完機能(上記の[[#Programmable Completion|Programmable Completion ]]を参照)が有効になる。 このオプションはデフォルトで有効になっている。


;;progcomp_alias
:;progcomp_alias
::If set, and programmable completion is enabled, bash treats a  command  name  that doesn't  have any completions as a possible alias and attempts alias expansion. If it has an alias, bash attempts programmable completion using the command word  resulting from the expanded alias.
::設定され、プログラム可能な補完が有効になっている場合、bashは補完を持たないコマンド名をエイリアスの可能性があるものとして扱い、エイリアスの展開を試みる。エイリアスを持っている場合、bashは展開されたエイリアスの結果のコマンドワードを使用してプログラマブル補完を試みる。


;;promptvars
:;promptvars
::If  set,  prompt strings undergo parameter expansion, command substitution, arithmetic expansion, and quote removal after being expanded as described in  PROMPTING above.  This option is enabled by default.
::設定されている場合、プロンプト文字列は、上記のPROMPTINGで説明されているように 展開された後に、パラメータ展開、コマンド置換、算術展開、引用符除去を受ける。 このオプションはデフォルトで有効になっている。


;;restricted_shell
:;restricted_shell
::The  shell  sets  this  option if it is started in restricted mode (see RESTRICTED SHELL below).  The value may not be changed.  This is not reset when  the  startup files  are executed, allowing the startup files to discover whether or not a shell is restricted.
::シェルが制限付きモードで起動した場合、このオプションが設定される(下記の[[#RESTRICTED SHELL|RESTRICTED SHELL ]]を参照)。 この値は変更できない。 これは起動ファイルが実行されてもリセットされないので、起動ファイルはシェルが制限されているかどうかを発見することができる。


;;shift_verbose
:;shift_verbose
::If set, the shift builtin prints an error message when the shift count exceeds the number of positional parameters.
::設定されている場合、シフトカウントが位置パラメーターの数を超えると、shift 組み込み関数はエラーメッセージを表示する。


;;sourcepath
:;sourcepath
::If  set,  the source (.) builtin uses the value of PATH to find the directory containing the file supplied as an argument.  This option is enabled by default.
::このオプションを設定すると、source (.) 組み込み関数が PATH の値を使用して、 引数として指定されたファイルを含むディレクトリを検索する。 このオプションはデフォルトで有効になっている。


;;xpg_echo
:;xpg_echo
::If set, the echo builtin expands backslash-escape sequences by default.
::設定すると、echo組み込み関数はデフォルトでバックスラッシュ・エスケープ・シーケンスを展開する。


;<nowikI>suspend [-f]</nowiki>
;<nowikI>suspend [-f]</nowiki>
:Suspend the execution of this shell until it receives a SIGCONT  signal.  A  login  shell cannot  be suspended; the -f option can be used to override this and force the suspension. The return status is 0 unless the shell is a login shell and -f is not supplied, or if job control is not enabled.
:SIGCONT シグナルを受け取るまで、このシェルの実行を一時停止する。 ログインシェルはサスペンドできない。-f オプションを使用すると、これを上書きして強制的にサスペンドできる。シェルがログイン・シェルで -f が指定されていない場合、またはジョブ制御が有効になっていない場合、戻り値は 0 である。


;test expr
;test expr
;<nowiki>[ expr ]</nowiki>
;<nowiki>[ expr ]</nowiki>
:Return  a  status  of 0 (true) or 1 (false) depending on the evaluation of the conditional expression expr.  Each operator and operand must be a separate argument.  Expressions  are composed  of  the  primaries described above under CONDITIONAL EXPRESSIONS.  test does not accept any options, nor does it accept and ignore an argument of -- as signifying the  end of options.
:条件式exprの評価に応じて、0(真)または1(偽)のステータスを返す。 各演算子とオペランドは別々の引数でなければならない。 testはいかなるオプションも受け付けないし、オプションの終了を意味する--という引数も受け付けず無視する。


: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 five or more arguments.
:式は以下の演算子を使って組み合わせることができる。 評価は引数の数に依存する。 演算子の優先順位は、引数が5つ以上ある場合に使用される。
;;! expr  
:;! expr  
::True if expr is false.
::exprがfalseなら真。
;;( expr )
:;( expr )
::Returns  the  value of expr.  This may be used to override the normal precedence of operators.
::expr の値を返す。 これは、演算子の通常の優先順位を上書きするために使われる。
;;expr1 -a expr2
:;expr1 -a expr2
::True if both expr1 and expr2 are true.
::expr1とexpr2の両方が真なら真である。
;;expr1 -o expr2
:;expr1 -o expr2
::True if either expr1 or expr2 is true.
::expr1 または expr2 のどちらかが真なら真。


:test and [ evaluate conditional expressions using a set of rules based on  the  number  of arguments.
:testと<nowiki>[</nowiki> は、引数の数に基づく一連のルールを使って条件式を評価する。


;;0 arguments
:;0 arguments
::The expression is false.
::この表現は偽である。
;;1 argument
:;1 argument
::The expression is true if and only if the argument is not null.
::この式は、引数がNULLでない場合にのみ真となる。
;;2 arguments
:;2 arguments
::If  the first argument is !, 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  CONDITIONAL  EXPRESSIONS, 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.
::最初の引数が! の場合、式は2番目の引数がNULLの場合のみ真となる。 最初の引数が、上記の「条件式」に列挙された単項条件演算子のいずれかである場合、単項テストが真であれば式は真となる。 最初の引数が有効な単項条件演算子でない場合、式は偽となる。
;;3 arguments
:;3 arguments
::The  following  conditions are applied in the order listed.  If the second argument is one of the binary conditional operators listed above under  CONDITIONAL  EXPRESSIONS,  the  result  of  the  expression is the result of the binary test using the first and third arguments as operands.  The -a and -o operators are considered  binary  operators  when  there  are three arguments.  If the first argument is !, the value is the negation of the two-argument test using the  second  and  third  arguments.  If the first argument is exactly ( and the third argument is exactly ), the result is the one-argument test of the second argument.  Otherwise, the  expression is false.
::以下の条件は、列挙された順序で適用される。 第2引数が、上記の「条件式」の項に列挙された二項条件演算子の1つである場合、式の結果は、第1引数と第3引数をオペランドとして使用した二項検定の結果となる。 a演算子と-o演算子は、3つの引数がある場合、二項演算子とみなされる。 第1引数が! の場合、値は、第2引数と第3引数を使った2引数テストの否定となる。 第1引数が正確に(かつ第3引数が正確に)である場合、結果は第2引数の1引数テストとなる。 そうでない場合、式は偽となる。
;;4 arguments
:;4 arguments
::If  the  first  argument is !, 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 using the rules listed above.
::最初の引数が!の場合、結果は残りの引数で構成される3つの引数式の否定となる。 そうでない場合、式はパースされ、上に挙げたルールを使って優先順位に従って評価される。
;;5 or more arguments
:;5 or more arguments
::The  expression  is  parsed  and  evaluated according to precedence using the rules listed above.
::式はパースされ、上記の規則を用いて優先順位に従って評価される。


:When used with test or [, the < and > operators sort lexicographically using ASCII  ordering.
:演算子 < > は、test または [ と一緒に使われると、ASCIIの順序で辞書順にソートされる。


;times   
;times   
:Print  the  accumulated user and system times for the shell and for processes run from the shell.  The return status is 0.
:シェルおよびシェルから実行されたプロセスの累積ユーザー時間および累積システム時間を表示する。 戻り値は 0 である。


;<nowiki>trap [-lp] [[arg] sigspec ...]</nowiki>
;<nowiki>trap [-lp] [[arg] sigspec ...]</nowiki>
:The command arg is to be read and executed when the shell receives signal(s) sigspec.  If arg is absent (and there is a single sigspec) or -, each specified signal is reset to its original disposition (the value it had upon entrance to the shell).  If arg is  the  null string the signal specified by each sigspec is ignored by the shell and by the commands it invokes.  If arg is not present and -p has been supplied, then the trap  commands  associated  with  each  sigspec  are  displayed.  If no arguments are supplied or if only -p is given, trap prints the list of commands associated with each signal.  The -l option causes the  shell  to print a list of signal names and their corresponding numbers.  Each sigspec is either a signal name defined in <signal.h>, or a signal number.  Signal names are  case insensitive and the SIG prefix is optional.
:コマンド arg は、シェルがシグナル sigspec を受け取ったときに読み込まれ、実行される。  arg が存在しない場合 (sigspec が1つの場合) または - の場合、指定された各シグナルは元の値 (シェルに入ったときの値) にリセットされる。 arg が NULL 文字列の場合、各 sigspec で指定されたシグナルは、シェルおよびシェルが呼び出すコマンドによって無視される。 arg が存在せず、-p が供給された場合、各 sigspec に関連付けられたトラップコマンドが表示される。 引数がない場合、または -p だけが与えられた場合、 trap は各シグナルに関連付けられたコマンドのリストを表示する。 lオプションを指定すると、シェルはシグナル名とそれに対応する番号のリストを表示する。 各sigspecは、<signal.h>で定義されているシグナル名かシグナル番号である。 シグナル名は大文字と小文字を区別せず、接頭辞 SIG はオプションである。


:If a sigspec is EXIT (0) the command arg is executed on exit from the shell.  If a sigspec is DEBUG, the command arg is executed before every simple command, for command, case  command,  select command, every arithmetic for command, and before the first command executes in a shell function (see SHELL GRAMMAR above).  Refer to the description of  the  extdebug option  to the shopt builtin for details of its effect on the DEBUG trap.  If a sigspec is RETURN, the command arg is executed each time a shell function or a script  executed  with the . or source builtins finishes executing.
:sigspecがEXIT(0)の場合、コマンドargはシェルからの終了時に実行される。 sigspecがDEBUGの場合、コマンドargは、単純コマンド、forコマンド、caseコマンド、selectコマンド、すべての算術forコマンド、およびシェル関数内で最初のコマンドが実行される前に実行される(上記の[[#SHELL GRAMMAR|SHELL GRAMMAR ]]を参照)。 DEBUGトラップに対する効果の詳細については、shopt組み込みのextdebugオプションの説明を参照のこと。 sigspec RETURN の場合、.source または source 組み込み関数で実行されたシェル関数またはスクリプトが実行を終了するたびに、コマンド arg が実行される。


:If a sigspec is ERR, the command arg is executed whenever a pipeline (which may consist of a single simple command), a list, or a compound command returns a  non-zero  exit  status, subject  to  the following conditions.  The ERR trap is not executed if the failed command is part of the command list immediately following a while or until keyword,  part  of  the test  in an if statement, part of a command executed in a && or || list except the command following the final && or ||, any command in a pipeline but the last, or if the  command's return  value  is being inverted using !. These are the same conditions obeyed by the errexit (-e) option.
:sigspecがERRの場合、パイプライン(単一の単純なコマンドで構成されることもある)、リスト、または複合コマンドが、以下の条件に従って、ゼロ以外の終了ステータスを返すたびに、コマンドargが実行される。 ERR トラップは、失敗したコマンドが while または until キーワードの直後のコマンドリストの一部である場合、if 文のテストの一部である場合、最後の && または || に続くコマンド以外の && または || リストで実行されるコマンドの一部である場合、パイプラインの最後のコマンド以外のコマンドである場合、コマンドの戻り値が これらは、errexit (-e)オプションが従う条件と同じである。


: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.  The return status is false if any sigspec is invalid; otherwise trap returns true.
:シェルに入ったときに無視されたシグナルは、トラップもリセットもできない。 無視されないトラップされたシグナルは、サブシェルまたはサブシェル環境が作成されると、元の値にリセットされる。 sigspecが無効な場合、戻りステータスはfalseになり、そうでなければtrapはtrueを返す。


;<nowiki>type [-aftpP] name [name ...]</nowiki>
;<nowiki>type [-aftpP] name [name ...]</nowiki>
:With  no  options,  indicate how each name would be interpreted if used as a command name. If the -t option is used, type prints a string which is one of alias,  keyword,  function, builtin,  or  file  if  name  is an alias, shell reserved word, function, builtin, or disk file, respectively.  If the name is not found, then nothing is printed, and an exit status of  false is returned.  If the -p option is used, type either returns the name of the disk file that would be executed if name were specified as a command name, or nothing if ``type -t name'' would not return file.  The -P option forces a PATH search for each name, even if ``type -t name'' would not return file.  If a command is hashed, -p and  -P print  the hashed value, which is not necessarily the file that appears first in PATH.  If the -a option is used, type prints all of the places that contain an executable named name.  This includes  aliases and functions, if and only if the -p option is not also used.  The table of hashed commands is not consulted when using -a.  The -f option suppresses  shell  function  lookup,  as with the command builtin.  type returns true if all of the arguments are found, false if any are not found.
:オプションがない場合は、それぞれの名前がコマンド名として使われた場合にどのように解釈されるかを示す。tオプションが使われると、typeは、nameがエイリアス、シェル予約語、関数、組み込み関数、ディスクファイルの場合、それぞれエイリアス、キーワード、関数、組み込み関数、ディスクファイルのいずれかの文字列を表示する。 名前が見つからない場合は何も表示されず、終了ステータスにfalseが返される。 -pオプションが使われた場合、typeはnameがコマンド名として指定された場合 に実行されるディスクファイルの名前を返すか、``type -t name''がfileを返さない場合は何も返さない。 -P オプションをつけると、``type -t name'' file を返さない場合でも、それぞれの名前に対して PATH を検索する。 コマンドがハッシュ化されている場合、-p -P はハッシュ化された値を表示するが、必ずしも PATH で最初に表示されるファイルとは限らない。 -aオプションが使われると、nameという名前の実行ファイルを含むすべての場所を表示する。 これには、-pオプションも使用されていない場合に限り、エイリアスや関数も含まれる。 aを使用する場合、ハッシュ化されたコマンドのテーブルは参照されない。 fオプションは、コマンド組み込み関数と同様にシェル関数の検索を抑制する。 typeは、すべての引数が見つかった場合はtrueを返し、見つからなかった場合はfalseを返す。


;<nowiki>ulimit [-HS] -a</nowiki>
;<nowiki>ulimit [-HS] -a</nowiki>
;<nowiki>ulimit [-HS] [-bcdefiklmnpqrstuvxPRT [limit]]</nowiki>
;<nowiki>ulimit [-HS] [-bcdefiklmnpqrstuvxPRT [limit]]</nowiki>
:Provides control over the resources available to the shell and to processes started by it, on  systems  that allow such control.  The -H and -S options specify that the hard or soft limit is set for the given resource.  A hard limit cannot be increased by a non-root user once  it is set; a soft limit may be increased up to the value of the hard limit.  If neither -H nor -S is specified, both the soft and hard limits are set.  The  value  of  limit can  be a number in the unit specified for the resource or one of the special values hard, soft, or unlimited, which stand for the current hard limit, the current soft limit, and no limit,  respectively.  If limit is omitted, the current value of the soft limit of the resource is printed, unless the -H option is given.  When more than one resource  is  specified,  the  limit  name and unit, if appropriate, are printed before the value.  Other options are interpreted as follows:
:シェルやシェルによって起動されるプロセスが利用可能なリソースを制御する。-Hおよび-Sオプションは、指定されたリソースに対してハードリミットまたはソフトリミットを設定することを指定する。 ハードリミットは、一度設定されると非 root ユーザーが増やすことはできない。 Hも-Sも指定しない場合、ソフトリミットとハードリミットの両方が設定される。 limitの値には、リソースに指定された単位の数値を指定するか、特別な値hard、soft、unlimitedのいずれかを指定する。hardは現在のハードリミット、softは現在のソフトリミット、unlimitedはリミットなしをそれぞれ表す。 limitが省略された場合は、-Hオプションが与えられていない限り、リソースのソフトリミットの現在値が表示される。 複数のリソースを指定した場合は、値の前にリミット名と単位 (適切な場合) が表示される。 その他のオプションは、以下のように解釈される:
;;-a
:;-a
::All current limits are reported; no limits are set
::すべての電流制限を報告する。
;;-b
:;-b
::The maximum socket buffer size
::ソケットバッファの最大サイズ
;;-c
:;-c
::The maximum size of core files created
::作成されるコアファイルの最大サイズ
;;-d
:;-d
::The maximum size of a process's data segment
プロセスのデータセグメントの最大サイズである。
;;-e
:;-e
::The maximum scheduling priority ("nice")
スケジューリング優先度の最大値("nice")。
;;-f
:;-f
::The maximum size of files written by the shell and its children
シェルとその子プロセスが書き込むファイルの最大サイズである。
;;-i
:;-i
::The maximum number of pending signals
::pending シグナルの最大数
;;-k
:;-k
::The maximum number of kqueues that may be allocated
::割り当て可能なkキューの最大数
;;-l
:;-l
::The maximum size that may be locked into memory
::メモリにロックできる最大サイズ
;;-m
:;-m
::The maximum resident set size (many systems do not honor this limit)
::常駐セットの最大サイズ(多くのシステムはこの制限を守らない)
;;-n
:;-n
::The maximum number of open file descriptors (most systems do not allow  this  value to be set)
::開いているファイル記述子の最大数(多くのシステムはこの値の設定を許可しない)
;;-p
:;-p
::The pipe size in 512-byte blocks (this may not be set)
::512バイトブロック単位のパイプサイズ(この値は設定できない場合がある)
;;-q
:;-q
::The maximum number of bytes in POSIX message queues
::POSIXメッセージ・キューの最大バイト数
;;-r
:;-r
::The maximum real-time scheduling priority
::リアルタイム・スケジューリングの最大優先度
;;-s
:;-s
::The maximum stack size
::最大スタックサイズ
;;-t
:;-t
::The maximum amount of cpu time in seconds
::最大CPU時間(秒)
;;-u
:;-u
::The maximum number of processes available to a single user
::1ユーザーが利用可能な最大プロセス数
;;-v
:;-v
::The  maximum  amount of virtual memory available to the shell and, on some systems, to its children
::シェルと、システムによってはその子シェルが利用可能な仮想メモリの最大量
;;-x
:;-x
::The maximum number of file locks
::ファイルロックの最大数
;;-P
:;-P
::The maximum number of pseudoterminals
::疑似端末の最大数
;;-R
:;-R
::The maximum time a real-time process can run before blocking, in microseconds
::リアルタイムプロセスがブロックされるまでに実行できる最大時間(マイクロ秒単位
;;-T
:;-T
::The maximum number of threads
::スレッドの最大数


:If limit is given, and the -a option is not used, limit is the new value of the  specified resource.  If no option is given, then -f is assumed.  Values are in 1024-byte increments, except for -t, which is in seconds; -R, which is in microseconds; -p, which is in units of 512-byte blocks; -P, -T, -b, -k, -n, and -u, which are unscaled values; and, when in posix mode, -c and -f, which are in 512-byte increments.  The return status is 0 unless  an  invalid option or argument is supplied, or an error occurs while setting a new limit.
:limitが与えられ、-aオプションが使われていない場合、 limitは指定されたリソースの新しい値になる。 オプションが与えられていない場合は、-fが仮定される。 ただし、-tは秒単位、-Rはマイクロ秒単位、-pは512バイトブロック単位、 -P、-T、-b、-k、-n、-uはスケールなし、 posixモードでは-cと-fは512バイト単位である。 無効なオプションや引数が与えられるか、新しいリミット値の設定中にエラーが発生しない限り、戻り値は0である。


;<nowiki>umask [-p] [-S] [mode]</nowiki>
;<nowiki>umask [-p] [-S] [mode]</nowiki>
:The  user  file-creation  mask  is set to mode.  If mode 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 chmod(1).  If mode is omitted, the current value of the mask is printed. The -S option causes the mask to be printed in symbolic form; the default output is an octal  number.  If  the -p option is supplied, and mode is omitted, 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 mode argument was supplied, and false otherwise.
:ユーザーファイル作成マスクは mode に設定される。 mode が数字で始まる場合は、8進数として解釈される。そうでない場合は、 chmod(1) が受け付けるものと同様のシンボリック・モード・マスクとして解釈される。 modeが省略された場合、マスクの現在の値が表示される。-Sオプションを指定すると、マスクが記号形式で表示される。 -pオプションが与えられ、modeが省略された場合、入力として再利用可能な形式で出力される。 戻りステータスは、モードの変更に成功した場合、または mode 引数が与えられなかった場合は 0 であり、そうでない場合は false である。


;<nowiki>unalias [-a] [name ...]</nowiki>
;<nowiki>unalias [-a] [name ...]</nowiki>
:Remove  each  name from the list of defined aliases.  If -a is supplied, all alias definitions are removed.  The return value is true unless a  supplied  name  is  not  a  defined alias.
:定義されているエイリアスのリストからそれぞれの名前を削除する。 -aを指定すると、すべてのエイリアス定義が削除される。 与えられた名前が定義されたエイリアスでない限り、戻り値は真である。


;<nowiki>unset [-fv] [-n] [name ...]</nowiki>
;<nowiki>unset [-fv] [-n] [name ...]</nowiki>
:For  each name, remove the corresponding variable or function.  If the -v option is given, each name refers to a shell variable, and that variable is removed.  Read-only variables may not be unset.  If -f is specified, each name refers to a shell function, and the function definition is removed.  If the -n option is supplied, and name is a variable with the nameref attribute,  name will be unset rather than the variable it references.  -n has no effect if the -f option is supplied.  If no options are supplied, each name  refers  to  a variable;  if there is no variable by that name, a function with that name, if any, is unset.  Each unset variable or function is removed from the environment passed to subsequent commands.  If  any  of BASH_ALIASES, BASH_ARGV0, BASH_CMDS, BASH_COMMAND, BASH_SUBSHELL, BASHPIDCOMP_WORDBREAKSDIRSTACKEPOCHREALTIMEEPOCHSECONDSFUNCNAMEGROUPS, HISTCMDLINENORANDOMSECONDS, or SRANDOM are unset, they lose their special properties, even if they are subsequently reset.  The exit status is true unless a name is readonly.
:それぞれの名前に対して、対応する変数または関数を削除する。 -vオプションが指定された場合、各名前はシェル変数を参照し、その変数が削除される。 読み取り専用の変数は設定解除できない。-f を指定すると、各名称はシェル関数を指し、その関数定義が削除される。-n オプションが指定され、name が nameref 属性を持つ変数である場合、name は参照先の変数ではなくアンセットされる。 -nオプションは、-fオプションが与えられている場合には何の効果もない。 その名前の変数がない場合、その名前の関数があればアンセットされる。 アンセットされた変数や関数は、後続のコマンドに渡される環境から取り除かれる。 '''BASH_ALIASES'''、'''BASH_ARGV0'''、'''BASH_CMDS'''、'''BASH_COMMAND'''、'''BASH_SUBSHELL'''、'''BASHPID'''、'''COMP_WORDBREAKS'''、'''DIRSTACK'''、'''EPOCHREALTIME'''、'''EPOCHSECONDS'''、'''FUNCNAME'''、'''GROUPS'''、'''HISTCMD'''、'''LINENO'''、'''RANDOM'''、'''SECONDS'''、'''SRANDOM'''のどれかがアンセットされると、たとえその後にリセットされたとしても、特別なプロパティは失われる。 名前が読み取り専用でない限り、終了ステータスは真である。


;<nowiki>wait [-fn] [-p varname] [id ...]</nowiki>
;<nowiki>wait [-fn] [-p varname] [id ...]</nowiki>
:Wait for each specified child process and return its termination status.  Each id 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 id is not given, wait waits for all running background jobs and the last-executed process substitution, if its process id is the same as $!,  and  the return status is zero.  If the -n option is supplied, wait waits for a single job from the list of ids or, if no ids are supplied, any job, to complete and returns its exit  status. If none of the supplied arguments is a child of the shell, or if no arguments are supplied and the shell has no unwaited-for children, the exit status is 127.  If the -p option  is supplied,  the  process or job identifier of the job for which the exit status is returned is assigned to the variable varname named by the option argument.  The  variable  will  be unset  initially,  before  any assignment.  This is useful only when the -n option is supplied.  Supplying the -f option, when job control is enabled, forces wait to wait  for  id to terminate before returning its status, instead of returning when it changes status.  If id specifies a non-existent process or job, the return status is 127.  Otherwise, the  return status is the exit status of the last process or job waited for.
:指定された各子プロセスを待ち、その終了ステータスを返す。 各idは、プロセスIDまたはジョブ指定である。ジョブ指定が与えられた場合、 そのジョブのパイプラインにある全てのプロセスが待たれる。 idが与えられない場合、waitは実行中のすべてのバックグラウンド・ジョブと、 最後に実行されたプロセス置換(そのプロセスidが$! -nオプションが与えられた場合、waitはidのリストから1つのジョブ、またはidが与えられない場合は任意のジョブの完了を待ち、その終了ステータスを返す。与えられた引数のどれもがシェルの子でない場合、または引数が与えられず、シェルに待機していない子がない場合、終了ステータスは127である。 -p オプションが与えられると、終了ステータスが返されたジョブのプロセスまたはジョブ識別子が、 オプション引数で指定された変数 varname に代入される。 この変数は、代入の前に初期状態では設定されていない。 これは、-n オプションが指定されている場合にのみ有効である。 ジョブ制御が有効になっているときに -f オプションを指定すると、id がステータスを変更したときに返すのではなく、id が終了するのを待ってからステータスを返すようになる。 idが存在しないプロセスまたはジョブを指定した場合、返されるステータスは127である。 それ以外の場合は、最後に待機したプロセスまたはジョブの終了ステータスが返される。


== SHELL COMPATIBILITY MODE ==
== SHELL COMPATIBILITY MODE ==