title: Why does batch processing with unusal usage of command SET hang on running in console emulator Cmder?
body: <p>I have made a small batch script to generate the MD5 sum of a file. It works great when I remove the line <code>@echo off</code>, but hangs on execution in console emulator <em>Cmder</em> version 1.1.4.1 when I leave this line.</p>
  
  <pre><code>@echo off
  
  if [%1]==[] goto usage
  
  for /f "delims=" %%i in ('certutil -hashfile %1 MD5 ^| find /v "CertUtil" ^| find /v "MD5"') do set output=%%i
  set /p =%output: =%&lt;nul &gt;%1.md5
  
  goto :eof
  
  :usage
  @echo Usage: %0 FILENAME
  exit /b 1
  </code></pre>
  
  <p>If I replace the line <code>set /p =%output: =%&lt;nul &gt;%1.md5</code> by <code>echo %output: =% &gt;%1.md5</code>, the batch file executed in <em>Cmder</em> and not with <code>cmd.exe</code> of Windows works, but it outputs an additional newline that I don't want.</p>
  
  <p>What is going on?</p>
  
  <p><strong>EDIT</strong>: This line doesn't hang on batch processing in <em>Cmder</em>:</p>
  
  <pre><code>set /p ="Hello" &lt;nul
  </code></pre>
  
  <p>This line hangs on batch processing in <em>Cmder</em>:</p>
  
  <pre><code>set /p ="Hello" &lt;nul &gt;out
  </code></pre>
  
  <p>Both lines work in a batch file executed by Windows command processor in a command prompt window.</p>