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.91 share/rbbt_commands/tsv/get
rbbt-util-5.21.90 share/rbbt_commands/tsv/get
rbbt-util-5.21.89 share/rbbt_commands/tsv/get
rbbt-util-5.21.87 share/rbbt_commands/tsv/get
rbbt-util-5.21.86 share/rbbt_commands/tsv/get
rbbt-util-5.21.85 share/rbbt_commands/tsv/get
rbbt-util-5.21.84 share/rbbt_commands/tsv/get
rbbt-util-5.21.83 share/rbbt_commands/tsv/get
rbbt-util-5.21.81 share/rbbt_commands/tsv/get
rbbt-util-5.21.80 share/rbbt_commands/tsv/get
rbbt-util-5.21.78 share/rbbt_commands/tsv/get
rbbt-util-5.21.77 share/rbbt_commands/tsv/get
rbbt-util-5.21.76 share/rbbt_commands/tsv/get
rbbt-util-5.21.75 share/rbbt_commands/tsv/get
rbbt-util-5.21.74 share/rbbt_commands/tsv/get
rbbt-util-5.21.73 share/rbbt_commands/tsv/get
rbbt-util-5.21.72 share/rbbt_commands/tsv/get
rbbt-util-5.21.71 share/rbbt_commands/tsv/get
rbbt-util-5.21.70 share/rbbt_commands/tsv/get
rbbt-util-5.21.69 share/rbbt_commands/tsv/get