I have the following code:
puts "amit"
puts "ravi"
It outputs:
amit
ravi
I would like to redirect amit to one file and ravi to a different file.
Suppose my file name is name.rb
. When I am trying like
system("name.rb > #{@filename}")
both amit and ravi are redirected to @filename but I want redirection to a different file or first it will redirect to two files of same name but in one file output is amit and in other file of same output is ravi.