currTime=$(date +"%s")#当前时间戳 currTime=$(date +"%Y-%m-%d %T") echo $currTime #输出结果 2020-10-10 15:26:34