I want to subset data with awk. Let's say I have this file called test:
IP MAC Bandwidth etc etc
192.1.1.1 ff:ff:ff:ff 5.421M
192.1.2.3 ff:ff:ff:f3 5.120M
192.1.2.5 ff:ff:ff:f1 5.100M
stuff I don't want to be selected
I want to select just the bandwith values (much better if I can delete the M and the end, maybe with sed, I am not sure how, but that is not the main problem.)
The best subset I am doing for the moment is with:
awk '{print $3}' test
And the output is this:
Bandwidth
5.421M
5.120M
5.100M
dont
But I want it to be:
5.421
5.120
5.100
If the "M" is there it's not a problem but that is the idea. I have been collecting information about awk and trying stuff but haven't gotten to the solution.

