I could do with some bash / awk consultation - trying to adjust this script to extract some data from my NVMe drives and want to tidy up the display a bit.
I want to extract the '165' from the 165 TB line which I did like this...
which I think is fine and should continue to work as the value increases, right?
This one has me beat though...
How can I remove the ',' (or multiple commas as the value grows). I there a way to strip all non-numeric characters from the value ???
thx in adv
Code:
Data Units Read: 322,661,649 [165 TB]
I want to extract the '165' from the 165 TB line which I did like this...
Code:
/Data Units Written:/{DataWrote=(substr($5,2));} \
which I think is fine and should continue to work as the value increases, right?
This one has me beat though...
Code:
Power On Hours: 1,244
How can I remove the ',' (or multiple commas as the value grows). I there a way to strip all non-numeric characters from the value ???
thx in adv