Search code examples
shellunixcentoscommand-line-interfaceeol

CLI EOL [End of Line] converter


I've been looking for commands or tools that I can use in the shell to convert a given file from DOS to Unix in terms of newlines and carriage returns. I have found one but this is only available through npm. I currently do this manually through Notepad++ but this is quite tedious and was wondering if there is a tool I could use for CentOS or Linux to achieve this via shell.


Solution

  • Try dos2unix. Should be available from your package manager if it's not already installed (sudo yum install dos2unix).