How to delete strange characters present in some files

What we need first? \framebox{
\texttt{
\textcolor{red}{\bf sudo apt-get install tofrodos}
}
}

An example: you edit a .tex file with the text editor, and save the changes. Then if you open the same file in Emacs is going to appear ``^M'' at the end of every line. This does not affect to the file, but is not nice to the eye. Instead of deleting this ``^M'' by hand or using the method explained in this link (http://www.usc.edu/its/doc/statistics/help/multiuse/garbage.html), you can proceed as follows: First make a copy of the file with the problem (i.e. having ``^M''), let say the file is badfile1.tex and make a copy called badfile2.tex, then type the following at the terminal
\framebox{
\texttt{
\textcolor{red}{\bf dos2unix badfile1.tex > anyname.tex}
}
} then in badfile1.tex is going to appear the fixed file, which you can save as goodfile.tex or whatever. The anyname.tex is empty, and can be deleted.

Webmaster: Christian E. Salas Eljatib, E-mail: christian.salas@yale.edu