|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
Thanks, Perderabo~
It works. Now, my code seem tidy and neat. Thanks again~ regards, tzeyik |
|
#4
|
|||
|
|||
|
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!). |
|
#5
|
|||
|
|||
|
Thank you for all the helping~
Thanks rommel~
your methods work too.. Now, i learnt one new unix command here.. Thanks again~ |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > How to remove the ^M? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|