title: php shell_exec echo
body: <p>I'm working on interfacing a microcontroller with a lamp server. I am trying to run the command <code>echo -e -n "data \r" &gt; /dev/ttyUSB0</code> using shell_exec in php but with no results. It works just fine from the command line. Doing a little experimenting, I discovered that <code>echo -e -n "1 \r"</code> actually echoes <code>-e -n 1</code>. Is there a reason it won't take the -e or -n options?
  Here's my code:</p>
  
  <pre><code>    &lt;?php
      shell_exec('echo -e -n "1 \r" &gt; /dev/ttyUSB0');
      ?&gt;
  </code></pre>