blob: 60c6bca656d64850be873edbb9c8582280c01a39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
BEGIN {
# if (t == 0)
FPAT = "([^,]+)|(\"[^\"]+\")"
# else
# FPAT = "([^,]*)|(\"[^\"]+\")"
}
FNR == 1 {
# This part was added later
print $1
print $1, $3
for (i = 1; i <= NF; i++)
print i, $i
# Reset for original part of test
FPAT = "([^,]*)|(\"[^\"]+\")"
$0 = $0
}
{
print "NF =", NF
for (i = 1; i <= NF; i++)
printf("$%d = <%s>\n", i, $i)
}
|