diff --git a/2018/ciura/README.md b/2018/ciura/README.md index 5cc430d9f..dfae12eaa 100644 --- a/2018/ciura/README.md +++ b/2018/ciura/README.md @@ -19,8 +19,7 @@ below for more details. ## Try: ```sh -./prog < Makefile -./prog < README.md +./try.sh ``` @@ -43,6 +42,16 @@ make alt Use `prog.alt` as you would `prog` above. +### Alternate try: + +```sh +./try.alt.sh +``` + +Do you spot the fix by running both [try.sh](try.sh) and +[try.alt.sh](try.alt.sh)? + + ## Judges' remarks: This text was processed by `prog`. You may get confused. We're not really sure: diff --git a/2018/ciura/try.alt.sh b/2018/ciura/try.alt.sh new file mode 100755 index 000000000..1b731011e --- /dev/null +++ b/2018/ciura/try.alt.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +# +# try.alt.sh - demonstrate IOCCC winner 2018/ciura alt code +# + +# 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" alt >/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: ./prog.alt < Makefile: " +echo 1>&2 +./prog.alt < Makefile +echo 1>&2 + +read -r -n 1 -p "Press any key to run: ./prog.alt < README.md: " +echo 1>&2 +./prog.alt < README.md + +exit 0 diff --git a/thanks-for-help.md b/thanks-for-help.md index feb379284..2344f7401 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -4417,7 +4417,8 @@ Finally Cody added the [try.sh](/2018/burton2/try.sh) script. ## [2018/ciura](/2018/ciura/prog.c) ([README.md](/2018/ciura/README.md)) -[Cody](#cody) added the [try.sh](/2018/ciura/try.sh) script and the PDF file, +[Cody](#cody) added the [try.sh](/2018/ciura/try.sh) and +[try.alt.sh](/2018/ciura/try.alt.sh) scripts and the PDF file, [lexicon.pdf](/2018/ciura/lexicon.pdf), that was a dead link, restored from the Internet Wayback Machine.