<?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: matching exact string in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084561#M726968</link>
    <description>Hi Chris:&lt;BR /&gt;&lt;BR /&gt;# echo "500 lines\nor 50 lines \nor 55000 lines "|perl -nle 'print if /\b50\b/'&lt;BR /&gt;or 50 lines&lt;BR /&gt;&lt;BR /&gt;This matches '50' only at boundries like whitespace or non-word characters.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Mon, 17 Dec 2007 17:51:22 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2007-12-17T17:51:22Z</dc:date>
    <item>
      <title>matching exact string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084560#M726967</link>
      <description>Hello all,&lt;BR /&gt;&lt;BR /&gt;I want to match an exact string in a search so:&lt;BR /&gt;&lt;BR /&gt;how do I get a system to only report on a string I specify:&lt;BR /&gt;&lt;BR /&gt;my file contains say multiple strings with 50 in but I only want to display 50 and not 500 or 150 etc&lt;BR /&gt;&lt;BR /&gt;any help would be great&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Mon, 17 Dec 2007 17:35:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084560#M726967</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-12-17T17:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: matching exact string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084561#M726968</link>
      <description>Hi Chris:&lt;BR /&gt;&lt;BR /&gt;# echo "500 lines\nor 50 lines \nor 55000 lines "|perl -nle 'print if /\b50\b/'&lt;BR /&gt;or 50 lines&lt;BR /&gt;&lt;BR /&gt;This matches '50' only at boundries like whitespace or non-word characters.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 17 Dec 2007 17:51:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084561#M726968</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-12-17T17:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: matching exact string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084562#M726969</link>
      <description>It would help if you specified your tool (grep, sed, awk, perl, ...) but here's the grep solution and the other RE's will be similar.&lt;BR /&gt;&lt;BR /&gt;grep -e '^50 ' -e ' 50$' -e '^50$' -e ' 50 ' infile &amp;gt; outfile&lt;BR /&gt;&lt;BR /&gt;This will find 50 at the beginning of a string followed by a space, 50 preceded by a space at the end of a string, a line containing only 50 and a 50 with spaces before and after.</description>
      <pubDate>Mon, 17 Dec 2007 17:58:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084562#M726969</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-12-17T17:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: matching exact string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084563#M726970</link>
      <description>If you want to search and print only the string 50 then you do something like:&lt;BR /&gt;&lt;BR /&gt;# egrep "[^0-9][5][0][^0-9]|^[5][0]|[5][0]$" file</description>
      <pubDate>Mon, 17 Dec 2007 20:44:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084563#M726970</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-12-17T20:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: matching exact string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084564#M726971</link>
      <description>grep -e "[:space:]50[:space:]"</description>
      <pubDate>Mon, 17 Dec 2007 21:51:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084564#M726971</guid>
      <dc:creator>blah2blah</dc:creator>
      <dc:date>2007-12-17T21:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: matching exact string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084565#M726972</link>
      <description>If you want to search for an exact string you should use "grep -w 50".  (Available on 11i.)</description>
      <pubDate>Mon, 17 Dec 2007 23:55:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084565#M726972</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-12-17T23:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: matching exact string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084566#M726973</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Dennis: If you want to search for an exact string you should use "grep -w 50".&lt;BR /&gt;&lt;BR /&gt;Well, I would agree if/when you are using 'grep', but the tool choice was never stated.  Hence, TMTOWTDI ;-)&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Dec 2007 00:12:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084566#M726973</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-12-18T00:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: matching exact string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084567#M726974</link>
      <description>&amp;gt;JRF: I would agree if/when you are using 'grep'&lt;BR /&gt;&lt;BR /&gt;My comment was more pointed at the 3 times as many replies using grep.</description>
      <pubDate>Tue, 18 Dec 2007 00:38:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084567#M726974</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-12-18T00:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: matching exact string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084568#M726975</link>
      <description>great stuff, pleanty of examples to mess with there.&lt;BR /&gt;&lt;BR /&gt;Thanks again all!&lt;BR /&gt;&lt;BR /&gt;Chris.</description>
      <pubDate>Tue, 18 Dec 2007 09:06:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/matching-exact-string/m-p/5084568#M726975</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-12-18T09:06:44Z</dc:date>
    </item>
  </channel>
</rss>

