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

Thomas Langås tlan at stud.ntnu.no
Tue Jan 23 09:26:25 GMT 2001

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. 

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 (you
can choose UNIX-style or Windows-style). It's never a good solution to apply
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. 


More information about the samba mailing list