Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 scrutinizing the Monastery: (8)
As of 2014-12-26 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls