changed lua string.gsub functions to shell tr commands