diff options
author | Patrick Simianer <p@simianer.de> | 2015-01-07 18:47:50 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2015-01-07 18:47:50 +0100 |
commit | cf0bf046e51a4a76315b8c964fabc8e641eb91fe (patch) | |
tree | c2746bc11a2a33007636f98c96bded350e264f40 /max_len | |
parent | e0b634754d1bef33dc8e72509c6990cccc32745a (diff) |
select_from, max_len
Diffstat (limited to 'max_len')
-rwxr-xr-x | max_len | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -0,0 +1,16 @@ +#!/usr/bin/env ruby + +require 'zipf' + +max = ARGV[0].to_i + +i = 0 +while line = STDIN.gets + if tokenize(line).size <= max + puts i + else + STDERR.write line + end + i += 1 +end + |