Date: Sun, 6 Jan 2002 00:30:43 +0100 (CET) From: Oliver Fromme <olli@secnetix.de> To: freebsd-hackers@FreeBSD.ORG Subject: Re: Overriding ARG_MAX Message-ID: <200201052330.g05NUhc62650@lurza.secnetix.de> In-Reply-To: <200201052048.g05KmeW55815@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Sorry for replying to myself, but this just came to my mind ... Oliver Fromme <olli@secnetix.de> wrote: > David Miller <dmiller@sparks.net> wrote: > > What I usually want to do is something more like ls *.out |wc -l > > ls | grep '\.out$' | wc -l A smaller solution would be: echo *.out | wc -w Note that the ARG_MAX limitation does not apply to echo, because it is a shell-builtin. Similarly: > > or grep something *.data > > ls | grep '\.data$' | xargs grep something echo *.data | xargs grep something > > or cat *.foo | grep something. > > ls | grep '\.foo$' | xargs cat | grep something echo *.foo | xargs cat | grep something (Yes, I know, useless cat. The same can probably achieved like this: echo *.foo | xargs grep -h something ) Regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "All that we see or seem is just a dream within a dream" (E. A. Poe) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201052330.g05NUhc62650>