diff --git a/2001/anonymous/try.sh b/2001/anonymous/try.sh index 5a91b07d3..1ca7ba798 100755 --- a/2001/anonymous/try.sh +++ b/2001/anonymous/try.sh @@ -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."