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.
Al
On 22 sept. 2010, at 17:04, Maciej Grela wrote:
2010/9/22 Al oss.el...@googlemail.com:
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.
gr...@pazuzu ~
On Wed, Sep 22, 2010 at 9:53 AM, Al oss.el...@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
gr...@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.
Thank you. Nice solutions and they reveal that there is no belly
like program in coreutils.
I find it interesting, that the two bordercases are
Apparently, though unproven, at 17:47 on Wednesday 22 September 2010, Al did
opine thusly:
gr...@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.
Thank you. Nice solutions and they reveal that there
Or, as a script ...
--- begin bin/belly ---
RANGE=$1
shift
sed -n ${RANGE}p $*
--- end --
On Wed, 22 Sep 2010 17:04:43 +0200
Maciej Grela wrote:
2010/9/22 Al oss.el...@googlemail.com:
Hi,
I am looking for a program similar to head or tail. It should
display a given range of lines or
6 matches
Mail list logo