the tr command was on the wrong line, resulting in errors