title: Output of sed in linux won't write to file
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5171901/sed-command-find-and-replace-in-file-and-overwrite-file-doesnt-work-it-empties">Sed command find and replace in file and overwrite file doesnt work, it empties the file!</a>  </p>
  </blockquote>
  
  
  
  <p>Ok so I've got this:</p>
  
  <p><code>sed "s/^/getHtmlBody\(\"\/NmConsole\/Reports\/Workspace\/Virtualization\/WrVMwareHostList\/WrVMwareHostList.asp\?sGroupList=1'/g" out.bat | sed "s/$/\';--\");/g" &gt;out.bat</code></p>
  
  <p>And as you can see I'm trying to out into <b>out.bat</b> but it isn't working for some reason - nothing gets displayed on the screen but nothing is written to the file.</p>
  
  <p>What am I doing wrong?</p>