Options
Options that appear here with double hyphens also work when entered with single hyphens, but using double hyphens is standard coding procedure.
-
-,-- Treat all subsequent strings as arguments, not options.
-
-D,
--dump-strings For execution in non-English locales, dump all strings that bash translates.
-
--dump-po-strings Same as
--dump-strings, but uses the GNU gettext po (portable object) format suitable for scripting.-
-c
str Read commands from string
str.-
--help Print usage information and exit.
- -i
Create an interactive shell (prompt for input).
-
-init-file
file Substitute
filefor .bashrc on startup.-
-l,
--login Behave like a login shell; try to process /etc/profile on startup. Then process ~/.bash_profile, ~/.bash_login, or ~/.profile (searching for each file only if the previous file is not found).
-
--noediting Disable line editing with arrow and control keys.
-
--noprofile Don’t process /etc/profile, ~/.bash_profile, ~/.bash_login, or ~/.profile on startup.
-
--norc Don’t process ~/.bashrc on startup.
-
--posix Conform to POSIX standard.
-
-r,
--restricted Restrict users to a very secure, limited environment; for instance, they can’t change out of the startup directory or use the
>sign to redirect output.-
--rcfilefile Substitute
filefor .bashrc on startup.- -s
Read commands from standard input. Output from built-in commands goes to file descriptor 1; all other shell output goes to file descriptor 2.
-
-v,
--verbose Print each line as it is executed (useful for tracing ...
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