[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Word Processor format?



On Jul 30, 10:39 am, Andy McFadden <fad...@fadden.com> wrote:
> schmidtd <schmi...@my-deja.com> wrote:
> > My only problem now... sed really, really likes $0a.  I really,
> > really need it to treat $0a like any other byte.  I was hoping to
> > avoid going to a higher level language, but may have to bite the
> > bullet.
>
> If you have a "spare" byte value (i.e. one that you can guarantee is
> unused after earlier transformations), you can use "tr" to convert the
> LF to (say) $00, perform your sed operations, and then use tr to convert
> them back.
Ah, 'tr' to the rescue.  Perfect solution, Andy - thanks!