title: Scala: executing external process, string escaping, and errors
body: <p>I want to execute the following command:</p>
  
  <pre><code>lynx -useragent='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1' -source 'http://localhost'
  </code></pre>
  
  <p>as a <code>Process</code> in Scala. I used both:</p>
  
  <pre><code>val cmd = ... // command to execute
  cmd #&gt; new java.io.File( filename ) !
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>val proc = Process( cmd )                                                  
  proc !!
  </code></pre>
  
  <p>And in both cases I get errors from <code>lynx</code>:</p>
  
  <pre><code>Can't Access `file://localhost/home/me/Work/23.lynx/2.multidownload/(X11;'
  Alert!: Unable to access document.
  </code></pre>
  
  <p>The command run alone works well, when I run it in Scala — I get errors. Which means that something strange happens between Scala and <code>lynx</code>, and the strings are not interpreted correctly… Any idea?</p>