title: How to manipulate a string, variable in shell
body: <p>Hei everyone!</p>
  
  <p>I have this variable in shell containing paths separated by
  a space:</p>
  
  <pre><code>LINE="/path/to/manipulate1 /path/to/manipulate2"
  </code></pre>
  
  <p>I want to add additional path string in the beginning of the string and as well right after the space so that the variable will have the result something like this:</p>
  
  <pre><code>LINE="/additional/path1/to/path/to/manipulate1 /additional/path2/to/path/to/manipulate2"
  </code></pre>
  
  <p>I tried this one but only get the old paths</p>
  
  <pre><code>#!/bin/bash
  
  LINE="/path/to/one /path/to/two"
  NEW_PATH=`echo $LINE |  sed "s/^\([^ ]\+\) \([^ ]\+\)/\/add1\1 \/add2\2/"`
  echo "$NEW_PATH"
  </code></pre>
  
  <p>Any help appreciated
  Thanks in advance</p>