UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old December 14th, 2003, 08:41 PM
tzeyik tzeyik is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 22 tzeyik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
How to remove the ^M?

I face with a problem here. I try to build up my webpage using microsoft frontpage and then upload to the unix server. I discovered that the code become very messy cos of the ^M for every "Enter" of my code.

I wonder how i can get rid of this ^M things? Thanks for replying

regards,
tzeyik

Reply With Quote
  #2  
Old December 15th, 2003, 07:07 AM
Perderabo Perderabo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 121 Perderabo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 54 sec
Reputation Power: 5
Use ftp to transfer the file. Select ascii mode. Then this won't happen.

The is a program dos2unix that will do it.

In vi,
:%s/CNTL-V CNTL-M//

CNTL-V is control v. And there is no space between control v and control m.

There are dozens of other ways.

Reply With Quote
  #3  
Old December 15th, 2003, 07:35 PM
tzeyik tzeyik is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 22 tzeyik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks, Perderabo~
It works. Now, my code seem tidy and neat. Thanks again~

regards,
tzeyik

Reply With Quote
  #4  
Old January 29th, 2004, 03:58 AM
rommel rommel is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 3 rommel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
On Solaris (Using sh or bash type:
tr -d '\r' < original_filename > new_filename
(Note that the "<" and ">" must be typed for this command to workAlso do not give the same original file name and new filename or else your original file will become blank!!!So first save it as a new file name then use mv command to name it as the original file!).

Reply With Quote
  #5  
Old January 29th, 2004, 06:59 PM
tzeyik tzeyik is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 22 tzeyik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you for all the helping~

Thanks rommel~
your methods work too..
Now, i learnt one new unix command here.. Thanks again~

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > How to remove the ^M?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway