This is parameter substitution using pattern matching as described in the
ksh man pages[
^]. It's a while since I wrote scripts but it appears to be looking for a string of the form
devpath followed by zero or more characters, followed by a hyphen or a dot. The resulting value is decremented by 1 before being set into the variable
port
.
Note: I'm not 100% certain of my analysis here, experimentation should help to clarify it.