[olug] ideas??

Dave Weis djweis at internetsolver.com
Fri Jul 15 19:29:59 UTC 2005


Noel Leistad wrote:
> Is this something obvious....
> 
> have a script that calls grep ~phrase~ /path to files/*|tail
> 
> if I put script in directory in path, I get
> "/bin/grep: Augument list too long"
> 
> if I C/P line from script and execute directly in /path to files/ as
> grep ~phrase~ *
> 
> I get valid response (at least until file count in directory goes to high)

I usually use something like this:

find path -exec grep -H {} \;

So you could use

find /path/to/files -exec grep -H {} \;

find is a very versatile program and can do substantially more than you 
would think.

dave



More information about the OLUG mailing list