Add 1995/schnitzi/try.sh
This commit is contained in:
1 parent
78fdf606f2
commit
2558cbb5a8
3 files changed
+42
-3
No files matched your search
@@ -15,9 +15,7 @@ make all
|
|||||||
## Try:
|
## Try:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./schnitzi 24
|
./try.sh
|
||||||
./schnitzi 18
|
|
||||||
./schnitzi 30
|
|
||||||
```
|
```
|
||||||
|
|
||||||
WARNING: the author warns to not use too high a number! If you wish to ignore
|
WARNING: the author warns to not use too high a number! If you wish to ignore
|
||||||
|
|||||||
Executable
+36
@@ -0,0 +1,36 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# try.sh - demonstrate IOCCC winner 1995/schnitzi
|
||||||
|
#
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: ./schnitzi 24 (space = next page, q = quit): "
|
||||||
|
echo 1>&2
|
||||||
|
./schnitzi 24 | less -rEXF
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: ./schnitzi 18 (space = next page, q = quit): "
|
||||||
|
echo 1>&2
|
||||||
|
./schnitzi 18 | less -rEXF
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
read -r -n 1 -p "Press any key to run: ./schnitzi 30 (space = next page, q = quit): "
|
||||||
|
echo 1>&2
|
||||||
|
./schnitzi 30 | less -rEXF
|
||||||
|
echo 1>&2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -2074,6 +2074,11 @@ calls which has the four args.
|
|||||||
[Cody](#cody) added the [try.sh](/1995/savastio/try.sh) script.
|
[Cody](#cody) added the [try.sh](/1995/savastio/try.sh) script.
|
||||||
|
|
||||||
|
|
||||||
|
## <a name="1995_schnitzi"></a>[1995/schnitzi](/1995/schnitzi/schnitzi.c) ([README.md](/1995/schnitzi/README.md]))
|
||||||
|
|
||||||
|
[Cody](#cody) added the [try.sh](/1995/schnitzi/try.sh) script.
|
||||||
|
|
||||||
|
|
||||||
## <a name="1995_vanschnitz"></a>[1995/vanschnitz](/1995/vanschnitz/vanschnitz.c) ([README.md](/1995/vanschnitz/README.md))
|
## <a name="1995_vanschnitz"></a>[1995/vanschnitz](/1995/vanschnitz/vanschnitz.c) ([README.md](/1995/vanschnitz/README.md))
|
||||||
|
|
||||||
[Cody](#cody) added the authors' [spoiler as a C
|
[Cody](#cody) added the authors' [spoiler as a C
|
||||||
|
|||||||
Reference in new issue
Block a user