Bug in /usr/bin/ping

2008-05-28 Thread Tom Van Looy
Hi /usr/bin/ping does not return the correct return code on ping failure. See example below, the .8 host does not exist, .9 does exist: $ ping 56 1 192.168.20.9 /dev/null ; echo $? 0 $ ping 56 1 192.168.20.8 /dev/null ; echo $? 0 I checked Linux and Windows versions of ping and they work

RE: Bug in /usr/bin/ping

2008-05-28 Thread Dave Korn
Tom Van Looy wrote on 28 May 2008 11:12: Hi /usr/bin/ping does not return the correct return code on ping failure. See example below, the .8 host does not exist, .9 does exist: $ ping 56 1 192.168.20.9 /dev/null ; echo $? 0 $ ping 56 1 192.168.20.8 /dev/null ; echo $? 0 I didn't

RE: Bug in /usr/bin/ping

2008-05-28 Thread Tom Van Looy
Didn't read the --help, either, as far as I can see. Ehrr... right, my fault. Wrong copy from my terminal. But that does not change the ping behavior ... $ /usr/bin/ping 192.168.20.9 56 1 ; echo $? PING 192.168.20.9 (192.168.20.9): 56 data bytes 64 bytes from 192.168.20.9: icmp_seq=0 ttl=64

Re: Bug in /usr/bin/ping

2008-05-28 Thread Tom Van Looy
I looked a little further and saw that this is a port that I probably just installed to try it out and hoped it had GNU ping arguments (so bash scripts are portable between Linux and Cygwin). Anyway, I don't know what happend but it's a 4.3BSD utility. Even 4.3BSD derived systems do the return

RE: Bug in /usr/bin/ping

2008-05-28 Thread Dave Korn
Tom Van Looy wrote on 28 May 2008 13:52: I looked a little further and saw that this is a port that I probably just installed to try it out and hoped it had GNU ping arguments (so bash scripts are portable between Linux and Cygwin). Anyway, I don't know what happend but it's a 4.3BSD