Gentoo Archives: gentoo-user

From: Maciej Grela <maciej.grela@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Not head, not tail, maybe belly
Date: Wed, 22 Sep 2010 15:08:39
Message-Id: AANLkTim6PWa_-QBAU5v0dcO0Xri1pML_kbGGJc0BfScz@mail.gmail.com
In Reply to: [gentoo-user] Not head, not tail, maybe belly by Al
1 2010/9/22 Al <oss.elmar@××××××××××.com>:
2 > Hi,
3 >
4 > I am looking for a program similar to head or tail. It should display
5 > a given range of lines or take a line and a context number like grep.
6 >
7 > Any suggestions? Thanks in advance.
8 >
9
10 grela@pazuzu ~ $ cat /etc/passwd | sed -n -e '4,10 p'
11 adm:x:3:4:adm:/var/adm:/bin/false
12 lp:x:4:7:lp:/var/spool/lpd:/bin/false
13 sync:x:5:0:sync:/sbin:/bin/sync
14 shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
15 halt:x:7:0:halt:/sbin:/sbin/halt
16 mail:x:8:12:mail:/var/spool/mail:/bin/false
17 news:x:9:13:news:/usr/lib/news:/bin/false
18
19 Br,
20 Maciej Grela

Replies

Subject Author
Re: [gentoo-user] Not head, not tail, maybe belly Florian CROUZAT <gentoo@××××××××××××××.net>
Re: [gentoo-user] Not head, not tail, maybe belly David Relson <relson@×××××××××××××.com>