On Wed, 2003-06-18 at 10:57, Bryan Murdock wrote:
> > > 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 lack of a sha-band doesn't prevent it from be started as child
process. I would prevent it from being able to be executed (child or
not). However, you're not executing but sourcing the contents of the
file. The difference is that when you execute a script file it's given
it's own private environment--not so helpful when you're trying to
modify your environment. When you source the file it is the same thing
as if you can typed in the commands yourself, your environment gets
modified. You can source using either the word source or using the dot,
I always use dot as that's what I was first introduced to.

> > > 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 still say this is the best book I've seen. Don't pay too much to the
title, almost everything transfers directly to bash. After that, the
bash man page is great for discovering cool things.

http://catalog.lib.byu.edu/uhtbin/cgisirsi/w0rx6zuag6/58110197/9

-- 
Stuart Jansen <[EMAIL PROTECTED], AIM:StuartMJansen>

"What hole did you dig that up from?" 
   -- my roommate commenting on my taste in music

Attachment: 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

Reply via email to