From c09daf6a7d50368b4118a45daf18eee7be9857c6 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 29 Jan 2024 09:34:40 -0800 Subject: [PATCH] Improve 2015/endoh2/try.sh --- 2015/endoh2/try.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/2015/endoh2/try.sh b/2015/endoh2/try.sh index 243663356..bfa0ad5e7 100755 --- a/2015/endoh2/try.sh +++ b/2015/endoh2/try.sh @@ -15,20 +15,28 @@ make CC="$CC" all >/dev/null || exit 1 # clear screen after compilation so that only the entry is shown clear -echo "$ cat prog.c" 1>&2 +read -r -n 1 -p "Press any key to run: cat prog.c: " +echo 1>&2 cat prog.c echo 1>&2 -echo "$ ./prog | diff -s - prog.c" -./prog | diff -s - prog.c +read -r -n 1 -p "Press any key to run: ./prog: " +echo 1>&2 +./prog echo 1>&2 -echo "$ less -EXF prog.c" 1>&2 -read -r -n 1 -p "Press any key to continue: " +read -r -n 1 -p "Press any key to run: less -rEXFK prog.c: " +echo 1>&2 less -EXF prog.c echo 1>&2 -echo "$ wc -c prog.c" 1>&2 +read -r -n 1 -p "Press any key to run: ./prog | diff -s - prog.c: " +echo 1>&2 +./prog | diff -s - prog.c +echo 1>&2 + +read -r -n 1 -p "Press any key to run: wc -c prog.c: " +echo 1>&2 wc -c prog.c echo 1>&2 echo "Can you figure out the inconsistencies?" 1>&2