I want to cut the number and unit to save as number only in a file.
The input is:
Data byte rate: 24 bytes/s
Average packet size: 118.59 bytes
Data byte rate: 2 Kbytes/s
Average packet size: 10 Kbytes
the expected output is:
24
118.59
2000
10000
This is what I have done so far to retrieve only number.
sed -r 's/.* ([0-9]+\.*[0-9]*).*?/\1/'