Hi, I'm having problems with removing duplicate lines in a file, and replacing them a with a non-duplicate line. Ideally, I would just like to replace it with a continuous sequence, so that the duplicate lines could be separated.
I was considering sed with some kind of wildcard (*):
sed -e "s/text_pattern/text_pattern*/g" my_file.txt
So that a new number is added to the text_pattern every time is returns. However, I haven't been able to find a proper solution in the man pages and on the internet. Does anybody have an idea of how to do something like this? Perhaps sed is not the best choice?
Thanks!