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