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] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to