I would like to read in a variable into a BASH script using awk. I am failing at the correct syntax. Could someone help?
Code:
variable=`awk '{ if ( $x >= .9 ) print " 254 0 0"
else if ( $x >= .8 ) print " 0 254 0"
else print " 0 0 254 "}'`