Skip to content

Instantly share code, notes, and snippets.

@mipearson
Created March 2, 2015 08:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mipearson/8a27fe64a06014b908fb to your computer and use it in GitHub Desktop.
Save mipearson/8a27fe64a06014b908fb to your computer and use it in GitHub Desktop.
START=`date +%s`
function status {
set +x
ELAPSED=`expr $(date +%s) - $START` && true
echo "--- $1 T+$ELAPSED"
set -x
}
set -e
set -x
status "Did some things"
sleep 10
status "Did some more things"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment