![]() |
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 |
| 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 |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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!! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|