Print

Print


BP Jonsson scripsit:

> Got a reverse wordlist to the KJV?

Nope, just a classic Unix pipeline (this one was invented some 30 years ago):

tr -cs '[A-Za-z]' '\012' <kjv | sort -u | grep 's$' >s-words

or, in English:

A pipeline of three steps:

1) Read kjv, transliterate all non-letters to newlines, squeezing out
redundant newlines

2) Sort, discarding all duplicates

3) Discard all except those ending in "s".

This is simplified for paedagogical purposes: I added some more steps
to discard all words that appeared *only* capitalized, while preserving
-- only once -- those that appeared both capitalized and not capitalized,
just to cut back on how much I had to examine.

--
We call nothing profound                        [log in to unmask]
that is not wittily expressed.                  John Cowan
        --Northrop Frye (improved)              http://www.reutershealth.com