Apparently, csh programming is considered harmful.

Frank Shute frank at
Fri Dec 14 13:10:16 PST 2007

On Thu, Dec 13, 2007 at 08:12:32PM -0500, Mike Jeays wrote:
> On December 13, 2007 08:05:42 pm Chad Perrin wrote:
> > I ran across this today:
> >
> >
> >
> > Title:
> >   Csh Programming Considered Harmful
> >
> > I wonder what responses I might get here, and how much of this applies to
> > tcsh as well (I'm still not exactly a tcsh expert).
> As you can see, it is 11 years old, but still good advice.  For interactive 
> use, tcsh is not too bad, but for writing scripts of any length, sh or bash 
> are considered better tools.   For code that will run anywhere, stick to the 
> sh subset. 
> <flamebait>Bash has all the features one is likely to need for
> interactive use as well, and one could make a good case for it being
> the 'standard' shell now.</flamebait> 

Standard shell for what? Linux maybe but not FreeBSD or any of the
other BSDs for that matter. It being GPL guarantees that quite apart
from it general suckiness.

I used bash for an interactive shell for about 5 years until I
discovered the goodness of pdksh. About half the size, statically
linked, not full of bugs and better editing features. Plus it's not

I tried replacing /bin/bash with /bin/ksh on a Linux system and it
almost completely broke it. Suggests the Linux folks can't write
boot scripts without bashisms.

I'm tempted to try doing the same on FreeBSD (replace sh with pdksh)
just for the hell of it and see what happens.

I'm happy with sh as the system shell though; it's light weight:

$ ls -l /bin/sh
-r-xr-xr-x  1 root  wheel  111028 Nov 30 00:10 /bin/sh

$ ls -l /bin/ksh
-r-xr-xr-x  1 root  wheel  681584 Oct  6 12:33 /bin/ksh

How about giving us all a laugh and posting the results for bash ;)




 Contact info: 

More information about the freebsd-questions mailing list