Easier would be just use 'cat list_of_numbers | sort | uniq -u' to get the unique entries.
sort -u < list_of_numbers cat file | grep pattern | sort -u
you can write < file grep pattern | sort -u
and the filename is out of the way compared to grep pattern file | sort -unow, I'll wait for someone to post a link to the "UUOC award" award