RE: [ILUG] Bourne Shell Q

From: Stephen_Reilly at domain dell.com
Date: Tue 12 Jun 2001 - 18:16:16 IST


read -t3 response
if $response = "" then echo "non interactive" fi

-----Original Message-----
From: Breathnach, Proinnsias (Dublin)
[mailto:breatpro at domain exchange.ie.ml.com]
Sent: 12 June 2001 17:46
To: 'ILUG'
Subject: [ILUG] Bourne Shell Q

Anyone know how to have a timed-out question in a shell script ?

Scenario:
        Ask user do they want to run an interactive session.
        If no reply in 3 seconds assume the answer is no and continue

All suggestions welcome :o)

Proinnsias

-- 
Irish Linux Users' Group: ilug at domain linux.ie
http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
List maintainer: listmaster at domain linux.ie


This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:10:38 GMT