Re: csh operations and commands

From: P.T. Breuer (
Date: 04/04/04

Date: Sun, 4 Apr 2004 02:13:02 +0200

Rouben Rostamian <> wrote:
> In article <o3i3k1-97m.ln1@don.localnet>,
> Bill Marcum <> wrote:
> >
> >PS: your current assignment might require you to use csh, but I recommend
> >that you read
> >
> That well-known article puts on a passionate argument pointing out
> certain things that cannot be done in csh.
> It then concludes, erroneously, that csh should not be used for
> programming.

Well, whether the argument given is valid or not, the conclusion is
valid, in my judgment (and my user shell is and always has been csh or
tcsh). csh is a nightmare to program in, though with sufficient
debugging and hair tearing it can be done. Practice improves the
situation, but I have never met anyone who would volunteer to program
in it rather than in sh. Maybe some some sun engineer.

> The conclusion, however, is a non sequitur.

But correct, even if your claim were (also) correct.

> A more balanced view would be:
> If what you need to do can be done in csh, there is nothing wrong
> with using csh. If what you need to do cannot be done in csh,
> then you should not use csh.

Well, there are some things wrong with doing it in csh even then.

   1) it takes too long to debug
   2) it will suddenly stop working when you change o/s or o/s version
      (hey, but that's true of bash!)
   3) you will go crazy writing it.

I can program in csh, but it is not fun. Basically, one repeats basic
constructs and hopes like crazy that there isn't a limit on the number
of times one can repeat them ...

> But that advice applies to any other programming tool as well.
> There is no reason to single out csh as the bad boy in the crowd.

There is. It's a _horrible_ programming language. OTOH csh (and
particularly its derivative, tcsh) are excellent user shells. Bash has
been playing catch up for a decade there.


Relevant Pages