title: How can sed replace "\ " (backslash + space)?
body: <p>In a bash script, files with spaces show up as <code>"File\ with\ spaces.txt"</code> and I want to substitute those slashed-spaces with either <code>_</code> or <code>+</code>.</p>
  
  <p>How can I tell sed to do that? I had no success using;</p>
  
  <pre><code>$1=~/File\ with\ spaces.txt
  ext=$1
  web=$(echo "$ext" | sed 's/\ /+/')
  </code></pre>
  
  <p>I'm open to suggestions if there's a better way than through sed.</p>
  
  <p>[EDIT]: Foo Bah's solution works well, but it substitutes only the first space because the text following it is treated as arguments rather than part of the $1. Any way around this?</p>