Created
March 18, 2021 15:49
-
-
Save emmanueltouzery/3f66e288c758fbe0716e40cd6462aaa7 to your computer and use it in GitHub Desktop.
smart log file filter
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
/^[0-9]{4}-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9]{3}/ { | |
if (contents !~ /(patterns|to|blacklist)/) { | |
printf("%s", contents) | |
} | |
contents = "" | |
} | |
{ contents = contents "\n" $0 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment