Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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: (11)
As of 2015-05-28 23:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (574 votes), past polls