| GNU Bash Reference Manual by Chet Ramey and Brian Fox Paperback (6"x9"), 180 pages ISBN 0954161777 RRP £19.95 ($29.95) "An essential resource .... the most detailed coverage available for all aspects of Bash" --- Linux User and Developer Magazine (Issue 37, Mar 2004) Get a printed copy>>> |
6.3.3 Interactive Shell Behavior
When the shell is running interactively, it changes its behavior in several ways.
- Startup files are read and executed as described in section 6.2 Bash Startup Files.
-
Job Control (see section 7 Job Control) is enabled by default. When job
control is in effect, Bash ignores the keyboard-generated job control
signals
SIGTTIN,SIGTTOU, andSIGTSTP. -
Bash expands and displays
PS1before reading the first line of a command, and expands and displaysPS2before reading the second and subsequent lines of a multi-line command. -
Bash executes the value of the
PROMPT_COMMANDvariable as a command before printing the primary prompt,$PS1(see section 5.2 Bash Variables). - Readline (see section 8 Command Line Editing) is used to read commands from the user's terminal.
-
Bash inspects the value of the
ignoreeofoption toset -oinstead of exiting immediately when it receives anEOFon its standard input when reading a command (see section 4.3 The Set Builtin). -
Command history (see section 9.1 Bash History Facilities)
and history expansion (see section 9.3 History Expansion)
are enabled by default.
Bash will save the command history to the file named by
$HISTFILEwhen an interactive shell exits. - Alias expansion (see section 6.6 Aliases) is performed by default.
-
In the absence of any traps, Bash ignores
SIGTERM(see section 3.7.6 Signals). -
In the absence of any traps,
SIGINTis caught and handled ((see section 3.7.6 Signals).SIGINTwill interrupt some shell builtins. -
An interactive login shell sends a
SIGHUPto all jobs on exit if thehuponexitshell option has been enabled (see section 3.7.6 Signals). -
The
-ninvocation option is ignored, and ‘set -n’ has no effect (see section 4.3 The Set Builtin). -
Bash will check for mail periodically, depending on the values of the
MAIL,MAILPATH, andMAILCHECKshell variables (see section 5.2 Bash Variables). - Expansion errors due to references to unbound shell variables after ‘set -u’ has been enabled will not cause the shell to exit (see section 4.3 The Set Builtin).
-
The shell will not exit on expansion errors caused by var being unset
or null in
${var:?word}expansions (see section 3.5.3 Shell Parameter Expansion). - Redirection errors encountered by shell builtins will not cause the shell to exit.
- When running in POSIX mode, a special builtin returning an error status will not cause the shell to exit (see section 6.11 Bash POSIX Mode).
-
A failed
execwill not cause the shell to exit (see section 4.1 Bourne Shell Builtins). - Parser syntax errors will not cause the shell to exit.
-
Simple spelling correction for directory arguments to the
cdbuiltin is enabled by default (see the description of thecdspelloption to theshoptbuiltin in section 4.2 Bash Builtin Commands). -
The shell will check the value of the
TMOUTvariable and exit if a command is not read within the specified number of seconds after printing$PS1(see section 5.2 Bash Variables).
| ISBN 0954161777 | GNU Bash Reference Manual | See the print edition |