[ruby-it] Re: Re: Re: Re: Ruby serial and telnet scripts/programs
Giovanni
giomaut a yahoo.com
Mar 1 Ago 2006 16:32:24 CEST
tele wrote:
> matcha il prompt, quando ritorna al prompt vuol dire che ha finito di
> fare il comando.
>
> ad es:
> @t_session.puts commands[0]
> @t_session.waitfor(/.*>/) {|str| print str }
>
> usa le regexp
>
> ciao
Ho provato con:
sigma.waitfor("Starting POTS" => match, "timeout" => 20){|c| print c}
c:/ruby/lib/ruby/1.8/net/telnet.rb:551 in 'waitfor'
--
Posted via http://www.ruby-forum.com/.
Maggiori informazioni sulla lista
Ml