How to replace characters in the same position in each line of a text with natural numbers? : <p>I have a multi-line repeating text like this, each line is same.</p>

<pre><code>aaa0bbb
aaa0bbb
...
aaa0bbb
</code></pre>

<p>How can I change it to</p>

<pre><code>aaa0bbb
aaa1bbb
...
aaa2bbb
</code></pre>

<p>I tried to use awk or sed to handle it, but it's hard to me.</p>
