From: "Bermejo, Rodrigo" Date: 2004-01-14T03:27:25+09:00 Subject: Re: Host command with rsh ? You can use net/telnet instead require 'net/telnet' c=%^export PATH=/pvcsbindir:$PATH; vlogmypvcsarchive > tomyfile; echo "^ s = Net::Telnet.new({"Host" => "myaixmachine") s.login("myuser","password") p s.command(c) s.close Jerome Hauss wrote: >Hi, > >I am trying to launch a host command to windows, the command is >something like >"rsh myaixmachine -l myuser \"export PATH=/pvcsbindir:$PATH; vlog >mypvcsarchive > tomyfile; echo\"" > >I would like to get the standard output for this command. But it does >not work properly : I need to do in my Windows console window, >and if I launch several such commands, it happens I am really stuck. > >It works with simple commands to Windows. And it works also when I try >some prepared command with `mycommand` > >An idea to this problem ? > >Regards, >J�r�me Hauss > > >PS. One of my simple tries > >def rsh(myaixmachine, command) > @t = nil > s = "rsh " + myaixmachine + " -l myuser \"#{ command }\"" > puts s > @pipe = IO.popen(s) > @t = @pipe.read > @pipe.close > @t > end > > >