<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Simulating a graph-bar generator in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/simulating-a-graph-bar-generator/m-p/3232608#M894897</link>
    <description>Not sure about getting the bars vertically, however;&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;A=8&lt;BR /&gt;B=2&lt;BR /&gt;C=5&lt;BR /&gt;D=0&lt;BR /&gt;E=5&lt;BR /&gt;STRING="====="&lt;BR /&gt; &lt;BR /&gt;for LIST in A B C D E&lt;BR /&gt;do&lt;BR /&gt;COUNT=0&lt;BR /&gt;echo "$LIST \c"&lt;BR /&gt;while [ $COUNT -lt $LIST ]&lt;BR /&gt;do&lt;BR /&gt;echo "$STRING \c"&lt;BR /&gt;COUNT=`expr $COUNT + 1`&lt;BR /&gt;done&lt;BR /&gt;echo ""&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This generates&lt;BR /&gt;&lt;BR /&gt;A ===== ===== ===== ===== ===== ===== ===== =====&lt;BR /&gt;B ===== =====&lt;BR /&gt;C ===== ===== ===== ===== =====&lt;BR /&gt;D&lt;BR /&gt;E ===== ===== ===== ===== =====&lt;BR /&gt;&lt;BR /&gt;Hope that's of some use.&lt;BR /&gt;&lt;BR /&gt;Chris</description>
    <pubDate>Mon, 29 Mar 2004 09:57:23 GMT</pubDate>
    <dc:creator>Chris Wilshaw</dc:creator>
    <dc:date>2004-03-29T09:57:23Z</dc:date>
    <item>
      <title>Simulating a graph-bar generator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simulating-a-graph-bar-generator/m-p/3232606#M894895</link>
      <description>Hi pals,&lt;BR /&gt;&lt;BR /&gt;Any smart shell-script to simulate into a text environment a graph-bar chart. Pls imagine the following data colection:&lt;BR /&gt;&lt;BR /&gt;A=8&lt;BR /&gt;B=2&lt;BR /&gt;C=5&lt;BR /&gt;D=0&lt;BR /&gt;E=4&lt;BR /&gt;&lt;BR /&gt;Then I'll need obtain something like this:&lt;BR /&gt;&lt;BR /&gt;  ====&lt;BR /&gt;  ====&lt;BR /&gt;  ====&lt;BR /&gt;  ====        ====&lt;BR /&gt;  ====        ====        ====&lt;BR /&gt;  ====        ====        ====&lt;BR /&gt;  ====  ====  ====        ====&lt;BR /&gt;  ====  ====  ====        ====&lt;BR /&gt;    A     B     C     D     E &lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;JMM</description>
      <pubDate>Mon, 29 Mar 2004 09:34:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simulating-a-graph-bar-generator/m-p/3232606#M894895</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2004-03-29T09:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating a graph-bar generator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simulating-a-graph-bar-generator/m-p/3232607#M894896</link>
      <description>Pls see attached text in previuos note to see the real output wanted.&lt;BR /&gt;&lt;BR /&gt;BR,&lt;BR /&gt;&lt;BR /&gt;JMM</description>
      <pubDate>Mon, 29 Mar 2004 09:44:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simulating-a-graph-bar-generator/m-p/3232607#M894896</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2004-03-29T09:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating a graph-bar generator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simulating-a-graph-bar-generator/m-p/3232608#M894897</link>
      <description>Not sure about getting the bars vertically, however;&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;A=8&lt;BR /&gt;B=2&lt;BR /&gt;C=5&lt;BR /&gt;D=0&lt;BR /&gt;E=5&lt;BR /&gt;STRING="====="&lt;BR /&gt; &lt;BR /&gt;for LIST in A B C D E&lt;BR /&gt;do&lt;BR /&gt;COUNT=0&lt;BR /&gt;echo "$LIST \c"&lt;BR /&gt;while [ $COUNT -lt $LIST ]&lt;BR /&gt;do&lt;BR /&gt;echo "$STRING \c"&lt;BR /&gt;COUNT=`expr $COUNT + 1`&lt;BR /&gt;done&lt;BR /&gt;echo ""&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;This generates&lt;BR /&gt;&lt;BR /&gt;A ===== ===== ===== ===== ===== ===== ===== =====&lt;BR /&gt;B ===== =====&lt;BR /&gt;C ===== ===== ===== ===== =====&lt;BR /&gt;D&lt;BR /&gt;E ===== ===== ===== ===== =====&lt;BR /&gt;&lt;BR /&gt;Hope that's of some use.&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Mon, 29 Mar 2004 09:57:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simulating-a-graph-bar-generator/m-p/3232608#M894897</guid>
      <dc:creator>Chris Wilshaw</dc:creator>
      <dc:date>2004-03-29T09:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating a graph-bar generator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simulating-a-graph-bar-generator/m-p/3232609#M894898</link>
      <description>SMOP:&lt;BR /&gt;&lt;BR /&gt;in perl:&lt;BR /&gt;&lt;BR /&gt;$data{"A"} = 8;&lt;BR /&gt;$data{"B"} = 2;&lt;BR /&gt;$data{"C"} = 5;&lt;BR /&gt;$data{"D"} = 0;&lt;BR /&gt;$data{"E"} = 4;&lt;BR /&gt;foreach $key (keys %data) { $max = $data{$key} if ($data{$key} &amp;gt; $max)};&lt;BR /&gt;while ($max-- &amp;gt; 0) {&lt;BR /&gt;  foreach $key (keys %data) {&lt;BR /&gt;    printf ("%6.6s ", ($data{$key} &amp;gt;= $max)? "====": "    ");&lt;BR /&gt;    }&lt;BR /&gt;  print "\n";&lt;BR /&gt;  }&lt;BR /&gt;foreach $key (keys %data) {&lt;BR /&gt;  printf ("%6.6s ", $key);&lt;BR /&gt;  }&lt;BR /&gt;print "\n";&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Mar 2004 10:08:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simulating-a-graph-bar-generator/m-p/3232609#M894898</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-03-29T10:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating a graph-bar generator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simulating-a-graph-bar-generator/m-p/3232610#M894899</link>
      <description>Might as well do it right....&lt;BR /&gt;&lt;BR /&gt;With boundary condition fixed, and sorted key values:&lt;BR /&gt;&lt;BR /&gt;$data{"A"} = 8;&lt;BR /&gt;$data{"B"} = 2;&lt;BR /&gt;$data{"C"} = 5;&lt;BR /&gt;$data{"D"} = 0;&lt;BR /&gt;$data{"E"} = 4;&lt;BR /&gt;foreach $key (sort keys %data) {&lt;BR /&gt;  $max = $data{$key} if ($data{$key} &amp;gt; $max);&lt;BR /&gt;  push @k, $key;&lt;BR /&gt; };&lt;BR /&gt;while ($max &amp;gt; 0) {&lt;BR /&gt;  foreach $key (@k) {&lt;BR /&gt;    printf ("%6.6s ", ($data{$key} &amp;gt;= $max)? "====": "    ");&lt;BR /&gt;    }&lt;BR /&gt;  print "\n";&lt;BR /&gt;  $max--;&lt;BR /&gt;  }&lt;BR /&gt;foreach $key (@k) {&lt;BR /&gt;  printf ("%6.6s ", $key);&lt;BR /&gt;  }&lt;BR /&gt;print "\n";&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Mar 2004 10:17:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simulating-a-graph-bar-generator/m-p/3232610#M894899</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-03-29T10:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating a graph-bar generator</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simulating-a-graph-bar-generator/m-p/3232611#M894900</link>
      <description>To achive the horizontal display you want (not the simpliest !!!) use the terminal capability like &lt;BR /&gt;&lt;BR /&gt;- tput and cups : I have a script wich use this kind of stuff. It's rather slow actually.&lt;BR /&gt;&lt;BR /&gt;- use the C standard library curses.h&lt;BR /&gt;&lt;BR /&gt;If you're successfull, send a feedback on the forum :-D&lt;BR /&gt;Good luck.&lt;BR /&gt;&lt;BR /&gt;Nicolas&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Mar 2004 10:18:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simulating-a-graph-bar-generator/m-p/3232611#M894900</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-03-29T10:18:12Z</dc:date>
    </item>
  </channel>
</rss>

