Command to extract empty field in a large UNIX file?

Hi All,

I have records in unix file like below. In this file, we have empty fields from 4th Column to 22nd Column. I have some 200000 records in a file. I want to extract records only which have empty fields from 4th field to 22nd filed. This file is comma separated file. what is the unix command we can use for this? Please let me know

x,999999,429,,,,,,,,,,,,,,,,,,,,9999999,999999,xxxxxxxx,,xxxxxxxx,,xxxxxx,xx,xxxxxx,xxxxxxxxxxxxxxxxxxxx,
y,888888,429,,,,,,,,,,,,,,,,,,,,8888888,,xxxxxxxx xxxxxxxx,,xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx,,xxxxxxxx,xxxxxxxx,xxxxxxxx,,,,,
z,777777,429,,,,,,,,,,,,,,,,,,,,6666666,xxxxxxxx,xxxxxxxx xxxxxxxx,,xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx,,xxxxxxxx,xxxxxxxx,xxxxxxxx
A,666666,429,,,,,,,,,,,,,,,,,,,,4444444,,xxxxxxxx xxxxxxxx,,xxxxxxxx xxxxxxxx,,xxxxxxxx,xxxxxxxx,xxxxxxxx,,,,,xxxxxxxx 
B,555555,429,,,,,,,,,,,,,,,,,,,,3333333,,xxxxxxxx xxxxxxxx,,xxxxxxxx xxxxxxxx xxxxxxxx,,xxxxxxxx,
C,444444,429,,,,,,,,,,,,,,,,,,,,2222222,,xxxxxxxx xxxxxxxx,,xxxxxxxx xxxxxxxx xxxxxxxx,,xxxxxxxx xxxxxxxx,
D,333333,429,,,,,,,,,,,,,,,,,,,,5555555,,xxxxxxxx xxxxxxxx,,xxxxxxxx xxxxxxxx xxxxxxxx

Thanks
Rakesh

Try

awk -F, '{ T=0; for(N=4; N<=22; N++) if($N) T++ } !T' inputfile

It counts the number of non-empty fields and if it's higher than zero, doesn't print. 200,000 records is not a problem at all.

sed OK?

sed -n '/\([,]*,\)\{3\},\{17\}/p' file

or

sed -rn '/([,]*,){3},{17}/p' file