- Nov 29, 2006
- 17,461
- 82
- 86
I need some quick help with a Ruby script, nothing fancy but I'm stuck as I'm not a scripting guy by any means.
Essentially, I need the script to open a file, do some stuff, and then write the result to a file.
File.open ("file.txt") do |file|
do_stuff > result
print result.to_jason , "\n"
...
File.new("new.txt", "w")
I'm stuck at the ... part. Help!
Essentially, I need the script to open a file, do some stuff, and then write the result to a file.
File.open ("file.txt") do |file|
do_stuff > result
print result.to_jason , "\n"
...
File.new("new.txt", "w")
I'm stuck at the ... part. Help!