From: Joel VanderWerf Date: 2004-01-09T07:07:26+09:00 Subject: Re: Store shell session/cmd.exe session in some object? Zach Dennis wrote: > I'd like to do something like: > > mysession = SystemShell.new //Would I open a pipe? Would it be a IO.new? > dir_list = mysession.puts( "ls -al" ) //on Linux > dir_list = mysession.puts( "dir" ) //on Windows > > and then further more do this: > > mysession.puts( "ssh -l myname 127.0.0.1" ) > mysession.puts( "cd /opt/webstar/etc/etc/" ) > list = mysession.puts( "ls -al" ) > > And so on. Does this make sense. Basically I am looking to be able to keep a > session open with the system and receive it's output. This would prove > beneficial in the case that I ssh into several server and gather data from > each server in my script. Any ideas? I've never used it, but does shell.rb in the standard lib do what you want?