NOW=$(date +"%Y%m%d")
N=`expr $NOW - 1`
==============================
計算每個月的最後一天
=============================
YEAR=`date +%Y`
MONTH=`date +%m`
DAYS=`cal $MONTH $YEAR | grep -v "$YEAR" | grep -v "Tu"`
for day in $DAYS
do
LAST=$day
done
echo $LAST
沒有留言:
張貼留言