title: Bash script Arrow Keys produces weird characters
body: <p>Consider the following minimised Bash Script:</p>
  
  <pre><code>echo Enter your name:
  read NAME
  echo $NAME
  </code></pre>
  
  <p>Now if I run the script and enter a name and want to navigate through my input with my arrow keys, <code>[[D^</code> characters are getting returned.</p>
  
  <p>How would you rewrite that script to cater for such behaviour, i.e. let me navigate with keys instead of winning an ASCII contest ?</p>