PDA

View Full Version : All that console output - how to find the relevant stuff



mflint
2008-02-06, 14:24
A very quick tip for anyone (like me) who struggles to visually grep all the console output from SqueezeCenter or Jive:


highlight() { param=$1; shift; $* | sed "s/\($param\)/\x1B\[31;1m\1\x1B\[0m/gI"; }

This bash function will enable highlighting of console output, based on a single word. For example, to run slimserver, highlighting the word "livedepartures":

highlight livedepartures ./slimserver.pl

(about time I gave something back in the Developers forum, rather than just asking questions)

Matthew