From owner-freebsd-questions@FreeBSD.ORG Mon Dec 17 17:33:34 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E322316A419 for ; Mon, 17 Dec 2007 17:33:34 +0000 (UTC) (envelope-from peter.schuller@infidyne.com) Received: from smtp.infidyne.com (ds9.infidyne.com [88.80.6.206]) by mx1.freebsd.org (Postfix) with ESMTP id 72FF313C44B for ; Mon, 17 Dec 2007 17:33:34 +0000 (UTC) (envelope-from peter.schuller@infidyne.com) Received: from c-8216e555.03-51-73746f3.cust.bredbandsbolaget.se (c-8216e555.03-51-73746f3.cust.bredbandsbolaget.se [85.229.22.130]) by smtp.infidyne.com (Postfix) with ESMTP id D58DB763C7; Mon, 17 Dec 2007 18:33:32 +0100 (CET) From: Peter Schuller To: freebsd-questions@freebsd.org, Frank Shute Date: Mon, 17 Dec 2007 19:33:22 +0100 User-Agent: KMail/1.9.7 References: <20071214010542.GA19553@demeter.hydra> <200712132012.32729.mike.jeays@rogers.com> <20071214211008.GA12935@melon.esperance-linux.co.uk> In-Reply-To: <20071214211008.GA12935@melon.esperance-linux.co.uk> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1415729.3e3akt1Iy2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200712171933.32626.peter.schuller@infidyne.com> Cc: Mike Jeays Subject: Re: Apparently, csh programming is considered harmful. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2007 17:33:35 -0000 --nextPart1415729.3e3akt1Iy2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > 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, othe= r=20 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= =2E) > 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= =20 bash, I 100% agree. However, if your intent (and the intent of Chuck Robey in that earlier) pos= t=20 is to imply that it's bad programming practice to write anything than POSIX= =20 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. Pleas= e=20 enlighten me as to why I am wrong: I don't understand why everyone insists on POSIX compliance for portability= =20 with shell scripting. The POSIX common demoniator seems to suck. Seriously.= =20 One keeps seeing things like: if [ x"$var" =3D x"value" ] When the intent is: if [ "$var" =3D "value" ] Because there is presumably some wonky script out there that breaks on the= =20 former (or perhaps its POSIX, dunno). I have recently began to appreciate=20 that all this madness that would normally be considered unforgivable code=20 obfuscation in anything but shell scripting, is all an attempt to somehow b= e=20 portable. In any number of situations I would consider it much preferable to juse cho= ose=20 one particular shell and stick to it, rather than having to do battle with= =20 all these minor incompatibilities. Many major shells are very portable to=20 begin with, and in many situation you *REALLY* don't care about some exotic= =20 Unix platform that 10 people in the world run, but where bash/zsh/whatever= =20 doesn't. Another example of the madness is: http://www.netbsd.org/docs/pkgsrc/makefile.html Check out section 12.3.3. Can anyone claim that it is sensible for it to be= =20 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=20 highlights perfectly the type of trouble you run into when you try to be=20 portable with the least common denominator. =2D-=20 / Peter Schuller PGP userID: 0xE9758B7D or 'Peter Schuller ' Key retrieval: Send an E-Mail to getpgpkey@scode.org E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org --nextPart1415729.3e3akt1Iy2 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBHZsD8DNor2+l1i30RAk49AJ0RrBQ8cKhtB7MB5m6gwDpTcJh86gCfTKd+ pw3lIItKpUiw0HVHyNpjoDU= =CNxT -----END PGP SIGNATURE----- --nextPart1415729.3e3akt1Iy2--