How do I include a pipe | in my linux find -exec command?

后端 未结 6 664
情深已故
情深已故 2020-11-28 17:51

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\' \\;
         


        
6条回答
  •  一生所求
    2020-11-28 18:31

    find . -name "file_*" -follow -type f -print0 | xargs -0 zcat | agrep -dEOE 'grep'
    

提交回复
热议问题