bash Invocation
Here are the options you can use when invoking current versions of
bash. The multi-character options must appear on the
command line before the single-character options. Login shells are usually
invoked with the options -i
(interactive), -s (read from standard
input), and -m (enable job
control).
In addition to these listed in Table A-1, any set option can be used on the
command line; see the “set Options” section later in this chapter. In
particular, the -n option is invaluable
for syntax checking, see Testing bash Script Syntax.
Table A-1. Command-line options to bash
Option | Meaning |
|---|---|
| Commands are read from
|
| 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 also turns on the |
| Interactive shell. Ignores signals |
| Makes bash act as if invoked as a login shell. |
| Takes the same arguments as |
|
|
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access