From: Jonathan Hudson Date: 2006-12-20T23:10:09+09:00 Subject: Re: how to expect eof with expect+pty On Wed, 20 Dec 2006 22:56:44 +0900 "Simon Strandgaard" wrote: > On 12/20/06, Simon Strandgaard wrote: > > On 12/20/06, Simon Strandgaard wrote: > > [snip] > > > I want to listen for: > > > 'Enter passphrase: ' > > > 'Repeat passphrase: ' > > > eof? > > [snip] > > > > > > Ok I got a partial solution.. now it would be nice if I could access > > the string accumlated in readlines when this thing timeouts. > [snip] > > Now its working.. thanks ruby-talk :-) > If you don't care about overwriting, doesn't "--yes" remove the overwrite prompt (it does interactively) ? PTY.spawn("gpg --yes -c #{filename}")