diff --git a/1985/august/primes.sh b/1985/august/primes.sh index 9cd9bdc8b..a7743ea07 100755 --- a/1985/august/primes.sh +++ b/1985/august/primes.sh @@ -8,14 +8,14 @@ PRIMES=$(type -P primes) COUNT=15 if [[ "$#" -ge 1 ]]; then COUNT="$1" - if ! [[ $COUNT =~ ^[0-9]+$ ]] ; then + if ! [[ $COUNT =~ ^[0-9]+$ ]]; then echo "not a number: $COUNT" 1>&2 exit 1 fi fi if [[ -n "$PRIMES" ]]; then - while read -r n ; do primes "$n" $((n + 1)) ; done < <((./august | head -n "$COUNT" )) + while read -r n; do primes "$n" $((n + 1)); done < <((./august | head -n "$COUNT" )) else echo "primes not installed" 1>&2 echo "See the following GitHub repo:" 1>&2