Tuesday, 15 February 2011

shell - Simple way to colour alternate output lines in bash -


I need a complete directory for a string, and I get about 50 results. I would like to colorize each other line, either the color of the text color or background. The best would be a script which I can pipe the output of any command, and similarly (though colorful output) spits.

is not very beautiful, but the trick is:

( Foo.bash and whatever, wherever .bash )

  #! During reading / Bin / bash, read the echo-e "\ e [1; 31 m line" line] echo -e "\ e [1 32m $ line" echo-e "e [0] You can find it here. 


No comments:

Post a Comment