tr issues in script