Removed space before ';'s in 1985/august/primes.sh
This commit is contained in:
1 parent
c31796a55c
commit
61418e10f7
1 file changed
+2
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user