-   Linux - General (
-   -   computing time duration (

tmaxx 04-29-2008 10:14 AM

computing time duration
hi can anyone help on a script which computes time duration:


a. database archive update time = 15:25
b. current system = 17:15


thanks in advance

chrism01 04-29-2008 08:37 PM

This should really be in the prog forum.

You could write a script in bash, eg cvt hrs to mins, calc total time, then subtract results in mins.
To get hrs

echo "17:15"|cut -d':' -f1
mins=$((17 * 60))


Get started and come back to us if you get stuck.
Here's a some good refs:

All times are GMT -5. The time now is 07:43 PM.