Suggestion: how about adding -exec option?

2 views
Skip to first unread message

Raj A. Singh

unread,
Nov 24, 2009, 2:58:15 AM11/24/09
to ack-...@googlegroups.com
This can be helpful while processing large number of files in a directory, sufficiently large to throw "Argument list too long" error. Suppose a large number of files need to be moved or deleted from such a directory having a specific pattern.

Would it be useful to have -exec option in ack where it will execute specified command of each file matched?

Andy Lester

unread,
Nov 24, 2009, 11:06:19 AM11/24/09
to ack-...@googlegroups.com

On Nov 24, 2009, at 1:58 AM, Raj A. Singh wrote:

> Would it be useful to have -exec option in ack where it will execute
> specified command of each file matched?
>
>

I've resisted going down that road. That's what xargs is for.

xoxo,
Andy


--
Andy Lester => an...@petdance.com => www.theworkinggeek.com => AIM:petdance




Elliot Shank

unread,
Nov 24, 2009, 3:30:08 PM11/24/09
to ack-...@googlegroups.com
Raj A. Singh wrote:
> Would it be useful to have -exec option in ack where it will execute
> specified command of each file matched?

ack -print0 -l blah | xargs -0 blarf
Reply all
Reply to author
Forward
0 new messages