From: Martin on
no.top.post(a)gmail.com wrote:

> and then what's the utility to:
> <list the common lines of: fishFile, dogFile, katFile> ??

That would be grep, too, but at the expense of bad time complexity. If the
number of lines is large I'd write a small perl script for that or -- better
still -- for the -exec.

Martin

From: Helmut Hullen on
Hallo, no.top.post,

Du meintest am 08.08.10:

> Various contibutors guessed at:
1>> egrep -l "dog\|cat\|fish" {}
2>> find . -exec egrep -l "\(dog\|cat\|fish\)" {} \;
3>> grep -l -e dog -e cat -e fish *
4>> find . -exec egrep -l "(dog|cat|fish)" {}
4>> find . -exec grep -l "\(dog\|cat\|fish\)" {}
4>> find . -exec grep -l -e dog -e cat -e fish {}

> and then what's the utility to:
> <list the common lines of: fishFile, dogFile, katFile> ??

"that depends!" - I don't know what you want to see. If you only want
"dog" but not "dogFile" then please add the option "-w".

Viele Gruesse
Helmut

"Ubuntu" - an African word, meaning "Slackware is too hard for me".

From: Eef Hartman on
In alt.os.linux.slackware no.top.post(a)gmail.com wrote:
> *MULTIPLE* strings are not *alternative* strings.

When they're in different expressions: yes they ARE.

So mutiple -e options ARE alternatives in sed/grep etc.
--
******************************************************************
** Eef Hartman, Delft University of Technology, dept. SSC/ICT **
** e-mail: E.J.M.Hartman(a)tudelft.nl - phone: +31-15-27 82525 **
******************************************************************