Remove those ^M symbols with VI

We all know how annoying those ^M-s can be all over your script or file. ^M is a carriage return, and is commonly seen when files are copied from Windows. All of them can be removed in one step, with vi editor. Open your file in vi and hit escape. Then do like shown below.

%s/{Ctrl+V}{Ctrl+M}//{Enter}

Got Something To Say:

Your email address will not be published. Required fields are marked *

*

I accept the Privacy Policy

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2024 geegkytuts.net
Hosted by SIEL


About author