Add 2015/burton/try.sh + format/typo checks

Renamed road.to.obscurity road.to.obscurity.md and make it markdown
format.

Add try.sh and try.this.txt which the script uses.

Format check README.md file, road.to.obscurity.md, spoilers.md.

The man pages have not been typo checked yet. The try.sh script might be
improved and there is another issue that is pending that prevents
completion of this entry (or potentially does) but it is mostly
complete.
This commit is contained in:
Cody Boone Ferguson committed 2023-12-09 12:17:24 -08:00
1 parent 4d0b3a25fc
commit 47874d3820
8 files changed
+252 -179

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
#!/usr/bin/env bash
#
# try.sh - demonstrate IOCCC winner 2015/burton
#
# 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
echo "$ ./prog '?0x3343<<2'" 1>&2
./prog '?0x3343<<2'
echo "$ echo '?0x3343<<2' | ./prog" 1>&2
echo '?0x3343<<2' | ./prog
echo "$ grep '[0-9]' prog.c" 1>&2
read -r -n 1 -p "Press any key to continue (notice how there are no digits!): "
echo 1>&2
grep -c '[0-9]' prog.c
read -r -n 1 -p "Press any key to run: ./prog < test.in: "
echo 1>&2
./prog < test.in
echo 1>&2
read -r -n 1 -p "Press any key to show try.this.txt: "
echo 1>&2
cat try.this.txt
echo 1>&2
read -r -n 1 -p "Press any key to run: ./prog < try.this.txt: "
echo 1>&2
./prog < try.this.txt
read -r -n 1 -p "Press any key to show the hex value of 42: "
echo 1>&2
echo "$ ./prog 42" 1>&2
./prog 42