Okay, so here we have a file with the names of our students and the scores that they received on various tests they have taken. Between the name of the student and the list of grades there is a comma, and between the grades for the various tests we have a space. This gives us a list that looks like this:

Joe,100 98 69 87
Steve,90 80 86 72
Nancy,80 90 85 95
(...)

We want to find the sum of the grades that all of the students received on the first test (e.g. 100+90+80).

(I think you can fill it in from here...)

On Oct 5, 2004, at 3:21 PM, Judy Perry wrote:

Yeah, but it sounds a little geeky for the edu crowd...

Judy

On Tue, 5 Oct 2004, Rob Cozens wrote:



Note this can be posed as a "real-world" problem:

"The objective of this exercise is to calculate the total of a
specific sub-field in a file of comma-delimited text records.

Fields are separated by commas and sub fields are separated by spaces.

The exercise is to write a script to return the total of sub-field 1
of field 2 for all records in the file."
--

_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution


-----------------------------------------------------------
Frank D. Engel, Jr.  <[EMAIL PROTECTED]>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
$




___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to