title: Echoing an echo argument in Bash
body: <p>Here is the code that shows the problem:</p>
  
  <pre><code>#!/bin/bash
  
  function char() {
      local char="$(echo $1 | cut -c2)"    # Gets second character from argument.
      echo $char
  }
  
  char -a                                  # Outputs 'a'.
  char -e                                  # Or 'char -n' outputs nothing.
  </code></pre>
  
  <p>I want this code to output [ 'a', 'e' ] instead of [ 'a', nothing ].</p>
  
  <p>I think that the problem is in <i>echo $1</i>. My question is kind of similar to this <a href="https://stackoverflow.com/questions/320313/echo-e-doesnt-print-anything">one</a>. But it seems that most solutions don't work for me. I think that Bash changed it's behavior from version in that question: '3.00.15(1)-release (x86_64-redhat-linux-gnu)'.</p>
  
  <p>My Bash version is '4.3.30(1)-release (i586-pc-linux-gnu)'. I have tried:</p>
  
  <pre><code>echo x-e                                 # Outputs 'x-e'.
  echo -- -e                               # Outputs '-- -e'.
  echo "-e "                               # Outputs '-e'.
  </code></pre>
  
  <p>Only little "hack" that works is <i>echo "$1 "</i>. But I've got the feeling that it's not the best thing to do.</p>
  
  <p>P.S.
  I personally find this pretty interesting. Thanks for any thoughts on this.</p>