You lot really do have too much time on your hands....:)

Jeff Waugh wrote:
<quote who="[EMAIL PROTECTED]">

On Tue, 18 Mar 2003 21:02:38 +1100
John Ferlito <[EMAIL PROTECTED]> wrote:


$ awk '{ if(/bogomips/){ SUM+=$3 } } END {print SUM}' /proc/cpuinfo

Except no need for if, '/pattern/ {action}' is idiomatic awk:


$ awk '/bogomips/ { SUM+=$3 } } END {print SUM}' /proc/cpuinfo


Heh, first and second prize to you guys, once you worked out the finer
detail. :-)

  $ awk '/bogomips/ { SUM+=$3 } END {print SUM}' /proc/cpuinfo
  6121.06

Nice one!

- Jeff



--
Phil Scarratt
Draxsen Technologies
IT Contractor/Consultant
0403 53 12 71

--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to