in reply to Snooping through files

Why is count incremented at every line? The final print statement actually reports the total number of lines searched, not the total number of files. It also seems to output a line count to STDOUT - which could get messy if you are searching 16,000+ files... You proabably need to move the statements with count outside the inner while loop. (unless each file is exactly one line long, in which case it doesn't make a difference)

Replies are listed 'Best First'.
RE: RE: Snooping through files
by Simplicus (Monk) on Apr 17, 2000 at 18:42 UTC
    sorry, I should have been a bit more descriptive. each file is one line long. The fields are delimited by the character ³, and the file ends with a "\n". The goal was to merge the files (each a line), and spit out an excel-readable text file. I worked really well.