I'd like to see a couple of features in the "sort" command.

(a) The option of excluding a header or footer from the sort. This
header/footer would remain in place, and not be affected by the sort.
E.g. an "--head=LINES" and a "--foot=LINES" option. Where LINES would
be the number of lines that should remain in place.

This would be useful for commands such as "ls -l" or "du -c" which
generates a "sum" header (in ls' case) or footer (as with du). In
these cases one would be able to do "ls -l | sort --head=1" or "du -c
* | sort --foot=1"

(b) Sort number suffixed with SI prefixes ("K", "M", "G", "T" etc.
Maybe even "Ki", "Mi", "Gi"?) E.g. an option "--si-sort" which would
sort values such as "4.0K", "312K", "1.8M", "0", "1.4M", "3.1G" etc in
the proper order.

Right now I always end up first doing a "sort -n", then grepping
through the output to extract the various SI prefixes, and lastly
re-concatenating the result in the correct order. I'd much rather do a
"du -sch | sort --si-sort".

TIA

/best wishes
Zrajm

-- 
  Zrajm C Akfohg   Mobil: 076-211 50 43   E-post: [EMAIL PROTECTED]
  Villav.33, 2tr   Telefon: 018-500 911   http://zrajm.klingonska.org/
  Upsala, Sweden   ICQ-nummer: 16769663   voDleH Hol DajatlhlaH'a' je?


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to