dateコマンド

dateコマンド

# 現在日時
$ date
Sat Feb  9 12:26:00 DST 2019
 
# +でフォーマットを指定できる
$ date +%m月%d日
02月09日
 
# %-でゼロ詰めをしない
$ date +%-m月%-d日
29