SYSV version of \"grabchars.c\".
Dan "Bucko" Smith
dansmith at well.UUCP
Tue May 9 11:58:58 AEST 1989
>I would expect that GNU head could be used the same way. Multi-sequence
>keys would fool it (such as function keys) -- does grabchars handle this?
>Is there a better way yet (in shell)?
>
> -- Greg Ubben
> bink at aplcen.apl.jhu.edu
Grabchars could be tought about function keys, that isn't
supported yet. What it can do now is:
timeout after a given number of seconds
allow only a given set of characters (using regular expressions)
(filter for numbers only, alpha only, etc.)
take in (up to) a given number of characters
a default character can be returned if RETURN is hit
map lower->upper, upper->lower case
flush or not flush previous input (kill or don't kill typeahead)
echo or not echo characters typed to stdout and/or stderr
(for setting variables in shell scripts)
etc... these all work together now.
dan
--
Dan "Bucko" Smith
well!dansmith unicom!daniel at pacbell.com daniel at island.uu.net
ph: (415) 332 3278 (h), 258 2176 (w) disclaimer: Island's coffee was laced :-)
My mind likes Cyberstuff, my eyes films, my hands guitar, my feet skiing...
More information about the Comp.unix.questions
mailing list