dateコマンドを使用して来週を印刷するには?
date +"This is week: %U of %Y, Sprint: %y(W%U-%U)"
出力は
This is week: 04 of 2017, Sprint: 17(W04-05)
変える
This is week: 04 of 2017, Sprint: 17(W04-04)
答え1
GNUの使用date
:
date +"This is week: %U of %Y, Sprint: %y(W%U-$(date -d 'now + 7 days' +%U))"
または:
date +"This is week: %U of %Y, Sprint: %y(W%U-$(date -d 'next week 12:00' +%U))"