[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] some other regexp
- Subject: [ale] some other regexp
- From: fletch at phydeaux.org (Mike Fletcher)
- Date: 27 Jun 1999 20:07:39 -0400
>>>>> "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