|
-c If the -c option is present, then commands are read from the first non-option argument command_string. If there are arguments after the command_string, the first argument is assigned to $0 and any remaining arguments are assigned to the positional parameters. The assignment to $0 sets the name of the shell, which is used in warning and error messages. |
|
-i If the -i option is present, the shell is interactive. |
|
-l Make bash act as if it had been invoked as a login shell (see INVOCATION below). |
|
-D Print a list of all double-quoted strings preceded by $ on the standard output. These are the strings that are subject to language translation when the current locale is not C or POSIX. This implies the -n option; no commands will be executed. |
|
[-+]O [shopt_option] shopt_option is one of the shell options accepted by the shopt builtin (see SHELL BUILTIN COMMANDS below). If shopt_option is present, -O sets the value of that option; +O unsets it. If shopt_option is not supplied, bash prints the names and values of the shell options accepted by shopt on the standard output. If the invocation option is +O, the output is displayed in a format that may be reused as input. |
|
-- A -- signals the end of options and disables further option processing. Any arguments after the -- are treated as a shell script filename (see below) and arguments passed to that script. An argument of - is equivalent to --. |
|
--debugger Arrange for the debugger profile to be executed before the shell starts. Turns on extended debugging mode (see the description of the extdebug option to the shopt builtin below). |
|
--dump-po-strings Equivalent to -D, but the output is in the GNU gettext “po” (portable object) file format. |
|
--dump-strings Equivalent to -D. |
|
--help Display a usage message on standard output and exit successfully. |
|
--init-file file --rcfile file Execute commands from file instead of the system wide initialization file /etc/bash.bashrc and the standard personal initialization file ~/.bashrc if the shell is interactive (see INVOCATION below). |
|
--login Equivalent to -l. |
|
--noediting Do not use the GNU readline library to read command lines when the shell is interactive. |
|
--noprofile Do not read either the system-wide startup file /etc/profile or any of the personal initialization files ~/.bash_profile, ~/.bash_login, or ~/.profile. By default, bash reads these files when it is invoked as a login shell (see INVOCATION below). |
|
--norc Do not read and execute the system wide initialization file /etc/bash.bashrc and the personal initialization file ~/.bashrc if the shell is interactive. This option is on by default if the shell is invoked as sh. |
|
--posix Enable posix mode; change the behavior of bash where the default operation differs from the POSIX standard to match the standard. |
|
--restricted The shell becomes restricted (see RESTRICTED SHELL below). |
|
--verbose Equivalent to -v. |
|
--version Show version information for this instance of bash on the standard output and exit successfully. |
|
declare -a name (see SHELL BUILTIN COMMANDS below). declare -a name[subscript] is also accepted; the subscript is ignored. |
|
-A action
|
|
+B option or disable brace expansion with the +B option to the set command (see SHELL BUILTIN COMMANDS below) for strict sh compatibility. |
|
After word splitting, unless the -f option has been set, bash scans each word for the characters *, ?, and |
|
-v varname True if the shell variable varname is set (has been assigned a value). If varname is an indexed array variable name subscripted by @ or *, this returns true if the array has any set elements. If varname is an associative array variable name subscripted by @ or *, this returns true if an element with that key is set. |
|
-R varname True if the shell variable varname is set and is a name reference. |
|
-z string True if the length of string is zero. |
|
file1 -ef file2 True if file1 and file2 refer to the same device and inode numbers. |
|
file1 -nt file2 True if file1 is newer (according to modification date) than file2, or if file1 exists and file2 does not. |
|
file1 -ot file2 True if file1 is older than file2, or if file2 exists and file1 does not. |
|
OP is one of -eq, -ne, -lt, -le, -gt, or -ge. These arithmetic binary operators return true if arg1 is equal to, not equal to, less than, less than or equal to, greater than, or greater than or equal to arg2, respectively. arg1 and arg2 may be positive or negative integers. When used with the [[ command, arg1 and arg2 are evaluated as arithmetic expressions (see ARITHMETIC EVALUATION above). Since the expansions the [[ command performs on arg1 and arg2 can potentially result in empty strings, arithmetic expression evaluation treats those as expressions that evaluate to 0. |
|
-b option to the set builtin command is enabled, bash reports status changes immediately. Bash executes any trap on SIGCHLD for each child that terminates. |
|
The bind -V command lists the current readline variable names and values (see SHELL BUILTIN COMMANDS below). |
|
First, bash performs the actions specified by the compspec. This only returns matches which are prefixes of the word being completed. When the -f or -d option is used for filename or directory name completion, bash uses the shell variable FIGNORE to filter the matches. |
|
After these matches have been generated, bash executes any shell function or command specified with the -F and -C options. When the command or function is invoked, bash assigns values to the COMP_LINE, COMP_POINT, COMP_KEY, and COMP_TYPE variables as described above under Shell Variables. If a shell function is being invoked, bash also sets the COMP_WORDS and COMP_CWORD variables. When the function or command is invoked, 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. There is no filtering of the generated completions against the word being completed; the function or command has complete freedom in generating the matches and they do not need to match a prefix of the word. Any function specified with -F is invoked first. The function may use any of the shell facilities, including the compgen and compopt builtins described below, to generate the matches. It must put the possible completions in the COMPREPLY array variable, one per array element. Next, any command specified with the -C option is invoked in an environment equivalent to command substitution. It should print a list of completions, one per line, to the standard output. Backslash will escape a newline, if necessary. These are added to the set of possible completions. |
|
Finally, programmable completion adds any prefix and suffix specified with the -P and -S options, respectively, to each completion, and returns the result to readline as the list of possible completions. |
|
History expansion is enabled by default for interactive shells, and can be disabled using the +H option to the set builtin command (see SHELL BUILTIN COMMANDS below). Non-interactive shells do not perform history expansion by default, but it can be enabled with “set -H”. |
|
History expansion is enabled by default for interactive shells, and can be disabled using the +H option to the set builtin command (see SHELL BUILTIN COMMANDS below). Non-interactive shells do not perform history expansion by default, but it can be enabled with “set -H”. |
|
-m keymap
|
|
-S
|
|
-u function
|
|
-x keyseq[: ]shell-command
|
|
-X
|
|
The -L option forces cd to follow symbolic links by resolving the link after processing instances of .. in dir. If .. appears in dir, cd processes it by removing the immediately previous pathname component from dir, back to a slash or the beginning of dir, and verifying that the portion of dir it has processed to that point is still a valid directory name after removing the pathname component. If it is not a valid directory name, cd returns a non-zero status. If neither -L nor -P is supplied, cd behaves as if -L had been supplied. |
|
On systems that support it, the -@ option presents the extended attributes associated with a file as a directory. |
|
If either the -V or -v option is supplied, command prints a description of command. The -v option displays a single word indicating the command or filename used to invoke command; the -V option produces a more verbose description. |
|
|
|
|
-F function
|
|
-G globpat
|
|
-W wordlist
|
|
-o option-name
|
|
The -D option indicates that other supplied options should apply to the “default” command completion; the -E option indicates that other supplied options should apply to “empty” command completion; and the -I option indicates that other supplied options should apply to completion on the initial word on the line. These are determined in the same way as the complete builtin. If multiple options are supplied, the -D option takes precedence over -E, and both take precedence over -I. |
|
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. |
|
**+**n
|
|
**-**n
|
|
If the -h option is supplied, disown does not remove the jobs corresponding to each id from the jobs table, but rather marks them so the shell does not send SIGHUP to the job if the shell receives a SIGHUP. |
|
-d offset
-d start-end
|
|
-w
|
|
-s
|
|
Send the signal specified by sigspec or signum to the processes named by each id. Each id may be a job specification jobspec or a process ID pid. sigspec is either a case-insensitive signal name such as SIGKILL (with or without the SIG prefix) or a signal number; signum is a signal number. If sigspec is not supplied, then kill sends SIGTERM. |
|
The -l option lists the signal names. If any arguments are supplied when -l is given, kill lists the names of the signals corresponding to the arguments, and the return status is 0. The exit_status argument to -l is a number specifying either a signal number or the exit status of a process terminated by a signal; if it is supplied, kill prints the name of the signal that caused the process to terminate. kill assumes that process exit statuses are greater than 128; anything less than that is a signal number. The -L option is equivalent to -l. |
|
-n
|
|
-O
|
|
**+**n
|
|
-E
|
|
-N nchars
|
|
-e
|
|
-B
|
|
-C
|
|
-P
|
|
-T
|
|
-
|
|
-q
|
|
-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 executable file, respectively. If the name is not found, type prints nothing and returns a non-zero exit status. |
|
If the -p option is used, type either returns the pathname of the executable file that would be found by searching $PATH for 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 name is present in the table of hashed commands, -p and -P print the hashed value, which is not necessarily the file that appears first in PATH. |
|
The -H and -S options specify whether the hard or soft limit is set for the given resource. A hard limit cannot be increased by a non-root user once it is set; a soft limit may be increased up to the value of the hard limit. If neither -H nor -S is specified, ulimit sets both the soft and hard limits. |
|
-r option 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 behaves identically to bash with the exception that the following are disallowed or not performed:
These restrictions are enforced after any startup files are read. When a command that is found to be a shell script is executed (see COMMAND EXECUTION above), rbash turns off any restrictions in the shell spawned to execute the script. |
|
compat31
|
|
compat32
|
|
compat40
|
|
compat41
|
|
compat42
|
|
compat43
|
|
compat44
|
|
compat50
|
|
compat51
|
|
compat52
|