I am having the script works as below
If the folder is not create, the file are stored in a temporary folder to wait for the folder creation.
The Script tries and tries again to reach the folder.
The result is that the log file grows and some time is also geting wasted in the operation.
can somebody please advise or help on how to come up with this situation or restrict it. file writing log to file.
below is the sample script.
cd $mywaitdir
for file in $(find . -type f -name "*" | grep -i zip )
do
filedest=${myroot}/`dirname $file`
if [ -d ${filedest} ]
then
mv $file $filedest
if [ $? -eq 0 ]
then
if [ "$DEBUG" != "Y" ]
then
rm -f $file
fi
fi
else
echo "$date ERROR folder does not exist>> mynofolder.log
fi
done