Writing an automatic release script, I have the current version in a variable $VERSION, and I would like to calculate the next version as $NEXT_VERSION.
Rule: Increment the integer at the end of the string.
4.0beta12 → 4.0beta13
4.2alpha9 → 4.2alpha10
I have tried with sed/awk/eval but can't make it work. Ideas? Any tool is fine.