Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Grep the second line from a file?

by graff (Chancellor)
on Mar 20, 2014 at 03:31 UTC ( #1079035=note: print w/ replies, xml ) Need Help??


in reply to Re: Grep the second line from a file?
in thread Grep the second line from a file?

Depending on how large the input file(s) might be, it could be worthwhile to type just two more little words:

perl -ne 'print and last if $.==2' -- FILENAME


Comment on Re^2: Grep the second line from a file?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1079035]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2015-07-04 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (58 votes), past polls