19 lines
318 B
Bash
Executable File
19 lines
318 B
Bash
Executable File
#!/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
|