Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
Report abuse
1 2 3 4 5 6 7 8 9 10 11
letters = %w(A T G C) File.open(ARGV[0], 'w+') do |f| (lines = ARGV[1].to_i).times do (width = (ARGV[2] || 70).to_i).times do f.write letters[rand(4)] end f.write "\n" unless f.pos == (lines * (width + 1) - 1) end puts "wrote #{lines} lines to #{ARGV[0]}" end
Pasted August 10, 2007 2:25PM EDT
by PotatoSalad
Embed
paste again
Ads from Ruby Row