update count example

This commit is contained in:
Denis Lehmann 2022-01-16 15:54:17 +01:00
parent 73300aaf18
commit da3bffba6c
2 changed files with 5 additions and 5 deletions

View file

@ -202,13 +202,13 @@
# Actual script
# ----------------------
if [ "$N" -ge 11 ]; then # Use parsed positional argument
if [ "$N" -gt 10 ]; then # Use parsed positional argument
sferr "I can only count to/from 10" # Throw an error and exit
fi
counter="$N" # Use parsed positional argument
echo -n "$sftbf" # Print everyting from here bold
while [ "$counter" -ge 1 ]; do
while [ "$counter" -gt 0 ]; do
if [ "$reverse" == true ]; then # Use parsed flag
echo " $counter"
else

View file

@ -23,13 +23,13 @@ source "$(dirname $0)/../sf"
# Actual script
# ----------------------
if [ "$N" -ge 11 ]; then # Use parsed positional argument
if [ "$N" -gt 10 ]; then # Use parsed positional argument
sferr "I can only count to/from 10" # Throw an error and exit
fi
counter="$N" # Use parsed positional argument
echo -n "$sftbf" # Print everyting from here bold
while [ "$counter" -ge 1 ]; do
while [ "$counter" -gt 0 ]; do
if [ "$reverse" == true ]; then # Use parsed flag
echo " $counter"
else
@ -39,4 +39,4 @@ while [ "$counter" -ge 1 ]; do
sleep 1
done
echo -n "$sftrs" # Reset text formatting
echo " $text" # Use parsed argument
echo " $text" # Use parsed argument