Telnet client

I use ruby wrote a Telnet client application. It works fine until users
want to change a user name or telnet to other host. I found all these
failed operations are related with “su -” command or login. How can I
let ruby deal with these? Below is my core code for this telnet client:

while 1 == 1
c=gets
tn.cmd©{|c| print c}
if c==“exit”
break
end
end

It simply get what user input and put it on the telnet server.

Zhao Yi wrote:

I use ruby wrote a Telnet client application. It works fine until users
want to change a user name or telnet to other host. I found all these
failed operations are related with “su -” command or login. How can I
let ruby deal with these? Below is my core code for this telnet client:

while 1 == 1
c=gets
tn.cmd©{|c| print c}
if c==“exit”
break
end
end

It simply get what user input and put it on the telnet server.

Can anybody help me on this? Is there a problem with “gets”? I changed
it to “STDIN.gets” but still have such problem.

Can anybody help me on this? Is there a problem with “gets”? I changed
it to “STDIN.gets” but still have such problem.

I replied on the mailing list:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/314220
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/314221

However there appears to be a problem with the gateway to ruby-forum.

On Sep 9, 2008, at 7:53 AM, Brian C. wrote:

Can anybody help me on this? Is there a problem with “gets”? I
changed
it to “STDIN.gets” but still have such problem.

I replied on the mailing list:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/314220
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/314221

However there appears to be a problem with the gateway to ruby-forum.

It does appear that they reached Usenet OK though:

http://groups.google.com/group/comp.lang.ruby/msg/d716ac4f7e2a9851
http://groups.google.com/group/comp.lang.ruby/msg/a1bc46ad94a2bf7a

Hopefully that means that I fixed the other gateway. :slight_smile:

James Edward G. II