in reply to trapping output from /dev/tty

if you are on linux, you probably have the expect command bundled. there are many examples that come with the expect distribution. http://expect.nist.gov/#examples and http://expect.nist.gov/example

maybe you can adapt one of these.

Replies are listed 'Best First'.
Re^2: trapping output from /dev/tty
by sgt (Deacon) on Oct 05, 2006 at 10:12 UTC

    i forgot to mention in the previous post that the output of 'man 7 tty' o 'man 4 tty' is of interest

    **HP-UX 11.0**: The file /dev/tty is, in each process, a synonym for the control terminal associated with the process group of that process, if any. It is useful for programs or shell sequences that need to be sure of writing messages on the terminal no matter how output has been redirected. It can also be used for programs that demand the name of a file for output, when typed output is desired and it is tiresome to find out what terminal is currently in use.

    --steph (sgt)