fix Makefile and README.md for 2019/burton

Helps shell scripts find the shell and make them executable.
This commit is contained in:
Landon Curt Noll committed 2023-03-25 01:58:07 -07:00
1 parent b958504264
commit 6966681c1e
4 files changed
+187 -370

No files matched your search

+38 -25
View File
@@ -1,43 +1,55 @@
# Best one-liner
Dave Burton
Dave Burton
# To build:
## Judges' comments:
### To use:
```sh
make
```
make
### To run:
```sh
./prog < prog.c
```
### Try:
./prog < prog.c
```sh
echo "Do or do not. There is no try."
```
### Selected Judges Remarks:
## Judges' comments:
A tiny, but punctually correct way of POSIX counting for text files. This one
line, one word, 127 character beauty continues to expand the number of classic
unix utilities available as winning entries.
## Author's comments:
Synopsis
--------
### Synopsis
Feed it anything on stdin.
The output should look familiar.
Compiles cleanly with:
WARN="-Wno-implicit-int -Wno-missing-variable-declarations -Wno-parentheses"
clang -Wall -Wextra -Weverything -pedantic $WARN -include stdio.h -o prog prog.c
```sh
WARN="-Wno-implicit-int -Wno-missing-variable-declarations -Wno-parentheses"
cc -Wall -Wextra -Weverything -pedantic $WARN -include stdio.h -o prog prog.c
```
### Description
Description
-----------
Included is a test script, useful for the corner cases.
As in all good Unix programs, it is silent upon success; any output demonstrates an error.
Instead of checking correctness, the check script can simply output the results:
(The Makefile contains the spoiler):
out=cat ./check ./prog
```sh
out=cat ./check ./prog
```
Interestingly, and a spoiler here: MacOS and FreeBSD implement the common utility "correctly".
CentOS and Ubuntu both share a "flawed" utility that changes output format based upon input redirection or pipeline(!).
@@ -47,35 +59,36 @@ omit these characters from the description.
This program follows FreeBSD and MacOS, the arbiters of correct for these purposes.
Limits
------
### Limits
Requires the C locale and ASCII character set.
Input should be less than ten million octets toavoidthisproblem.
See Also
--------
### See Also
You can enjoy this code from beginning to end.
No whitespace was harmed in the creation of this program.
All your base belong to us, but the constants seem a bit ... off?
Bonus
-----
### Bonus
The script `cow` provides a closer analog, and perhaps a more useful interface.
Included is a version without compilation warnings:
clang -Wall -Wextra -Weverything -pedantic -include stdio.h -o prog.clean prog.clean.c
```sh
cc -Wall -Wextra -Weverything -pedantic -include stdio.h -o prog.clean prog.clean.c
```
### Bugs
Bugs
----
The flags are not supported. Although they could easily be added into `cow`.
This exercise left to the reader.
--------------------------------------------------------------------------------
<!--
## Copyright:
(c) Copyright 1984-2019, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
[judges]: http://www.ioccc.org/judges.html
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
-->