Add 2020/carlini/try.sh, update bugs.md

Why a try.sh for this? It shows that you can also automate the play (it
happens to come from the author's remarks, however, so there's that
too). Then it tells you to be serious by playing with a friend, either
real or imagined, rather than doing something so silly.

Update bugs.md with a INABIAF section.

The README.md file has been format/typo checked.
This commit is contained in:
Cody Boone Ferguson committed 2023-12-20 13:42:13 -08:00
1 parent 67b09c403a
commit 3bf3ac7024
4 files changed
+116 -43

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
#
# try.sh - demonstrate IOCCC winner 2020/carlini
#
# 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
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: echo 1 2 3 4 5 6 7 | ./prog: "
echo 1>&2
echo 1 2 3 4 5 6 7 | ./prog
echo 1>&2
echo "... now go and play for real, with a friend, real or imagined." 1>&2