The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to read record by record from a file in unix raoscb UNIX for Dummies Questions & Answers 1 05-16-2008 06:30 AM
join (pls help on join command) summer_cherry Shell Programming and Scripting 1 12-31-2007 04:19 AM
Script to search a bad record in a file then put the record in the bad file shilendrajadon UNIX for Advanced & Expert Users 1 12-28-2007 09:00 AM
splitting a record and adding a record to a file rsolap Shell Programming and Scripting 1 08-13-2007 01:58 PM
seaching field and getting complete record mahabunta UNIX for Dummies Questions & Answers 4 08-28-2006 04:52 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-04-2008
Registered User
 

Join Date: Jun 2008
Posts: 6
To output complete record with JOIN

Hi

I have 2 files

file1

12312341231612634
34534368463786347
23472364287687263
23472357841007237

file2

12123561235176351*dhfsdhfh*2347623462*sdfjshehweu*123651235*sdgfsgfsy*23237346*
23472357841007237*defsjdf*12378234*hsdhfsdhgfsh*12837238947*dsjshgdfs*2348972348*
12312376234237868*fvdfvd*2342783239487*sdfsjefhsd*27236*sdhfsdhfs*2347234*

I want to use join in get those records that are present in file1 from file2 and want the complete line.

I dont want to use grep since the file size is high and it would take a long time to search for each record.

I am using Join

join -j1 1 -j2 1 file1 file2 -o ("I want complete row") cannot use 2.1 2.2 2.3 and so on as there are more than 100 fields.

Please suggest a solution.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-04-2008
Registered User
 

Join Date: Jun 2008
Posts: 6
reply

Thanks got the output

join -t "*" -j1 1 -j2 1 file1 file2 > output

This wil give complete record.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Bookmarks

Tags
None

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:




All times are GMT -4. The time now is 08:37 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66