On 13Feb2013 03:21, Suvayu Ali <fatkasuvayu+li...@gmail.com> wrote:
| I used to use netcat to check if a particular host is up or if I have
| internet connection before I run a few scripts. [...]
| Any ideas what happened to it?  What can I use as replacement?

If I want to know if I have an internet connection I look for a default
route in the output of "netstat -an", thus:

  netstat -rn | egrep '\''^(default|0\.0\.0\.0) +[1-9]'\'' >/dev/null

No default route - no general purpose internet connection.
A default route but no connectivity? Then something else is wrong that
needs fixing anyway.

Cheers,
-- 
Cameron Simpson <c...@zip.com.au>

We _like_ the starter!  Wouldn't have it any other way.  If it doesn't grind,
take it back to the dealer and make them fix it!
        - Jon N. Steiger, DoD#1038, <stei0...@mary.cs.fredonia.edu>
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to