Hi all,
First, my script abilility rests in /dev/null. That being said, what I am *trying* to
do is get a text file with a list of MAC addresses and the corresponding IP's for
certain ranges of IP's.
Part of my solution:
---------------------------
for i in `seq 100 120`; do
ping -c 5 -w 5 192.168.0.$1 | arp >> macadd.txt
done
---------------------------
The problem:
Each time through the loop, it continues to ping the previous address as well as the
next address thus repeating the entry in the macadd.txt file. i.e.
First entry
Heading Heading
192.168.0.100 <macaddress>
Second entry
Heading Heading
192.168.0.100 <macaddress>
192.168.0.102 <macaddress>
Third entry
Heading Heading
192.168.0.100 <macaddress>
192.168.0.102 <macaddress>
192.168.0.103 <macaddress>
and so on and so on.
My question is, does anyone know how to get it to just add the next entry to the list
in the file instead of creating a whole new list each time around and sticking it in
there?
I've looked many places and tried many things but nothing I've done elimiates this
problem.
Any advice for me?
TIA,
Tom Wilson
--
Get your free email from www.linuxmail.org
Powered by Outblaze
_______________________________________________
Linux-users mailing list - http://linux.nf/mailman/listinfo/linux-users
Subscribe/Unsubscribe info, Archives,and Digests are located at the above URL.