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
deleting double entries in a log file opusforum Shell Programming and Scripting 7 03-13-2009 04:42 AM
Deleting the files comparing the creation dates pssandeep UNIX for Dummies Questions & Answers 2 04-10-2008 10:54 AM
How to create a list of entries without vi mpc8250 Shell Programming and Scripting 3 02-13-2008 03:56 AM
Searching list of entries in file for actual files in dir not4google UNIX for Dummies Questions & Answers 2 10-18-2006 11:24 AM
Comparing a distinct value in 1 list with another list manualvin Shell Programming and Scripting 6 06-22-2004 06:42 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 08-14-2007
eltinator eltinator is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 63
Post Comparing 2 list and deleting deuplicate entries

Hi,

I have a list of names and I want to basically take each name and search a given file to see if the name is in that file. If it is then delete the name from the list and if it isn't then leave it. Anyone know how to script something like this. Here's an example of what I mean:

List 1:
Tom
Bob
John
Dave

List 2:
Anthony
Ed
Bob
Dave

Comparing List 1 to List 2 results in List1 being:
Tom
John

And just to note, List 2 might not be a list, could just be a text document with the names in there but the script should work about the same way. Can anyone help with this? Thanks!

Last edited by eltinator; 08-14-2007 at 04:37 PM.. Reason: Correction
 

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:02 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