Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Handling ^M's in text files
On 29 Oct 2002, tcross_at_nospam.une.edu.au wrote:
> Kenneth C Stahl <ktsahl_at_yahoo.com> writes:
>
>> Tim Cross wrote: >> > >> > Ubiquitous <weberm_at_polaris.net> writes: >> > >> sed 's/^M//g' infile.txt >outfile.txt
Or put the following in your .emacs,
(defun cut-ctrlM ()
"Cut all visible ^M." (interactive) (beginning-of-buffer) (while (search-forward "\r" nil t) (replace-match "" nil t)) (not-modified) (beginning-of-buffer))
(global-set-key [f5] 'cut-ctrlM)
Then, whenever you see this, hit f5.
:-)
-- Galen deForest Boyer Sweet dreams and flying machines in pieces on the ground.Received on Mon Oct 28 2002 - 21:17:12 CST
![]() |
![]() |