I have a file with 65k lines looking like this:Mumford & Sons,Wilder Mind (Deluxe),Believe - Live,02 Oct 2016 10:25            Mumford & Sons,Wilder Mind (Deluxe),Tompkins Square Park,02 Oct 2016 10:19          Mumford & Sons,Wilder Mind (Deluxe),Believe,02 Oct 2016 10:16               Bon Iver,22 A Million,00000 Million,02 Oct 2016 10:06           Bon Iver,22 A Million,____45_____,02 Oct 2016 10:03         Bon Iver,22 A Million,8 (circle),02 Oct 2016 09:58          I have been trying a lot, but I cant get it done. I need it to look like this:Mumford & Sons,Believe - Live,Wilder Mind (Deluxe),02 Oct 2016 10:25    so that second column is switched with the third one. Is there any simple way to do this?
SED switching columns in one file delimited by ,
sed;awk;grep;cut
Would this work?awk -F, '{A=$3; $3=$2; $2=A; print}' OFS=, yourfileBasically -F says that you separate columns by ,, the body switches 2nd with 3rd column, and then you print the modified line.