On Wed, 2003-06-18 at 08:20, Peter McNabb wrote: > >On 18 Jun 2003, Bryan Murdock wrote: > > On Wed, 2003-06-18 at 06:16, Peter McNabb wrote: > > > Isn't the shell set when the script is run? The first line has something like > > > > > > #!/bin/bash > > > > > > And that's the shell the script is running under. > > > > Well, these are little scripts that are being sourced by your .profile > > or shell rc file and the original author (the shell scripting guru here > > who used that crazy regexp with all the slashes) didn't put the sha-bang > > at the beginning, so I'm leaving it out. I think it was so the script > > would not be run as a child process and so environment variables could > > be set and such. Again I'm not sure. Stuart maybe will have to explain > > that better than I can ;) > > > > The above doesn't help in this case anyway, I want to do certain things > > if the user is using ksh and certain other things if the user is using > > bash. It wouldn't matter what shell is running _my_ script, I want to > > know what shell the user is using. Man, does that make any sense? I > > don't even know if I've got the right terminology. Anyone want to > > recommend a good shell scripting book? One that isn't too specific to > > bash or ksh? > > I see what you're saying now, though I don't think I can help here. :) As far as > books about shells go, each shell has enough differences that you can't easily > have a general book about them. I've seen books with chapters for each kind and > I've seen books on each. BTW, i responded to just you, so your last message > didn't go out to the list. > > -peter
I meant it to go to the list....woops. Well here it is, just so all the other interested readers don't feel left out. (All two or three of you... :) Bryan ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
