Question: how to calculate time difference in shell script?
Answer: Really simple, take the number of seconds at the start, then take the number of seconds at the end, and print the difference in minutes:seconds. You could also use gawk .