Hi -
One of the biggest frustrations with the "sort" utility is figuring out how to
tell it where exactly the keys are on each line. For example, I have a file which
contains, in part,
I really want to sort FIRST on column 3, and then on the numeric part of column
2. I would think that the sort command would be something like
sort -s -k3 -k2.4n
BUT this doesn't work. It sorts OK on column 3, but then does nothing with the
second sort key.
It would be incredibly useful if there were some mode in which sort would just
report each line and the sort keys found on that line, so that I can make sure
that I'm properly communicating how to find the darn keys!
-- Mario
% sort --version
sort (GNU coreutils) 5.97
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and Paul Eggert.