Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 perusing the Monastery: (11)
As of 2015-03-03 21:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (85 votes), past polls