Given the variable
export TAG="1.3.2_release"
I want to transform the variable to the value 132
.
I cant get the substring:
bash-5.0$ echo ${TAG:0:5}
> 1.3.2
And I can replace the dots with empty string:
bash-5.0$ echo ${TAG//./}
> 132_release
But I can't combine these two operations in one line:
bash-5.0$ echo ${${TAG:0:5}//./}
> bash: ${${TAG:0:5}//./}: bad substitution