Thanks! I didn't know about countlines(). Interestingly, countlines() does not seem to include blank lines. That's not a problem for me, but it's good to be aware of:
-------------------------- $ cat > foo.txt Hello world. $ cat > bar.txt Hello World. $ julia ... julia> run(`wc -l foo.txt`) 2 foo.txt julia> run(`wc -l bar.txt`) 4 bar.txt julia> countlines("foo.txt") 2 julia> countlines("bar.txt") 2 -------------------------- Thanks again. Daniel. On Wednesday, 19 August 2015 13:13:43 UTC+2, Keith Campbell wrote: > > You could try countlines(). > Also, you likely want eachline() rather than readlines(). eachline() will > iterate through the file for you. > cheers, > Keith > > >