grep help RESOLVED
jayobrien at att.net
Wed Jan 5 21:07:35 PST 2005
Tillman Hodgson (and others!)wrote:
> On Wed, Jan 05, 2005 at 08:27:51PM -0800, Jay O'Brien wrote:
>>I want to look at all of the lines in a FreeBSD log file that do not
>>have an entry from an IP, example 126.96.36.199. Some basic help with the
>>use of grep would be appreciated. This is one of the arguments I've
>>tried that didn't work:
>>grep ^[^188.8.131.52]*$ logfile.log
> I like `grep -v` for "not" operations. Also note that "." is itself a
> special character.
> grep -v 1\.2\.3\.4 logfile.log
> might be closer to what you want.
Thank you! The problem I was having was that I completely overlooked
the fact that "." needs to be escaped.
grep -v 1\.2\.3\.4 logfile.log as you suggested, works fine. I'm
looking at an apache access log, and I want to exclude accesses
that I made from my IP.
More information about the freebsd-questions