Created
January 25, 2012 08:53
-
-
Save bosmievoll/1675499 to your computer and use it in GitHub Desktop.
JUL log sanitizer
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
!/bin/bash | |
# Takes double line java.util.logging output and creates single line. | |
gawk -W re-interval \ | |
'/[0-9]{2}\/[0-9]{2}\/[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}:[0-9]{3} (AM|PM)/ \ | |
{ORS=" "; print gensub(/^([^:]+:)(.*)/, "\\2 \\1", "g")} | |
!/[0-9]{2}\/[0-9]{2}\/[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}:[0-9]{3} (AM|PM)/ \ | |
{ORS=RS; print}' \ | |
$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment