Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

660 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