Skip to content

Instantly share code, notes, and snippets.

View stein935's full-sized avatar

Kirk Steineck stein935

View GitHub Profile
@stein935
stein935 / count.sh
Last active September 19, 2025 16:32
Count with Bash!
#!/bin/bash
declare -i goal
goal=$1
SECONDS=0
for ((i = 0; i < goal; i++)); do continue; done
echo "Runtime: $(printf "%dh %dm %ds" "$((10#$SECONDS / 3600))" "$((10#$SECONDS / 60 % 60))" "$((10#$SECONDS % 60))")"
echo "Counted to $(printf "%'d" "$goal")"