diff --git a/README.org b/README.org index c49fa32..ef027ba 100644 --- a/README.org +++ b/README.org @@ -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 diff --git a/examples/count b/examples/count index 4092b9e..2a7e7e7 100755 --- a/examples/count +++ b/examples/count @@ -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 \ No newline at end of file +echo " $text" # Use parsed argument