Date: Wed, 5 Jan 2005 20:45:25 -0800 From: cape canaveral <somniosus@gmail.com> To: Tillman Hodgson <tillman@seekingfire.com> Cc: FreeBSD - questions <questions@freebsd.org> Subject: Re: grep help Message-ID: <f2f44cff050105204568cf3629@mail.gmail.com> In-Reply-To: <20050106043154.GI42299@seekingfire.com> References: <41DCBE47.4070402@att.net> <20050106043154.GI42299@seekingfire.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 5 Jan 2005 22:31:54 -0600, Tillman Hodgson <tillman@seekingfire.com> 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 1.2.3.4. 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 ^[^1.2.3.4]*$ 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. > > -T > > -- > "'Way back, I set myself to be a happy man, and made it." > -- Louis Armstrong > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > grep "1.2.3.4" logifle.log works for me (unless you were trying to pull all IPs in the form of a.b.c.d ?) -Aaron
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f2f44cff050105204568cf3629>