[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What shells fail to work if comparing with "" ?
From: |
Bob Friesenhahn |
Subject: |
Re: What shells fail to work if comparing with "" ? |
Date: |
Thu, 10 Feb 2011 20:47:34 -0600 (CST) |
User-agent: |
Alpine 2.01 (GSO 1266 2009-07-14) |
On Thu, 10 Feb 2011, Stefano Lattarini wrote:
but someone has argued against this, saying he knows of no shell where the
former is not acceptable. I realise this issue is probably more of a problem
with older shells,
Solaris 10 /bin/sh is not really old.
I do see the issues you mention with recently-patched /bin/sh on
Solaris 10. However, /usr/xpg4/bin/sh passes your tests with flying
colors on Solaris 10. The description of /usr/xpg4/bin/sh is
considerably different than /bin/sh:
"The /usr/bin/sh utility is a command programming language
that executes commands read from a terminal or a file."
"The /usr/xpg4/bin/sh utility is a standards compliant shell.
This utility provides all the functionality of ksh(1),
except in cases discussed in ksh(1) where differences in
behavior exist."
Interestingly, on Solaris 10, /bin/sh is a link to /sbin/sh, implying
that it is intended for purposes like system initialization scripts.
Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/