Improve 2015/mills2/try.sh

This commit is contained in:
Cody Boone Ferguson committed 2024-01-29 10:28:11 -08:00
1 parent e67bc64d9c
commit d39aebcb0e
1 file changed
+24 -20
+24 -20
View File
@@ -15,47 +15,51 @@ make CC="$CC" all >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
echo "$ printf '000I\236\f\31H\260\240\301\203' > ioccc.Z" 1>&2
read -r -n 1 -p "Press any key to run: printf '000I\236\f\31H\260\240\301\203' > ioccc.Z: "
echo 1>&2
printf '000I\236\f\31H\260\240\301\203' > ioccc.Z
echo 1>&2
echo "$ ./prog ioccc.Z" 1>&2
read -r -n 1 -p "Press any key to run: ./prog ioccc.Z: "
echo 1>&2
./prog ioccc.Z
echo 1>&2
echo "$ dd bs=512 count=128 < /dev/urandom > test1" 1>&2
read -r -n 1 -p "Press any key to run: dd bs=512 count=128 < /dev/urandom > test1: "
echo 1>&2
dd bs=512 count=128 < /dev/urandom > test1
echo 1>&2
echo "$ compress < test1 > test1.Z" 1>&2
read -r -n 1 -p "Press any key to run: compress < test1 > test1.Z: "
echo 1>&2
compress < test1 > test1.Z
echo 1>&2
echo "$ time ./prog test1.Z | cmp - test1" 1>&2
time ./prog test1.Z | cmp - test1
read -r -n 1 -p "Press any key to run: time ./prog test1.Z | diff -s - test1: "
echo 1>&2
time ./prog test1.Z | diff -s - test1
echo 1>&2
echo "$ dd bs=512 count=128 < /dev/zero > test2" 1>&2
read -r -n 1 -p "Press any key to run: dd bs=512 count=128 < /dev/zero > test2: "
echo 1>&2
dd bs=512 count=128 < /dev/zero > test2
echo 1>&2
echo "$ compress < test2 > test2.Z" 1>&2
read -r -n 1 -p "Press any key to run: compress < test2 > test2.Z: "
echo 1>&2
compress < test2 > test2.Z
echo 1>&2
echo "$ time ./prog test2.Z | cmp - test2" 1>&2
time ./prog test2.Z | cmp - test2
read -r -n 1 -p "Press any key to run: time ./prog test2.Z | diff -s - test2: "
echo 1>&2
time ./prog test2.Z | diff -s - test2
echo 1>&2
read -r -n 1 -p "Press any key to run: ./prog ioccc_guidelines.txt.Z (space = next page, q = quit): "
echo 1>&2
./prog ioccc_guidelines.txt.Z | less -rEXFK
echo 1>&2
echo "$ ./prog ioccc_guidelines.txt.Z" 1>&2
read -r -n 1 -p "Press any key to continue (space = next page, q = quit): "
read -r -n 1 -p "Press any key to run: ./prog ioccc_rules.txt.Z (space = next page, q = quit): "
echo 1>&2
./prog ioccc_guidelines.txt.Z | less -EXF
echo 1>&2
echo "$ ./prog ioccc_rules.txt.Z" 1>&2
read -r -n 1 -p "Press any key to continue (space = next page, q = quit): "
echo 1>&2
./prog ioccc_rules.txt.Z | less -EXF
./prog ioccc_rules.txt.Z | less -rEXFK