<?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: question with join command.. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/question-with-join-command/m-p/3914675#M763840</link>
    <description>Yes I learned man join and I realised and invoked sort -b file1&lt;BR /&gt;&lt;BR /&gt;It works with command:&lt;BR /&gt;&lt;BR /&gt;grep -F -f file1 file2&lt;BR /&gt;&lt;BR /&gt;cool..but still I wanted to practice join command becouse I find it cool..&lt;BR /&gt;&lt;BR /&gt;Thanks a lot</description>
    <pubDate>Mon, 18 Dec 2006 10:07:51 GMT</pubDate>
    <dc:creator>amonamon</dc:creator>
    <dc:date>2006-12-18T10:07:51Z</dc:date>
    <item>
      <title>question with join command..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-with-join-command/m-p/3914672#M763837</link>
      <description>Hello..I have 2 files:&lt;BR /&gt;&lt;BR /&gt;file1(pattern):&lt;BR /&gt;&lt;BR /&gt;100018&lt;BR /&gt;100090&lt;BR /&gt;100143&lt;BR /&gt;100198&lt;BR /&gt;100346&lt;BR /&gt;100708&lt;BR /&gt;100961&lt;BR /&gt;100989&lt;BR /&gt;101037&lt;BR /&gt;101206&lt;BR /&gt;101543&lt;BR /&gt;101931&lt;BR /&gt;102306&lt;BR /&gt;102371&lt;BR /&gt;102504&lt;BR /&gt;102605&lt;BR /&gt;102640&lt;BR /&gt;102823&lt;BR /&gt;103025&lt;BR /&gt;103390&lt;BR /&gt;&lt;BR /&gt;file2:&lt;BR /&gt;&lt;BR /&gt;320346|006|12|11&lt;BR /&gt;901546|007|1|11&lt;BR /&gt;220054|007|12|11&lt;BR /&gt;100018|007|1|11&lt;BR /&gt;901411|007|12|11&lt;BR /&gt;380094|007|12|11&lt;BR /&gt;320046|006|12|11&lt;BR /&gt;901946|007|1|11&lt;BR /&gt;220854|007|12|11&lt;BR /&gt;310776|007|1|11&lt;BR /&gt;901611|007|12|11&lt;BR /&gt;380194|007|12|11&lt;BR /&gt;&lt;BR /&gt;result should be: &lt;BR /&gt; 100018&lt;BR /&gt;&lt;BR /&gt;so basicly join 2 files and if record is listed in pattern(file1) do not print that record..&lt;BR /&gt;&lt;BR /&gt;this is what I tryed so far:&lt;BR /&gt;&lt;BR /&gt;join -t'|' -a1  file1 file2&lt;BR /&gt;&lt;BR /&gt;but results are not OK..&lt;BR /&gt;&lt;BR /&gt;then I also tryed this:&lt;BR /&gt;&lt;BR /&gt;join -1 1 -2 1 -t'|' -a 1  file1 file2&lt;BR /&gt;&lt;BR /&gt;still not OK??&lt;BR /&gt;&lt;BR /&gt;can someone correct my misstake..&lt;BR /&gt;&lt;BR /&gt;Thanks a lot..I am still beginner here but I try hard to make something..&lt;BR /&gt;&lt;BR /&gt;cheers,&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Dec 2006 09:49:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-with-join-command/m-p/3914672#M763837</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2006-12-18T09:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: question with join command..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-with-join-command/m-p/3914673#M763838</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;From your example, it's not clear if you DO or DO NOT wish to print matching records in file2.&lt;BR /&gt;&lt;BR /&gt;If you DO want matching records printed:&lt;BR /&gt;$ grep -F -f file1 file2&lt;BR /&gt;100018|007|1|11&lt;BR /&gt;&lt;BR /&gt;If you wish to EXCLUDE matches in file2:&lt;BR /&gt;$ grep -F -v -f file1 file2&lt;BR /&gt;320346|006|12|11&lt;BR /&gt;901546|007|1|11&lt;BR /&gt;220054|007|12|11&lt;BR /&gt;901411|007|12|11&lt;BR /&gt;380094|007|12|11&lt;BR /&gt;320046|006|12|11&lt;BR /&gt;901946|007|1|11&lt;BR /&gt;220854|007|12|11&lt;BR /&gt;310776|007|1|11&lt;BR /&gt;901611|007|12|11&lt;BR /&gt;380194|007|12|11&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Mon, 18 Dec 2006 09:56:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-with-join-command/m-p/3914673#M763838</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-12-18T09:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: question with join command..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-with-join-command/m-p/3914674#M763839</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;If you truly want to use 'join' you need to sort your input files.  See the manpages for 'join' for more information.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 18 Dec 2006 10:03:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-with-join-command/m-p/3914674#M763839</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-12-18T10:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: question with join command..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-with-join-command/m-p/3914675#M763840</link>
      <description>Yes I learned man join and I realised and invoked sort -b file1&lt;BR /&gt;&lt;BR /&gt;It works with command:&lt;BR /&gt;&lt;BR /&gt;grep -F -f file1 file2&lt;BR /&gt;&lt;BR /&gt;cool..but still I wanted to practice join command becouse I find it cool..&lt;BR /&gt;&lt;BR /&gt;Thanks a lot</description>
      <pubDate>Mon, 18 Dec 2006 10:07:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-with-join-command/m-p/3914675#M763840</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2006-12-18T10:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: question with join command..</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-with-join-command/m-p/3914676#M763841</link>
      <description>The grep command is perfect for what you're trying to do. But if you wanted to practice the join(1) command you need to read the man page thoroughly as the second paragraph under DESCRIPTION section of the join(1) man page says:&lt;BR /&gt;&lt;BR /&gt;&amp;gt;file1 and file2 must be sorted in increasing collating sequence (see &amp;gt;Environment Variables below) on the fields on which they are to be joined; &amp;gt;normally the first in each line.&lt;BR /&gt;&lt;BR /&gt;So sort file1 and file2 before using the join(1) command on them, i.e.&lt;BR /&gt;&lt;BR /&gt;# sort -k1,1 file1 &amp;gt; file1.out&lt;BR /&gt;# sort -t'|' -k1,1 file2 &amp;gt; file2.out&lt;BR /&gt;# join -1 1 -2 1 -t'|' -o 1.1 file1.out file2.out&lt;BR /&gt;&lt;BR /&gt;~cheers</description>
      <pubDate>Mon, 18 Dec 2006 10:41:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-with-join-command/m-p/3914676#M763841</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-12-18T10:41:33Z</dc:date>
    </item>
  </channel>
</rss>

