On 19 Oct 2008, at 18:07, Glenn Fowler wrote:

>
> on a machine this fails on
>
> what does this output
> ---
> #!/bin/sh
> echo A | tr A '\301' | od -c
> ---

On a 10u5 ("good") machine:
0000000 301  \n
0000002

On an OpenSolaris ("bad") machine:
0000000   A  \n
0000002

Ah, so it could be tr. In both cases echo's a shell builtin, and tr  
is /usr/bin/tr.

> also, what is the output of /bin/sh -x on the snippet

 From the good machine:

+ echo A
+ od -c
+ tr A \301
0000000 301  \n
0000002

 From the bad machine:

+ echo A
+ od -c
+ tr A '\301'
0000000   A  \n
0000002

So there's a slight difference in quoting too.

Cheers,

Chris

Reply via email to