![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to average in awk | saint2006 | Shell Programming and Scripting | 4 | 06-04-2008 12:29 PM |
| io utilization (average) on AIX | iam | Shell Programming and Scripting | 0 | 02-19-2008 05:53 AM |
| Average Time | sambond | UNIX for Dummies Questions & Answers | 1 | 01-16-2008 10:57 AM |
| average value | su_in99 | UNIX for Dummies Questions & Answers | 2 | 03-10-2007 01:41 PM |
| Average of arguments | TalkShowHost | Shell Programming and Scripting | 2 | 08-09-2002 10:24 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Average in awk
Hi
I am looking for an awk script which can compute average of all the fields every 5th line. The file looks: A B C D E F G H I J K L M 1 18 13 14 12 14 13 11 12 12 15 15 15 2 17 17 13 13 13 12 12 11 12 14 15 14 3 16 16 12 12 12 11 11 12 11 16 14 13 4 15 15 11 11 11 12 11 12 11 15 14 16 5 14 14 10 12 11 12 11 13 12 14 16 16 6 13 13 11 11 13 11 10 12 12 14 15 15 7 12 12 27 24 12 12 11 11 15 16 15 14 8 12 11 26 23 11 13 11 12 14 15 15 14 9 12 11 25 22 11 12 11 11 13 14 15 14 10 15 12 24 21 11 12 10 13 13 15 16 14 I need to compute the average of the individual fields (A to M) for every 5th line (line 1 to 5: 6-10 etc). I greatly appreciate any help. Thanks |
| Bookmarks |
| Tags |
| solaris |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|