3rd script

This commit is contained in:
2026-04-15 15:35:33 +02:00
parent 6a937b1bd2
commit d5d0b6f608
4 changed files with 46 additions and 3 deletions

View File

@@ -0,0 +1,18 @@
if [[ $# -ne 1 ]]; then
echo "usage: $0 <number>"
echo "please provide exactly one numeric argument"
exit 1
fi
if ! [[ "$1" =~ ^[0-9]+$ ]] || (("$1" < 1)); then
echo "error: argument must be a positive integer"
exit 1
fi
reset
for ((i = 2; i < "$(($1 + 1))"; i++)); do
cowsay "$(($i - 1))"
sleep 1
clear
done
cowsay -e oo -T U "$1"