Skip to content

Instantly share code, notes, and snippets.

@samarpanda
Last active August 29, 2015 14:08
Show Gist options
  • Save samarpanda/8af478f462d84ad41bdd to your computer and use it in GitHub Desktop.
Save samarpanda/8af478f462d84ad41bdd to your computer and use it in GitHub Desktop.
Atom colourful tails
function atomuitail(){
  tail -f $1 | awk '
    /MEMC/ {print "\033[32m" $0 "\033[39m"}
    /DEBUG/ {print "\033[32m" $0 "\033[39m"}
    /ERROR/ {print "\033[31m" $0 "\033[39m"}
    /error_message/ {print "\033[31m" $0 "\033[39m"}
  '
}

README

Add above function to your .bashrc / .bash_profile. Easy to mark errors. Saves a bit time to search for errors(Without Grep). Below attached a screenshot of my terminal. Hope it helps.

Usage

atomtail logs/log-2014-10-29.php 

Screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment