From: Dan Brown <[EMAIL PROTECTED]>
> From: Andy Goth <[EMAIL PROTECTED]>
>
> > Alternately, you can call a shell and tell it to run the shell
script
> > file.  "sh printpwd" should do the trick... is this right?  In most
> > shells, ". printpwd" (notice the period) will run a shell script as
>
>     Both of those will run a script, but there's a difference.  "sh
> printpwd" will run the script in a new instance of the shell.

    now to finish the message...

    Running the script in a new instance of the shell means it spawns
another shell which runs the script, and then terminates.  Running ".
printpwd" (or "source printpwd", which is the same thing) runs the shell
in the currently-running shell, not spawning a new one.  Usually, this
doesn't make much difference.  However, if you are using the script to
set environment variables (like the prompt, for example), the difference
is significant.


Reply via email to