classes.sh (473B)
1 find -name '*.java' | # all java files in this directory 2 grep -v 'src/test' | # skip all test files 3 sed -E 's|^\./[a-z-]+/src/main/java/||;s/\.java$//;s|/|.|g;s/(.*)+\./\1 /' | 4 # remove path-prefix remove end / -> . split package/class 5 sort | # sort by package 6 awk '{ if(NR > 1 && $1 != current) print ""; if($1 != current) print $1 ":"; current=$1; print "- " $2 }' | # print by package 7 tee classes.txt # write to classes.txt