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:
|
## Try:
|
||||||
|
|
||||||
|
Put on your "electronic ears" and then try:
|
||||||
|
|
||||||
```sh
|
```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.
|
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:
|
## 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
|
||||||
@@ -3418,6 +3418,11 @@ Cody also added the [try.sh](/2006/birken/try.sh) script.
|
|||||||
implicitly linked in.
|
implicitly linked in.
|
||||||
|
|
||||||
|
|
||||||
|
## <a name="2006_grothe"></a>[2006/grothe](/2006/grothe/grothe.c) ([README.md](/2006/grothe/README.md))
|
||||||
|
|
||||||
|
[Cody](#cody) added the [try.sh](/2006/grothe/try.sh) script.
|
||||||
|
|
||||||
|
|
||||||
## <a name="2006_hamre"></a>[2006/hamre](/2006/hamre/hamre.c) ([README.md](/2006/hamre/README.md))
|
## <a name="2006_hamre"></a>[2006/hamre](/2006/hamre/hamre.c) ([README.md](/2006/hamre/README.md))
|
||||||
|
|
||||||
[Cody](#cody) fixed this so that it will not crash without an arg after it was suggested
|
[Cody](#cody) fixed this so that it will not crash without an arg after it was suggested
|
||||||
|
|||||||
Reference in new issue
Block a user