MCCALL,DON (HP-USA,ex1)
2001-Sep-24 13:17 UTC
Newbie to Samba - getting '^M' characters from NT into PVCS o n UN IX
Hello Tony, Samba isn't the 'culprit', just the media used. Samba does NOT insert anything into the files that you copy over or have an application create on a samba share. The issue is that you are using a PC program to check out/modify the files, and pc os'es (Win/dos, i mean) use crlf as a ascii line terminator. Unix uses a lf only. So when you view the files with a pc editor, the cr is taken as part of the line terminator, and doesn't show up. To a Unix editor, the cr is just another piece of data, and shows up as such. There are utilities on many unix systems (dos2ux, ux2dos) to translate between these two text types, but samba does nothing in this regard. Hope this helps, Don -----Original Message----- From: Tony Esposito [mailto:tony.esposito@peregrine.com] Sent: Monday, September 24, 2001 4:01 PM To: 'samba@lists.samba.org.' Subject: Newbie to Samba - getting '^M' characters from NT into PVCS on UN IX> Hello, > I have inherited a Samba problem ( maybe ) - when checking NT files > into a PVCS archive on UNIX, the files keep the '^M' ( CNTL-M ) character. > Subsequently, when files are checked out of UNIX PVCS and compiled or > viewed on UNIX, a '^M' character appears where there should be only a <cr> > on UNIX. This, as you might guess, causes havoc with the C compilers on > UNIX. > Can Samba be the issue and what can be done to strip or convert the > '^M' characters found in NT flat files? > Thanks! > > Tony Esposito > Database Administrator > Peregrine, E-Markets Group > Phone (972)643-3115 > >-- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Joel Hammer
2001-Sep-24 16:15 UTC
Newbie to Samba - getting '^M' characters from NT into PVCS o n UN IX
It is very simple to convert back and forth on the unix machine. I ASSUME that no unix file fed into a compiler would have 0D0A at the end of the line. So, cat file | sed 's/\x0D$//' might fix you up. If OD just doesn't occur in a unix file destined for a compiler: cat file | tr -d "\015" would work. This following file, according to my samba book, is a nice utility to fix up files on a windows machine. I just downloaded it to see if it is still there. It is drag and drop. ftp://samba.org/pub/samba/contributed/fixcrlf.zip Of course, it may be put in maliccious code for all I know. Joel