[TriLUG] to delete root, or not too?
Alan Porter
porter at trilug.org
Tue Nov 14 09:45:41 EST 2006
> $SHELL gives (in the case of tcsh/csh/bash) the shell you opened the
> session with, not your current shell.
Actually, $SHELL tells which shell should be used to interpret scripts
that have no interpreter specified on the first line.
In most cases, it is read from /etc/passwd. But it can be over-ridden.
Try some experiments by writing a shell script with no #!/bin/myshell at
the top, and then set the $SHELL variable to various things and run the
script. You'll get some weird, but predictable, behavior.
$SHELL is a directive for future shells, not an observation of current
shells.
Alan
.
More information about the TriLUG
mailing list