Re: Comparing two files line by line
- From: Darren New <dnew@xxxxxxxxxx>
- Date: Fri, 14 Jul 2006 16:42:47 GMT
Niv wrote:
I don't think the while { [gets $f1 inline1] >= 0}
{ will work, as how do I get the data-line from $f2?
The same way.
while { [gets $f1 inline1] >= 0 } {
set hasline [gets $f2 inline2]
if {$hasline < 0} {puts "F1 longer than F2"; exit}
... compare $inline1 and $inline2
}
while { [gets $f2 inline2] >= 0 } {
puts "Extra line in F2: $inline2"
}
--
Darren New / San Diego, CA, USA (PST)
This octopus isn't tasty. Too many
tentacles, not enough chops.
.
- References:
- Comparing two files line by line
- From: Niv
- Comparing two files line by line
- Prev by Date: Re: Comparing two files line by line
- Next by Date: Open a file from remote Windows and use the content in the file locally
- Previous by thread: Re: Comparing two files line by line
- Next by thread: Open a file from remote Windows and use the content in the file locally
- Index(es):
Relevant Pages
|