<?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: from horizon text format into vertical text format in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183624#M680979</link>
    <description>&lt;!--!*#--&gt;This perl seems to do what you desired....&lt;BR /&gt;&lt;BR /&gt;If it sees a line starting with just numbers it adds those as entries into an array @tag&lt;BR /&gt;&lt;BR /&gt;If it sees a line starting with "sl...:" then it tkaes the first part as a name, and add the rest as values to an other array @val.&lt;BR /&gt;&lt;BR /&gt;If the last entry in the @tag array is 'Total' then report and clear arrays for a next go around.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;-------------------- reformat.pl ------&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;   push @tag,split if /^\s*\d+\s+/;&lt;BR /&gt;   if (/^(sl.*):(.*)/) {&lt;BR /&gt;      $nam=$1;&lt;BR /&gt;      $_ = $2;&lt;BR /&gt;      push @val,split;&lt;BR /&gt;      print " -- $#tag -- @tag[-1] --", join '*',@tag, "\n";&lt;BR /&gt;      if (@tag[-1] eq 'Total') {&lt;BR /&gt;        for ( $i=0;$i&amp;lt;=$#val;$i++) {&lt;BR /&gt;           print "$nam/$tag[$i]:$val[$i]\n";&lt;BR /&gt;        }&lt;BR /&gt;        @tag = @val = ();&lt;BR /&gt;      }&lt;BR /&gt;   }&lt;BR /&gt;}&lt;BR /&gt;------------</description>
    <pubDate>Thu, 24 Sep 2009 13:28:44 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2009-09-24T13:28:44Z</dc:date>
    <item>
      <title>from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183614#M680969</link>
      <description>set 1, &lt;BR /&gt;   0    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15&lt;BR /&gt;   12    0    0    0    0    0    0   18k     0    0    0    0    0    0    0    0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;   16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31&lt;BR /&gt;   0    22m   0    0    0    0    0    0    0    0    0    0    17k    0    0    0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;   Total&lt;BR /&gt;   23m    &lt;BR /&gt;&lt;BR /&gt;set 2. &lt;BR /&gt;   0    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15&lt;BR /&gt;   1m    0    0    0    0    0    0   800k    0    0    0    0    0    0    0    0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;   16   17   18   19   20   21   22   23   24   Total&lt;BR /&gt;   0    0    200k    0    0    0    0    0    0    2m  &lt;BR /&gt;&lt;BR /&gt;each set, number of columns will be dynamicly output from other scripts, but will end with "Total" column, for example, how do i convert set 1 into, &lt;BR /&gt;0:12&lt;BR /&gt;1:0&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;7:18k&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;17:22m&lt;BR /&gt;.&lt;BR /&gt;28:17k&lt;BR /&gt;.&lt;BR /&gt;Total:23m&lt;BR /&gt;&lt;BR /&gt;and set 2 into&lt;BR /&gt;&lt;BR /&gt;0:1m&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;7:800k&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;18:200k&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;Total:2m&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;shell script is prefer, thank you.</description>
      <pubDate>Wed, 24 Jun 2009 15:34:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183614#M680969</guid>
      <dc:creator>Matthew_50</dc:creator>
      <dc:date>2009-06-24T15:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183615#M680970</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;This appears to meet your needs:&lt;BR /&gt;&lt;BR /&gt;# cat ./reformat#!/usr/bin/awk -f&lt;BR /&gt;/^Total/ {print;next;print;next}&lt;BR /&gt;/^[     ]*$/ {next}&lt;BR /&gt;{&lt;BR /&gt;LINE1=$0&lt;BR /&gt;n=split(LINE1,a," ")&lt;BR /&gt;getline LINE2&lt;BR /&gt;m=split(LINE2,b," ")&lt;BR /&gt;for (i=1; i&lt;N&gt;&lt;/N&gt;}&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Run as:&lt;BR /&gt;&lt;BR /&gt;# ./reformat file&lt;BR /&gt;&lt;BR /&gt;...where "file" contains a set of data as shown.&lt;BR /&gt;&lt;BR /&gt;Note that in the regular expression:&lt;BR /&gt;&lt;BR /&gt;^[     ]*$/ &lt;BR /&gt;&lt;BR /&gt;the whitespace consists of a blank character followed by a TAB character.  This skips blank lines in the input.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Jun 2009 16:13:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183615#M680970</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-06-24T16:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183616#M680971</link>
      <description>what if data looks like following ?&lt;BR /&gt;&lt;BR /&gt;0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15&lt;BR /&gt;=============================================&lt;BR /&gt;12 0 0 0 0 0 0 18k 0 0 0 0 0 0 0 0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31&lt;BR /&gt;=============================================&lt;BR /&gt;0 22m 0 0 0 0 0 0 0 0 0 0 17k 0 0 0&lt;BR /&gt;&lt;BR /&gt;Total&lt;BR /&gt;=========&lt;BR /&gt;40m&lt;BR /&gt;&lt;BR /&gt;same output. how do i skip "=", must using grep -v "=" ? Thank you.</description>
      <pubDate>Wed, 24 Jun 2009 16:48:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183616#M680971</guid>
      <dc:creator>Matthew_50</dc:creator>
      <dc:date>2009-06-24T16:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183617#M680972</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;grep -v excludes the search parameter.&lt;BR /&gt;&lt;BR /&gt;Only use grep -v for excludes. Use other options for grep to give you equals.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 24 Jun 2009 16:56:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183617#M680972</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-06-24T16:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183618#M680973</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; same output. how do i skip "=", must using grep -v "=" ?&lt;BR /&gt;&lt;BR /&gt;No, 'awk' has all the power of 'grep' and more!&lt;BR /&gt;&lt;BR /&gt;# cat ./reformat&lt;BR /&gt;#!/usr/bin/awk -f&lt;BR /&gt;/^Total/ {print;next;print;next}&lt;BR /&gt;/^[     ]*$/ {next}&lt;BR /&gt;{&lt;BR /&gt;LINE1=$0&lt;BR /&gt;n=split(LINE1,a," ")&lt;BR /&gt;getline LINE2&lt;BR /&gt;if (LINE2~/======/) {next;getline LINE2}&lt;BR /&gt;m=split(LINE2,b," ")&lt;BR /&gt;for (i=1; i&lt;N&gt;&lt;/N&gt;}&lt;BR /&gt;&lt;BR /&gt;...run as:&lt;BR /&gt;&lt;BR /&gt;# ./reformat file&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Jun 2009 17:13:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183618#M680973</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-06-24T17:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183619#M680974</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; SEP: Only use grep -v for excludes&lt;BR /&gt;&lt;BR /&gt;Yes, and that's exactly what he wants to do.  My point in _not_ using 'grep' was why have an extra process when 'awk' can do it all?&lt;BR /&gt;&lt;BR /&gt;However, if Matthew wanted to use my original solution he could have done:&lt;BR /&gt;&lt;BR /&gt;# grep -v "======" file | ./reformat&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 24 Jun 2009 17:24:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183619#M680974</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-06-24T17:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183620#M680975</link>
      <description>Yea, &lt;BR /&gt;&lt;BR /&gt;JRF reads my mind and interprets what I meant to say. He's da man.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 24 Jun 2009 17:48:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183620#M680975</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-06-24T17:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183621#M680976</link>
      <description>what is source like this.&lt;BR /&gt;&lt;BR /&gt;          16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31  Total&lt;BR /&gt;==============================================================================================&lt;BR /&gt;slot 9:  144m   0  212m  67m   123    0    789   0    0    0    0    0    0    0    0    0  423m&lt;BR /&gt;&lt;BR /&gt;and reformat into&lt;BR /&gt;&lt;BR /&gt;slot 9/16: 144m&lt;BR /&gt;slot 9/17: 0&lt;BR /&gt;slot 9/18: 212m&lt;BR /&gt;slot 9/19: 67m&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;slot 9/Total: 423m&lt;BR /&gt;&lt;BR /&gt;possible ? Thanks.</description>
      <pubDate>Thu, 24 Sep 2009 12:25:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183621#M680976</guid>
      <dc:creator>Matthew_50</dc:creator>
      <dc:date>2009-09-24T12:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183622#M680977</link>
      <description>attach input sample</description>
      <pubDate>Thu, 24 Sep 2009 12:27:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183622#M680977</guid>
      <dc:creator>Matthew_50</dc:creator>
      <dc:date>2009-09-24T12:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183623#M680978</link>
      <description>Hi Matthew:&lt;BR /&gt;&lt;BR /&gt;Given your posted input, you could use the attached Perl script.&lt;BR /&gt;&lt;BR /&gt;Run as:&lt;BR /&gt;&lt;BR /&gt;# ./reformat file&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 24 Sep 2009 13:15:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183623#M680978</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-09-24T13:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183624#M680979</link>
      <description>&lt;!--!*#--&gt;This perl seems to do what you desired....&lt;BR /&gt;&lt;BR /&gt;If it sees a line starting with just numbers it adds those as entries into an array @tag&lt;BR /&gt;&lt;BR /&gt;If it sees a line starting with "sl...:" then it tkaes the first part as a name, and add the rest as values to an other array @val.&lt;BR /&gt;&lt;BR /&gt;If the last entry in the @tag array is 'Total' then report and clear arrays for a next go around.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;-------------------- reformat.pl ------&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;   push @tag,split if /^\s*\d+\s+/;&lt;BR /&gt;   if (/^(sl.*):(.*)/) {&lt;BR /&gt;      $nam=$1;&lt;BR /&gt;      $_ = $2;&lt;BR /&gt;      push @val,split;&lt;BR /&gt;      print " -- $#tag -- @tag[-1] --", join '*',@tag, "\n";&lt;BR /&gt;      if (@tag[-1] eq 'Total') {&lt;BR /&gt;        for ( $i=0;$i&amp;lt;=$#val;$i++) {&lt;BR /&gt;           print "$nam/$tag[$i]:$val[$i]\n";&lt;BR /&gt;        }&lt;BR /&gt;        @tag = @val = ();&lt;BR /&gt;      }&lt;BR /&gt;   }&lt;BR /&gt;}&lt;BR /&gt;------------</description>
      <pubDate>Thu, 24 Sep 2009 13:28:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183624#M680979</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-09-24T13:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183625#M680980</link>
      <description>Hello JRF, Hein&lt;BR /&gt;&lt;BR /&gt;I have to say thank you from the bottom of my heart. You are really expert :-)</description>
      <pubDate>Thu, 24 Sep 2009 13:47:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183625#M680980</guid>
      <dc:creator>Matthew_50</dc:creator>
      <dc:date>2009-09-24T13:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183626#M680981</link>
      <description>hmm, need to reformat using perl from input as pervious one &lt;BR /&gt;&lt;BR /&gt;slot 1/01: 4.3k&lt;BR /&gt;slot 1/02: 120&lt;BR /&gt;slot 1/03: 68.7k&lt;BR /&gt;.&lt;BR /&gt;slot 9/16: 144m &lt;BR /&gt;slot 9/17: 0 &lt;BR /&gt;slot 9/18: 212m &lt;BR /&gt;slot 9/19: 67m &lt;BR /&gt;&lt;BR /&gt;into &lt;BR /&gt;&lt;BR /&gt;slot 1/01: 4300&lt;BR /&gt;slot 1/02: 120&lt;BR /&gt;slot 1/03: 68700&lt;BR /&gt;.&lt;BR /&gt;slot 9/16: 144000000&lt;BR /&gt;slot 9/17: 0 &lt;BR /&gt;slot 9/18: 212000000&lt;BR /&gt;slot 9/19: 67000000&lt;BR /&gt;</description>
      <pubDate>Sun, 27 Sep 2009 15:42:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183626#M680981</guid>
      <dc:creator>Matthew_50</dc:creator>
      <dc:date>2009-09-27T15:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183627#M680982</link>
      <description>&lt;!--!*#--&gt;Hi (again) Matthew:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; hmm, need to reformat using perl from input as pervious one&lt;BR /&gt;&lt;BR /&gt;OK, then this should satisfy your requirement:&lt;BR /&gt;&lt;BR /&gt;# cat ./reformat&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;my ( @first, @second, $slot, $n, $value );&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;    next if /^===/;&lt;BR /&gt;    if (m{^\s*\d}) {&lt;BR /&gt;        @first = split;&lt;BR /&gt;        next;&lt;BR /&gt;    }&lt;BR /&gt;    if (m{^slot}) {&lt;BR /&gt;        @second = split;&lt;BR /&gt;        $slot   = shift @second;&lt;BR /&gt;        ( $slot = shift @second ) =~ s/://;&lt;BR /&gt;    }&lt;BR /&gt;    if ( m{^\s*$} or eof ) {&lt;BR /&gt;        for ( $n = 0; $n &amp;lt; @first; $n++ ) {&lt;BR /&gt;            ( $value = $second[$n] ) =~ s/(\d+)k/$1*1000/e;&lt;BR /&gt;            ( $value = $second[$n] ) =~ s/(\d+)m/$1*1000*1000/e;&lt;BR /&gt;            print 'slot', $slot, '/', $first[$n], ':', $value, "\n";&lt;BR /&gt;        }&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;1;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sun, 27 Sep 2009 16:21:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183627#M680982</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-09-27T16:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183628#M680983</link>
      <description>Hi Matthew:&lt;BR /&gt;&lt;BR /&gt;Oops, I meant to add that while I used multipliers of 1000 and 1000*1000 for 'K' and 'M' respectivly, it would be better to use 1024 and 1024*1024 :&lt;BR /&gt;&lt;BR /&gt;( $value = $second[$n] ) =~ s/(\d+)k/$1*1000/e;&lt;BR /&gt;( $value = $second[$n] ) =~ s/(\d+)m/$1*1000*1000/e;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sun, 27 Sep 2009 16:31:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183628#M680983</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-09-27T16:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183629#M680984</link>
      <description>How can I combine following into perl as standard input to the while you provide ?&lt;BR /&gt;&lt;BR /&gt;$count=0;&lt;BR /&gt;while (&amp;lt;&amp;gt;)&lt;BR /&gt;{  &lt;BR /&gt;   $count++;  &lt;BR /&gt;   if ( $count &amp;gt;= 17  &amp;amp;&amp;amp;  $count &amp;lt;= 57 )  &lt;BR /&gt;   {    &lt;BR /&gt;     print;  &lt;BR /&gt;   }&lt;BR /&gt;} &lt;BR /&gt;1;&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Sun, 27 Sep 2009 16:49:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183629#M680984</guid>
      <dc:creator>Matthew_50</dc:creator>
      <dc:date>2009-09-27T16:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183630#M680985</link>
      <description>&lt;!--!*#--&gt;Hi:&lt;BR /&gt;&lt;BR /&gt;The &amp;lt;&amp;gt; operator is a read of STDIN.&lt;BR /&gt;&lt;BR /&gt;# cat ./reader&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;my $count=0;&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;    $count++;&lt;BR /&gt;    if ( $count &amp;gt;= 17 &amp;amp;&amp;amp; $count &amp;lt;= 57 ) {&lt;BR /&gt;        print;&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;...execute as:&lt;BR /&gt;&lt;BR /&gt;# ./reader file&lt;BR /&gt;&lt;BR /&gt;OR:&lt;BR /&gt;&lt;BR /&gt;# cat file | ./reader&lt;BR /&gt;&lt;BR /&gt;...where 'cat' is any process that produces STDOUT.&lt;BR /&gt;&lt;BR /&gt;All this said, you don't need to count lines yourself.  Perl has a built-in line-number:&lt;BR /&gt;&lt;BR /&gt;# cat ./reformat2&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;    if ( $. &amp;gt;= 17 &amp;amp;&amp;amp; $. &amp;lt;= 57 ) {&lt;BR /&gt;        print;&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;...executed just like before.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 27 Sep 2009 17:11:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183630#M680985</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-09-27T17:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183631#M680986</link>
      <description>Matthew wrote &amp;gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; How can I combine following into perl as standard input to the while you provide ? &lt;BR /&gt;&lt;BR /&gt;Can you re-phrase that? What are you trying to accomplish here? What is file being read? The earlier provided input, or the output provided so far ?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; if ( $count &amp;gt;= 17 &amp;amp;&amp;amp; $count &amp;lt;= 57 ) &lt;BR /&gt;&lt;BR /&gt;Sounds to me like you are trying to skip the first 16 entries generated. Why not skip generating them instead? What is the 'rule' here?&lt;BR /&gt;&lt;BR /&gt;JRF wrote &amp;gt;&amp;gt; ( $value = $second[$n] ) =~ s/(\d+)k/$1*1000/e; &lt;BR /&gt;&lt;BR /&gt;Nice use of the 'e' in the search and replace to tell it to "Evaluate the right side as an expression."&lt;BR /&gt;And that's what needed to do the * 1024.&lt;BR /&gt;For use in my example:&lt;BR /&gt;            $_ = $val[$i];&lt;BR /&gt;            s/(\d+)k/$1*1024/e;&lt;BR /&gt;            s/(\d+)m/$1*1024*1024/e;           &lt;BR /&gt;            print "$nam/$tag[$i]:$_\n";&lt;BR /&gt;&lt;BR /&gt;But if * 1000 is requested then a simple string substitute will do fine:&lt;BR /&gt;            s/k/000/;&lt;BR /&gt;            s/m/000000/;           &lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 27 Sep 2009 17:52:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183631#M680986</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-09-27T17:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183632#M680987</link>
      <description>Hello JRF, &lt;BR /&gt;&lt;BR /&gt;the pattern seems not working with&lt;BR /&gt;&lt;BR /&gt;slot4/25:4.3k&lt;BR /&gt;slot4/26:0&lt;BR /&gt;slot4/27:4.3k&lt;BR /&gt;slot4/28:4.3k&lt;BR /&gt;slot4/29:4.3k&lt;BR /&gt;slot4/30:0&lt;BR /&gt;slot4/31:0&lt;BR /&gt;slot4/Total:17k&lt;BR /&gt;&lt;BR /&gt;output as input</description>
      <pubDate>Sun, 27 Sep 2009 17:57:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183632#M680987</guid>
      <dc:creator>Matthew_50</dc:creator>
      <dc:date>2009-09-27T17:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: from horizon text format into vertical text format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183633#M680988</link>
      <description>Hello Hein, &lt;BR /&gt;&lt;BR /&gt;The field contain the "k" might include the . dot, same does "m" field.</description>
      <pubDate>Sun, 27 Sep 2009 17:59:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/from-horizon-text-format-into-vertical-text-format/m-p/5183633#M680988</guid>
      <dc:creator>Matthew_50</dc:creator>
      <dc:date>2009-09-27T17:59:06Z</dc:date>
    </item>
  </channel>
</rss>

