Solved

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

Posted on 1999-01-21
3
211 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now