The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
how to print 35th line from a file ?
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
how to print 35th line from a file ?
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
7
(
permalink
)
05-14-2007
matrixmadhan
Technorati Master
Join Date: Mar 2005
Location: k-tier distributed caching
Posts: 2,736
Quote:
Originally Posted by
ghostdog74
Code:
awk 'NR==35' file
This would still continue validating even after the 'n'th line has been selected and printed. Hence IMHO exit should be used !
matrixmadhan
View Public Profile
Find all posts by matrixmadhan