Hiii,
Here is the part o fmy script-
for file in $FileList
do
if [[ $(ls -l $file 2>/dev/null) = *$today* ]];
then
echo "Skips $file file. It is todays file"
if [[ $isBackup -eq 1 ]];then
cp $file $BackupLocation 2>/dev/null
cat /dev/null >$file
fi
continue
fi
if [[ $isBackUp -eq 1 ]]
then
mv $file $BackupLocation 2>/dev/null
#cat /dev/null > $file
else
rm $file $BackupLocation 2>/dev/null
#cat /dev/null >$file
fi
done
fi
The problem exists in the today's file,i need to take the backup of the today's file also and then make the content 0 of that file,but what i have writen is not doing so,can you guys give me some suggestion how i can do that.I need a quick response guys,stucked in between.If you have any doubt regarding the question then let me know i will try to clarify it.
Thanks