Improve 2001/anonymous/try.sh

This commit is contained in:
Cody Boone Ferguson committed 2024-01-19 09:47:53 -08:00
1 parent ea4d465a54
commit a5302b26aa
1 file changed
+44 -15
+44 -15
View File
@@ -19,26 +19,55 @@ clear
TARGET="anonymous.ten"
if [[ -f "$TARGET" ]]; then
echo "$ cp $TARGET anonymous.ten.bak" 1>&2
cp "$TARGET" anonymous.ten.bak
echo "$ ./anonymous $TARGET" 1>&2
./anonymous "$TARGET"
echo "$ ./$TARGET" 1>&2
./"$TARGET"
echo "$ diff -s $TARGET anonymous.ten.bak" 1>&2
read -r -n 1 -p "Press any key to run: cp -vf $TARGET anonymous.ten.bak: "
echo 1>&2
cp -vf "$TARGET" anonymous.ten.bak
echo 1>&2
read -r -n 1 -p "Press any key to run: ./anonymous $TARGET (space = next page, q = quit): "
echo 1>&2
./anonymous "$TARGET" | less -rEXF
echo 1>&2
read -r -n 1 -p "Press any key to run: ./$TARGET (space = next page, q = quit): "
echo 1>&2
./"$TARGET" | less -rEXF
echo 1>&2
read -r -n 1 -p "Press any key to run: diff -s $TARGET anonymous.ten.bak: "
echo 1>&2
diff -s "$TARGET" anonymous.ten.bak
echo "$ od -t x1 $TARGET > ten.od" 1>&2
echo 1>&2
read -r -n 1 -p "Press any key to run: od -t x1 $TARGET > ten.od: "
echo 1>&2
od -t x1 "$TARGET" > ten.od
echo "$ od -t x1 anonymous.ten.bak > ten.bak.od" 1>&2
echo 1>&2
read -r -n 1 -p "Press any key to run: od -t x1 anonymous.ten.bak > ten.bak.od: "
echo 1>&2
od -t x1 anonymous.ten.bak > ten.bak.od
echo "$ diff ten.bak.od ten.od" 1>&2
echo 1>&2
read -r -n 1 -p "Press any key to run: diff ten.bak.od ten.od: "
echo 1>&2
diff ten.bak.od ten.od
echo "$ ./$TARGET > ten.txt" 1>&2
./"$TARGET" > ten.txt
echo "$ ./anonymous.ten.bak > ten.bak.txt" 1>&2
./anonymous.ten.bak > ten.bak.txt
echo "$ diff -s ten.txt ten.bak.txt" 1>&2
echo 1>&2
read -r -n 1 -p "Press any key to run: ./$TARGET | tee ten.txt (space = next page, q = quit): "
echo 1>&2
./"$TARGET" | tee ten.txt | less -rEXF
echo 1>&2
read -r -n 1 -p "Press any key to run: ./anonymous.ten.bak | tee ten.bak.txt (space = next page, q = quit): "
echo 1>&2
./anonymous.ten.bak | tee ten.bak.txt | less -rEXF
echo 1>&2
read -r -n 1 -p "Press any key to run: diff -s ten.txt ten.bak.txt: "
echo 1>&2
diff -s ten.txt ten.bak.txt
echo 1>&2
else
echo "cannot compile anonymous.ten.c as 32-bit, sorry."
echo "will run alt versions directly."