On Thursday 15 October 2009 2:24:00 am grarpamp wrote: > Some of the 'first' columns in the > output contain spaces which makes > it hard to parse the data out. Unless I'm > missing the reason, I propose they be > changed to underscores '_' as > per the rest of the ouput. Thanks. You can also just not use whitespace for your field separator. For example with awk and sort: vmstat -z | awk -F '[:,]' '/ITEM/ { next } /^$/ { next } // { printf "%s:\t%d\n", $1, $2 * ($4 + $5) }' | sort -t: -k 2 -n (This computes the total size of allocated memory (both used and free items) for a zone and sorts the list so the biggest zones are last.) -- John BaldwinReceived on Thu Oct 15 2009 - 10:44:58 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:57 UTC