Linux

An AWK histogram with scaling

It’s not hard to build a frequency-of-occurrence histogram with AWK, but scaling the histogram bars is a little bit trickier. By “scaling” I mean setting the longest bar to a defined character length in the terminal, and adjusting the lengths of all the shorter bars proportionally.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment moderation is enabled. Your comment may take some time to appear.

Back to top button