Hi,
i have 600 or more file on my server and from this 600 files i want to make one file. i have written this script
SPATH=/etlstg/DAT
TPATH=/etlstg/DAT/DAT_PROCESSED
FILE_DATE=`TZ=CST+24 date +20%y%m%d`
a1=0
while [ $a1 -le 9 ]
do
a2=0
while [ $a2 -le 9 ]
do
a3=0
while [ $a3 -le 9 ]
do
a4=0
while [ $a4 -le 9 ]
do
cat $SPATH/dat$FILE_DATE_*_[$a1][$a2][$a3][$a4]* >> $TPATH/dat$FILE_DATE.txt
a4=\`echo $a4\+1|bc\`
done
a3=\`echo $a3\+1|bc\`
done
a2=\`echo $a2\+1|bc\`
done
a1=`echo $a1+1|bc`
done
This script seems to work fine, but i m not able to validated it
I also want to maintain a log where i can enter the file count. can anyone help me to modify this script???