I have a file.csv that contains:
ID,FN,LN,NUM
576,Pra,Mar,3
688,India,Desa,3
645,Ami,Path,5
245,Me,Yo,4
When I try to print all column fields, it works fine
awk '{print $1,$2,$3,$4}' FS=, OFS=, file.csv
ID,FN,LN,NUM
576,Pra,Mar,3
688,India,Desa,3
645,Ami,Path,5
245,Me,Yo,4
But if I try to add an extra column to the end, it won't work
awk '{print $1,$2,$3,$4,"R"}' FS=, OFS=, file.csv
,R,FN,LN,NUM
,R576,Pra,Mar,3
,R688,India,Desa,3
,R645,Ami,Path,5
245,Me,Yo,4,R
I want the output to be
ID,FN,LN,NUM,R
576,Pra,Mar,3,R
688,India,Desa,3,R
645,Ami,Path,5,R
245,Me,Yo,4,R
What did I do wrong?