bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Not a bug, a wish


From: Steven Schubiger
Subject: Re: Not a bug, a wish
Date: Wed, 26 Mar 2008 23:22:32 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Samuel GRANJEAUD - IR/IFR137 <address@hidden> wrote:
> I thank you very much for devolopping coreutils that allows quick and 
> simple replacement of SQL queries and check. What I would appreciate is 
> a tool that does head and tail in one command, giving the top and bottom 
> lines from a piped output.

I proposed the addition of such a tool a while ago, but it was neglected (due
to expected overhead of maintenance versus effective use).

The description:

| linecut outputs selected lines from streams. The motivation to develop
| such a tool was to provide missing functionality not found within head,
| tail & sed. It features line-numbering (as seen in coreutils' cat),
| multiple files and a diversity of range specifications. Ranges may
| consist of absolute, relative-to-EOF, or relative from previous (advancement)
| line positions. Multiple ranges can be chained, but that requires that they
| don't overlap. Furthermore, the line-numbering is not unique to each file
| and filename headers will be output if requested.

The syntax (among other):

$ <command> | linecut -r 1:10,-10:-1 -
# emit first ten lines and last ten lines from stdin

Available via https://savannah.nongnu.org/projects/linecut .

Steven Schubiger




reply via email to

[Prev in Thread] Current Thread [Next in Thread]