Top-rated recipes tagged "inkey"http://code.activestate.com/recipes/tags/inkey/top/2013-03-28T17:51:32-07:00ActiveState Code RecipesTwo Versions Of Bash One Liner INKEY$ Functions... (Bash) 2013-03-28T17:51:32-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578502-two-versions-of-bash-one-liner-inkey-functions/ <p style="color: grey"> Bash recipe 578502 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/bash/">bash</a>, <a href="/recipes/tags/function/">function</a>, <a href="/recipes/tags/inkey/">inkey</a>, <a href="/recipes/tags/shell/">shell</a>). Revision 2. </p> <p>This is probably common knowledge to the professionals but not so much for amateurs like myself.</p> <p>This is a code snippet for the equivalent of BASIC's...</p> <p>LET char$=INKEY$</p> <p>As the timeout parameter cannot be less than 1 second then this is the only limitation...</p> <p>It is a single line function which has a variable "char"...</p> <p>Read the code for more information...</p> <p>There are now two versions, edit out and choose which is best for you...</p>