Sha256: 96331f8232e0d2dcfcb17a34772d24d0489beccb11cff44da2c31fdbb1b035b5
Contents?: true
Size: 685 Bytes
Versions: 28
Compression:
Stored size: 685 Bytes
Contents
#!/usr/bin/env ruby require 'rbbt-util' require 'rbbt/util/simpleopt' options = SOPT.get("-tch--tokyocabinet:-tcb--tokyocabinet_bd:-f--field Field to append to key:-m--merge Consider multiple values even after unzip") file = ARGV.shift file = STDIN if file == '-' field = options[:field] || 0 merge = options[:merge] || false case when options[:tokyocabinet] tsv = Persist.open_tokyocabinet(file, false) when options[:tokyocabinet_bd] tsv = Persist.open_tokyocabinet(file, false, nil, TokyoCabinet::BDB) else if String === file file = file.dup Path.setup(File.expand_path(file)) end tsv = TSV.open(file, :type => :double) end puts tsv.unzip(field, merge).to_s
Version data entries
28 entries across 28 versions & 1 rubygems