<?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 command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965903#M757672</link>
    <description>It works as I tried also with comm -23 and this can work for small file but I have 1 000 000 lines in files and it has some problems..I will test it again and let U know..&lt;BR /&gt;&lt;BR /&gt;Thanks a lot!!!</description>
    <pubDate>Wed, 21 Mar 2007 08:21:47 GMT</pubDate>
    <dc:creator>amonamon</dc:creator>
    <dc:date>2007-03-21T08:21:47Z</dc:date>
    <item>
      <title>comm command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965899#M757668</link>
      <description>well I am not sure is only comm command convinient for this problem but I tryes with it..&lt;BR /&gt;&lt;BR /&gt;fileA -&lt;BR /&gt;&lt;BR /&gt;11&lt;BR /&gt;33&lt;BR /&gt;44&lt;BR /&gt;55&lt;BR /&gt;77&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;fileB -&lt;BR /&gt;&lt;BR /&gt;22&lt;BR /&gt;34&lt;BR /&gt;45&lt;BR /&gt;55&lt;BR /&gt;56&lt;BR /&gt;66&lt;BR /&gt;77&lt;BR /&gt;778&lt;BR /&gt;888&lt;BR /&gt;999&lt;BR /&gt;&lt;BR /&gt;output:&lt;BR /&gt;&lt;BR /&gt;11&lt;BR /&gt;33&lt;BR /&gt;44&lt;BR /&gt;&lt;BR /&gt;so print to output line from fileA if it is not in fileB..&lt;BR /&gt;&lt;BR /&gt;thnaks a lot..&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Mar 2007 06:40:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965899#M757668</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2007-03-21T06:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: comm command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965900#M757669</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;try;&lt;BR /&gt;$ comm -23 fileA fileB&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Wed, 21 Mar 2007 06:46:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965900#M757669</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2007-03-21T06:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: comm command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965901#M757670</link>
      <description>Both fileA and fileB need to be sorted for comm(1).</description>
      <pubDate>Wed, 21 Mar 2007 06:55:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965901#M757670</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-03-21T06:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: comm command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965902#M757671</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;a sorted file in the sight of 'comm' is a collated sort. If you have a numerical sorted input like&lt;BR /&gt;9&lt;BR /&gt;88&lt;BR /&gt;100&lt;BR /&gt;it's complete out of order in lexical (=comm) sense.&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Wed, 21 Mar 2007 07:06:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965902#M757671</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-03-21T07:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: comm command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965903#M757672</link>
      <description>It works as I tried also with comm -23 and this can work for small file but I have 1 000 000 lines in files and it has some problems..I will test it again and let U know..&lt;BR /&gt;&lt;BR /&gt;Thanks a lot!!!</description>
      <pubDate>Wed, 21 Mar 2007 08:21:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965903#M757672</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2007-03-21T08:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: comm command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965904#M757673</link>
      <description>Hi,&lt;BR /&gt;seems you have a duplicate at:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1110742" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1110742&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Have you tried:&lt;BR /&gt;grep -vf fileB fileA&lt;BR /&gt;&lt;BR /&gt;How big are both of your files ?</description>
      <pubDate>Wed, 21 Mar 2007 08:35:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965904#M757673</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-03-21T08:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: comm command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965905#M757674</link>
      <description>&amp;gt;Peter N: a sorted file in the sight of 'comm' is a collated sort.&lt;BR /&gt;&lt;BR /&gt;Yes.  The above fragments were sorted by ASCII.  To check you can use:&lt;BR /&gt;$ sort -c fileA; echo $?&lt;BR /&gt;$ sort -c fileB; echo $?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Peter G: Have you tried: grep -vf fileB fileA&lt;BR /&gt;&amp;gt;How big are both of your files?&lt;BR /&gt;&lt;BR /&gt;With a million lines, that may be too big.&lt;BR /&gt;Using sort &amp;amp; comm instead, may depend on how often these files change.</description>
      <pubDate>Wed, 21 Mar 2007 16:53:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965905#M757674</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-03-21T16:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: comm command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965906#M757675</link>
      <description>I am not sure what the performance of this solution would be, but I have to believe it would beat the double sorted comm(1) solution:&lt;BR /&gt;&lt;BR /&gt;# grep -v -f fileB fileA&lt;BR /&gt;11&lt;BR /&gt;33&lt;BR /&gt;44</description>
      <pubDate>Wed, 21 Mar 2007 17:22:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965906#M757675</guid>
      <dc:creator>Bob E Campbell</dc:creator>
      <dc:date>2007-03-21T17:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: comm command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965907#M757676</link>
      <description>Ooops, sorry Peter and Dennis.  I need to get new bifocals.  I generated a file with numbers from 1 to 4000000 and then copied it and deleted a few lines:&lt;BR /&gt;&lt;BR /&gt;# time comm -13 sortedListA sortedListB&lt;BR /&gt;123456&lt;BR /&gt;15&lt;BR /&gt;3999966&lt;BR /&gt;&lt;BR /&gt;real        0.8&lt;BR /&gt;user        0.7&lt;BR /&gt;sys         0.0&lt;BR /&gt;&lt;BR /&gt;# time comm -13 bigListA bigListB      &lt;BR /&gt;15&lt;BR /&gt;123456&lt;BR /&gt;3999966&lt;BR /&gt;&lt;BR /&gt;real        0.7&lt;BR /&gt;user        0.7&lt;BR /&gt;sys         0.0&lt;BR /&gt;&lt;BR /&gt;# time grep -v -f bigListA bigListB&lt;BR /&gt;grep: not enough memory&lt;BR /&gt;&lt;BR /&gt;real     9:57.2&lt;BR /&gt;user     9:53.2&lt;BR /&gt;sys         0.6&lt;BR /&gt;&lt;BR /&gt;Looks to me as if the two files need to have the same sort order, that grep can't stomach comparing two really big files, and 8 gig of RAM just isn't what it used to be.&lt;BR /&gt;&lt;BR /&gt;Bob</description>
      <pubDate>Wed, 21 Mar 2007 17:45:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965907#M757676</guid>
      <dc:creator>Bob E Campbell</dc:creator>
      <dc:date>2007-03-21T17:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: comm command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965908#M757677</link>
      <description>&amp;gt;Bob: Looks to me as if the two files need to have the same sort order, that grep can't stomach comparing two really big files&lt;BR /&gt;&lt;BR /&gt;sort doesn't use a bubble sort.  ;-)&lt;BR /&gt;So it maybe takes n1 * log(n1) +  n2 * log(n2)&lt;BR /&gt;Doing a grep requires comparing every record in fileA with everyone in fileB (perhaps 50% if it matches, 100% if it doesn't).&lt;BR /&gt;&lt;BR /&gt;comm only needs to compare with records up to the match.</description>
      <pubDate>Wed, 21 Mar 2007 19:56:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comm-command/m-p/3965908#M757677</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-03-21T19:56:14Z</dc:date>
    </item>
  </channel>
</rss>

