Unix Spell Checker Assignment

hello, im a new member to the forum and im doing a assignment for unix command and we have to make a spell checker and im a little confused about the directions .. ill post them below and continue..

Northern Illinois University
CSCI 330-Unix Command

Write a shell script that implements a simple spell checker. The general format for invocation is: niuspell file where "niuspell" 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 "ispell -l" command. It produces a list of misspelled words from standard input.
Specification:

When "niuspell" 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 niuspell will remember it. niuspell remembers words in the file ".niuspelled" in the invoker's home directory. Any further invocation of niuspell by the same invoker will consider the word to be correct. Otherwise, the invoker is prompted for a replacement spelling. As output, niuspell 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 the niuspell script with a testfile:

ok so i made 2 separate files one called niuspell and one called testfile. My test file I have is a random paragraph that has a few misspelled words. My niuspell file i am confused on how i set it up. I started with my #! /bin/bash and im stuck. Could anyone give me a hint on how i move forward.

---------- Post updated 11-03-10 at 04:47 PM ---------- Previous update was 11-02-10 at 07:51 PM ----------

can anyone please help

The output my teacher gave us:

% ls
testfile niuspell
% cat testfile
I was going about my business quite nicely
when I was acosted by the mail man
whio insisted that my name is Raimund Ege
but I did not believe him
% ./niuspell testfile

'acosted' is mispelled. Press "Enter" to keep
this spelling, or type a correction here: accosted

'whio' is mispelled. Press "Enter" to keep
this spelling, or type a correction here: who

'Raimund' is mispelled. Press "Enter" to keep
this spelling, or type a correction here:

'Ege' is mispelled. Press "Enter" to keep
this spelling, or type a correction here:

MISPELLED: CORRECTIONS:

acosted accosted
whio who

% ./niuspell testfile

'acosted' is mispelled. Press "Enter" to keep
this spelling, or type a correction here: accosted

'whio' is mispelled. Press "Enter" to keep
this spelling, or type a correction here: who

MISPELLED: CORRECTIONS:

acosted accosted
whio who

% cat ~/.niuspelled
Raimund
Ege
% cat testfile
I was going about my business quite nicely
when I was acosted by the mail man
whio insisted that my name is Raimund Ege
but I did not believe him

You've been given a warning on how to post homework already, including information on the required template to use. Since you chose to ignore that I'm closing this thread.