cat sourcefile|sed "s:@PATH@:$userPath:g" >temp
echo find /opt/timer/errorlog/ -name \*.txt -mtime -1
for TxtFile in $(find /opt/timer/errorlog/ -name \*.txt -mtime -1)
do
echo $TxtFile
cat $TxtFile
while read line
do
rm -rf /opt/$line
code=$?
echo $code
if [ "$code" -eq "0" ];then
echo "delete successful"
succ="$line"" successful"
echo $succ
echo sed -i -e "s:${line}:${succ}:g" $TxtFile
sed -i -e "s:${line}:${succ}:g" $TxtFile
else
echo "delete fail"
fi
done<$TxtFile
done