The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Cant figure out this.. Stud33 Shell Programming and Scripting 1 10-25-2007 08:26 PM
Help with a question i have attempted to figure out Vn3050 UNIX for Dummies Questions & Answers 0 03-05-2007 07:57 PM
Can't figure out else not matching peteroc Shell Programming and Scripting 4 09-19-2006 05:58 PM
figure it out cool_dude UNIX for Dummies Questions & Answers 1 09-11-2006 01:49 PM
how to figure out the size in MB for an informix database Optimus_P UNIX for Advanced & Expert Users 5 09-07-2001 10:32 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-20-2002
steph steph is offline
Registered User
  
 

Join Date: Aug 2002
Posts: 1
i can not figure this out

I am having problems scripting in UNIX. I am currently attending school and for the first time I am being introduced to scripting. My problem is I am supposed to enhance the spell_check by adding a third optional argument. The third argument is to specify a list of words to be added to the output of spell_check. What I have so far is

if [ $# -ne 2 ]
then
echo "Usage: spell_check steph1 steph2" 1>&2
echo "steph1: list of correct spellings" 1>&2
echo "steph2: file to be checked" 1>&2
exit 1
fi


if [ ! -r "$1" ]
then
echo "spell_check: $1 is not readable" 1>&2
exit 1
fi

if [ ! -r "$2" ]
then
echo "spell_check: $2 is not readable" 1>&2
exit 1
fi

spell < "$2" |
while read line
do
if grep "$line" "$1" > /dev/null
then
:
else
echo "$line"
fi
done

If someone could help me with this I would really appriciate it.
THANK YOU!!
  #2 (permalink)  
Old 08-21-2002
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,123
According to our rules:
Quote:
(6) Do not post classroom or homework problems.
Closed Thread

Bookmarks

« UNIX mail | Printer »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:39 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0