mathmatical expression

Hi All,

How can I execute the below statement using an awk or "expr"??
time=14400
hours=2
mins=160
secs=`expr((((time/ 3600) - hours) * 60) - mins) * 60

Thanks in advance
JS

in ksh shell:

sec=$(  (((($time/ 3600) - $hours) * 60) - $mins) * 60  )

Hi Jim,
Thanks for ur time..
But it is not working still

define not working; it is your formula, so you are the one who knows what you need.

secs=`expr \( \( $time / 360 - $hours \) \* 60 - $mins \) \* 60`

Thanks a lot Krish ...

I tried using the back slash beore .. but it didnot work ...

Bit now its working ..i guess i missed a backslash some where ..

Thank you so much !!