title: Why this code says echo is off?
body: <p>What is wrong with this code? It says <code>ECHO is off</code>.</p>
  
  <pre><code>@ECHO off
  set /p pattern=Enter id:
  findstr %pattern% .\a.txt &gt; result
  if %errorlevel%==0 (
  set var2= &lt;result
  echo %var2%
  set var1=%var2:~5,3%
  echo %var1% &gt; test.txt
  echo %var1%
  ) else (
  echo error
  )
  del result
  pause
  </code></pre>
  
  <p>Any help is appreciated.</p>