SOURCES: klibc-kill_bashism.patch (REMOVED) - last change reverted...

Elan Ruusamäe glen at delfi.ee
Fri Sep 30 16:03:22 CEST 2005


On Friday 30 September 2005 16:40, 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.
man ksh is too long to read, they should (must) be compatible.

just checked, so it is:
[ expression ]
  -u file              file's  mode  has setuid bit  set.

> > 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.
fix then, or use workaround.

but i don't think pdksh is much maitained, so go for workaround.

pdksh changelog:
Revision 1.20  1999/07/15 23:12:20  kloczek
- updated to stable 5.2.14,

-- 
glen



More information about the pld-devel-en mailing list