<?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: select fields from a report in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718568#M947871</link>
    <description>This is trivially simple as long as any one input line does not exceed 3,000 characters - if so you need the Gnu version of awk.&lt;BR /&gt;&lt;BR /&gt;cat myfile | awk -F '|' '{print $4,$6,$10}'&lt;BR /&gt;</description>
    <pubDate>Tue, 07 May 2002 13:55:52 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2002-05-07T13:55:52Z</dc:date>
    <item>
      <title>select fields from a report</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718566#M947869</link>
      <description>Hi.&lt;BR /&gt;&lt;BR /&gt;A program generates a line of test delimited by |, I have now been asked to extract from this report a number of different fields namely the 4,6 and 10 (these may change from time to time).  The fields are not of fixed length and the line can be over a 1000 characters long.  I attach a portion of the line. Remember although the line may appear on many lines it is all contained in one line.&lt;BR /&gt;&lt;BR /&gt;I look forward to your responses.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanking you&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Tue, 07 May 2002 13:50:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718566#M947869</guid>
      <dc:creator>Dave Walley</dc:creator>
      <dc:date>2002-05-07T13:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: select fields from a report</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718567#M947870</link>
      <description>The easiest way I can think of would be to utilize awk, or if awk can't handle a line of that length, then gnu awk (gawk - &lt;A href="http://hpux.connect.org.uk/hppd/hpux/Gnu/gawk-3.1.0/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Gnu/gawk-3.1.0/&lt;/A&gt;  )&lt;BR /&gt;&lt;BR /&gt;I would do something like:&lt;BR /&gt;&lt;BR /&gt;# awk -F| '{ print $4,$6,$10 } filename</description>
      <pubDate>Tue, 07 May 2002 13:55:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718567#M947870</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2002-05-07T13:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: select fields from a report</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718568#M947871</link>
      <description>This is trivially simple as long as any one input line does not exceed 3,000 characters - if so you need the Gnu version of awk.&lt;BR /&gt;&lt;BR /&gt;cat myfile | awk -F '|' '{print $4,$6,$10}'&lt;BR /&gt;</description>
      <pubDate>Tue, 07 May 2002 13:55:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718568#M947871</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-05-07T13:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: select fields from a report</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718569#M947872</link>
      <description>&lt;BR /&gt;cat filename|cut -d"|" -f4,6,10&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;cat filename|awk -F\| '{print $4," ",$6," ",$10;}'&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 07 May 2002 13:56:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718569#M947872</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-05-07T13:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: select fields from a report</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718570#M947873</link>
      <description>awk can do this simply-&lt;BR /&gt;&lt;BR /&gt;awk -F\| '{print $4,$6,$10}' &lt;INFILE&gt;otfile&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills&lt;/INFILE&gt;</description>
      <pubDate>Tue, 07 May 2002 13:56:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718570#M947873</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-05-07T13:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: select fields from a report</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718571#M947874</link>
      <description>use awk for it&lt;BR /&gt;&lt;BR /&gt;cat filename | awk -F| '{print $4 $6 $10}'&lt;BR /&gt;&lt;BR /&gt;Sachin</description>
      <pubDate>Tue, 07 May 2002 13:57:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718571#M947874</guid>
      <dc:creator>Sachin Patel</dc:creator>
      <dc:date>2002-05-07T13:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: select fields from a report</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718572#M947875</link>
      <description>Hi Dave,&lt;BR /&gt;&lt;BR /&gt;I agree with Patrick on awk but you'll have to quote the pipe sign. Something like&lt;BR /&gt;&lt;BR /&gt;awk -F '|' '{print $4 " " $6 " " $10}' &lt;FILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;John&lt;/FILENAME&gt;</description>
      <pubDate>Tue, 07 May 2002 14:02:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718572#M947875</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2002-05-07T14:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: select fields from a report</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718573#M947876</link>
      <description>Hi Dave,&lt;BR /&gt;&lt;BR /&gt;# awk -F '|' '{print $4, $6, $10}' fileToBeAnalzed&lt;BR /&gt;&lt;BR /&gt;Will produce what you are looking for since each line within your file is not exceeding 3000 characters.&lt;BR /&gt;&lt;BR /&gt;Magdi</description>
      <pubDate>Wed, 08 May 2002 06:56:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718573#M947876</guid>
      <dc:creator>Magdi KAMAL</dc:creator>
      <dc:date>2002-05-08T06:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: select fields from a report</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718574#M947877</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;awk -F '|' '{print $4 " " $6 " " $10}' &lt;FILENAME&gt; &lt;BR /&gt;&lt;BR /&gt;is the simplest way to extract the columns.&lt;BR /&gt;&lt;BR /&gt;Did this solve your problem ? OR you still want to load this extracted data to aother database/table ?&lt;BR /&gt;&lt;BR /&gt;Raju&lt;/FILENAME&gt;</description>
      <pubDate>Wed, 08 May 2002 12:27:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/select-fields-from-a-report/m-p/2718574#M947877</guid>
      <dc:creator>Raju Joseph (PDI)</dc:creator>
      <dc:date>2002-05-08T12:27:02Z</dc:date>
    </item>
  </channel>
</rss>

