On 21 May 2002, Ed Sawicki wrote: > I have log files that I want to grep to extract only log > entries that meet the following requirement: > > string1 and (string2 or string3) > > Is there a better way? Better? Not my call. Workable? Yep: perl -ne 'print if /string1/ && /string2|string3/' logfile.txt --Paul Heinlein <heinlein at attbi.com>