Ijack :
Kindly show the script that is faulting. No mind readers here.
#!/bin/bash
CURRENTDATE=2013-06
FILES=/opt/xx/xxxx/xxxx/xxxx/
for (( c=1; c<31; c++))
do
ZEROC=`printf "%02d" $c`
NEWCURRENTDATE=${CURRENTDATE}-${ZEROC}
echo "Processing for date ================> $NEWCURRENTDATE";
cd $FILES
for f in `ls -1t $FILES | grep $NEWCURRENTDATE | grep _Nightly_Log_Arc`
do
FILELIST="${FILELIST} ${FILES}$f";
done
if [ "$FILELIST" != "" ]
then
TARFILESCOMMAND="tar cvf ${FILES}${NEWCURRENTDATE}.tar$FILELIST"
GZIPTARFILES="gzip ${FILES}${NEWCURRENTDATE}.tar"
DELETEFOLDERS="rm -rf$FILELIST"
echo "Processing ....tar command ===> $TARFILESCOMMAND"
if `$TARFILESCOMMAND`
then
echo "Processing ....gzip command ====> $GZIPTARFILES"
if `$GZIPTARFILES`
then
echo "Processing ....delete command ===> $DELETEFOLDERS"
`$DELETEFOLDERS`
#gzip the files
fi
#tar the files
fi
#if file list is empty
fi
FILELIST=""