in reply to Re^3: du -h, sorted
in thread du -h, sorted
Oh, I see. Could I then also change the regex to save two more characters?
And, in fact, since we are only using .1e3 to make sure the sizes sort properly, why not save one more:
74 characters.perl -e'sub c{pop=~/.\s/;(ord$&&7).1e3+$`}print sort{c($b)<=>c$a}`du - +h`'
And, in fact, since we are only using .1e3 to make sure the sizes sort properly, why not save one more:
73 characters.perl -e'sub c{pop=~/.\s/;(ord$&&7)**7+$`}print sort{c($b)<=>c$a}`du -h +`'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: du -h, sorted
by hbm (Hermit) on Feb 26, 2009 at 16:28 UTC | |
by bellaire (Hermit) on Feb 26, 2009 at 19:30 UTC | |
by hbm (Hermit) on Feb 26, 2009 at 19:49 UTC | |
by bellaire (Hermit) on Feb 26, 2009 at 20:10 UTC | |
by Lawliet (Curate) on Feb 27, 2009 at 00:48 UTC |
In Section
Cool Uses for Perl