I have a huge file with 20 fileds in each record and each field is seperated by "|". If i want to get all the reocrds that have 18th or for that matter any filed as null how can i do it? Please let me know
To identify the null values on any field
But i want to see if particular field is null or not and not regular nulls in the file
# lets do it for field #18
fld=18
awk -v fld=$fld ' -F'|' \
' { if ($fld=="") { print "Line " $NR " has field " $fld " NULL" }}' myfile