Samuel GRANJEAUD - IR/IFR137 <[EMAIL PROTECTED]> 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 _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
