Find the answer to your Linux question:
Results 1 to 5 of 5
I want to ping IGN.com, Google.com, Linuxforums.com and whatever website in bash ping -c 1 69.10.25.46...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2012
    Posts
    4

    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
    Just Joined!
    Join Date
    May 2012
    Posts
    43
    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
    Just Joined!
    Join Date
    Aug 2012
    Posts
    4
    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. #4
    Just Joined!
    Join Date
    May 2012
    Posts
    43
    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

  5. #5
    Just Joined!
    Join Date
    Aug 2012
    Posts
    4
    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
  •