diff --git a/2000/anderson/try.sh b/2000/anderson/try.sh index 88a53a6b7..4a4ffe638 100755 --- a/2000/anderson/try.sh +++ b/2000/anderson/try.sh @@ -25,17 +25,17 @@ echo 1>&2 echo 'Hello, world!' | ./anderson echo 1>&2 -read -r -n 1 -p "Press any key to run: ./anderson < anderson.c: " +read -r -n 1 -p "Press any key to run: ./anderson < anderson.c (space = next page, q = quit): " echo 1>&2 -./anderson < anderson.c +./anderson < anderson.c | less -rEXFK echo 1>&2 -read -r -n 1 -p "Press any key to run: ./anderson < README.md: " +read -r -n 1 -p "Press any key to run: ./anderson < README.md (space = next page, q = quit): " echo 1>&2 -./anderson < README.md +./anderson < README.md | less -rEXFK echo 1>&2 -read -r -n 1 -p "Press any key to run: cat README.md anderson.c | ./anderson: " +read -r -n 1 -p "Press any key to run: cat README.md anderson.c | ./anderson (space = next page, q = quit): " echo 1>&2 -cat README.md anderson.c | ./anderson +cat README.md anderson.c | ./anderson | less -rEXFK echo 1>&2 diff --git a/2000/bmeyer/.gitignore b/2000/bmeyer/.gitignore index a0f369b7d..499ca7f54 100644 --- a/2000/bmeyer/.gitignore +++ b/2000/bmeyer/.gitignore @@ -10,5 +10,6 @@ indent.o lavabus.glic lavabus.glic2 lenna.pgm +michael.glic new.pgm prog.orig diff --git a/2000/bmeyer/Makefile b/2000/bmeyer/Makefile index ea119a6e6..541ea870b 100644 --- a/2000/bmeyer/Makefile +++ b/2000/bmeyer/Makefile @@ -209,7 +209,7 @@ clean: clobber: clean ${RM} -f ${TARGET} ${ALT_TARGET} - ${RM} -rf *.dSYM + ${RM} -rf *.dSYM michael.glic @-if [ -e sandwich ]; then \ ${RM} -f sandwich; \ echo 'ate sandwich'; \ diff --git a/2000/bmeyer/try.sh b/2000/bmeyer/try.sh index aaa4f6869..ee56ad4fe 100755 --- a/2000/bmeyer/try.sh +++ b/2000/bmeyer/try.sh @@ -19,22 +19,13 @@ clear # be determined: we just use a default value. # # try getting the columns the simple way first: tput cols -COLUMNS="$(tputs cols)" -# In this case we might be able to get away with resolving this ShellCheck -# warning: -# -# SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. -# -# but we want to assign the value to COLUMNS and at the same time make sure tput -# worked. Thus we disable this warning. -# -# shellcheck disable=SC2181 -if [[ "$?" -ne 0 ]]; then - # if tput failed for any reason try stty(1) with awk(1): +if ! COLUMNS="$(tput cols)"; then + # if tput failed for any reason try stty(1) with awk(1). + # # Disable this warning of shellcheck as it's wrong: awk needs single quotes. # - # SC2016 (info): Expressions don't expand in single quotes, use double quotes for that. - # + # SC2016 (info): Expressions don't expand in single quotes, use double quotes for that. + # https://www.shellcheck.net/wiki/SC2016 # shellcheck disable=SC2016 COLUMNS="$(stty size|awk '{print $NF}')" diff --git a/2000/briddlebane/README.md b/2000/briddlebane/README.md index 6efefa8fc..b439429d3 100644 --- a/2000/briddlebane/README.md +++ b/2000/briddlebane/README.md @@ -17,6 +17,14 @@ make For some fun every time you log in try running this from your `.bashrc` or equivalent file! +You might also like to try: + +```sh +./try.sh + +INSULTS=15 ./try.sh +``` + ## Judges' remarks: diff --git a/2000/briddlebane/try.sh b/2000/briddlebane/try.sh new file mode 100755 index 000000000..7ea8f61cf --- /dev/null +++ b/2000/briddlebane/try.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# +# try.sh - demonstrate IOCCC winner 2000/briddlebane +# + +# 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 + +[[ -z "$INSULTS" ]] && INSULTS=10 +echo "$INSULTS" | grep -qE '^[0-9]+' +if [[ "${PIPESTATUS[1]}" -ne 0 ]]; then + echo "INSULTS value not a positive number, fix and run again." + exit 1 +fi + +for ((i=0; i<"$INSULTS"; i++)); do + ./briddlebane + sleep 1 +done diff --git a/2000/dhyang/try.sh b/2000/dhyang/try.sh index 1c9470ef8..f2998baba 100755 --- a/2000/dhyang/try.sh +++ b/2000/dhyang/try.sh @@ -23,7 +23,7 @@ echo 1>&2 read -r -n 1 -p "Press any key to run: ./saitou | tee aku.c (space = next page, q = quit): " echo 1>&2 -./saitou | tee aku.c | less -rEXF +./saitou | tee aku.c | less -rEXFK read -r -n 1 -p "Press any key to run: make soku >/dev/null || exit 1: " echo 1>&2 @@ -32,7 +32,7 @@ echo 1>&2 read -r -n 1 -p "Press any key to run: ./soku | tee soku.c (space = next page, q = quit): " echo 1>&2 -./soku | tee soku.c | less -rEXF +./soku | tee soku.c | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: make zan >/dev/null || exit 1: " @@ -42,7 +42,7 @@ echo 1>&2 read -r -n 1 -p "Press any key to run: ./zan | tee zan.c (space = next page, q = quit): " echo 1>&2 -./zan | tee zan.c | less -rEXF +./zan | tee zan.c | less -rEXFK echo 1>&2 read -r -n 1 -p "Press any key to run: make aku >/dev/null || exit 1: " diff --git a/2000/natori/try.alt.sh b/2000/natori/try.alt.sh index f5590e189..23756170c 100755 --- a/2000/natori/try.alt.sh +++ b/2000/natori/try.alt.sh @@ -29,6 +29,11 @@ moon() ./"$NATORI" echo 1>&2 fi + + if [[ "$i" != 10 ]]; then + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 + fi done echo 1>&2 @@ -37,19 +42,39 @@ moon() read -r -n 1 -p "Press any key to alternate between the southern/northern hemisphere Moon: " echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" else read -r -n 1 -p "Press any key to alternate between the northern/southern hemisphere Moon: " echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt fi @@ -61,19 +86,39 @@ moon() read -r -n 1 -p "Press any key to alternate between the southern/northern hemisphere Moon: " echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" else read -r -n 1 -p "Press any key to alternate between the northern/southern hemisphere Moon: " echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt fi diff --git a/2000/natori/try.sh b/2000/natori/try.sh index e5b58237c..698a0ca6c 100755 --- a/2000/natori/try.sh +++ b/2000/natori/try.sh @@ -29,6 +29,10 @@ moon() ./"$NATORI".alt echo 1>&2 fi + if [[ "$i" != 10 ]]; then + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 + fi done echo 1>&2 @@ -37,19 +41,39 @@ moon() read -r -n 1 -p "Press any key to alternate between the northern/southern hemisphere Moon: " echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt else read -r -n 1 -p "Press any key to alternate between the southern/northern hemisphere Moon: " echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" fi @@ -61,19 +85,39 @@ moon() read -r -n 1 -p "Press any key to alternate between the northern/southern hemisphere Moon: " echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt else read -r -n 1 -p "Press any key to alternate between the southern/northern hemisphere Moon: " echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI".alt + read -r -n 1 -p "Press any key to continue: " + echo 1>&2 ./"$NATORI" fi diff --git a/2000/primenum/try.sh b/2000/primenum/try.sh index 53e1f1697..747dbb70e 100755 --- a/2000/primenum/try.sh +++ b/2000/primenum/try.sh @@ -34,11 +34,11 @@ echo 1>&2 read -r -n 1 -p "Press any key to show try.sh.txt (space = next page, q = quit): " echo 1>&2 -less -rEXF try.sh.txt +less -rEXFK try.sh.txt echo 1>&2 echo "$ diff try.sh try.sh.txt" read -r -n 1 -p "Press any key to see diff (space = next page, q = quit): " 1>&2 -diff try.sh try.sh.txt | less -rEXF +diff try.sh try.sh.txt | less -rEXFK rm -f try.sh.txt diff --git a/2000/rince/try.sh b/2000/rince/try.sh index 2ab1eec5e..4921ad757 100755 --- a/2000/rince/try.sh +++ b/2000/rince/try.sh @@ -23,12 +23,11 @@ echo 1>&2 read -r -n 1 -p "Press any key to run: ./rince 0.001 $(./dmy2jd 7.8 1 1610): " echo 1>&2 -# ShellCheck is incorrect about: -# -# SC2046 (warning): Quote this to prevent word splitting. -# -# because we actually want word splitting. +# We actually need word splitting here so we disable the shellcheck warning +# SC2046. # +# SC2046 (warning): Quote this to prevent word splitting. +# https://www.shellcheck.net/wiki/SC2046 # shellcheck disable=SC2046 ./rince 0.001 $(./dmy2jd 7.8 1 1610) echo 1>&2 @@ -48,38 +47,47 @@ echo 1>&2 ./rince 0.01 2441193.6 echo 1>&2 -read -r -n 1 -p "Press any key to run: ./rince 0 $(./dmy2jd 7.8 1 1610): " +read -r -n 1 -p "Press any key to run: ./dmy2jd 7.8 1 1610: " echo 1>&2 -# ShellCheck is incorrect about: -# -# SC2046 (warning): Quote this to prevent word splitting. -# -# because we actually want word splitting. +./dmy2jd 7.8 1 1610 +echo 1>&2 +read -r -n 1 -p "Press any key to run: ./rince 0 \$(./dmy2jd 7.8 1 1610): " +echo 1>&2 +# We actually need word splitting here so we disable the shellcheck warning +# SC2046. # +# SC2046 (warning): Quote this to prevent word splitting. +# https://www.shellcheck.net/wiki/SC2046 # shellcheck disable=SC2046 ./rince 0 $(./dmy2jd 7.8 1 1610) echo 1>&2 -read -r -n 1 -p "Press any key to run: ./rince 0 $(./dmy2jd 8.8 1 1610): " +read -r -n 1 -p "Press any key to run: ./dmy2jd 8.8 1 1610: " echo 1>&2 -# ShellCheck is incorrect about: -# -# SC2046 (warning): Quote this to prevent word splitting. -# -# because we actually want word splitting. +./dmy2jd 8.8 1 1610 +echo 1>&2 +read -r -n 1 -p "Press any key to run: ./rince 0 \$(./dmy2jd 8.8 1 1610): " +echo 1>&2 +# We actually need word splitting here so we disable the shellcheck warning +# SC2046. # +# SC2046 (warning): Quote this to prevent word splitting. +# https://www.shellcheck.net/wiki/SC2046 # shellcheck disable=SC2046 ./rince 0 $(./dmy2jd 8.8 1 1610) echo 1>&2 -read -r -n 1 -p "Press any key to run: ./rince 0 $(./dmy2jd 10.8 1 1610): " +read -r -n 1 -p "Press any key to run: ./dmy2jd 10.8 1 1610: " echo 1>&2 -# ShellCheck is incorrect about: -# -# SC2046 (warning): Quote this to prevent word splitting. -# -# because we actually want word splitting. +./dmy2jd 10.8 1 1610 +echo 1>&2 +read -r -n 1 -p "Press any key to run: ./rince 0 \$(./dmy2jd 10.8 1 1610): " +echo 1>&2 +# We actually need word splitting here so we disable the shellcheck warning +# SC2046. # +# SC2046 (warning): Quote this to prevent word splitting. +# https://www.shellcheck.net/wiki/SC2046 # shellcheck disable=SC2046 ./rince 0 $(./dmy2jd 10.8 1 1610) echo 1>&2 diff --git a/2000/schneiderwent/README.md b/2000/schneiderwent/README.md index 10af15555..fc4cb01f6 100644 --- a/2000/schneiderwent/README.md +++ b/2000/schneiderwent/README.md @@ -28,6 +28,15 @@ paint dry :-) ) you might also try: ./try.sh ``` +Alternatively, you can check on it later on, to see all the entry does. Or if +you wish to make it run faster, you can override how long it sleeps per +iterations and how many iterations it runs. For instance to make it sleep only +30 seconds and run only twice: + +```sh +SLEEP=30 ITERATIONS=2 ./try.sh +``` + ## Judges' remarks: diff --git a/2000/schneiderwent/try.sh b/2000/schneiderwent/try.sh index 5af75696b..54ab3719a 100755 --- a/2000/schneiderwent/try.sh +++ b/2000/schneiderwent/try.sh @@ -6,23 +6,50 @@ # 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 # clear screen after compilation so that only the entry is shown clear -echo "This will take a long time to run to completion: " 1>&2 +# get the number of seconds to sleep in between runs (def: 60) +[[ -z "$SLEEP" ]] && SLEEP=60 +# verify it's a positive number: +echo "$SLEEP" | grep -qE '^[0-9]+' +if [[ "${PIPESTATUS[1]}" -ne 0 ]]; then + echo "SLEEP value not a positive number, fix and run again." + exit 1 +fi +# get the number of iterations to run (default: 60) +[[ -z "$ITERATIONS" ]] && ITERATIONS=60 +# verify it's a positive number: +echo "$ITERATIONS" | grep -qE '^[0-9]+' +if [[ "${PIPESTATUS[1]}" -ne 0 ]]; then + echo "ITERATIONS value not a positive number, fix and run again." + exit 1 +fi + +echo "If you did not override \$SLEEP and \$ITERATIONS this will take a long" 1>&2 +echo "time to run to completion: approximately one hour. If you do not care to" 1>&2 +echo "wait such a long time, which we presume is probably quite likely, you" 1>&2 +echo "you might wish to run this entry like the following: " 1>&2 +echo 1>&2 +echo " ./schneiderwent" 1>&2 +echo " ./schneiderwent schneiderwent.data" 1>&2 +echo 1>&2 +echo "at various times throughout the day, preferably at different" 1>&2 +echo "minutes of the hours." 1>&2 +echo 1>&2 +echo "Alternatively, you can leave this running in a console tab for an hour" 1>&2 +echo "and look back at it later, so that you can see all the entry does." 1>&2 +echo 1>&2 +read -r -n 1 -p "Press any key to start: " +echo 1>&2 i=0 -while [[ "$i" -lt 60 ]]; do +while [[ "$i" -lt "$ITERATIONS" ]]; do ./schneiderwent ./schneiderwent schneiderwent.data - sleep 60 + sleep "$SLEEP" ((i++)) done - - - diff --git a/2000/tomx/.gitignore b/2000/tomx/.gitignore index 231bd3374..0297c8bad 100644 --- a/2000/tomx/.gitignore +++ b/2000/tomx/.gitignore @@ -5,7 +5,9 @@ indent indent.c indent.o mkentry +mkentry.help.txt prog.orig tomx tomx.alt +tomx.help.txt tomx.orig diff --git a/2000/tomx/try.alt.sh b/2000/tomx/try.alt.sh index 114925294..42e826572 100755 --- a/2000/tomx/try.alt.sh +++ b/2000/tomx/try.alt.sh @@ -15,34 +15,49 @@ make CC="$CC" alt >/dev/null || exit 1 # clear screen after compilation so that only the entry is shown clear -echo "Using tomx.alt.c to compile mkentry.c directly:" 1>&2 +read -r -n 1 -p "Press any key to run: rm -v -f mkentry: " +echo 1>&2 +rm -v -f mkentry +echo 1>&2 + read -r -n 1 -p "Press any key to run: chmod +x tomx.alt.c: " echo 1>&2 chmod +x tomx.alt.c echo 1>&2 -read -r -n 1 -p "Press any key to run: rm -vf mkentry: " -echo 1>&2 -rm -vf mkentry -echo 1>&2 - +echo "Using tomx.alt.c as an executable to compile mkentry.c directly:" 1>&2 read -r -n 1 -p "Press any key to run: ./tomx.alt.c: " echo 1>&2 ./tomx.alt.c echo 1>&2 -echo "Using tomx.alt.c as a Makefile to compile mkentry.c:" 1>&2 -read -r -n 1 -p "Press any key to run: rm -vf mkentry: " +read -r -n 1 -p "Press any key to run: ./mkentry -h | tee mkentry.help.txt: " echo 1>&2 -rm -vf mkentry +./mkentry | tee mkentry.help.txt echo 1>&2 +read -r -n 1 -p "Press any key to run: rm -v -f mkentry: " +echo 1>&2 +rm -v -f mkentry +echo 1>&2 + +echo "Using tomx.alt.c as a Makefile to compile mkentry.c:" 1>&2 read -r -n 1 -p "Press any key to run: make -f tomx.alt.c: " echo 1>&2 make -f tomx.alt.c echo 1>&2 -read -r -n 1 -p "Press any key to run: ./tomx.alt: " echo 1>&2 -./tomx.alt +read -r -n 1 -p "Press any key to run: ./tomx.alt (mkentry compiled from tomx.alt.c): " echo 1>&2 +./tomx.alt | tee tomx.help.txt +echo 1>&2 + +read -r -n 1 -p "Press any key to run: diff -s mkentry.help.txt tomx.help.txt: " +echo 1>&2 +diff -s mkentry.help.txt tomx.help.txt +echo 1>&2 + +read -r -n 1 -p "Press any key to remove mkentry.help.txt and tomx.help.txt: " +echo 1>&2 +rm -v -f mkentry.help.txt tomx.help.txt diff --git a/2000/tomx/try.sh b/2000/tomx/try.sh index 5d3a0aeb6..be7bc021d 100755 --- a/2000/tomx/try.sh +++ b/2000/tomx/try.sh @@ -15,15 +15,14 @@ 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: ./tomx: " +read -r -n 1 -p "Press any key to run: ./tomx (compiled from tomx.c): " echo 1>&2 ./tomx echo 1>&2 -echo "Using source code to compile tomx.c: " 1>&2 -read -r -n 1 -p "Press any key to run: rm -vf tomx: " +read -r -n 1 -p "Press any key to run: rm -v -f tomx: " echo 1>&2 -rm -vf tomx +rm -v -f tomx echo 1>&2 read -r -n 1 -p "Press any key to run: chmod +x tomx.c: " @@ -31,27 +30,28 @@ echo 1>&2 chmod +x tomx.c echo 1>&2 +echo "Using source code to compile tomx.c: " 1>&2 read -r -n 1 -p "Press any key to run: ./tomx.c: " echo 1>&2 ./tomx.c echo 1>&2 -read -r -n 1 -p "Press any key to run: ./tomx (a second time): " +read -r -n 1 -p "Press any key to run: ./tomx (compiled by tomx.c as an executable itself): " echo 1>&2 ./tomx echo 1>&2 -echo "Using tomx.c as a Makefile:" 1>&2 -read -r -n 1 -p "Press any key to run: rm -vf tomx: " +read -r -n 1 -p "Press any key to run: rm -v -f tomx: " echo 1>&2 -rm -vf tomx +rm -v -f tomx echo 1>&2 +echo "Using tomx.c as a Makefile:" 1>&2 read -r -n 1 -p "Press any key to run: make -f tomx.c: " echo 1>&2 make -f tomx.c echo 1>&2 -read -r -n 1 -p "Press any key to run: ./tomx (a third time): " +read -r -n 1 -p "Press any key to run: ./tomx (built from tomx.c as a Makefile): " echo 1>&2 ./tomx echo 1>&2 diff --git a/2001/herrmann1/try.sh b/2001/herrmann1/try.sh index 2fdbed0ea..fae36bde6 100755 --- a/2001/herrmann1/try.sh +++ b/2001/herrmann1/try.sh @@ -20,12 +20,12 @@ clear echo "$ ./herrmann1.sh 'prg=herrmann1.times2'" 1>&2 read -r -n 1 -p "Press any key to continue (space = next page, q = quit): " echo 1>&2 -./herrmann1.sh 'prg=herrmann1.times2' +./herrmann1.sh 'prg=herrmann1.times2' | less -rEXFK echo 1>&2 echo "$ ./herrmann1.sh 'prg=herrmann1.gcd'" 1>&2 read -r -n 1 -p "Press any key to continue (space = next page, q = quit): " echo 1>&2 -./herrmann1.sh 'prg=herrmann1.gcd' +./herrmann1.sh 'prg=herrmann1.gcd' | less -rEXFK echo 1>&2 diff --git a/2015/burton/try.sh b/2015/burton/try.sh index ffc6b13c1..5c3b23cd5 100755 --- a/2015/burton/try.sh +++ b/2015/burton/try.sh @@ -28,7 +28,7 @@ echo 1>&2 read -r -n 1 -p "Press any key to run: grep '[0-9]' prog.c || echo \"no digits in prog.c!\": " echo 1>&2 -grep -q '[0-9]' prog.c || echo "no digits in prog.c!" +grep -q '[0-9]' prog.c || echo "no digits found in prog.c!" echo 1>&2 read -r -n 1 -p "Press any key to show calc.in (space = next page, q = quit): " @@ -46,9 +46,15 @@ echo 1>&2 less -rEXFK try.this.txt echo 1>&2 -read -r -n 1 -p "Press any key to run: ./calc < try.this.txt: " +read -r -n 1 -p "Press any key to run: ./calc < try.this.txt (space = net page, q = quit): " +echo 1>&2 +./calc < try.this.txt | less -rEXFK +echo 1>&2 + +read -r -n 1 -p "Press any key to run: ./ecalc < try.this.txt (space = next page, q = quit): " +echo 1>&2 +./ecalc < try.this.txt | less -rEXFK echo 1>&2 -./calc < try.this.txt read -r -n 1 -p "Press any key to run: ./calc 42 # show hex value of 42: " echo 1>&2 diff --git a/thanks-for-help.md b/thanks-for-help.md index 2344f7401..f4f8ef7f9 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -2511,6 +2511,9 @@ terminal. [Cody](#cody) fixed this to compile in systems that require one to explicitly link in `libm`. +Cody also added the [try.sh](/2000/briddlebane/try.sh) script for those who are +feeling a bit too confident, cocky or even happy :-) + ## [2000/dhyang](/2000/dhyang/dhyang.c) ([README.md](/2000/dhyang/README.md]))