title: Shell: How can I make a text-mode bar chart from parsed data (numbers)?
body: <p>I am developing a Linux's Bash shell script that <strong>extracts data</strong> from a text file leaving only the <strong>numbers</strong>. 
  These are my <em>example</em> parsed data:</p>
  
  <pre><code>3
  4
  4
  5
  6
  7
  8
  8
  9
  11
  </code></pre>
  
  <p>I would like to create a simple <strong>text-mode bar chart</strong> like this one, but corresponding to these values:</p>
  
  <p><img src="https://i.stack.imgur.com/FHXNv.png" alt="Bar chart"></p>
  
  <p>Details:</p>
  
  <ul>
  <li>I need the graphic chart to be <strong>vertical</strong>.</li>
  <li>The first numbers should appear on the <strong>left</strong>, latest on the <strong>right</strong>.</li>
  <li>A <code>n</code> (parsed number) characters <strong>high column</strong> is appropriate for me. So the first bar on the left in my example should be 3 characters high, the second 4, the third 4, the fourth 5, and so on.</li>
  </ul>
  
  <p>More precisely, for this example, something (using the <code>█</code>character) like:</p>
  
  <pre><code>         █
           █
          ██ 
         ███
        ████
       █████
      ██████
     ███████
   █████████
  ██████████
  ██████████
  ██████████
  </code></pre>
  
  <p>Note the 3 characters high for the first (left) column and 11 characters high for the last (right) column.<br>
  Same example with <code>$</code> characters, to make it more readable:</p>
  
  <pre><code>         $
           $
          $$
         $$$
        $$$$
       $$$$$
      $$$$$$
     $$$$$$$
   $$$$$$$$$
  $$$$$$$$$$
  $$$$$$$$$$
  $$$$$$$$$$
  </code></pre>
  
  <p>The closest I know of is my method for <em>progress bar</em> until now, that I have used in another scripts:</p>
  
  <pre><code>printf "\033[48;5;21m"   # Blue background color
  for i in $(seq 1 $n); do printf " "; done   # Create bar using blue spaces
  </code></pre>
  
  <p>This is: filling each line printing a bar with <code>n</code> spaces. But this bar is horizontal, so it is not appropriate in this case.</p>
  
  <p>I request some core <strong>loop example ideas</strong> to create this bar chart.</p>
  
  <p>Under the suggestion of user Boardrider, solutions based on any unix-like tools are accepted.
  Solutions based on scripting languages (like Perl or Python) for the Linux shell are accepted too, as long as they use to be implemented on many devices.</p>