I am trying to traverse all directories under the current directory using a shell script. In each of those sub directories, there is a makefile and I want to execute it. Any idea how to do ?
Try with find :
find -iname makefile -execdir make -f {} \;
That will find every file named makefile (or Makefile, or whatever different case for word makefile, thanks to thiton) (recursively) and then launch make against it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With