1

Find the script running time and subtract from sleeptime

view story
linux-howto

http://www.unix.com – HI Guys, I want to find out the script running time and subtract from sleeptime. My Script Below Give me error :- Code: #!/usr/bin/ksh timeout=100 start=$SECONDS sleep 20 end=$SECONDS echo "Time: $((end - start)) " ScTime = $((end - start)) echo $ScTime Sltime = $((timeout - ScTime)) echo $Sltime sleep $Sltime                 exit 0; Please correct my code if i am wrong (HowTos)