<?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/3595117#M231973</link>
    <description>so you want to read file1 and while it's read search file2 for that same line? If the line in file1 is not found in file2, then dump it to file3? In other words, pull out the lines that don't repeat when file1 and file2 are combined...&lt;BR /&gt;&lt;BR /&gt;Try uniq.&lt;BR /&gt;&lt;BR /&gt;cat file1 file2 |uniq -u&lt;BR /&gt;&lt;BR /&gt;hope this helps,&lt;BR /&gt;-denver</description>
    <pubDate>Tue, 02 Aug 2005 21:33:37 GMT</pubDate>
    <dc:creator>Denver Osborn</dc:creator>
    <dc:date>2005-08-02T21:33:37Z</dc:date>
    <item>
      <title>Comparing two files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/3595115#M231971</link>
      <description>Hi I am having two file for which I want to run a compare line by line i.e. I want to extract all lines one by one and run a find on the other file if found ignore else redirect the output to the third file.&lt;BR /&gt;&lt;BR /&gt;Both the files are not sorted.&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;Thanks,&lt;BR /&gt;Amit.</description>
      <pubDate>Tue, 02 Aug 2005 19:56:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/3595115#M231971</guid>
      <dc:creator>Amit Dixit_2</dc:creator>
      <dc:date>2005-08-02T19:56:42Z</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/3595116#M231972</link>
      <description>You should look at diff. Man diff for details.</description>
      <pubDate>Tue, 02 Aug 2005 20:10:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/3595116#M231972</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-08-02T20:10:57Z</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/3595117#M231973</link>
      <description>so you want to read file1 and while it's read search file2 for that same line? If the line in file1 is not found in file2, then dump it to file3? In other words, pull out the lines that don't repeat when file1 and file2 are combined...&lt;BR /&gt;&lt;BR /&gt;Try uniq.&lt;BR /&gt;&lt;BR /&gt;cat file1 file2 |uniq -u&lt;BR /&gt;&lt;BR /&gt;hope this helps,&lt;BR /&gt;-denver</description>
      <pubDate>Tue, 02 Aug 2005 21:33:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/3595117#M231973</guid>
      <dc:creator>Denver Osborn</dc:creator>
      <dc:date>2005-08-02T21:33:37Z</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/3595118#M231974</link>
      <description>Have a look at the man pages of diff and cmp.&lt;BR /&gt;&lt;BR /&gt;Further if you want check for common lines, you can grep&lt;BR /&gt;&lt;BR /&gt;grep -f file1 file2 &amp;gt; file3&lt;BR /&gt;&lt;BR /&gt;In this common lines will go in file3</description>
      <pubDate>Wed, 03 Aug 2005 00:24:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/3595118#M231974</guid>
      <dc:creator>Vibhor Kumar Agarwal</dc:creator>
      <dc:date>2005-08-03T00:24:25Z</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/3595119#M231975</link>
      <description>sdiff -l file1 file2&lt;BR /&gt;&lt;BR /&gt;Will give all the common lines in first line.&lt;BR /&gt;&lt;BR /&gt;If a line is present in file1, but not in file2, it is represented with &amp;lt;&lt;BR /&gt;&lt;BR /&gt;If a line is present in file2, but not in file1, it is represented with &amp;gt;&lt;BR /&gt;&lt;BR /&gt;If a line is different in both the files, it is represented with |&lt;BR /&gt;&lt;BR /&gt;man sdiff will give more information.</description>
      <pubDate>Thu, 04 Aug 2005 04:19:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/3595119#M231975</guid>
      <dc:creator>vasundhara</dc:creator>
      <dc:date>2005-08-04T04:19:13Z</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/3595120#M231976</link>
      <description>Hi Amit,&lt;BR /&gt;Vibhor has got you correct.&lt;BR /&gt;&lt;BR /&gt;# grep -f file1 file2 &amp;gt; file3&lt;BR /&gt;&lt;BR /&gt;This should help.&lt;BR /&gt;Regards.&lt;BR /&gt;Bharat&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Aug 2005 04:31:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/3595120#M231976</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2005-08-04T04:31:32Z</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/3595121#M231977</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;# sort file1 file2|comm -3 &amp;gt;file3&lt;BR /&gt;&lt;BR /&gt;may also work.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Thu, 04 Aug 2005 04:33:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-two-files/m-p/3595121#M231977</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2005-08-04T04:33:59Z</dc:date>
    </item>
  </channel>
</rss>

