SOURCES: klibc-kill_bashism.patch (REMOVED) - last change
reverted...
Arkadiusz Miskiewicz
arekm at pld-linux.org
Fri Sep 30 15:40:12 CEST 2005
On Friday 30 of September 2005 15:32, Elan Ruusamäe wrote:
> On Friday 30 September 2005 16:24, pluto wrote:
> > Author: pluto Date: Fri Sep 30 13:24:37 2005 GMT
> > Module: SOURCES Tag: HEAD
> > ---- Log message:
> > - last change reverted. this is not a bashism. ksh bug?
> > testcase:
> > echo '[ "foo" = "bar" -a "-u" = "zoo" ]'|/bin/sh
> > /bin/sh: <stdin>[1]: [: zoo: unexpected operator/operand
>
> man test:
> -u FILE
> FILE exists and its set-user-ID bit is set
[ is builting feature in shells so man test isn't adequate here.
> alternatives:
> echo '[ "foo" = "bar" ] && [ "-u" = "zoo" ]'|/bin/sh
> echo '[ "foo" = "bar" -a x"-u" = x"zoo" ]'|/bin/sh
The original test should work since "" is posix quoting and it should quote
-u, too I guess.
bash, zsh work well with the original test. ksh doesn't not, sounds like ksh
bug.
--
Arkadiusz Miśkiewicz PLD/Linux Team
http://www.t17.ds.pwr.wroc.pl/~misiek/ http://ftp.pld-linux.org/
More information about the pld-devel-en
mailing list