i already have a .csv file with this structure:Phone_number,name,size2223178555, Joshep, 22.36and i would like to add this entry taken from a .dat file that looks like this:PN: 2221471162Cesarsize: 14.22so the .csv looks like this:Phone_number,name,size2223178555, Joshep, 22.362221471162, Cesar, 14.22Could you please help me with this?Thanksusing the marked solution this is what I've got:Phone_number,name,size2223178555, Joshep, 22.362221471162,Cesar,14.22I've tried placing \t before printf's awk 'NR==1{serial_number=$2}NR==2{device_id=$0}NR==3{print serial_number,\tdevice_id,\t  $2}' Disptelnet.dat >>dispositivoss.csvand this is what i get:serial_number,device_id,ip_address2223178555, Joshep, 22.362221471162,   Cesar,    14.22I've also tried with \t, \s \k
add entry to .csv file
text processing;csv
One simplistic approach, using awkawk 'NR==1{phone=$2}NR==2{name=$0}NR==3{print phone,name,$2}' cesar.dat >>phones.csv