: I found the line command which can read line from user input with timeout
: but it work in Bourn shell so I can do it in C shell ??
: echo 'Enter string : \c'
: reply=`line -t 5`
: if [ "X" = "X$reply" ]
: echo replyBefor = $replyBefor
: echo "reply = $reply"
In general, people are going to tell you not to bother with Csh scripting,
especially when you are considering a problem that is non-trivial even in
If "line" has a "-t" option on your system (I have never heard of such
a thing) that performs a timeout mechanism, one may command:
set input = (`line -t 5`)
Otherwise there is no mechanism either builtin or possible by a hack of
programming that may accomplish such a task, with the remedial I/O
features csh provides.
,---. ,---. ,---. ,---. ,---. ,---. ,---.
/ _ \ / _ \ / _ \ / _ \ / _ \ / _ \ / _ \
__,' `.___,' `.___,' `.___,' `.___,' `.___,' `.___,' `.__