Subject: RE: HELP : some newbie questions
To: 'djv@bedford.net' <djv@bedford.net>
From: Alex Barclay <alex@vsys.com>
List: netbsd-help
Date: 02/17/1998 08:00:55
On Saturday, February 14, 1998 7:20 AM, CyberPeasant 
[SMTP:listread@bedford.net] wrote:
> >                                                      All standard, current
> > unix shells are programmed to look for a special format comment line at the
> > beginning of any script and if it points to a valid shell to switch to that
> > shell instead of processing the script themselves.
>
> This statement appears to be incorrect in all respects.
True now, but not historically so.

> Shells usually do not interpret script files "themselves", but
> instead create a new process. Usually it takes a special effort to
> make a shell interpret a script in its own context, which is
> called "sourcing".
I seem to remember in my dim and distant past running on a SysVr2 machine which 
indeed had the shell look for the #! comment to pick the correct interpreter. I 
think BSD systems have "always" (perhaps someone can point out when this was 
not true) picked the interpreter in the kernel.

Please correct me if I'm wrong (this was nearly 10 years ago now) and 
thankfully I haven't seen SysVr2 for a very long time (it was awful) ;-)

A.
--
Alex Barclay			Tel  : 719 635 8066x17
Vsys					Page : 719 477 5190
731 N. Weber, Ste 202
Colorado Spgs., CO, 80903	Email: alex@vsys.com