Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple script unix

Status
Not open for further replies.

ksdh

Technical User
Oct 24, 2007
41
0
0
IN
HI
What i am trying to do is as follows

A------> Raw file
B------> Whitelist
C------> Filtered file

Lets say each of them contains only numbers.
I want to check , how many numbers in the filtered file (came from raw) are there in the whitelist. Ideally all of them should be in the whitelist (filter). But i still want to compare ----is each number in the filtered file also present in the whitelist. If so, i want to count the number of entries that matched.


All i want to do here, is run a for or while loop on file C to compare the entries with file B but dont know how to do it. Once thats doen, i want to count the number of entries that matched in both files.
The output would just give us a count of the number of entries that matched, a simple number.

Any help is appreciated
Thanks
 
What have you tried so far and where in your code are you stuck ?
Tip: man comm

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top