User Tools

Site Tools


howtos:manipulate_cvs_file

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
howtos:manipulate_cvs_file [d/m/Y H:i]
domingo created
howtos:manipulate_cvs_file [d/m/Y H:i] (current)
Line 4: Line 4:
 awk -F"," -v q='"' '{ print q $2 q " " ":=" " " q $1,$3,$4,$5,$6,$7,$8 q"," }' fil1.txt > dg.txt awk -F"," -v q='"' '{ print q $2 q " " ":=" " " q $1,$3,$4,$5,$6,$7,$8 q"," }' fil1.txt > dg.txt
 </code> </code>
 +
 +|-v q='"'| is used to insert double quotes around the key-value pairs with q as variable containing the quotes|
 +|-F","| the file is comma separated so we tell awk to that as field separator|
 +
 +
  
 fil1.txt fil1.txt
howtos/manipulate_cvs_file.1504272181.txt.gz · Last modified: d/m/Y H:i (external edit)