Shell脚本计算执行时间

#!/usr/bin/env bash

START=`date +%s`;

# your code
sleep 3s;


END=`date +%s`;
time=$[ END - START ]
echo "$time s, done"