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

+11 -2
View File
@@ -5,7 +5,7 @@ make all
```
There is an alternate version that uses more memory. See [alternate
code](#alternate-code) below.
code](#alternate-code) below for more details.
## To use:
@@ -18,9 +18,18 @@ code](#alternate-code) below.
## Try:
```sh
./weisberg | head -n 15
./try.sh
```
If you have `primes(1)` installed you might also wish to try:
```sh
./primes.sh number
```
where `number` is a positive number, defaulting to 15. The [try.sh](try.sh)
script will also do this.
## Alternate code: