> 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