I have a file that looks like this-
PSM 22 DEFECT OPEN
PSR 19 DEFECT OPEN
PSM DEFECT OPEN
PSQ 20 DEFECT OPEN
PSM 24 DEFECT OPEN
When I run this command -
printf '%d\n' `cat <file_name> | awk '{if($2>20) print $2}' | wc -l'
I get count of 3, which means NULLS are getting counted. How can I stop the nulls to be included in the total count?
Thanks,
Riyaz
PSM 22 DEFECT OPEN
PSR 19 DEFECT OPEN
PSM DEFECT OPEN
PSQ 20 DEFECT OPEN
PSM 24 DEFECT OPEN
When I run this command -
printf '%d\n' `cat <file_name> | awk '{if($2>20) print $2}' | wc -l'
I get count of 3, which means NULLS are getting counted. How can I stop the nulls to be included in the total count?
Thanks,
Riyaz