script bash obtenez la dernière position du caractère dans la chaîne

last_dash=${str##*-} #finds the dash (-)
Brian Patterson