G
garhone
Hi,
I have 2 large files and I need to compare each line in one file, say
line x, with line x in the second file. So compare line 1 in one file
with line 1 in another file, line 2 with line 2, etc.
The program will stop when it encounters the first difference.
After searching the web, I've found recommendations of reading at
least one of these files into memory, into an array and looping
through the array and reading the second file.
Is there another way of doing this without reading into memory? As
each file is extremely large?
Is it possible to go directly to a specific line number in a file, and
read just that line?
Thanks in advance,
C
I have 2 large files and I need to compare each line in one file, say
line x, with line x in the second file. So compare line 1 in one file
with line 1 in another file, line 2 with line 2, etc.
The program will stop when it encounters the first difference.
After searching the web, I've found recommendations of reading at
least one of these files into memory, into an array and looping
through the array and reading the second file.
Is there another way of doing this without reading into memory? As
each file is extremely large?
Is it possible to go directly to a specific line number in a file, and
read just that line?
Thanks in advance,
C