From: Naresh Ramaswamy Date: 2009-01-23T20:13:27+09:00 Subject: Re: Remotely passing value on system() or %x[] I have the similar problem for which I tried the solutions in this mail thread. I could not succeed with the results. Please suggest your solution. Here is what I tried. File some.txt contains following two lines basetest send REGISTER, recv 200 **********************my script**************************** require 'rio' # get first 4 lines (as always in ruby indexing starts at 0) $filename = rio('some.txt').lines[0..0] $basecase = rio('some.txt').lines[1..1] temp = "#$basecase" temp.gsub! /send/, ">" temp.gsub! /recv/, "<" #puts "#$filename" #puts temp #puts "#{temp}" run = "sgen -t #$filename #{temp}" puts run #puts `run` *********************end of my script********************** ************************output***************************** sgen -t basetest > REGISTER, < 200 *********************************************************** Observed that ruby outputs them into next line :( Please let me know the solution for the same. Naresh -- Posted via http://www.ruby-forum.com/.