Andrew Ganim on 10 Oct 2008 14:29:46 -0700 |
>egrep '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}\|{2}' file.csv > That should have been: egrep '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\|{2}' file.csv Also it's worth noting that if this needs to be put to serious use, the [0-9]{1,3} chunks don't enforce that it's a valid IP address. That will match 999.999.999.999|| quite happily. ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|