From: Paul Hartman <paul.hartman+gentoo@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Not head, not tail, maybe belly
Date: Wed, 22 Sep 2010 10:43:50 -0500 [thread overview]
Message-ID: <AANLkTim9aY3=7GZTSTDCCjC46b79aQgVaHCWpiRZmyCx@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=__npA061sbZVMJ1XJjU0qLzMuT9DRa_L3CYhJ@mail.gmail.com>
On Wed, Sep 22, 2010 at 9:53 AM, Al <oss.elmar@googlemail.com> wrote:
> Hi,
>
> I am looking for a program similar to head or tail. It should display
> a given range of lines or take a line and a context number like grep.
>
> Any suggestions? Thanks in advance.
sed -n 5,8p filename
where 5 is first line in the range and 8 is the last line.
If you want to view multiple ranges use the same X,Yp syntax but
preceed each with -e. For example
sed -n -e 5,8p -e 12,17p filename
prev parent reply other threads:[~2010-09-22 15:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-22 14:53 [gentoo-user] Not head, not tail, maybe belly Al
2010-09-22 15:04 ` Maciej Grela
2010-09-22 15:11 ` Florian CROUZAT
2010-09-22 15:47 ` Al
2010-09-22 15:55 ` Alan McKinnon
2010-09-22 22:12 ` David Relson
2010-09-22 15:06 ` [gentoo-user] " Remy Blank
2010-09-22 15:43 ` Paul Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTim9aY3=7GZTSTDCCjC46b79aQgVaHCWpiRZmyCx@mail.gmail.com' \
--to=paul.hartman+gentoo@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox