title: Replacing a string with sed just concatenates instead of overwriting it
body: <p>I have a line which look like the follwoing:</p>
  
  <pre><code>input_param { shape: dim: 50 dim: 3 dim: 227 dim: 277} }
  </code></pre>
  
  <p>I want to overwrite the 50 with a sed command, e.g with a "1":</p>
  
  <pre><code>sed -i -e 's/dim: */dim: 1/' filename.txt
  </code></pre>
  
  <p>However the line looks like this afterwards:</p>
  
  <pre><code>input_param { shape: dim: 150 dim: 3 dim: 227 dim: 277} }
  </code></pre>
  
  <p>Can anyone tell me where I went wrong?</p>