csh vs sh (was: fixing rm *)
john richardson
jrich at devnet4.hac.com
Wed Dec 7 05:30:29 AEST 1988
In article <754 at quintus.UUCP> ok at quintus.UUCP (Richard A. O'Keefe) writes:
>In article <1457 at unisoft.UUCP> greywolf at 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 at 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.
More information about the Comp.unix.wizards
mailing list