GNU bug report logs -
#20936
sort: add summary line option
Previous Next
Reported by: Linda Walsh <coreutils <at> tlinx.org>
Date: Tue, 30 Jun 2015 07:29:02 UTC
Severity: wishlist
Tags: wontfix
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
I admit the ability to show a summary line might not bethe first
thing you'd think a pure-sorting utility might do, but it would be
awfully handy if sort had a 'Numeric sum' option ("-N" -- preferred
'-s', but it's already taken) to go with the -h sorting:
ala:
----
> du -sh *|sort -h|tail
6.0M firmware
6.7M kernel
8.4M tools
26M net
29M sound
30M Documentation
31M include
37M fs
128M arch
330M drivers
--- vs. ---
> du -sh *|hsort -s|tail -12
6.0M firmware
6.7M kernel
8.4M tools
26M net
29M sound
30M Documentation
31M include
37M fs
128M arch
330M drivers
---- -----
649.4M TOTAL
---
I'd donate the code for hsort, but its in perl --
I wrote it several years ago to do what 'sort -h' does, but
also put in the option for a summary line -- handy companion
for 'human numbers', which would otherwise take alot more
typing (I think -- unless there's some hidden switch I don't know
about).
This bug report was last modified 6 years and 213 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.