I have a LONG .txt file that contains almost 6000 lines! Sometimes I need to retrieve the info. in line 5000. Is it possible to start reading from line 5000 rather than starting from the beginning?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Whether 6000 lines are long or not depends on the average line length. Even with 100 characters per line, this is not really long.
Nevertheless, you can read from line 5000 if you know where line 5000 starts. Unfortunately, most of the time you’ll have to read lines 1 through 4999 to find that out.