Bash manual says:
An interactive shell is one started without non-option arguments, unless -s is specified, without specifying the -c option, and whose input and output are both connected to terminals (as determined by isatty(3)), or one started with the -i option.
I was wondering which "unless -s is specified" applies to:
- "without non-option arguments", or
- "without specifying the -c option"?
Can you rephrase the quote more clearly to enumerate all the ways to start an interactive shell? (I am only clear that I can start one by -i
alone, but not sure about the other way(s) which the quote describes.)
Thanks.
"echo hello"
inbash -c "echo hello"
a nonoption argument? – Tim Apr 06 '18 at 19:35bash -c "echo hello"
, if I am correct,"echo hello"
is called an option argument, so there is no nonoption argument and it fits the first bullet point in your reply. But the shell it created isn't interactive. – Tim Apr 06 '18 at 20:03