![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Test-driving OpenOffice.org 3.0 | iBot | UNIX and Linux RSS News | 0 | 04-04-2008 11:10 AM |
| Simple test driving me mad! | alarmcall | Shell Programming and Scripting | 6 | 10-27-2003 10:29 AM |
| unix driving me crazy | Tendernisin | UNIX for Dummies Questions & Answers | 1 | 11-29-2001 10:38 PM |
| New to this, pleas help... | Sear999 | UNIX for Dummies Questions & Answers | 3 | 04-10-2001 08:12 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Pleas help..this is driving me crazy
Hi, I've created a script in csh that takes a file and checks it for mispelled words. Im almost done but I need to do two more things but I need help.
First, when displaying an incorrect word to the user, I need to show the line of the input file that contains the word. Second,if the user gives a replacement word, then I need to actually replace the word in the input file. heres my code ........... Code:
#!/bin/csh
#script that will spell check a file
set array = (`ispell -l -p $HOME/memory.txt < $1`)
set correct = ""
set incorrect = ""
foreach word ( $array )
echo $word is mispelled. Press "enter" to keep this spelling, or type a correction
set correction=$<
if($correction == "") then
echo $word >> "$HOME/memory.txt"
else
set correct = ( $correct $correction )
set incorrect = ( $incorrect $word )
endif
end
echo "MISPELLED"'-'"CORRECTIONS"
@ counter = 1
foreach $word ( $correct )
echo $incorrect[$counter] $correct[$counter]
@ counter++
end
PLEASE HELP ME!!! Last edited by Yogesh Sawant; 05-13-2008 at 09:12 AM.. Reason: added code tags |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|