I can not figure out if the calculated value in $2 is less than or equal to 100 then in that line the font is changed to red, then the entire file is sorted in ascending order by $2 Is this possible?
I think the below will print a new file and maybe that's a start:
I think the below will print a new file and maybe that's a start:
Code:
awk '{if((NR>1)&&($4!=last)){printf("%s\t%f\t%s\n", last, total/len,pg);total=$7;len=1;}else{total+=$7;len+=1};pg=$5;last=$4;}END{printf("%s\t%f\t%s\n", last, total/len,pg)}' | awk '{if($2>=1000.00)print;}' epilepsy70_average.txt > sort.txt