<?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: Format in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/format/m-p/3353797#M192913</link>
    <description>sort will do the job, bot of course it will do the sort also.&lt;BR /&gt;&lt;BR /&gt;If you need to keep the original order, yet must only retain the first of a duplicate then you can use a perl (or awk) script like:&lt;BR /&gt;&lt;BR /&gt;perl -ne '$x=(split)[3];next if $seen{$x};$seen{$x}++;print' file.</description>
    <pubDate>Tue, 10 Aug 2004 17:08:50 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2004-08-10T17:08:50Z</dc:date>
    <item>
      <title>Format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/format/m-p/3353794#M192910</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;How to delete unique lines based on particular field?&lt;BR /&gt;&lt;BR /&gt;word1 TIME word2 tdce-512 word4&lt;BR /&gt;word1 TIME word2 tdce-512 word4&lt;BR /&gt;word1 TIME word2 tdce-512 word4&lt;BR /&gt;word1 TIME word2 tdce-513 word4&lt;BR /&gt;word1 TIME word2 tdce-517 word4&lt;BR /&gt;&lt;BR /&gt;I want to delete duplicate lines based on fourth field.&lt;BR /&gt;&lt;BR /&gt;Any help is appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Aug 2004 16:18:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/format/m-p/3353794#M192910</guid>
      <dc:creator>SAM_24</dc:creator>
      <dc:date>2004-08-10T16:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/format/m-p/3353795#M192911</link>
      <description>Assuming the input is in a file named filename and you meant you want to keep one unique entry based on the fourth field, this should do it (-u for unique, -k4 for fourth field as key):&lt;BR /&gt;&lt;BR /&gt;sort -u -k4 filename</description>
      <pubDate>Tue, 10 Aug 2004 16:21:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/format/m-p/3353795#M192911</guid>
      <dc:creator>Jeff_Traigle</dc:creator>
      <dc:date>2004-08-10T16:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/format/m-p/3353796#M192912</link>
      <description>Try this&lt;BR /&gt;&lt;BR /&gt;sort -buk 4 &amp;lt;  input-file &amp;gt; output-file</description>
      <pubDate>Tue, 10 Aug 2004 16:22:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/format/m-p/3353796#M192912</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-08-10T16:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/format/m-p/3353797#M192913</link>
      <description>sort will do the job, bot of course it will do the sort also.&lt;BR /&gt;&lt;BR /&gt;If you need to keep the original order, yet must only retain the first of a duplicate then you can use a perl (or awk) script like:&lt;BR /&gt;&lt;BR /&gt;perl -ne '$x=(split)[3];next if $seen{$x};$seen{$x}++;print' file.</description>
      <pubDate>Tue, 10 Aug 2004 17:08:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/format/m-p/3353797#M192913</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-08-10T17:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/format/m-p/3353798#M192914</link>
      <description>&lt;BR /&gt;Hmmm, you assigned 4 points to each solutions presented, suggesting that you did evaluate them, but that they did NOT solve your problem.&lt;BR /&gt;Maybe you can clarify what is missing based on the results from the earlier replies? Maybe a more clear 'before' and 'after' picture, perhaps in a text attachment, is needed?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Aug 2004 10:04:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/format/m-p/3353798#M192914</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-08-11T10:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Format</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/format/m-p/3353799#M192915</link>
      <description>If you are looking to not use sort, then how about awk- &lt;BR /&gt; &lt;BR /&gt;awk '{if (x != $4) { print $0}; x=$4}'&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Wed, 11 Aug 2004 10:20:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/format/m-p/3353799#M192915</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-08-11T10:20:00Z</dc:date>
    </item>
  </channel>
</rss>

