<?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 cmd in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-cmd/m-p/3245769#M891502</link>
    <description>ranges can be done-&lt;BR /&gt;  &lt;BR /&gt;awk '/^43210/,/^43310/{ print}' yourfile&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
    <pubDate>Mon, 12 Apr 2004 17:59:28 GMT</pubDate>
    <dc:creator>Rodney Hills</dc:creator>
    <dc:date>2004-04-12T17:59:28Z</dc:date>
    <item>
      <title>awk cmd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-cmd/m-p/3245768#M891501</link>
      <description>I am attempting to extrapolate data from a large 20 meg text file by using the awk command. For $1 of each row there are 7 digit numbers. I am trying to extract selective consecutive lines of data and &amp;gt;&amp;gt; to fileXYZ by defining the range of numbers in $1 i.e. [43210-43310] that is desired - Is there a simple way of accomplishing this without doing complicated loop statements?</description>
      <pubDate>Mon, 12 Apr 2004 17:44:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-cmd/m-p/3245768#M891501</guid>
      <dc:creator>Jon Thomas_1</dc:creator>
      <dc:date>2004-04-12T17:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: awk cmd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-cmd/m-p/3245769#M891502</link>
      <description>ranges can be done-&lt;BR /&gt;  &lt;BR /&gt;awk '/^43210/,/^43310/{ print}' yourfile&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Mon, 12 Apr 2004 17:59:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-cmd/m-p/3245769#M891502</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-04-12T17:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: awk cmd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-cmd/m-p/3245770#M891503</link>
      <description>&lt;BR /&gt; you can use sed too&lt;BR /&gt; &lt;BR /&gt;  sed -n '/^43210/,/^43310/p' input &amp;gt;&amp;gt; output&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Apr 2004 18:03:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-cmd/m-p/3245770#M891503</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-04-12T18:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: awk cmd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-cmd/m-p/3245771#M891504</link>
      <description>Is this a simple way ?.&lt;BR /&gt;&lt;BR /&gt;If you want to get lines of yourfile from $FROM_LINE to $TO_LINE,&lt;BR /&gt;&lt;BR /&gt;cat yourfile |head -$TO_LINE |tail -`echo "$TO_LINE - $FROM_LINE " |bc`&lt;BR /&gt;&lt;BR /&gt;Regds,&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
      <pubDate>Tue, 13 Apr 2004 00:15:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-cmd/m-p/3245771#M891504</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2004-04-13T00:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: awk cmd</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-cmd/m-p/3245772#M891505</link>
      <description>I assume the Date at $1 that u want to fetch to be&lt;BR /&gt;00043210 and 00043310 since u have mention that $1 is a 7 digit num.&lt;BR /&gt;If so then try this&lt;BR /&gt;&lt;BR /&gt;$ cat Your_text_file|awk -F Field_seperator '$1 &amp;gt;= 43210 &amp;amp;&amp;amp; $1 &amp;lt;= 43310 {print $0}' &amp;gt;&amp;gt; XYZ&lt;BR /&gt;&lt;BR /&gt;if u have fields seperated by white spaces then try this&lt;BR /&gt;&lt;BR /&gt;$ cat Your_text_file|awk '$1 &amp;gt;= 43210 &amp;amp;&amp;amp; $1 &amp;lt;= 43310 {print $0}' &amp;gt;&amp;gt; XYZ&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-Santosh</description>
      <pubDate>Tue, 13 Apr 2004 01:09:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-cmd/m-p/3245772#M891505</guid>
      <dc:creator>SANTOSH S. MHASKAR</dc:creator>
      <dc:date>2004-04-13T01:09:55Z</dc:date>
    </item>
  </channel>
</rss>

