On Tue, 2003-06-17 at 17:59, Bryan Murdock wrote: > On Tue, 2003-06-17 at 16:39, Corey Edwards wrote: > > On Tue, 2003-06-17 at 16:31, Bryan Murdock wrote: > > > I'm working on some environment setup scripts and I need to know inside > > > the script which shell the user (the person running the script) is > > > using. Short of doing a finger username and parsing out which shell > > > they are using, how do I figure this out? > > > > The environment variable SHELL will tell you. > > > > $ echo $SHELL > > /bin/bash > > That's what I thought, but it doesn't seem to be set, at least for me > using ksh...maybe I just need to make sure that it is set in everyone's > .profile?
That's strange. It's set on the hp-ux and solaris machines I have access too. The problem with using .profile or /etc/profile is that some users override it. For example, prefering bash but occasionally running things in ksh or csh. Are you sure there wasn't a typo or something overwriting the contents of $SHELL? -- Stuart Jansen <[EMAIL PROTECTED], AIM:StuartMJansen> "What hole did you dig that up from?" -- my roommate commenting on my taste in music
signature.asc
Description: This is a digitally signed message part
____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
