藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 系統管理


    

藍森林 http://www.lslnet.com 2006年8月08日 13:08


如何用shell取昨天的日期?

如何用shell取昨天的日期?

如何用shell取昨天的日期?

myyear=`date|cut -c 25-28`
mymonth=`date +%D| cut -c 1-2`
myday=`date +%D|cut -c 4-5`
update=$myyear$mymonth$myday
echo `expr $update - 1 `

如何用shell取昨天的日期?

:roll: 那1日的昨天豈非是0日?

如何用shell取昨天的日期?

沒有考慮到這個細節。

如何用shell取昨天的日期?

參考shell版的這篇文章:
http://www.www.lslnet.com/linux/jh/24/9178.html



Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com