Merge pull request #2195 from xexyl/borsanyi06-try
Fix display problem in 2006/borsanyi/try.sh
This commit is contained in:
8 files changed
+46
-39
No files matched your search
@@ -74,3 +74,18 @@ read -r -n 1 -p "Press any key to run: ./klausler werewolf vampire | head -n 10:
|
||||
echo 1>&2
|
||||
./klausler werewolf vampire | head -n 10
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./klausler dennis ritchie | head -n 10: "
|
||||
echo 1>&2
|
||||
./klausler dennis ritchie | head -n 10
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./klausler ken thompson | head -n 10: "
|
||||
echo 1>&2
|
||||
./klausler ken thompson | head -n 10
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./klausler Linus Torvalds | head -n 10: "
|
||||
echo 1>&2
|
||||
./klausler linus torvalds | head -n 10
|
||||
echo 1>&2
|
||||
+8
-18
@@ -18,21 +18,19 @@ clear
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./mikeash < mikeash.c (space = next page, q = quit): "
|
||||
echo 1>&2
|
||||
./mikeash < mikeash.c
|
||||
./mikeash < mikeash.c | less -rEXFK
|
||||
echo 1>&2
|
||||
|
||||
echo 1>&2
|
||||
echo "The next command should print nothing." 1>&2
|
||||
read -r -n 1 -p "Press any key to run: ./mikeash < mikeash.c | diff - mikeash.c: "
|
||||
read -r -n 1 -p "Press any key to run: ./mikeash < mikeash.c | diff -s - mikeash.c: "
|
||||
echo 1>&2
|
||||
# ShellCheck is incorrect here:
|
||||
#
|
||||
# SC2094 (info): Make sure not to read and write the same file in the same pipeline.
|
||||
#
|
||||
# so we disable it.
|
||||
|
||||
# We're not reading and writing to the same file at all.
|
||||
#
|
||||
# SC2094 (info): Make sure not to read and write the same file in the same pipeline.
|
||||
# https://www.shellcheck.net/wiki/SC2094
|
||||
# shellcheck disable=SC2094
|
||||
./mikeash < mikeash.c | diff - mikeash.c
|
||||
./mikeash < mikeash.c | diff -s - mikeash.c
|
||||
echo 1>&2
|
||||
|
||||
echo "For the next two commands we will add a newline after the command's output" 1>&2
|
||||
@@ -45,15 +43,7 @@ echo '(format t "~s" (+ 2 2 ))' | ./mikeash
|
||||
echo 1>&2
|
||||
|
||||
echo "The next command will evaluate the expression: (2+2) * (5 - 9/3), giving 8\"." 1>&2
|
||||
|
||||
# ShellCheck warns:
|
||||
#
|
||||
# SC2140 (warning): Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?
|
||||
#
|
||||
# ShellCheck is wrong.
|
||||
#
|
||||
# shellcheck disable=SC2140
|
||||
read -r -n 1 -p "Press any key to run: echo '(format t "~s" (* (+ 2 2 ) (- 5 (/ 9 3 ))))' | ./mikeash: "
|
||||
read -r -n 1 -p "Press any key to run: echo '(format t \"~s\" (* (+ 2 2 ) (- 5 (/ 9 3 ))))' | ./mikeash: "
|
||||
echo 1>&2
|
||||
echo '(format t "~s" (* (+ 2 2 ) (- 5 (/ 9 3 ))))' | ./mikeash
|
||||
echo 1>&2
|
||||
@@ -1,11 +1,10 @@
|
||||
#
|
||||
# sort with: ../../bin/sgi
|
||||
*.dSYM
|
||||
foo.gif
|
||||
*.gif
|
||||
indent
|
||||
indent.c
|
||||
indent.o
|
||||
persano
|
||||
persano.orig
|
||||
prog.orig
|
||||
seal.gif
|
||||
@@ -207,7 +207,7 @@ clean:
|
||||
|
||||
clobber: clean
|
||||
${RM} -f ${TARGET} ${ALT_TARGET}
|
||||
${RM} -rf *.dSYM
|
||||
${RM} -rf *.dSYM *.gif
|
||||
@-if [ -e sandwich ]; then \
|
||||
${RM} -f sandwich; \
|
||||
echo 'ate sandwich'; \
|
||||
|
||||
@@ -24,6 +24,7 @@ if [[ -f knot3-16.gif ]]; then
|
||||
echo "Now open the file knot3-16.gif in a GIF viewer capable of viewing animated" 1>&2
|
||||
echo "GIFs. See the README.md for details on a tool to manipulate it, if you wish." 1>&2
|
||||
fi
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./persano 3 2 1 > foo.gif: "
|
||||
echo 1>&2
|
||||
@@ -33,6 +34,7 @@ if [[ -f foo.gif ]]; then
|
||||
echo "Now open the file foo.gif in a GIF viewer capable of viewing animated" 1>&2
|
||||
echo "GIFs. See the README.md for details on a tool to manipulate it, if you wish." 1>&2
|
||||
fi
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./persano 5 2 > seal.gif: "
|
||||
echo 1>&2
|
||||
@@ -43,3 +45,4 @@ if [[ -f seal.gif ]]; then
|
||||
echo "Now open seal.gif (Solomon's Seal knot) in a GIF viewer capable of viewing" 1>&2
|
||||
echo "animated GIFs. See the README.md for details on a tool to manipulate it, if you wish." 1>&2
|
||||
fi
|
||||
echo 1>&2
|
||||
+3
-4
@@ -3,15 +3,14 @@
|
||||
# try.sh - demonstrate IOCCC winner 2005/timwi
|
||||
#
|
||||
# This only does one thing and that is from the judges. This is because
|
||||
# brainfuck has too much potential to knacker the brain.
|
||||
# brainfuck has too much potential to knacker the brain so we don't try.sh to
|
||||
# make it worse :-)
|
||||
#
|
||||
|
||||
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
|
||||
# this way allows us to have the user specify a different compiler in an easy
|
||||
# way.
|
||||
if [[ -z "$CC" ]]; then
|
||||
CC="cc"
|
||||
fi
|
||||
[[ -z "$CC" ]] && CC="cc"
|
||||
|
||||
make CC="$CC" all >/dev/null || exit 1
|
||||
|
||||
|
||||
+14
-14
@@ -15,67 +15,67 @@ make CC="$CC" all >/dev/null || exit 1
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./birken < adder.tofu 2>/dev/null: "
|
||||
read -r -n 1 -p "Press any key to run: ./birken < adder.tofu: "
|
||||
echo 1>&2
|
||||
./birken < adder.tofu 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./birken < buffer.tofu 2>/dev/null: "
|
||||
read -r -n 1 -p "Press any key to run: ./birken < buffer.tofu: "
|
||||
echo 1>&2
|
||||
./birken < buffer.tofu 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./birken < computer.tofu 2>/dev/null (space = next page, q = quit): "
|
||||
read -r -n 1 -p "Press any key to run: ./birken < computer.tofu (space = next page, q = quit): "
|
||||
echo 1>&2
|
||||
./birken < computer.tofu 2>/dev/null | less -rEXF
|
||||
./birken < computer.tofu 2>/dev/null | less -rEXFK
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./birken < counter.tofu 2>/dev/null: "
|
||||
read -r -n 1 -p "Press any key to run: ./birken < counter.tofu: "
|
||||
echo 1>&2
|
||||
./birken < counter.tofu 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./birken < divider.tofu 2>/dev/null: "
|
||||
read -r -n 1 -p "Press any key to run: ./birken < divider.tofu: "
|
||||
echo 1>&2
|
||||
./birken < divider.tofu 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./birken < lfsr.tofu 2>/dev/null: "
|
||||
read -r -n 1 -p "Press any key to run: ./birken < lfsr.tofu: "
|
||||
echo 1>&2
|
||||
./birken < lfsr.tofu 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./birken < memory.tofu 2>/dev/null: "
|
||||
read -r -n 1 -p "Press any key to run: ./birken < memory.tofu: "
|
||||
echo 1>&2
|
||||
./birken < memory.tofu 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./birken < multiplier.tofu 2>/dev/null: "
|
||||
read -r -n 1 -p "Press any key to run: ./birken < multiplier.tofu: "
|
||||
echo 1>&2
|
||||
./birken < multiplier.tofu 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./birken < multiplier2.tofu 2>/dev/null: "
|
||||
read -r -n 1 -p "Press any key to run: ./birken < multiplier2.tofu: "
|
||||
echo 1>&2
|
||||
./birken < multiplier2.tofu 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./birken < oneline.tofu 2>/dev/null: "
|
||||
read -r -n 1 -p "Press any key to run: ./birken < oneline.tofu: "
|
||||
echo 1>&2
|
||||
./birken < oneline.tofu 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./birken < shift.tofu 2>/dev/null: "
|
||||
read -r -n 1 -p "Press any key to run: ./birken < shift.tofu: "
|
||||
echo 1>&2
|
||||
./birken < shift.tofu 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./birken < zuse.tofu 2>/dev/null: "
|
||||
read -r -n 1 -p "Press any key to run: ./birken < zuse.tofu: "
|
||||
echo 1>&2
|
||||
./birken < zuse.tofu 2>/dev/null
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./birken < zuse2.tofu 2>/dev/null: "
|
||||
read -r -n 1 -p "Press any key to run: ./birken < zuse2.tofu: "
|
||||
echo 1>&2
|
||||
./birken < zuse2.tofu 2>/dev/null
|
||||
echo 1>&2
|
||||
@@ -41,6 +41,7 @@ while :; do
|
||||
fi
|
||||
fi
|
||||
read -r -n 1 -p "Do you wish to make another one (Y/N)? "
|
||||
echo 1>&2
|
||||
if [[ "$REPLY" != "Y" && "$REPLY" != "y" ]]; then
|
||||
break
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user