magarena/scripts/extract_existing.awk

32 lines
451 B
Awk
Raw Normal View History

BEGIN {
FS = "\t"
}
FILENAME ~ /existing/ {
impl[$1] = 0
next
}
{
2011-11-20 19:00:13 -08:00
name = $1
if (name in impl) {
found[name] = 1
print name
while ($0 != "") {
getline
2011-11-20 19:00:13 -08:00
gsub(name,"@")
print $0
}
cnt++
}
}
END {
print "found " cnt " card" > "/dev/stderr"
for (i in impl) {
if (!(i in found)) {
print i " not found" > "/dev/stderr"
}
}
}