From 85bc3bab644094b3124cbfbabb997171930d8ec5 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 15 Jan 2024 07:34:21 -0800 Subject: [PATCH] Fix bug in 1985/august/primes.sh The output in a command had blank lines which is invalid input to primes. --- 1985/august/primes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1985/august/primes.sh b/1985/august/primes.sh index e64d220c4..8ce8d97ea 100755 --- a/1985/august/primes.sh +++ b/1985/august/primes.sh @@ -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