This isn\'t working. Can this be done in find? Or do I need to xargs?
find -name \'file_*\' -follow -type f -exec zcat {} \\| agrep -dEOE \'grep\' \\;
If you are looking for a simple alternative, this can be done using a loop:
for i in $(find -name 'file_*' -follow -type f); do
zcat $i | agrep -dEOE 'grep'
done
or, more general and easy to understand form:
for i in $(YOUR_FIND_COMMAND); do
YOUR_EXEC_COMMAND_AND_PIPES
done
and replace any {} by $i in YOUR_EXEC_COMMAND_AND_PIPES