search fields within a file

I need to be able to search multiple fields within a file that contain blank (nothing).

Not sure what command to use? thought it would be grep but not sure how to write it

The reason is i have a script that when it does this and identifies a field which has a blank it errors out of the script and stops running.

Any help would be appreciated:confused:

Define the "blank fields" how long are they, where are they located - what offset from the stat of the record?

and also what you are trying to search on.

That will make it easier to help with a solution.

I have 8 fields to search on within a 20 field file. The sizes of them vary from 3 - 50 bytes

The file i am reading in is a csv file see sample entrant below:

"hello","xxxx1","Mr","J","","Smith","","","17 Somewhere Drive","nowhere","","","","sometown","pp1 ppi","08AM30","","","",""

You can start from here:

awk -F"," '{for(i=1;i<=NF;i++)if($i=="\"\""){printf "%s %s %s %s %s %s %s\n","File:",FILENAME,",line:",NR,",column:",i,"is empty"}}' file