Computing.Net > Forums > Unix > remove ^M from a file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

remove ^M from a file

Reply to Message Icon

Name: Najib (by Nael_Najib)
Date: August 18, 2006 at 12:18:47 Pacific
OS: Solaris
CPU/Ram: 512m
Product: Sun
Comment:

Hello,

i wonder how do i remove ^M from above 40 file that comes under a directory and subdirectories.

i usually vi the file and user :%s/^M//g

but for such many files.. it is tedious to do.

thanks

Aladimi



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: August 18, 2006 at 12:44:39 Pacific
Reply:

There's always the dos2unix tool, but if you want a shell solution, take a look at this link:

http://www.tek-tips.com/faqs.cfm?fid=1911


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: remove ^M from a file

remove ^M from file www.computing.net/answers/unix/remove-m-from-file/6031.html

Script to Remove lines from a file www.computing.net/answers/unix/script-to-remove-lines-from-a-file/5268.html

reading from a file in unix www.computing.net/answers/unix/reading-from-a-file-in-unix/7355.html