[oclug] Help with Awk
Dave Lewis
dave at dsl-co.com
Wed Apr 25 01:22:35 EDT 2001
k.. I'm lost.. I'm trying to use awk to extract the xx.xxx.xxx.xx ip (for
example) from a ping request. it's to let me know if one of my machines
ip's has changed or not. if I ping the host name and get a different ip
than what I expect I know it has changed.. so I figure if I can extract it
using awk and put it into a variable and compare it with an existing one,
that should work.. the only problem is that I can't seem to get awk to
extract it ???
can anyone suggest the command string to use with awk to extract that ip ?
PING host (xx.xxx.xxx.xx) from
yy.yy.yy.yy : 56(84) bytes of data.
64 bytes from host (xx.xxx.xxx.xx): icmp_seq=0 ttl=243 time=65.3 ms
--- host ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 65.3/65.3/65.3 ms
Thanks....
--
Dave Lewis
Dlewis at ottawa.com
More information about the OCLUG
mailing list