This is a super simple tutorial. So simple, in fact, it is the shortest one I have ever written.
If you ever need to count the number of lines a file has in it and not even process the file, only count the lines, simply open the file and use a
for loop to iterate over the number of lines and update an incrementer already in place. No need to even read the contents.
I told you this was a super simple and short tutorial. 🙂