log2hist chews numbers, spits out ascii histograms.
$ shuf -i 2000-65000 -n 200 | log2hist
[2048, 4096) 8 ∎∎∎
[4096, 8192) 10 ∎∎∎∎
[8192, 16384) 19 ∎∎∎∎∎∎∎∎∎
[16384, 32768) 57 ∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
[32768, 65536) 106 ∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
The code and idea are heavily influenced by the log2 histograms from bpftrace.
MIT.