The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Missing core file using ssh + command kclittle UNIX for Advanced & Expert Users 5 03-26-2008 05:36 PM
Count No of Records in File without counting Header and Trailer Records guiguy Shell Programming and Scripting 2 06-07-2007 01:15 PM
using cat and grep to display missing records jxh461 UNIX for Dummies Questions & Answers 4 01-13-2007 09:56 AM
File descriptors missing on startup xnightcrawl UNIX for Advanced & Expert Users 1 12-23-2005 12:58 PM
deleting records with a missing field gillbates UNIX for Dummies Questions & Answers 2 12-12-2002 11: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 10-10-2007
Shiv@jad Shiv@jad is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 27
Urgent: How can i get the missing records from one file out of two

Hi,

I have two files say A and B, Both files have some common records few records which are unique to file A and unique to file B.

Can anyone please help me out to find the records which are present in only B

Please consider the files are of too large size.
Thanks
  #2 (permalink)  
Old 10-10-2007
devtakh devtakh is offline
Registered User
  
 

Join Date: Oct 2007
Location: Bangalore
Posts: 514
I know there are other solutions but this one will work..

while read line
do
if [ `grep -c $line file1` = 0 ]
then
echo $line
fi
done < file2


cheers,
Devaraj Takhellambam
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 11:31 PM.


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