Advertisement
This is comment for paste
BASH GAWK File Count with Columns
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gawk -F'/' '{fn[$NF]++ ; c++ ; PROCINFO["sorted_in"]="@val_num_desc"; for (i in fn) w=w <=length(i) ? length (i) : w } END{for (i in fn) printf "%2d) %-*s %s\n" , ++ln , w, i, fn[i]; print "--------------------------\nTotal number of files:",c } ' <(find $PWD -type f -printf "%h\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement