From owner-freebsd-arch Thu Jul 25 12:55:37 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE8D437B400 for ; Thu, 25 Jul 2002 12:55:33 -0700 (PDT) Received: from jkh-gw.queasyweasel.com (adsl-64-173-3-158.dsl.sntc01.pacbell.net [64.173.3.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A52443E3B for ; Thu, 25 Jul 2002 12:55:33 -0700 (PDT) (envelope-from jkh@queasyweasel.com) Received: from mango.local. (jkh@mango.freebsd.com [64.173.15.99]) by jkh-gw.queasyweasel.com (8.12.5/8.12.5) with ESMTP id g6PJt0ux070184; Thu, 25 Jul 2002 12:55:01 -0700 (PDT) (envelope-from jkh@queasyweasel.com) Date: Thu, 25 Jul 2002 12:56:12 -0700 Subject: zsh vs bash (was Re: Scripting languages (was: Re: Package system flaws?)) Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v540) Cc: Joe Abley , freebsd-arch@FreeBSD.ORG To: Garance A Drosihn From: Jordan K Hubbard In-Reply-To: Message-Id: <922DEE83-A008-11D6-BD35-0003938C7B7E@queasyweasel.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.540) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Actually, I think this characterization of our decision (well, my decision, just to put the blame firmly where it belongs) is a little unfair. The reason we switched from /bin/zsh to /bin/bash as "/bin/sh" were complex and not driven by bug counts so much as they were driven by issues like POSIX compatibility (zsh allows some of the most interesting constructs, like assigning values to positional parameters and quite a few other things which have gotten [ab]users of those features into trouble), performance (as measured by runtimes of some known shell scripts), memory and disk footprint, and finally, the fact that Chet is a nice guy who always responds to our emails promptly. :-) To continue to be fair, we also did a lot of our measurements against zsh 3.x, which is the version of zsh we were using at the time. I have seen considerable improvement put into zsh in 4.x, enough that we also took care to update our /bin/zsh to 4.x for Jaguar. I still, however, think that the notion of /bin/bash as /bin/sh is widespread enough (and well-tested enough by the Linux hoards) that we did the right thing to switch. What a lot of folks may not know is that /bin/bash does a pretty thorough job of lobotomizing itself into POSIX conformance when invoked as /bin/sh, preventing users from writing non-portable shell scripts that rely on bash-isms unless they explicitly call out to /bin/bash at the top (which is as it should be). - Jordan On Thursday, July 25, 2002, at 12:42 PM, Garance A Drosihn wrote: > At 1:45 PM -0400 7/25/02, Joe Abley wrote: >> Apple think zsh is good enough, fwtw: >> >> [jabley@hyperion]% ls -ali /bin/sh /bin/zsh >> 6027431 -r-xr-xr-x 1 root wheel 449616 Jul 12 19:04 /bin/sh >> 6027442 -rwxr-xr-x 1 root wheel 449616 Jul 12 19:04 /bin/zsh > > Actually, if you follow the darwin lists you'll see that Apple > intends to switch away from zsh for /bin/sh, because they have > too many bug reports on it. > > [ you might debate *why* they have so many bug reports, but > in any case, soon you will not be able to point to them > using zsh for /bin/sh] > > -- > Garance Alistair Drosehn = gad@gilead.netel.rpi.edu > Senior Systems Programmer or gad@freebsd.org > Rensselaer Polytechnic Institute or drosih@rpi.edu > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message > -- Jordan K. Hubbard Engineering Manager, BSD technology group Apple Computer To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message