This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

xargs gives grep/gawk too much


I get the following error message:
	xargs: grep: Argument list too long
I've also gotten an equivalent error from xargs/gawk.

Of course, the whole idea of xargs is to avoid this error.  If I'm doing
something wrong, I'd appreciate some hints of what I am doing wrong or
how to avoid this (other than "-s").  Otherwise, I suppose that this is
a bug report.

The grep pipe, run under bash, that generates the error message is as
follows:

	$ echo path/* | \
		tr ' ' '\n' | \
		grep -v -e '\*' | \
		xargs -r grep -l -e "error '1234567890'" | \
		rest_of_pipe

Asking xargs to report on its limits:

	$ echo path/* | \
		tr ' ' '\n' | \
		xargs --show-limits grep -e I_do_not_want_output
	Your environment variables take up 2174 bytes
	POSIX lower and upper limits on argument length: 2048, 1046528
	Maximum length of command we could actually use: 1044354
	Size of command buffer we are actually using: 34942

Everything should be up to date.  cygcheck.out is attached.  Let me know
if you want any other information.

Attachment: cygcheck.out
Description: cygcheck.out

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]