[ale] why bash when ksh is default?

Mark J. Reed mark.reed at sware.com
Mon Mar 18 10:22:34 EST 1996


Unix Guru Dude <geof at denali.is.net> writes:
\ In all other versions of UNIX I've used, SCO, SunOS, SVR4...  when youe
\ execute a shell that does not begin with the #!...  It executes using the
\ shell that the SHELL variable is set to.
Uhm, no.  I tried a simple experiment and verified Jeff's findings on several
varieties of UNIX:

$ cat fred
setenv a b

$ echo $SHELL 
/bin/csh

$ env | grep SHELL  # verify that it's exported
SHELL=/bin/csh

SCO ODT 3.0: 
$ ./fred
./fred: setenv:  not found

SunOS 4.1.3_U1:
$ ./fred
./fred: setenv: not found

HP-UX 9.0:
$ ./fred
./fred: setenv: not found

HP-UX 10.0:
$ ./fred
./fred: setenv: not found


Conclusion: SHELL is ignored when determining what interpreter to run on a
shebang-less script.

--
Mark J. Reed
Email: mark.reed at sware.com - Voice: +1 404 315 6296 x158 - Fax: +1 404 315 6407
Hewlett-Packard Co. / 2957 Clairmont Rd Suite 220 / Atlanta GA 30329-1647
E-Mail Privacy by SecureMail.  Visit URL:http://www.secureware.com/ for details.

--
Mark J. Reed
Email: mark.reed at sware.com - Voice: +1 404 315 6296 x158 - Fax: +1 404 315 6407
Hewlett-Packard Co. / 2957 Clairmont Rd Suite 220 / Atlanta GA 30329-1647
E-Mail Privacy by SecureMail.  Visit URL:http://www.secureware.com/ for details.






More information about the Ale mailing list