human

output numbers in human-readable formats
git clone git://z3bra.org/human
Log | Files | Refs | README | LICENSE

README (733B)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
╻ ╻╻ ╻┏┳┓┏━┓┏┓╻
┣━┫┃ ┃┃┃┃┣━┫┃┗┫
╹ ╹┗━┛╹ ╹╹ ╹╹ ╹
             -- by z3bra
========================

Human is a small program which translate numbers into a human readable format.
By default, it tries to detect the best factorisation, but you can force its
output.

You can adjust the number of decimals by with the `SCALE` environment variable.

    # convert 123456 to the best human factorisation
    human 123456
    121K

    # output 2 decimals
    SCALE=2 human 123456
    120.56K

    SCALE=3 human -m 123456
    0.118M

    # convert from a different factorization level
    SCALE=6 human -g 123M
    0.120117G

Well, that's it (and that's enough !)