From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from math.gatech.edu (euclid.skiles.gatech.edu [130.207.146.50]) by werple.net.au (8.7/8.7.1) with SMTP id AAA00162 for ; Tue, 14 Nov 1995 00:27:59 +1100 (EST) Received: by math.gatech.edu (5.x/SMI-SVR4) id AA00229; Mon, 13 Nov 1995 08:13:43 -0500 Resent-Date: Mon, 13 Nov 1995 15:15:35 +0200 Old-Return-Path: Date: Mon, 13 Nov 1995 15:15:35 +0200 From: sverre@research.nokia.com (Sverre Slotte) Message-Id: <9511131315.AA29467@nike.spices> Newsgroups: comp.unix.shell Subject: SUMMARY: read with timeout? Organization: Nokia Research Center Apparently-To: dansmith@well.sf.ca.us Apparently-To: daniel@island.uu.net Apparently-To: zsh-workers@math.gatech.edu Resent-Message-Id: <"IFTIE1.0.V3.6Iqfm"@euclid> To: zsh-workers@math.gatech.edu Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/603 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Last week I asked: Is there a way to give the read-command (in zsh) a timeout-value? I got two answers. Vinnie Shelton suggested I use expect, and Karl Vogel 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@research.nokia.com 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