"\r\n" vs "\n" between Unix and Win

Medi Montaseri medi at CyberShell.com
Tue Jan 23 19:32:16 GMT 2001

Medi Montaseri                               medi at CyberShell.com
Unix Distributed Systems Engineer            HTTP://www.CyberShell.com
CyberShell Engineering

On Tue, 23 Jan 2001, [iso-8859-1] Thomas Lang=E5s wrote:

> Medi Montaseri:
> > My user creates a text (flat file) on his windows box via Notepad.
> > Naturally there is "\r\n" at then end of each line. User then
> > moves this file to a Unix box (via Drive Mapping, drag-and-drop).
> > User then logins to the unix box via telnet and run the text file
> > which is a script.=20
> I would say that the best way to do this, was to use textpad or another
> editor for windows which actually saves files with \n, instead of \r\n (y=

But DOS/Window file system demands for such "\r\n" and the application
(ie Notepad) is simply following that. Of course an application can always
alter things, but that becomes a local fix and not an underlying solution.

> can choose UNIX-style or Windows-style). It's never a good solution to ap=
> a "fix" to a file just because another program doesn't behave like it
> should. The best solution is always to fix the problem where it's at, ie.
> what's causing the problem.=20
The problem is not the application, but the File System. And SMB is at a
File System level, hence it should make it transparent. FTP does.

But, I appreciate your input and will look into changing the process
at creation time.
> --=20
> -Thomas

More information about the samba mailing list