title: Read user input in both bash and csh
body: <p>I'm trying to create a script to to do simple things. I need to prompt the user to reply to a question, typing yes or no. The script is written for csh, but does not work when default user shell is bash. My environment is Red Hat Enterprise Linux 5</p>
  
  <pre><code>#!/bin/csh -f
  echo -n Type yes to continue
  set answer = $&lt;
  #...
  </code></pre>
  
  <p>This code works fine with csh but not with bash where it prints the following error:</p>
  
  <pre><code>syntax error near unexpected token 'newline'
  bash 'set answer =$&lt;'
  </code></pre>
  
  <p>I really need to have the same script working for both shell (I thought it was the purpose of putting <code>#!/bin/csh</code> at the beginning of the file!)</p>
  
  <p>I don't really know how to modify my script to make it working in bash. Could you help me please? Thanks a lot for your help.</p>