If i have a # {}
, like #{results}
, in the snippet below:
results = Array.new
f = open("/Users/kahmed/messages", "r")
f.each_line do |line|
results << "#{$.} #{line}" if line =~ /NFE/
puts #{results}
end
How can i use it in the following ssh.exec command
Net::SSH.start( HOST, USER, :password => PASS ) do|ssh|
ssh.exec(#{results})