Hi, 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" http://expect.nist.gov/ could do the trick. There is a Solaris precompiled version at http://www.sunfreeware.com. This would need the Tcl package. I also found a Perl module 'comm.pl'at http://www.cpan.ch and which is supposed to do a similar work. Again, many thanks to all, Eric Voisard _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagersReceived 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