Under Solaris: GHC 6.10.2 Release Candidate 1

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Tue Mar 17 21:12:19 EDT 2009


On 2009 Mar 17, at 20:28, Duncan Coutts wrote:
> On Tue, 2009-03-17 at 11:09 +0100, Christian Maeder wrote:
>> Under Solaris sh is not bash!
>
> Indeed.
>
> According to the OpenGroup that syntax should be fine:
> http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_09_02
>
> It works for me under Solaris 10. Perhaps Solaris 9 or older do not  
> have
> a standard compliant /bin/sh program. What do you suggest we use  
> instead
> as a workaround?

For backward compatibility reasons sh in Solaris 9 and earlier is not  
POSIX compliant.  Use /usr/xpg4/bin/sh or /bin/bash instead.   
(Unfortunately you can't cheat and define a shell function, although  
you could create a program called "!":

     #! /bin/sh
     if ${1+"$@"}; then
         exit 1
     else
         exit 0
     fi
.)

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20090317/90b84acb/PGP.bin


More information about the Glasgow-haskell-users mailing list