blob: 1ae3b30c77dc59c6f601e900da6b5b10d0dcad44 [file] [log] [blame]
#!/bin/env ruby
# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
require 'format'
columns=nil
data=[]
#ARGF.each do |line|
# line.chomp!
# v = line.split("\t")
# if !columns
# columns = v
# else
# data << v
# end
#end
# Ruby has CSV
require 'csv.rb'
CSV::Reader.parse(ARGF) do |row|
if !columns
columns = row
else
data << row
end
end
Fmt::table(columns, data)