I recently migrated my workflow from a mess that is grep, sed, and perl, 
all with different options, incompatible behavior and regexps, to just ack 
and perl¹. I'm happy so far, but there's one thing I miss: ability for 
"ack" to execute a command on files with matches. This can be worked around 
with xargs, e.g.:

    ack -l --print0 pattern | xargs -r0 perl -i -pe 
's/pattern/replacement/g'

Unfortunately "xargs" is a limited workaround: it's kind of complex, and I 
afraid it may break if it match number of files more than ARG_MAX xargs 
variable.

It would be great if "ack" instead supported an "--exec" option to execute 
a command on match.

P.S.: The "contributing" says I need to post the request here first.

1: https://github.com/Hi-Angel/notes-backup/blob/master/perl.md

-- 
You received this message because you are subscribed to the Google Groups "ack 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/ack-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to