Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Remotely passing value on system() or %x[]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Bikas De simex, post: 4620463"] Hi, I want to execute a remote bash script that take one string argument by using system() or %x[]. But the value argument is not transmited remotely. Here my program def trait_fic(repfic) Find.find(repfic) do |path| unless FileTest.directory?(path) dirc="#{path}".split(/\//) puts "#{dirc[3]}\n" system('plink -pw ppp xxx@yyyy /tmp/essai.ksh #{dirc[3]}') end end end trait_fic('I:/toto') I have got: PTOTO -------------------------> This is done by puts "#{dirc[3]}\n" <--- Le batch traité est .......................... /tmp/mma/essai.ksh[36]: syntax error at line 214 : `"Nous traitons le batch $BATH ...n"' unexpected Is there any way to transmit remotely this value. I also try net/ssh with no succes. Thanks in Advance [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Remotely passing value on system() or %x[]
Top