Skip to content

Instantly share code, notes, and snippets.

@ybonnel
Last active December 18, 2015 21:39
Show Gist options
  • Save ybonnel/5849355 to your computer and use it in GitHub Desktop.
Save ybonnel/5849355 to your computer and use it in GitHub Desktop.
Golo count lines
git clone https://github.com/golo-lang/golo-lang.git
find golo-lang -type f -exec wc -l {} \; | grep -v '.git' | grep '\.' | while read a
do
echo "$a `echo $a | cut -d'.' -f2`"
done | awk '{
total += $1;
total_by_type[$3] += $1
}
END {
print "Nombre de lignes totales de golo : "total;
for (i in total_by_type) {
print "Nombre de ligne du type "i" : "total_by_type[i];
}
}'
Cloning into 'golo-lang'...
remote: Counting objects: 9900, done.
remote: Compressing objects: 100% (5344/5344), done.
remote: Total 9900 (delta 3012), reused 9657 (delta 2781)
Receiving objects: 100% (9900/9900), 1.75 MiB | 266 KiB/s, done.
Resolving deltas: 100% (3012/3012), done.
Nombre de lignes totales de golo : 21763
Nombre de ligne du type asciidoc : 2413
Nombre de ligne du type java : 14059
Nombre de ligne du type groovy : 200
Nombre de ligne du type md : 182
Nombre de ligne du type rb : 249
Nombre de ligne du type properties : 19
Nombre de ligne du type clj : 35
Nombre de ligne du type markdown : 25
Nombre de ligne du type jjt : 952
Nombre de ligne du type xml : 771
Nombre de ligne du type travis : 12
Nombre de ligne du type golo : 2846
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment