I have a txt file with this format:
- 01, Spain
- 02, USA
- 03, India
- 01, Italy
- 01, Portugal
- 04, Brasil
I need to check if the numbers are repeated. In this example, the number "01" has Spain, Italy and Portugal. If two or more lines have the same number, I need to keep only the first of the repeated number and get rid of the others. It would show this in the output file:
- 01, Spain
- 02, USA
- 03, India
- 04, Brasil