Re: /bin/sh portability question

From: Joel Becker <Joel.Becker@oracle.com>
Date: 2005-09-24 05:57:06
On Fri, Sep 23, 2005 at 12:48:39PM -0700, H. Peter Anvin wrote:
> Peter Eriksen wrote:
> >      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.

Joel

-- 

"Nearly all men can stand adversity, but if you really want to
 test a man's character, give him power."
	- Abraham Lincoln

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sat Sep 24 05:57:52 2005

This archive was generated by hypermail 2.1.8 : 2005-09-24 05:57:54 EST