<?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: awk report help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245653#M330673</link>
    <description>Hi JC:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Each column is a separate file that I combine and want to generate one report&lt;BR /&gt;&lt;BR /&gt;It appears that a simple 'paste' will accomodate your neeeds:&lt;BR /&gt;&lt;BR /&gt;# paste -d" " file1 file2 file3&lt;BR /&gt;&lt;BR /&gt;...or if you like well-formatted output:&lt;BR /&gt;&lt;BR /&gt;# pr -t -m file1 file2 file3&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Mon, 04 Aug 2008 15:21:13 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2008-08-04T15:21:13Z</dc:date>
    <item>
      <title>awk report help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245647#M330667</link>
      <description>All,&lt;BR /&gt;   I'm trying to print a report from a text file using awk.   Following is an example of my current output.&lt;BR /&gt;&lt;BR /&gt;Application1:    Application2:   Application3: &lt;BR /&gt;tes1                  test2        test3&lt;BR /&gt;test1                 test2        test3&lt;BR /&gt;test2                 test3&lt;BR /&gt;test2                 test3&lt;BR /&gt;&lt;BR /&gt;Following is the output I would like to have.&lt;BR /&gt;&lt;BR /&gt;Application1:    Application2:   Application3: &lt;BR /&gt;tes1                  test2        test3&lt;BR /&gt;test1                 test2        test3&lt;BR /&gt;                      test2        test3&lt;BR /&gt;                      test2        test3&lt;BR /&gt;&lt;BR /&gt;I appreciate all help.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;JC&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 04 Aug 2008 13:03:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245647#M330667</guid>
      <dc:creator>Junior C.</dc:creator>
      <dc:date>2008-08-04T13:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: awk report help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245648#M330668</link>
      <description>Hi JC:&lt;BR /&gt;&lt;BR /&gt;So where's the *input*?  You current output looks like the desired output, too!&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 04 Aug 2008 13:08:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245648#M330668</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-04T13:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: awk report help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245649#M330669</link>
      <description>...JFR...&lt;BR /&gt;&lt;BR /&gt;The format did not display correctly.&lt;BR /&gt;&lt;BR /&gt;Output I'm looking for excluding the (.....)&lt;BR /&gt;&lt;BR /&gt;Apps1: Apps2: Apps3: &lt;BR /&gt;test1  test2 test3&lt;BR /&gt;test1  test2 test3&lt;BR /&gt;.......test2 test3&lt;BR /&gt;.......test2 test3&lt;BR /&gt;.......test2 test3&lt;BR /&gt;.............test3&lt;BR /&gt;.............test3&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;JC&lt;BR /&gt;</description>
      <pubDate>Mon, 04 Aug 2008 13:44:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245649#M330669</guid>
      <dc:creator>Junior C.</dc:creator>
      <dc:date>2008-08-04T13:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: awk report help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245650#M330670</link>
      <description>Hi (again) JC:&lt;BR /&gt;&lt;BR /&gt;You still haven't provided the *input*.  A sample or attachment is needed.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 04 Aug 2008 13:49:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245650#M330670</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-04T13:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: awk report help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245651#M330671</link>
      <description>&amp;gt;The format did not display correctly.&lt;BR /&gt;&lt;BR /&gt;Yes, leading and multiple blanks are stripped unless you check the "Retain format" box.&lt;BR /&gt;You still may have to attach some files.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Output I'm looking for excluding the (.....)&lt;BR /&gt;&lt;BR /&gt;You want to indent your output?</description>
      <pubDate>Mon, 04 Aug 2008 13:58:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245651#M330671</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-08-04T13:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: awk report help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245652#M330672</link>
      <description>...JRF...&lt;BR /&gt;&lt;BR /&gt;Attach txt file have the output format I'm looking for.&lt;BR /&gt;&lt;BR /&gt;Each column is a separate file that I combine and want to generate one report.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;JC</description>
      <pubDate>Mon, 04 Aug 2008 14:30:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245652#M330672</guid>
      <dc:creator>Junior C.</dc:creator>
      <dc:date>2008-08-04T14:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: awk report help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245653#M330673</link>
      <description>Hi JC:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Each column is a separate file that I combine and want to generate one report&lt;BR /&gt;&lt;BR /&gt;It appears that a simple 'paste' will accomodate your neeeds:&lt;BR /&gt;&lt;BR /&gt;# paste -d" " file1 file2 file3&lt;BR /&gt;&lt;BR /&gt;...or if you like well-formatted output:&lt;BR /&gt;&lt;BR /&gt;# pr -t -m file1 file2 file3&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 04 Aug 2008 15:21:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245653#M330673</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-04T15:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: awk report help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245654#M330674</link>
      <description>&lt;!--!*#--&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;my solution assumes&lt;BR /&gt;- the first line of input is a header line, which defines the total number of columns and the width of its columns&lt;BR /&gt;- columns may be of differnt sizes&lt;BR /&gt;- if the number of fields in a column is less than the header line defines, they get filled from column 1 on.&lt;BR /&gt;- I use a dot as filler, to get a better readable output here - just change&lt;BR /&gt;gsub(".",".",filler[i])&lt;BR /&gt;to&lt;BR /&gt;gsub("."," ",filler[i]) to get spaces.&lt;BR /&gt;as well as &lt;BR /&gt;...=out[num-NF+i]"."&lt;BR /&gt;to&lt;BR /&gt;...=out[num-NF+i]" "&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;awk 'NR==1 {for(i=1;i&amp;lt;=NF;i++) {filler[i]=$i;gsub(".",".",filler[i])}&lt;BR /&gt; num=NF; print; next}&lt;BR /&gt;{if(! NF) {print;next}&lt;BR /&gt;for (i=NF;i&amp;gt;0;i--) {out[num-NF+i]=$i; for(k=length(filler[i])-length($i);k;k--)out[num-NF+i]=out[num-NF+i]". "}&lt;BR /&gt;for(j=1;j&amp;lt;=num-NF;j++) out[j]=filler[j]; for(i=1;i&lt;NUM&gt;&lt;/NUM&gt;&lt;BR /&gt;of&lt;BR /&gt;cat your-infile&lt;BR /&gt;Application1: Applicati2: Applica3:&lt;BR /&gt;test1 test2 test3&lt;BR /&gt;test1 test2 test3&lt;BR /&gt;test2 test3&lt;BR /&gt;test2 test3&lt;BR /&gt;test3&lt;BR /&gt;&lt;BR /&gt;leads to&lt;BR /&gt;Application1: Applicati2: Applica3:&lt;BR /&gt;test1........ test2...... test3....&lt;BR /&gt;test1........ test2...... test3....&lt;BR /&gt;............. test2...... test3....&lt;BR /&gt;............. test2...... test3....&lt;BR /&gt;............. ........... test3....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 04 Aug 2008 15:38:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-report-help/m-p/4245654#M330674</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2008-08-04T15:38:50Z</dc:date>
    </item>
  </channel>
</rss>

