on bebb340 help sign in
15 lines 249 B history raw
1#!/usr/bin/env ruby
3require './utils.rb'
5def sort(filename)
6 File.open(filename, 'r:utf-8') do |file|
7 content = file.read
8 puts content.lines.sort.join
9 end
10end
12ARGV.each do |f|
13 t = benchmark { sort(f) }
14 STDERR.puts "#{f}: #{t}"
15end