I have need to grep an entire directory for a string, and I get about 50 results. I would like to colour each second line, either text colour or background colour. Best would be a script that I can pipe the output of any command to, and so that it spits out the same (albeit coloured) output.
Share
Not very pretty but does the trick:
(save this to
foo.bashand dogrep whatever wherever | ./foo.bash)Here you can find the list of color codes in bash.