|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Join Command
Hi, Please explain the working process of join command. File 1 Code:
P B S A C A File2 Code:
C B P A S D But the output of join command is... join File1.txt File2.txt Code:
P B A S A D But I guess the output should be Code:
P B A S A D C A B Please correct me,if i am worong or missing some thing. Thanks |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
To work correctly, both files being joined need to be sorted on the fields that are to be used as the matching fields. Since File 1 has the values in the order Code:
P S C instead of Code:
C P S for the field used to match for the join, the results are unspecified. |
| The Following User Says Thank You to Don Cragun For This Useful Post: | ||
satyar (01-10-2013) | ||
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Thanks a lot...it worked
![]() |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to use the the join command to join multiple files by a common column | evelibertine | UNIX for Dummies Questions & Answers | 5 | 07-05-2012 04:15 PM |
| how to join two files using "Join" command with one common field in this problem? | mindfreak | UNIX for Dummies Questions & Answers | 2 | 04-13-2012 05:55 AM |
| awk command for simple join command but based on 2 columns | ruby_sgp | Shell Programming and Scripting | 2 | 03-28-2010 07:00 AM |
| Join command | Mish_99 | Shell Programming and Scripting | 1 | 10-24-2008 11:27 AM |
| join (pls help on join command) | summer_cherry | Shell Programming and Scripting | 1 | 12-31-2007 04:19 AM |
|
|