LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-05-2011, 03:04 AM   #1
abdelinux
LQ Newbie
 
Registered: Jun 2011
Posts: 1

Rep: Reputation: Disabled
Pinging script question


I want to make a script that pings different PC's in a network by using the last digits in the IP adresses.
For example if I use my script "./script.sh 1 50 100" it will ping to the 3 pc's with those IP adresses (192.168.129.1, 192.168.129.50 and 192.168.129.100) in my network (192.168.129.0/24).

So if I test this, for example: ./script.sh 1 50 100
I want the output to be something like this:
192.168.129.1 Ping Succes
192.168.129.50 Ping Failure
192.168.129.100 Ping Succes
2 of the 3 PC's are up: 66% is running.

Could anyone give me some help with this?
Thanks in advance.
 
Old 06-05-2011, 03:13 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
There is no point writing a script like this when tools like fping already exist which do exactly that already. Don't reinvent the wheel.

Also not a networking question at all. Moved to Linux - Newbie.

Last edited by acid_kewpie; 06-05-2011 at 03:16 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
pinging network script metallica1973 Programming 54 12-19-2007 07:59 PM
writing a shell script for scheduled pinging laucian Linux - Newbie 12 11-08-2007 05:48 AM
script for pinging servers steste Linux - Networking 12 11-16-2004 09:38 AM
Help writing a pinging bash script dehuszar Linux - Software 3 06-18-2004 02:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration