Hi, I am using Samba 1.9.18. The server is running on Solaris 2.5.1 and the client is on Win NT 4.0 I am annoyed by the Control-M characters appearing in text files when the files are edited on Windows editors and viewed in vi on Sun machine. I had to manually remove the Control-M characters. Is there a way to eliminate the Control M characters ? Thanks Krishna
Krishna Kurpati wrote:> > Hi, > > I am using Samba 1.9.18. The server is running on Solaris 2.5.1 and the client is on Win NT 4.0 > > I am annoyed by the Control-M characters appearing in text files when the files are edited on Windows > editors and viewed in vi on Sun machine. I had to manually remove the Control-M characters. > > Is there a way to eliminate the Control M characters ? >Use some util like "unix2dos" and "dos2unix" (included in our SCO system) or some shell script that does the translation for you. SAMBA doesn?t. best regards rick -- snail: ANZER GmbH - Pieperstr. 14 - 32791 Lage - Germany email: rick_@t-online.de voice: (0049) 5232 / 9777-21 fax: (0049) 5232 / 78094
Or, maybe preferably, use text editors in Windows that honour the native line endings of a file, be it Mac, Unix or DOS. Textpad is one such text editor. Then you'll only occationally encounter those ^Ms. They're pretty easily disposed of from vi: :%s/^M$// (That's a ctrl-v ctrl-m sequence, not the ^ character.) Regards, /Peter Str?mberg> Date: Wed, 19 May 1999 17:09:47 -0700 > From: RICK_@t-online.de (JUERGEN ANZER) > To: kkrishna@ipcell.com > Subject: Re: Cntrl-M characters ... > Message-ID: <374352CB.7553@t-online.de> > > Krishna Kurpati wrote: > > > > Hi, > > > > I am using Samba 1.9.18. The server is running on Solaris 2.5.1 and > the client is on Win NT 4.0 > > > > I am annoyed by the Control-M characters appearing in text files > when the files are edited on Windows > > editors and viewed in vi on Sun machine. I had to manually remove > the Control-M characters. > > > > Is there a way to eliminate the Control M characters ? > > > > Use some util like "unix2dos" and "dos2unix" (included in our SCO > system) > or some shell script that does the translation for you. SAMBA doesn?t. > > best regards > rick >
Krishna Kurpati wrote:> > Hi, > > I am using Samba 1.9.18. The server is running on Solaris 2.5.1 and the client is on Win NT 4.0 > > I am annoyed by the Control-M characters appearing in text files when the files are edited on Windows editors and viewed in vi on Sun machine. I had to manually remove the Control-M characters. > > Is there a way to eliminate the Control M characters ?Another work around for this if you want to preserve the DOS Ctrl-M's but edit the file with vi on a unix box is to use Vim which has a "dos" filemode. Cheers Martin -- Martin Sapsed Tel: +44 (0)1248 382409 Computing Lab Fax: +44 (0)1248 383826 University of Wales, Bangor m.sapsed@bangor.ac.uk North Wales, LL57 2DG Press any key to continue or any other key to quit...