I am to remove some text after a number for example: 1.2.0_testing. I just want the number part which is 1.2.0. SO anything after the underscore needs to be removed. Below is the code I am using:
echo $str | sed 's/_*//'
However the wildcard doesn't seem to work and I still get the full string. Can someone please help me.
Thanks!