Solved

Samba and ^M at the end of each line???

Posted on 1999-01-21
3
225 Views
Last Modified: 2013-12-23
Hi...
Does anyone know the Conf setting to filter
^M from the end of lines in a text file when sending over the network.
regards
0
Comment
Question by:rickyr
3 Comments
 
LVL 1

Accepted Solution

by:
rhugga earned 10 total points
ID: 1583270
try this inside vi


:1,$ s/.$//g

That should strip all of them. (beware, this strips that last character of each line, so if any
lines do not have the ^M,  you will need to fix it)

If you wanna specify a range of numbers, that is the first paramter.

:1,$  is the entire file (line 1 to the end, I think % also works as well)
:1,10 is lines 1 thru 10 (and so on)

Chuck

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1583271
in vi it's:

:% s/^M//g

where you type  ^M  as Ctrl-V followed by return.

rickyr, this is not a samba problem, but one of the file format and/or the program your're using to look at the file. Most newer vi versions have a
   set textmode
to do this conversion automatically.
Also check if you have dos2unix, d2u, or equivalent.
0
 
LVL 3

Author Comment

by:rickyr
ID: 1583272
Thanx both!
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let’s list some of the technologies that enable smooth teleworking. 
I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question