Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site ogcvax.UUCP
Path: utzoo!linus!vaxine!wjh12!genrad!decvax!harpo!eagle!mhuxl!ihnp4!alberta!ubc-vision!uw-beaver!tektronix!ogcvax!root
From: root@ogcvax.UUCP (Bruce Jerrick)
Newsgroups: net.unix
Subject: C shell script portability suggestion
Message-ID: <372@ogcvax.UUCP>
Date: Fri, 10-Feb-84 22:54:05 EST
Article-I.D.: ogcvax.372
Posted: Fri Feb 10 22:54:05 1984
Date-Received: Wed, 15-Feb-84 00:36:49 EST
Organization: Oregon Graduate Center, Beaverton, OR
Lines: 23


   I'm not sure what sort of portability problems mcvax!guido has
had that prompt him to recommend the Bourne shell for shell scripts
(ref. net.unix, 5684@mcvax.UUCP), but I'd be willing to bet that they
can be avoided by including:

    #! /bin/csh -f

as a header for *ALL* C-shell scripts, and necessarily as a result,
avoiding the use of aliases.  The "-f" will prevent the
reading of the user's .cshrc file.  If the .cshrc file is read, there
will be portability problems even within a site -- the behavior of the
shell script might be profoundly altered by a user's .cshrc file
(aliases would be the main cause; also things like "set noclobber").

        Bruce Jerrick
        Oregon Graduate Center
	(503) 645-1121 ex. 355
        CSNet:  bruce@Oregon-Grad
        UUCP:   ...teklabs!ogcvax!bruce
-- 
Bruce Jerrick
Oregon Graduate Center