Improve 2015/burton/try.sh

The thanks file was updated slightly but it still needs some work. This
will have to happen another time.
This commit is contained in:
Cody Boone Ferguson committed 2024-01-29 08:59:08 -08:00
1 parent 4210888212
commit e494259c75
2 files changed
+32 -21

No files matched your search

+29 -18
View File
@@ -15,41 +15,52 @@ make CC="$CC" all >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
echo "$ ./calc '?0x3343<<2'" 1>&2
read -r -n 1 -p "Press any key to run: ./calc '?0x3343<<2': "
echo 1>&2
./calc '?0x3343<<2'
echo 1>&2
echo "$ echo '?0x3343<<2' | ./ecalc" 1>&2
read -r -n 1 -p "Press any key to run: echo '?0x3343<<2' | ./ecalc: "
echo 1>&2
echo '?0x3343<<2' | ./ecalc
echo "$ grep '[0-9]' prog.c" 1>&2
read -r -n 1 -p "Press any key to continue (notice how there are no digits!): "
echo 1>&2
grep -c '[0-9]' prog.c
read -r -n 1 -p "Press any key to run: ./calc < test.in: "
echo 1>&2
./calc < test.in
echo 1>&2
read -r -n 1 -p "Press any key to show try.this.txt: "
read -r -n 1 -p "Press any key to run: grep '[0-9]' prog.c || echo \"no digits in prog.c!\": "
echo 1>&2
cat try.this.txt
grep -q '[0-9]' prog.c || echo "no digits in prog.c!"
echo 1>&2
read -r -n 1 -p "Press any key to show calc.in (space = next page, q = quit): "
echo 1>&2
less -rEXFK test.in
echo 1>&2
read -r -n 1 -p "Press any key to run: ./calc < test.in (space = next page, q = quit): "
echo 1>&2
./calc < test.in | less -rEXFK
echo 1>&2
read -r -n 1 -p "Press any key to show try.this.txt (space = next page, q = quit): "
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: "
echo 1>&2
./calc < try.this.txt
read -r -n 1 -p "Press any key to show the hex value of 42: "
read -r -n 1 -p "Press any key to run: ./calc 42 # show hex value of 42: "
echo 1>&2
echo "$ ./calc 42" 1>&2
./calc 42
echo 1>&2
read -r -n 1 -p "Press any key to run: ./calc '1<<22-1' (show mask value for 22 bits): "
read -r -n 1 -p "Press any key to run: ./calc '1<<22-1' # show mask value for 22 bits: "
echo 1>&2
./calc '1<<22-1'
echo 1>&2
read -r -n 1 -p "Press any key to run: ./calc ?0x11223344 (byte-swapped value of 0x11223344): "
read -r -n 1 -p "Press any key to run: ./calc ?0x11223344 # byte-swapped value of 0x11223344: "
echo 1>&2
./calc ?0x11223344
echo 1>&2