Add 1992/adrian/try.sh

This script shows the entry itself as well as some of the other tools
that the entry generates. The adwc / wc one uses a pipeline to show the
output (with leading spaces and filename removed along with squeezing
spaces) and also writes each to a text file to use diff on, to show how
they have the same output.

Not all the tools are in the script. The adbasename might have a bug
(in any case it doesn't appear to function exactly like basename(1) in
that it requires two args, not one) so it is not used and adgrep is not
used either. For the latter one the author's remarks might provide some
clues as to why I did not include it.
This commit is contained in:
Cody Boone Ferguson committed 2024-01-14 09:46:54 -08:00
1 parent 85a9066b02
commit 094a4da91a
4 files changed
+76 -11

No files matched your search

+6 -1
View File
@@ -1427,7 +1427,7 @@ from (`__FILE__`), not `adgrep.c`, as the latter does not exist: `adgrep` is
simply a link to `adrian` as `adgrep` is what the program was submitted as but
the winner is `adrian.c`.
Not fixing the above problem would have also cause the program to crash if no
Not fixing the above problem would have also caused the program to crash if no
arg was specified as the file doesn't exist. In making the above fix, at first
the change to check for a `NULL` file was added. Then it was noticed that the
problem is that `adgrep.c` was an incorrect reference that never existed and it
@@ -1489,6 +1489,11 @@ one must keep the `Y[strlen(Y)-1]='\0';` part and keep it there.
These fixes are complex changes due to the way the program and Makefile generate
the additional tools.
Cody finally added the [try.sh](/1992/adrian/try.sh) script that shows the entry
and some of the tools this entry generates. Unlike other scripts, it does not
clear the screen after compilation so that one can see how the other files are
generated.
## <a name="1992_albert"></a>[1992/albert](/1992/albert/albert.c) ([README.md](/1992/albert/README.md]))