Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 1999-01-21
3
Medium Priority
?
246 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 40 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
Tech spooks aren't just for those who are tech savvy, it also happens to those of us running a business. Check out the top tech spooks for business owners.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

773 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