snippets/bash/stats-project.sh

10 lines
274 B
Bash
Raw Permalink Normal View History

2024-10-02 23:47:38 +00:00
#!/bin/bash
echo -e "Lines:\n"
for lang in "Java" "XML" "JSP" "Properties" "JRXML" "HTML" "CSS" "JS"; do
files=($(find . -iname "*.$lang"))
if [ ${#files[@]} -ne 0 ]; then
count=$(wc -l ${files[@]} | tail -n1 | xargs)
echo "$lang: ${#files[@]} files - $count lines"
fi
done