Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

The Wordcount Problem

Here are some scripts relating to the "word count problem" that was the subject of a memorable exchange between Donald Knuth and Doug McIlroy. See here for context.

Files Included

McIlroy's original 6-line shell pipeline is in wordcount.sh.

My Python solution to the same original problem is in wordcount.py.

My extended Python solution that correctly handles contractions is in ewordcount.py.

An extended shell pipeline that correctly handles contractions is in ewordcount.sh.

A test text file for use as input is in wordcounttest.txt.

The expected outputs of the two versions, when run on the test text file, are in wordcount.out and ewordcount.out. Note that the outputs include all of the words in the file; I generated them by using a large number (150) as the argument to each script.

About

Python and shell solutions to the Knuth-McIlroy word count problem.

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.