2

When I open file using cat command in terminal then '^M' this symbol is shown but in gedit this symbol is not visible.How to shown on gedit or how to remove?

Foxan Ng
  • 6,883
  • 4
  • 34
  • 41
  • It's a carriage return -- check gedit for whitespace options (the new gedit seems much worse in the options regard, though) -- ([maybe this?](http://stackoverflow.com/questions/17162851/option-to-display-control-characters-in-gedit)). See [this related](http://stackoverflow.com/questions/13589895/shell-command-to-strip-out-m-characters-from-text-file) for information about how to strip them out. – jedwards Aug 01 '16 at 07:17
  • Is any option in gedit for encoding text? – Prafulla Yeole Aug 01 '16 at 07:23
  • 1
    It depends on the gedit version. Older ones definitely had this option. But this question may be better suited for SuperUser – jedwards Aug 01 '16 at 07:25

1 Answers1

1

^M, as noted in the comments, is the carriage-return character. Instead of looking for a way to make gefit display them just so you could remove them manually, it may be easier to use dos2unix:

$ dos2unix myfile.txt
Mureinik
  • 297,002
  • 52
  • 306
  • 350