From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OyQzd-0005PT-1F for garchives@archives.gentoo.org; Wed, 22 Sep 2010 15:12:21 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9E0DBE0C11; Wed, 22 Sep 2010 15:12:02 +0000 (UTC) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by pigeon.gentoo.org (Postfix) with ESMTP id 6FD79E0C6C for ; Wed, 22 Sep 2010 15:12:02 +0000 (UTC) X-Originating-IP: 217.70.178.41 Received: from mfilter1-d.gandi.net (mfilter1-d.gandi.net [217.70.178.41]) by relay1-d.mail.gandi.net (Postfix) with ESMTP id 8B19A255306 for ; Wed, 22 Sep 2010 17:12:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at gandi.net Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by mfilter1-d.gandi.net (mfilter1-d.gandi.net [217.70.178.41]) (amavisd-new, port 10024) with ESMTP id 4YN+Kq+gxioX for ; Wed, 22 Sep 2010 17:11:52 +0200 (CEST) X-Originating-IP: 88.173.156.163 Received: from [192.168.1.2] (unknown [88.173.156.163]) (Authenticated sender: gentoo@floriancrouzat.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 28BDE2552FA for ; Wed, 22 Sep 2010 17:11:48 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: [gentoo-user] Not head, not tail, maybe belly From: Florian CROUZAT In-Reply-To: Date: Wed, 22 Sep 2010 17:11:47 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <6D141799-2F75-4C0A-961B-140850A5B29D@floriancrouzat.net> References: To: gentoo-user@lists.gentoo.org X-Mailer: Apple Mail (2.1081) X-Archives-Salt: 7a25af59-1d21-4d73-99be-63834a7ba316 X-Archives-Hash: b93400ad772ab8072aa387dfdf4ed79a On 22 sept. 2010, at 17:04, Maciej Grela wrote: > 2010/9/22 Al : >> Hi, >>=20 >> 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. >>=20 >> Any suggestions? Thanks in advance. >>=20 >=20 > grela@pazuzu ~ $ cat /etc/passwd | sed -n -e '4,10 p' Best solution so far, but useless use of cat, and the subshell overhead = of the pipe. ----- Florian. / For security reasons, all text in this mail=20 is double-rot13 encrypted. /