$ awk -F "," '{if ($1 != $2)print $0}' filename text1,text2,string1,string2 text4,text5,string1,string2