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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print just a few lines

Status
Not open for further replies.

jawon

Programmer
Feb 6, 2003
31
US
I have a very long file and just want to standard out certain sections, say the first 1000 lines or lines 1001 to 9000. Seems simple enough, but it's been awhile for me!
 
First 1000 lines....

head -1000 file1

Lines 1001 to 9000....

awk 'NR>=1001 && NR<=9000' file1

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top