[小技巧]T38. 如何判断当前日期是否为月末最后1天?

0 views
Skip to first unread message

陈学芹

unread,
Sep 1, 2008, 10:13:05 AM9/1/08
to 福州linux用户组
T38. 如何判断当前日期是否为月末最后1天?

利用date,判断明天否为1号

tday=$(date -d tomorrow +%d)
if [ $tday == "01" ]; then
echo "Today is last day of this month"
fi


--
/*
*@author: chen xueqin
*@email: robb...@gmail.com
*@see: http://robbie.bokee.com
*@see: http://groups.google.com/group/fzlug
*@love: freedom,tux,open source
*/

Reply all
Reply to author
Forward
0 new messages