I am trying to recurse into folders and then run commands on them, using bash script. Any suggestions?
Bash 4.0 introduced the globstar option, so a construct like:
for f in mydir/**/*
do
# operations here
done
...will act recursively on whatever lands in $f. Turn this on with "shopt -s globstar", otherwise the ** will be treated as a singular *.
Found this gem today at http://www.linuxjournal.com/content/globstar-new-bash-globbing-option, after being inspired by the zsh construct (which I have enabled by default).