Hi,
I am trying to caluate the time elasped by the job to run.For that i have used the following command:
I have one file which contains the following
more start.txt
991 STARTED Fri Aug 10
14:04:20 2007
Starting Job JOB_NAME. (...)
1036 STARTED Fri Aug 10
14:04:31 2007
Finished Job JOB_NAME.
From this file i am taking the timing by the following commands:
firsttime=`more start.txt |head -1 |cut -d' ' -f4`
secondtime=`more start.txt |tail -2 |cut -d' ' -f4`
-From this i have got two variable with valu as :
Firsttime=14:04:20
secondtime=14:04:31
---I want the diifrence og this ..means for how long this job was running...for this i have been using "expr" command it gives me folowing error:
timediff=`expr $secondtime - $firsttime`
expr: non-numeric argument
Can anybody help to find the time difference..any other command??
I am using korn shell.....