Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
SUMMARY: read with timeout?
- X-seq: zsh-workers 602
- From: sverre@xxxxxxxxxxxxxxxxxx (Sverre Slotte)
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: SUMMARY: read with timeout?
- Date: Mon, 13 Nov 1995 15:10:36 +0200
- Apparently-to: dansmith@xxxxxxxxxxxxx
- Apparently-to: daniel@xxxxxxxxxxxxx
- Apparently-to: zsh-workers@xxxxxxxxxxxxxxx
- Organization: Nokia Research Center
Last week I asked:
Is there a way to give the read-command (in zsh) a timeout-value?
I got two answers. Vinnie Shelton <shelton@xxxxxxxxxxxxxxxx> suggested
I use expect, and Karl Vogel <vogelke@xxxxxxxxxxxxxxxxxxx> recommended
grabchars (from comp.sources.misc volume 12).
Both of these will obviously work with any shell.
Expect seemed like overkill, so I had a closer look at grabchars. It
does exactly what I want. In fact, it does things I didn't even know I
wanted:
grabchars -ccfmos -df -t10 -L
^ ^ ^ ^
| | | |
| | | +---- fold to lower case
| | +--------- timeout 10 seconds
| +------------- default value `f'
+--------------------- valid characters
The binary is small and compact, 24576 bytes on SunOS (dyn.linked).
This version of grabchars is rather old: 1.9. (Copyright (c) 1988,
1989, 1990, Dan Smith). Does anyone know of a newer version?
Thanks for your help,
Sverre
----------------------------------------------------------------------------
Sverre Slotte Internet: sverre@xxxxxxxxxxxxxxxxxx
Nokia Research Center Phone: + 358 0 43766208
P.O.Box 45, 00211 Helsingfors, Finland Phax: + 358 0 43766856
----------------------------------------------------------------------------
"Kajakken er uten sammenligning den ypperste enkeltmannsfarkost som finnes."
-- Fritjof Nansen 1891
Messages sorted by:
Reverse Date,
Date,
Thread,
Author