ctrl + m in files
pankaj.gautama at eds.com
Thu Sep 27 02:04:02 GMT 2001
Thanks very much for the assistance. I have found that using a Unix
compatible text editor such as textpad (www.textpad.com) removes the
We can now modify text files in unix format in windows without the need to
use unix2dos or dos2unix utils.
Unix Administrator/Oracle DBA
mailto:pankaj.gautama at eds.com
From: Roger Boussen [mailto:Roger at boussen.net]
Sent: 26 September 2001 22:18
To: Gautama, Pankaj
Subject: Re: ctrl + m in files
Op 24 september 2001 14:51, you wrote
> I have just set up samba v 2.0.0 on solaris, sharing to Win2k, win98
> clients. All shares work fine, but users have come up with a problem.
> If a file (ASCII text) is created on the windows client on the share, when
> read on the solaris system, ctrlM (^M) characters appear in place of the
> carriage returns.
> How can I prevent carriage return from being replaced by ctrlM (^M).
MSDOS ascii file have a \r \n , the ^M, at the end of the line.
You need them if you want to use this files on a MSDOS based (windows)
If you want to remove them, so you won't use the file on MSDOS again, use
sed 's/^M$//' inputfile>outputfile
-- Running Redhat 7
More information about the samba