![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with using join command | yahyaaa | Shell Programming and Scripting | 4 | 06-15-2008 01:16 PM |
| join (pls help on join command) | summer_cherry | Shell Programming and Scripting | 1 | 12-31-2007 05:19 AM |
| Join Command Help | jerome Sukumar | Shell Programming and Scripting | 0 | 01-25-2007 03:08 AM |
| Using Join Command | Supial | Shell Programming and Scripting | 4 | 08-09-2005 01:12 AM |
| Join command | unisam | UNIX for Dummies Questions & Answers | 4 | 07-28-2004 06:59 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Complicated Join command!
Hi I have a serious issue when trying to join to files
so I have two files, one for meals and one for people Meal1:Turkey:Potato Chips:Twinkie:Coke:5.95 Meal2:Ham & Cheese oritos:Cookie:Sprite:6.49Meal3:Vegetarian:Cheese Crackers:Brownie:Pepsi:5.75 Meal4:Tuna:Cheese Puffs:Eclair iet Coke:6.951234:John:Smith:Meal1:103 2345:Bob:Brown:Meal3:155 3456:Susan:Jones:Meal2:215 4567:Betty:Boop:Meal2:444 5678:Abbie:Normal:Meal3:122 6789:Carla:Carmes:Meal4:212 7890 avid ork:Meal1:3558901:Joe:Johnson:Meal3:246 9012:Karen:Kook:Meal1:364 what im trying to do is join the two i've tried [join -1 4 -2 1 -t: people meals > orders] but it does not seem to work, can anyone help please ![]() |
|
||||
|
What you expect it to do ?
What it is not doing ? What error you get ?! Assuming you had given the order of file wrongly, 1st file 1st field, and 2nd file 4th field, and following works. Code:
$ join -1 1 -2 4 -t: t1 t2 Meal1:Turkey:Potato Chips:Twinkie:Coke:5.95:1234:John:Smith:103 Meal3:Vegetarian:Cheese Crackers:Brownie:Pepsi:5.75:2345:Bob:Brown:155 Meal4:Tuna:Cheese Puffs:Eclairiet Coke:6.95:6789:Carla:Carmes:212 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|