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

posted @ 2017-09-29 18:45  kakaisgood  阅读(146)  评论(0编辑  收藏  举报