Solved

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

Posted on 1999-01-21
3
236 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month6 days, 15 hours left to enroll

622 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