title: grep to sed, append after string match but instead on end of line
body: <p>I have the following text file with the following lines:</p>
  
  <pre><code>&lt;test="123"&gt;
  &lt;test="456"&gt;
  &lt;test="789"&gt;
  </code></pre>
  
  <p>My aim is to have the above text file to be appended with a keyword "HELLO" after the above numbers, as following:</p>
  
  <pre><code>  &lt;test="123.HELLO"&gt;
    &lt;test="456.HELLO"&gt;
    &lt;test="789.HELLO"&gt;
  </code></pre>
  
  <p>with the grep command and cut, I manage to get the value between the quotation mark.</p>
  
  <pre><code>grep -o "test=".* test.txt | cut -d \" -f2
  </code></pre>
  
  <p>I tried to use sed on top of it, with this line</p>
  
  <pre><code>grep -o "test=".* test.txt | cut -d \" -f2 | sed -i -- 's/$/.HELLO/' test.txt
  </code></pre>
  
  <p>however the closest I manage to get is instead a ".HELLO" which directly appended on the end of the line (and not after the numbers in between the quotes)</p>
  
  <pre><code>&lt;test="123"&gt;.HELLO 
  &lt;test="456"&gt;.HELLO 
  &lt;test="789"&gt;.HELLO
  </code></pre>
  
  <p>How can I fix my sed statement to provide me with the requested line? </p>