TuskenTower on 22 Jan 2009 11:16:19 -0800

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] What is my current shell?

We have an oddball problem.  Is there any portable way to determine
what shell you are using once you are inside a script?

Right now, we are thinking of using
which `echo $0`

As you can see here, $SHELL does not change when you switch shells.
[2:07pm] [shaha:pts/8] [shaha] : /gtc/staff/shaha/work/sortT > echo $SHELL
[2:08pm] [shaha:pts/8] [shaha] : /gtc/staff/shaha/work/sortT > bash
shaha@shaha:~/work/sortT$  echo $SHELL

This is for problems at customer sites where they are using the wrong
Bourne shell on Solaris (/bin/sh) when we want them to use

Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug