Sha256: 769e1d89c04d4dfeffc6e6e40693bc2fb31db13b77957f9364891dfaba800f4c
Contents?: true
Size: 765 Bytes
Versions: 264
Compression:
Stored size: 765 Bytes
Contents
#!/usr/bin/env ruby code_file = ARGV[0] output = ARGV[1] require 'rbbt-util' code = case when (code_file.nil? or code_file == '-') STDIN.read else Open.read(code_file) end begin if code_file.nil? data = instance_eval code else data = instance_eval code, code_file end rescue Exception puts "#:rbbt_exec Error" puts $!.message puts $!.backtrace * "\n" exit(-1) end #data = data.to_s(:sort) if TSV === data data = data * "\n" if Array === data case when (output.nil? or output == '-') puts data when output == "file" if Misc.filename? data tmpfile = data else tmpfile = TmpFile.tmp_file Open.write(tmpfile, data.to_s) end puts tmpfile else Open.write(output, data.to_s) end
Version data entries
264 entries across 264 versions & 1 rubygems
Version | Path |
---|---|
rbbt-util-5.26.64 | bin/rbbt_exec.rb |
rbbt-util-5.26.63 | bin/rbbt_exec.rb |
rbbt-util-5.26.62 | bin/rbbt_exec.rb |
rbbt-util-5.26.59 | bin/rbbt_exec.rb |