How to print awk's results with different colors for different fields?

Viewed 22595

This file has 3 fields. I wanted e.g. the first 2 fields in green, and the third in white (NB : black background), so I tried :

awk '{print "\033[0;32m"$1"\033[0m", "\033[0;32m"$2"\033[0m", "\033[0;37m"$3"\033[0m"} }' chrono.txt

and everything was green…

How must I proceed (if it is possible) ?

2 Answers
Related