How to grep an empty line in a specific column of a file?

Suppose i have the following data :

cat file.txt

12431,123334,55353,546646,14342234,4646,35234
123123,3535,123434,132535,1234134,13535,123534
123213,545465,23434,45646,2342345,4656,31243
2355425,2134324,53425,342,35235,23434,234535
3423424,234234,65465,,2344,35436,234524,234
2345235,343224,234234,,234234,646,2342,2354
324234,6456,23424,,45645,234,234,246545,234
342334,234545,234,,2342,4354,2344,235235,2344

please suggest the below question :

1 . I want only those rows in which the fourth column is empty .

*********
it should generate the last four lines
*********

 
awk -F, '$4==""' input.txt
A,B,C,D,E,F,G
12431,123334,55353,546646,14342234,4646,35234
123123,3535,123434,132535,1234134,13535,123534
123213,545465,23434,45646,2342345,4656,31243
2355425,2134324,53425,342,35235,23434,234535
3423424,234234,65465,,2344,35436,234524,234
2345235,343224,234234,,234234,646,2342,2354
324234,6456,23424,,45645,234,234,246545,234
342334,234545,234,,2342,4354,2344,235235,2344

Suppose the columns have headings A,B,C,D,E,F,G . I want to grep all the rows in column D which is empty .
This should generate last 4 lines .

did u try my awk command ?

Yes , It helped but in another file there headings for each column name .
I need to select the rows of a particular column like say column D here and under them empty columns .

/users/oracle> cat a.txt
12431,123334,55353,546646,14342234,4646,35234
123123,3535,123434,132535,1234134,13535,123534
123213,545465,23434,45646,2342345,4656,31243
2355425,2134324,53425,342,35235,23434,234535
3423424,234234,65465,,2344,35436,234524,234
2345235,343224,234234,,234234,646,2342,2354
324234,6456,23424,,45645,234,234,246545,234
342334,234545,234,,2342,4354,2344,235235,2344
/users/oracle > cat a.txt|grep ",,"
3423424,234234,65465,,2344,35436,234524,234
2345235,343224,234234,,234234,646,2342,2354
324234,6456,23424,,45645,234,234,246545,234
342334,234545,234,,2342,4354,2344,235235,2344
/users/oracle >

post your code using code tag button.

post the input and expected output

using the code tag button in the editor below (hint: it looks like this --> )

cat a.txt|grep ",,"

a better way for this code is

grep ",," a.txt

But this would not work if any other column is empty, so not a good solution.

---------- Post updated at 07:59 ---------- Previous update was at 07:47 ----------

This should work then.

awk -F, 'NR==1 && /A,B,C,D,E,F,G/ {a=1} {if ($4=="" && a==1) print $0}'

It may be written some more simple
If first line NR==1 = A,B,C,D,E,F,G set a=1
If filed number 4 is empty $4=="" and a=1 , print line print $0