From owner-freebsd-questions@FreeBSD.ORG Thu Jan 6 04:31:55 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 816F716A4CE for ; Thu, 6 Jan 2005 04:31:55 +0000 (GMT) Received: from mail.seekingfire.com (caliban.rospa.ca [24.72.10.209]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3866E43D3F for ; Thu, 6 Jan 2005 04:31:55 +0000 (GMT) (envelope-from tillman@seekingfire.com) Received: by mail.seekingfire.com (Postfix, from userid 500) id 8CB7A112; Wed, 5 Jan 2005 22:31:54 -0600 (CST) Date: Wed, 5 Jan 2005 22:31:54 -0600 From: Tillman Hodgson To: FreeBSD - questions Message-ID: <20050106043154.GI42299@seekingfire.com> References: <41DCBE47.4070402@att.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41DCBE47.4070402@att.net> X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . X-GPG-Key-ID: 828AFC7B X-GPG-Fingerprint: 5584 14BA C9EB 1524 0E68 F543 0F0A 7FBC 828A FC7B X-GPG-Key: http://www.seekingfire.com/personal/gpg_key.asc X-Urban-Legend: There is lots of hidden information in headers X-Tillman-rules: yes he does User-Agent: Mutt/1.5.6i Subject: Re: grep help X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jan 2005 04:31:55 -0000 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