Skip to content

Instantly share code, notes, and snippets.

@mbukatov
Created May 25, 2026 17:37
Show Gist options
  • Select an option

  • Save mbukatov/9613257df259a1964b2f65cdfffd5d8d to your computer and use it in GitHub Desktop.

Select an option

Save mbukatov/9613257df259a1964b2f65cdfffd5d8d to your computer and use it in GitHub Desktop.
#!/bin/bash
cd ~/projects/ARO-HCP/test
find cmd e2e e2e-setup pkg util -name *.go -print0 \
| xargs -0 -I'{}' -- git blame -wet '{}' \
| sed 's/^[^<]*<\([^>]*\)>.*/\1/' \
| sort \
| uniq -c \
| sort -nr -k1 \
| awk '{sum += $1; counts[NR] = $1; emails[NR] = $2}
END {for (i=1; i<=NR; i++) printf "%6d %5.2f%% %s\n", counts[i], counts[i]/sum*100, emails[i]}' \
| nl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment