Skip to content

Commit

Permalink
Fix find for language couting
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Sep 27, 2023
1 parent 850f839 commit fc3203f
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions scripts/languages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,26 @@ FOLDERS=$(find . -name 'problem.md' | sed 's/problem.md//g' | sort)
for folder in $FOLDERS; do
solutions="$(\
find "$folder" \
-regex \
'.*\(c\|clj\|cpp\|cs\|dart\|go\|hs\|java\|js\|kt\|lua\|ml\|pas\|php\|py\|r\|rb\|rs\|scala\|sql\)' |\
-name '*.c' -o \
-name '*.clj' -o \
-name '*.cpp' -o \
-name '*.cs' -o \
-name '*.dart' -o \
-name '*.go' -o \
-name '*.hs' -o \
-name '*.java' -o \
-name '*.js' -o \
-name '*.kt' -o \
-name '*.lua' -o \
-name '*.ml' -o \
-name '*.pas' -o \
-name '*.php' -o \
-name '*.py' -o \
-name '*.r' -o \
-name '*.rb' -o \
-name '*.rs' -o \
-name '*.scala' -o \
-name '*.sql' | \
grep -Ev 'drop-table.sql|schema.sql')"
echo "$(echo "$solutions" | wc -w | sed 's/ //g') $folder"
done | sort -nr
Expand Down

0 comments on commit fc3203f

Please sign in to comment.