I am trying to recurse into folders and then run commands on them, using bash script. Any suggestions?
Something like this should achieve your goal:
function RecurseDirs { oldIFS=$IFS IFS=$'\n' for f in "$@" do -----your activity here----- if [[ -d "${f}" ]]; then cd "${f}" RecurseDirs $(ls -1 ".") cd .. fi done IFS=$oldIFS }