Getting IP's out of a txt file

From: Alistair McKeown (Alistair.Mckeown@jacobsrimell.com)
Date: Fri Jul 02 2004 - 07:22:57 EDT


Does anyone know how I can get just the IP address out from lots of entries,
below is just two of them, there is about 2000 like this. Is there a flash
grep which can be used?

bash-2.03$ cat b.txt
job_xml
S<job jobID="77042" type="SNMPSet"><task taskID="1"
type="SNMPReset_DOCSISExperimental"><devicedescriptor><devicetype><attr
name="type">snmp</attr></devicetype><deviceinstance><attr
name="hostname">10.138.150.188</attr><attr name="hostport">161</attr></dE
S<job jobID="90713" type="SNMPSet"><task taskID="1"
type="SNMPReset_DOCSIS"><devicedescriptor><devicetype><attr
name="type">snmp</attr></devicetype><deviceinstance><attr
name="hostname">10.97.17.21</attr><attr
name="hostport">161</attr></deviceinstance><E

Just need the Ip address.

regards,

Alistair.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:28:59 EDT