Tuesday, 20 February 2018

execute a shell command in lots of directories(Credit to Shriharsh)

http://blog.shriharshmishra.com/shell,bash/2018/01/03/Shell-Trick.html
Nice trick done by collegue Shriharsh and below is command pasting again incase he removes his blog

for d in ./*/ ; do (cd "$d" && mvn clean); done The above for-loop would invoke mvn clean in each folder of the directory list defined by the path ./*/.

No comments: