1. 程式人生 > >16/11/2017 shell學習筆記

16/11/2017 shell學習筆記

學習筆記 shell

  1. 檢查一組代碼從執行開始到執行完畢的時間。

#!/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學習筆記