From owner-freebsd-questions@FreeBSD.ORG Fri Dec 14 21:10:16 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 4236816A4C9 for ; Fri, 14 Dec 2007 21:10:16 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from mailout.zetnet.co.uk (mailout.zetnet.co.uk [194.247.47.231]) by mx1.freebsd.org (Postfix) with ESMTP id B95A913C43E for ; Fri, 14 Dec 2007 21:10:15 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from irwell.zetnet.co.uk ([194.247.47.48] helo=zetnet.co.uk) by mailout.zetnet.co.uk with esmtp (Exim 4.50) id 1J3HnS-0007L9-SG for freebsd-questions@freebsd.org; Fri, 14 Dec 2007 21:10:14 +0000 Received: from esperance.zetnet.co.uk (54-144.adsl.zetnet.co.uk [194.247.54.144]) by zetnet.co.uk (8.14.1/8.14.1/Debian-9) with SMTP id lBELADmT000462 for ; Fri, 14 Dec 2007 21:10:14 GMT Received: (qmail 13109 invoked by uid 1001); 14 Dec 2007 21:10:08 -0000 From: "Frank Shute" Date: Fri, 14 Dec 2007 21:10:08 +0000 To: Mike Jeays Message-ID: <20071214211008.GA12935@melon.esperance-linux.co.uk> References: <20071214010542.GA19553@demeter.hydra> <200712132012.32729.mike.jeays@rogers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200712132012.32729.mike.jeays@rogers.com> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 6.3-RC1 i386 X-Organisation: 'Esperance Linux' X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (zetnet.co.uk [194.247.46.1]); Fri, 14 Dec 2007 21:10:14 +0000 (GMT) Cc: FreeBSD Questions Subject: Re: Apparently, csh programming is considered harmful. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Frank Shute List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2007 21:10:16 -0000 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. > > 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. 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 ;) -- Frank Contact info: http://www.esperance-linux.co.uk/misc/contact.html