Sha256: 5cdbbde8e0b647213f7543956ed503be724d9d2606b786c413b352dbb7bbff47
Contents?: true
Size: 499 Bytes
Versions: 121
Compression:
Stored size: 499 Bytes
Contents
#!/usr/bin/env ruby require 'rbbt-util' require 'rbbt/util/simpleopt' options = SOPT.get("-tch--tokyocabinet:-tcb--tokyocabinet_bd") file = ARGV.shift value = ARGV.shift case when options[:tokyocabinet] tsv = Persist.open_tokyocabinet(file, false) when options[:tokyocabinet_bd] tsv = Persist.open_tokyocabinet(file, false, nil, TokyoCabinet::BDB) else tsv = TSV.open(file, :grep => value ) end res = tsv[value] if res.nil? raise "RECORD NOT FOUND" else puts tsv[value].report end
Version data entries
121 entries across 121 versions & 1 rubygems
Version | Path |
---|---|
rbbt-util-5.5.42 | share/rbbt_commands/tsv/get |