Hi,

I have seen a strange bug:

        echo "test" > test
        wget -O - http://www.w3c.org >> test

Actually, wget should append to "test", right? Well, it does in version
1.9, but it does not do that in 1.8 (tested with bash 2.x and 3.0). In
version 1.8 it overwrites (!) the file.

OK, I see that this is solved with the current version, but I would like
to know how wget <1.9 actually was able to overwrite the file? How did
it fool the shell?

This workaround works fine with any version:

        wget -O - http://www.w3c.org | cat >> test

It seems that wget 1.8 was sending something that causes overwriting the
file and that was filtered by cat.

Any idea of any unknown mystic power wget used to have? :-)

Greetings,
Claus

Reply via email to