Jim Meyering <[EMAIL PROTECTED]> wrote: > Before coding further, I strongly urge you to nail down the > specification -- publicly. Put it this way: write enough > details that someone reading your description in a man page > would not be disappointed.
DESCRIPTION linecut extracts slices of lines from either a file/stream or multiple files. The required range parameter provided must consist of at least one pair of a line slice, where the line to start from preceeds the comma and the line to end at follows the comma. The line specified may be absolute counting from the beginning of the file (positive number) or relative to the end (negative number). Absolute and relative line positions may be intermixed. If more than one pair of a line slice is provided, then the pairs must be separated by a colon. The line-numbering parameter works similar to cat and is optional. EXAMPLES (line 2-5) $ seq 10 | linecut --range 2,5 2 3 4 5 (line 2-2nd last line) $ seq 10 | linecut --range 2,-2 2 3 4 5 6 7 8 9 (6th last line-2nd last line) $ seq 10 | linecut --range -6,-2 5 6 7 8 9 (line 2-4, 3rd last line-last line) $ seq 10 | linecut --range 2,4:-3,-1 2 3 4 8 9 10 I've omitted the line-numbering examples, since the line numbers printed would equal the extracted sequences. _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils