|Pathologically Eclectic Rubbish Lister|
How do I get the last occurrence of a word (or words) in a file?
Contributed by Anonymous Monk
on May 11, 2000 at 01:03 UTC
Q&A > regular expressions
Description:I have a list of servers with their status in a file. I need to get the last occurence of each of the servers in the file. The server names are VISHU, VISHU2, JITHU, JITHU2, MADHU, MADHU2
The file format is :
VISHU: server running 12/3/99
VISHU2: server down 12/3/99
VISHU :server running 3/12/00
JITHU : server down 3/12/00
JITHU2: server running 4/12/00
I need to find the last occurences of each of the servers.
Please (register and) log in if you wish to add an answer