# the ruby way to download files
— useful if you haven’t got wget on the system…
require ‘open-uri’
writeOut = open(whereItGoes, “wb”)
writeOut.write(open(urlToGet).read)
writeOut.close
puts “downloaded” + urlToGet + “\n”
Of course, this reads in the whole file before writing it (I bet), so be careful.
this may not close the url, though