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

Re: Word Processor format?



schmidtd <schmidtd@my-deja.com> wrote:
> Thanks much for the offer, Bill!  As it happens, the data's not mine,
> so I can't do that just yet.  I've reduced the file filter to a few
> sed rules - lop off the high bit, delete all $00, transform those $40
> contraptions to newlines, terminate the file after seeing $41 $01
> $06.  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.

-- 
Send mail to fadden@fadden.com (Andy McFadden) - http://www.fadden.com/
Fight Internet Spam - http://spam.abuse.net/spam/ & http://spamcop.net/