Skip to content

Instantly share code, notes, and snippets.

@jonatanblue
Created April 26, 2017 13:34
Show Gist options
  • Save jonatanblue/df0c82936bd5536300999b5a67d31644 to your computer and use it in GitHub Desktop.
Save jonatanblue/df0c82936bd5536300999b5a67d31644 to your computer and use it in GitHub Desktop.
sed or grep a stream
# grep
tail -f file | grep --line-buffered my_pattern
# sed
stdbuf -o0 tail -f /var/log/syslog | sed 's/Dec/LOOL/'
# credits:
# Thanks to @amblina for collecting these.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment