Search Results

Search: Posts Made By: Steve_09
3,500
Posted By Steve_09
I found a better way, look ! :o cat data.txt...
I found a better way, look ! :o

cat data.txt | awk -F, '{for (i=4;i<=NF;i+=2)if($i>=5){deg[$2]+=$i;count[$2]++}}END{for(i in deg){print i " has avg "deg[i]/count[i]}}'

Jordan Mary has avg 7...
3,500
Posted By Steve_09
Thanks, i don't use Python but i hop someday :)
Thanks, i don't use Python but i hop someday :)
3,500
Posted By Steve_09
Thanks a lot for the answer ! I...
Thanks a lot for the answer !




I want only the grades >=5 so, for Jordan Mary is: 6+8/2 =7
3,500
Posted By Steve_09
Find avg using awk
Hi, i need some help plz...
The file data.txt contains: code of student,surname and name,code of lesson,grade of lesson.The number of lessons of each student is not the same.

25,Jackson...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 11:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy