title: run linux command succeed but failed in .sh file. "No such file or directory "
body: <p>I wrote a linux command and it runs perfectly in command line:</p>
  
  <pre><code>/bin/netstat -an | grep '3306' | sed 's/.*/[MYSQLMON]&amp;/' &gt; /home/bbWifiExt/logs/WIFIMonitor.log
  </code></pre>
  
  <p>however when I copy this code to .sh and run the .sh file i got:</p>
  
  <p>No such file or directory</p>
  
  <p>Can anyone tell me why? Many thanks.</p>