|
OPTIONS
Up
Next
Previous
OPTIONS
In addition to the single-character shell options documented in the
description of the set builtin command, bash
interprets the following options when it is invoked:
-
.BI -c "\| string\^"
-
If the
-c
option is present, then commands are read from
.IR string .
If there are arguments after the
.IR string ,
they are assigned to the positional parameters, starting with
.BR $0 .
-
-r
-
If the
-r
option is present, the shell becomes
restricted
(see
.SM
"RESTRICTED SHELL"
below).
-
-i
-
If the
-i
option is present, the shell is
.IR interactive .
-
-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 $\fP
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 implies the -n\fP option; no commands will be executed.
-
--
-
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 --\fP.
Bash
also interprets a number of multi-character options.
These options must appear on the command line before the
single-character options in order for them to be recognized.
-
--dump-po-strings
-
Equivalent to -D\fP, but the output is in the GNU gettext\fP
po\fP (portable object) file format.
-
--dump-strings
-
Equivalent to -D\fP.
-
--help
-
Display a usage message on standard output and exit successfully.
-
--login
-
Make
bash
act as if it had been invoked as a login shell (see
.SM
INVOCATION
below).
-
--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
.FN /etc/profile
or any of the personal initialization files
.IR ~/.bash_profile ,
.IR ~/.bash_login ,
or
.IR ~/.profile .
By default,
bash
reads these files when it is invoked as a login shell (see
.SM
INVOCATION
below).
-
--norc
-
Do not read and execute the personal initialization file
~/.bashrc
if the shell is interactive.
This option is on by default if the shell is invoked as
.BR sh .
-
--posix
-
Change the behavior of bash\fP where the default operation differs
from the POSIX 1003.2 standard to match the standard.
-
--rcfile\fP file\fP
-
Execute commands from
file
instead of the standard personal initialization file
~/.bashrc
if the shell is interactive (see
.SM
INVOCATION
below).
-
--restricted
-
The shell becomes restricted (see
.SM
"RESTRICTED SHELL"
below).
-
--rpm-requires
-
Produce the list of files that are required for the
shell script to run. This implies '-n' and is subject
to the same limitations as compile time error checking checking;
Backticks, [] tests, and evals are not parsed so some
dependencies may be missed.
--verbose
Equivalent to -v\fP.
-
--version
-
Show version information for this instance of
bash
on the standard output and exit successfully.
Up
Next
Previous