bug#20936: suggestion for a 'wart-ish' extension off of 'sort'
From:
Erik Auerswald
Subject:
bug#20936: suggestion for a 'wart-ish' extension off of 'sort'
Date:
Tue, 30 Jun 2015 09:46:04 +0200
User-agent:
Mutt/1.5.21 (2010-09-15)
Hi,
On Tue, Jun 30, 2015 at 12:28:09AM -0700, Linda Walsh wrote:
> 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
Why not use 'du -shc * | sort -h | tail -n11'?
The total produced by du will sort after all the individual parts.
Thanks,
Erik