[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in Bash 2.05 and lower
From: |
format |
Subject: |
Bug in Bash 2.05 and lower |
Date: |
Wed, 3 Oct 2001 20:44:12 +0400 |
Hello.
tech info:
--------------------------
Intel Pentium II 400 Mhz, 256 RAM
Linux Mandrake 7.0 kernel 2.2.14 and 8.0 kernel 2.2.19
GNU bash,version 2.05.0(1)-release (i686-pc-linux-gnu)
gcc-2.96
---------------------------
There is a strange thing in Bash.
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. Maybe i am wrong but I think that
this is not right. This is unclear and may cause errors.
Looks like the mechanism for hex values is same as a mechanism for octal
values with several modifications.
There is also an error in Bash docs:
"\xnnn the character whose ASCII code is the
hexadecimal value nnn (one to three digits)"
Three digits? Too many for ASCII, i think.
--
Best regards,
Dmitry Mashourtsev mailto:format@chat.ru
- Bug in Bash 2.05 and lower,
format <=