shell输出执行时间
#!/bin/bash
startTime_s=date +%s
endTime_s=date +%s
sumTime=$[ $endTime_s - $startTime_s ]
echo "$startTime ---> $endTime" "Total:$sumTime seconds"
startTime=date +%Y%m%d-%H:%M:%S
endTime=date +%Y%m%d-%H:%M:%S
欢迎来撩 :shell 编程从0到1