hi
i have record looks like below
1,US
I want to add empty field to the record as below
1, , , ,US
how i can do it using awk ?
i tried with awk its not working
awk '{ print $1", ,"$2 }' filename > file 1
hi
i have record looks like below
1,US
I want to add empty field to the record as below
1, , , ,US
how i can do it using awk ?
i tried with awk its not working
awk '{ print $1", ,"$2 }' filename > file 1
Hi,
you need specify FieldSeparator:
awk -F, '{print $1", , , ,"$2}' filename > file
or
awk -F, '{$1=$1;$5=$2;$2="";OFS=","}1'
Thanks albertogarcia its working !