Format searched log files
Aug 16, 2012 · 1 minute readCategory: bash
When you are monitoring a log file you may want to narrow it down, and format the results. This simple one line command will break up the output from a log file to make it easier to quickly read
tail -f /path/to/log | grep “search term” | sed ’s/(.*)/———-\n\1\n———-/’