Hi all
I have a file contains columns showing figures as below :
Input file
A B C
D 50 60 90
E 100 20 53
F 30 40 70
G 25 27 45
I want to color the value above or equal 90 by red and to be shown as below
output file
A B C
D 50 60
90
E
100 20 53
F 30 40 70
G 25 27 45
I have used awk command but i fail to get it works
awk '{for(i=2;i<=NF;i++) if ($i >= 90) printf ("%s ","\033[31m"$i"\033[0m");else printf("%s ",$i);printf "\n"}' inputfile
can anybody help me with this...Thanx