[Top][All Lists]

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

[coreutils] added ability in sort to skip n number of lines for each fil

From: Jim Hester
Subject: [coreutils] added ability in sort to skip n number of lines for each file
Date: Thu, 18 Nov 2010 11:36:33 -0500

A common problem when sorting files stems from the file containing 1
or more header lines, which should not be sorted.  As of now, the
common solution to this problem is to remove the header lines with
manually, or to output only the non header lines with tail, awk, or
some other program and pipe the results to sort.  This was likely not
deemed a problem when sort was only single threaded, as the printing
and pipe was likely still faster than the sort itself.  However with
multi-threaded sort this results in the operation bottle necking
waiting for more information from the pipe. This common operation
would be greatly improved if sort could simply print a user defined
number of lines for each file.  I have made a simple patch to
implement this feature, which I have attached to this email.

Attachment: sort_skip_lines.diff
Description: Binary data

reply via email to

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