Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 contemplating the Monastery: (4)
As of 2021-11-27 13:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?