[ale] some other regexp

Ryan Bridges reb at techie.com
Mon Jun 28 12:24:06 EDT 1999


What I wound up doing, was to search for multiple instances of the line
break in hex form and then replace it with a single.
s/\x0D\x0A/\x0D\x0A/Z/gm;
s/ZZ/\x0D\x0A/gm;
s/Z/ /gm;

it was quick, dirty, and inefficient...  but it worked:)

Thanks for all of your help guys
Ryan

----------------------------------------------------------------
Ryan Bridges <ryan at linuxgeneralstore.com>
B.Gates : quality software :: R.McDonald : gourmet cuisine
----------------------------------------------------------------

On Mon, 28 Jun 1999, Zhongbin Yu "jerry" wrote:

> Have you tried chop instead of chomp?? chomp, is supposedly chop in
> safe-mode, so it will refuse to chop things. In my case, a MS-DOS
> formatted file with ^M at the end, will not be chomped but can be choped.
> back your file, then, chop, chop, till you are satisfied.
> 
> Good luck.
> 
> Jerry Yu
> ----------------------------------------------------------------------------
> Systems Engineer	| zyu at tc.net
> Premiere Technologies	| 404-262-8544(O)	1-800-979-1105 (P)
> Atlanta, GA 30326	| ae.tc.net/dept/engineering/op/public/developer/zyu
> 
> On Fri, 25 Jun 1999, Ryan Bridges wrote:
> 
> #
> #I need to strip the Linefeeds out of a file.  I discovered that this is
> #not a newline (\n) but something else.  I have tried everything I can
> #think of and connot get rid of them. Anyone have any ideas?  PERL didn't
> #work so far and I am not good with sed/awk...
> #Thanks again in advance,
> #Ryan
> #
> #----------------------------------------------------------------
> #Ryan Bridges <ryan at linuxgeneralstore.com>
> #B.Gates : quality software :: R.McDonald : gourmet cuisine
> #----------------------------------------------------------------
> #
> 






More information about the Ale mailing list