Re: script or other suggestion
- From: Cameron Simpson <cs@xxxxxxxxxx>
- Date: Fri, 23 Nov 2007 08:09:45 +1100
On 22Nov2007 15:35, chloe K <chloekcy2000@xxxxxxxx> wrote:
| I have ip list in my network
| I need to check which ip is unused
| what is better solution?
|
| Write the ping script or use other command
|
| eg:
|
| for i in ip.txt
| ping -c 3 $i
That would be:
for i in `cat ip.txt`
do ping -c 3 $i || { echo "IP $i is not in use."; break; }
done
Of course, if a machine happens to be down/off, if will look
like its IP is not in use...
You could possibly do something clever with nmap or "ping -b",
but your approach is simple and effective.
--
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/
Getting a SCSI chain working is perfectly simple if you remember that there
must be exactly three terminations: one on one end of the cable, one on the
far end, and the goat, terminated over the SCSI chain with a silver-handled
knife whilst burning *black* candles. - Anthony DeBoer
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
- Follow-Ups:
- RE: script or other suggestion
- From: Broekman, Maarten
- RE: script or other suggestion
- References:
- script or other suggestion
- From: chloe K
- script or other suggestion
- Prev by Date: script or other suggestion
- Next by Date: RH 2.1 AS on IBM HS20 Blade
- Previous by thread: script or other suggestion
- Next by thread: RE: script or other suggestion
- Index(es):
Relevant Pages
- Re: verify the ip status
... Write the ping script or use other command ... arping has some option
which will tell you if an ip address is already present on the network. ... To UNSUBSCRIBE,
email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ... (Debian-User) - script or other suggestion
... I have ip list in my network ... Write the ping script or use other command
... Everybody needs a Flickr Pro Account! ... (RedHat) - verify the ip status
... I have ip list in my network ... Write the ping script or use other command
... Looking for the perfect gift? ... (Debian-User)