bash: -exec in find command and &

后端 未结 2 2012
栀梦
栀梦 2021-02-14 20:16

I want to run:

./my_script.py a_file &

... on all files in the current folder that end with .my_format, so I do:



        
2条回答
  •  日久生厌
    2021-02-14 21:01

    Try this find command:

    find . -type f -name "*.my_format" -exec bash -c './my_script "$1" &' - '{}' \;
    

提交回复
热议问题