Sort cash.txt before you save it.
Write a simple computer program that performs something like a
binary search of the sorted data.
It will be faster, and more customizable than grep.
Even faster (on any Linux):
cat money.txt cash.txt | wc -l # this tells you how many addresses you have
cat money.txt cash.txt | sort | uniq | wc -l # this tells you how many unique addresses you have
Both numbers will be the same.
Even faster:
cat money.txt cash.txt | sort | uniq -d # this just gives you all duplicates
It'll also show if either one of the txt-files has duplicates on its own.