#Comments: - To get rid of the ^M in VI, press ESC then %, then s, then press the forward slash, then press the control-key and v at the same time, then press the control-key and m (to generate the ^M key), then press the forward slash key, follow by another forward slash key, then press ENTER. The sequence of keys is as follow: %s/^v^m//