Table 2.1 and Table 2.2 list the options you can use when invoking bash 2.x and 1.x, respectively. The multicharacter options must appear on the command line before the single-character options. In addition to these, any set option can be used on the command line; see Table 2.6. Login shells are usually invoked with the options -i (interactive), -s (read from standard input), and -m (enable job control).
Table B-1. Command-Line Options
Commands are read from string, if present. Any arguments after string are interpreted as positional parameters, starting with $0.
A list of all double-quoted strings preceded by $ is printed on the standard ouput. These are the strings that are subject to language translation when the current locale is not C or POSIX. This also turns on the -n option.
Interactive shell. Ignore signals TERM, INT, and QUIT. With job control in effect, TTIN, TTOU, and TSTP are also ignored.
Takes the same arguments as set -o.
Read commands from the standard input. If an argument is given to bash, this flag takes precedence (i.e., the argument won’t be treated as a script name and standard input will be read).
Restricted shell. See Chapter 10.
Signals the end of options and disables further option processing. Any options after this are treated as filenames and arguments. -- is synonymous with -.
Does the same as -D.