The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Removing the first and last lines in a file naveendronavall Shell Programming and Scripting 2 12-30-2007 01:22 AM
Removing the first and last lines in a file naveendronavall AIX 1 12-29-2007 11:44 PM
Removing lines from a file computersaysno UNIX for Dummies Questions & Answers 6 11-14-2006 06:50 PM
Removing lines within a file tookers Shell Programming and Scripting 3 08-22-2006 09:49 AM
Removing lines in a text file. WABonnett Shell Programming and Scripting 4 11-25-2003 11:27 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 12-16-2005
PradeepRed PradeepRed is offline
Registered User
  
 

Join Date: Dec 2005
Posts: 25
Removing lines from a file

Hello

i have 2 files file1 and file2 as shown below

file1
110010000000206|567810008161509
110010000000207|567810072227627
110010000000208|567811368851555
110010000000209|567811422513652
110010000000210|567812130217683
110010000000211|567813220211182
110010000000212|567813449322589
110010000000213|567813741319623
110010000000214|567816323171591
110010000000215|567816660521463
110010000000216|567818208711973
110010000000217|567819516604228
110010000000218|567819540685909
110010000000219|567820748714137
110010000000220|567821948536668
110010000000221|567822556413253

file2

110010000000206
110010000000210
110010000000211
110010000000214
110010000000217
110010000000221

Now i want a third file obtained from file1 which will not have the entries from file2.

ie

110010000000207|567810072227627
110010000000208|567811368851555
110010000000209|567811422513652
110010000000212|567813449322589
110010000000213|567813741319623
110010000000215|567816660521463
110010000000216|567818208711973
110010000000218|567819540685909
110010000000219|567820748714137
110010000000220|567821948536668

Now my problem is that file1 has 10 million entries and file2 has half a million entries. So grep -v option is out. Pls suggest an easy way out.

I seem to get stuck with problems working with big files.

Regards
Pradeep
 

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 03:18 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