I have a large csv file about 25 million lines and 256 columns. CSV file's field separator is ~
character.
I want to replace first 2 columns data like that
From : data1~data2~data3..................................
To : "data1"~"data2"~data3................................
I am using currently awk
but like this way:
cat file | awk -F "~" '{print "\""$1"\"""\""$2"\"~"$3"~"$4"~"...................}'
So I am typing 256 columns in awk like $4"~"$5"~"$6"~".....$256"~"
Is there any other better way to code it?