Fix bug in 1985/august/primes.sh

The output in a command had blank lines which is invalid input to
primes.
This commit is contained in:
Cody Boone Ferguson committed 2024-01-15 07:34:21 -08:00
1 parent 9309a37fb4
commit 85bc3bab64
1 file changed
+1 -1
+1 -1
View File
@@ -15,7 +15,7 @@ if [[ "$#" -ge 1 ]]; then
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" |sed '/^$/d'))
else
echo "primes not installed" 1>&2
echo 1>&2