检查一组代码从执行开始到执行完毕的时间。
#!/bin/bash start=$(date +%s) commands; statements; end=$(date +%s) difference=$(( end - start )) echo Time taken to execute commands is $difference seconds.
16/11/2017 shell学习笔记
原文:http://inputerror.blog.51cto.com/13472043/1982441