I'm trying to add a column to a csv file by using:
awk -F "," '{print $0"new_col"}' file.csv
but I got :
new_col8,0.405,0.101
new_col4,0.374,0.100
new_col23,0.342,0.100
new_col130,0.298,0.100
instead of :
68,110,0.362,0.101,new_col
11,98,0.405,0.101,new_col
57,94,0.374,0.100,new_col
61,123,0.342,0.100,new_col
124,130,0.298,0.100,new_col
I tried like this too:
awk -F "," '{{$(NF+1)=",new_col"} print $0 }' file.csv
but i got the same result!!!
Is someone already had this problem?