Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Bash script to ping any website I want


    I want to ping IGN.com, Google.com, Linuxforums.com and whatever website in bash

    ping -c 1 69.10.25.46

  2. #2
    What's your question? Do you want to ping multiple sites at the same time?

    You can just substitute the IP address for the domain address
    example:
    Code:
    ping -c 1 www.linxforums.org

  3. #3
    I want a bash script that has a input where you would add the website or ip address into it and it pings for you.

  4. $spacer_open
    $spacer_close
  5. #4
    Oh, okay.

    Code:
    # Ask the question
    echo -e "What website would you like to ping? \c"
    
    # Assign the answer to a variable
    read website
    
    # Ping the website
    ping -c 1 $website

  6. #5
    Quote Originally Posted by Cancerous View Post
    Oh, okay.

    Code:
    # Ask the question
    echo -e "What website would you like to ping? \c"
    
    # Assign the answer to a variable
    read website
    
    # Ping the website
    ping -c 1 $website
    Create ping which will ask the user to enter the a web site or address they want to ping

Posting Permissions

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