Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!agate!pasteur!ames!elroy!hacgate!gsgpyr!devnet4!jrich From: jrich@devnet4.hac.com (john richardson) Newsgroups: comp.unix.wizards Subject: csh vs sh (was: fixing rm *) Message-ID: <114@gsgpyr.hac.com> Date: 6 Dec 88 19:30:29 GMT References: <1812@ndsuvax.UUCP> <717@quintus.UUCP> <6518@csli.STANFORD.EDU> <723@quintus.UUCP> <6550@csli.STANFORD.EDU> <1457@unisoft.UUCP> <754@quintus.UUCP> Sender: news@gsgpyr.hac.com Reply-To: jrich@devnet4.UUCP (john richardson) Organization: Hughes Aircraft Company, Group Systems Group, Fullerton, Ca. Lines: 36 In article <754@quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: >In article <1457@unisoft.UUCP> greywolf@unisoft.UUCP (The Grey Wolf) writes: > >>If you're going to write a csh script, >>you're better off prefacing it with the line >>#!/bin/csh -f > >Indeed you are. You're even better off not writing Csh scripts. and then... >Well, everything is subject to debate. Has there been a past discussion of writing scripts for csh vs. sh? I see some advantages both ways: CSH: 2X faster (on the only benchmark we attempted) more builtins, less process generation (i.e., test, basename) :r,:e,:t suffixes to variables we are committed to Berkeley software so csh is portable enough I use csh for interactive work SH: trap statement "| while read x" construct easy stderr redirection portable to Berkeley and ATT installations John Richardson jrich@devnet4.hac.com Hughes Aircraft Company, Fullerton, Ca. (714) 732-5588 Subject to the usual disclaimers as well as all failings normally associated with the efforts of man.