Add 2006/grothe/try.sh
After each command it prompts if you wish to resume as some people (including myself) might find that only one file is enough.
This commit is contained in:
1 parent
cf62d3ab94
commit
e500f94445
3 files changed
+57
-10
No files matched your search
+4
-10
@@ -14,21 +14,15 @@ make
|
||||
|
||||
## Try:
|
||||
|
||||
Put on your "electronic ears" and then try:
|
||||
|
||||
```sh
|
||||
./grothe 65000000 10000000 1344 < twinkle.txt
|
||||
./try.sh
|
||||
```
|
||||
|
||||
... and then put on your "electronic ears". You may find using
|
||||
You may find using
|
||||
a tunable scanning electronic ear helps.
|
||||
|
||||
There are other text files you may wish to try:
|
||||
|
||||
```sh
|
||||
./grothe 65000000 10000000 1344 < arabian.txt
|
||||
./grothe 65000000 10000000 1344 < olympics.txt
|
||||
./grothe 65000000 10000000 1344 < test.txt
|
||||
```
|
||||
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - demonstrate IOCCC winner 2006/grothe
|
||||
#
|
||||
|
||||
# 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
|
||||
|
||||
resume()
|
||||
{
|
||||
echo 1>&2
|
||||
read -r -n 1 -p "Do you wish to continue (Y/N)? "
|
||||
if [[ "$REPLY" != "y" && "$REPLY" != "Y" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./grothe 65000000 10000000 1344 < twinkle.txt: "
|
||||
echo 1>&2
|
||||
./grothe 65000000 10000000 1344 < twinkle.txt
|
||||
resume
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./grothe 65000000 10000000 1344 < arabian.txt: "
|
||||
echo 1>&2
|
||||
./grothe 65000000 10000000 1344 < arabian.txt
|
||||
resume
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./grothe 65000000 10000000 1344 < olympics.txt: "
|
||||
echo 1>&2
|
||||
./grothe 65000000 10000000 1344 < olympics.txt
|
||||
resume
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to run: ./grothe 65000000 10000000 1344 < test.txt: "
|
||||
echo 1>&2
|
||||
./grothe 65000000 10000000 1344 < test.txt
|
||||
echo 1>&2
|
||||
Reference in new issue
Block a user