Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bbn!apple!well!dansmith From: dansmith@well.UUCP (Dan "Bucko" Smith) Newsgroups: comp.unix.questions Subject: Re: SYSV version of \"grabchars.c\". Keywords: shell script GNU head stty Message-ID: <11577@well.UUCP> Date: 9 May 89 01:58:58 GMT References: <19462@adm.BRL.MIL> <1201@aplcen.apl.jhu.edu> Reply-To: dansmith@well.UUCP (Dan "Bucko" Smith) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 28 >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@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@pacbell.com daniel@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...