Archive for the ‘Script’ Category

shell script to get the time difference

Nov-22nd-2010

Shell Script to get time difference or time duration of the process… Here is your script. [root@map007 ~]# vim gettime.sh #!/bin/bash START=$(date +%s) # Start your programme ls -a > /tmp/test.txt ls -Ra >> /tmp/test.txt cat /tmp/test.txt END=$(date +%s) # Time Difference DIFF=$(( $END – $START )) echo “Time Taken :- $DIFF sec.” [root@map007 ~]# [...]