SUMMARY: Progam that doesn't accept STDIN pipes

From: Eric Voisard <>
Date: Fri Dec 19 2003 - 05:29:05 EST

Given the number of replies I got, I should feel somewhat ignorant not to
know 'expect'!
Thanks to the many people who gave me suggestions.

My problem is a program which is normally used interactively, but which
fails on STDIN input pipes. Such a command doesn't work: 'echo my_string |
/path/prog', nor does '/path/prog < file'.

What I've noticed with 'truss /path/prog' is that my program does indeed use
STDIN (no tty as I supposed), and makes some read(0,*buf, size) on it. I
guess it is doing things on its own on SDTIN and doesn't expect some EOF.

As most people suggested, running my prog through the tcl tool "Expect" could do the trick. There is a Solaris precompiled
version at This would need the Tcl package.

I also found a Perl module ''at and which is
supposed to do a similar work.

Again, many thanks to all, Eric Voisard
sunmanagers mailing list
Received on Fri Dec 19 05:29:00 2003

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:25 EST