Add 2000/schneiderwent/try.sh

This commit is contained in:
Cody Boone Ferguson committed 2024-01-19 09:26:52 -08:00
1 parent bcf5abfd04
commit f7ecec003f
3 files changed
+40

No files matched your search

+7
View File
@@ -21,6 +21,13 @@ make
What's the difference?
If you have a long while to spare (and you're bored enough that you could watch
paint dry :-) ) you might also try:
```sh
./try.sh
```
## Judges' remarks:
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
#
# try.sh - demonstrate IOCCC winner 2000/schneiderwent
#
# make sure CC is set so that when we do make CC="$CC" it isn't empty. Doing it
# this way allows us to have the user specify a different compiler in an easy
# way.
if [[ -z "$CC" ]]; then
CC="cc"
fi
make CC="$CC" all >/dev/null || exit 1
# clear screen after compilation so that only the entry is shown
clear
echo "This will take a long time to run to completion: " 1>&2
i=0
while [[ "$i" -lt 60 ]]; do
./schneiderwent
./schneiderwent schneiderwent.data
sleep 60
((i++))
done