At 8:41 Uhr -0400 10.05.2002, Dave Vasilevsky wrote: >On Friday, May 10, 2002, at 07:52 AM, Max Horn wrote: > >>Is it because of spacial chars in $verstring that break since it's >>not quoted? What exactly is a value of "$verstring" that makes it >>choke? It shouldn't be caused by spaces, since those would break >>zsh, too, wouldn't they? > >There are of course spaces in $verstring, and strangely enough that >_is_ what's wrong. Each shell uses an internal implementation of >"test" it seems. When bash sees "test -n foo bar baz" it realizes >that makes no sense, and returns 2 (false). When zsh sees this, it >seems to just accept everything after "foo", including operators, as >detritus and returns 0 (true) since foo isn't the null string. Bash >is right of course, we've just been relying on zsh's incorrect >behavior. > >Go ahead and try the command below, and then try it with zsh instead >of bash. Isn't that bizarre? > >bash -c 'test -n foo bar baz; echo $?'
Ouch, yes! Ugly, very ugly indeed. Of course the "proper" fix would be to just use quotes, but we already know that's not working eitehr since zsh does weird quoting, too... <sigh> Cheers, Max -- ----------------------------------------------- Max Horn Software Developer email: <mailto:[EMAIL PROTECTED]> phone: (+49) 6151-494890 _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] _______________________________________________ Fink-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/fink-devel