Created
December 5, 2013 15:22
-
-
Save raggleton/7807366 to your computer and use it in GitHub Desktop.
This prints out time (in s since 1970) and line number+content to aid in profiling a bash script. Taken from: http://stackoverflow.com/questions/4336035/performance-profiling-tools-for-shell-scripts Note, that sometimes the first digit gets chopped off the date :/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS4='$(date "+%s.%N ($LINENO) + ")' bash -x scriptname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment