title: echo outputs -e parameter in bash scripts. How can I prevent this?
body: <p>I've read the man pages on echo, and it tells me that the -e parameter will allow an escaped character, such as an escaped n for newline, to have its special meaning. When I type the command</p>
  
  <pre><code>$ echo -e 'foo\nbar'
  </code></pre>
  
  <p>into an interactive bash shell, I get the expected output:</p>
  
  <pre><code>foo
  bar
  </code></pre>
  
  <p>But when I use this same command (i've tried this command character for character as a test case) I get the following output:</p>
  
  <pre><code>-e foo
   bar
  </code></pre>
  
  <p>It's as if echo is interpretting the -e as a parameter (because the newline still shows up) yet also it interprets the -e as a string to echo. What's going on here? How can I prevent the -e showing up?</p>