From 27ba4879a10197ebf45e8d769e4fe3785891e475 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sat, 13 Jan 2024 10:22:32 -0800 Subject: [PATCH] Improve 1992/nathan/try.sh --- 1992/nathan/try.sh | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/1992/nathan/try.sh b/1992/nathan/try.sh index 44a7090ee..4e9860c6f 100755 --- a/1992/nathan/try.sh +++ b/1992/nathan/try.sh @@ -13,14 +13,31 @@ make CC="$CC" all >/dev/null || exit 1 # clear screen after compilation so that only the entry is shown clear -echo "$ ./nathan obfuscate < nathan.c > foobarf.c" 1>&2 +read -r -n 1 -p "Press any key to run: ./nathan obfuscate < nathan.c > foobarf.c: " +echo 1>&2 ./nathan obfuscate < nathan.c > foobarf.c +echo 1>&2 -echo "$ ./nathan - obfuscate < foobarf.c > barfoof.c" 1>&2 +read -r -n 1 -p "Press any key to show foobarf.c (space = next page, q = quit): " +echo 1>&2 +less -rEXF foobarf.c +echo 1>&2 + +read -r -n 1 -p "Press any key to run: ./nathan - obfuscate < foobarf.c > barfoof.c: " +echo 1>&2 ./nathan - obfuscate < foobarf.c > barfoof.c +echo 1>&2 -echo "$ diff nathan.c barfoof.c" 1>&2 +read -r -n 1 -p "Press any key to show barfoof.c (space = next page, q = quit): " +echo 1>&2 +less -rEXF barfoof.c +echo 1>&2 + +read -r -n 1 -p "Press any key to run: diff -s nathan.c barfoof.c: " +echo 1>&2 diff -s nathan.c barfoof.c +echo 1>&2 -echo "$ echo 'IOCCC 1992 winner nathan' | ./nathan" 1>&2 +read -r -n 1 -p "Press any key to run: echo 'IOCCC 1992 winner nathan' | ./nathan: " +echo 1>&2 echo 'IOCCC 1992 winner nathan' | ./nathan