Bash Concepts: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 20: | Line 20: | ||
=Non-interactive Shell= | =Non-interactive Shell= | ||
A shell started with <tt>-c</tt> option. | |||
Revision as of 00:29, 23 February 2016
Internal
Login Shell
A login shell is a shell whose first character of its argument zero is a -, or it was started with the --login option.
Interactive Shell
An interactive shell is a shell started:
- without the -c option
- without non-option arguments
- with the -i option
The interactive shell's standard input and error are both connected to terminals.
$- includes i if the shell is interactive, allowing a script or a startup file to test this state.
Non-interactive Shell
A shell started with -c option.