in reply to get the line of ith occurrence of '>' without OPENING THE FILE

The toughest situation is: I CAN NOT USE OPEN ON THE FILE! IT IS TOO LARGE TO OPEN IN MY OS.

You seem to misunderstand the difference between

  1. openning a file,
  2. reading it, and
  3. reading it all into memory.

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.

  • Comment on Re: get the line of ith occurrence of '>' without OPENING THE FILE