Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はUNIXが初めてで、いくつかの演習を行っています.私の目標は、今日の日付を計算するよりもnを引いたnをパラメータとして数値を取得することです.
(TODAY -N = answer)
答えは次のように表示されます
date +%a-%b-%d-%Y
どうすれば簡単にできますか?前もって感謝します :)
について話してるの、
n=5 date +%a-%b-%d-%Y --date="$n days ago"
?
与えるFri-Oct-11-2013
Fri-Oct-11-2013
出典:日付のマンページ