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 # 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 sferr "I can only count to/from 10" # Throw an error and exit
fi fi
counter="$N" # Use parsed positional argument counter="$N" # Use parsed positional argument
echo -n "$sftbf" # Print everyting from here bold 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 if [ "$reverse" == true ]; then # Use parsed flag
echo " $counter" echo " $counter"
else else

View file

@ -23,13 +23,13 @@ source "$(dirname $0)/../sf"
# Actual script # 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 sferr "I can only count to/from 10" # Throw an error and exit
fi fi
counter="$N" # Use parsed positional argument counter="$N" # Use parsed positional argument
echo -n "$sftbf" # Print everyting from here bold 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 if [ "$reverse" == true ]; then # Use parsed flag
echo " $counter" echo " $counter"
else else