Need to remove lines that start with an IP address

Hi,

I keep having to remove lines have an IP address as the second field from my awstats logs, as it makes the processing fail.

Rather than do it individually each time (once or twice a week) it fails, I'd like to remove any lines from the file that have 3 digits and then a dot as the start of the second field as they are sure to be an IP.

The field separators are spaces

I know if the line starts with an IP I can easily do it with grep like so:

 grep -v '\^[0-9][0-9][0-9]' file > tempfile; mv tempfile file 

But this is the second field so I imagine I have to use awk, right?

Any ideas would be appreciated

yes you can use awk..

awk '$2 !~ /[0-9][0-9][0-9]./{print}' filename