title: How to put sequential numbers only at end of the repeated lines
body: <p>I have a file with some repeated lines. I want to put a sequential number only at the end of these repetitions.</p>
  
  <p>Example.</p>
  
  <p><strong>Input:</strong></p>
  
  <pre><code>Jose da Silva
  Jose da Silva
  Fulano de Tal
  Jose da Silva
  Sicrano Pereira
  Ze Ruela
  Sicrano Pereira
  Jose da Silva
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>Jose da Silva #1
  Jose da Silva #2
  Fulano de Tal
  Jose da Silva #3
  Sicrano Pereira #1
  Ze Ruela
  Sicrano Pereira #2
  Jose da Silva #4
  </code></pre>
  
  <p>I cannot sort these lines. They have to appear on the same order.</p>