Add 1998/dlowe/try.alt.sh, add missing subsections
This commit is contained in:
1 parent
1a26232be0
commit
d1489ed011
4 files changed
+60
-3
No files matched your search
+22
-2
@@ -4,6 +4,9 @@
|
||||
make all
|
||||
```
|
||||
|
||||
There is an alternate version available. See [Alternate code](#alternate-code)
|
||||
below for more details.
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
@@ -42,17 +45,34 @@ Also try:
|
||||
|
||||
## Alternate code:
|
||||
|
||||
NOTE: The original entry was just a text based pootifier. To build
|
||||
that version try:
|
||||
The original entry was just a text based pootifier. This alternate version is
|
||||
that program.
|
||||
|
||||
|
||||
### Alternate build:
|
||||
|
||||
```sh
|
||||
make alt
|
||||
```
|
||||
|
||||
|
||||
### Alternate use:
|
||||
|
||||
|
||||
```
|
||||
./dlowe.alt < anyfile > pootfile
|
||||
```
|
||||
|
||||
What's the difference between this and `dlowe`?
|
||||
|
||||
|
||||
### Alternate try:
|
||||
|
||||
```sh
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
Why could this this entry be considered a utility? Well because it
|
||||
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# try.sh - try out 1998/dlowe pootifier alt code
|
||||
#
|
||||
|
||||
make everything || exit 1
|
||||
|
||||
CAT="$(type -P cat)"
|
||||
MAN="$(type -P man)"
|
||||
COL="$(type -P col)"
|
||||
|
||||
if [[ -z "$CAT" || ! -e "$CAT" ]]; then
|
||||
echo "$0: no cat found" 1>&2
|
||||
exit 1
|
||||
elif [[ -z "$COL" || ! -e "$COL" ]]; then
|
||||
echo "$0: col not found" 1>&2
|
||||
exit 1
|
||||
elif [[ -z "$MAN" || ! -e "$MAN" ]]; then
|
||||
echo "$0: can't execute man" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -f make.1
|
||||
read -r -n 1 -p "Press any key to pootify make(1): "
|
||||
"$MAN" make | "$COL" -b | ./dlowe.alt > make.1
|
||||
"$MAN" ./make.1
|
||||
|
||||
read -r -n 1 -p "Press any key to pootify dlowe.c: "
|
||||
echo 1>&2
|
||||
./dlowe.alt < dlowe.c
|
||||
echo 1>&2
|
||||
|
||||
read -r -n 1 -p "Press any key to pootify dlowe.alt.c: "
|
||||
echo 1>&2
|
||||
./dlowe.alt < dlowe.alt.c
|
||||
echo 1>&2
|
||||
@@ -26,4 +26,5 @@ read -r -n 1 -p "Press any key to pootify make(1): "
|
||||
"$MAN" ./make.1
|
||||
|
||||
read -r -n 1 -p "Press any key to pootify dlowe.c: "
|
||||
echo 1>&2
|
||||
./dlowe < dlowe.c
|
||||
Reference in new issue
Block a user