This simple shell script converts DOS/Windows files with CR/LF line endings to Unix files with LF line endings. It is nothing more than a wrapper for tr. Use it to convert files that you downloaded or created in a plain DOS/Windows environment (if you created them with Cygwin tools or a configurable editor like NTEmacs, they should not need this conversion). To convert files, use the command:
~/# dos2unix file1 [file2...] |
All files which are passed as arguments will be converted and the results will be written back to the same files.
If this is not successful on Windows, you may have to fiddle with the text-vs.-binary mode setting in Cygwin. Try adding binmode to your CYGWIN
environment variable.