Category Archives: Windows

How to Remove ^M in Linux & Unix

Control M ( ^M)  characters are introduced when you use  lines of text from a windows computer to  Linux or Unix machine.  Most common reasons are when you directly copy a file from a windows system or submit form data copied and pasted from a windows machine.

Detecting ^M characters

^M is non printable character and often becomes difficult to find, in order to see if your file contains any non printable character use the cat command with -v option

$cat -v filename

Methods to remove ^M

In all these method , real secret is not to type ^M using keyboard but rather typing in control key sequence to get the ^M control character.

Share

Bash in Windows 10 : Ten Facts You Must Know

Bash in Windows 10

Bash in Windows : Learn about top 10 must know facts for use and setting the expectation right. 

Share