in reply to comparing 2 files problem

First, if the only reason you aren't using 'diff' is that the lines are in different locations, you can sort the files before diffing. (Depending on what you are trying to do, you may want to use the '-u' flag to remove duplicates).

Note that using 'diff' is *not* the same as reading one file and comparing the line against the second file. You aren't checking for extra lines that appear in the second file. Also, you aren't checking for duplicates (i.e. 2 identical lines in the first file match 1 line in the second).

bluto