Question Locked

C Shell scripting

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Heyaz

Need a little help writing a script with the csh (have to sadly), Bascially The script needs to read a file, check it for spelling and for each word that is found to be incorrect ask the user to either insist on the current spelling and add it to a memory file to ignore this word from now on, or provide a replacement spelling.

I understand the csh isn't the way to go, but I since its required.

Basically Im having the hardest time getting the Misspelled words to a file, (ispell -l) and then individually going through each word and asking them to change it.

Thanks in advance for any tips or help.
Jstoneky

4 replies

by jstoneky

Yea, I actually used sed to get all of that done, Now i'm stuck on adding words to an array in a foreach loop, not sure on how the syntax would work

set ar = ($ar $word) is what seems like it should work, (adding the next variable, word to the array). But its not ;-(

by absolutely

set ar(i)=($ar $word)

increment i from 0 to number of words.

This discussion is closed to new replies.