[ale] why bash when ksh is default?
Unix Guru Dude
geof at denali.is.net
Mon Mar 18 10:42:47 EST 1996
}
}
}On the SVR4 I'm using, /sbin/sh is executed for such a script, according
}to the output of truss:
}
}
}$ echo $SHELL
}/usr/bin/bash
}
}$ cat test.sh
}echo THIS is a test script $0
I believe this is a function of you login shell, /usr/bin/bash. Humor me,
try this:
exec ksh # full path mind you
export SHELL=ksh # ditto
echo '[[ -x $0 ]] && date' > test.sh
chmod 700 test.sh
./test.sh
If it runs via /bin/sh, it will fail to recognize the '[[' construct.
My expectation is that since SHELL is set to ksh, the shell will be run
with ksh...
}
}$ truss -o /tmp/test.sh.truss test.sh
truss? New to me...........
--
Until later:
Geoffrey Myers geof at denali.is.net eiger at ichange.com gamyers at attmail.com
http://www.ticllc.net/~geof
Opinions expressed by me are mine, all mine, only mine.....
More information about the Ale
mailing list