I'm building a bash script with the help of the book I bought. I can't find the syntax to accomplish one part of it. I have a variable "part" that is always 4 characters, three letters and one number at the end, example sda1 (yes it is a hard drive). I want the take the number and add it to another variable with just 3 letters. For example take variable "target" with data sdb and modify it to be sdb1, with the number from variable "part"
what is a simple way to express this in bash syntax?