Re: Bourne Shell Script Newbie Help
From: Chris F.A. Johnson (c.fa.johnson_at_rogers.com)
Date: 01/14/04
- Next message: Ed Morton: "Re: Bourne Shell Script Newbie Help"
- Previous message: Chris F.A. Johnson: "Re: Popping first line of a file"
- In reply to: Daz: "Bourne Shell Script Newbie Help"
- Next in thread: Ed Morton: "Re: Bourne Shell Script Newbie Help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 14 Jan 2004 20:01:28 GMT
On Wed, 14 Jan 2004 at 19:24 GMT, Daz wrote:
> Hello Group, I need some assistance in starting an assignment. I have
> never programmed in Unix let alone shell scripting. I searched the
> internet to find similar problems to mine when I came accross this. So
> could you aid me in starting this problem. Thank you. Heres the
> problem:
>
> Overview
>
> In this assignment you will write a Bourne shell script to calculate
> averages and medians from an input file of numbers. This is the
> sort of calculation I might do when figuring out the grades for this
> course. The input file will have whole number values separated by
> tabs, and each line of this file will have the same number of
> values. (For example, each row might be the scores of a student on
> assignments.) Your script should be able to calculate the average
> and median across the rows (like I might do to calculate an
> individual student's course grade) or down the columns (like I might
> do to find the average score on an assignment).
What you are asking for is the course that your instructor should
be teaching.
If you want help here, make an attempt (i.e. read the material
mentioned in the assignment, break the task into its component
parts, code each part) and post your code here when you have
problems.
For example, learn how to do this before tackling other parts of
the script:
> All values and results are whole numbers. You will use the expr
> command to do your calculations; it only works with whole numbers.
> When you calculate the average you should round to nearest whole
> number. (How do you do that with only whole number operations?)
--
Chris F.A. Johnson http://cfaj.freeshell.org
===================================================================
My code (if any) in this post is copyright 2004, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
- Next message: Ed Morton: "Re: Bourne Shell Script Newbie Help"
- Previous message: Chris F.A. Johnson: "Re: Popping first line of a file"
- In reply to: Daz: "Bourne Shell Script Newbie Help"
- Next in thread: Ed Morton: "Re: Bourne Shell Script Newbie Help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|