It's official now; Solaris sh is brain dead...

For example, this program

    #!/bin/sh

    die() { echo die called with $1; exit 1; } >&2

    die foo
    die bar

will print *both* those messages!

I honestly don't care if this is posix or not, but it is BRAIN DEAD for
the ">&2" to change the meaning from {} to ()

Oh and the grep thing is even worse.

    echo foo | grep ^/

works fine in an interactive shell but in a script it attempts to
*execute* "/", complains, while simultaneously complaining about usage
of grep.

It's almost like it's treating ^ like |
This commit is contained in:
Sitaram Chamarty 2011-10-20 15:40:17 +05:30
parent f050938171
commit 5a125fac96
4 changed files with 5 additions and 5 deletions

View file

@ -18,7 +18,7 @@ GL_PACKAGE_CONF=/tmp/share/gitolite/conf
# pubkey file if you happen to have lost all gitolite-access to the repos (but
# do have shell access via some other means)
die() { echo "$@"; exit 1; } >&2
die() { echo "$@" >&2; exit 1; }
get_rc_val() {
`dirname $0`/gl-query-rc $1