title: How to add text at end of some specific lines
body: <p>I have a file which contains:</p>
  
  <pre><code>    /home/hedgehog/image_0037.jpg
      /home/hedgehog/image_0048.jpg
      /home/hedgehog/image_0039.jpg
      /home/brain/image_0053.jpg
      /home/brain/image_0097.jpg
      /home/brain/image_0004.jpg
  </code></pre>
  
  <p>I want to add 0 at the end of the lines containing "/hedgehog/", and want to add 1 at the end of the lines containing "/brain/" like this:</p>
  
  <pre><code>/home/hedgehog/image_0037.jpg 0
  /home/hedgehog/image_0048.jpg 0
  /home/hedgehog/image_0039.jpg 0
  /home/brain/image_0053.jpg 1 
  /home/brain/image_0097.jpg 1
  /home/brain/image_0004.jpg 1
  </code></pre>