From 543b25081527954d0c82cb2e8b58f075515d0ab8 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sat, 13 Jan 2024 10:54:25 -0800 Subject: [PATCH] Slightly improve 1992/buzzard.1/try.sh --- 1992/buzzard.1/try.sh | 30 ++++++++++++++++++++++-------- thanks-for-help.md | 2 +- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/1992/buzzard.1/try.sh b/1992/buzzard.1/try.sh index 794c47fd5..67c7d8e14 100755 --- a/1992/buzzard.1/try.sh +++ b/1992/buzzard.1/try.sh @@ -14,16 +14,30 @@ make CC="$CC" all >/dev/null || exit 1 # clear -echo "$ ./buzzard.1 0 10" 1>&2 +read -r -n 1 -p "Press any key to run: ./buzzard.1 0 10: " +echo 1>&2 ./buzzard.1 0 10 -echo "$ ./buzzard.1 56 720" 1>&2 -./buzzard.1 56 720 -echo "$ ./buzzard.1 1 521" 1>&2 -./buzzard.1 1 521 +echo 1>&2 -echo "$ ./buzzard.1 '1+1' 111" 1>&2 +read -r -n 1 -p "Press any key to run: ./buzzard.1 56 720: " +echo 1>&2 +./buzzard.1 56 720 + +read -r -n 1 -p "Press any key to run: ./buzzard.1 1 521: " +echo 1>&2 +./buzzard.1 1 521 +echo 1>&2 + +read -r -n 1 -p "Press any key to run: ./buzzard.1 '1+1' 111: " +echo 1>&2 ./buzzard.1 '1+1' 111 -echo "$ ./buzzard.1 '1+1' 11" 1>&2 +echo 1>&2 + +read -r -n 1 -p "Press any key to run: ./buzzard.1 '1+1' 11: " +echo 1>&2 ./buzzard.1 '1+1' 11 -echo "$ ./buzzard.1 '1+1' 1" 1>&2 +echo 1>&2 + +read -r -n 1 -p "Press any key to run: ./buzzard.1 '1+1' 1: " +echo 1>&2 ./buzzard.1 '1+1' 1 diff --git a/thanks-for-help.md b/thanks-for-help.md index 85a5f5f36..3bb0db57f 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -1500,7 +1500,7 @@ necessary to include `time.h` so Cody did this as well. ## [1992/buzzard.1](/1992/buzzard.1/buzzard.1.c) ([README.md](/1992/buzzard.1/README.md)) -[Cody](#cody) added a check for the right number of args, exiting 1 if not enough (/2) +[Cody](#cody) added a check for the right number of args, exiting 1 if not enough (2) used. This was not originally done but at a time it was changed to be considered a bug so it was fixed at that point as it only took a few seconds and had to be verified that it was consistent with the [bugs.md](/bugs.md) file.