example:
a,bee,a bee
c,fee,c dee
e,dee,e bee
g,hee,d deen
h,aee,t Dee
if the block above is a 3x5 data, I want to print the rows that contain 'dee' in the third column, it should be case insensitive and only find the word that matches exactly (for example 'deen' is not acceptable), output should be as follow:
c,fee,c dee
h,aee,t Dee
how would the Bash command looks like
what I have tried is:
awk -F"," '{print $3}' filename | grep -iw 'dee'
but I still need the data at column 2.