Use parameter expansion rather than `expr substr`