[ale] some other regexp

Mike Fletcher fletch at phydeaux.org
Sun Jun 27 20:07:39 EDT 1999


>>>>> "Ryan" == Ryan Bridges <reb at techie.com> writes:

    Ryan> I need to strip the Linefeeds out of a file.  I discovered
    Ryan> that this is not a newline (\n) but something else.  I have

	*) Figure out what character it is you do have (od -ca can be 
           useful to do this)

	*) Strip that character.

	For example, if you wanted to remove ^M's from a DOS style
text file you'd do:


perl -i.bak -pe 's/\cM+$//' foo.txt


-- 
Fletch                |                                            __`'/|
fletch at phydeaux.org   |       "I drank what?" -- Socrates          \ o.O'
678 443-6239(w)       |                                            =(___)=
                      |                                               U






More information about the Ale mailing list