Merge pull request #1791 from xexyl/bright86-try

This commit is contained in:
Landon Curt Noll authored and GitHub committed 2023-12-23 10:22:05 -08:00
commit e212b5737c
3 files changed
+32 -3

No files matched your search

+1 -3
View File
@@ -15,9 +15,7 @@ make all
### Try:
```sh
./bright bright.c
./bright bright
./try.sh
```
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
# try.sh - demonstrate IOCCC winner 2000/tomx
#
# 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: ./bright bright.c (space = next page, q = quit): "
echo 1>&2
./bright bright.c | less -rEXF
echo 1>&2
read -r -n 1 -p "Press any key to run: ./bright bright | tail -n 15: "
echo 1>&2
./bright bright | tail -n 15
+5
View File
@@ -340,6 +340,11 @@ Cody also added the [try.sh](/1985/sicherman/try.sh) script.
./applin.c` or `./applin`; they can do either `./applin.c` or `./applin`.
## <a name="1986_bright"></a>[1986/bright](/1986/bright/bright.c) ([README.md](/1986/bright/README.md]))
[Cody](#cody) added the [try.sh](1986/bright/try.sh) script.
## <a name="1986_hague"></a>[1986/hague](/1986/hague/hague.c) ([README.md](/1986/hague/README.md]))
[Cody](#cody) made this use `fgets()`.