--On Wednesday, September 11, 2002 2:02 PM -0700 Mark.F.Williams@kp.org
wrote:
> New to the Samba world. I am getting a control M at the end of line for
> each file I am transfering to the share from 98/NT machines. Any special
> > things I need to do so this will not happen??????????????
>
> Help Please !!
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: http://lists.samba.org/mailman/listinfo/samba
This is happening because you are sharing text files between a Un*x system
and DOS (well, Windows; same thing for this discussion). One uses a CR and
the other users a CR/LF between lines. (CR=carriage return, LF=line feed).
Before you ask, NO, there is no way for Samba to automagically do anything
about it, any more than there would be for a "real" Windows server to
do
anything about it. Some Windows programs are smart enough to deal with it
(wordpad vs. notepad, fer' instance).
There are any of a number of converters, and ways to convert, if you are
going to be doing this on a regular basis. On the Unix side, there are
programs available, or small shell scripts you can run.
Here is a snippet that is supposed to work (courtesy of the UGU list, I
have never tried it myself):
ANOTHER DOS ^M Solution
To remove "^M" from DOS files you can also
use this command at the prompt:
tr -d "\015" < filename1 > filename2
HTH
- john