1BASH(1) General Commands Manual BASH(1)
2
3
4
6 bash - GNU Bourne-Again SHell
7
9 bash [options] [file]
10
12 Bash is Copyright (C) 1989-2011 by the Free Software Foundation, Inc.
13
15 Bash is an sh-compatible command language interpreter that executes
16 commands read from the standard input or from a file. Bash also incor‐
17 porates useful features from the Korn and C shells (ksh and csh).
18
19 Bash is intended to be a conformant implementation of the Shell and
20 Utilities portion of the IEEE POSIX specification (IEEE Standard
21 1003.1). Bash can be configured to be POSIX-conformant by default.
22
24 All of the single-character shell options documented in the descrip‐
25 tion of the set builtin command can be used as options when the shell
26 is invoked. In addition, bash interprets the following options when it
27 is invoked:
28
29 -c string If the -c option is present, then commands are read from
30 string. If there are arguments after the string, they are
31 assigned to the positional parameters, starting with $0.
32 -i If the -i option is present, the shell is interactive.
33 -l Make bash act as if it had been invoked as a login shell (see
34 INVOCATION below).
35 -r If the -r option is present, the shell becomes restricted
36 (see RESTRICTED SHELL below).
37 -s If the -s option is present, or if no arguments remain after
38 option processing, then commands are read from the standard
39 input. This option allows the positional parameters to be
40 set when invoking an interactive shell.
41 -D A list of all double-quoted strings preceded by $ is printed
42 on the standard output. These are the strings that are sub‐
43 ject to language translation when the current locale is not C
44 or POSIX. This implies the -n option; no commands will be
45 executed.
46 [-+]O [shopt_option]
47 shopt_option is one of the shell options accepted by the
48 shopt builtin (see SHELL BUILTIN COMMANDS below). If
49 shopt_option is present, -O sets the value of that option; +O
50 unsets it. If shopt_option is not supplied, the names and
51 values of the shell options accepted by shopt are printed on
52 the standard output. If the invocation option is +O, the
53 output is displayed in a format that may be reused as input.
54 -- A -- signals the end of options and disables further option
55 processing. Any arguments after the -- are treated as file‐
56 names and arguments. An argument of - is equivalent to --.
57
58 Bash also interprets a number of multi-character options. These
59 options must