Improve scripts of 2013/dlowe

The try.sh script cannot be modified to prompt the user to run commands
as the other scripts (or at least one, diff.sh) make use of tail(1) on
the output. The script diff.sh however can have that and it has been
done.

Minor fixes in display in slflen.sh.
This commit is contained in:
Cody Boone Ferguson committed 2024-01-26 11:28:56 -08:00
1 parent 3319013864
commit 1adcbf82eb
2 files changed
+17 -7

No files matched your search

+15 -7
View File
@@ -11,12 +11,20 @@ if [[ -z "$CC" ]]; then
fi
make CC="$CC" all >/dev/null || exit 1
echo "$ ./try.sh | tail -n 3 > 1.txt" 1>&2
./try.sh | tail -n 3 > 1.txt
read -r -n 1 -p "Press any key to run: ./try.sh | tail -n 3 | tee 1.txt: "
./try.sh | tail -n 3 | tee 1.txt
echo "$ echo 'IOCCC winning entry 2013/dlowe' > ioccc.txt" 1>&2
echo 'IOCCC winning entry 2013/dlowe' > ioccc.txt
echo "$ ./try.sh | tail -n 3 > 2.txt" 1>&2
./try.sh | tail -n 3 > 2.txt
echo "$ diff 1.txt 2.txt" 1>&2
diff 1.txt 2.txt
read -r -n 1 -p "Press any key to run: echo 'IOCCC winning entry 2013/dlowe' | tee ioccc.txt: "
echo 1>&2
echo 'IOCCC winning entry 2013/dlowe' | tee ioccc.txt
read -r -n 1 -p "Press any key to run: ./try.sh | tail -n 3 | tee 2.txt: "
echo 1>&2
./try.sh | tail -n 3 | tee 2.txt
echo 1>&2
read -r -n 1 -p "Press any key to run: diff -s 1.txt 2.txt: "
echo 1>&2
diff -s 1.txt 2.txt
rm -f 1.txt 2.txt ioccc.txt
+2
View File
@@ -15,5 +15,7 @@ make CC="$CC" all >/dev/null || exit 1
ln -sf dlowe sparkl
ls -1 *
echo 1>&2
echo -n "sparkline length of above files: "
wc -c ./* | awk '{print $1}' | xargs ./sparkl
echo 1>&2