<?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: check duplicate string in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811078#M268263</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;you can even the the number of times (double, triple, ...) , a duplicate string occurs:&lt;BR /&gt;&lt;BR /&gt;sort FILE | uniq -dc&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
    <pubDate>Fri, 23 Jun 2006 05:08:19 GMT</pubDate>
    <dc:creator>Peter Nikitka</dc:creator>
    <dc:date>2006-06-23T05:08:19Z</dc:date>
    <item>
      <title>check duplicate string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811075#M268260</link>
      <description>I have a file , the content is :&lt;BR /&gt;aaa&lt;BR /&gt;bbb&lt;BR /&gt;ccc&lt;BR /&gt;ddd&lt;BR /&gt;eee&lt;BR /&gt;fff&lt;BR /&gt;ggg&lt;BR /&gt;aaa&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;the string "aaa" is duplicate , if I want to check any other duplicate string in the file , what can I do , can anyone help me ? thx &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Jun 2006 20:50:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811075#M268260</guid>
      <dc:creator>nash11</dc:creator>
      <dc:date>2006-06-22T20:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: check duplicate string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811076#M268261</link>
      <description>sort &amp;lt; myfile | uniq -d &lt;BR /&gt;&lt;BR /&gt;This will output any duplicate lines. Man uniq for details.</description>
      <pubDate>Thu, 22 Jun 2006 20:59:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811076#M268261</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-06-22T20:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: check duplicate string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811077#M268262</link>
      <description>sort and uniq are the right tools, as explained.&lt;BR /&gt;&lt;BR /&gt;For small files I like using perl (or awk) associative array. For example:&lt;BR /&gt;&lt;BR /&gt;# perl -ne "print if $x{$_}++" x.txt&lt;BR /&gt;&lt;BR /&gt;Or&lt;BR /&gt;&lt;BR /&gt;# perl -ne "print if 1==$x{$_}++" x.txt &lt;BR /&gt;&lt;BR /&gt;Or&lt;BR /&gt;&lt;BR /&gt; perl -ne "if (1==$x{$_}++) { print "duplicate: $_" } " x.txt&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Jun 2006 21:31:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811077#M268262</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-06-22T21:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: check duplicate string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811078#M268263</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;you can even the the number of times (double, triple, ...) , a duplicate string occurs:&lt;BR /&gt;&lt;BR /&gt;sort FILE | uniq -dc&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Fri, 23 Jun 2006 05:08:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811078#M268263</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-06-23T05:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: check duplicate string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811079#M268264</link>
      <description>You can use&lt;BR /&gt;sort filename | uniq -d&lt;BR /&gt;to just list the entries which are duplicate (This will not list entries which occur only once)&lt;BR /&gt;sort filename | uniq or simply sort -u filename to get unique entries (This will omit the duplicate entries while displaying)&lt;BR /&gt;sort filename | uniq -dc | grep -v "   1 "&lt;BR /&gt;This will display entries which are duplicate with the count of their occurances.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ninad</description>
      <pubDate>Fri, 23 Jun 2006 05:40:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811079#M268264</guid>
      <dc:creator>Ninad_1</dc:creator>
      <dc:date>2006-06-23T05:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: check duplicate string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811080#M268265</link>
      <description>Hah... perl/awk can do that also:&lt;BR /&gt;&lt;BR /&gt;awk '{a[$0]++} END {for (k in a){v=a[k]; if (v&amp;gt;1) print k, v}}' x&lt;BR /&gt;&lt;BR /&gt;awk '{array[$0]++} END {for (key in array){val=array[key]; if (val&amp;gt;1) print key "=" val}}' x&lt;BR /&gt;&lt;BR /&gt;:-)&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Jun 2006 05:48:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811080#M268265</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-06-23T05:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: check duplicate string</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811081#M268266</link>
      <description># sort filename | uniq -d&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;cheers,&lt;BR /&gt;f. halili</description>
      <pubDate>Fri, 23 Jun 2006 07:42:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-duplicate-string/m-p/3811081#M268266</guid>
      <dc:creator>f. halili</dc:creator>
      <dc:date>2006-06-23T07:42:30Z</dc:date>
    </item>
  </channel>
</rss>

