Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


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

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-18-2012
Registered User
 
Join Date: Jun 2012
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Removing Lines Shared by Multiple Files

Hey everyone, I have a question about comparing two files. I have two lists of files. The first list, todo.csv, lists a series of compounds my supervisor wants me to perform calculations on. The second list, done.csv, lists a series of compounds that I have already performed calculations on. However, the two lists overlap, and I am interested in reducing redundancy. So my question; is there any way to remove all lines from todo.csv that also occur in done.csv? I suspect awk could be used to do the trick, but I am not really sure how. Any help would be greatly appreciated.
Sponsored Links
    #2  
Old 06-18-2012
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
 
Join Date: Dec 2007
Location: Out running a Marathon.
Posts: 2,189
Thanks: 46
Thanked 126 Times in 118 Posts
Take a look at two commands - COMM and DIFF
The Following User Says Thank You to joeyg For This Useful Post:
Stuart Ness (06-18-2012)
Sponsored Links
    #3  
Old 06-18-2012
Registered User
 
Join Date: Jun 2012
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Ah, thank you very much. I had no idea the comm command existed.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Removing multiple lines but not the next attribute LCol Shell Programming and Scripting 3 03-09-2011 08:47 PM
Removing Multiple lines below a keyword using SED? deaconf19 Shell Programming and Scripting 2 02-10-2011 08:31 AM
PERL: removing blank lines from multiple files hcclnoodles Shell Programming and Scripting 11 09-20-2009 03:05 PM
removing multiple lines of text in a file spartan22 UNIX for Dummies Questions & Answers 3 02-20-2009 04:35 PM
removing pattern which is spread in multiple lines sabyasm Shell Programming and Scripting 2 05-13-2008 05:19 AM



All times are GMT -4. The time now is 01:29 PM.