grep help

joseph kacmarcik freebsd-questions at chubbo.net
Wed Jan 5 20:43:54 PST 2005


> grep ^[^1.2.3.4]*$ logfile.log

to not match, use: grep -v 1.2.3.4 logfile.log

-v, --invert-match
Invert the sense of matching, to select non-matching lines.

when there are multiple patterns you don't want to see, try:

egrep -v '1.2.3.4|5.6.7.8' logfile.log

joe


More information about the freebsd-questions mailing list