ed cannot properly handle CRLF line endings
Provides native Win32 open source ports and utilities
Brought to you by:
gnuwin32
Note that the help text displayed in response to ed --help says that there is a --textmode option to enable CRLF line endings, but when I attempt to use this option, the error message "ed: internal_error: uncaught option" results. The behavior when I edit a regular Windows text file is existing lines retain their CRLF line endings, while newly added lines get LF-only endings. The CR characters at the ends of existing lines are displayed as "\r" on line endings when the 'l' command is used to list lines.