A csv file has two columns. The code below outputs the entire file (all rows and the two columns separated by a comma)
BEGIN {FS=","}
{print $0}
However, the code below, outputs only one value viz. the Column 1 of the first row:
BEGIN {FS=","}
{print $1}
Above code is a .awk file and run in Windows using the command gawk -f test.awk xyz.csv > output.csv
What am I doing wrong?
Edited:
Output after changing the {Print $1} to "{print "<" NR "><" $1 "><" $0 ">"}
"``
<1><naskar><naskar,sahoo ,1
sahoo ,18290,
ree ,6379,
mukherjee ,4609,