Remove CTRL-M characters from a file in UNIX 1) Open the file in vi 2) Type the following :%s/^M//g 3) Press enter to the ^M
Browse to your user directory with the following command: cd ~ Create a .vimrc file with the following command: vi .vimrc Click i for insert
How do I make the vi editor display or hide line numbers? To make vi display line numbers, you need to set the number flag.
When porting a text file from Windows to UNIX you will quite often get a ^M on the end of every line. Apart from look