Sometimes people change text files – that are supposed to run or get processed on a Unix/Linux system – on Windows text editors such as notepad, this messes up the file as Windows puts a carriage return (read as ^M from within vi) at the end of each line and then you won’t be able to execute or process the file correctly, here is the Linux command you can use to remove such invalid characters:
tr -d ‘\r’ “”httpd_clean.conf (remove the double quotations)
where:
tr -> is the command
-d -> to delete a certain character or pattern of characters
‘\r’ -> denotes the carriage return (elly heyya el Enter)
httpd.conf is the input file, it has to be preceded by a ‘httpd_clean.conf -> httpd_clean.conf is the output file, it has to be preceded by a ‘>’