Each line in a comma-separated file has 5 fields.
a,b,c,d,e
f,g,c,i,
j,k,c,m,n
o,p,c,r,s
t,u,c,w,
x,y,z,aa,bb
How can I extract the lines which have c in the 3rd field and their 5th field is NOT empty? The result would be:
a,b,c,d,e
j,k,c,m,n
o,p,c,r,s