1. default secondary sort line in 'sort'
There's a problem I'm having in sort, wondering if there's help to be found.
PROBLEM: When sorting a file, and specifying only one column to sort on,
'sort' insists on secondarily sorting on another column. For example:
inputfile:
3 c
2 a
1 c
'sort +1 -2 inputfile' gives this output:
2 a
1 c
3 c
I.e., it sorted on column 2 like asked, but it *also* did a secondary sort on
column 1! I should be able to preserve the order of the file outside the
specified sorting columns (well, I think so, dammit :). I've also noticed
that the secondary sortline changes whether your using the '+1 -2' or '-k
2,3' format. Screwy.
Is there any way to avoid this secondary type of sort? Or do I always have to
put line numbers in the data lines I want to sort, and secondarily sort on
those in order to preserve initial order outside the desired sorting
column?? (Which should be very unnecessary!)
And may I say that the 'sort' man pages suck, and give no indication that I
can find on how to specify secondary sort lines (the AWK manual taught me
how).
--
Vincent Kargatis -- Space Physics & | THE BOYS: "Hooty! Hooty! Hooty!"
Astronomy, Rice U., Houston, TX | BARBARA: "Howdy Hooty Sapperticker!"
[http://spacsun.rice.edu/~vek/vek.html] | by Barbara and the Boys
2. ncurses has_colors() returns FALSE
3. sort sort: 0653-657 A write error occurred while sorting (4.1.3)
4. Ultra 5 harddrive
5. Sort-order/collation screwed (RH 7.1)
6. ls code
7. Bookmarks -sort order
8. Kernel compiling problems
9. Sorting file names in numerical order
10. Change in sort dictionary order in Solaris 10
11. sort MM/DD/YY in reverse chron order with -k...
12. sort first two fields in numeric order
13. sort not getting right order