extract_fields() { typeset field=$1 case $field in transactions) tr "()" " " |awk 'BEGIN {count=0.5}/^ transactions:/{ print count" "$3;count++; }' ;; requests) tr "()" " " |awk 'BEGIN {count=0.5}/^ read.write requests:/{ print count" "$4;count++; }' ;; other) tr "()" " " |awk 'BEGIN {count=0.5}/^ other operations:/{ print count" "$4;count++; }' ;; time) tr "s()" " " | awk 'BEGIN {count=0.5}/^ total time:/{ print count" "$3;count++; }' ;; event) tr "()" " " |awk 'BEGIN {count=0.5}/^ total time taken by event execution:/{ print count" "$7;count++; }' ;; min|avg|max) tr "s()" " " | awk 'BEGIN { count=0.5 } /^ '$field':/ { printf "%f %s\n", count, $2; count++; }' ;; esac }