[SunHELP] Grep Help

Kovalev, Ivan sunhelp at sunhelp.org
Tue Sep 18 16:56:32 CDT 2001


rgrep is fine for subdirs, but you can have your criterias OR-ed using
egrep.

your line should look something like this

find start_dir -type f -exec egerep '(a|b|c|d)' {} /dev/null \;

This will go down recursively and also print the name of the file where a or
b or c or d is found.

Ivan

-----Original Message-----
From: Fogg, James [mailto:JFogg at vicinity.com]
Sent: Tuesday, September 18, 2001 4:44 PM
To: 'sunhelp at sunhelp.org'
Subject: RE: [SunHELP] Grep Help


I highly recommend rgrep (recursive grep), esp. since it can search
subdirectories.

> -----Original Message-----
> From: Shain Miley [mailto:smiley at tvdata.com]
> Sent: Tuesday, September 18, 2001 6:52 PM
> To: sunhelp at sunhelp.org
> Subject: [SunHELP] Grep Help
> 
> 
> Hi,
> I need to search for about 15 things (list of ip addresses 
> and hostnames) in a file useing grep.  Do I have to use grep 
> 15 different times or can I give
> multiple search options to one grep command?  I tried 'grep 
> 'a b c d e' file' but I get an error:   grep: RE error 41: No 
> remembered search string.  Any
> ideas?  i have tried using examples I found on the web but it 
> looks like that does an exact search or something other than 
> what I need.  Thanks.
> 
> Shain
> 
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
> 
_______________________________________________
SunHELP maillist  -  SunHELP at sunhelp.org
http://www.sunhelp.org/mailman/listinfo/sunhelp



More information about the SunHELP mailing list