Sha256: 658936e7c4156d3c3652296f2a9cbc23b29e077a405aa538cfb28c3a93050c03

Contents?: true

Size: 252 Bytes

Versions: 8

Compression:

Stored size: 252 Bytes

Contents

#!/usr/bin/env ruby
# -*- coding: utf-8 -*-

require 'human_bytes'

decimal = ARGV.delete('-d')
places = ARGV[0] ? Integer(ARGV[0]) : nil

STDIN.each do |num_str|
  puts HumanBytes.human_bytes(Integer(num_str), i: !decimal, places: (places || 2) )
end

Version data entries

8 entries across 4 versions & 1 rubygems

Version Path
human_bytes-0.11.0 bin/human_bytes
human_bytes-0.11.0 exe/human_bytes
human_bytes-0.10.0 bin/human_bytes
human_bytes-0.10.0 exe/human_bytes
human_bytes-0.9.1 exe/human_bytes
human_bytes-0.9.1 bin/human_bytes
human_bytes-0.1.0 bin/human_bytes
human_bytes-0.1.0 exe/human_bytes