Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

caMi

macrumors regular
Original poster
Sep 13, 2007
166
0
Okay,

I have 2 list of names (each have about 200-300 names)

I want to compare the 2 lists to see what names appear on both lists.

What application can do this for me?
 
Excel (vlookup) or Word (compare)

Openoffice / Neooffice should have the same / similar functionality but I haven't looked.
 
What format are the lists in? You could always go to a shell, and write a quick perl or bash script...or use cmp, diff, or sdiff.
 
Okay...had a few minutes, so I threw a simple bash script together.

Just put the following into a file named compare.sh, in the same directories as your 2 files:

#!/bin/bash

file1=$1
file2=$2

cat $file1 | while read i
do
grep -x "$i" $file2
done

Go to your terminal (bash shell), and cd into the directory where these files reside. Run it:

sh compare.sh list1 list2

(where list1 and list2 are the names of your files)

It'll spit out the COMMON lines only.

Gary
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.