CR/LF problem >

Boyd Johnson boydj at btree.is.brooktree.com
Tue Nov 11 18:31:36 GMT 1997


"Previously Peter de Groot said:"
> 
> > I wrote a message some time ago about the CR/LF problem when using Unix
> > ASCII files on a samba server, because Unix only uses newlines and DOS
> > uses CR/LF users get 'strange' files sometimes, it gets even more
> > confusing when they use DOS programs to process the unix ASCII files.
> > 
> > For as far as I know now there is no way to translate these files 'on
> > the fly'.
> 
> This CR/LF problem is a major pain.  I have spent many fruitless 
> hours trawling the net looking for a piece of software that does 

I don't know about on-the-fly, but there is a Windows utility I think I
found in the Samba archives that is supposed to do this called FixCRLF
by Jim Barry, but I've never gotten it to work.  Anyone else get it
working?

On UNIX there is dos2unix and unix2dos (on SunOS and Solaris) dos2ux and
ux2dos (on HP-UX) that will do the conversion.  When I start vi on a
file and realize I have a DOS formatted file I just type:
:%s/^V^M//g
(where ^ means hold down CTRL key) to globally get rid of the ^M
characters.

Boyd

-- 
=Boyd Johnson boydj at brooktree.com  Rockwell Semiconductor Sys., San Diego, Ca.=


More information about the samba mailing list