awk -F"," 'BEGIN{OFS=FS} {tmp=$(NF-1);$(NF-1)=$NF;$NF=tmp;print}' 1.txt
This is better, this will keep your file as its original form.
awk -F"," 'BEGIN{OFS=FS} {tmp=$(NF-1);$(NF-1)=$NF;$NF=tmp;print}' 1.txt
This is better, this will keep your file as its original form.