I need to have files from many directories in a for loop. As for now, I have the following code:
for f in ./test1/*; ... for f in ./test2/*; ... for f in ./t
Try for f in ./{test1,test2,test3}/* or for f in ./*/* depending on what you want.
for f in ./{test1,test2,test3}/*
for f in ./*/*