Hopefully someone can point me in the right direction...
I have a script written in bash which is pretty basic and just stop/starts various services based on particular conditions. What I am trying to build is a reporting type function which will send out an email with various stats and one of which I would like to include is the amount of time it took for the various condition to complete..
My initial thoughts were to assign the current system date to a variable at the beginning of the condition and then once complete assign the date to a new variable, compare the difference and then I would have my answer...
Does anyone have any sample script that would work in this situation or know of a better way to attempt this?