Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2007 21:10:08 +0000
From:      "Frank Shute" <frank@esperance-linux.co.uk>
To:        Mike Jeays <mike.jeays@rogers.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Apparently, csh programming is considered harmful.
Message-ID:  <20071214211008.GA12935@melon.esperance-linux.co.uk>
In-Reply-To: <200712132012.32729.mike.jeays@rogers.com>
References:  <20071214010542.GA19553@demeter.hydra> <200712132012.32729.mike.jeays@rogers.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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:
> >
> >   http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
> >
> > 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
GPL.

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 ;)

</flamebait>


-- 

 Frank 

	
 Contact info: http://www.esperance-linux.co.uk/misc/contact.html 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071214211008.GA12935>