I'm somewhat new to Ubuntu and I installed it to do a small project. I extracted about 30 tar archives with packages in them and now I have a lot of directories, each containing the source code and a configure
file.
How can I quickly loop through all the subdirectories and run the configure shell script in each one?
So far, I have tried creating a shell script (called i.sh) that loops through the folders and runs the configure script, but to no avail. Is there any way it can be corrected? And how would I execute it?
find . -type d | while read d; do
./configure
make
sudo make install
done
I executed it by going into the terminal and running sudo bash ./i.sh
.
Thank you!
cd
into the directory before runningconfigure
. Remember tocd
back to the original directory at the end of the loop.