in reply to Re^6: comparing contents of the file
in thread comparing contents of the file

You forgot a couple important parts of the algorithm:
open the second input file while reading the second input one line at a time if the current line exists as a hash key and the hash value is "1" print this line to the "matching lines" file increment the hash value <-- YOU FORGOT THIS STEP YOU STILL NEED TO DO THIS PART: having read all input, now loop over all the keys of the hash if the hash value assigned to this key is still "1" print this hash key to the "distinct lines" file (maybe include t +he file name)

Replies are listed 'Best First'.
Re^8: comparing contents of the file
by Ms.Ranjan (Initiate) on Jun 05, 2008 at 20:48 UTC
    thankyou very much for your help.