bash, non-blocking stdin/console input
<p>I will like to write (using bash) something like </p>

<pre><code>while no_user_key_pressed
{
  do_something....
}
</code></pre>

<p>There are a few options using C++, Java, ncurses and others o/s specific. I want a simple bash portable function.</p>

<p><kbd>^c</kbd> interrupt should be used to kill the remaining code. Imagine something like: 'Press any key to stop test'</p>