I have a file like below
1,1230,add 1,1235,remove 2,1240,add 2,1245,remove 3,1250,add 4,1255,remove
I want to print those lines which have a unique value for the first field, and where the 3rd field is equal to
add. The expected output for the example would be
or only the first column, i.e.
The below command give me distinct records, but later I want to check if 3rd column is "add" then only print the output.
awk -F ',' 'print $1' filename | uniq -u