On 02/04/14 15:00, Grant Edwards wrote:
On 2014-02-03, Alan McKinnon <alan.mckin...@gmail.com> wrote:
On 04/02/2014 01:14, Joseph wrote:
I have a text file.  How do I search and replace "carriage return"?



That is a horrible one to solve :-)

All the usual tools (grep, sed, tr) are line oriented so they will take
one line and replace the CR at the end with something else plus a CR!

No they won't.  EOL in Unix is linefeed.  CR is treated as a normal
character by grep sed tr and so on.

--
Grant Edwards               grant.b.edwards        Yow! I'm having an
                                 at               emotional outburst!!
                             gmail.com

I solve it by converting text doc to unix format:
dos2unix 1_5.txt

and running this command:
cat 1_5.txt | tr '\r\n' '\ ' > 1_52.txt

--
Joseph

Reply via email to