Doing sums


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Doing sums
# 1  
Old 02-09-2005
Data Doing sums

Let me explain my problem, I have a file in the following format
9602622 - User ID
01 -2 - Question number & Grade
02 - 3
03 - 7
04 - 12
05 - 9
06 - 0
9601664 - User ID
01 -2
02 - 3
03 - 7
04 - 12
05 - 9
06 - 0

I need to change the file so it looks like this

9601664 54 - User ID and their percentage

How do I do it, I believe I need to use awk however I am stuggling any help would be much appriciated Smilie
# 2  
Old 02-09-2005
Our rules say:
(6) Do not post classroom or homework problems. And I must say that this likes like homework to me...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Group sums by matching and then multiplying by weights

Hi Experts, Please help with the following. I have 3 columns in File 1 , variables with values nested within groups. File 1 gr1 var1 a gr1 var2 b gr1 var3 a gr1 var4 c gr2 var1 a gr2 var2 a gr2 var4 c gr3 var1 b gr3 var3 b gr3 var4 a gr3 var5 a (3 Replies)
Discussion started by: ritakadm
3 Replies

2. UNIX for Dummies Questions & Answers

Script that sums the contents of a folder (help me)

I'm looking for a script that sums the contents of a folder, When you give a parameter to the script , i want to know the size of the directory, the number of files, number of folders, These are commands that I have already found du -s find . -type f | wc -l find . -type d | wc -ly ... (19 Replies)
Discussion started by: Roggy
19 Replies

3. Shell Programming and Scripting

Create md5 sums and archive the resulting md5 files

Hello everyone, I am looking to basically creating md5sum files for all iso files in a directory and archive the resulting md5 files into a single archive in that very same directory. I worked out a clumsy solution such as: #find files for which md5sum are to be created and store the... (1 Reply)
Discussion started by: SurfTranquille
1 Replies

4. UNIX for Dummies Questions & Answers

cmos check sums

not entirely unix orientated but.... anyway i've got an old 486dx? 100 that i'll looking to turn into a unix running machine. But everytime i turn it on it comes up with and invalid CMOS checksum, after i've been into the set up and reset that it works fine, tried a new batter and that didn't sort... (1 Reply)
Discussion started by: stevox
1 Replies
Login or Register to Ask a Question