Hi All,
I need to extract the last occurance of a pattern match. So far I've got the code below which extracts the first occurance. Any ideas how I can modify it so that it extracts the last?
BEGIN {}
{
if (data[$2]++ == 0)
lines[++count] = $0
}
END {
for (i = 1; i <= count; i++)
print lines
}
Thanks in advance,
p.