2011-06-06 20:17:51 -07:00
|
|
|
BEGIN {
|
|
|
|
FS = "\t"
|
|
|
|
OFS = "\t"
|
|
|
|
ORS = ""
|
|
|
|
}
|
|
|
|
|
2011-06-24 00:29:40 -07:00
|
|
|
FILENAME ~ /data/ {
|
2011-06-06 20:17:51 -07:00
|
|
|
if ($1 in score) {
|
|
|
|
print score[$1] "\t"
|
|
|
|
print "NOTE:"comment[$1] "\t"
|
|
|
|
print "NAME:"$1 "\t"
|
|
|
|
print "TEXT:" "\t"
|
|
|
|
while ($0 != "") {
|
|
|
|
getline
|
|
|
|
print $0 "\t"
|
|
|
|
}
|
|
|
|
cnt++
|
|
|
|
print "\n"
|
|
|
|
}
|
2011-06-24 00:29:40 -07:00
|
|
|
next
|
|
|
|
}
|
|
|
|
|
|
|
|
NF == 1 {
|
|
|
|
score[$1] = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
NF >= 2 {
|
|
|
|
score[$2] = $1
|
|
|
|
comment[$2] = $3
|
|
|
|
next
|
2011-06-06 20:17:51 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
|
|
|
print "found " cnt " card" > "/dev/stderr"
|
|
|
|
}
|