in reply to find unique lines in two files
If you are on a linux base, why re-invent the wheel?
Nick
I think this is the best answer. Better to use an existing solution than to program it yourself. You can also use a series of greps or a diff as an alternative to uniq, depending on exactly what you are trying to do. Check out this relevant link.