I nee to subtract two lines which is in the format of time in shell. The time format is hh:mm:ss I used the code below to get the time.
cat /var/log/kern.log |grep usb |tail -2| awk '{print $3}'
The output of the above code is
18:23:24
18:20:20
How can I find the difference in seconds?