Bob Proulx <b...@proulx.com> writes: >> spawn /usr/bin/ssh $usr@$host > > The above will then always get EOF from the here-document file which > has already been read to the end of file.
Wrong. The spawned process is connected to the expect process via a pty, and will read whatever the latter sends to it. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."