Results 1 to 2 of 2

Thread: script wait untill successful ping

Hybrid View

  1. #1
    Join Date
    Jan 2013
    Beans
    62

    Question script wait untill successful ping

    Hi all,

    my need is to run particular command but only after ping google.com is successful. How do I perform it?

  2. #2
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: script wait untill successful ping

    Quote Originally Posted by marchelloUA View Post
    Hi all,

    my need is to run particular command but only after ping google.com is successful. How do I perform it?
    hi
    you can use: ping -c 1 -W 5 www.google.de
    check the return code of ping: $? = 0 success, $? = 1 fault.
    for further information see: man ping
    ciao
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •