Improve 2013/misaka/try.sh

Use both long_cat and same_as_long_cat, redirecting to a text file each,
and then using diff -s on them to show they're the same.
This commit is contained in:
Cody Boone Ferguson committed 2023-12-03 04:40:04 -08:00
1 parent f7c5f0cbc2
commit a8b8cd2883
2 files changed
+17

No files matched your search

+2
View File
@@ -1,5 +1,6 @@
horizontal_cat
long_cat
long_cat.txt
long_faat_cat
long_fat_cat
loong_cat
@@ -15,6 +16,7 @@ misaka7.c
misaka8.c
misaka9.c
same_as_long_cat
same_as_long_cat.txt
vertical_cat
misaka.orig
prog.orig
+15
View File
@@ -25,6 +25,21 @@ echo 1>&2
./long_cat
echo 1>&2
rm -f long_cat.txt same_as_long_cat.txt
read -r -n 1 -p "Press any key to run: ./long_cat > long_cat.txt: "
echo 1>&2
./long_cat > long_cat.txt
echo 1>&2
read -r -n 1 -p "Press any key to run: ./same_as_long_cat > same_as_long_cat.txt: "
echo 1>&2
./same_as_long_cat > same_as_long_cat.txt
echo 1>&2
read -r -n 1 -p "Press any key to run: diff -s long_cat.txt same_as_long_cat.txt: "
echo 1>&2
diff -s long_cat.txt same_as_long_cat.txt
echo 1>&2
read -r -n 1 -p "Press any key to run: ./long_faat_cat: "
echo 1>&2
./long_faat_cat