Re: DOS line endings - how to cope with these?
Volker Kuhlmann <list0570-wUU9E3n5/[email protected]> Sun, 23 May 2010 19:31:05 +1200
| Newsgroups | gmane.editors.nedit.user |
|---|---|
| Message-ID | <[email protected]> |
On Wed 12 May 2010 10:31:53 NZST +1200, Greg Edwards wrote: > I offer my trusted Perl hack for line-endings. > cat file | perl -p -e 's/(\r\n|\r|\n)/\n/g' > file2 Agh. Some people have to hit everything with the same hammer^H^H^Hperl. tr -d '\r' <file >file2 Will also delete CRs within a line - as does your perl thingy. It's possible to remove CR in nedit only if nedit doesn't go into DOS mode, that is if the first line ends in LF and not CRLF. Volker -- Volker Kuhlmann http://volker.dnsalias.net/ Please do not CC list postings to me. -- NEdit Discuss mailing list - [email protected] http://www.nedit.org/mailman/listinfo/discuss