I am using the below while loop to read a file. while read filedo    FileFound=`find $DataDir -name $file -print 2>/dev/null`    if [ -n $FileFound ]; then        echo $FileFound >> ${runDir}/st_$Region        else            echo $file >> ${APP_HOME}/${Region}_filesnotfound_$date.txt        fidone<${Region}_${date}.txtThis while loop reads a file name and compares in the datadir to find if any match is available. if available it will put the whole path to a file. if not available it puts it to a different file. However this script is taking 2 days to complete for reading 8000 records. Is there a way to optimize it?
While loop taking a longer time to complete
shell script;shell