-c string If the -c option is present, then commands are read from string. If there are arguments after
the string, they are assigned to the positional parameters, starting with $0.
-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).
-r If the -r option is present, the shell becomes restricted (see RESTRICTED SHELL below).
-s If the -s option is present, or if no arguments remain after option processing, then commands
are read from the standard input. This option allows the positional parameters to be set when
invoking an interactive shell.
-D A list of all double-quoted strings preceded by $ is printed 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, the names and values of the shell options accepted by shopt
are printed 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 filenames and arguments. An argument of - is equivalent to --.
Bash also interprets a number of multi-character options. These options must appear on the command line
before the single-character options to be recognized.
|
Before a command is executed, its input and output may be redirected using a special notation interpreted
by the shell. Redirection may also be used to open and close files for the current shell execution
environment. The following redirection operators may precede or appear anywhere within a simple command
or may follow a command. Redirections are processed in the order they appear, from left to right.
Redirecting Output
Redirection of output causes the file whose name results from the expansion of word to be opened for
writing on file descriptor n, or the standard output (file descriptor 1) if n is not specified. If the
file does not exist it is created; if it does exist it is truncated to zero size.
The general format for redirecting output is:
[n]>word
If the redirection operator is >, and the noclobber option to the set builtin has been enabled, the
redirection will fail if the file whose name results from the expansion of word exists and is a regular
file. If the redirection operator is >|, or the redirection operator is > and the noclobber option to
the set builtin command is not enabled, the redirection is attempted even if the file named by word
exists.
|