linux shell 当前时间

#!/bin/bash
datestr=`date --date='today' "+%Y-%m-%d %H:%M:%S"`
echo $datestr

原文地址:https://www.cnblogs.com/jackspider/p/3899599.html