<?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: comm in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/comm/m-p/3642065#M102228</link>
    <description>You may not use comm to do this job. It can find common lines based 3 1 2 settings. You can use grep as well as,&lt;BR /&gt;&lt;BR /&gt;# grep -vf file2 file1&lt;BR /&gt;tls&lt;BR /&gt;norainij&lt;BR /&gt;tyt&lt;BR /&gt;&lt;BR /&gt;hth.</description>
    <pubDate>Wed, 05 Oct 2005 01:09:32 GMT</pubDate>
    <dc:creator>Muthukumar_5</dc:creator>
    <dc:date>2005-10-05T01:09:32Z</dc:date>
    <item>
      <title>comm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comm/m-p/3642061#M102224</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I hv 2 files called 1 and 2.&lt;BR /&gt;&lt;BR /&gt;Content of 1&lt;BR /&gt;============&lt;BR /&gt;tls&lt;BR /&gt;norainij&lt;BR /&gt;abcd&lt;BR /&gt;tyt&lt;BR /&gt;&lt;BR /&gt;Content of 2&lt;BR /&gt;============&lt;BR /&gt;abcd&lt;BR /&gt;&lt;BR /&gt;I want to comm these 2 files and the output that I want is only&lt;BR /&gt;&lt;BR /&gt;tls&lt;BR /&gt;norainij&lt;BR /&gt;tyt&lt;BR /&gt;&lt;BR /&gt;The command that I use is comm -3 1 2 but the output is as below&lt;BR /&gt;&lt;BR /&gt;        abcd&lt;BR /&gt;tls&lt;BR /&gt;norainij&lt;BR /&gt;abcd&lt;BR /&gt;tyt&lt;BR /&gt;&lt;BR /&gt;May I know what is the problem?&lt;BR /&gt;&lt;BR /&gt;regards.</description>
      <pubDate>Tue, 04 Oct 2005 23:14:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comm/m-p/3642061#M102224</guid>
      <dc:creator>Ngoh Chean Siung</dc:creator>
      <dc:date>2005-10-04T23:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: comm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comm/m-p/3642062#M102225</link>
      <description>The command should be &lt;BR /&gt;comm -23 file1 file2&lt;BR /&gt;&lt;BR /&gt;Read the man page carefully and pay special attention to exmaples section.</description>
      <pubDate>Tue, 04 Oct 2005 23:22:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comm/m-p/3642062#M102225</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-10-04T23:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: comm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comm/m-p/3642063#M102226</link>
      <description># man comm says, &lt;BR /&gt;&lt;BR /&gt;comm reads file1 and file2, which should be ordered in increasing&lt;BR /&gt;collating sequence (see sort(1) and Environment Variables below), and&lt;BR /&gt;produces a three-column output:&lt;BR /&gt;&lt;BR /&gt;     Column 1:   Lines that appear only in file1,&lt;BR /&gt;     Column 2:   Lines that appear only in file2,&lt;BR /&gt;     Column 3:   Lines that appear in both files.&lt;BR /&gt;&lt;BR /&gt;So, you have to sort file1 before doing anything. &lt;BR /&gt;&lt;BR /&gt;Try this, &lt;BR /&gt;# sort one &amp;gt;three (Sort one and store it in three) &lt;BR /&gt;&lt;BR /&gt;# comm -23 three two&lt;BR /&gt;&lt;BR /&gt;norainij&lt;BR /&gt;tls&lt;BR /&gt;tyt&lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Tue, 04 Oct 2005 23:23:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comm/m-p/3642063#M102226</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2005-10-04T23:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: comm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comm/m-p/3642064#M102227</link>
      <description>You can use sort + uniq as,&lt;BR /&gt;&lt;BR /&gt;# sort file1 file2 | uniq -u&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Oct 2005 01:03:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comm/m-p/3642064#M102227</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-10-05T01:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: comm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comm/m-p/3642065#M102228</link>
      <description>You may not use comm to do this job. It can find common lines based 3 1 2 settings. You can use grep as well as,&lt;BR /&gt;&lt;BR /&gt;# grep -vf file2 file1&lt;BR /&gt;tls&lt;BR /&gt;norainij&lt;BR /&gt;tyt&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Wed, 05 Oct 2005 01:09:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comm/m-p/3642065#M102228</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-10-05T01:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: comm</title>
      <link>https://community.hpe.com/t5/operating-system-linux/comm/m-p/3642066#M102229</link>
      <description>comm will do the job as long as the files have been sorted before i.e.&lt;BR /&gt;&lt;BR /&gt;# sort f1 | comm -23 - f2&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;# sort f1 &amp;gt; f1.out; sort f2 &amp;gt; f2.out; comm -23 f1.out f2.out &lt;BR /&gt;&lt;BR /&gt;regards!</description>
      <pubDate>Wed, 05 Oct 2005 16:14:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/comm/m-p/3642066#M102229</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2005-10-05T16:14:03Z</dc:date>
    </item>
  </channel>
</rss>

