gdg shell
export TIMESTAMP=`date +%Y%m%d_%H%M%S`
GDGFILE=file1_${TIMESTAMP}.txt
suffix=${GDGFILE#*_}
prefix=${suffix%%_*}
echo $prefix
CURRENT=`date -d -7day +%Y%m%d`
echo $CURRENT
if [[ $prefix -gt $CURRENT ]]
then
echo 'within'
fi
export TIMESTAMP=`date +%Y%m%d_%H%M%S`
GDGFILE=file1_${TIMESTAMP}.txt
suffix=${GDGFILE#*_}
prefix=${suffix%%_*}
echo $prefix
CURRENT=`date -d -7day +%Y%m%d`
echo $CURRENT
if [[ $prefix -gt $CURRENT ]]
then
echo 'within'
fi