#!/usr/bin/env ruby subreddits = File.readlines('subreddits_list').map(&:chomp).uniq! redditors = File.readlines('random_reddit_ids').map(&:chomp) counter = 0 subreddits.each do |sr| (3+Random.rand(18)).to_i.times do puts "s#{counter}\tu#{Random.rand(redditors.length)}" end counter += 1 end