Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ping puzzle



On Wednesday 26 March 2003 02:44 pm, John Chambers wrote:
> Here's a bizarre puzzle that I've been trying  to  solve  on  several
> linux boxen:  How does a parent process read the stderr of /bin/ping?
>
> It oughta be trivial.  But consider this ping of a  machine  that  is
> down at the moment:
>
> $ /bin/ping -n -i 10 64.28.81.46
> PING 64.28.81.46 (64.28.81.46) from 207.172.135.95 : 56 data bytes
> From 64.14.70.146: Destination Host Unreachable
> From 64.14.70.146: Destination Host Unreachable
> ...
>
> Those error messages come out on stderr.  Running under bash, I tried
> piping it to a few commands:

Are you sure?  On my system, ping  Destination Host Unreachable messages come 
on stdout.

[david at uni musicat]$ ping 66.250.33.252 > /tmp/pingout 2> /tmp/pingerr
[david at uni musicat]$ head /tmp/pingout
PING 66.250.33.252 (66.250.33.252) from 66.92.68.235 : 56(84) bytes of data.



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org