get the first character of the string (we want to replace 2nd and 3rd character so the 1st character must rewrite)
write 'TR' as 2nd and 3rd characters
write the rest of the string (character from 4th ). if we don't know what is the the lenght of the string we can use length as here.
-
expr substr string 4 `expr length\ string`
-
` ` means treat the string inside as a command and execute it.
I advise you to read manual for exec command