RosettaCodeData/bin/rcd-langs-per-task

19 lines
318 B
Text
Raw Permalink Normal View History

2023-06-28 13:59:20 -04:00
#!/usr/bin/env bash
set -e -u -o pipefail
root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)
cd "$root"
total=0
for task in Task/*; do
count=$(find "$task" -type d | wc -l)
count=$((count-1))
printf '%06d %s\n' "$count" "${task#Task/}"
total=$((total+count))
done
printf '%06d %s\n' "$total" Total