Add help information upon misuse.

This commit is contained in:
2026-03-02 15:33:43 +01:00
parent 253bdcbecb
commit 6bc2145612

View File

@@ -22,16 +22,19 @@
# 3. This notice may not be removed or altered from any source
# distribution.
if [ -z $1 ]
set -euo pipefail
if [ $? -gt 1 ]
then
COUNT=5
else
COUNT=$1
echo "Usage: $0 [COUNT]"
exit 1
fi
for i in $(seq $COUNT -1 1)
COUNT=${1:-5}
for i in $(seq "$COUNT" -1 1)
do
echo $i
echo "$i"
sleep 1
done