The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 05-29-2007
lorcan lorcan is offline
Registered User
  
 

Join Date: May 2007
Posts: 219
Quote:
Originally Posted by panknil
Dear lorcan

Thanks for your quick reply but can you please explain me your code?

Thanks,
Regards,
Pankaj
join -1 4 -2 1 -o1.1,1.2,1.3,1.4,1.5,2.2,2.3,2.4 A.txt B.txt

where -1 option specifies the first file and the argument 4 represents your column to be matched with the second file.

-2 option specifies the second file and argument 1 represents your column to be matched

and -0 option is just to print the fields from the respective file