Why does recursive function go though only one sub directory

I have found the answer to get my code to work but I want to know why it works and my code doesn’t rFunc() { for d in *; do if [ -d "$d" ]; then cd "$d" rFunc fi #Do Something done } This code will go though only one sub directory but if… Read More Why does recursive function go though only one sub directory