bash - Invalid date options in Ubuntu -
i have shell script ask system return year, 660days ago. on mac, use this:
date -j -v-660d +"%y" if run today, return 2011.
i'm moving script ubuntu machine, , receive error, stating -j , -v options invalid.
i've looked @ man page, looking equivalent options, haven't been able find solution.
any appreciated.
this should work:
$ date -d '660 days ago' +%y 2011
Comments
Post a Comment