Re: sed on binary files

2008-10-02 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Gary V. Vaughan on 10/1/2008 10:09 PM: I'm working on making m4 1.6 transparently handle NUL, Excellent! I made an attempt to do that myself on the 2.0 branch some years ago, but it didn't go well so I never committed... The

Re: sed on binary files

2008-10-02 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Ralf Wildenhues on 10/1/2008 11:32 PM: Hi Ralf, Gary, Is there any portable way to process files that contain NUL bytes? tr? If you only need to compare for equality, then use cmp. Equality is insufficient the way the test is

Re: sed on binary files

2008-10-02 Thread Ralf Wildenhues
* Eric Blake wrote on Thu, Oct 02, 2008 at 02:46:38PM CEST: I'll add a blurb to the autoconf manual on sed mentioning that it cannot be used on binary files (although Posix already says that), Isn't that obvious? I mean, of all classic unix text-related tools, only very few operate on

Re: sed on binary files

2008-10-01 Thread Gary V. Vaughan
Hi Eric, On 2 Oct 2008, at 10:51, Eric Blake wrote: Is there any portable way to process files that contain NUL bytes? None that I'm aware of. Many GNU utilities are reasonably well behaved with respect to '\0', and m4 is unusual to some extent in that we don't handle them well

Re: sed on binary files

2008-10-01 Thread Ralf Wildenhues
Hi Eric, * Eric Blake wrote on Thu, Oct 02, 2008 at 04:51:58AM CEST: Is there any portable way to process files that contain NUL bytes? tr? If you only need to compare for equality, then use cmp. The Solaris man pages mention that /usr/xpg4/bin/tr can handle NUL bytes, but not