Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2014-07-28 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (198 votes), past polls