grep help

Bill Campbell freebsd at celestial.com
Wed Jan 5 20:43:39 PST 2005


On Wed, Jan 05, 2005, Tillman Hodgson 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 

You should probably single quote the pattern at the '^' character is an
archaic synonym for the pipe symbol, and the * may be expanded by the
shell.

Bill
--
INTERNET:   bill at Celestial.COM  Bill Campbell; Celestial Systems, Inc.
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``Many citizens because of their respect for what only appears to be a law
are cunningly coerced into waiving their rights due to ignorance.''
    -- U.S. v. Minker


More information about the freebsd-questions mailing list