mediatribe.net -- Drupal and Web Development

Notice: this post was last updated 3 years 15 weeks ago so it might be outdated. Please be cautious before implementing any of suggestions herein.

Calculating elapsed time on the command line

If you want to calculate how much time something takes on the command line:

START=$(date +%s)
# do your thing
echo "$(echo "$(date +%s) - $START"|bc) seconds since start"