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.68 share/rbbt_commands/tsv/get
rbbt-util-5.21.67 share/rbbt_commands/tsv/get
rbbt-util-5.21.66 share/rbbt_commands/tsv/get
rbbt-util-5.21.64 share/rbbt_commands/tsv/get
rbbt-util-5.21.63 share/rbbt_commands/tsv/get
rbbt-util-5.21.62 share/rbbt_commands/tsv/get
rbbt-util-5.21.61 share/rbbt_commands/tsv/get
rbbt-util-5.21.60 share/rbbt_commands/tsv/get
rbbt-util-5.21.59 share/rbbt_commands/tsv/get
rbbt-util-5.21.58 share/rbbt_commands/tsv/get
rbbt-util-5.21.57 share/rbbt_commands/tsv/get
rbbt-util-5.21.56 share/rbbt_commands/tsv/get
rbbt-util-5.21.55 share/rbbt_commands/tsv/get
rbbt-util-5.21.54 share/rbbt_commands/tsv/get
rbbt-util-5.21.53 share/rbbt_commands/tsv/get
rbbt-util-5.21.51 share/rbbt_commands/tsv/get
rbbt-util-5.21.50 share/rbbt_commands/tsv/get
rbbt-util-5.21.49 share/rbbt_commands/tsv/get
rbbt-util-5.21.47 share/rbbt_commands/tsv/get
rbbt-util-5.21.46 share/rbbt_commands/tsv/get