The shell expands the *, not grep.  You want to use either xargs or a
script:

for file in `ls -1`
do
  grep "string" $file
done

xargs is really the solution though, check the manual.

Adam Maloney
Systems Administrator
Sihope Communications

On Tue, 26 Sep 2000, Subba Rao wrote:

> Hi
> 
> I have a directory of 10000+ text files and would like to search for
> some strings in these files. When I tried using "grep" command with an
> asterisk, I get the error message somthing to the effect,
> 
> 	"File argument list too long"
> 
> What is the file argument limit for grep? I guess you need the grep source
> for this. I did not find any information in the man page.
> 
> Are there any other recommended tools to search through such large list of
> files?
> 
> Thank you in advance.
> 
> Subba Rao
> subb3 at attglobal.net
> http://pws.prserv.net/truemax/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe at mn-linux.org
> For additional commands, e-mail: tclug-list-help at mn-linux.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tclug-list-unsubscribe at mn-linux.org
For additional commands, e-mail: tclug-list-help at mn-linux.org