Alt code/try scripts added to 2004/jdalbec

The alt code allows one to set how many numbers to print on a line
before adding a line break. This is done because the more numbers that
there are the harder it is to see where it 'belongs'. Defaults to 11
(protons, salt) but the macro name is Ag, silver (because silver is my
favourite precious metal, it wasn't used already and it allowed for some
irony in the alt build section).

The try.alt.sh script uses the alt code.

The try.sh script uses the fixed code (fixes I made quite a while back).

The bugs.md has had INAFIAB section added to this entry.

The README.md file has been format/typo checked.

This should complete the review of 2004/jdalbec.
This commit is contained in:
Cody Boone Ferguson committed 2023-11-19 09:53:30 -08:00
1 parent bd05727ce7
commit 05b41b922e
8 files changed
+409 -9

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
#
# try.sh - demonstrate IOCCC winner 2004/jdalbec
#
# 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
# start out with default 11
make CC="$CC" all >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
echo "$ ./jdalbec 11 | head" 1>&2
./jdalbec 11 | head
echo 1>&2
read -r -n 1 -p "Press any key to continue: "
echo 1>&2
echo "$ ./jdalbec 47 | grep : | head | grep :" 1>&2
./jdalbec 47 | head | grep :
echo 1>&2
read -r -n 1 -p "Press any key to continue: "
echo 1>&2
echo "$ ./jdalbec 1 | head" 1>&2
./jdalbec 1 | head
echo 1>&2
read -r -n 1 -p "Press any key to continue: "
echo 1>&2
echo "$ ./jdalbec 11 | head" 1>&2
./jdalbec 11 | head
echo 1>&2
read -r -n 1 -p "Press any key to continue: "
echo "$ ./jdalbec 1 1 | head" 1>&2
./jdalbec 1 1 | head