<?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 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436159#M5115</link>
    <description>use NF to give yourself the number of fields in each record and loop it or something like that.</description>
    <pubDate>Fri, 11 Aug 2000 17:26:47 GMT</pubDate>
    <dc:creator>Scott D. Allen</dc:creator>
    <dc:date>2000-08-11T17:26:47Z</dc:date>
    <item>
      <title>awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436158#M5114</link>
      <description>I am trying to use awk to print fields of a log file {print $5 $6}. The area where I need assistance is printing the remaining record/entry. The log file is dynamic and I need to display fields 5,6 and everything after six.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Gary</description>
      <pubDate>Fri, 11 Aug 2000 17:16:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436158#M5114</guid>
      <dc:creator>Gary Price</dc:creator>
      <dc:date>2000-08-11T17:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436159#M5115</link>
      <description>use NF to give yourself the number of fields in each record and loop it or something like that.</description>
      <pubDate>Fri, 11 Aug 2000 17:26:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436159#M5115</guid>
      <dc:creator>Scott D. Allen</dc:creator>
      <dc:date>2000-08-11T17:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436160#M5116</link>
      <description>I forget the awk construct for this but this should do the same:&lt;BR /&gt;&lt;BR /&gt;# cut -d delimiter -f 5,6- filename&lt;BR /&gt;&lt;BR /&gt;where delimiter is the field delimiter and filename is the file you want to process.&lt;BR /&gt;&lt;BR /&gt;Good luck</description>
      <pubDate>Fri, 11 Aug 2000 17:27:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436160#M5116</guid>
      <dc:creator>Kofi ARTHIABAH</dc:creator>
      <dc:date>2000-08-11T17:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436161#M5117</link>
      <description>Gary:&lt;BR /&gt;&lt;BR /&gt;Use:&lt;BR /&gt;&lt;BR /&gt;awk '{for (i=5; i &amp;lt;= NF; i++1) print $i}'&lt;BR /&gt;&lt;BR /&gt;where i is initialized to the first field you want!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 11 Aug 2000 17:44:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436161#M5117</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2000-08-11T17:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436162#M5118</link>
      <description>Gary, I am guessing that you want to set some variables here. &lt;BR /&gt;&lt;BR /&gt;VAR1=[field 5], &lt;BR /&gt;VAR2=[field 6], &lt;BR /&gt;VAR3=[everything_after_six]&lt;BR /&gt;&lt;BR /&gt;You can use field specifiers to process each record like this:&lt;BR /&gt;&lt;BR /&gt;cut -d "delimiter" -f 5,6&lt;BR /&gt;&lt;BR /&gt;Use this to set VAR1 and VAR2&lt;BR /&gt;&lt;BR /&gt;VAR3 can be set also by using cut as well but use the "-" range specifier like this:&lt;BR /&gt;&lt;BR /&gt;cat -d "delimiter" 7-&lt;BR /&gt;&lt;BR /&gt;This will cut positions 7 through the end of the record and thus can use it to set VAR3.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Tony&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Aug 2000 17:46:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436162#M5118</guid>
      <dc:creator>Anthony deRito</dc:creator>
      <dc:date>2000-08-11T17:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436163#M5119</link>
      <description>Gary, sorry for the typo, the last command should be &lt;BR /&gt;&lt;BR /&gt;cut -d "delimiter" 7- &lt;BR /&gt;&lt;BR /&gt;not&lt;BR /&gt;&lt;BR /&gt;cat -d "delimiter" 7- &lt;BR /&gt;&lt;BR /&gt;Tony&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Aug 2000 17:48:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436163#M5119</guid>
      <dc:creator>Anthony deRito</dc:creator>
      <dc:date>2000-08-11T17:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: awk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436164#M5120</link>
      <description>Gary:&lt;BR /&gt;&lt;BR /&gt;Just out of curiosity, could you run "time" against the two versions - I am curious to find out which does the job quicker - cut or awk.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Aug 2000 18:20:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk/m-p/2436164#M5120</guid>
      <dc:creator>Kofi ARTHIABAH</dc:creator>
      <dc:date>2000-08-11T18:20:14Z</dc:date>
    </item>
  </channel>
</rss>

