PCDVD數位科技討論區

PCDVD數位科技討論區 (https://www.pcdvd.com.tw/index.php)
-   七嘴八舌異言堂 (https://www.pcdvd.com.tw/forumdisplay.php?f=12)
-   -   請問UNIX系統中,年份怎麼以後3碼表示阿… (https://www.pcdvd.com.tw/showthread.php?t=626927)

tainanalden 2006-06-07 10:44 AM

請問UNIX系統中,年份怎麼以後3碼表示阿…
 
請問UNIX系統中,年份怎麼以後3碼表示阿…

如2006 僅顯示 006

以月為影 2006-06-07 01:12 PM

perl -pe "s/\d(.*)/$1/"

wj1326 2006-06-07 02:22 PM

eval "echo | awk '{print substr(" "\"`date +%Y`\"" ",2,3)}'"

AdaHsu 2006-06-08 11:25 AM

$ date +%Y | sed -e 's/^.//'
006


所有的時間均為GMT +8。 現在的時間是06:20 PM.

vBulletin Version 3.0.1
powered_by_vbulletin 2025。