'Awk not printing what is wanted
my attempt:
awk '$4 != "AZ" && max<$6 || NR==1{ max=$6; data=$0 } END{ print data }' USA.txt
I am trying to print the row that does NOT have "AZ" in the 4th column and the greatest value in the 6th column
the file has 6 colums firstname lastname town/city state-abv. zipcode score
Shellstrop Eleanor Phoenix AZ 85023 -2920765
Shellstrop Donna Tarantula_Springs NV 89047 -5920765
Mendoza Jason Jacksonville FL 32205 -4123794
Mendoza Douglas Jacksonville FL 32209 -3193274
Peleaz Steven Jacksonville FL 32203 -3123794
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
