#!/usr/bin/env ruby words = File.readlines('word_seed').map(&:chomp) # Count the number of uniqs in the p2p file 15792.times do username_len = 3+Random.rand(2) uname = [] if username_len > 3 (username_len-1).times { uname << words[Random.rand(words.length)] } uname << (1971+Random.rand(31)).to_s else (username_len-1).times { uname << words[Random.rand(words.length)] } end if Random.rand(2) > 0 puts uname.join('_') else puts uname.map{|x| x.capitalize}.join end end