human

convert bytes to human readable formats
git clone git://git.2f30.org/human.git
Log | Files | Refs | README | LICENSE

README (733B)


      1 ╻ ╻╻ ╻┏┳┓┏━┓┏┓╻
      2 ┣━┫┃ ┃┃┃┃┣━┫┃┗┫
      3 ╹ ╹┗━┛╹ ╹╹ ╹╹ ╹
      4              -- by z3bra
      5 ========================
      6 
      7 Human is a small program which translate numbers into a human readable format.
      8 By default, it tries to detect the best factorisation, but you can force its
      9 output.
     10 
     11 You can adjust the number of decimals by with the `SCALE` environment variable.
     12 
     13     # convert 123456 to the best human factorisation
     14     human 123456
     15     121K
     16 
     17     # output 2 decimals
     18     SCALE=2 human 123456
     19     120.56K
     20 
     21     SCALE=3 human -m 123456
     22     0.118M
     23 
     24     # convert from a different factorization level
     25     SCALE=6 human -g 123M
     26     0.120117G
     27 
     28 Well, that's it (and that's enough !)