I am trying to process a csv file using awk. I have five rows in my csv file. I want my column 1 & column 3 combined to be unique. Using awk I wrote
awk -F "," '{print $1,",",$2,","$3,",",$4,",",$5}' A.csv|sort|uniq >B.csv
What this code does is to have a unique row with 1 to 5 rows combined. I want my other columns to be in final csv file but sorted and uniq only by 1st and 3rd columns.
awk -F, '{print $1,$2,$3}' OFS=, filename