in reply to get the line of ith occurrence of '>' without OPENING THE FILE
You seem to misunderstand the difference between
Openning a file does not imply that you're going to read it. Reading a file does not imply that you're going to read all of it, all at once, into memory.
To simplfy, imagine that you have a file folder of papers in a file cabinet, and that there are too many papers in the folder to fit onto your desk. Can you still open the drawer to the file cabinet? Sure you can. Can reach into the file folder and pull out one sheet of paper at a time? Sure you can. It's the same when reading files. You can pull an entire file into memory at one time, but normally you'll read it a chunk at a time.
|
|---|