So lets say i have file my_birthday.402.zip ho it can became my_birthday.4.0.2.zip
Thank you
So lets say i have file my_birthday.402.zip ho it can became my_birthday.4.0.2.zip
Thank you
The expensive way, easy to remember using GNU sed:
sed 's/[0-9]\B/&./g'
var=my_birthday.402.zip
echo "$var" | sed 's/[0-9]\B/&./g'
--
or using shell grammar, complicated but more efficient, if it is always 3 digits:
var=my_birthday.402.zip
tmpvar=${var%[0-9]*}
echo "${var%[0-9][0-9]*}.${tmpvar#"${var%[0-9][0-9]*}"}.${var#*[0-9][0-9]}"