Bash and CR/LF line-endings

Linda Walsh cygwin@tlinx.org
Tue Oct 10 18:29:00 GMT 2006


Williams, Gerald S (Jerry) wrote:
> We're you the one who brought up Unicode earlier? Besides,
> there are numerous situations where files get transferred
> with <CR><LF> without needing to involve Windows, so stray
> <CR> characters occasionally show up here and there. I'm
> sure many of us would like support for <CR><LF> endings on
> Linux as well
---
    Have been on linux for ~7-8 years, unix for 17+ and *nix
utils ~19. The only time I've run into CR-LF issues on *nix,
has been when transporting files to and from the Win or Mac
worlds (MAC using "CR" only).  Maybe linux should ignore "LF"'s
as well to support those coming from MAC's? Then we could
ignore both CRLF and forget this line-oriented stuff and only
work with character streams... ;-)

    Seriously, keeping Linux "LF-only" is useful to filter out
non-portable/non-native DOS files.  It's bad enough Bill G. chose
the "ANSI" literalizing character for a path separator.  Windows (or
DOS) used to support a SWITCHCHAR that fell out use.  Default for
Windows was "/", but if you changed it to "-", you could use "/"
as equivalent to "\" in pathnames.  Too bad they seemed to have
dropped that feature.  Certainly makes POSIX compatibility a bit
more challenging.

    I welcome the change to "LF"-only binary support -- makes CYGWIN
more POSIX- (or linux-) source level compatible.

-lw


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list