How to extract part of string in bash? Suppose I have a string product_name_v1.2
. This name is not fixed as it can be changed. However the one thing that is certain is that there will be a version umber in the string in a format like v#.#
.
What I want to do is extract the v1.2
and 1.2
from the string. Any suggestions?