*BSD News Article 61027


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!inquo!news.uoregon.edu!news.u.washington.edu!somsky
From: somsky@dirac.phys.washington.edu (William R. Somsky)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: /bin/sh isn't Bourne shell
Date: 2 Feb 1996 20:26:32 GMT
Organization: University of Washington
Lines: 28
Message-ID: <4ets1o$rvu@nntp5.u.washington.edu>
References: <4ekrik$rlf@eccles.dsbc.icl.co.uk> <xcdensholio.fsf@woodlawn.uchicago.edu> <4enl74$ifr@eccles.dsbc.icl.co.uk> <3111D553.39F4@pinsight.com>
NNTP-Posting-Host: dirac.phys.washington.edu

Various people have been writing on the new, POSIX-ly correct /bin/sh
variances from the traditional sh behavior.  Esp. in regards to $ENV and
aliases mangling the behavior of scripts such as MAKEDEV.

What it sounds like is that with the addition of $ENV, sh needs a 
command flag, similar to csh's '-f' flag, which would cause it to
ignore $ENV and _not_ source any special shell-initialization files.
Thus with this new flag -- for concreteness sake, let's just assume
that it's -z (people can discuss what the right, currently unused
flag could be) -- scripts like MAKEDEV could start out as:

	#!/bin/sh -z
	#Don't source any $ENV files...
	#
	<stuff to do>
	...

This would be similar to csh scripts starting w/ "#!/bin/csh -f"
to prevent them from reading any .cshrc files.

It seems like a $ENV-defeat flag is a necessary counterpart to
having $ENV in the first place.  Anybody know how this idea can
be passed on to the POSIX folks?

________________________________________________________________________
William R. Somsky			      somsky@phys.washington.edu
Department of Physics, Box 351560		 B432 Physics-Astro Bldg
Univ. of Washington, Seattle WA 98195-1560		    206/616-2954