Subject: bug#18987: the bourne shell printf-vs-\xHH portability trap

From: Jim Meyering <[email-masked]>
Date: Sat, 8 Nov 2014 12:09:45 -0800

On Sat, Nov 8, 2014 at 11:46 AM,  <[email-masked]> wrote:
> Norihiro Tanaka <[email-masked]> wrote:
>
>> Thanks, but it seem that it is also unportable.  On Solaris 10 and AIX 7,
>> below.  Need Gawk for tests?
>>
>> $ awk 'BEGIN { printf "\x41" }' </dev/null
>> \x41
>
> If you use octal it should work with any awk.

Thanks, but octal would also work with printf.
My only reason to use awk was because I thought (wrongly)
that it could portably handle that use of hex constants.
The trouble was that I have a strong preference for using hex
constants in the tests.

With the updated patch I sent today, the problem is resolved.