Apparently, csh programming is considered harmful.

Peter Schuller peter.schuller at
Mon Dec 17 09:33:35 PST 2007

> other BSDs for that matter. It being GPL guarantees that quite apart
> from it general suckiness.

Can someone please explain why bash sucks?

Everyone keep's saying this but I have never heard anyone explain why, other 
than the GPL issue. I really want to know.

(This is not because I'm a bash fan. My personal favorite happens to be zsh.)

> 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.

If this is a poke at the use of #!/bin/sh when the script actually requires 
bash, I 100% agree.

However, if your intent (and the intent of Chuck Robey in that earlier) post 
is to imply that it's bad programming practice to write anything than POSIX 
compatible scripts, then I have to ask again - why?

This is kind of a pet peeve of mine, so here goes somewhat of a rant. Please 
enlighten me as to why I am wrong:

I don't understand why everyone insists on POSIX compliance for portability 
with shell scripting. The POSIX common demoniator seems to suck. Seriously. 

One keeps seeing things like:

   if [ x"$var" = x"value" ]

When the intent is:

   if [ "$var" = "value" ]

Because there is presumably some wonky script out there that breaks on the 
former (or perhaps its POSIX, dunno). I have recently began to appreciate 
that all this madness that would normally be considered unforgivable code 
obfuscation in anything but shell scripting, is all an attempt to somehow be 

In any number of situations I would consider it much preferable to juse choose 
one particular shell and stick to it, rather than having to do battle with 
all these minor incompatibilities. Many major shells are very portable to 
begin with, and in many situation you *REALLY* don't care about some exotic 
Unix platform that 10 people in the world run, but where bash/zsh/whatever 

Another example of the madness is:

Check out section 12.3.3. Can anyone claim that it is sensible for it to be 
this fricking difficult *to print the value of a variable*?

Although that last bit has to do with more than the choice of a shell, it 
highlights perfectly the type of trouble you run into when you try to be 
portable with the least common denominator.

/ Peter Schuller

PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller at>'
Key retrieval: Send an E-Mail to getpgpkey at
E-Mail: peter.schuller at Web:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part.
Url :

More information about the freebsd-questions mailing list