I have a file which looks like below:
LINE abc 1 somevalue
LINE abc 1 somevalue
LINE abc 1 somevalue
LINE def 2 somevalue
LINE def 2 somevalue
LINE abc 3 somevalue
LINE abc 3 somevalue
LINE mno 4 somevalue
LINE mno 4 somevalue
LINE def 5 somevalue
LINE def 5 somevalue
I would like to print the one occurrence of 'abc' or 'def' (which can be identified by column 3) etc as it is present in multiple lines. I would like to get the out put as:
LINE abc 1 somevalue
LINE abc 1 somevalue
LINE abc 1 somevalue
LINE def 2 somevalue
LINE def 2 somevalue
LINE mno 4 somevalue
LINE mno 4 somevalue
Could any one help me in perl ?