Subject: shell merits (was Re: vipw done, now what?)
To: None <netbsd-help@NetBSD.ORG>
From: Hume Smith <hclsmith@localhost.isisnet.com>
List: netbsd-help
Date: 01/07/1996 13:26:34
> > At the risk of starting a flame war, though, giving csh
> > scripting examples is not kind.

> I've never had any trouble with csh. But then I wouldn't write anything
> non-trivial in a scripting language (REXX & Perl are exceptions here)

(no, hume, down boy, don't say what you think of REXX and Perl,
we'll never get home...)

> I just use the one (csh or sh) that I am currently more familiar with.
> That depends on what I taught more recently :-)

at the risk of making a three-sided flame war, i don't particularly
like either one.  i think csh is the best command-line shell, but
even though sh is better for programming i prefer tclsh.  it has
separated globbing out of the evaluation process and supports
any kind of string in its list syntax, making it much easier to,
say, handle arbitrary directory contents.  (try handling a file
named "!how'$them*there apples" in csh or sh.)

tcl has more built-in
string/list manipulators; in sh and csh you have to start horrific
pipelines to do simple things like downcase, figure out the
next version number, insert to or search a list...

tcl has useable arrays.

tcl syntax is -much- easier than sh and csh.  (and P*L and R*X...)

sh has only about two real advantages over tclsh:
signal support, and you can assume it exists.

there.  i promise that's all about it i'll dump on this mailing list.
(personal-mail debate always welcome ;)


--
Hume Smith   <hclsmith@isisnet.com>   NetBSD r00lz :)


Real Americans don't carry cash.  Their police may steal it.