From: Robert Klemme Date: 2009-11-20T16:30:06+09:00 Subject: Re: For Loop On 19.11.2009 22:41, Unix4Linux Unix4Linux wrote: > I also forgot to ask, in SHELL, when I run shell scripts, I can see what > the script is doing. I am not referring to debug mode but more the > output of each command being executed. > > Is this possible with Ruby? > > For example, in shell, if I had a command `yum -y install package_name`, > I am able to see all of the required packages being installed...pretty > much, I can see the process of it all. ["Account File", "Bank File", "Study Case", "Overall Status"].each |group| system "scp", group, 'user@server1:/tmp' end Assuming all these "groups" are in a single directory you can also do Dir["#{dir}/*"].each |group| system "scp", group, 'user@server1:/tmp' end Then, if you want to process the output of the command you should look into IO.popen. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/