I would like to display the exact time taken to complete running a particular tool or function or program to user
I don't know the exact time functions in unix, please help me
thanks in advance
Example:
$test.ksh
output should be
The time taken to execute the test.ksh file is 00.30.00 seconds
and you have to run this " command " with " popen "
which would execute and you have would have execution time in the pipe, which you need to parse it and display!
Just a pointer !
If you need more explanations, shoot !
thanks for your quick reply,
my requirement is
Example:
echo "Enter i value"
read i
n=0
while [ $n -eq $i ]
do
echo $i
i=`expr $i + 1`
done
let's assume that for the first time, i have given 50 as i value, so while loop will execute for 50 times and atlast the program have to display the actual time taken to complete program to execute \(this one i want for performance\) this program i have written in ksh
I think u got my requirement, i have write the time function in side the code only