Re: squeeze grep is broken
On Sat, Jun 06, 2009 at 11:57:56AM -0400, Jude DaShiell wrote:
> I tried a command line like: grep -in "print-installation-architecture" *
> | less <cr> and got me a surprise. I was in /var/lib/dpkg/info when I
> did this and was curious to know what other scripts might have that
> deprecated command in them. Grep responded with an undocumented error of
> argument list too long. So I do man grep to find out what limitations
> exist for argument list and I search for too long in the man page and
> come up empty. I'll try rgrep and see if that works any better next.
This is well known issue.
There is limitation for command line length. (32K or something like it
for bash. Some shell are much shorter.)
> Apparently grep may be kept around for historical reasons.
No. You are hitting shell limitation.
There is standard solution to problem. Use a basic Unix command "xargs".