Question: Write a shell script that implements a simple spell checker. The name of your script is formed from your Z-id followed by .spell. For example,

Write a shell script that implements a simple spell checker. The name of your script is formed from your Z-id followed by ".spell". For example, if your Z-id is "z123456" then your script must be called "z123456.spell". The general format for invocation is: z123456.spell file where "z123456.spell" is the name of the executable file that contains your shell script, and "file" refers to the file to be checked word-by-word for spelling. Your are encouraged to take advantage of the "a spell list" command. It produces a list of misspelled words from standard input. 
Specification: When your script is invoked from the command line it reads "file" and checks it for spelling of the words it contains. For each word that is found to be incorrect, the invoker is asked for either: to insist on the spelling of the word. to provide a replacement spelling If the invoker insists on the spelling of the word, then your script will "remember" it. Your script "remembers" words in the file "~/.memory" in the invoker's home directory. Any further invocation of your script by the same invoker will consider the word to be correct. Otherwise, the invoker is prompted for a replacement spelling. As output, your script produces a 2-column-ed list of words, the left column lists incorrectly spelled words, the right column lists their replacement as given by the invoker. The list is produced after the invoker has answered to all incorrectly spelled words. Here is an example of an invocation of your script with a test file: % ls test file z123456.spell % cat test file In navigation, a vehicle's course is the agle that the intended path of the vehicle makes with a fixed reference object (typically true north). Course is measured in degrees from 0

 

 

 

 

 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

You are encouraged to take advantage of the aspell list command It produces a list of misspelled words from standard input When your script is invoked from the command line it reads file and checks ea... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!