How to calculate time elapsed in unix shell script assuming I have two variables in time format of yyyymmdd hh:mm:ss
for example, i need to calculate the time elapsed of:
var1="20061010 12:15:35"
var2="20061011 1:15:32"
Just want to calculate the time difference betweeb var2 and var1.
Thanks!
for example, i need to calculate the time elapsed of:
var1="20061010 12:15:35"
var2="20061011 1:15:32"
Just want to calculate the time difference betweeb var2 and var1.
Thanks!