PDA

View Full Version : Timing bash script run



whizkid25
May 20th, 2008, 02:41 PM
Hi all. I would like to know how I could time a script run in bash. I would like to code it into the script so it will display (in milliseconds) when the run ends. Thanks in advance.

Kebabman
May 20th, 2008, 03:44 PM
Simply running the script using the 'time' command might be good enough. A quick look at the man page for time should tell you if it will suffice.

whizkid25
May 20th, 2008, 04:22 PM
Ok. I did that. It showed me 3 times - real, user and system. Which one should I be referring to?

slavik
May 20th, 2008, 09:16 PM
"man time" holds the answer.