Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read arbitrary number of lines from a file?

Status
Not open for further replies.
Mar 8, 2006
2
US
I know how to read lines from a text file, but I want to read N number of lines only, starting at line X. What would be the best way to do this?

Thanks!
 
Read the entire file in then access a slice of the list.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top