1.2.2.3.2.
Is this shell interactive?
Up one level
-
Test by looking at the content of the special parameter -, it contains an 'i' when the shell is interactive:
eddy:~> echo $- |
In non-interactive shells, the prompt, PS1, is unset.

