: >Don't write shell scripts in csh. It's broken. Really. It should've
: >never gotten out in the first place. There's a detailed FAQ.
:
: This is surprising news. Having written many successful shell scripts in
: csh, and certainly preferring the use of csh over the Bourne shell
: (although the Korn Shell does do many of the things that the csh does),
: it amazes me that the scripts that I wrote shouldn't have worked.
To turn the question around, why do you prefer the csh over the bourne
shells?
: What are your specific objections to csh? What do you mean by broken?
It's inconsistent, for one thing. It doesn't deal properly with quoted
strings, and it doesn't give you control over file descripters--you
can't (say) keep stdout and send stderr to /dev/null.
I could go on for ages, but somebody already went to that trouble for
me. There are (of course) things he missed, but he covered the biggest
things.
: Don't you mean that you gained expertise on another shell first, and are
: now loath to abandon it?
I gained expertise on the C shell, then moved to the tcsh, and now use
bash and zsh in about equal parts.
: Remember, too, that a person can very well elect to use csh for
: interactive use, but use something else (ksh) for scripts.
Csh also sucks for interactive use. The only halfway nice service it
provides is bang history, and both zsh and bash have that.
: An itemized list of objections to csh would be interesting.
How about the frequent posting I mentioned warning people away from
using it? Look at the "Csh programming considered harmful" FAQ at
ftp://news.uu.net/usenet/news.answers/unix-faq/shell/csh-whynot.
--Dave