awk (particularly GNU awk) is as flexible as your would generally require. If you use it's capabilities you could save a lot of seemingly redundant re-processing of the data. I might be inclined to feed the mpstat straight into the read loop and mangle it all with one awk call (per line). No grep, cut - even the echo could probably go if you get a little creative.
Each to their own. Shane ... On Wed, 8 Dec 2010 17:21:53 -0500 "Bauer, Bobby wrote: > Thanks but since I'm not familiar with perl I'll stick with awk. I'll > look at skipping the grep stage. ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For more information on Linux on System z, visit http://wiki.linuxvm.org/
