I am trying to find a duplicates in a file and then replace these duplicates with the same name and add a number,
e.x # Before Host DUPLICATE1 in the line 1 Host DUPLICATE1 in the line 2 Host DUPLICATE2 in the line 3 Host DUPLICATE2 in the line 4 Host DUPLICATE2 in the line 5 Host DUPLICATE3 in the line 6 Host DUPLICATE3 in the line 7 Host DUPLICATE3 in the line 8 Host DUPLICATE3 in the line 9 # After Host DUPLICATE1-1 in the line 1 Host DUPLICATE1-2 in the line 2 Host DUPLICATE2-1 in the line 3 Host DUPLICATE2-2 in the line 4 Host DUPLICATE2-3 in the line 5 Host DUPLICATE3-1 in the line 6 Host DUPLICATE3-2 in the line 7 Host DUPLICATE3-3 in the line 8 Host DUPLICATE3-4 in the line 9 Any one have an idea how I can do that? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0e57bccc-33dc-4925-b50d-d72307f8652b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
