On 2 September 2010 12:28, Srinidhi
<srinidhi158-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hello Everyone,
>
> I have a situation where i have to invoke command line tools like
> putty_sftp and OpenSSH from ruby script for automation, as out
> application handles sftp uploads through these tools.
> So the problem is i can single DOS command in ruby and store the
> output(using system( ),exec( )), but here were are talking abt
> multiple DOS commands to achieve the goal.
Put the commands in a batch file if you do not want to call them one by one.
> Also i have to pick up values like user id and password from excel
> file(which i am doing using ruby).I have to know how to pass these
> value to DOS batch file from ruby.
If the question is how to get them out of excel file I cannot help,
but to put them in the command just put them in the string you are
passing to system.
>
> It would be a boon if i can all the DOS commands in my ruby program
> one by one, so it''s easy to parametrize variables without much.
I am confused, first you say you know how to run them one by one and
want to do them several at one go, then you ask how to pass params to
a batch file, then you say you want to run them one by one again.
Obviously I am missing something.
Colin
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.