[ale] Turning CR into LF in text file

Fletch fletch at phydeaux.org
Wed Dec 6 13:34:14 EST 2000


>>>>> "Fulton" == Fulton Green <ale at FultonGreen.com> writes:

    Fulton> Stupid question, but what the hey: Someone emailed me a
    Fulton> PageMaker document that they had converted to HTML.  The
    Fulton> HTML attachment contains a bunch of carriage returns (^M)
    Fulton> w/o the corresponding linefeeds (^J). How do I convert for
    Fulton> UNIX-style consumption?

        In addition to all the other solutions offered there's always:


perl -pe 's/\cM+$//' < oldfile > newfile


        Or just do it in place with no redirection:


perl -i -pe 's/\cM+$//' oldfile


-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
770 933-0600 x211(w)  |  scary questions." -- Jules                =(___)=
                      |                                               U
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list