Created
March 5, 2015 15:01
-
-
Save pmuellr/5e5cc10c19b71d9599a1 to your computer and use it in GitHub Desktop.
cf log filters
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/sh | |
#------------------------------------------------------------------------------- | |
# customizable `cut` command for `cf log` | |
#------------------------------------------------------------------------------- | |
BLAN="-c 28" | |
TIME="-c 12-19" | |
WHOM="-c 29-40" | |
STDW="-c 42-44" | |
MESG="-c 46-" | |
cut $TIME $BLAN $MESG | |
#------------------------------------------------------------------------------- | |
# 1 2 3 4 5 | |
# 12345678901234567890123456789012345678901234567890 | |
# -------------------------------------------------------------------------- | |
# 2015-03-05T09:20:00.17-0500 [App/0] OUT <message here> | |
#------------------------------------------------------------------------------- |
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/sh | |
#------------------------------------------------------------------------------- | |
# remove [RTR/123] messages from `cf log` | |
#------------------------------------------------------------------------------- | |
grep --line-buffered --invert-match --fixed-strings "[RTR/" | |
#------------------------------------------------------------------------------- | |
# 1 2 3 4 5 | |
# 12345678901234567890123456789012345678901234567890 | |
# -------------------------------------------------------------------------- | |
# 2015-03-05T09:20:00.17-0500 [RTR/0] OUT <message here> | |
#------------------------------------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment