I have a CSV file that contains two columns. I want to compare the two columns and print the number of matches.
M,M A,M A,A M,A
If the first columns in the first row is the same, I want to print the second column in the output file, i.e.
M (for first line) 0 (for second line not same, zero value) A (for third line) 0 (for fourth line not same, zero value)