Improve 2013/endoh1/try.sh

This commit is contained in:
Cody Boone Ferguson committed 2024-01-26 11:33:18 -08:00
1 parent 1adcbf82eb
commit 7cd46f8e53
1 file changed
+7 -6
+7 -6
View File
@@ -17,12 +17,12 @@ clear
read -r -n 1 -p "Press any key to run: less endoh1.c (space = next page, q = quit): "
echo 1>&2
less -EXF endoh1.c
less -rEXFK endoh1.c
echo 1>&2
read -r -n 1 -p "Press any key to run: ./endoh1 hello.lazy: "
read -r -n 1 -p "Press any key to run: ./endoh1 hello.lazy (space = next page, q = quit): "
echo 1>&2
./endoh1 hello.lazy
./endoh1 hello.lazy | less -rEXFK
echo 1>&2
read -r -n 1 -p "Press any key to run: ./hello: "
@@ -35,12 +35,13 @@ echo 1>&2
# ShellCheck gets this wrong, thinking ./echo is the shell built-in or system
# command so we disable the warning.
#
# ^----^ SC2216 (warning): Piping to 'echo', a command that doesn't read stdin. Did you want 'cat' instead?
# SC2216 (warning): Piping to 'echo', a command that doesn't read stdin. Did you want 'cat' instead?
# https://www.shellcheck.net/wiki/SC2216
# shellcheck disable=SC2216
echo Hello | ./echo
echo 1>&2
read -r -n 1 -p "Press any key to run: ./tac < endoh1.c | less (space = next page, q = quit): "
read -r -n 1 -p "Press any key to run: ./tac < endoh1.c (space = next page, q = quit): "
echo 1>&2
./tac < endoh1.c | less -EXF
./tac < endoh1.c | less -rEXFK
echo 1>&2