Hello,

In my attempts to write a simple script that lets the user select
options with a single key stroke I found no other way than to use bash
and its built-in read command with -n 1.

I am looking for a way to do this in ksh(1). Any ideas? Please...

Some snippets from the bash(1) man page:

read [-ers] [-a aname] [-d delim] [-i text] [-n nchars] [-N nchars] [-p
        prompt] [-t timeout] [-u fd] [name ...]
        One line is read from the standard input, or from the file [...]
        -n nchars
                read returns after reading nchars characters rather than
                waiting for a complete line of input, but honor a
                delimiter if fewer than nchars characters are read
                before the delimiter.

Thanks in advance, Marcus

Reply via email to