shell输出标准时间格式

输出标准时间格式,注意date和“+”号之间要有空格。

currTime=$(date +"%Y-%m-%d %T")
echo $currTime
#输出结果

2018-10-10 15:26:34

猜你喜欢

转载自blog.csdn.net/qq_34500270/article/details/82997900
今日推荐