or download this
I have added small code which will check the condition first, if the l
+ine contain Link encap and if it found then get the ethernet address
+and ip address other wise skip the test.
...
# use /inet6? addr: ?([0-9a-f.]+)/ if you want to match IPv6-addresse
+s
}
}