I need a simple perl or shell script that will compare one text file and output the lines, in this case email addresses, that are not found in the other file.
Here is an example:
list1:
name1atdomaincom
name2atdomaincom
name3atdomaincom
name4atdomaincom
list2:
name2atdomaincom
name3atdomaincom
namenotinatlist1com <<-- These are not in list one so the script should output these entries
name2notinatlist1com <<--
Currently I can use this command to perform the needed action but it only works if the list entries are under 1000 lines, otherwise an "Argument list too long" error is returned.
# egrep -v $(cat list1 | tr '\n' '|' | sed 's/.$//') list2
namenotinatlist1com
name2notinatlist1com
The operating system this needs to work on will be FreeBSD or Linux with bash shell and Perl 5.8+
Thanks!