perl -lne '/\.c$/?$h{$l=$_}++:delete$h{$l}}{unlink keys%h' file.txt
In reply to Re: Want to do One line Perl Command by delirium in thread Want to do One line Perl Command by EchoAngel