SOURCES: klibc-kill_bashism.patch (REMOVED) - last change
Andrzej Krzysztofowicz
ankry at green.mif.pg.gda.pl
Fri Sep 30 19:25:40 CEST 2005
Arkadiusz Miskiewicz wrote:
> 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.
Or feature.
Probably if the first string after "[" starts with "-" it is treated as a "["
(test) command option...
--
=======================================================================
Andrzej M. Krzysztofowicz ankry at mif.pg.gda.pl
phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math., Gdansk University of Technology
More information about the pld-devel-en
mailing list