Add 1994/weisberg/try.sh and primes.sh

The primes.sh script is like 1985/august/primes.sh but it only acts on
reversed output (if rev(1) is installed) of the weisberg because
weisberg actually prints out primes so there's no point doing it without
reversing it. One can specify the number of lines to reverse (not how
many primes to show) by passing an arg to the script. The try.sh script
uses the default (15) and also 25.
This commit is contained in:
Cody Boone Ferguson committed 2024-01-15 11:04:29 -08:00
1 parent e5c062d27d
commit 2daa0822f6
4 files changed
+111 -2

No files matched your search

+7
View File
@@ -1948,6 +1948,13 @@ Note that the alt code does not use `fgets(3)` but rather `gets(3)`.
use with other tools as well by making the program output not a space after each
number but rather a newline.
Cody also added the scripts [try.sh](/1994/weisberg/try.sh) and
[primes.sh](/1994/weisberg/primes.sh). The `primes.sh` script is used by
`try.sh` and if both `primes(1)` and `rev(1)` are installed it will reverse the
lines of the `weisberg`, feeding it to `primes(1)`, showing those that are
primes. It only does the reversed output because the program actually prints
primes.
## <a name="1994_westley"></a>[1994/westley](/1994/westley/westley.c) ([README.md](/1994/westley/README.md]))