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 07:30 AM
join (pls help on join command) summer_cherry Shell Programming and Scripting 1 12-31-2007 05: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 10:00 AM
splitting a record and adding a record to a file rsolap Shell Programming and Scripting 1 08-13-2007 02:58 PM
seaching field and getting complete record mahabunta UNIX for Dummies Questions & Answers 4 08-28-2006 05:52 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-04-2008
unxusr123 unxusr123 is offline
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.
  #2 (permalink)  
Old 07-04-2008
unxusr123 unxusr123 is offline
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




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


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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