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

n'th record....

Status
Not open for further replies.
Joined
Oct 22, 2001
Messages
215
Location
US
I got a data file and I want to display the n'th record
say line number 500 from it. How should do this? TIA
 

nawk 'FNR == 500' myFile.txt
sed -n '500p' myFile.txt vlad
+---------------------------+
|#include<disclaimer.h> |
+---------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top