On Tue, 26 Apr 2011, wes wrote:
> I do this in vi all the time. It shows a ^M in the search/replace string,
> but not in the actual text that got modified.
>
> ^M shows at newlines in the text when viewing DOS-formatted files in Linux.
> This is a separate, unrelated thing.
Wes,
Turns out that ^M is also the Mac end-of-line visibly rendered in a pager.
In emacs I discovered that the original file came from a Mac, not a Windows
box (which was my assumption). Converting the line terminator from Mac to
linux was a simple:
tr "\r" "\n" < inputfile > outputfile
no need to futz with it in emacs at all. :-)
Now I need to learn how to use split() in awk to reformat the date field
from mm/dd/yy to YYYY-MM-DD. Discussion starts on page 190 of the ORA
sed/awk book.
Rich
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug