Sha256: 8360ea28e9fc5851c84abfb62fe964f8dc93addce5be15526cbeeba94883ce68

Contents?: true

Size: 494 Bytes

Versions: 276

Compression:

Stored size: 494 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

Version data entries

276 entries across 276 versions & 1 rubygems

Version Path
rbbt-util-5.21.0 share/rbbt_commands/tsv/get
rbbt-util-5.20.26 share/rbbt_commands/tsv/get
rbbt-util-5.20.25 share/rbbt_commands/tsv/get
rbbt-util-5.20.24 share/rbbt_commands/tsv/get
rbbt-util-5.20.23 share/rbbt_commands/tsv/get
rbbt-util-5.20.22 share/rbbt_commands/tsv/get
rbbt-util-5.20.21 share/rbbt_commands/tsv/get
rbbt-util-5.20.20 share/rbbt_commands/tsv/get
rbbt-util-5.20.18 share/rbbt_commands/tsv/get
rbbt-util-5.20.17 share/rbbt_commands/tsv/get
rbbt-util-5.20.16 share/rbbt_commands/tsv/get
rbbt-util-5.20.15 share/rbbt_commands/tsv/get
rbbt-util-5.20.14 share/rbbt_commands/tsv/get
rbbt-util-5.20.13 share/rbbt_commands/tsv/get
rbbt-util-5.20.12 share/rbbt_commands/tsv/get
rbbt-util-5.20.11 share/rbbt_commands/tsv/get
rbbt-util-5.20.10 share/rbbt_commands/tsv/get
rbbt-util-5.20.9 share/rbbt_commands/tsv/get
rbbt-util-5.20.8 share/rbbt_commands/tsv/get
rbbt-util-5.20.7 share/rbbt_commands/tsv/get