shell script to recursively process directory and its sub directories