AWK/GAWK commands

Alter file with one column where data after newline corresponds to data in top section and create two comma separated columns from them:
awk ‘NF==0{in2=1; next} !in2{a[++n]=$0; next} {print a[++i] “, ” $0}’ “infile.txt” > outfile.txt

About vicki

Welcome to the Sovereign Republic of Vickistan. I am the President here. Lucky me! No taxes or laws yet. Lucky you!
This entry was posted in Linux. Bookmark the permalink.