Hi,
Thanks for your reply. I completed the code, but if you can help me to modify the code then it will be really good.
for filename in *.*
do
PTYPE=`head -1 $filename | cut -c 14-14`
##echo $PTYPE
if [ $PTYPE = 'M' ]
then
FILE_PERIOD=`head -1 $filename | cut -c 12-16`
DATA_PERIOD=`head -2 $filename | tail -1 | cut -c 11-15`
elif [ $PTYPE = 'Q' ]
then
FILE_PERIOD=`head -1 $filename | cut -c 12-15`
DATA_PERIOD=`head -2 $filename | tail -1 | cut -c 11-14`
else
echo "Period in the fie $filename is not correct : $DATA_PERIOD "
fi
if [ $FILE_PERIOD = $DATA_PERIOD ]
then echo "File $filename Loading for Period : $FILE_PERIOD "
else
echo "Wrong File for the period $FILE_PERIOD in the $filename period is $DATA_PERIOD "
fi
done
|