I have text file similar to this:
Some-text Keyword Some-text Some-text Keyword Some-text Keyword Keyword
I want to replace every "Keyword" with "number.extension" where number is 1 at first keyword match, 2 at second keyword match etc.
I know that I should use bash loop combined with sed (sed 's:Keyword:Number:g'), but I am not sure how to insert variable for number in that sed command.
As this is HTML file, there can be blank lines or any text beetween those "Keywords".