Linux 计算shell脚本的执行时间 #!/bin/bash start=`date +%s` ls -al >/dev/null 2>&1sleep 5s end=`date +%s` dif=$[ end - start ] echo $dif