As follows, some text
16G 16G 1.9G 40G 4G 4G 952M 60G 16G 16G 1.6G 40G 5G 780M 5G 80G
I want to change all the unit from 'M' to 'G', like this
16G 16G 1.9G 40G 4G 4G 0.92G 60G 16G 16G 1.6G 40G 5G 0.76G 5G 80G
I can use python to do it, but I don't know how to achieve it with shell? Can awk,sed,perl... do it?