Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: A little script that combines `head' and `tail' utilities

by Aristotle (Chancellor)
on Sep 17, 2004 at 07:24 UTC ( #391697=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ sed -n 10,20p somefile
    $ sed -n 40,/foo/p somefile
    $ sed -n /foo/,/bar/p somefile
    
  2. or download this
    $ perl -ne'print if 10 .. 20' somefile
    $ perl -ne'print if 40 .. /foo/' somefile
    $ perl -ne'print if /foo/ .. /bar/' somefile
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2021-10-18 01:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (72 votes). Check out past polls.

    Notices?