From: Bikas De simex Date: 2008-10-02T00:24:48+09:00 Subject: Remotely passing value on system() or %x[] 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: >ruby essai0.rb 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 -- Posted via http://www.ruby-forum.com/.