Slightly improve 1992/buzzard.1/try.sh

This commit is contained in:
Cody Boone Ferguson committed 2024-01-13 10:54:25 -08:00
1 parent b639167e03
commit 543b250815
2 files changed
+23 -9

No files matched your search

+22 -8
View File
@@ -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
+1 -1
View File
@@ -1500,7 +1500,7 @@ necessary to include `time.h` so Cody did this as well.
## <a name="1992_buzzard.1"></a>[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.