I am trying to count the number of lines in a file, which is the 4th field greater than the first filed using the awk command. I came up with this command:
awk '$4>$1 {print}' sampleFile | wc -l
Is there a better way to find a number and not use wc -l
source share