I'm trying to total the value of lines matching nvme* hhd from iostat in megabytes then awking to get total from line x to line z, in my case 2 lines.
iostat -m <-- in megabytes
iostat -m | awk '{if($1 ~ /nvme*/ ) print $2, $3, $4}'
------------------
9.38, 0.20, 0.57
13.67, 0.01, 1.60
-------------------
23.05, 0.21, 2.17 <<-- The total
How can I achieve this?