C shell script portability suggestion

Bruce Jerrick root at ogcvax.UUCP
Sat Feb 11 13:54:05 AEST 1984


   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 at 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 at Oregon-Grad
        UUCP:   ...teklabs!ogcvax!bruce
-- 
Bruce Jerrick
Oregon Graduate Center



More information about the Comp.unix mailing list