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.
In reply to Re: trapping output from /dev/tty
by Anonymous Monk
in thread trapping output from /dev/tty
by former33t
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |