Script uses square brackets around character ranges in tr command, which treats them as literal characters to be replaced. To fix, remove the square brackets when specifying character ranges in tr.
tr