I am trying to make a small shell script.In this it will got directory as per variable & run the find command on that directory.There are 120 + directories & not sure all of them are mounted.So the issue is if the directory doesent exists my loops gets terminated. so is there any was that it just show me the error & continue looping.
All the directories are on root FS.I have specified all the directires in a file /tmp/filer1
##########################
while read inputline
do
cd $inputline
#pwd
find . -size 0 -type l -exec ls -l {} \;>>/mot/systems/filer_bug/$inputline&
done</tmp/filer1
while read inputline
do
if [ -d $inputline ]
then
cd $inputline
#pwd
find . -size 0 -type l -exec ls -l {} \;>>/mot/systems/filer_bug/$inputline&
else
echo "$inputline not found"
fi
done</tmp/filer1