Hi,
I'm having some troubles replacing a string in a file using sed.
Here is what I want : I want to replace the first match occured with 1 the second match with 2, etc... till the end of the file.
For example if the file looks like this :
Quote:
Sample text..
Here is some text...
Some text
|
I want it to look like this after applying the above replacing system to string "text":
Quote:
Sample 1..
Here is some 2...
Some 3
|
How can I do that ?
Thank you.