on format-real-float help sign in
16 lines 267 B history raw
1#!/usr/bin/env ruby
3require './utils.rb'
5def cut(filename, l, r)
6 File.open(filename, 'r:utf-8') do |file|
7 file.each_line do |line|
8 puts line[l, r - l]
9 end
10 end
11end
13ARGV.each do |f|
14 t = benchmark { cut(f, 20, 40) }
15 STDERR.puts "#{f}: #{t}"
16end