bug-bash
[Top][All Lists]
Advanced

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

Re: Bug in Bash 2.05 and lower


From: Chet Ramey
Subject: Re: Bug in Bash 2.05 and lower
Date: Wed, 3 Oct 2001 16:33:51 -0400

> Here are some outputs:
> 
> $echo -e '\x54'
> T
> $echo -e '\x544'  # in fact it is hex 44
> D
> $echo -e '\x545'  # hex 45
> E
> $echo -e '\x5455'
> E5
> 
> So, left digit is  siply ignored.

More precisely, it's implicitly masked with CHAR_MAX.

> Maybe i am wrong but I think that
> this is not right. This is unclear and may cause errors.

I agree that the code for echo, printf, and $'...' should only accept
two hex digits after the `\x' to conform to ANSI C and be compatible
with ksh.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]