Skip to content

Instantly share code, notes, and snippets.

View marvk's full-sized avatar
🐧

Marvin marvk

🐧
View GitHub Profile
@mmattozzi
mmattozzi / gist:9127537
Created February 21, 2014 02:14
Find longest java class name
Search one project:
find . | grep -v Test | perl -nl -e 'if ($_ =~ /\/((\w+)\.java)/) { print length($2) . " $1"; }' | sort -nr | head -20
Search many projects and include project name in list:
find . -name '*.java' | grep -v Test | perl -nl -e 'if ($_ =~ /^\.\/(\w+)\/.*\/((\w+)\.java)$/) { print length($3) . " $2 - $1"; }' | sort -nr | grep -v mice | head -20