Thread (5 messages) flat view 5 messages, 4 authors, 2016-06-15

Re: /bin/sh portability question

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-06-15 22:42:07

Joel Becker wrote:
On Fri, Sep 23, 2005 at 12:48:39PM -0700, H. Peter Anvin wrote:
quoted
Peter Eriksen wrote:
quoted
    path=$(dirname $0)
...
    ./git.sh: syntax error at line 4: `path=$' unexpected
I think $(foo) is required by POSIX.

	I believe that Solaris and others (AIX IIRC) have /bin/sh linked
to /bin/ksh, and it behaves as the POSIX shell when run as /bin/ksh, but
behaves as a much more true-to-bourne shell when run as /bin/sh.
But "sh" is required to be the POSIX shell (XSH page 850.)

Thus, they might have some braindamage where /usr/bin/sh is the POSIX 
shell and /bin/sh is a braindead shell.  Sigh.

	-hpa
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help