Improve 2019/karns/try.sh

This commit is contained in:
Cody Boone Ferguson committed 2024-01-31 09:47:28 -08:00
1 parent fa68875624
commit bbed912243
1 file changed
+6 -3
+6 -3
View File
@@ -16,8 +16,9 @@ make CC="$CC" all >/dev/null || exit 1
clear
# display prog.c to the user
echo "$ cat prog.c"
cat prog.c
read -r -n 1 -p "Press any key to show prog.c (space = next page, q = quit): "
echo 1>&2
less -rEXFK prog.c
# run the program on its own source code
read -r -n 1 -p "Press any key to run: ./prog < prog.c: "
@@ -28,7 +29,9 @@ echo 1>&2
reset
# display maze
echo "$ cat maze"
read -r -n 1 -p "Press any key to run: cat maze: "
echo 1>&2
# Role swap: cat in maze instead of mice
cat maze
# run the program on maze