Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- LC_ALL=C find . -name '?*.*' -type f -printf '%s.%f\0' |
- LC_ALL=C gawk -F . -v RS='\0' '
- {
- if(NF==2) $(NF+1)=" ";
- s[$NF] += $1;
- n[$NF]++
- }
- END {
- PROCINFO["sorted_in"] = "@val_num_asc"
- for (e in s) printf "%15d %4d %s\n", s[e], n[e], e
- }' |
- numfmt --to=iec-i --suffix=B
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement