<?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: unique value from list in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/unique-value-from-list/m-p/4435793#M356451</link>
    <description>SEP: While that gives you unique entries, the last line of the original post requests counts of each (at least thats how I read it)&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 10 Jun 2009 14:44:45 GMT</pubDate>
    <dc:creator>OldSchool</dc:creator>
    <dc:date>2009-06-10T14:44:45Z</dc:date>
    <item>
      <title>unique value from list</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unique-value-from-list/m-p/4435788#M356446</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I have a list(T3.lst) which contains these values&lt;BR /&gt;TKTGRS8028&lt;BR /&gt;TKTGRS8028&lt;BR /&gt;TKTGRS8028&lt;BR /&gt;TKTGRS8028&lt;BR /&gt;TKTGRS8028&lt;BR /&gt;TKTGRS8263&lt;BR /&gt;TKTGRS8263&lt;BR /&gt;TKTGRS8263&lt;BR /&gt;TKTGRS8263&lt;BR /&gt;TKTGRS8263&lt;BR /&gt;TKTGRS8263&lt;BR /&gt;TKTGRS8263&lt;BR /&gt;TKTGRS8263&lt;BR /&gt;TKTGRS8263&lt;BR /&gt;TKTGRS8263&lt;BR /&gt;TKTGRS8263&lt;BR /&gt;TKTGRS8263&lt;BR /&gt;TKTGRS8439&lt;BR /&gt;I need to know how may times similar value exists.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Jun 2009 12:48:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unique-value-from-list/m-p/4435788#M356446</guid>
      <dc:creator>syedar</dc:creator>
      <dc:date>2009-06-09T12:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: unique value from list</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unique-value-from-list/m-p/4435789#M356447</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You could do:&lt;BR /&gt;&lt;BR /&gt;# perl -nle '$x{$_}++;END{for $val (sort keys %x) {print join "=",$val,$x{$val}}}' file&lt;BR /&gt;&lt;BR /&gt;...which using your data gives:&lt;BR /&gt;&lt;BR /&gt;TKTGRS8028=5&lt;BR /&gt;TKTGRS8263=12&lt;BR /&gt;TKTGRS8439=1&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 09 Jun 2009 12:56:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unique-value-from-list/m-p/4435789#M356447</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-06-09T12:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: unique value from list</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unique-value-from-list/m-p/4435790#M356448</link>
      <description>In posix-shell or ksh, it would be a little more convoluted and not as elegant as JRF's perl solution but here it is:&lt;BR /&gt;&lt;BR /&gt;for i in `cat T3.lst|sort|uniq`&lt;BR /&gt;do&lt;BR /&gt;ct=`grep "$i" T3.lst|wc -l`&lt;BR /&gt;echo "$i = $ct"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Jun 2009 13:12:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unique-value-from-list/m-p/4435790#M356448</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2009-06-09T13:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: unique value from list</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unique-value-from-list/m-p/4435791#M356449</link>
      <description>a simple:&lt;BR /&gt;&lt;BR /&gt;sort T3.lst | uniq -c&lt;BR /&gt;&lt;BR /&gt;produces:&lt;BR /&gt;      5 TKTGRS8028&lt;BR /&gt;     12 TKTGRS8263&lt;BR /&gt;      1 TKTGRS8439&lt;BR /&gt;&lt;BR /&gt;which may (or may not) suffice for your needs.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Jun 2009 14:00:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unique-value-from-list/m-p/4435791#M356449</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-06-09T14:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: unique value from list</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unique-value-from-list/m-p/4435792#M356450</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;cat file | sort -u &lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 09 Jun 2009 14:28:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unique-value-from-list/m-p/4435792#M356450</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-06-09T14:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: unique value from list</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unique-value-from-list/m-p/4435793#M356451</link>
      <description>SEP: While that gives you unique entries, the last line of the original post requests counts of each (at least thats how I read it)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Jun 2009 14:44:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unique-value-from-list/m-p/4435793#M356451</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-06-10T14:44:45Z</dc:date>
    </item>
  </channel>
</rss>

