Advertisement
Valentin_2023
Jan 17th, 2023
111
0
Never
This is comment for paste BASH GAWK File Count with Columns
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  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