18 lines
315 B
Text
18 lines
315 B
Text
|
|
#!/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 f -not -name '00-*' | wc -l)
|
||
|
|
printf '%06d %s\n' "$count" "${task#Task/}"
|
||
|
|
total=$((total+count))
|
||
|
|
done
|
||
|
|
|
||
|
|
printf '%06d %s\n' "$total" Total
|