<?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: Comparing two files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748583#M656378</link>
    <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Dennis: That may not be helpful since comm(1) assumes the files are sorted with the default sort, not your fancy one.&lt;BR /&gt;&lt;BR /&gt;Well, indeed this didn't help 'comm'.  That's very interesting.  I didn't know that.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Mon, 07 Feb 2011 15:04:26 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2011-02-07T15:04:26Z</dc:date>
    <item>
      <title>Comparing two files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748572#M656367</link>
      <description>I need to compare to files and send the difference to another file.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;file1:&lt;BR /&gt;this is the example.&lt;BR /&gt;I am working in hpux.&lt;BR /&gt;&lt;BR /&gt;file2:&lt;BR /&gt;How to compare files?&lt;BR /&gt;this is the example.&lt;BR /&gt;&lt;BR /&gt;If i compare file1 with file2, I should get the output as follows:&lt;BR /&gt;&lt;BR /&gt;Output File:&lt;BR /&gt;I am working in hpux.&lt;BR /&gt;&lt;BR /&gt;Please anyone help me with this.&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Feb 2011 11:15:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748572#M656367</guid>
      <dc:creator>Vidhya B</dc:creator>
      <dc:date>2011-02-04T11:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748573#M656368</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Use diff command. &lt;BR /&gt;&lt;BR /&gt;diff file1 file2.&lt;BR /&gt;&lt;BR /&gt;Welcome to ITRC.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Ismail Azad</description>
      <pubDate>Fri, 04 Feb 2011 11:34:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748573#M656368</guid>
      <dc:creator>Ismail Azad</dc:creator>
      <dc:date>2011-02-04T11:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748574#M656369</link>
      <description>also you can find xdiff - X11/Motif based file comparator and merge tool. &lt;BR /&gt;&lt;A href="http://reality.sgiweb.org/rudy/xdiff/" target="_blank"&gt;http://reality.sgiweb.org/rudy/xdiff/&lt;/A&gt;</description>
      <pubDate>Fri, 04 Feb 2011 11:43:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748574#M656369</guid>
      <dc:creator>Hakki Aydin Ucar</dc:creator>
      <dc:date>2011-02-04T11:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748575#M656370</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Depending on what you want to do, not only 'diff' but also 'comm' and 'cmp' can be used.  Read the manpages for each.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 04 Feb 2011 14:42:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748575#M656370</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-02-04T14:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748576#M656371</link>
      <description>&amp;gt;I should get the output as follows:&lt;BR /&gt;&lt;BR /&gt;What about this line: How to compare files?&lt;BR /&gt;&lt;BR /&gt;Did you want all of the lines in file1 not in file2?&lt;BR /&gt;"comm -23 file1 file2" can do this, provided you sort the two files first.</description>
      <pubDate>Fri, 04 Feb 2011 16:08:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748576#M656371</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-02-04T16:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748577#M656372</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;Thankyou for your replies.&lt;BR /&gt;&lt;BR /&gt;Both of my files have IP Addresses. &lt;BR /&gt;I wanted the IP address which present in file1 but not in file2 to be moved to another file. I have tried your suggestions. I didn't exactly get what I wanted.&lt;BR /&gt;&lt;BR /&gt;Please help me with this.</description>
      <pubDate>Mon, 07 Feb 2011 13:26:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748577#M656372</guid>
      <dc:creator>Vidhya B</dc:creator>
      <dc:date>2011-02-07T13:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748578#M656373</link>
      <description>&amp;gt;I wanted the IP address which present in file1 but not in file2 to be moved to another file.&lt;BR /&gt;&lt;BR /&gt;As I mentioned:&lt;BR /&gt;sort file1 &amp;gt; file1.sort&lt;BR /&gt;sort file2 &amp;gt; file2.sort&lt;BR /&gt;comm -23 file1.sort file2.sort &amp;gt; another-file&lt;BR /&gt;rm -f file1.sort file2.sort</description>
      <pubDate>Mon, 07 Feb 2011 13:50:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748578#M656373</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-02-07T13:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748579#M656374</link>
      <description>Thanks Dennis.&lt;BR /&gt;&lt;BR /&gt;But since they are IP Addresses, that command is of no use.&lt;BR /&gt;&lt;BR /&gt;I tried like that already :(&lt;BR /&gt;&lt;BR /&gt;Anyways thanks a lot :)</description>
      <pubDate>Mon, 07 Feb 2011 14:40:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748579#M656374</guid>
      <dc:creator>Vidhya B</dc:creator>
      <dc:date>2011-02-07T14:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748580#M656375</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; But since they are IP Addresses, that command is of no use.&lt;BR /&gt;&lt;BR /&gt;That's not true, you just have to be sort with multiple keys using the '.' as a delimiter:&lt;BR /&gt;&lt;BR /&gt;# sort -t"." -k1n,1 -k2n,2 -k3n,3 -k4n,4 file.in &amp;gt; file.out&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 07 Feb 2011 14:46:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748580#M656375</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-02-07T14:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748581#M656376</link>
      <description>&amp;gt;But since they are IP Addresses, that command is of no use.&lt;BR /&gt;&lt;BR /&gt;Please explain why sort(1) won't work?  IP addresses are just strings.  If there are problems because two IP strings are in the same equivalence class, that's another issue that's possible to solve.&lt;BR /&gt;&lt;BR /&gt;Better yet, please provide an example of your two files that you want to process.</description>
      <pubDate>Mon, 07 Feb 2011 14:48:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748581#M656376</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-02-07T14:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748582#M656377</link>
      <description>&amp;gt;JRF: you just have to be sort with multiple keys using the '.' as a delimiter:&lt;BR /&gt;&lt;BR /&gt;That may not be helpful since comm(1) assumes the files are sorted with the default sort, not your fancy one.&lt;BR /&gt;It could help the equivalence class issue.</description>
      <pubDate>Mon, 07 Feb 2011 14:52:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748582#M656377</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-02-07T14:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748583#M656378</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Dennis: That may not be helpful since comm(1) assumes the files are sorted with the default sort, not your fancy one.&lt;BR /&gt;&lt;BR /&gt;Well, indeed this didn't help 'comm'.  That's very interesting.  I didn't know that.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 07 Feb 2011 15:04:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748583#M656378</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-02-07T15:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748584#M656379</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I wanted the IP address which present in file1 but not in file2 to be moved to another file&lt;BR /&gt;&lt;BR /&gt;Then you can use:&lt;BR /&gt;&lt;BR /&gt;# perl -e 'while (&amp;lt;&amp;gt;) {$seen{$_}++;last if eof;};while (&amp;lt;&amp;gt;) {print unless $seen{$_}}' file_2 file_1&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 07 Feb 2011 15:35:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/4748584#M656379</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-02-07T15:35:46Z</dc:date>
    </item>
  </channel>
</rss>

