From c20a0aada8d9ef11791d5f14848cc0ab4c76838f Mon Sep 17 00:00:00 2001 From: Nick Chambers Date: Tue, 22 Mar 2022 06:19:47 -0500 Subject: [PATCH] Algorithmically enhance the primary numerical parity analysis engine --- maybe | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/maybe b/maybe index df0155f..972cd36 100755 --- a/maybe +++ b/maybe @@ -5,9 +5,12 @@ declare -A colors=( [yellow]=$(tput setaf 3) [reset]=$(tput sgr0) ) +success() { + printf '%s%s%s\n' "${colors[green]}" "$1" "${colors[reset]}" +} + for num in {1..1000}; do - printf '%s[>] Test %d/1000... ✓ passed.%s\n' "${colors[green]}" "$num" "${colors[reset]}" + success "[>] Test $num/1000... ✓ passed." done -printf '%sAll tests successful!%s\n' "${colors[green]}" "${colors[reset]}" -return 0 +success 'All tests successful!'