- foreach line $linenum - Compare the number of records returned by "SELECT * WHERE LINENUM=$linenum" to the number of records returned by "SELECT DISTINCT * WHERE LINENUM=$linenum". If they're different, there are duplicate records. - end #### - foreach original file - $linenum = 1; - while not eof - append the line to file "line${linenum}.dat" - $linenum++; - end - end - foreach line file - Compare num of lines returned by 'cat line###.dat | sort | uniq' with the number of lines in line###.dat. If they're different, there are duplicate records. - end