Possible Duplicate:
Measure script execution time
How would I time how long it takes for my script foo.sh to run?
I'm looking for something akin to tic and toc in MATLAB.
Possible Duplicate:
Measure script execution time
How would I time how long it takes for my script foo.sh to run?
I'm looking for something akin to tic and toc in MATLAB.
Easiest way is to use bash's integrated time, GNU Time or another unix time command implementation:
time ./sript.sh
If you're interested in ticks, you can approximate it with a little help from /proc/cpuinfo.
If you want to dig deeper, have a look at strace.