One of those monumental days ........

Chris F.A. Johnson cfaj-uVmiyxGBW52XDw4h08c5KA at public.gmane.org
Wed Nov 9 21:45:02 UTC 2005


yOn Wed, 9 Nov 2005, Lennart Sorensen wrote:

> On Wed, Nov 09, 2005 at 03:57:06PM -0500, Chris F.A. Johnson wrote:
>> yOn Wed, 9 Nov 2005, Lennart Sorensen wrote:
>>
>>> On Wed, Nov 09, 2005 at 02:06:31AM -0500, Chris F.A. Johnson wrote:
>>>>    If zsh were a POSIX shell, I'd probably use it.
>>>
>>> It isn't?
>>
>>    No.
>>
>>> Is bash?
>>
>>    Yes.
>
> So what in zsh makes it not posix, and makes bash posix?

      Compliance (or lack of) with the POSIX standard.

>  I have seen shell scripts that were supposed to be posix shell
> scripts fail on bash3 while working on bash2 and other posix
> compliant shells.

      Then they were not POSIX scripts. Do you have examples?

> Never did try those scripts on zsh.

      While writing my book, I (or rather, the technical reviewer,
      William Park) found many examples of POSIX scripts that did not
      work on zsh.

> I always thought of zsh as a superset of bash and bash as a superset of
> sh.

      According to its man page, zsh tries to emulate sh or ksh if it
      is invoked as sh. There is no mention of POSIX; ksh is the basis
      for, but is not entirely, POSIX, the degree of compliance
      depending on the version.

-- 
     Chris F.A. Johnson                     <http://cfaj.freeshell.org>
     ==================================================================
     Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress
     <http://www.torfree.net/~chris/books/cfaj/ssr.html>
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list