From e0dba2f0ca929c969faaecf118f73fe5109f5ed8 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sat, 20 Jan 2024 10:05:01 -0800 Subject: [PATCH] Improve 2004/jdalbec try scripts --- 2004/jdalbec/try.alt.sh | 25 ++++++++++++++++--------- 2004/jdalbec/try.sh | 20 +++++++------------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/2004/jdalbec/try.alt.sh b/2004/jdalbec/try.alt.sh index 5b4a79495..40322a96c 100755 --- a/2004/jdalbec/try.alt.sh +++ b/2004/jdalbec/try.alt.sh @@ -16,24 +16,31 @@ make clobber CC="$CC" alt >/dev/null || exit 1 # clear screen after compilation so that only the entry is shown clear -echo "$ ./jdalbec.alt 11 | head" 1>&2 +read -r -n 1 -p "Press any key to run: ./jdalbec.alt 11 | head: " +echo 1>&2 ./jdalbec.alt 11 | head echo 1>&2 -read -r -n 1 -p "Press any key to continue: " +read -r -n 1 -p "Press any key to run: ./jdalbec.alt 47 | head -n 52572 | grep ':': " echo 1>&2 -echo "$ ./jdalbec.alt 47 | grep : | head -n 52572 | grep :" 1>&2 -./jdalbec.alt 47 | head -n 52572 | grep : +./jdalbec.alt 47 | head -n 52572 | grep ':' echo 1>&2 read -r -n 1 -p "Press any key to set 7 numbers per line: " -make clobber CC="$CC" CDEFINE="-DAg=7" alt >/dev/null || exit 1 +echo 1>&2 +make clobber CC="$CC" Ag=7 alt >/dev/null || exit 1 -echo "$ ./jdalbec.alt 101 | head" 1>&2 +read -r -n 1 -p "Press any key to run: ./jdalbec.alt 101 | head: " +echo 1>&2 ./jdalbec.alt 101 | head echo 1>&2 -read -r -n 1 -p "Press any key to continue: " +read -r -n 1 -p "Press any key to run: ./jdalbec.alt 7 | head -n 47 | grep ':': " +echo 1>&2 +./jdalbec.alt 7 | head -n 47 | grep ':' +echo 1>&2 + +read -r -n 1 -p "Press any key to run: ./jdalbec.alt 1 1 | head: " +echo 1>&2 +./jdalbec.alt 1 1 | head echo 1>&2 -echo "$ ./jdalbec.alt 7 | grep : | head -n 47 | grep :" 1>&2 -./jdalbec.alt 7 | head -n 47 | grep : diff --git a/2004/jdalbec/try.sh b/2004/jdalbec/try.sh index 6a01edaaa..7309f30b5 100755 --- a/2004/jdalbec/try.sh +++ b/2004/jdalbec/try.sh @@ -16,27 +16,21 @@ make CC="$CC" all >/dev/null || exit 1 # clear screen after compilation so that only the entry is shown clear -echo "$ ./jdalbec 11 | head" 1>&2 +read -r -n 1 -p "Press any key to run: ./jdalbec 11 | head: " +echo 1>&2 ./jdalbec 11 | head echo 1>&2 -read -r -n 1 -p "Press any key to continue: " +read -r -n 1 -p "Press any key to run: ./jdalbec 47 | head | grep ':': " echo 1>&2 -echo "$ ./jdalbec 47 | grep : | head | grep :" 1>&2 -./jdalbec 47 | head | grep : +./jdalbec 47 | head | grep ':' echo 1>&2 -read -r -n 1 -p "Press any key to continue: " +read -r -n 1 -p "Press any key to run: ./jdalbec 1 | head: " echo 1>&2 -echo "$ ./jdalbec 1 | head" 1>&2 ./jdalbec 1 | head echo 1>&2 -read -r -n 1 -p "Press any key to continue: " +read -r -n 1 -p "Press any key to run: ./jdalbec 1 1 | head: " echo 1>&2 -echo "$ ./jdalbec 11 | head" 1>&2 -./jdalbec 11 | head -echo 1>&2 - -read -r -n 1 -p "Press any key to continue: " -echo "$ ./jdalbec 1 1 | head" 1>&2 ./jdalbec 1 1 | head +echo 1>&2