<?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 Need to grep between a range in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-grep-between-a-range/m-p/5166242#M681576</link>
    <description>&lt;BR /&gt;I have following output from a wget command - &lt;BR /&gt;&lt;BR /&gt;1238029403|tobc10|99&lt;BR /&gt;1238029403|tobc11|725&lt;BR /&gt;1238029403|tobc12|734&lt;BR /&gt;1238029403|tobc13|99&lt;BR /&gt;1238029403|tobc14|99&lt;BR /&gt;1238029403|tobc15|99&lt;BR /&gt;1238029403|tobc16|99&lt;BR /&gt;1238029403|tobc17|99&lt;BR /&gt;1238029403|tobc18|100&lt;BR /&gt;1238029403|tobc19|100&lt;BR /&gt;1238029403|tobc20|146&lt;BR /&gt;1238029403|tobc21|99&lt;BR /&gt;1238029403|tobc24|619&lt;BR /&gt;1238029403|tobc2|670&lt;BR /&gt;1238029403|tobc3|720&lt;BR /&gt;1238029403|tobc4|389&lt;BR /&gt;1238029403|tobc5|768&lt;BR /&gt;1238029403|tobc6|99&lt;BR /&gt;1238029403|tobc7|720&lt;BR /&gt;1238029403|tobc8|738&lt;BR /&gt;1238029403|tobc9|718&lt;BR /&gt;1238029403|tob|1384&lt;BR /&gt;&lt;BR /&gt;And I need to grep for rows in which the value is less than 100.&lt;BR /&gt;&lt;BR /&gt;Here is what I have been trying but doesnt work - &lt;BR /&gt;cat tmp|egrep 'tob [0-99]'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please Help!&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Allan</description>
    <pubDate>Thu, 26 Mar 2009 00:06:26 GMT</pubDate>
    <dc:creator>Allanm</dc:creator>
    <dc:date>2009-03-26T00:06:26Z</dc:date>
    <item>
      <title>Need to grep between a range</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-grep-between-a-range/m-p/5166242#M681576</link>
      <description>&lt;BR /&gt;I have following output from a wget command - &lt;BR /&gt;&lt;BR /&gt;1238029403|tobc10|99&lt;BR /&gt;1238029403|tobc11|725&lt;BR /&gt;1238029403|tobc12|734&lt;BR /&gt;1238029403|tobc13|99&lt;BR /&gt;1238029403|tobc14|99&lt;BR /&gt;1238029403|tobc15|99&lt;BR /&gt;1238029403|tobc16|99&lt;BR /&gt;1238029403|tobc17|99&lt;BR /&gt;1238029403|tobc18|100&lt;BR /&gt;1238029403|tobc19|100&lt;BR /&gt;1238029403|tobc20|146&lt;BR /&gt;1238029403|tobc21|99&lt;BR /&gt;1238029403|tobc24|619&lt;BR /&gt;1238029403|tobc2|670&lt;BR /&gt;1238029403|tobc3|720&lt;BR /&gt;1238029403|tobc4|389&lt;BR /&gt;1238029403|tobc5|768&lt;BR /&gt;1238029403|tobc6|99&lt;BR /&gt;1238029403|tobc7|720&lt;BR /&gt;1238029403|tobc8|738&lt;BR /&gt;1238029403|tobc9|718&lt;BR /&gt;1238029403|tob|1384&lt;BR /&gt;&lt;BR /&gt;And I need to grep for rows in which the value is less than 100.&lt;BR /&gt;&lt;BR /&gt;Here is what I have been trying but doesnt work - &lt;BR /&gt;cat tmp|egrep 'tob [0-99]'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please Help!&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Allan</description>
      <pubDate>Thu, 26 Mar 2009 00:06:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-grep-between-a-range/m-p/5166242#M681576</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2009-03-26T00:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need to grep between a range</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-grep-between-a-range/m-p/5166243#M681577</link>
      <description>I assume you are talking about the third&lt;BR /&gt;column?&lt;BR /&gt;&lt;BR /&gt;If so, here is one of the solutions:&lt;BR /&gt;&lt;BR /&gt;awk -F"|" '$3 &amp;lt;= 99 {print}' tmp&lt;BR /&gt;&lt;BR /&gt;I just tested it on my Fedora 10 server. Works fine. I am not at my desk at the moment so&lt;BR /&gt;I cannot check it on an HP-UX server.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;VK2COT&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Mar 2009 01:35:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-grep-between-a-range/m-p/5166243#M681577</guid>
      <dc:creator>VK2COT</dc:creator>
      <dc:date>2009-03-26T01:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need to grep between a range</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-grep-between-a-range/m-p/5166244#M681578</link>
      <description>Hmm, why 'cat' before 'grep'?&lt;BR /&gt;Grep will happily read a file on it's own.&lt;BR /&gt;&lt;BR /&gt;With 'the value', do you mean the last column when treating a bar as a column seperator? Then what is the 'tob' doing in the search string?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In that case any value less than 100 which  has 1 or 2 digits only, will have a | seperator 2 or 3 bytes from the end of line.&lt;BR /&gt;&lt;BR /&gt;So try:&lt;BR /&gt;  &lt;BR /&gt;   grep -e "|..$" -e "|.$" tmp&lt;BR /&gt;&lt;BR /&gt;The expression [0-99] you presented translates to: a single character in the range 0 thru 9, or 9.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You MIGHT want:&lt;BR /&gt;&lt;BR /&gt;grep -e "|[0-9][0-9]$" -e "|[0-9]$" tmp&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Mar 2009 01:58:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-grep-between-a-range/m-p/5166244#M681578</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-03-26T01:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need to grep between a range</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-grep-between-a-range/m-p/5166245#M681579</link>
      <description>Thanks Folks</description>
      <pubDate>Thu, 26 Mar 2009 16:47:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-grep-between-a-range/m-p/5166245#M681579</guid>
      <dc:creator>Allanm</dc:creator>
      <dc:date>2009-03-26T16:47:47Z</dc:date>
    </item>
  </channel>
</rss>

