测试脚本运行时间的shell
时间:2010-12-23 来源:sunzhao_1985
#!/bin/bash
start=`date '+%Y-%m-%d %H:%M:%S'`
sleep 2
end='date'
end=`date '+%Y-%m-%d %H:%M:%S'`
echo "start is:"$start
echo "end is:"$end
start=`date '+%Y-%m-%d %H:%M:%S'`
sleep 2
end='date'
end=`date '+%Y-%m-%d %H:%M:%S'`
echo "start is:"$start
echo "end is:"$end
相关阅读 更多 +