From: Robert Klemme Date: 2011-10-27T19:53:30+09:00 Subject: Re: How to SSH interactive Session On Thu, Oct 27, 2011 at 12:47 PM, KING SABRI wrote: > @robert_k78 : Thanks dear > > after your advice, I looked at it, I found it a Linux command, so if I > depend on it then I cant use my script on windows. ??? I was talking about a part of Ruby standard library. 12:51:06 ~$ irb19 -r expect Ruby version 1.9.2 irb(main):001:0> File.open('x','w'){|io| io.puts 'foo'} => nil irb(main):002:0> File.read 'x' => "foo\n" irb(main):003:0> File.open('x', 'r'){|io| io.expect(/^foo/){|l| p l}} ["foo"] => nil irb(main):004:0> File.open('x', 'r'){|io| io.expect(/^bar/){|l| p l}} nil => nil irb(main):005:0> Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/