Sponsored Content
Homework and Emergencies Homework & Coursework Questions shell scripting project for school Post 302573703 by bodhi 926 on Tuesday 15th of November 2011 09:35:26 AM
Old 11-15-2011
shell scripting project for school

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:

i need to prompt the user for


a) group of scores
b) calculate the lowest and highest scores and overall average
c) print out to the screen
d ask if user has any more data to process, if so repeat (loop) for a new set of scores if not exit.






2. Relevant commands, code, scripts, algorithms:



3. The attempts at a solution (include all code and scripts):
i have this much,and trust me i know there is a lot missing
Code:
#!/bin/bash
# Richard Ferguson Unix/Linux CS121

user=0
score=0
count=0

until [[$user=="done"]]

echo -n "Enter Score : "
read score

lowest=score
highest=score
howmany=1
sum=score

until[[$score==999]]
do
echo -n "Enter Score : "
sum + = $score

    if (( $score > highest ))
    then
    highest = score

        if (( $score < lowest ))
        then
        lowest = score
            if (( $score -ne 999 ))
            then
            $howmany+ = 1
            $sum+ = score
            fi
        fi
    fi
avg = $sum/$howmany
echo -n "$avg"
echo -n "$sum"
echo -n "$highest"
echo -n "$lowest"
echo
echo -n "Goodbye"    
exit 0

p.s.
when i run the file at this stage i get a e.o.f err msg that states the err is in line 45 but there is only 43 lines of code!


4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
spokane falls community college
spokane wa
rick udlock
cs 121


Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).


Moderator's Comments:
Mod Comment Please use code tags!

Last edited by zaxxon; 11-15-2011 at 11:18 AM.. Reason: code tags
 

3 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

shell scripting project for school

i need to prompt the user for a) group of scores b) calculate the lowest and highest scores and overall average c) print out to the screen d ask if user has any more data to process, if so repeat (loop) for a new set of scores if not exit. i have this much,and trust me i know... (1 Reply)
Discussion started by: bodhi 926
1 Replies

2. Shell Programming and Scripting

Suggestions for Shell Scripting Project

I'm taking a class right now and need ideas for a project. The scope is relatively vague: "Create a 'mash-up' program that combines system administration functions into a single application." I would say my skills working in bash are between average and slightly above average. I was originally... (2 Replies)
Discussion started by: d3mon_spawn
2 Replies

3. Shell Programming and Scripting

Beginner Scripting for school

Hello people, I am new to the forum and to scripting and I'm honored to be a part of the Forum :) At the moment I'm learning to do basic scripting for school. Now I got 2 assignments that I do not understand. The case scripting I have mastered a bit. But now I have an assingment to make with... (1 Reply)
Discussion started by: hulsi88
1 Replies
Mail::SpamAssassin::AutoWhitelist(3)			User Contributed Perl Documentation		      Mail::SpamAssassin::AutoWhitelist(3)

NAME
Mail::SpamAssassin::AutoWhitelist - auto-whitelist handler for SpamAssassin SYNOPSIS
(see Mail::SpamAssassin) DESCRIPTION
Mail::SpamAssassin is a module to identify spam using text analysis and several internet-based realtime blacklists. This class is used internally by SpamAssassin to manage the automatic whitelisting functionality. Please refer to the "Mail::SpamAssassin" documentation for public interfaces. METHODS
$meanscore = awl->check_address($addr, $originating_ip, $signedby); This method will return the mean score of all messages associated with the given address, or undef if the address hasn't been seen before. If $originating_ip is supplied, it will be used in the lookup. awl->count(); This method will return the count of messages used in determining the whitelist correction. awl->add_score($score); This method will add half the score to the current entry. Half the score is used, so that repeated use of the same From and IP address combination will gradually reduce the score. awl->add_known_good_address($addr); This method will add a score of -100 to the given address -- effectively "bootstrapping" the address as being one that should be whitelisted. awl->add_known_bad_address($addr); This method will add a score of 100 to the given address -- effectively "bootstrapping" the address as being one that should be blacklisted. perl v5.16.3 2011-06-06 Mail::SpamAssassin::AutoWhitelist(3)
All times are GMT -4. The time now is 07:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy