find

find accepts multiple -exec portions to the command. For example:

find . -name "*.txt" -exec echo {} \; -exec grep banana {} \;

Note that in this case the second command will only run if the first one returns successfully, 
as mentioned by @Caleb. If you want both commands to run regardless of their success or failure,
you could use this construct:
find . -name "*.txt" \( -exec echo {} \; -o -exec true \; \) -exec grep banana {} \;

https://stackoverflow.com/questions/5119946/find-exec-with-multiple-commands

 

find . -name "*.out" -type f -exec {} \;

 

clear && fswatch  --latency 0.2 --recursive --format "%f##%p" --event Updated -e ".*" -i ".*out$" ./ | clear && sudo find . -name a.out -type f -exec {} \; 2>&1

 

posted @ 2020-08-07 09:51  fndefbwefsowpvqfx  阅读(88)  评论(0编辑  收藏  举报