KES wrote:
> Thx. This help, but seems ugly. Because of I can miss other maybe
> usefull errors ((
> ping -q  2>/dev/null
> Any other suggestions?

ping -q 2>&1 1>/dev/null | grep -v 'ping: sendto: No route to host' >&2

Send ping stderr to stdout, throw away ping stdout, use grep to suppress
the error you don't care about, and optionally, write any other error
messages to stderr (mostly useful if this is wrapped up in some kind of
function that may or may not have its stdout redirected).

Chris Cowart
Network Technical Lead
Network & Infrastructure Services, RSSP-IT
UC Berkeley

Attachment: pgpal09kyEInq.pgp
Description: PGP signature

Reply via email to