Hash: SHA1

On Friday, May 10, 2002, at 09:41 AM, Chris Zubrzycki wrote:
> On Friday, May 10, 2002, at 08:55 AM, Max Horn wrote:
>> 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>
> This is all being done with bas as a symlink? has anyone tried copying 
> bash to /sw/bin/sh and seeing if it still does not work? Bash entgers 
> into sh compatibility mode when it is invoked as sh...I don't think a 
> symlink is enough.
> If bash is the problem, why does it work so well on other distros? is 
> it a kernel issue?

sorry to reply to myelf, but I forgot to say something. I have done this 
before, and have had no apparent side affects with 10.1.3. I removed 
/bin/sh, and copied bash to /bin/sh. everything still worked, AFAIK.

- -chris zubrzycki
- - --
PGP public key: http://homepage.mac.com/beren/publickey.txt
ID: 0xA2ABC070
Fingerprint: 26B0 BA6B A409 FA83 42B3  1688 FBF9 8232 A2AB C070

"Only two things are infinite, the universe and human stupidity, and I'm
  not sure about the former."
Albert Einstein

Version: GnuPG v1.0.6 (Darwin)
Comment: For info see http://www.gnupg.org



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

Reply via email to