Hi,

Here is a suggested addition to the -t option documentation for sort.
I wasted hours on a mistake this would clairify, twice.  And I know
for a fact of another person who has had the same confusion as well.

The favorite mistake is sorting "-k n" instead of "-k n,n" where "n"
is not the last field.

Thank GNU.

Regards,
Karl

Apply this patch with -p 1 in the textutils source directory.
----------------------<snip>---------------------
diff -ruN textutils-2.0/doc/textutils.texi textutils-2.0-moredoc/doc/textutils.texi
--- textutils-2.0/doc/textutils.texi    Sat Jul 31 04:03:30 1999
+++ textutils-2.0-moredoc/doc/textutils.texi    Thu Nov 30 14:21:08 2000
@@ -2265,7 +2265,9 @@
 That is, given the input line @w{@samp{ foo bar}}, @code{sort} breaks it
 into fields @w{@samp{ foo}} and @w{@samp{ bar}}.  The field separator is
 not considered to be part of either the field preceding or the field
-following.
+following.  But note that sort fields that extend to the end of the line,
+as @samp{-k 2}, or sort fields consisting of a range, as @samp{-k 2,3},
+retain the field separators present between the endpoints of the range.
 
 @item -u
 @opindex -u

_______________________________________________
Bug-textutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-textutils

Reply via email to