How do I use a pipe in the exec parameter for a find command?

前端 未结 6 2043
孤街浪徒
孤街浪徒 2020-12-13 01:44

I\'m trying to construct a find command to process a bunch of files in a directory using two different executables. Unfortunately, -exec on find doesn\'t allow

6条回答
  •  悲&欢浪女
    2020-12-13 02:04

    Using find command for this type of a task is maybe not the best alternative. I use the following command frequently to find files that contain the requested information:

    for i in dist/*.jar; do echo ">> $i"; jar -tf "$i" | grep BeanException; done
    

提交回复
热议问题