Sorry for replying to myself, but this just came to my mind ... Oliver Fromme <[EMAIL PROTECTED]> wrote: > David Miller <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message