Re: Bourne Shell Script Newbie Help
From: Daz (htpw16_at_hotmail.com)
Date: 01/17/04
- Next message: Anthony Borla: "Re: Bourne Shell Script Newbie Help"
- Previous message: August Derleth: "Re: Few points to consider"
- In reply to: Ed Morton: "Re: Bourne Shell Script Newbie Help"
- Next in thread: Anthony Borla: "Re: Bourne Shell Script Newbie Help"
- Reply: Anthony Borla: "Re: Bourne Shell Script Newbie Help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 17 Jan 2004 01:08:49 -0800
Ed Morton <morton@lsupcaemnt.com> wrote in message news:<bu49ag$8ab@netnews.proxy.lucent.com>...
> Daz wrote:
> > Hello Group, I need some assistance in starting an assignment.
>
> Write high-level pseudo-code describing how to solve the problem, then
> use top-down refinement to get it down to a fairly low level of detailed
> textual instructions, then read the course notes to see how to perform
> those instructions in shell.
>
> Many manual pages are on-line at
> http://www.opengroup.org/onlinepubs/007904975/idx/index.html
>
> and the FAQ for this group is at
> http://www.newsville.com/cgi-bin/getfaq?file=comp.unix.shell/comp.unix.shell_FAQ_-_Answers_to_Frequently_Asked_Questions
>
> Once you've made an attempt to solve the problem yourself, feel free to
> come back to ask for input.
>
> Ed.
Alright,
Ive been working this assignments for a few days now and got stuck on
a small section of it.So this small problem, which you may laugh at,
is as follows.
The section asks for me to read lines from a file so I can calculated
the average and median etc.
For example the input file looks like this:
1 2 3 4 5
6 7 8 9 10
etc..... and so on
I understand the read concept enough so that I can only read the first
line in the file. And I understand the wc command returns the number
of numbers in the file(to compute the average).
However,
1) Problem 1: I cant seem to be able to read any lines other than
first.
2) Problem 2: I dont know how, after reading the lines, to split the
numbers up so I can calculate the average of line 1, line2 etc........
Hopefully you can assist me in this.
Thanks
- Next message: Anthony Borla: "Re: Bourne Shell Script Newbie Help"
- Previous message: August Derleth: "Re: Few points to consider"
- In reply to: Ed Morton: "Re: Bourne Shell Script Newbie Help"
- Next in thread: Anthony Borla: "Re: Bourne Shell Script Newbie Help"
- Reply: Anthony Borla: "Re: Bourne Shell Script Newbie Help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|