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:
1 parent
9309a37fb4
commit
85bc3bab64
1 file changed
+1
-1
@@ -15,7 +15,7 @@ if [[ "$#" -ge 1 ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$PRIMES" ]]; then
|
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
|
else
|
||||||
echo "primes not installed" 1>&2
|
echo "primes not installed" 1>&2
|
||||||
echo 1>&2
|
echo 1>&2
|
||||||
|
|||||||
Reference in new issue
Block a user