Sha256: eddb871db7fd6a3fe42b91cff866e04674feccc4a14a9ba2cc57f2ef3337789f

Contents?: true

Size: 356 Bytes

Versions: 26

Compression:

Stored size: 356 Bytes

Contents

#!/usr/bin/env ruby

target = ARGV[1].to_i

map = {}

STDIN.each_line do |line|
  chunks = line.split(" ")
  next unless chunks[target]
  map[chunks[target]] ||= []
  map[chunks[target]].push(line)
end

map.each do |identifier, lines|
  File.open("group_#{identifier}.log", 'a+') do |file|
    lines.each do |line|
      file.puts(line)
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
ix-cli-0.0.27 bin/ix-group
ix-cli-0.0.26 bin/ix-group
ix-cli-0.0.25 bin/ix-group
ix-cli-0.0.24 bin/ix-group
ix-cli-0.0.23 bin/ix-group
ix-cli-0.0.22 bin/ix-group
ix-cli-0.0.21 bin/ix-group
ix-cli-0.0.20 bin/ix-group
ix-cli-0.0.19 bin/ix-group
ix-cli-0.0.18 bin/ix-group
ix-cli-0.0.17 bin/ix-group
ix-cli-0.0.16 bin/ix-group
ix-cli-0.0.15 bin/ix-group
ix-cli-0.0.14 bin/ix-group
ix-cli-0.0.13 bin/ix-group
ix-cli-0.0.12 bin/ix-group
ix-cli-0.0.11 bin/ix-group
ix-cli-0.0.10 bin/ix-group
ix-cli-0.0.9 bin/ix-group
ix-cli-0.0.7 bin/ix-group