The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Tail??
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Tail??
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
06-15-2006
jim mcnamara
...@...
Join Date: Feb 2004
Location: NM
Posts: 5,807
It looks like you are taking the last 96 lines from the log and finding the mean of column 13.
Code:
tail -96 logfile | \ awk 'BEGIN { total=0 } { total+=$13 } END{ printf("Avg=%f\n", total/NR) }'
if I understood what you want.
jim mcnamara
View Public Profile
Find all posts by jim mcnamara
Find jim mcnamara's past nominations received
Find jim mcnamara's present nominations given