{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

notes07 - Unix Shell Programming[This topic may be in week...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Unix Shell Programming [This topic may be in week 1, week 4, or week 11 depending on the holidays each semester.] Sometimes the best way to solve a programming problem is not to write a program at all, but instead to glue together existing programs that solve the problem. As an example, we’ll construct a spelling-checker program. It will take a text file as input, and will generate a list of words that are in the file but not in the online dictionary. For this demonstration I’ll use the file named summary as the text I want to spell-check. We are given a file that contains several words per line, including things we don’t want to compare against the dictionary, such as spaces and punctuation. Our job will be easier if we transform the input into a file with exactly one word per line, with no spaces or punctuation (except that we’ll keep apostrophes, which are part of words — contractions such as “we’ll” — rather than word delimiters).
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Ask a homework question - tutors are online